Your IP : 216.73.216.147


Current Path : /home/lejardintz/www/media/foundry/3.1/scripts/
Upload File :
Current File : /home/lejardintz/www/media/foundry/3.1/scripts/foundry.min.js

!function(global,factory){"object"==typeof module&&"object"==typeof module.exports?module.exports=global.document?factory(global,!0):function(w){if(!w.document)throw new Error("jQuery requires a window with a document");return factory(w)}:factory(global)}("undefined"!=typeof window?window:this,function(window){function isArraylike(obj){var length=obj.length,type=jQuery.type(obj);return"function"===type||jQuery.isWindow(obj)?!1:1===obj.nodeType&&length?!0:"array"===type||0===length||"number"==typeof length&&length>0&&length-1 in obj
}function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier))return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not});if(qualifier.nodeType)return jQuery.grep(elements,function(elem){return elem===qualifier!==not});if("string"==typeof qualifier){if(risSimple.test(qualifier))return jQuery.filter(qualifier,elements,not);qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return jQuery.inArray(elem,qualifier)>=0!==not})}function sibling(cur,dir){do cur=cur[dir];
while(cur&&1!==cur.nodeType);return cur}function createOptions(options){var object=optionsCache[options]={};return jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=!0}),object}function detach(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",completed,!1),window.removeEventListener("load",completed,!1)):(document.detachEvent("onreadystatechange",completed),window.detachEvent("onload",completed))}function completed(){(document.addEventListener||"load"===event.type||"complete"===document.readyState)&&(detach(),jQuery.ready())
}function dataAttr(elem,key,data){if(void 0===data&&1===elem.nodeType){var name="data-"+key.replace(rmultiDash,"-$1").toLowerCase();if(data=elem.getAttribute(name),"string"==typeof data){try{data="true"===data?!0:"false"===data?!1:"null"===data?null:+data+""===data?+data:rbrace.test(data)?jQuery.parseJSON(data):data}catch(e){}jQuery.data(elem,key,data)}else data=void 0}return data}function isEmptyDataObject(obj){var name;for(name in obj)if(("data"!==name||!jQuery.isEmptyObject(obj[name]))&&"toJSON"!==name)return!1;
return!0}function internalData(elem,name,data,pvt){if(jQuery.acceptData(elem)){var ret,thisCache,internalKey=jQuery.expando,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[internalKey]:elem[internalKey]&&internalKey;if(id&&cache[id]&&(pvt||cache[id].data)||void 0!==data||"string"!=typeof name)return id||(id=isNode?elem[internalKey]=deletedIds.pop()||jQuery.guid++:internalKey),cache[id]||(cache[id]=isNode?{}:{toJSON:jQuery.noop}),("object"==typeof name||"function"==typeof name)&&(pvt?cache[id]=jQuery.extend(cache[id],name):cache[id].data=jQuery.extend(cache[id].data,name)),thisCache=cache[id],pvt||(thisCache.data||(thisCache.data={}),thisCache=thisCache.data),void 0!==data&&(thisCache[jQuery.camelCase(name)]=data),"string"==typeof name?(ret=thisCache[name],null==ret&&(ret=thisCache[jQuery.camelCase(name)])):ret=thisCache,ret
}}function internalRemoveData(elem,name,pvt){if(jQuery.acceptData(elem)){var thisCache,i,isNode=elem.nodeType,cache=isNode?jQuery.cache:elem,id=isNode?elem[jQuery.expando]:jQuery.expando;if(cache[id]){if(name&&(thisCache=pvt?cache[id]:cache[id].data)){jQuery.isArray(name)?name=name.concat(jQuery.map(name,jQuery.camelCase)):name in thisCache?name=[name]:(name=jQuery.camelCase(name),name=name in thisCache?[name]:name.split(" ")),i=name.length;for(;i--;)delete thisCache[name[i]];if(pvt?!isEmptyDataObject(thisCache):!jQuery.isEmptyObject(thisCache))return
}(pvt||(delete cache[id].data,isEmptyDataObject(cache[id])))&&(isNode?jQuery.cleanData([elem],!0):support.deleteExpando||cache!=cache.window?delete cache[id]:cache[id]=null)}}}function returnTrue(){return!0}function returnFalse(){return!1}function safeActiveElement(){try{return document.activeElement}catch(err){}}function createSafeFragment(document){var list=nodeNames.split("|"),safeFrag=document.createDocumentFragment();if(safeFrag.createElement)for(;list.length;)safeFrag.createElement(list.pop());return safeFrag
}function getAll(context,tag){var elems,elem,i=0,found=typeof context.getElementsByTagName!==strundefined?context.getElementsByTagName(tag||"*"):typeof context.querySelectorAll!==strundefined?context.querySelectorAll(tag||"*"):void 0;if(!found)for(found=[],elems=context.childNodes||context;null!=(elem=elems[i]);i++)!tag||jQuery.nodeName(elem,tag)?found.push(elem):jQuery.merge(found,getAll(elem,tag));return void 0===tag||tag&&jQuery.nodeName(context,tag)?jQuery.merge([context],found):found}function fixDefaultChecked(elem){rcheckableType.test(elem.type)&&(elem.defaultChecked=elem.checked)
}function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(11!==content.nodeType?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){return elem.type=(null!==jQuery.find.attr(elem,"type"))+"/"+elem.type,elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);return match?elem.type=match[1]:elem.removeAttribute("type"),elem}function setGlobalEval(elems,refElements){for(var elem,i=0;null!=(elem=elems[i]);i++)jQuery._data(elem,"globalEval",!refElements||jQuery._data(refElements[i],"globalEval"))
}function cloneCopyEvent(src,dest){if(1===dest.nodeType&&jQuery.hasData(src)){var type,i,l,oldData=jQuery._data(src),curData=jQuery._data(dest,oldData),events=oldData.events;if(events){delete curData.handle,curData.events={};for(type in events)for(i=0,l=events[type].length;l>i;i++)jQuery.event.add(dest,type,events[type][i])}curData.data&&(curData.data=jQuery.extend({},curData.data))}}function fixCloneNodeIssues(src,dest){var nodeName,e,data;if(1===dest.nodeType){if(nodeName=dest.nodeName.toLowerCase(),!support.noCloneEvent&&dest[jQuery.expando]){data=jQuery._data(dest);
for(e in data.events)jQuery.removeEvent(dest,e,data.handle);dest.removeAttribute(jQuery.expando)}"script"===nodeName&&dest.text!==src.text?(disableScript(dest).text=src.text,restoreScript(dest)):"object"===nodeName?(dest.parentNode&&(dest.outerHTML=src.outerHTML),support.html5Clone&&src.innerHTML&&!jQuery.trim(dest.innerHTML)&&(dest.innerHTML=src.innerHTML)):"input"===nodeName&&rcheckableType.test(src.type)?(dest.defaultChecked=dest.checked=src.checked,dest.value!==src.value&&(dest.value=src.value)):"option"===nodeName?dest.defaultSelected=dest.selected=src.defaultSelected:("input"===nodeName||"textarea"===nodeName)&&(dest.defaultValue=src.defaultValue)
}}function actualDisplay(name,doc){var elem=jQuery(doc.createElement(name)).appendTo(doc.body),display=window.getDefaultComputedStyle?window.getDefaultComputedStyle(elem[0]).display:jQuery.css(elem[0],"display");return elem.detach(),display}function defaultDisplay(nodeName){var doc=document,display=elemdisplay[nodeName];return display||(display=actualDisplay(nodeName,doc),"none"!==display&&display||(iframe=(iframe||jQuery("<iframe frameborder='0' width='0' height='0'/>")).appendTo(doc.documentElement),doc=(iframe[0].contentWindow||iframe[0].contentDocument).document,doc.write(),doc.close(),display=actualDisplay(nodeName,doc),iframe.detach()),elemdisplay[nodeName]=display),display
}function addGetHookIf(conditionFn,hookFn){return{get:function(){var condition=conditionFn();if(null!=condition)return condition?(delete this.get,void 0):(this.get=hookFn).apply(this,arguments)}}}function vendorPropName(style,name){if(name in style)return name;for(var capName=name.charAt(0).toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;i--;)if(name=cssPrefixes[i]+capName,name in style)return name;return origName}function showHide(elements,show){for(var display,elem,hidden,values=[],index=0,length=elements.length;length>index;index++)elem=elements[index],elem.style&&(values[index]=jQuery._data(elem,"olddisplay"),display=elem.style.display,show?(values[index]||"none"!==display||(elem.style.display=""),""===elem.style.display&&isHidden(elem)&&(values[index]=jQuery._data(elem,"olddisplay",defaultDisplay(elem.nodeName)))):values[index]||(hidden=isHidden(elem),(display&&"none"!==display||!hidden)&&jQuery._data(elem,"olddisplay",hidden?display:jQuery.css(elem,"display"))));
for(index=0;length>index;index++)elem=elements[index],elem.style&&(show&&"none"!==elem.style.display&&""!==elem.style.display||(elem.style.display=show?values[index]||"":"none"));return elements}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){for(var i=extra===(isBorderBox?"border":"content")?4:"width"===name?1:0,val=0;4>i;i+=2)"margin"===extra&&(val+=jQuery.css(elem,extra+cssExpand[i],!0,styles)),isBorderBox?("content"===extra&&(val-=jQuery.css(elem,"padding"+cssExpand[i],!0,styles)),"margin"!==extra&&(val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles))):(val+=jQuery.css(elem,"padding"+cssExpand[i],!0,styles),"padding"!==extra&&(val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",!0,styles)));
return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=!0,val="width"===name?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=support.boxSizing()&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles);if(0>=val||null==val){if(val=curCSS(elem,name,styles),(0>val||null==val)&&(val=elem.style[name]),rnumnonpx.test(val))return val;valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]),val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"
}function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}function createFxNow(){return setTimeout(function(){fxNow=void 0}),fxNow=jQuery.now()}function genFx(type,includeWidth){var which,attrs={height:type},i=0;for(includeWidth=includeWidth?1:0;4>i;i+=2-includeWidth)which=cssExpand[i],attrs["margin"+which]=attrs["padding"+which]=type;return includeWidth&&(attrs.opacity=attrs.width=type),attrs}function createTween(value,prop,animation){for(var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;length>index;index++)if(tween=collection[index].call(animation,prop,value))return tween
}function defaultPrefilter(elem,props,opts){var prop,value,toggle,tween,hooks,oldfire,display,dDisplay,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHidden(elem),dataShow=jQuery._data(elem,"fxshow");opts.queue||(hooks=jQuery._queueHooks(elem,"fx"),null==hooks.unqueued&&(hooks.unqueued=0,oldfire=hooks.empty.fire,hooks.empty.fire=function(){hooks.unqueued||oldfire()}),hooks.unqueued++,anim.always(function(){anim.always(function(){hooks.unqueued--,jQuery.queue(elem,"fx").length||hooks.empty.fire()})
})),1===elem.nodeType&&("height"in props||"width"in props)&&(opts.overflow=[style.overflow,style.overflowX,style.overflowY],display=jQuery.css(elem,"display"),dDisplay=defaultDisplay(elem.nodeName),"none"===display&&(display=dDisplay),"inline"===display&&"none"===jQuery.css(elem,"float")&&(support.inlineBlockNeedsLayout&&"inline"!==dDisplay?style.zoom=1:style.display="inline-block")),opts.overflow&&(style.overflow="hidden",support.shrinkWrapBlocks()||anim.always(function(){style.overflow=opts.overflow[0],style.overflowX=opts.overflow[1],style.overflowY=opts.overflow[2]
}));for(prop in props)if(value=props[prop],rfxtypes.exec(value)){if(delete props[prop],toggle=toggle||"toggle"===value,value===(hidden?"hide":"show")){if("show"!==value||!dataShow||void 0===dataShow[prop])continue;hidden=!0}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop)}if(!jQuery.isEmptyObject(orig)){dataShow?"hidden"in dataShow&&(hidden=dataShow.hidden):dataShow=jQuery._data(elem,"fxshow",{}),toggle&&(dataShow.hidden=!hidden),hidden?jQuery(elem).show():anim.done(function(){jQuery(elem).hide()
}),anim.done(function(){var prop;jQuery._removeData(elem,"fxshow");for(prop in orig)jQuery.style(elem,prop,orig[prop])});for(prop in orig)tween=createTween(hidden?dataShow[prop]:0,prop,anim),prop in dataShow||(dataShow[prop]=tween.start,hidden&&(tween.end=tween.start,tween.start="width"===prop||"height"===prop?1:0))}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;for(index in props)if(name=jQuery.camelCase(index),easing=specialEasing[name],value=props[index],jQuery.isArray(value)&&(easing=value[1],value=props[index]=value[0]),index!==name&&(props[name]=value,delete props[index]),hooks=jQuery.cssHooks[name],hooks&&"expand"in hooks){value=hooks.expand(value),delete props[name];
for(index in value)index in props||(props[index]=value[index],specialEasing[index]=easing)}else specialEasing[name]=easing}function Animation(elem,properties,options){var result,stopped,index=0,length=animationPrefilters.length,deferred=jQuery.Deferred().always(function(){delete tick.elem}),tick=function(){if(stopped)return!1;for(var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;length>index;index++)animation.tweens[index].run(percent);
return deferred.notifyWith(elem,[animation,percent,remaining]),1>percent&&length?remaining:(deferred.resolveWith(elem,[animation]),!1)},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(!0,{specialEasing:{}},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);
return animation.tweens.push(tween),tween},stop:function(gotoEnd){var index=0,length=gotoEnd?animation.tweens.length:0;if(stopped)return this;for(stopped=!0;length>index;index++)animation.tweens[index].run(1);return gotoEnd?deferred.resolveWith(elem,[animation,gotoEnd]):deferred.rejectWith(elem,[animation,gotoEnd]),this}}),props=animation.props;for(propFilter(props,animation.opts.specialEasing);length>index;index++)if(result=animationPrefilters[index].call(animation,elem,props,animation.opts))return result;return jQuery.map(props,createTween,animation),jQuery.isFunction(animation.opts.start)&&animation.opts.start.call(elem,animation),jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue})),animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always)
}function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){"string"!=typeof dataTypeExpression&&(func=dataTypeExpression,dataTypeExpression="*");var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func))for(;dataType=dataTypes[i++];)"+"===dataType.charAt(0)?(dataType=dataType.slice(1)||"*",(structure[dataType]=structure[dataType]||[]).unshift(func)):(structure[dataType]=structure[dataType]||[]).push(func)}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){function inspect(dataType){var selected;
return inspected[dataType]=!0,jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);return"string"!=typeof dataTypeOrTransport||seekingTransport||inspected[dataTypeOrTransport]?seekingTransport?!(selected=dataTypeOrTransport):void 0:(options.dataTypes.unshift(dataTypeOrTransport),inspect(dataTypeOrTransport),!1)}),selected}var inspected={},seekingTransport=structure===transports;return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")
}function ajaxExtend(target,src){var deep,key,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src)void 0!==src[key]&&((flatOptions[key]?target:deep||(deep={}))[key]=src[key]);return deep&&jQuery.extend(!0,target,deep),target}function ajaxHandleResponses(s,jqXHR,responses){for(var firstDataType,ct,finalDataType,type,contents=s.contents,dataTypes=s.dataTypes;"*"===dataTypes[0];)dataTypes.shift(),void 0===ct&&(ct=s.mimeType||jqXHR.getResponseHeader("Content-Type"));if(ct)for(type in contents)if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);
break}if(dataTypes[0]in responses)finalDataType=dataTypes[0];else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}firstDataType||(firstDataType=type)}finalDataType=finalDataType||firstDataType}return finalDataType?(finalDataType!==dataTypes[0]&&dataTypes.unshift(finalDataType),responses[finalDataType]):void 0}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1])for(conv in s.converters)converters[conv.toLowerCase()]=s.converters[conv];
for(current=dataTypes.shift();current;)if(s.responseFields[current]&&(jqXHR[s.responseFields[current]]=response),!prev&&isSuccess&&s.dataFilter&&(response=s.dataFilter(response,s.dataType)),prev=current,current=dataTypes.shift())if("*"===current)current=prev;else if("*"!==prev&&prev!==current){if(conv=converters[prev+" "+current]||converters["* "+current],!conv)for(conv2 in converters)if(tmp=conv2.split(" "),tmp[1]===current&&(conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]])){conv===!0?conv=converters[conv2]:converters[conv2]!==!0&&(current=tmp[0],dataTypes.unshift(tmp[1]));
break}if(conv!==!0)if(conv&&s["throws"])response=conv(response);else try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}return{state:"success",data:response}}function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj))jQuery.each(obj,function(i,v){traditional||rbracket.test(prefix)?add(prefix,v):buildParams(prefix+"["+("object"==typeof v?i:"")+"]",v,traditional,add)});else if(traditional||"object"!==jQuery.type(obj))add(prefix,obj);
else for(name in obj)buildParams(prefix+"["+name+"]",obj[name],traditional,add)}function createStandardXHR(){try{return new window.XMLHttpRequest}catch(e){}}function createActiveXHR(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function getWindow(elem){return jQuery.isWindow(elem)?elem:9===elem.nodeType?elem.defaultView||elem.parentWindow:!1}var deletedIds=[],slice=deletedIds.slice,concat=deletedIds.concat,push=deletedIds.push,indexOf=deletedIds.indexOf,class2type={},toString=class2type.toString,hasOwn=class2type.hasOwnProperty,trim="".trim,support={},version="1.11.1pre",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)
},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return null!=num?0>num?this[num+this.length]:this[num]:slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);return ret.prevObject=this,ret.context=this.context,ret},each:function(callback,args){return jQuery.each(this,callback,args)
},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(0>i?len:0);return this.pushStack(j>=0&&len>j?[this[j]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:push,sort:deletedIds.sort,splice:deletedIds.splice},jQuery.extend=jQuery.fn.extend=function(){var src,copyIsArray,copy,name,options,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=!1;
for("boolean"==typeof target&&(deep=target,target=arguments[i]||{},i++),"object"==typeof target||jQuery.isFunction(target)||(target={}),i===length&&(target=this,i--);length>i;i++)if(null!=(options=arguments[i]))for(name in options)src=target[name],copy=options[name],target!==copy&&(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=jQuery.isArray(copy)))?(copyIsArray?(copyIsArray=!1,clone=src&&jQuery.isArray(src)?src:[]):clone=src&&jQuery.isPlainObject(src)?src:{},target[name]=jQuery.extend(deep,clone,copy)):void 0!==copy&&(target[name]=copy));
return target},jQuery.extend({expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),isReady:!0,error:function(msg){throw new Error(msg)},noop:function(){},isFunction:function(obj){return"function"===jQuery.type(obj)},isArray:Array.isArray||function(obj){return"array"===jQuery.type(obj)},isWindow:function(obj){return null!=obj&&obj==obj.window},isNumeric:function(obj){return obj-parseFloat(obj)>=0},isEmptyObject:function(obj){var name;for(name in obj)return!1;return!0},isPlainObject:function(obj){var key;
if(!obj||"object"!==jQuery.type(obj)||obj.nodeType||jQuery.isWindow(obj))return!1;try{if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(support.ownLast)for(key in obj)return hasOwn.call(obj,key);for(key in obj);return void 0===key||hasOwn.call(obj,key)},type:function(obj){return null==obj?obj+"":"object"==typeof obj||"function"==typeof obj?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(data){data&&jQuery.trim(data)&&(window.execScript||function(data){window.eval.call(window,data)
})(data)},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray)for(;length>i&&(value=callback.apply(obj[i],args),value!==!1);i++);else for(i in obj)if(value=callback.apply(obj[i],args),value===!1)break}else if(isArray)for(;length>i&&(value=callback.call(obj[i],i,obj[i]),value!==!1);i++);else for(i in obj)if(value=callback.call(obj[i],i,obj[i]),value===!1)break;
return obj},trim:trim&&!trim.call(" ")?function(text){return null==text?"":trim.call(text)}:function(text){return null==text?"":(text+"").replace(rtrim,"")},makeArray:function(arr,results){var ret=results||[];return null!=arr&&(isArraylike(Object(arr))?jQuery.merge(ret,"string"==typeof arr?[arr]:arr):push.call(ret,arr)),ret},inArray:function(elem,arr,i){var len;if(arr){if(indexOf)return indexOf.call(arr,elem,i);for(len=arr.length,i=i?0>i?Math.max(0,len+i):i:0;len>i;i++)if(i in arr&&arr[i]===elem)return i}return-1
},merge:function(first,second){for(var len=+second.length,j=0,i=first.length;len>j;)first[i++]=second[j++];if(len!==len)for(;void 0!==second[j];)first[i++]=second[j++];return first.length=i,first},grep:function(elems,callback,invert){for(var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;length>i;i++)callbackInverse=!callback(elems[i],i),callbackInverse!==callbackExpect&&matches.push(elems[i]);return matches},map:function(elems,callback,arg){var value,i=0,length=elems.length,isArray=isArraylike(elems),ret=[];
if(isArray)for(;length>i;i++)value=callback(elems[i],i,arg),null!=value&&ret.push(value);else for(i in elems)value=callback(elems[i],i,arg),null!=value&&ret.push(value);return concat.apply([],ret)},guid:1,proxy:function(fn,context){var args,proxy,tmp;return"string"==typeof context&&(tmp=fn[context],context=fn,fn=tmp),jQuery.isFunction(fn)?(args=slice.call(arguments,2),proxy=function(){return fn.apply(context||this,args.concat(slice.call(arguments)))},proxy.guid=fn.guid=fn.guid||jQuery.guid++,proxy):void 0},now:function(){return+new Date
},support:support}),jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(i,name){class2type["[object "+name+"]"]=name.toLowerCase()});var Sizzle=function(window){function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document&&setDocument(context),context=context||document,results=results||[],!selector||"string"!=typeof selector)return results;if(1!==(nodeType=context.nodeType)&&9!==nodeType)return[];
if(documentIsHTML&&!seed){if(match=rquickExpr.exec(selector))if(m=match[1]){if(9===nodeType){if(elem=context.getElementById(m),!elem||!elem.parentNode)return results;if(elem.id===m)return results.push(elem),results}else if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m)return results.push(elem),results}else{if(match[2])return push.apply(results,context.getElementsByTagName(selector)),results;if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName)return push.apply(results,context.getElementsByClassName(m)),results
}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nid=old=expando,newContext=context,newSelector=9===nodeType&&selector,1===nodeType&&"object"!==context.nodeName.toLowerCase()){for(groups=tokenize(selector),(old=context.getAttribute("id"))?nid=old.replace(rescape,"\\$&"):context.setAttribute("id",nid),nid="[id='"+nid+"'] ",i=groups.length;i--;)groups[i]=nid+toSelector(groups[i]);newContext=rsibling.test(selector)&&testContext(context.parentNode)||context,newSelector=groups.join(",")}if(newSelector)try{return push.apply(results,newContext.querySelectorAll(newSelector)),results
}catch(qsaError){}finally{old||context.removeAttribute("id")}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){function cache(key,value){return keys.push(key+" ")>Expr.cacheLength&&delete cache[keys.shift()],cache[key+" "]=value}var keys=[];return cache}function markFunction(fn){return fn[expando]=!0,fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return!1}finally{div.parentNode&&div.parentNode.removeChild(div),div=null}}function addHandle(attrs,handler){for(var arr=attrs.split("|"),i=attrs.length;i--;)Expr.attrHandle[arr[i]]=handler
}function siblingCheck(a,b){var cur=b&&a,diff=cur&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff)return diff;if(cur)for(;cur=cur.nextSibling;)if(cur===b)return-1;return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return("input"===name||"button"===name)&&elem.type===type
}}function createPositionalPseudo(fn){return markFunction(function(argument){return argument=+argument,markFunction(function(seed,matches){for(var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;i--;)seed[j=matchIndexes[i]]&&(seed[j]=!(matches[j]=seed[j]))})})}function testContext(context){return context&&typeof context.getElementsByTagName!==strundefined&&context}function setFilters(){}function tokenize(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];
if(cached)return parseOnly?0:cached.slice(0);for(soFar=selector,groups=[],preFilters=Expr.preFilter;soFar;){(!matched||(match=rcomma.exec(soFar)))&&(match&&(soFar=soFar.slice(match[0].length)||soFar),groups.push(tokens=[])),matched=!1,(match=rcombinators.exec(soFar))&&(matched=match.shift(),tokens.push({value:matched,type:match[0].replace(rtrim," ")}),soFar=soFar.slice(matched.length));for(type in Expr.filter)!(match=matchExpr[type].exec(soFar))||preFilters[type]&&!(match=preFilters[type](match))||(matched=match.shift(),tokens.push({value:matched,type:type,matches:match}),soFar=soFar.slice(matched.length));
if(!matched)break}return parseOnly?soFar.length:soFar?Sizzle.error(selector):tokenCache(selector,groups).slice(0)}function toSelector(tokens){for(var i=0,len=tokens.length,selector="";len>i;i++)selector+=tokens[i].value;return selector}function addCombinator(matcher,combinator,base){var dir=combinator.dir,checkNonElements=base&&"parentNode"===dir,doneName=done++;return combinator.first?function(elem,context,xml){for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements)return matcher(elem,context,xml)}:function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];
if(xml){for(;elem=elem[dir];)if((1===elem.nodeType||checkNonElements)&&matcher(elem,context,xml))return!0}else for(;elem=elem[dir];)if(1===elem.nodeType||checkNonElements){if(outerCache=elem[expando]||(elem[expando]={}),(oldCache=outerCache[dir])&&oldCache[0]===dirruns&&oldCache[1]===doneName)return newCache[2]=oldCache[2];if(outerCache[dir]=newCache,newCache[2]=matcher(elem,context,xml))return!0}}}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){for(var i=matchers.length;i--;)if(!matchers[i](elem,context,xml))return!1;
return!0}:matchers[0]}function multipleContexts(selector,contexts,results){for(var i=0,len=contexts.length;len>i;i++)Sizzle(selector,contexts[i],results);return results}function condense(unmatched,map,filter,context,xml){for(var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=null!=map;len>i;i++)(elem=unmatched[i])&&(!filter||filter(elem,context,xml))&&(newUnmatched.push(elem),mapped&&map.push(i));return newUnmatched}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){return postFilter&&!postFilter[expando]&&(postFilter=setMatcher(postFilter)),postFinder&&!postFinder[expando]&&(postFinder=setMatcher(postFinder,postSelector)),markFunction(function(seed,results,context,xml){var temp,i,elem,preMap=[],postMap=[],preexisting=results.length,elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),matcherIn=!preFilter||!seed&&selector?elems:condense(elems,preMap,preFilter,context,xml),matcherOut=matcher?postFinder||(seed?preFilter:preexisting||postFilter)?[]:results:matcherIn;
if(matcher&&matcher(matcherIn,matcherOut,context,xml),postFilter)for(temp=condense(matcherOut,postMap),postFilter(temp,[],context,xml),i=temp.length;i--;)(elem=temp[i])&&(matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem));if(seed){if(postFinder||preFilter){if(postFinder){for(temp=[],i=matcherOut.length;i--;)(elem=matcherOut[i])&&temp.push(matcherIn[i]=elem);postFinder(null,matcherOut=[],temp,xml)}for(i=matcherOut.length;i--;)(elem=matcherOut[i])&&(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1&&(seed[temp]=!(results[temp]=elem))
}}else matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut),postFinder?postFinder(null,results,matcherOut,xml):push.apply(results,matcherOut)})}function matcherFromTokens(tokens){for(var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,!0),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1
},implicitRelative,!0),matchers=[function(elem,context,xml){return!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml))}];len>i;i++)if(matcher=Expr.relative[tokens[i].type])matchers=[addCombinator(elementMatcher(matchers),matcher)];else{if(matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches),matcher[expando]){for(j=++i;len>j&&!Expr.relative[tokens[j].type];j++);return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:" "===tokens[i-2].type?"*":""})).replace(rtrim,"$1"),matcher,j>i&&matcherFromTokens(tokens.slice(i,j)),len>j&&matcherFromTokens(tokens=tokens.slice(j)),len>j&&toSelector(tokens))
}matchers.push(matcher)}return elementMatcher(matchers)}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=dirruns+=null==contextBackup?1:Math.random()||.1,len=elems.length;for(outermost&&(outermostContext=context!==document&&context);i!==len&&null!=(elem=elems[i]);i++){if(byElement&&elem){for(j=0;matcher=elementMatchers[j++];)if(matcher(elem,context,xml)){results.push(elem);
break}outermost&&(dirruns=dirrunsUnique)}bySet&&((elem=!matcher&&elem)&&matchedCount--,seed&&unmatched.push(elem))}if(matchedCount+=i,bySet&&i!==matchedCount){for(j=0;matcher=setMatchers[j++];)matcher(unmatched,setMatched,context,xml);if(seed){if(matchedCount>0)for(;i--;)unmatched[i]||setMatched[i]||(setMatched[i]=pop.call(results));setMatched=condense(setMatched)}push.apply(results,setMatched),outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1&&Sizzle.uniqueSort(results)}return outermost&&(dirruns=dirrunsUnique,outermostContext=contextBackup),unmatched
};return bySet?markFunction(superMatcher):superMatcher}var i,support,Expr,getText,isXML,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+-new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){return a===b&&(hasDuplicate=!0),0},strundefined="undefined",MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=arr.indexOf||function(elem){for(var i=0,len=this.length;len>i;i++)if(this[i]===elem)return i;
return-1},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",whitespace="[\\x20\\t\\r\\n\\f]",characterEncoding="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",identifier=characterEncoding.replace("w","w#"),attributes="\\["+whitespace+"*("+characterEncoding+")"+whitespace+"*(?:([*^$|!~]?=)"+whitespace+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+identifier+")|)|)"+whitespace+"*\\]",pseudos=":("+characterEncoding+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+attributes.replace(3,8)+")*)|.*)\\)|)",rtrim=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rcombinators=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;
return high!==high||escapedWhitespace?escaped:0>high?String.fromCharCode(high+65536):String.fromCharCode(55296|high>>10,56320|1023&high)};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes),arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){for(var j=target.length,i=0;target[j++]=els[i++];);target.length=j-1}}}support=Sizzle.support={},isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;
return documentElement?"HTML"!==documentElement.nodeName:!1},setDocument=Sizzle.setDocument=function(node){var hasCompare,doc=node?node.ownerDocument||node:preferredDoc,parent=doc.defaultView;return doc!==document&&9===doc.nodeType&&doc.documentElement?(document=doc,docElem=doc.documentElement,documentIsHTML=!isXML(doc),parent&&parent!==parent.top&&(parent.addEventListener?parent.addEventListener("unload",function(){setDocument()},!1):parent.attachEvent&&parent.attachEvent("onunload",function(){setDocument()
})),support.attributes=assert(function(div){return div.className="i",!div.getAttribute("className")}),support.getElementsByTagName=assert(function(div){return div.appendChild(doc.createComment("")),!div.getElementsByTagName("*").length}),support.getElementsByClassName=rnative.test(doc.getElementsByClassName)&&assert(function(div){return div.innerHTML="<div class='a'></div><div class='a i'></div>",div.firstChild.className="i",2===div.getElementsByClassName("i").length}),support.getById=assert(function(div){return docElem.appendChild(div).id=expando,!doc.getElementsByName||!doc.getElementsByName(expando).length
}),support.getById?(Expr.find.ID=function(id,context){if(typeof context.getElementById!==strundefined&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}},Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}):(delete Expr.find.ID,Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==strundefined&&elem.getAttributeNode("id");
return node&&node.value===attrId}}),Expr.find.TAG=support.getElementsByTagName?function(tag,context){return typeof context.getElementsByTagName!==strundefined?context.getElementsByTagName(tag):void 0}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if("*"===tag){for(;elem=results[i++];)1===elem.nodeType&&tmp.push(elem);return tmp}return results},Expr.find.CLASS=support.getElementsByClassName&&function(className,context){return typeof context.getElementsByClassName!==strundefined&&documentIsHTML?context.getElementsByClassName(className):void 0
},rbuggyMatches=[],rbuggyQSA=[],(support.qsa=rnative.test(doc.querySelectorAll))&&(assert(function(div){div.innerHTML="<select t=''><option selected=''></option></select>",div.querySelectorAll("[t^='']").length&&rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")"),div.querySelectorAll("[selected]").length||rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")"),div.querySelectorAll(":checked").length||rbuggyQSA.push(":checked")}),assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden"),div.appendChild(input).setAttribute("name","D"),div.querySelectorAll("[name=d]").length&&rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?="),div.querySelectorAll(":enabled").length||rbuggyQSA.push(":enabled",":disabled"),div.querySelectorAll("*,:x"),rbuggyQSA.push(",.*:")
})),(support.matchesSelector=rnative.test(matches=docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector))&&assert(function(div){support.disconnectedMatch=matches.call(div,"div"),matches.call(div,"[s!='']:x"),rbuggyMatches.push("!=",pseudos)}),rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|")),rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|")),hasCompare=rnative.test(docElem.compareDocumentPosition),contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=9===a.nodeType?a.documentElement:a,bup=b&&b.parentNode;
return a===bup||!(!bup||1!==bup.nodeType||!(adown.contains?adown.contains(bup):a.compareDocumentPosition&&16&a.compareDocumentPosition(bup)))}:function(a,b){if(b)for(;b=b.parentNode;)if(b===a)return!0;return!1},sortOrder=hasCompare?function(a,b){if(a===b)return hasDuplicate=!0,0;var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;return compare?compare:(compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&compare||!support.sortDetached&&b.compareDocumentPosition(a)===compare?a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)?-1:b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)?1:sortInput?indexOf.call(sortInput,a)-indexOf.call(sortInput,b):0:4&compare?-1:1)
}:function(a,b){if(a===b)return hasDuplicate=!0,0;var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup)return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?indexOf.call(sortInput,a)-indexOf.call(sortInput,b):0;if(aup===bup)return siblingCheck(a,b);for(cur=a;cur=cur.parentNode;)ap.unshift(cur);for(cur=b;cur=cur.parentNode;)bp.unshift(cur);for(;ap[i]===bp[i];)i++;return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0},doc):document},Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)
},Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document&&setDocument(elem),expr=expr.replace(rattributeQuotes,"='$1']"),!(!support.matchesSelector||!documentIsHTML||rbuggyMatches&&rbuggyMatches.test(expr)||rbuggyQSA&&rbuggyQSA.test(expr)))try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&11!==elem.document.nodeType)return ret}catch(e){}return Sizzle(expr,document,null,[elem]).length>0},Sizzle.contains=function(context,elem){return(context.ownerDocument||context)!==document&&setDocument(context),contains(context,elem)
},Sizzle.attr=function(elem,name){(elem.ownerDocument||elem)!==document&&setDocument(elem);var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):void 0;return void 0!==val?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null},Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)},Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;
if(hasDuplicate=!support.detectDuplicates,sortInput=!support.sortStable&&results.slice(0),results.sort(sortOrder),hasDuplicate){for(;elem=results[i++];)elem===results[i]&&(j=duplicates.push(i));for(;j--;)results.splice(duplicates[j],1)}return sortInput=null,results},getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(nodeType){if(1===nodeType||9===nodeType||11===nodeType){if("string"==typeof elem.textContent)return elem.textContent;for(elem=elem.firstChild;elem;elem=elem.nextSibling)ret+=getText(elem)
}else if(3===nodeType||4===nodeType)return elem.nodeValue}else for(;node=elem[i++];)ret+=getText(node);return ret},Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){return match[1]=match[1].replace(runescape,funescape),match[3]=(match[4]||match[5]||"").replace(runescape,funescape),"~="===match[2]&&(match[3]=" "+match[3]+" "),match.slice(0,4)
},CHILD:function(match){return match[1]=match[1].toLowerCase(),"nth"===match[1].slice(0,3)?(match[3]||Sizzle.error(match[0]),match[4]=+(match[4]?match[5]+(match[6]||1):2*("even"===match[3]||"odd"===match[3])),match[5]=+(match[7]+match[8]||"odd"===match[3])):match[3]&&Sizzle.error(match[0]),match},PSEUDO:function(match){var excess,unquoted=!match[5]&&match[2];return matchExpr.CHILD.test(match[0])?null:(match[3]&&void 0!==match[4]?match[2]=match[4]:unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,!0))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)&&(match[0]=match[0].slice(0,excess),match[2]=unquoted.slice(0,excess)),match.slice(0,3))
}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return"*"===nodeNameSelector?function(){return!0}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test("string"==typeof elem.className&&elem.className||typeof elem.getAttribute!==strundefined&&elem.getAttribute("class")||"")
})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);return null==result?"!="===operator:operator?(result+="","="===operator?result===check:"!="===operator?result!==check:"^="===operator?check&&0===result.indexOf(check):"*="===operator?check&&result.indexOf(check)>-1:"$="===operator?check&&result.slice(-check.length)===check:"~="===operator?(" "+result+" ").indexOf(check)>-1:"|="===operator?result===check||result.slice(0,check.length+1)===check+"-":!1):!0}},CHILD:function(type,what,argument,first,last){var simple="nth"!==type.slice(0,3),forward="last"!==type.slice(-4),ofType="of-type"===what;
return 1===first&&0===last?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){for(;dir;){for(node=elem;node=node[dir];)if(ofType?node.nodeName.toLowerCase()===name:1===node.nodeType)return!1;start=dir="only"===type&&!start&&"nextSibling"}return!0}if(start=[forward?parent.firstChild:parent.lastChild],forward&&useCache){for(outerCache=parent[expando]||(parent[expando]={}),cache=outerCache[type]||[],nodeIndex=cache[0]===dirruns&&cache[1],diff=cache[0]===dirruns&&cache[2],node=nodeIndex&&parent.childNodes[nodeIndex];node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop();)if(1===node.nodeType&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];
break}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns)diff=cache[1];else for(;(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())&&((ofType?node.nodeName.toLowerCase()!==name:1!==node.nodeType)||!++diff||(useCache&&((node[expando]||(node[expando]={}))[type]=[dirruns,diff]),node!==elem)););return diff-=last,diff===first||0===diff%first&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);
return fn[expando]?fn(argument):fn.length>1?(args=[pseudo,pseudo,"",argument],Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){for(var idx,matched=fn(seed,argument),i=matched.length;i--;)idx=indexOf.call(seed,matched[i]),seed[idx]=!(matches[idx]=matched[i])}):function(elem){return fn(elem,0,args)}):fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){for(var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;i--;)(elem=unmatched[i])&&(seed[i]=!(matches[i]=elem))
}):function(elem,context,xml){return input[0]=elem,matcher(input,null,xml,results),!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){return ridentifier.test(lang||"")||Sizzle.error("unsupported lang: "+lang),lang=lang.replace(runescape,funescape).toLowerCase(),function(elem){var elemLang;
do if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))return elemLang=elemLang.toLowerCase(),elemLang===lang||0===elemLang.indexOf(lang+"-");while((elem=elem.parentNode)&&1===elem.nodeType);return!1}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)
},enabled:function(elem){return elem.disabled===!1},disabled:function(elem){return elem.disabled===!0},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return"input"===nodeName&&!!elem.checked||"option"===nodeName&&!!elem.selected},selected:function(elem){return elem.parentNode&&elem.parentNode.selectedIndex,elem.selected===!0},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling)if(elem.nodeType<6)return!1;return!0},parent:function(elem){return!Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)
},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return"input"===name&&"button"===elem.type||"button"===name},text:function(elem){var attr;return"input"===elem.nodeName.toLowerCase()&&"text"===elem.type&&(null==(attr=elem.getAttribute("type"))||"text"===attr.toLowerCase())},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[0>argument?argument+length:argument]
}),even:createPositionalPseudo(function(matchIndexes,length){for(var i=0;length>i;i+=2)matchIndexes.push(i);return matchIndexes}),odd:createPositionalPseudo(function(matchIndexes,length){for(var i=1;length>i;i+=2)matchIndexes.push(i);return matchIndexes}),lt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=0>argument?argument+length:argument;--i>=0;)matchIndexes.push(i);return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){for(var i=0>argument?argument+length:argument;++i<length;)matchIndexes.push(i);
return matchIndexes})}},Expr.pseudos.nth=Expr.pseudos.eq;for(i in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})Expr.pseudos[i]=createInputPseudo(i);for(i in{submit:!0,reset:!0})Expr.pseudos[i]=createButtonPseudo(i);return setFilters.prototype=Expr.filters=Expr.pseudos,Expr.setFilters=new setFilters,compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){for(match||(match=tokenize(selector)),i=match.length;i--;)cached=matcherFromTokens(match[i]),cached[expando]?setMatchers.push(cached):elementMatchers.push(cached);
cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers)),cached.selector=selector}return cached},select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled="function"==typeof selector&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);if(results=results||[],1===match.length){if(tokens=match[0]=match[0].slice(0),tokens.length>2&&"ID"===(token=tokens[0]).type&&support.getById&&9===context.nodeType&&documentIsHTML&&Expr.relative[tokens[1].type]){if(context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0],!context)return results;
compiled&&(context=context.parentNode),selector=selector.slice(tokens.shift().value.length)}for(i=matchExpr.needsContext.test(selector)?0:tokens.length;i--&&(token=tokens[i],!Expr.relative[type=token.type]);)if((find=Expr.find[type])&&(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){if(tokens.splice(i,1),selector=seed.length&&toSelector(tokens),!selector)return push.apply(results,seed),results;break}}return(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context),results
},support.sortStable=expando.split("").sort(sortOrder).join("")===expando,support.detectDuplicates=!!hasDuplicate,setDocument(),support.sortDetached=assert(function(div1){return 1&div1.compareDocumentPosition(document.createElement("div"))}),assert(function(div){return div.innerHTML="<a href='#'></a>","#"===div.firstChild.getAttribute("href")})||addHandle("type|href|height|width",function(elem,name,isXML){return isXML?void 0:elem.getAttribute(name,"type"===name.toLowerCase()?1:2)}),support.attributes&&assert(function(div){return div.innerHTML="<input/>",div.firstChild.setAttribute("value",""),""===div.firstChild.getAttribute("value")
})||addHandle("value",function(elem,name,isXML){return isXML||"input"!==elem.nodeName.toLowerCase()?void 0:elem.defaultValue}),assert(function(div){return null==div.getAttribute("disabled")})||addHandle(booleans,function(elem,name,isXML){var val;return isXML?void 0:elem[name]===!0?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}),Sizzle}(window);jQuery.find=Sizzle,jQuery.expr=Sizzle.selectors,jQuery.expr[":"]=jQuery.expr.pseudos,jQuery.unique=Sizzle.uniqueSort,jQuery.text=Sizzle.getText,jQuery.isXMLDoc=Sizzle.isXML,jQuery.contains=Sizzle.contains;
var rneedsContext=jQuery.expr.match.needsContext,rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,risSimple=/^.[^:#\[\.,]*$/;jQuery.filter=function(expr,elems,not){var elem=elems[0];return not&&(expr=":not("+expr+")"),1===elems.length&&1===elem.nodeType?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return 1===elem.nodeType}))},jQuery.fn.extend({find:function(selector){var i,ret=[],self=this,len=self.length;if("string"!=typeof selector)return this.pushStack(jQuery(selector).filter(function(){for(i=0;len>i;i++)if(jQuery.contains(self[i],this))return!0
}));for(i=0;len>i;i++)jQuery.find(selector,self[i],ret);return ret=this.pushStack(len>1?jQuery.unique(ret):ret),ret.selector=this.selector?this.selector+" "+selector:selector,ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],!1))},not:function(selector){return this.pushStack(winnow(this,selector||[],!0))},is:function(selector){return!!winnow(this,"string"==typeof selector&&rneedsContext.test(selector)?jQuery(selector):selector||[],!1).length}});var rootjQuery,document=window.document,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;
if(!selector)return this;if("string"==typeof selector){if(match="<"===selector.charAt(0)&&">"===selector.charAt(selector.length-1)&&selector.length>=3?[null,selector,null]:rquickExpr.exec(selector),!match||!match[1]&&context)return!context||context.jquery?(context||rootjQuery).find(selector):this.constructor(context).find(selector);if(match[1]){if(context=context instanceof jQuery?context[0]:context,jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,!0)),rsingleTag.test(match[1])&&jQuery.isPlainObject(context))for(match in context)jQuery.isFunction(this[match])?this[match](context[match]):this.attr(match,context[match]);
return this}if(elem=document.getElementById(match[2]),elem&&elem.parentNode){if(elem.id!==match[2])return rootjQuery.find(selector);this.length=1,this[0]=elem}return this.context=document,this.selector=selector,this}return selector.nodeType?(this.context=this[0]=selector,this.length=1,this):jQuery.isFunction(selector)?"undefined"!=typeof rootjQuery.ready?rootjQuery.ready(selector):selector(jQuery):(void 0!==selector.selector&&(this.selector=selector.selector,this.context=selector.context),jQuery.makeArray(selector,this))
};init.prototype=jQuery.fn,rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:!0,contents:!0,next:!0,prev:!0};jQuery.extend({dir:function(elem,dir,until){for(var matched=[],cur=elem[dir];cur&&9!==cur.nodeType&&(void 0===until||1!==cur.nodeType||!jQuery(cur).is(until));)1===cur.nodeType&&matched.push(cur),cur=cur[dir];return matched},sibling:function(n,elem){for(var r=[];n;n=n.nextSibling)1===n.nodeType&&n!==elem&&r.push(n);return r}}),jQuery.fn.extend({has:function(target){var i,targets=jQuery(target,this),len=targets.length;
return this.filter(function(){for(i=0;len>i;i++)if(jQuery.contains(this,targets[i]))return!0})},closest:function(selectors,context){for(var cur,i=0,l=this.length,matched=[],pos=rneedsContext.test(selectors)||"string"!=typeof selectors?jQuery(selectors,context||this.context):0;l>i;i++)for(cur=this[i];cur&&cur!==context;cur=cur.parentNode)if(cur.nodeType<11&&(pos?pos.index(cur)>-1:1===cur.nodeType&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)
},index:function(elem){return elem?"string"==typeof elem?jQuery.inArray(this[0],jQuery(elem)):jQuery.inArray(elem.jquery?elem[0]:elem,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(null==selector?this.prevObject:this.prevObject.filter(selector))}}),jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&11!==parent.nodeType?parent:null
},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)
},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var ret=jQuery.map(this,fn,until);return"Until"!==name.slice(-5)&&(selector=until),selector&&"string"==typeof selector&&(ret=jQuery.filter(selector,ret)),this.length>1&&(guaranteedUnique[name]||(ret=jQuery.unique(ret)),rparentsprev.test(name)&&(ret=ret.reverse())),this.pushStack(ret)
}});var rnotwhite=/\S+/g,optionsCache={};jQuery.Callbacks=function(options){options="string"==typeof options?optionsCache[options]||createOptions(options):jQuery.extend({},options);var firing,memory,fired,firingLength,firingIndex,firingStart,list=[],stack=!options.once&&[],fire=function(data){for(memory=options.memory&&data,fired=!0,firingIndex=firingStart||0,firingStart=0,firingLength=list.length,firing=!0;list&&firingLength>firingIndex;firingIndex++)if(list[firingIndex].apply(data[0],data[1])===!1&&options.stopOnFalse){memory=!1;
break}firing=!1,list&&(stack?stack.length&&fire(stack.shift()):memory?list=[]:self.disable())},self={add:function(){if(list){var start=list.length;!function add(args){jQuery.each(args,function(_,arg){var type=jQuery.type(arg);"function"===type?options.unique&&self.has(arg)||list.push(arg):arg&&arg.length&&"string"!==type&&add(arg)})}(arguments),firing?firingLength=list.length:memory&&(firingStart=start,fire(memory))}return this},remove:function(){return list&&jQuery.each(arguments,function(_,arg){for(var index;(index=jQuery.inArray(arg,list,index))>-1;)list.splice(index,1),firing&&(firingLength>=index&&firingLength--,firingIndex>=index&&firingIndex--)
}),this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!(!list||!list.length)},empty:function(){return list=[],firingLength=0,this},disable:function(){return list=stack=memory=void 0,this},disabled:function(){return!list},lock:function(){return stack=void 0,memory||self.disable(),this},locked:function(){return!stack},fireWith:function(context,args){return!list||fired&&!stack||(args=args||[],args=[context,args.slice?args.slice():args],firing?stack.push(args):fire(args)),this},fire:function(){return self.fireWith(this,arguments),this
},fired:function(){return!!fired}};return self},jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){return deferred.done(arguments).fail(arguments),this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];
deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);returned&&jQuery.isFunction(returned.promise)?returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify):newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)})}),fns=null}).promise()},promise:function(obj){return null!=obj?jQuery.extend(obj,promise):promise}},deferred={};return promise.pipe=promise.then,jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];
promise[tuple[1]]=list.add,stateString&&list.add(function(){state=stateString},tuples[1^i][2].disable,tuples[2][2].lock),deferred[tuple[0]]=function(){return deferred[tuple[0]+"With"](this===deferred?promise:this,arguments),this},deferred[tuple[0]+"With"]=list.fireWith}),promise.promise(deferred),func&&func.call(deferred,deferred),deferred},when:function(subordinate){var progressValues,progressContexts,resolveContexts,i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=1!==length||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=1===remaining?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this,values[i]=arguments.length>1?slice.call(arguments):value,values===progressValues?deferred.notifyWith(contexts,values):--remaining||deferred.resolveWith(contexts,values)
}};if(length>1)for(progressValues=new Array(length),progressContexts=new Array(length),resolveContexts=new Array(length);length>i;i++)resolveValues[i]&&jQuery.isFunction(resolveValues[i].promise)?resolveValues[i].promise().done(updateFunc(i,resolveContexts,resolveValues)).fail(deferred.reject).progress(updateFunc(i,progressContexts,progressValues)):--remaining;return remaining||deferred.resolveWith(resolveContexts,resolveValues),deferred.promise()}});var readyList;jQuery.fn.ready=function(fn){return jQuery.ready.promise().done(fn),this
},jQuery.extend({isReady:!1,readyWait:1,holdReady:function(hold){hold?jQuery.readyWait++:jQuery.ready(!0)},ready:function(wait){if(wait===!0?!--jQuery.readyWait:!jQuery.isReady){if(!document.body)return setTimeout(jQuery.ready);jQuery.isReady=!0,wait!==!0&&--jQuery.readyWait>0||(readyList.resolveWith(document,[jQuery]),jQuery.fn.trigger&&jQuery(document).trigger("ready").off("ready"))}}}),jQuery.ready.promise=function(obj){if(!readyList)if(readyList=jQuery.Deferred(),"complete"===document.readyState)setTimeout(jQuery.ready);
else if(document.addEventListener)document.addEventListener("DOMContentLoaded",completed,!1),window.addEventListener("load",completed,!1);else{document.attachEvent("onreadystatechange",completed),window.attachEvent("onload",completed);var top=!1;try{top=null==window.frameElement&&document.documentElement}catch(e){}top&&top.doScroll&&function doScrollCheck(){if(!jQuery.isReady){try{top.doScroll("left")}catch(e){return setTimeout(doScrollCheck,50)}detach(),jQuery.ready()}}()}return readyList.promise(obj)};var i,strundefined="undefined";
for(i in jQuery(support))break;support.ownLast="0"!==i,support.inlineBlockNeedsLayout=!1,jQuery(function(){var container,div,body=document.getElementsByTagName("body")[0];body&&(container=document.createElement("div"),container.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",div=document.createElement("div"),body.appendChild(container).appendChild(div),typeof div.style.zoom!==strundefined&&(div.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(support.inlineBlockNeedsLayout=3===div.offsetWidth)&&(body.style.zoom=1)),body.removeChild(container),container=div=null)
}),function(){var div=document.createElement("div");if(null==support.deleteExpando){support.deleteExpando=!0;try{delete div.test}catch(e){support.deleteExpando=!1}}div=null}(),jQuery.acceptData=function(elem){var noData=jQuery.noData[(elem.nodeName+" ").toLowerCase()],nodeType=+elem.nodeType||1;return 1!==nodeType&&9!==nodeType?!1:!noData||noData!==!0&&elem.getAttribute("classid")===noData};var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/([A-Z])/g;jQuery.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(elem){return elem=elem.nodeType?jQuery.cache[elem[jQuery.expando]]:elem[jQuery.expando],!!elem&&!isEmptyDataObject(elem)
},data:function(elem,name,data){return internalData(elem,name,data)},removeData:function(elem,name){return internalRemoveData(elem,name)},_data:function(elem,name,data){return internalData(elem,name,data,!0)},_removeData:function(elem,name){return internalRemoveData(elem,name,!0)}}),jQuery.fn.extend({data:function(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;if(void 0===key){if(this.length&&(data=jQuery.data(elem),1===elem.nodeType&&!jQuery._data(elem,"parsedAttrs"))){for(i=attrs.length;i--;)name=attrs[i].name,0===name.indexOf("data-")&&(name=jQuery.camelCase(name.slice(5)),dataAttr(elem,name,data[name]));
jQuery._data(elem,"parsedAttrs",!0)}return data}return"object"==typeof key?this.each(function(){jQuery.data(this,key)}):arguments.length>1?this.each(function(){jQuery.data(this,key,value)}):elem?dataAttr(elem,key,jQuery.data(elem,key)):void 0},removeData:function(key){return this.each(function(){jQuery.removeData(this,key)})}}),jQuery.extend({queue:function(elem,type,data){var queue;return elem?(type=(type||"fx")+"queue",queue=jQuery._data(elem,type),data&&(!queue||jQuery.isArray(data)?queue=jQuery._data(elem,type,jQuery.makeArray(data)):queue.push(data)),queue||[]):void 0
},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};"inprogress"===fn&&(fn=queue.shift(),startLength--),fn&&("fx"===type&&queue.unshift("inprogress"),delete hooks.stop,fn.call(elem,next,hooks)),!startLength&&hooks&&hooks.empty.fire()},_queueHooks:function(elem,type){var key=type+"queueHooks";return jQuery._data(elem,key)||jQuery._data(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){jQuery._removeData(elem,type+"queue"),jQuery._removeData(elem,key)
})})}}),jQuery.fn.extend({queue:function(type,data){var setter=2;return"string"!=typeof type&&(data=type,type="fx",setter--),arguments.length<setter?jQuery.queue(this[0],type):void 0===data?this:this.each(function(){var queue=jQuery.queue(this,type,data);jQuery._queueHooks(this,type),"fx"===type&&"inprogress"!==queue[0]&&jQuery.dequeue(this,type)})},dequeue:function(type){return this.each(function(){jQuery.dequeue(this,type)})},clearQueue:function(type){return this.queue(type||"fx",[])},promise:function(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function(){--count||defer.resolveWith(elements,[elements])
};for("string"!=typeof type&&(obj=type,type=void 0),type=type||"fx";i--;)tmp=jQuery._data(elements[i],type+"queueHooks"),tmp&&tmp.empty&&(count++,tmp.empty.add(resolve));return resolve(),defer.promise(obj)}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,cssExpand=["Top","Right","Bottom","Left"],isHidden=function(elem,el){return elem=el||elem,"none"===jQuery.css(elem,"display")||!jQuery.contains(elem.ownerDocument,elem)},access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,length=elems.length,bulk=null==key;
if("object"===jQuery.type(key)){chainable=!0;for(i in key)jQuery.access(elems,fn,i,key[i],!0,emptyGet,raw)}else if(void 0!==value&&(chainable=!0,jQuery.isFunction(value)||(raw=!0),bulk&&(raw?(fn.call(elems,value),fn=null):(bulk=fn,fn=function(elem,key,value){return bulk.call(jQuery(elem),value)})),fn))for(;length>i;i++)fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));return chainable?elems:bulk?fn.call(elems):length?fn(elems[0],key):emptyGet},rcheckableType=/^(?:checkbox|radio)$/i;!function(){var fragment=document.createDocumentFragment(),div=document.createElement("div"),input=document.createElement("input");
if(div.setAttribute("className","t"),div.innerHTML="  <link/><table></table><a href='/a'>a</a>",support.leadingWhitespace=3===div.firstChild.nodeType,support.tbody=!div.getElementsByTagName("tbody").length,support.htmlSerialize=!!div.getElementsByTagName("link").length,support.html5Clone="<:nav></:nav>"!==document.createElement("nav").cloneNode(!0).outerHTML,input.type="checkbox",input.checked=!0,fragment.appendChild(input),support.appendChecked=input.checked,div.innerHTML="<textarea>x</textarea>",support.noCloneChecked=!!div.cloneNode(!0).lastChild.defaultValue,fragment.appendChild(div),div.innerHTML="<input type='radio' checked='checked' name='t'/>",support.checkClone=div.cloneNode(!0).cloneNode(!0).lastChild.checked,support.noCloneEvent=!0,div.attachEvent&&(div.attachEvent("onclick",function(){support.noCloneEvent=!1
}),div.cloneNode(!0).click()),null==support.deleteExpando){support.deleteExpando=!0;try{delete div.test}catch(e){support.deleteExpando=!1}}fragment=div=input=null}(),function(){var i,eventName,div=document.createElement("div");for(i in{submit:!0,change:!0,focusin:!0})eventName="on"+i,(support[i+"Bubbles"]=eventName in window)||(div.setAttribute(eventName,"t"),support[i+"Bubbles"]=div.attributes[eventName].expando===!1);div=null}();var rformElems=/^(?:input|select|textarea)$/i,rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;
jQuery.event={global:{},add:function(elem,types,handler,data,selector){var tmp,events,t,handleObjIn,special,eventHandle,handleObj,handlers,type,namespaces,origType,elemData=jQuery._data(elem);if(elemData){for(handler.handler&&(handleObjIn=handler,handler=handleObjIn.handler,selector=handleObjIn.selector),handler.guid||(handler.guid=jQuery.guid++),(events=elemData.events)||(events=elemData.events={}),(eventHandle=elemData.handle)||(eventHandle=elemData.handle=function(e){return typeof jQuery===strundefined||e&&jQuery.event.triggered===e.type?void 0:jQuery.event.dispatch.apply(eventHandle.elem,arguments)
},eventHandle.elem=elem),types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type&&(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,special=jQuery.event.special[type]||{},handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn),(handlers=events[type])||(handlers=events[type]=[],handlers.delegateCount=0,special.setup&&special.setup.call(elem,data,namespaces,eventHandle)!==!1||(elem.addEventListener?elem.addEventListener(type,eventHandle,!1):elem.attachEvent&&elem.attachEvent("on"+type,eventHandle))),special.add&&(special.add.call(elem,handleObj),handleObj.handler.guid||(handleObj.handler.guid=handler.guid)),selector?handlers.splice(handlers.delegateCount++,0,handleObj):handlers.push(handleObj),jQuery.event.global[type]=!0);
elem=null}},remove:function(elem,types,handler,selector,mappedTypes){var j,handleObj,tmp,origCount,t,events,special,handlers,type,namespaces,origType,elemData=jQuery.hasData(elem)&&jQuery._data(elem);if(elemData&&(events=elemData.events)){for(types=(types||"").match(rnotwhite)||[""],t=types.length;t--;)if(tmp=rtypenamespace.exec(types[t])||[],type=origType=tmp[1],namespaces=(tmp[2]||"").split(".").sort(),type){for(special=jQuery.event.special[type]||{},type=(selector?special.delegateType:special.bindType)||type,handlers=events[type]||[],tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"),origCount=j=handlers.length;j--;)handleObj=handlers[j],!mappedTypes&&origType!==handleObj.origType||handler&&handler.guid!==handleObj.guid||tmp&&!tmp.test(handleObj.namespace)||selector&&selector!==handleObj.selector&&("**"!==selector||!handleObj.selector)||(handlers.splice(j,1),handleObj.selector&&handlers.delegateCount--,special.remove&&special.remove.call(elem,handleObj));
origCount&&!handlers.length&&(special.teardown&&special.teardown.call(elem,namespaces,elemData.handle)!==!1||jQuery.removeEvent(elem,type,elemData.handle),delete events[type])}else for(type in events)jQuery.event.remove(elem,type+types[t],handler,selector,!0);jQuery.isEmptyObject(events)&&(delete elemData.handle,jQuery._removeData(elem,"events"))}},trigger:function(event,data,elem,onlyHandlers){var handle,ontype,cur,bubbleType,special,tmp,i,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];
if(cur=tmp=elem=elem||document,3!==elem.nodeType&&8!==elem.nodeType&&!rfocusMorph.test(type+jQuery.event.triggered)&&(type.indexOf(".")>=0&&(namespaces=type.split("."),type=namespaces.shift(),namespaces.sort()),ontype=type.indexOf(":")<0&&"on"+type,event=event[jQuery.expando]?event:new jQuery.Event(type,"object"==typeof event&&event),event.isTrigger=onlyHandlers?2:3,event.namespace=namespaces.join("."),event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,event.result=void 0,event.target||(event.target=elem),data=null==data?[event]:jQuery.makeArray(data,[event]),special=jQuery.event.special[type]||{},onlyHandlers||!special.trigger||special.trigger.apply(elem,data)!==!1)){if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){for(bubbleType=special.delegateType||type,rfocusMorph.test(bubbleType+type)||(cur=cur.parentNode);cur;cur=cur.parentNode)eventPath.push(cur),tmp=cur;
tmp===(elem.ownerDocument||document)&&eventPath.push(tmp.defaultView||tmp.parentWindow||window)}for(i=0;(cur=eventPath[i++])&&!event.isPropagationStopped();)event.type=i>1?bubbleType:special.bindType||type,handle=(jQuery._data(cur,"events")||{})[event.type]&&jQuery._data(cur,"handle"),handle&&handle.apply(cur,data),handle=ontype&&cur[ontype],handle&&handle.apply&&jQuery.acceptData(cur)&&(event.result=handle.apply(cur,data),event.result===!1&&event.preventDefault());if(event.type=type,!onlyHandlers&&!event.isDefaultPrevented()&&(!special._default||special._default.apply(eventPath.pop(),data)===!1)&&jQuery.acceptData(elem)&&ontype&&elem[type]&&!jQuery.isWindow(elem)){tmp=elem[ontype],tmp&&(elem[ontype]=null),jQuery.event.triggered=type;
try{elem[type]()}catch(e){}jQuery.event.triggered=void 0,tmp&&(elem[ontype]=tmp)}return event.result}},dispatch:function(event){event=jQuery.event.fix(event);var i,ret,handleObj,matched,j,handlerQueue=[],args=slice.call(arguments),handlers=(jQuery._data(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};if(args[0]=event,event.delegateTarget=this,!special.preDispatch||special.preDispatch.call(this,event)!==!1){for(handlerQueue=jQuery.event.handlers.call(this,event,handlers),i=0;(matched=handlerQueue[i++])&&!event.isPropagationStopped();)for(event.currentTarget=matched.elem,j=0;(handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped();)(!event.namespace_re||event.namespace_re.test(handleObj.namespace))&&(event.handleObj=handleObj,event.data=handleObj.data,ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args),void 0!==ret&&(event.result=ret)===!1&&(event.preventDefault(),event.stopPropagation()));
return special.postDispatch&&special.postDispatch.call(this,event),event.result}},handlers:function(event,handlers){var sel,handleObj,matches,i,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||"click"!==event.type))for(;cur!=this;cur=cur.parentNode||this)if(1===cur.nodeType&&(cur.disabled!==!0||"click"!==event.type)){for(matches=[],i=0;delegateCount>i;i++)handleObj=handlers[i],sel=handleObj.selector+" ",void 0===matches[sel]&&(matches[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>=0:jQuery.find(sel,this,null,[cur]).length),matches[sel]&&matches.push(handleObj);
matches.length&&handlerQueue.push({elem:cur,handlers:matches})}return delegateCount<handlers.length&&handlerQueue.push({elem:this,handlers:handlers.slice(delegateCount)}),handlerQueue},fix:function(event){if(event[jQuery.expando])return event;var i,prop,copy,type=event.type,originalEvent=event,fixHook=this.fixHooks[type];for(fixHook||(this.fixHooks[type]=fixHook=rmouseEvent.test(type)?this.mouseHooks:rkeyEvent.test(type)?this.keyHooks:{}),copy=fixHook.props?this.props.concat(fixHook.props):this.props,event=new jQuery.Event(originalEvent),i=copy.length;i--;)prop=copy[i],event[prop]=originalEvent[prop];
return event.target||(event.target=originalEvent.srcElement||document),3===event.target.nodeType&&(event.target=event.target.parentNode),event.metaKey=!!event.metaKey,fixHook.filter?fixHook.filter(event,originalEvent):event},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(event,original){return null==event.which&&(event.which=null!=original.charCode?original.charCode:original.keyCode),event
}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(event,original){var body,eventDoc,doc,button=original.button,fromElement=original.fromElement;return null==event.pageX&&null!=original.clientX&&(eventDoc=event.target.ownerDocument||document,doc=eventDoc.documentElement,body=eventDoc.body,event.pageX=original.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc&&doc.clientLeft||body&&body.clientLeft||0),event.pageY=original.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc&&doc.clientTop||body&&body.clientTop||0)),!event.relatedTarget&&fromElement&&(event.relatedTarget=fromElement===event.target?original.toElement:fromElement),event.which||void 0===button||(event.which=1&button?1:2&button?3:4&button?2:0),event
}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==safeActiveElement()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===safeActiveElement()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return jQuery.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(event){return jQuery.nodeName(event.target,"a")}},beforeunload:{postDispatch:function(event){void 0!==event.result&&(event.originalEvent.returnValue=event.result)
}}},simulate:function(type,elem,event,bubble){var e=jQuery.extend(new jQuery.Event,event,{type:type,isSimulated:!0,originalEvent:{}});bubble?jQuery.event.trigger(e,null,elem):jQuery.event.dispatch.call(elem,e),e.isDefaultPrevented()&&event.preventDefault()}},jQuery.removeEvent=document.removeEventListener?function(elem,type,handle){elem.removeEventListener&&elem.removeEventListener(type,handle,!1)}:function(elem,type,handle){var name="on"+type;elem.detachEvent&&(typeof elem[name]===strundefined&&(elem[name]=null),elem.detachEvent(name,handle))
},jQuery.Event=function(src,props){return this instanceof jQuery.Event?(src&&src.type?(this.originalEvent=src,this.type=src.type,this.isDefaultPrevented=src.defaultPrevented||void 0===src.defaultPrevented&&(src.returnValue===!1||src.getPreventDefault&&src.getPreventDefault())?returnTrue:returnFalse):this.type=src,props&&jQuery.extend(this,props),this.timeStamp=src&&src.timeStamp||jQuery.now(),this[jQuery.expando]=!0,void 0):new jQuery.Event(src,props)},jQuery.Event.prototype={isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,preventDefault:function(){var e=this.originalEvent;
this.isDefaultPrevented=returnTrue,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=returnTrue,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=returnTrue,this.stopPropagation()}},jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;
return(!related||related!==target&&!jQuery.contains(target,related))&&(event.type=handleObj.origType,ret=handleObj.handler.apply(this,arguments),event.type=fix),ret}}}),support.submitBubbles||(jQuery.event.special.submit={setup:function(){return jQuery.nodeName(this,"form")?!1:(jQuery.event.add(this,"click._submit keypress._submit",function(e){var elem=e.target,form=jQuery.nodeName(elem,"input")||jQuery.nodeName(elem,"button")?elem.form:void 0;form&&!jQuery._data(form,"submitBubbles")&&(jQuery.event.add(form,"submit._submit",function(event){event._submit_bubble=!0
}),jQuery._data(form,"submitBubbles",!0))}),void 0)},postDispatch:function(event){event._submit_bubble&&(delete event._submit_bubble,this.parentNode&&!event.isTrigger&&jQuery.event.simulate("submit",this.parentNode,event,!0))},teardown:function(){return jQuery.nodeName(this,"form")?!1:(jQuery.event.remove(this,"._submit"),void 0)}}),support.changeBubbles||(jQuery.event.special.change={setup:function(){return rformElems.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(jQuery.event.add(this,"propertychange._change",function(event){"checked"===event.originalEvent.propertyName&&(this._just_changed=!0)
}),jQuery.event.add(this,"click._change",function(event){this._just_changed&&!event.isTrigger&&(this._just_changed=!1),jQuery.event.simulate("change",this,event,!0)})),!1):(jQuery.event.add(this,"beforeactivate._change",function(e){var elem=e.target;rformElems.test(elem.nodeName)&&!jQuery._data(elem,"changeBubbles")&&(jQuery.event.add(elem,"change._change",function(event){!this.parentNode||event.isSimulated||event.isTrigger||jQuery.event.simulate("change",this.parentNode,event,!0)}),jQuery._data(elem,"changeBubbles",!0))
}),void 0)},handle:function(event){var elem=event.target;return this!==elem||event.isSimulated||event.isTrigger||"radio"!==elem.type&&"checkbox"!==elem.type?event.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return jQuery.event.remove(this,"._change"),!rformElems.test(this.nodeName)}}),support.focusinBubbles||jQuery.each({focus:"focusin",blur:"focusout"},function(orig,fix){var handler=function(event){jQuery.event.simulate(fix,event.target,jQuery.event.fix(event),!0)};jQuery.event.special[fix]={setup:function(){var doc=this.ownerDocument||this,attaches=jQuery._data(doc,fix);
attaches||doc.addEventListener(orig,handler,!0),jQuery._data(doc,fix,(attaches||0)+1)},teardown:function(){var doc=this.ownerDocument||this,attaches=jQuery._data(doc,fix)-1;attaches?jQuery._data(doc,fix,attaches):(doc.removeEventListener(orig,handler,!0),jQuery._removeData(doc,fix))}}}),jQuery.fn.extend({on:function(types,selector,data,fn,one){var type,origFn;if("object"==typeof types){"string"!=typeof selector&&(data=data||selector,selector=void 0);for(type in types)this.on(type,selector,data,types[type],one);
return this}if(null==data&&null==fn?(fn=selector,data=selector=void 0):null==fn&&("string"==typeof selector?(fn=data,data=void 0):(fn=data,data=selector,selector=void 0)),fn===!1)fn=returnFalse;else if(!fn)return this;return 1===one&&(origFn=fn,fn=function(event){return jQuery().off(event),origFn.apply(this,arguments)},fn.guid=origFn.guid||(origFn.guid=jQuery.guid++)),this.each(function(){jQuery.event.add(this,types,fn,data,selector)})},one:function(types,selector,data,fn){return this.on(types,selector,data,fn,1)
},off:function(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj)return handleObj=types.handleObj,jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler),this;if("object"==typeof types){for(type in types)this.off(type,selector,types[type]);return this}return(selector===!1||"function"==typeof selector)&&(fn=selector,selector=void 0),fn===!1&&(fn=returnFalse),this.each(function(){jQuery.event.remove(this,types,fn,selector)
})},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this)})},triggerHandler:function(type,data){var elem=this[0];return elem?jQuery.event.trigger(type,data,elem,!0):void 0}});var nodeNames="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",rinlinejQuery=/ jQuery\d+="(?:null|\d+)"/g,rnoshimcache=new RegExp("<(?:"+nodeNames+")[\\s/>]","i"),rleadingWhitespace=/^\s+/,rxhtmlTag=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,rtagName=/<([\w:]+)/,rtbody=/<tbody/i,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,wrapMap={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},safeFragment=createSafeFragment(document),fragmentDiv=safeFragment.appendChild(document.createElement("div"));
wrapMap.optgroup=wrapMap.option,wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead,wrapMap.th=wrapMap.td,jQuery.extend({clone:function(elem,dataAndEvents,deepDataAndEvents){var destElements,node,clone,i,srcElements,inPage=jQuery.contains(elem.ownerDocument,elem);if(support.html5Clone||jQuery.isXMLDoc(elem)||!rnoshimcache.test("<"+elem.nodeName+">")?clone=elem.cloneNode(!0):(fragmentDiv.innerHTML=elem.outerHTML,fragmentDiv.removeChild(clone=fragmentDiv.firstChild)),!(support.noCloneEvent&&support.noCloneChecked||1!==elem.nodeType&&11!==elem.nodeType||jQuery.isXMLDoc(elem)))for(destElements=getAll(clone),srcElements=getAll(elem),i=0;null!=(node=srcElements[i]);++i)destElements[i]&&fixCloneNodeIssues(node,destElements[i]);
if(dataAndEvents)if(deepDataAndEvents)for(srcElements=srcElements||getAll(elem),destElements=destElements||getAll(clone),i=0;null!=(node=srcElements[i]);i++)cloneCopyEvent(node,destElements[i]);else cloneCopyEvent(elem,clone);return destElements=getAll(clone,"script"),destElements.length>0&&setGlobalEval(destElements,!inPage&&getAll(elem,"script")),destElements=srcElements=node=null,clone},buildFragment:function(elems,context,scripts,selection){for(var j,elem,contains,tmp,tag,tbody,wrap,l=elems.length,safe=createSafeFragment(context),nodes=[],i=0;l>i;i++)if(elem=elems[i],elem||0===elem)if("object"===jQuery.type(elem))jQuery.merge(nodes,elem.nodeType?[elem]:elem);
else if(rhtml.test(elem)){for(tmp=tmp||safe.appendChild(context.createElement("div")),tag=(rtagName.exec(elem)||["",""])[1].toLowerCase(),wrap=wrapMap[tag]||wrapMap._default,tmp.innerHTML=wrap[1]+elem.replace(rxhtmlTag,"<$1></$2>")+wrap[2],j=wrap[0];j--;)tmp=tmp.lastChild;if(!support.leadingWhitespace&&rleadingWhitespace.test(elem)&&nodes.push(context.createTextNode(rleadingWhitespace.exec(elem)[0])),!support.tbody)for(elem="table"!==tag||rtbody.test(elem)?"<table>"!==wrap[1]||rtbody.test(elem)?0:tmp:tmp.firstChild,j=elem&&elem.childNodes.length;j--;)jQuery.nodeName(tbody=elem.childNodes[j],"tbody")&&!tbody.childNodes.length&&elem.removeChild(tbody);
for(jQuery.merge(nodes,tmp.childNodes),tmp.textContent="";tmp.firstChild;)tmp.removeChild(tmp.firstChild);tmp=safe.lastChild}else nodes.push(context.createTextNode(elem));for(tmp&&safe.removeChild(tmp),support.appendChecked||jQuery.grep(getAll(nodes,"input"),fixDefaultChecked),i=0;elem=nodes[i++];)if((!selection||-1===jQuery.inArray(elem,selection))&&(contains=jQuery.contains(elem.ownerDocument,elem),tmp=getAll(safe.appendChild(elem),"script"),contains&&setGlobalEval(tmp),scripts))for(j=0;elem=tmp[j++];)rscriptType.test(elem.type||"")&&scripts.push(elem);
return tmp=null,safe},cleanData:function(elems,acceptData){for(var elem,type,id,data,i=0,internalKey=jQuery.expando,cache=jQuery.cache,deleteExpando=support.deleteExpando,special=jQuery.event.special;null!=(elem=elems[i]);i++)if((acceptData||jQuery.acceptData(elem))&&(id=elem[internalKey],data=id&&cache[id])){if(data.events)for(type in data.events)special[type]?jQuery.event.remove(elem,type):jQuery.removeEvent(elem,type,data.handle);cache[id]&&(delete cache[id],deleteExpando?delete elem[internalKey]:typeof elem.removeAttribute!==strundefined?elem.removeAttribute(internalKey):elem[internalKey]=null,deletedIds.push(id))
}}}),jQuery.fn.extend({text:function(value){return access(this,function(value){return void 0===value?jQuery.text(this):this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(value))},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var target=manipulationTarget(this,elem);
target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this)})},after:function(){return this.domManip(arguments,function(elem){this.parentNode&&this.parentNode.insertBefore(elem,this.nextSibling)})},remove:function(selector,keepData){for(var elem,elems=selector?jQuery.filter(selector,this):this,i=0;null!=(elem=elems[i]);i++)keepData||1!==elem.nodeType||jQuery.cleanData(getAll(elem)),elem.parentNode&&(keepData&&jQuery.contains(elem.ownerDocument,elem)&&setGlobalEval(getAll(elem,"script")),elem.parentNode.removeChild(elem));
return this},empty:function(){for(var elem,i=0;null!=(elem=this[i]);i++){for(1===elem.nodeType&&jQuery.cleanData(getAll(elem,!1));elem.firstChild;)elem.removeChild(elem.firstChild);elem.options&&jQuery.nodeName(elem,"select")&&(elem.options.length=0)}return this},clone:function(dataAndEvents,deepDataAndEvents){return dataAndEvents=null==dataAndEvents?!1:dataAndEvents,deepDataAndEvents=null==deepDataAndEvents?dataAndEvents:deepDataAndEvents,this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)
})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(void 0===value)return 1===elem.nodeType?elem.innerHTML.replace(rinlinejQuery,""):void 0;if(!("string"!=typeof value||rnoInnerhtml.test(value)||!support.htmlSerialize&&rnoshimcache.test(value)||!support.leadingWhitespace&&rleadingWhitespace.test(value)||wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()])){value=value.replace(rxhtmlTag,"<$1></$2>");try{for(;l>i;i++)elem=this[i]||{},1===elem.nodeType&&(jQuery.cleanData(getAll(elem,!1)),elem.innerHTML=value);
elem=0}catch(e){}}elem&&this.empty().append(value)},null,value,arguments.length)},replaceWith:function(){var arg=arguments[0];return this.domManip(arguments,function(elem){arg=this.parentNode,jQuery.cleanData(getAll(this)),arg&&arg.replaceChild(elem,this)}),arg&&(arg.length||arg.nodeType)?this:this.remove()},detach:function(selector){return this.remove(selector,!0)},domManip:function(args,callback){args=concat.apply([],args);var first,node,hasScripts,scripts,doc,fragment,i=0,l=this.length,set=this,iNoClone=l-1,value=args[0],isFunction=jQuery.isFunction(value);
if(isFunction||l>1&&"string"==typeof value&&!support.checkClone&&rchecked.test(value))return this.each(function(index){var self=set.eq(index);isFunction&&(args[0]=value.call(this,index,self.html())),self.domManip(args,callback)});if(l&&(fragment=jQuery.buildFragment(args,this[0].ownerDocument,!1,this),first=fragment.firstChild,1===fragment.childNodes.length&&(fragment=first),first)){for(scripts=jQuery.map(getAll(fragment,"script"),disableScript),hasScripts=scripts.length;l>i;i++)node=fragment,i!==iNoClone&&(node=jQuery.clone(node,!0,!0),hasScripts&&jQuery.merge(scripts,getAll(node,"script"))),callback.call(this[i],node,i);
if(hasScripts)for(doc=scripts[scripts.length-1].ownerDocument,jQuery.map(scripts,restoreScript),i=0;hasScripts>i;i++)node=scripts[i],rscriptType.test(node.type||"")&&!jQuery._data(node,"globalEval")&&jQuery.contains(doc,node)&&(node.src?jQuery._evalUrl&&jQuery._evalUrl(node.src):jQuery.globalEval((node.text||node.textContent||node.innerHTML||"").replace(rcleanScript,"")));fragment=first=null}return this}}),jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){for(var elems,i=0,ret=[],insert=jQuery(selector),last=insert.length-1;last>=i;i++)elems=i===last?this:this.clone(!0),jQuery(insert[i])[original](elems),push.apply(ret,elems.get());
return this.pushStack(ret)}});var iframe,elemdisplay={};!function(){var a,shrinkWrapBlocksVal,div=document.createElement("div"),divReset="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=div.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",support.opacity=/^0.5/.test(a.style.opacity),support.cssFloat=!!a.style.cssFloat,div.style.backgroundClip="content-box",div.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle="content-box"===div.style.backgroundClip,a=div=null,support.shrinkWrapBlocks=function(){var body,container,div,containerStyles;
if(null==shrinkWrapBlocksVal){if(body=document.getElementsByTagName("body")[0],!body)return;containerStyles="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",container=document.createElement("div"),div=document.createElement("div"),body.appendChild(container).appendChild(div),shrinkWrapBlocksVal=!1,typeof div.style.zoom!==strundefined&&(div.style.cssText=divReset+";width:1px;padding:1px;zoom:1",div.innerHTML="<div></div>",div.firstChild.style.width="5px",shrinkWrapBlocksVal=3!==div.offsetWidth),body.removeChild(container),body=container=div=null
}return shrinkWrapBlocksVal}}();var getStyles,curCSS,rmargin=/^margin/,rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i"),rposition=/^(top|right|bottom|left)$/;window.getComputedStyle?(getStyles=function(elem){return elem.ownerDocument.defaultView.getComputedStyle(elem,null)},curCSS=function(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;return computed=computed||getStyles(elem),ret=computed?computed.getPropertyValue(name)||computed[name]:void 0,computed&&(""!==ret||jQuery.contains(elem.ownerDocument,elem)||(ret=jQuery.style(elem,name)),rnumnonpx.test(ret)&&rmargin.test(name)&&(width=style.width,minWidth=style.minWidth,maxWidth=style.maxWidth,style.minWidth=style.maxWidth=style.width=ret,ret=computed.width,style.width=width,style.minWidth=minWidth,style.maxWidth=maxWidth)),void 0===ret?ret:ret+""
}):document.documentElement.currentStyle&&(getStyles=function(elem){return elem.currentStyle},curCSS=function(elem,name,computed){var left,rs,rsLeft,ret,style=elem.style;return computed=computed||getStyles(elem),ret=computed?computed[name]:void 0,null==ret&&style&&style[name]&&(ret=style[name]),rnumnonpx.test(ret)&&!rposition.test(name)&&(left=style.left,rs=elem.runtimeStyle,rsLeft=rs&&rs.left,rsLeft&&(rs.left=elem.currentStyle.left),style.left="fontSize"===name?"1em":ret,ret=style.pixelLeft+"px",style.left=left,rsLeft&&(rs.left=rsLeft)),void 0===ret?ret:ret+""||"auto"
}),function(){function computeStyleTests(){var container,div,body=document.getElementsByTagName("body")[0];body&&(container=document.createElement("div"),div=document.createElement("div"),container.style.cssText=containerStyles,body.appendChild(container).appendChild(div),div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",jQuery.swap(body,null!=body.style.zoom?{zoom:1}:{},function(){boxSizingVal=4===div.offsetWidth
}),boxSizingReliableVal=!0,pixelPositionVal=!1,window.getComputedStyle&&(pixelPositionVal="1%"!==(window.getComputedStyle(div,null)||{}).top,boxSizingReliableVal="4px"===(window.getComputedStyle(div,null)||{width:"4px"}).width),body.removeChild(container),div=body=null)}var a,reliableHiddenOffsetsVal,boxSizingVal,boxSizingReliableVal,pixelPositionVal,div=document.createElement("div"),containerStyles="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",divReset="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";
div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=div.getElementsByTagName("a")[0],a.style.cssText="float:left;opacity:.5",support.opacity=/^0.5/.test(a.style.opacity),support.cssFloat=!!a.style.cssFloat,div.style.backgroundClip="content-box",div.cloneNode(!0).style.backgroundClip="",support.clearCloneStyle="content-box"===div.style.backgroundClip,a=div=null,jQuery.extend(support,{reliableHiddenOffsets:function(){if(null!=reliableHiddenOffsetsVal)return reliableHiddenOffsetsVal;
var container,tds,isSupported,div=document.createElement("div"),body=document.getElementsByTagName("body")[0];if(body)return div.setAttribute("className","t"),div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",container=document.createElement("div"),container.style.cssText=containerStyles,body.appendChild(container).appendChild(div),div.innerHTML="<table><tr><td></td><td>t</td></tr></table>",tds=div.getElementsByTagName("td"),tds[0].style.cssText="padding:0;margin:0;border:0;display:none",isSupported=0===tds[0].offsetHeight,tds[0].style.display="",tds[1].style.display="none",reliableHiddenOffsetsVal=isSupported&&0===tds[0].offsetHeight,body.removeChild(container),div=body=null,reliableHiddenOffsetsVal
},boxSizing:function(){return null==boxSizingVal&&computeStyleTests(),boxSizingVal},boxSizingReliable:function(){return null==boxSizingReliableVal&&computeStyleTests(),boxSizingReliableVal},pixelPosition:function(){return null==pixelPositionVal&&computeStyleTests(),pixelPositionVal},reliableMarginRight:function(){var body,container,div,marginDiv,reliableMarginRightVal=!0;if(window.getComputedStyle){if(body=document.getElementsByTagName("body")[0],!body)return;container=document.createElement("div"),div=document.createElement("div"),container.style.cssText=containerStyles,body.appendChild(container).appendChild(div),marginDiv=div.appendChild(document.createElement("div")),marginDiv.style.cssText=div.style.cssText=divReset,marginDiv.style.marginRight=marginDiv.style.width="0",div.style.width="1px",reliableMarginRightVal=!parseFloat((window.getComputedStyle(marginDiv,null)||{}).marginRight),body.removeChild(container)
}return reliableMarginRightVal}})}(),jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options)old[name]=elem.style[name],elem.style[name]=options[name];ret=callback.apply(elem,args||[]);for(name in options)elem.style[name]=old[name];return ret};var ralpha=/alpha\([^)]*\)/i,ropacity=/opacity\s*=\s*([^)]*)/,rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:0,fontWeight:400},cssPrefixes=["Webkit","O","Moz","ms"];
jQuery.extend({cssHooks:{opacity:{get:function(elem,computed){if(computed){var ret=curCSS(elem,"opacity");return""===ret?"1":ret}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":support.cssFloat?"cssFloat":"styleFloat"},style:function(elem,name,value,extra){if(elem&&3!==elem.nodeType&&8!==elem.nodeType&&elem.style){var ret,type,hooks,origName=jQuery.camelCase(name),style=elem.style;if(name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],void 0===value)return hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,!1,extra))?ret:style[name];
if(type=typeof value,"string"===type&&(ret=rrelNum.exec(value))&&(value=(ret[1]+1)*ret[2]+parseFloat(jQuery.css(elem,name)),type="number"),null!=value&&value===value&&("number"!==type||jQuery.cssNumber[origName]||(value+="px"),support.clearCloneStyle||""!==value||0!==name.indexOf("background")||(style[name]="inherit"),!(hooks&&"set"in hooks&&void 0===(value=hooks.set(elem,value,extra)))))try{style[name]="",style[name]=value}catch(e){}}},css:function(elem,name,extra,styles){var num,val,hooks,origName=jQuery.camelCase(name);
return name=jQuery.cssProps[origName]||(jQuery.cssProps[origName]=vendorPropName(elem.style,origName)),hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName],hooks&&"get"in hooks&&(val=hooks.get(elem,!0,extra)),void 0===val&&(val=curCSS(elem,name,styles)),"normal"===val&&name in cssNormalTransform&&(val=cssNormalTransform[name]),""===extra||extra?(num=parseFloat(val),extra===!0||jQuery.isNumeric(num)?num||0:val):val}}),jQuery.each(["height","width"],function(i,name){jQuery.cssHooks[name]={get:function(elem,computed,extra){return computed?0===elem.offsetWidth&&rdisplayswap.test(jQuery.css(elem,"display"))?jQuery.swap(elem,cssShow,function(){return getWidthOrHeight(elem,name,extra)
}):getWidthOrHeight(elem,name,extra):void 0},set:function(elem,value,extra){var styles=extra&&getStyles(elem);return setPositiveNumber(elem,value,extra?augmentWidthOrHeight(elem,name,extra,support.boxSizing()&&"border-box"===jQuery.css(elem,"boxSizing",!1,styles),styles):0)}}}),support.opacity||(jQuery.cssHooks.opacity={get:function(elem,computed){return ropacity.test((computed&&elem.currentStyle?elem.currentStyle.filter:elem.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":computed?"1":""},set:function(elem,value){var style=elem.style,currentStyle=elem.currentStyle,opacity=jQuery.isNumeric(value)?"alpha(opacity="+100*value+")":"",filter=currentStyle&&currentStyle.filter||style.filter||"";
style.zoom=1,(value>=1||""===value)&&""===jQuery.trim(filter.replace(ralpha,""))&&style.removeAttribute&&(style.removeAttribute("filter"),""===value||currentStyle&&!currentStyle.filter)||(style.filter=ralpha.test(filter)?filter.replace(ralpha,opacity):filter+" "+opacity)}}),jQuery.cssHooks.marginRight=addGetHookIf(support.reliableMarginRight,function(elem,computed){return computed?jQuery.swap(elem,{display:"inline-block"},curCSS,[elem,"marginRight"]):void 0}),jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function(value){for(var i=0,expanded={},parts="string"==typeof value?value.split(" "):[value];4>i;i++)expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];
return expanded}},rmargin.test(prefix)||(jQuery.cssHooks[prefix+suffix].set=setPositiveNumber)}),jQuery.fn.extend({css:function(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(jQuery.isArray(name)){for(styles=getStyles(elem),len=name.length;len>i;i++)map[name[i]]=jQuery.css(elem,name[i],!1,styles);return map}return void 0!==value?jQuery.style(elem,name,value):jQuery.css(elem,name)},name,value,arguments.length>1)},show:function(){return showHide(this,!0)},hide:function(){return showHide(this)
},toggle:function(state){return"boolean"==typeof state?state?this.show():this.hide():this.each(function(){isHidden(this)?jQuery(this).show():jQuery(this).hide()})}}),jQuery.Tween=Tween,Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem,this.prop=prop,this.easing=easing||"swing",this.options=options,this.start=this.now=this.cur(),this.end=end,this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)
},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];return this.pos=eased=this.options.duration?jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration):percent,this.now=(this.end-this.start)*eased+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),hooks&&hooks.set?hooks.set(this):Tween.propHooks._default.set(this),this}},Tween.prototype.init.prototype=Tween.prototype,Tween.propHooks={_default:{get:function(tween){var result;return null==tween.elem[tween.prop]||tween.elem.style&&null!=tween.elem.style[tween.prop]?(result=jQuery.css(tween.elem,tween.prop,""),result&&"auto"!==result?result:0):tween.elem[tween.prop]
},set:function(tween){jQuery.fx.step[tween.prop]?jQuery.fx.step[tween.prop](tween):tween.elem.style&&(null!=tween.elem.style[jQuery.cssProps[tween.prop]]||jQuery.cssHooks[tween.prop])?jQuery.style(tween.elem,tween.prop,tween.now+tween.unit):tween.elem[tween.prop]=tween.now}}},Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){tween.elem.nodeType&&tween.elem.parentNode&&(tween.elem[tween.prop]=tween.now)}},jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2
}},jQuery.fx=Tween.prototype.init,jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||"px"!==unit&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;
if(start&&start[3]!==unit){unit=unit||start[3],parts=parts||[],start=+target||1;do scale=scale||".5",start/=scale,jQuery.style(tween.elem,prop,start+unit);while(scale!==(scale=tween.cur()/target)&&1!==scale&&--maxIterations)}return parts&&(start=tween.start=+start||+target||0,tween.unit=unit,tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]),tween}]};jQuery.Animation=jQuery.extend(Animation,{tweener:function(props,callback){jQuery.isFunction(props)?(callback=props,props=["*"]):props=props.split(" ");for(var prop,index=0,length=props.length;length>index;index++)prop=props[index],tweeners[prop]=tweeners[prop]||[],tweeners[prop].unshift(callback)
},prefilter:function(callback,prepend){prepend?animationPrefilters.unshift(callback):animationPrefilters.push(callback)}}),jQuery.speed=function(speed,easing,fn){var opt=speed&&"object"==typeof speed?jQuery.extend({},speed):{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!jQuery.isFunction(easing)&&easing};return opt.duration=jQuery.fx.off?0:"number"==typeof opt.duration?opt.duration:opt.duration in jQuery.fx.speeds?jQuery.fx.speeds[opt.duration]:jQuery.fx.speeds._default,(null==opt.queue||opt.queue===!0)&&(opt.queue="fx"),opt.old=opt.complete,opt.complete=function(){jQuery.isFunction(opt.old)&&opt.old.call(this),opt.queue&&jQuery.dequeue(this,opt.queue)
},opt},jQuery.fn.extend({fadeTo:function(speed,to,easing,callback){return this.filter(isHidden).css("opacity",0).show().end().animate({opacity:to},speed,easing,callback)},animate:function(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function(){var anim=Animation(this,jQuery.extend({},prop),optall);(empty||jQuery._data(this,"finish"))&&anim.stop(!0)};return doAnimation.finish=doAnimation,empty||optall.queue===!1?this.each(doAnimation):this.queue(optall.queue,doAnimation)
},stop:function(type,clearQueue,gotoEnd){var stopQueue=function(hooks){var stop=hooks.stop;delete hooks.stop,stop(gotoEnd)};return"string"!=typeof type&&(gotoEnd=clearQueue,clearQueue=type,type=void 0),clearQueue&&type!==!1&&this.queue(type||"fx",[]),this.each(function(){var dequeue=!0,index=null!=type&&type+"queueHooks",timers=jQuery.timers,data=jQuery._data(this);if(index)data[index]&&data[index].stop&&stopQueue(data[index]);else for(index in data)data[index]&&data[index].stop&&rrun.test(index)&&stopQueue(data[index]);
for(index=timers.length;index--;)timers[index].elem!==this||null!=type&&timers[index].queue!==type||(timers[index].anim.stop(gotoEnd),dequeue=!1,timers.splice(index,1));(dequeue||!gotoEnd)&&jQuery.dequeue(this,type)})},finish:function(type){return type!==!1&&(type=type||"fx"),this.each(function(){var index,data=jQuery._data(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;for(data.finish=!0,jQuery.queue(this,type,[]),hooks&&hooks.stop&&hooks.stop.call(this,!0),index=timers.length;index--;)timers[index].elem===this&&timers[index].queue===type&&(timers[index].anim.stop(!0),timers.splice(index,1));
for(index=0;length>index;index++)queue[index]&&queue[index].finish&&queue[index].finish.call(this);delete data.finish})}}),jQuery.each(["toggle","show","hide"],function(i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return null==speed||"boolean"==typeof speed?cssFn.apply(this,arguments):this.animate(genFx(name,!0),speed,easing,callback)}}),jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback)
}}),jQuery.timers=[],jQuery.fx.tick=function(){var timer,timers=jQuery.timers,i=0;for(fxNow=jQuery.now();i<timers.length;i++)timer=timers[i],timer()||timers[i]!==timer||timers.splice(i--,1);timers.length||jQuery.fx.stop(),fxNow=void 0},jQuery.fx.timer=function(timer){jQuery.timers.push(timer),timer()?jQuery.fx.start():jQuery.timers.pop()},jQuery.fx.interval=13,jQuery.fx.start=function(){timerId||(timerId=setInterval(jQuery.fx.tick,jQuery.fx.interval))},jQuery.fx.stop=function(){clearInterval(timerId),timerId=null
},jQuery.fx.speeds={slow:600,fast:200,_default:400},jQuery.fn.delay=function(time,type){return time=jQuery.fx?jQuery.fx.speeds[time]||time:time,type=type||"fx",this.queue(type,function(next,hooks){var timeout=setTimeout(next,time);hooks.stop=function(){clearTimeout(timeout)}})},function(){var a,input,select,opt,div=document.createElement("div");div.setAttribute("className","t"),div.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=div.getElementsByTagName("a")[0],select=document.createElement("select"),opt=select.appendChild(document.createElement("option")),input=div.getElementsByTagName("input")[0],a.style.cssText="top:1px",support.getSetAttribute="t"!==div.className,support.style=/top/.test(a.getAttribute("style")),support.hrefNormalized="/a"===a.getAttribute("href"),support.checkOn=!!input.value,support.optSelected=opt.selected,support.enctype=!!document.createElement("form").enctype,select.disabled=!0,support.optDisabled=!opt.disabled,input=document.createElement("input"),input.setAttribute("value",""),support.input=""===input.getAttribute("value"),input.value="t",input.setAttribute("type","radio"),support.radioValue="t"===input.value,a=input=select=opt=div=null
}();var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];{if(arguments.length)return isFunction=jQuery.isFunction(value),this.each(function(i){var val;1===this.nodeType&&(val=isFunction?value.call(this,i,jQuery(this).val()):value,null==val?val="":"number"==typeof val?val+="":jQuery.isArray(val)&&(val=jQuery.map(val,function(value){return null==value?"":value+""})),hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()],hooks&&"set"in hooks&&void 0!==hooks.set(this,val,"value")||(this.value=val))
});if(elem)return hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()],hooks&&"get"in hooks&&void 0!==(ret=hooks.get(elem,"value"))?ret:(ret=elem.value,"string"==typeof ret?ret.replace(rreturn,""):null==ret?"":ret)}}}),jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return null!=val?val:jQuery.text(elem)}},select:{get:function(elem){for(var value,option,options=elem.options,index=elem.selectedIndex,one="select-one"===elem.type||0>index,values=one?null:[],max=one?index+1:options.length,i=0>index?max:one?index:0;max>i;i++)if(option=options[i],!(!option.selected&&i!==index||(support.optDisabled?option.disabled:null!==option.getAttribute("disabled"))||option.parentNode.disabled&&jQuery.nodeName(option.parentNode,"optgroup"))){if(value=jQuery(option).val(),one)return value;
values.push(value)}return values},set:function(elem,value){for(var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;i--;)if(option=options[i],jQuery.inArray(jQuery.valHooks.option.get(option),values)>=0)try{option.selected=optionSet=!0}catch(_){option.scrollHeight}else option.selected=!1;return optionSet||(elem.selectedIndex=-1),options}}}}),jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){return jQuery.isArray(value)?elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0:void 0
}},support.checkOn||(jQuery.valHooks[this].get=function(elem){return null===elem.getAttribute("value")?"on":elem.value})});var nodeHook,boolHook,attrHandle=jQuery.expr.attrHandle,ruseDefault=/^(?:checked|selected)$/i,getSetAttribute=support.getSetAttribute,getSetInput=support.input;jQuery.fn.extend({attr:function(name,value){return access(this,jQuery.attr,name,value,arguments.length>1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}}),jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;
if(elem&&3!==nType&&8!==nType&&2!==nType)return typeof elem.getAttribute===strundefined?jQuery.prop(elem,name,value):(1===nType&&jQuery.isXMLDoc(elem)||(name=name.toLowerCase(),hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)),void 0===value?hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:(ret=jQuery.find.attr(elem,name),null==ret?void 0:ret):null!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:(elem.setAttribute(name,value+""),value):(jQuery.removeAttr(elem,name),void 0))
},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&1===elem.nodeType)for(;name=attrNames[i++];)propName=jQuery.propFix[name]||name,jQuery.expr.match.bool.test(name)?getSetInput&&getSetAttribute||!ruseDefault.test(name)?elem[propName]=!1:elem[jQuery.camelCase("default-"+name)]=elem[propName]=!1:jQuery.attr(elem,name,""),elem.removeAttribute(getSetAttribute?name:propName)},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&"radio"===value&&jQuery.nodeName(elem,"input")){var val=elem.value;
return elem.setAttribute("type",value),val&&(elem.value=val),value}}}}}),boolHook={set:function(elem,value,name){return value===!1?jQuery.removeAttr(elem,name):getSetInput&&getSetAttribute||!ruseDefault.test(name)?elem.setAttribute(!getSetAttribute&&jQuery.propFix[name]||name,name):elem[jQuery.camelCase("default-"+name)]=elem[name]=!0,name}},jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=getSetInput&&getSetAttribute||!ruseDefault.test(name)?function(elem,name,isXML){var ret,handle;
return isXML||(handle=attrHandle[name],attrHandle[name]=ret,ret=null!=getter(elem,name,isXML)?name.toLowerCase():null,attrHandle[name]=handle),ret}:function(elem,name,isXML){return isXML?void 0:elem[jQuery.camelCase("default-"+name)]?name.toLowerCase():null}}),getSetInput&&getSetAttribute||(jQuery.attrHooks.value={set:function(elem,value,name){return jQuery.nodeName(elem,"input")?(elem.defaultValue=value,void 0):nodeHook&&nodeHook.set(elem,value,name)}}),getSetAttribute||(nodeHook={set:function(elem,value,name){var ret=elem.getAttributeNode(name);
return ret||elem.setAttributeNode(ret=elem.ownerDocument.createAttribute(name)),ret.value=value+="","value"===name||value===elem.getAttribute(name)?value:void 0}},attrHandle.id=attrHandle.name=attrHandle.coords=function(elem,name,isXML){var ret;return isXML?void 0:(ret=elem.getAttributeNode(name))&&""!==ret.value?ret.value:null},jQuery.valHooks.button={get:function(elem,name){var ret=elem.getAttributeNode(name);return ret&&ret.specified?ret.value:void 0},set:nodeHook.set},jQuery.attrHooks.contenteditable={set:function(elem,value,name){nodeHook.set(elem,""===value?!1:value,name)
}},jQuery.each(["width","height"],function(i,name){jQuery.attrHooks[name]={set:function(elem,value){return""===value?(elem.setAttribute(name,"auto"),value):void 0}}})),support.style||(jQuery.attrHooks.style={get:function(elem){return elem.style.cssText||void 0},set:function(elem,value){return elem.style.cssText=value+""}});var rfocusable=/^(?:input|select|textarea|button|object)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)
},removeProp:function(name){return name=jQuery.propFix[name]||name,this.each(function(){try{this[name]=void 0,delete this[name]}catch(e){}})}}),jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(elem&&3!==nType&&8!==nType&&2!==nType)return notxml=1!==nType||!jQuery.isXMLDoc(elem),notxml&&(name=jQuery.propFix[name]||name,hooks=jQuery.propHooks[name]),void 0!==value?hooks&&"set"in hooks&&void 0!==(ret=hooks.set(elem,value,name))?ret:elem[name]=value:hooks&&"get"in hooks&&null!==(ret=hooks.get(elem,name))?ret:elem[name]
},propHooks:{tabIndex:{get:function(elem){var tabindex=jQuery.find.attr(elem,"tabindex");return tabindex?parseInt(tabindex,10):rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href?0:-1}}}}),support.hrefNormalized||jQuery.each(["href","src"],function(i,name){jQuery.propHooks[name]={get:function(elem){return elem.getAttribute(name,4)}}}),support.optSelected||(jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;return parent&&(parent.selectedIndex,parent.parentNode&&parent.parentNode.selectedIndex),null
}}),jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this}),support.enctype||(jQuery.propFix.enctype="encoding");var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed="string"==typeof value&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))
});if(proceed)for(classes=(value||"").match(rnotwhite)||[];len>i;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):" ")){for(j=0;clazz=classes[j++];)cur.indexOf(" "+clazz+" ")<0&&(cur+=clazz+" ");finalValue=jQuery.trim(cur),elem.className!==finalValue&&(elem.className=finalValue)}return this},removeClass:function(value){var classes,elem,cur,clazz,j,finalValue,i=0,len=this.length,proceed=0===arguments.length||"string"==typeof value&&value;if(jQuery.isFunction(value))return this.each(function(j){jQuery(this).removeClass(value.call(this,j,this.className))
});if(proceed)for(classes=(value||"").match(rnotwhite)||[];len>i;i++)if(elem=this[i],cur=1===elem.nodeType&&(elem.className?(" "+elem.className+" ").replace(rclass," "):"")){for(j=0;clazz=classes[j++];)for(;cur.indexOf(" "+clazz+" ")>=0;)cur=cur.replace(" "+clazz+" "," ");finalValue=value?jQuery.trim(cur):"",elem.className!==finalValue&&(elem.className=finalValue)}return this},toggleClass:function(value,stateVal){var type=typeof value;return"boolean"==typeof stateVal&&"string"===type?stateVal?this.addClass(value):this.removeClass(value):jQuery.isFunction(value)?this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)
}):this.each(function(){if("string"===type)for(var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];className=classNames[i++];)self.hasClass(className)?self.removeClass(className):self.addClass(className);else(type===strundefined||"boolean"===type)&&(this.className&&jQuery._data(this,"__className__",this.className),this.className=this.className||value===!1?"":jQuery._data(this,"__className__")||"")})},hasClass:function(selector){for(var className=" "+selector+" ",i=0,l=this.length;l>i;i++)if(1===this[i].nodeType&&(" "+this[i].className+" ").replace(rclass," ").indexOf(className)>=0)return!0;
return!1}}),jQuery.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}}),jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)
},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return 1===arguments.length?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now(),rquery=/\?/,rvalidtokens=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;jQuery.parseJSON=function(data){if(window.JSON&&window.JSON.parse)return window.JSON.parse(data+"");
var requireNonComma,depth=null,str=jQuery.trim(data+"");return str&&!jQuery.trim(str.replace(rvalidtokens,function(token,comma,open,close){return requireNonComma&&comma&&(depth=0),0===depth?token:(requireNonComma=open||comma,depth+=!close-!open,"")}))?Function("return "+str)():jQuery.error("Invalid JSON: "+data)},jQuery.parseXML=function(data){var xml,tmp;if(!data||"string"!=typeof data)return null;try{window.DOMParser?(tmp=new DOMParser,xml=tmp.parseFromString(data,"text/xml")):(xml=new ActiveXObject("Microsoft.XMLDOM"),xml.async="false",xml.loadXML(data))
}catch(e){xml=void 0}return xml&&xml.documentElement&&!xml.getElementsByTagName("parsererror").length||jQuery.error("Invalid XML: "+data),xml};var ajaxLocParts,ajaxLocation,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href
}catch(e){ajaxLocation=document.createElement("a"),ajaxLocation.href="",ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[],jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)
},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;2!==state&&(state=2,timeoutTimer&&clearTimeout(timeoutTimer),transport=void 0,responseHeadersString=headers||"",jqXHR.readyState=status>0?4:0,isSuccess=status>=200&&300>status||304===status,responses&&(response=ajaxHandleResponses(s,jqXHR,responses)),response=ajaxConvert(s,response,jqXHR,isSuccess),isSuccess?(s.ifModified&&(modified=jqXHR.getResponseHeader("Last-Modified"),modified&&(jQuery.lastModified[cacheURL]=modified),modified=jqXHR.getResponseHeader("etag"),modified&&(jQuery.etag[cacheURL]=modified)),204===status||"HEAD"===s.type?statusText="nocontent":304===status?statusText="notmodified":(statusText=response.state,success=response.data,error=response.error,isSuccess=!error)):(error=statusText,(status||!statusText)&&(statusText="error",0>status&&(status=0))),jqXHR.status=status,jqXHR.statusText=(nativeStatusText||statusText)+"",isSuccess?deferred.resolveWith(callbackContext,[success,statusText,jqXHR]):deferred.rejectWith(callbackContext,[jqXHR,statusText,error]),jqXHR.statusCode(statusCode),statusCode=void 0,fireGlobals&&globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]),completeDeferred.fireWith(callbackContext,[jqXHR,statusText]),fireGlobals&&(globalEventContext.trigger("ajaxComplete",[jqXHR,s]),--jQuery.active||jQuery.event.trigger("ajaxStop")))
}"object"==typeof url&&(options=url,url=void 0),options=options||{};var parts,i,cacheURL,responseHeadersString,timeoutTimer,fireGlobals,transport,responseHeaders,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;
if(2===state){if(!responseHeaders)for(responseHeaders={};match=rheaders.exec(responseHeadersString);)responseHeaders[match[1].toLowerCase()]=match[2];match=responseHeaders[key.toLowerCase()]}return null==match?null:match},getAllResponseHeaders:function(){return 2===state?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();return state||(name=requestHeadersNames[lname]=requestHeadersNames[lname]||name,requestHeaders[name]=value),this},overrideMimeType:function(type){return state||(s.mimeType=type),this
},statusCode:function(map){var code;if(map)if(2>state)for(code in map)statusCode[code]=[statusCode[code],map[code]];else jqXHR.always(map[jqXHR.status]);return this},abort:function(statusText){var finalText=statusText||strAbort;return transport&&transport.abort(finalText),done(0,finalText),this}};if(deferred.promise(jqXHR).complete=completeDeferred.add,jqXHR.success=jqXHR.done,jqXHR.error=jqXHR.fail,s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//"),s.type=options.method||options.type||s.method||s.type,s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""],null==s.crossDomain&&(parts=rurl.exec(s.url.toLowerCase()),s.crossDomain=!(!parts||parts[1]===ajaxLocParts[1]&&parts[2]===ajaxLocParts[2]&&(parts[3]||("http:"===parts[1]?"80":"443"))===(ajaxLocParts[3]||("http:"===ajaxLocParts[1]?"80":"443")))),s.data&&s.processData&&"string"!=typeof s.data&&(s.data=jQuery.param(s.data,s.traditional)),inspectPrefiltersOrTransports(prefilters,s,options,jqXHR),2===state)return jqXHR;
fireGlobals=s.global,fireGlobals&&0===jQuery.active++&&jQuery.event.trigger("ajaxStart"),s.type=s.type.toUpperCase(),s.hasContent=!rnoContent.test(s.type),cacheURL=s.url,s.hasContent||(s.data&&(cacheURL=s.url+=(rquery.test(cacheURL)?"&":"?")+s.data,delete s.data),s.cache===!1&&(s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++)),s.ifModified&&(jQuery.lastModified[cacheURL]&&jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]),jQuery.etag[cacheURL]&&jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])),(s.data&&s.hasContent&&s.contentType!==!1||options.contentType)&&jqXHR.setRequestHeader("Content-Type",s.contentType),jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+("*"!==s.dataTypes[0]?", "+allTypes+"; q=0.01":""):s.accepts["*"]);
for(i in s.headers)jqXHR.setRequestHeader(i,s.headers[i]);if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===!1||2===state))return jqXHR.abort();strAbort="abort";for(i in{success:1,error:1,complete:1})jqXHR[i](s[i]);if(transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR)){jqXHR.readyState=1,fireGlobals&&globalEventContext.trigger("ajaxSend",[jqXHR,s]),s.async&&s.timeout>0&&(timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout));try{state=1,transport.send(requestHeaders,done)
}catch(e){if(!(2>state))throw e;done(-1,e)}}else done(-1,"No Transport");return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,void 0,callback,"script")}}),jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){return jQuery.isFunction(data)&&(type=type||callback,callback=data,data=void 0),jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}}),jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)
}}),jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},jQuery.fn.extend({wrapAll:function(html){if(jQuery.isFunction(html))return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))});if(this[0]){var wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&wrap.insertBefore(this[0]),wrap.map(function(){for(var elem=this;elem.firstChild&&1===elem.firstChild.nodeType;)elem=elem.firstChild;return elem}).append(this)
}return this},wrapInner:function(html){return jQuery.isFunction(html)?this.each(function(i){jQuery(this).wrapInner(html.call(this,i))}):this.each(function(){var self=jQuery(this),contents=self.contents();contents.length?contents.wrapAll(html):self.append(html)})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){jQuery.nodeName(this,"body")||jQuery(this).replaceWith(this.childNodes)
}).end()}}),jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0||!support.reliableHiddenOffsets()&&"none"===(elem.style&&elem.style.display||jQuery.css(elem,"display"))},jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():null==value?"":value,s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)
};if(void 0===traditional&&(traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional),jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a))jQuery.each(a,function(){add(this.name,this.value)});else for(prefix in a)buildParams(prefix,a[prefix],traditional,add);return s.join("&").replace(r20,"+")},jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this
}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return null==val?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}}),jQuery.ajaxSettings.xhr=void 0!==window.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&createStandardXHR()||createActiveXHR()
}:createStandardXHR;var xhrId=0,xhrCallbacks={},xhrSupported=jQuery.ajaxSettings.xhr();window.ActiveXObject&&jQuery(window).on("unload",function(){for(var key in xhrCallbacks)xhrCallbacks[key](void 0,!0)}),support.cors=!!xhrSupported&&"withCredentials"in xhrSupported,xhrSupported=support.ajax=!!xhrSupported,xhrSupported&&jQuery.ajaxTransport(function(options){if(!options.crossDomain||support.cors){var callback;return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;if(xhr.open(options.type,options.url,options.async,options.username,options.password),options.xhrFields)for(i in options.xhrFields)xhr[i]=options.xhrFields[i];
options.mimeType&&xhr.overrideMimeType&&xhr.overrideMimeType(options.mimeType),options.crossDomain||headers["X-Requested-With"]||(headers["X-Requested-With"]="XMLHttpRequest");for(i in headers)void 0!==headers[i]&&xhr.setRequestHeader(i,headers[i]+"");xhr.send(options.hasContent&&options.data||null),callback=function(_,isAbort){var status,statusText,responses;if(callback&&(isAbort||4===xhr.readyState))if(delete xhrCallbacks[id],callback=void 0,xhr.onreadystatechange=jQuery.noop,isAbort)4!==xhr.readyState&&xhr.abort();
else{responses={},status=xhr.status,"string"==typeof xhr.responseText&&(responses.text=xhr.responseText);try{statusText=xhr.statusText}catch(e){statusText=""}status||!options.isLocal||options.crossDomain?1223===status&&(status=204):status=responses.text?200:404}responses&&complete(status,statusText,responses,xhr.getAllResponseHeaders())},options.async?4===xhr.readyState?setTimeout(callback):xhr.onreadystatechange=xhrCallbacks[id]=callback:callback()},abort:function(){callback&&callback(void 0,!0)}}}}),jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){return jQuery.globalEval(text),text
}}}),jQuery.ajaxPrefilter("script",function(s){void 0===s.cache&&(s.cache=!1),s.crossDomain&&(s.type="GET",s.global=!1)}),jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,head=document.head||jQuery("head")[0]||document.documentElement;return{send:function(_,callback){script=document.createElement("script"),script.async=!0,s.scriptCharset&&(script.charset=s.scriptCharset),script.src=s.url,script.onload=script.onreadystatechange=function(_,isAbort){(isAbort||!script.readyState||/loaded|complete/.test(script.readyState))&&(script.onload=script.onreadystatechange=null,script.parentNode&&script.parentNode.removeChild(script),script=null,isAbort||callback(200,"success"))
},head.insertBefore(script,head.firstChild)},abort:function(){script&&script.onload(void 0,!0)}}}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce++;return this[callback]=!0,callback}}),jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==!1&&(rjsonp.test(s.url)?"url":"string"==typeof s.data&&!(s.contentType||"").indexOf("application/x-www-form-urlencoded")&&rjsonp.test(s.data)&&"data");
return jsonProp||"jsonp"===s.dataTypes[0]?(callbackName=s.jsonpCallback=jQuery.isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback,jsonProp?s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName):s.jsonp!==!1&&(s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName),s.converters["script json"]=function(){return responseContainer||jQuery.error(callbackName+" was not called"),responseContainer[0]},s.dataTypes[0]="json",overwritten=window[callbackName],window[callbackName]=function(){responseContainer=arguments
},jqXHR.always(function(){window[callbackName]=overwritten,s[callbackName]&&(s.jsonpCallback=originalSettings.jsonpCallback,oldCallbacks.push(callbackName)),responseContainer&&jQuery.isFunction(overwritten)&&overwritten(responseContainer[0]),responseContainer=overwritten=void 0}),"script"):void 0}),jQuery.parseHTML=function(data,context,keepScripts){if(!data||"string"!=typeof data)return null;"boolean"==typeof context&&(keepScripts=context,context=!1),context=context||document;var parsed=rsingleTag.exec(data),scripts=!keepScripts&&[];
return parsed?[context.createElement(parsed[1])]:(parsed=jQuery.buildFragment([data],context,scripts),scripts&&scripts.length&&jQuery(scripts).remove(),jQuery.merge([],parsed.childNodes))};var _load=jQuery.fn.load;jQuery.fn.load=function(url,params,callback){if("string"!=typeof url&&_load)return _load.apply(this,arguments);var selector,response,type,self=this,off=url.indexOf(" ");return off>=0&&(selector=url.slice(off,url.length),url=url.slice(0,off)),jQuery.isFunction(params)?(callback=params,params=void 0):params&&"object"==typeof params&&(type="POST"),self.length>0&&jQuery.ajax({url:url,type:type,dataType:"html",data:params}).done(function(responseText){response=arguments,self.html(selector?jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):responseText)
}).complete(callback&&function(jqXHR,status){self.each(callback,response||[jqXHR.responseText,status,jqXHR])}),this},jQuery.expr.filters.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem}).length};var docElem=window.document.documentElement;return jQuery.offset={setOffset:function(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};"static"===position&&(elem.style.position="relative"),curOffset=curElem.offset(),curCSSTop=jQuery.css(elem,"top"),curCSSLeft=jQuery.css(elem,"left"),calculatePosition=("absolute"===position||"fixed"===position)&&jQuery.inArray("auto",[curCSSTop,curCSSLeft])>-1,calculatePosition?(curPosition=curElem.position(),curTop=curPosition.top,curLeft=curPosition.left):(curTop=parseFloat(curCSSTop)||0,curLeft=parseFloat(curCSSLeft)||0),jQuery.isFunction(options)&&(options=options.call(elem,i,curOffset)),null!=options.top&&(props.top=options.top-curOffset.top+curTop),null!=options.left&&(props.left=options.left-curOffset.left+curLeft),"using"in options?options.using.call(elem,props):curElem.css(props)
}},jQuery.fn.extend({offset:function(options){if(arguments.length)return void 0===options?this:this.each(function(i){jQuery.offset.setOffset(this,options,i)});var docElem,win,box={top:0,left:0},elem=this[0],doc=elem&&elem.ownerDocument;if(doc)return docElem=doc.documentElement,jQuery.contains(docElem,elem)?(typeof elem.getBoundingClientRect!==strundefined&&(box=elem.getBoundingClientRect()),win=getWindow(doc),{top:box.top+(win.pageYOffset||docElem.scrollTop)-(docElem.clientTop||0),left:box.left+(win.pageXOffset||docElem.scrollLeft)-(docElem.clientLeft||0)}):box
},position:function(){if(this[0]){var offsetParent,offset,parentOffset={top:0,left:0},elem=this[0];return"fixed"===jQuery.css(elem,"position")?offset=elem.getBoundingClientRect():(offsetParent=this.offsetParent(),offset=this.offset(),jQuery.nodeName(offsetParent[0],"html")||(parentOffset=offsetParent.offset()),parentOffset.top+=jQuery.css(offsetParent[0],"borderTopWidth",!0),parentOffset.left+=jQuery.css(offsetParent[0],"borderLeftWidth",!0)),{top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",!0),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",!0)}
}},offsetParent:function(){return this.map(function(){for(var offsetParent=this.offsetParent||docElem;offsetParent&&!jQuery.nodeName(offsetParent,"html")&&"static"===jQuery.css(offsetParent,"position");)offsetParent=offsetParent.offsetParent;return offsetParent||docElem})}}),jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top=/Y/.test(prop);jQuery.fn[method]=function(val){return access(this,function(elem,method,val){var win=getWindow(elem);return void 0===val?win?prop in win?win[prop]:win.document.documentElement[method]:elem[method]:(win?win.scrollTo(top?jQuery(win).scrollLeft():val,top?val:jQuery(win).scrollTop()):elem[method]=val,void 0)
},method,val,arguments.length,null)}}),jQuery.each(["top","left"],function(i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){return computed?(computed=curCSS(elem,prop),rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed):void 0})}),jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||"boolean"!=typeof margin),extra=defaultExtra||(margin===!0||value===!0?"margin":"border");
return access(this,function(elem,type,value){var doc;return jQuery.isWindow(elem)?elem.document.documentElement["client"+name]:9===elem.nodeType?(doc=elem.documentElement,Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name])):void 0===value?jQuery.css(elem,type,extra):jQuery.style(elem,type,value,extra)},type,chainable?margin:void 0,chainable,null)}})}),jQuery.fn.size=function(){return this.length},jQuery.fn.andSelf=jQuery.fn.addBack,function(){var matched,browser;
jQuery.uaMatch=function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}},matched=jQuery.uaMatch(navigator.userAgent),browser={},matched.browser&&(browser[matched.browser]=!0,browser.version=matched.version),browser.chrome?browser.webkit=!0:browser.webkit&&(browser.safari=!0),jQuery.browser=browser
}(),jQuery.version="3.1",jQuery.long_version="3.1.17",jQuery.uid=function(p,s){return(p?p:"")+Math.random().toString().replace(".","")+(s?s:"")},jQuery.globalNamespace=jQuery.uid("Foundry"),window[jQuery.globalNamespace]=jQuery,jQuery.run=function(command){return jQuery.isFunction(command)?command(jQuery):null},jQuery.initialize=function(options){jQuery.initialized||(jQuery.extend(jQuery,options),"development"==jQuery.environment&&(window.F=jQuery),jQuery.initialized=!0,FD31.module.execute())},FD31.jquery(jQuery),"function"==typeof define&&define.amd&&define("jquery",[],function(){return jQuery
}),jQuery}),FD31.plugin("lodash",function($){function basicIndexOf(array,value,fromIndex){for(var index=(fromIndex||0)-1,length=array.length;++index<length;)if(array[index]===value)return index;return-1}function cacheIndexOf(cache,value){var type=typeof value;if(cache=cache.cache,"boolean"==type||null==value)return cache[value];"number"!=type&&"string"!=type&&(type="object");var key="number"==type?value:keyPrefix+value;return cache=cache[type]||(cache[type]={}),"object"==type?cache[key]&&basicIndexOf(cache[key],value)>-1?0:-1:cache[key]?0:-1
}function cachePush(value){var cache=this.cache,type=typeof value;if("boolean"==type||null==value)cache[value]=!0;else{"number"!=type&&"string"!=type&&(type="object");var key="number"==type?value:keyPrefix+value,typeCache=cache[type]||(cache[type]={});"object"==type?(typeCache[key]||(typeCache[key]=[])).push(value)==this.array.length&&(cache[type]=!1):typeCache[key]=!0}}function charAtCallback(value){return value.charCodeAt(0)}function compareAscending(a,b){var ai=a.index,bi=b.index;if(a=a.criteria,b=b.criteria,a!==b){if(a>b||"undefined"==typeof a)return 1;
if(b>a||"undefined"==typeof b)return-1}return bi>ai?-1:1}function createCache(array){var index=-1,length=array.length,cache=getObject();cache["false"]=cache["null"]=cache["true"]=cache.undefined=!1;var result=getObject();for(result.array=array,result.cache=cache,result.push=cachePush;++index<length;)result.push(array[index]);return cache.object===!1?(releaseObject(result),null):result}function escapeStringChar(match){return"\\"+stringEscapes[match]}function getArray(){return arrayPool.pop()||[]}function getObject(){return objectPool.pop()||{array:null,cache:null,criteria:null,"false":!1,index:0,leading:!1,maxWait:0,"null":!1,number:null,object:null,push:null,string:null,trailing:!1,"true":!1,undefined:!1,value:null}
}function releaseArray(array){array.length=0,arrayPool.length<maxPoolSize&&arrayPool.push(array)}function releaseObject(object){var cache=object.cache;cache&&releaseObject(cache),object.array=object.cache=object.criteria=object.object=object.number=object.string=object.value=null,objectPool.length<maxPoolSize&&objectPool.push(object)}function slice(array,start,end){start||(start=0),"undefined"==typeof end&&(end=array?array.length:0);for(var index=-1,length=end-start||0,result=Array(0>length?0:length);++index<length;)result[index]=array[start+index];
return result}function runInContext(context){function lodash(value){return value&&"object"==typeof value&&!isArray(value)&&hasOwnProperty.call(value,"__wrapped__")?value:new lodashWrapper(value)}function lodashWrapper(value){this.__wrapped__=value}function createBound(func,thisArg,partialArgs,indicator){function bound(){var args=arguments,thisBinding=isPartial?this:thisArg;if(isFunc||(func=thisArg[key]),partialArgs.length&&(args=args.length?(args=nativeSlice.call(args),rightIndicator?args.concat(partialArgs):partialArgs.concat(args)):partialArgs),this instanceof bound){thisBinding=createObject(func.prototype);
var result=func.apply(thisBinding,args);return isObject(result)?result:thisBinding}return func.apply(thisBinding,args)}var isFunc=isFunction(func),isPartial=!partialArgs,key=thisArg;if(isPartial){var rightIndicator=indicator;partialArgs=thisArg}else if(!isFunc){if(!indicator)throw new TypeError;thisArg=func}return bound}function createObject(prototype){return isObject(prototype)?nativeCreate(prototype):{}}function escapeHtmlChar(match){return htmlEscapes[match]}function getIndexOf(){var result=(result=lodash.indexOf)===indexOf?basicIndexOf:result;
return result}function overloadWrapper(func){return function(array,flag,callback,thisArg){return"boolean"!=typeof flag&&null!=flag&&(thisArg=callback,callback=thisArg&&thisArg[flag]===array?undefined:flag,flag=!1),null!=callback&&(callback=lodash.createCallback(callback,thisArg)),func(array,flag,callback,thisArg)}}function shimIsPlainObject(value){var ctor,result;return value&&toString.call(value)==objectClass&&(ctor=value.constructor,!isFunction(ctor)||ctor instanceof ctor)?(forIn(value,function(value,key){result=key
}),result===undefined||hasOwnProperty.call(value,result)):!1}function unescapeHtmlChar(match){return htmlUnescapes[match]}function isArguments(value){return toString.call(value)==argsClass}function clone(value,deep,callback,thisArg,stackA,stackB){var result=value;if("boolean"!=typeof deep&&null!=deep&&(thisArg=callback,callback=deep,deep=!1),"function"==typeof callback){if(callback="undefined"==typeof thisArg?callback:lodash.createCallback(callback,thisArg,1),result=callback(result),"undefined"!=typeof result)return result;
result=value}var isObj=isObject(result);if(isObj){var className=toString.call(result);if(!cloneableClasses[className])return result;var isArr=isArray(result)}if(!isObj||!deep)return isObj?isArr?slice(result):assign({},result):result;var ctor=ctorByClass[className];switch(className){case boolClass:case dateClass:return new ctor(+result);case numberClass:case stringClass:return new ctor(result);case regexpClass:return ctor(result.source,reFlags.exec(result))}var initedStack=!stackA;stackA||(stackA=getArray()),stackB||(stackB=getArray());
for(var length=stackA.length;length--;)if(stackA[length]==value)return stackB[length];return result=isArr?ctor(result.length):{},isArr&&(hasOwnProperty.call(value,"index")&&(result.index=value.index),hasOwnProperty.call(value,"input")&&(result.input=value.input)),stackA.push(value),stackB.push(result),(isArr?forEach:forOwn)(value,function(objValue,key){result[key]=clone(objValue,deep,callback,undefined,stackA,stackB)}),initedStack&&(releaseArray(stackA),releaseArray(stackB)),result}function cloneDeep(value,callback,thisArg){return clone(value,!0,callback,thisArg)
}function findKey(object,callback,thisArg){var result;return callback=lodash.createCallback(callback,thisArg),forOwn(object,function(value,key,object){return callback(value,key,object)?(result=key,!1):void 0}),result}function functions(object){var result=[];return forIn(object,function(value,key){isFunction(value)&&result.push(key)}),result.sort()}function has(object,property){return object?hasOwnProperty.call(object,property):!1}function invert(object){for(var index=-1,props=keys(object),length=props.length,result={};++index<length;){var key=props[index];
result[object[key]]=key}return result}function isBoolean(value){return value===!0||value===!1||toString.call(value)==boolClass}function isDate(value){return value?"object"==typeof value&&toString.call(value)==dateClass:!1}function isElement(value){return value?1===value.nodeType:!1}function isEmpty(value){var result=!0;if(!value)return result;var className=toString.call(value),length=value.length;return className==arrayClass||className==stringClass||className==argsClass||className==objectClass&&"number"==typeof length&&isFunction(value.splice)?!length:(forOwn(value,function(){return result=!1
}),result)}function isEqual(a,b,callback,thisArg,stackA,stackB){var whereIndicator=callback===indicatorObject;if("function"==typeof callback&&!whereIndicator){callback=lodash.createCallback(callback,thisArg,2);var result=callback(a,b);if("undefined"!=typeof result)return!!result}if(a===b)return 0!==a||1/a==1/b;var type=typeof a,otherType=typeof b;if(a===a&&(!a||"function"!=type&&"object"!=type)&&(!b||"function"!=otherType&&"object"!=otherType))return!1;if(null==a||null==b)return a===b;var className=toString.call(a),otherClass=toString.call(b);
if(className==argsClass&&(className=objectClass),otherClass==argsClass&&(otherClass=objectClass),className!=otherClass)return!1;switch(className){case boolClass:case dateClass:return+a==+b;case numberClass:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case regexpClass:case stringClass:return a==String(b)}var isArr=className==arrayClass;if(!isArr){if(hasOwnProperty.call(a,"__wrapped__ ")||hasOwnProperty.call(b,"__wrapped__"))return isEqual(a.__wrapped__||a,b.__wrapped__||b,callback,thisArg,stackA,stackB);if(className!=objectClass)return!1;
var ctorA=a.constructor,ctorB=b.constructor;if(ctorA!=ctorB&&!(isFunction(ctorA)&&ctorA instanceof ctorA&&isFunction(ctorB)&&ctorB instanceof ctorB))return!1}var initedStack=!stackA;stackA||(stackA=getArray()),stackB||(stackB=getArray());for(var length=stackA.length;length--;)if(stackA[length]==a)return stackB[length]==b;var size=0;if(result=!0,stackA.push(a),stackB.push(b),isArr){if(length=a.length,size=b.length,result=size==a.length,!result&&!whereIndicator)return result;for(;size--;){var index=length,value=b[size];
if(whereIndicator)for(;index--&&!(result=isEqual(a[index],value,callback,thisArg,stackA,stackB)););else if(!(result=isEqual(a[size],value,callback,thisArg,stackA,stackB)))break}return result}return forIn(b,function(value,key,b){return hasOwnProperty.call(b,key)?(size++,result=hasOwnProperty.call(a,key)&&isEqual(a[key],value,callback,thisArg,stackA,stackB)):void 0}),result&&!whereIndicator&&forIn(a,function(value,key,a){return hasOwnProperty.call(a,key)?result=--size>-1:void 0}),initedStack&&(releaseArray(stackA),releaseArray(stackB)),result
}function isFinite(value){return nativeIsFinite(value)&&!nativeIsNaN(parseFloat(value))}function isFunction(value){return"function"==typeof value}function isObject(value){return!(!value||!objectTypes[typeof value])}function isNaN(value){return isNumber(value)&&value!=+value}function isNull(value){return null===value}function isNumber(value){return"number"==typeof value||toString.call(value)==numberClass}function isRegExp(value){return value?"object"==typeof value&&toString.call(value)==regexpClass:!1}function isString(value){return"string"==typeof value||toString.call(value)==stringClass
}function isUndefined(value){return"undefined"==typeof value}function merge(object,source,deepIndicator){var args=arguments,index=0,length=2;if(!isObject(object))return object;if(deepIndicator===indicatorObject)var callback=args[3],stackA=args[4],stackB=args[5];else{var initedStack=!0;stackA=getArray(),stackB=getArray(),"number"!=typeof deepIndicator&&(length=args.length),length>3&&"function"==typeof args[length-2]?callback=lodash.createCallback(args[--length-1],args[length--],2):length>2&&"function"==typeof args[length-1]&&(callback=args[--length])
}for(;++index<length;)(isArray(args[index])?forEach:forOwn)(args[index],function(source,key){var found,isArr,result=source,value=object[key];if(source&&((isArr=isArray(source))||isPlainObject(source))){for(var stackLength=stackA.length;stackLength--;)if(found=stackA[stackLength]==source){value=stackB[stackLength];break}if(!found){var isShallow;callback&&(result=callback(value,source),(isShallow="undefined"!=typeof result)&&(value=result)),isShallow||(value=isArr?isArray(value)?value:[]:isPlainObject(value)?value:{}),stackA.push(source),stackB.push(value),isShallow||(value=merge(value,source,indicatorObject,callback,stackA,stackB))
}}else callback&&(result=callback(value,source),"undefined"==typeof result&&(result=source)),"undefined"!=typeof result&&(value=result);object[key]=value});return initedStack&&(releaseArray(stackA),releaseArray(stackB)),object}function omit(object,callback,thisArg){var indexOf=getIndexOf(),isFunc="function"==typeof callback,result={};if(isFunc)callback=lodash.createCallback(callback,thisArg);else var props=concat.apply(arrayRef,nativeSlice.call(arguments,1));return forIn(object,function(value,key,object){(isFunc?!callback(value,key,object):indexOf(props,key)<0)&&(result[key]=value)
}),result}function pairs(object){for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index<length;){var key=props[index];result[index]=[key,object[key]]}return result}function pick(object,callback,thisArg){var result={};if("function"!=typeof callback)for(var index=-1,props=concat.apply(arrayRef,nativeSlice.call(arguments,1)),length=isObject(object)?props.length:0;++index<length;){var key=props[index];key in object&&(result[key]=object[key])}else callback=lodash.createCallback(callback,thisArg),forIn(object,function(value,key,object){callback(value,key,object)&&(result[key]=value)
});return result}function transform(object,callback,accumulator,thisArg){var isArr=isArray(object);if(callback=lodash.createCallback(callback,thisArg,4),null==accumulator)if(isArr)accumulator=[];else{var ctor=object&&object.constructor,proto=ctor&&ctor.prototype;accumulator=createObject(proto)}return(isArr?forEach:forOwn)(object,function(value,index,object){return callback(accumulator,value,index,object)}),accumulator}function values(object){for(var index=-1,props=keys(object),length=props.length,result=Array(length);++index<length;)result[index]=object[props[index]];
return result}function at(collection){for(var index=-1,props=concat.apply(arrayRef,nativeSlice.call(arguments,1)),length=props.length,result=Array(length);++index<length;)result[index]=collection[props[index]];return result}function contains(collection,target,fromIndex){var index=-1,indexOf=getIndexOf(),length=collection?collection.length:0,result=!1;return fromIndex=(0>fromIndex?nativeMax(0,length+fromIndex):fromIndex)||0,length&&"number"==typeof length?result=(isString(collection)?collection.indexOf(target,fromIndex):indexOf(collection,target,fromIndex))>-1:forOwn(collection,function(value){return++index>=fromIndex?!(result=value===target):void 0
}),result}function countBy(collection,callback,thisArg){var result={};return callback=lodash.createCallback(callback,thisArg),forEach(collection,function(value,key,collection){key=String(callback(value,key,collection)),hasOwnProperty.call(result,key)?result[key]++:result[key]=1}),result}function every(collection,callback,thisArg){var result=!0;callback=lodash.createCallback(callback,thisArg);var index=-1,length=collection?collection.length:0;if("number"==typeof length)for(;++index<length&&(result=!!callback(collection[index],index,collection)););else forOwn(collection,function(value,index,collection){return result=!!callback(value,index,collection)
});return result}function filter(collection,callback,thisArg){var result=[];callback=lodash.createCallback(callback,thisArg);var index=-1,length=collection?collection.length:0;if("number"==typeof length)for(;++index<length;){var value=collection[index];callback(value,index,collection)&&result.push(value)}else forOwn(collection,function(value,index,collection){callback(value,index,collection)&&result.push(value)});return result}function find(collection,callback,thisArg){callback=lodash.createCallback(callback,thisArg);
var index=-1,length=collection?collection.length:0;if("number"!=typeof length){var result;return forOwn(collection,function(value,index,collection){return callback(value,index,collection)?(result=value,!1):void 0}),result}for(;++index<length;){var value=collection[index];if(callback(value,index,collection))return value}}function forEach(collection,callback,thisArg){var index=-1,length=collection?collection.length:0;if(callback=callback&&"undefined"==typeof thisArg?callback:lodash.createCallback(callback,thisArg),"number"==typeof length)for(;++index<length&&callback(collection[index],index,collection)!==!1;);else forOwn(collection,callback);
return collection}function groupBy(collection,callback,thisArg){var result={};return callback=lodash.createCallback(callback,thisArg),forEach(collection,function(value,key,collection){key=String(callback(value,key,collection)),(hasOwnProperty.call(result,key)?result[key]:result[key]=[]).push(value)}),result}function invoke(collection,methodName){var args=nativeSlice.call(arguments,2),index=-1,isFunc="function"==typeof methodName,length=collection?collection.length:0,result=Array("number"==typeof length?length:0);
return forEach(collection,function(value){result[++index]=(isFunc?methodName:value[methodName]).apply(value,args)}),result}function map(collection,callback,thisArg){var index=-1,length=collection?collection.length:0;if(callback=lodash.createCallback(callback,thisArg),"number"==typeof length)for(var result=Array(length);++index<length;)result[index]=callback(collection[index],index,collection);else result=[],forOwn(collection,function(value,key,collection){result[++index]=callback(value,key,collection)});return result
}function max(collection,callback,thisArg){var computed=-1/0,result=computed;if(!callback&&isArray(collection))for(var index=-1,length=collection.length;++index<length;){var value=collection[index];value>result&&(result=value)}else callback=!callback&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg),forEach(collection,function(value,index,collection){var current=callback(value,index,collection);current>computed&&(computed=current,result=value)});return result}function min(collection,callback,thisArg){var computed=1/0,result=computed;
if(!callback&&isArray(collection))for(var index=-1,length=collection.length;++index<length;){var value=collection[index];result>value&&(result=value)}else callback=!callback&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg),forEach(collection,function(value,index,collection){var current=callback(value,index,collection);computed>current&&(computed=current,result=value)});return result}function pluck(collection,property){var index=-1,length=collection?collection.length:0;if("number"==typeof length)for(var result=Array(length);++index<length;)result[index]=collection[index][property];
return result||map(collection,property)}function reduce(collection,callback,accumulator,thisArg){if(!collection)return accumulator;var noaccum=arguments.length<3;callback=lodash.createCallback(callback,thisArg,4);var index=-1,length=collection.length;if("number"==typeof length)for(noaccum&&(accumulator=collection[++index]);++index<length;)accumulator=callback(accumulator,collection[index],index,collection);else forOwn(collection,function(value,index,collection){accumulator=noaccum?(noaccum=!1,value):callback(accumulator,value,index,collection)
});return accumulator}function reduceRight(collection,callback,accumulator,thisArg){var iterable=collection,length=collection?collection.length:0,noaccum=arguments.length<3;if("number"!=typeof length){var props=keys(collection);length=props.length}return callback=lodash.createCallback(callback,thisArg,4),forEach(collection,function(value,index,collection){index=props?props[--length]:--length,accumulator=noaccum?(noaccum=!1,iterable[index]):callback(accumulator,iterable[index],index,collection)}),accumulator}function reject(collection,callback,thisArg){return callback=lodash.createCallback(callback,thisArg),filter(collection,function(value,index,collection){return!callback(value,index,collection)
})}function shuffle(collection){var index=-1,length=collection?collection.length:0,result=Array("number"==typeof length?length:0);return forEach(collection,function(value){var rand=floor(nativeRandom()*(++index+1));result[index]=result[rand],result[rand]=value}),result}function size(collection){var length=collection?collection.length:0;return"number"==typeof length?length:keys(collection).length}function some(collection,callback,thisArg){var result;callback=lodash.createCallback(callback,thisArg);var index=-1,length=collection?collection.length:0;
if("number"==typeof length)for(;++index<length&&!(result=callback(collection[index],index,collection)););else forOwn(collection,function(value,index,collection){return!(result=callback(value,index,collection))});return!!result}function sortBy(collection,callback,thisArg){var index=-1,length=collection?collection.length:0,result=Array("number"==typeof length?length:0);for(callback=lodash.createCallback(callback,thisArg),forEach(collection,function(value,key,collection){var object=result[++index]=getObject();object.criteria=callback(value,key,collection),object.index=index,object.value=value
}),length=result.length,result.sort(compareAscending);length--;){var object=result[length];result[length]=object.value,releaseObject(object)}return result}function toArray(collection){return collection&&"number"==typeof collection.length?slice(collection):values(collection)}function compact(array){for(var index=-1,length=array?array.length:0,result=[];++index<length;){var value=array[index];value&&result.push(value)}return result}function difference(array){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,seen=concat.apply(arrayRef,nativeSlice.call(arguments,1)),result=[],isLarge=length>=largeArraySize&&indexOf===basicIndexOf;
if(isLarge){var cache=createCache(seen);cache?(indexOf=cacheIndexOf,seen=cache):isLarge=!1}for(;++index<length;){var value=array[index];indexOf(seen,value)<0&&result.push(value)}return isLarge&&releaseObject(seen),result}function findIndex(array,callback,thisArg){var index=-1,length=array?array.length:0;for(callback=lodash.createCallback(callback,thisArg);++index<length;)if(callback(array[index],index,array))return index;return-1}function first(array,callback,thisArg){if(array){var n=0,length=array.length;if("number"!=typeof callback&&null!=callback){var index=-1;
for(callback=lodash.createCallback(callback,thisArg);++index<length&&callback(array[index],index,array);)n++}else if(n=callback,null==n||thisArg)return array[0];return slice(array,0,nativeMin(nativeMax(0,n),length))}}function indexOf(array,value,fromIndex){if("number"==typeof fromIndex){var length=array?array.length:0;fromIndex=0>fromIndex?nativeMax(0,length+fromIndex):fromIndex||0}else if(fromIndex){var index=sortedIndex(array,value);return array[index]===value?index:-1}return array?basicIndexOf(array,value,fromIndex):-1
}function initial(array,callback,thisArg){if(!array)return[];var n=0,length=array.length;if("number"!=typeof callback&&null!=callback){var index=length;for(callback=lodash.createCallback(callback,thisArg);index--&&callback(array[index],index,array);)n++}else n=null==callback||thisArg?1:callback||n;return slice(array,0,nativeMin(nativeMax(0,length-n),length))}function intersection(array){for(var args=arguments,argsLength=args.length,argsIndex=-1,caches=getArray(),index=-1,indexOf=getIndexOf(),length=array?array.length:0,result=[],seen=getArray();++argsIndex<argsLength;){var value=args[argsIndex];
caches[argsIndex]=indexOf===basicIndexOf&&(value?value.length:0)>=largeArraySize&&createCache(argsIndex?args[argsIndex]:seen)}outer:for(;++index<length;){var cache=caches[0];if(value=array[index],(cache?cacheIndexOf(cache,value):indexOf(seen,value))<0){for(argsIndex=argsLength,(cache||seen).push(value);--argsIndex;)if(cache=caches[argsIndex],(cache?cacheIndexOf(cache,value):indexOf(args[argsIndex],value))<0)continue outer;result.push(value)}}for(;argsLength--;)cache=caches[argsLength],cache&&releaseObject(cache);
return releaseArray(caches),releaseArray(seen),result}function last(array,callback,thisArg){if(array){var n=0,length=array.length;if("number"!=typeof callback&&null!=callback){var index=length;for(callback=lodash.createCallback(callback,thisArg);index--&&callback(array[index],index,array);)n++}else if(n=callback,null==n||thisArg)return array[length-1];return slice(array,nativeMax(0,length-n))}}function lastIndexOf(array,value,fromIndex){var index=array?array.length:0;for("number"==typeof fromIndex&&(index=(0>fromIndex?nativeMax(0,index+fromIndex):nativeMin(fromIndex,index-1))+1);index--;)if(array[index]===value)return index;
return-1}function range(start,end,step){start=+start||0,step=+step||1,null==end&&(end=start,start=0);for(var index=-1,length=nativeMax(0,ceil((end-start)/step)),result=Array(length);++index<length;)result[index]=start,start+=step;return result}function rest(array,callback,thisArg){if("number"!=typeof callback&&null!=callback){var n=0,index=-1,length=array?array.length:0;for(callback=lodash.createCallback(callback,thisArg);++index<length&&callback(array[index],index,array);)n++}else n=null==callback||thisArg?1:nativeMax(0,callback);
return slice(array,n)}function sortedIndex(array,value,callback,thisArg){var low=0,high=array?array.length:low;for(callback=callback?lodash.createCallback(callback,thisArg,1):identity,value=callback(value);high>low;){var mid=low+high>>>1;callback(array[mid])<value?low=mid+1:high=mid}return low}function union(array){return isArray(array)||(arguments[0]=array?nativeSlice.call(array):arrayRef),uniq(concat.apply(arrayRef,arguments))}function unzip(array){for(var index=-1,length=array?max(pluck(array,"length")):0,result=Array(0>length?0:length);++index<length;)result[index]=pluck(array,index);
return result}function without(array){return difference(array,nativeSlice.call(arguments,1))}function zip(array){return array?unzip(arguments):[]}function zipObject(keys,values){for(var index=-1,length=keys?keys.length:0,result={};++index<length;){var key=keys[index];values?result[key]=values[index]:result[key[0]]=key[1]}return result}function after(n,func){return 1>n?func():function(){return--n<1?func.apply(this,arguments):void 0}}function bind(func,thisArg){return support.fastBind||nativeBind&&arguments.length>2?nativeBind.call.apply(nativeBind,arguments):createBound(func,thisArg,nativeSlice.call(arguments,2))
}function bindAll(object){for(var funcs=arguments.length>1?concat.apply(arrayRef,nativeSlice.call(arguments,1)):functions(object),index=-1,length=funcs.length;++index<length;){var key=funcs[index];object[key]=bind(object[key],object)}return object}function bindKey(object,key){return createBound(object,key,nativeSlice.call(arguments,2),indicatorObject)}function compose(){var funcs=arguments;return function(){for(var args=arguments,length=funcs.length;length--;)args=[funcs[length].apply(this,args)];return args[0]
}}function createCallback(func,thisArg,argCount){if(null==func)return identity;var type=typeof func;if("function"!=type){if("object"!=type)return function(object){return object[func]};var props=keys(func);return function(object){for(var length=props.length,result=!1;length--&&(result=isEqual(object[props[length]],func[props[length]],indicatorObject)););return result}}return"undefined"==typeof thisArg||reThis&&!reThis.test(fnToString.call(func))?func:1===argCount?function(value){return func.call(thisArg,value)
}:2===argCount?function(a,b){return func.call(thisArg,a,b)}:4===argCount?function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)}:function(value,index,collection){return func.call(thisArg,value,index,collection)}}function debounce(func,wait,options){function clear(){clearTimeout(maxTimeoutId),clearTimeout(timeoutId),callCount=0,maxTimeoutId=timeoutId=null}function delayed(){var isCalled=trailing&&(!leading||callCount>1);clear(),isCalled&&(maxWait!==!1&&(lastCalled=new Date),result=func.apply(thisArg,args))
}function maxDelayed(){clear(),(trailing||maxWait!==wait)&&(lastCalled=new Date,result=func.apply(thisArg,args))}var args,result,thisArg,callCount=0,lastCalled=0,maxWait=!1,maxTimeoutId=null,timeoutId=null,trailing=!0;if(wait=nativeMax(0,wait||0),options===!0){var leading=!0;trailing=!1}else isObject(options)&&(leading=options.leading,maxWait="maxWait"in options&&nativeMax(wait,options.maxWait||0),trailing="trailing"in options?options.trailing:trailing);return function(){if(args=arguments,thisArg=this,callCount++,clearTimeout(timeoutId),maxWait===!1)leading&&2>callCount&&(result=func.apply(thisArg,args));
else{var now=new Date;maxTimeoutId||leading||(lastCalled=now);var remaining=maxWait-(now-lastCalled);0>=remaining?(clearTimeout(maxTimeoutId),maxTimeoutId=null,lastCalled=now,result=func.apply(thisArg,args)):maxTimeoutId||(maxTimeoutId=setTimeout(maxDelayed,remaining))}return wait!==maxWait&&(timeoutId=setTimeout(delayed,wait)),result}}function defer(func){var args=nativeSlice.call(arguments,1);return setTimeout(function(){func.apply(undefined,args)},1)}function delay(func,wait){var args=nativeSlice.call(arguments,2);
return setTimeout(function(){func.apply(undefined,args)},wait)}function memoize(func,resolver){function memoized(){var cache=memoized.cache,key=keyPrefix+(resolver?resolver.apply(this,arguments):arguments[0]);return hasOwnProperty.call(cache,key)?cache[key]:cache[key]=func.apply(this,arguments)}return memoized.cache={},memoized}function once(func){var ran,result;return function(){return ran?result:(ran=!0,result=func.apply(this,arguments),func=null,result)}}function partial(func){return createBound(func,nativeSlice.call(arguments,1))
}function partialRight(func){return createBound(func,nativeSlice.call(arguments,1),null,indicatorObject)}function throttle(func,wait,options){var leading=!0,trailing=!0;options===!1?leading=!1:isObject(options)&&(leading="leading"in options?options.leading:leading,trailing="trailing"in options?options.trailing:trailing),options=getObject(),options.leading=leading,options.maxWait=wait,options.trailing=trailing;var result=debounce(func,wait,options);return releaseObject(options),result}function wrap(value,wrapper){return function(){var args=[value];
return push.apply(args,arguments),wrapper.apply(this,args)}}function escape(string){return null==string?"":String(string).replace(reUnescapedHtml,escapeHtmlChar)}function identity(value){return value}function mixin(object){forEach(functions(object),function(methodName){var func=lodash[methodName]=object[methodName];lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=[value];push.apply(args,arguments);var result=func.apply(lodash,args);return value&&"object"==typeof value&&value===result?this:new lodashWrapper(result)
}})}function noConflict(){return context._=oldDash,this}function random(min,max){null==min&&null==max&&(max=1),min=+min||0,null==max?(max=min,min=0):max=+max||0;var rand=nativeRandom();return min%1||max%1?min+nativeMin(rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max):min+floor(rand*(max-min+1))}function result(object,property){var value=object?object[property]:undefined;return isFunction(value)?object[property]():value}function template(text,data,options){var settings=lodash.templateSettings;text||(text=""),options=defaults({},options,settings);
var isEvaluating,imports=defaults({},options.imports,settings.imports),importsKeys=keys(imports),importsValues=values(imports),index=0,interpolate=options.interpolate||reNoMatch,source="__p += '",reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");text.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){return interpolateValue||(interpolateValue=esTemplateValue),source+=text.slice(index,offset).replace(reUnescapedString,escapeStringChar),escapeValue&&(source+="' +\n__e("+escapeValue+") +\n'"),evaluateValue&&(isEvaluating=!0,source+="';\n"+evaluateValue+";\n__p += '"),interpolateValue&&(source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"),index=offset+match.length,match
}),source+="';\n";var variable=options.variable,hasVariable=variable;hasVariable||(variable="obj",source="with ("+variable+") {\n"+source+"\n}\n"),source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;"),source="function("+variable+") {\n"+(hasVariable?"":variable+" || ("+variable+" = {});\n")+"var __t, __p = '', __e = _.escape"+(isEvaluating?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";
var sourceURL="\n/*\n//@ sourceURL="+(options.sourceURL||"/lodash/template/source["+templateCounter++ +"]")+"\n*/";try{var result=Function(importsKeys,"return "+source+sourceURL).apply(undefined,importsValues)}catch(e){throw e.source=source,e}return data?result(data):(result.source=source,result)}function times(n,callback,thisArg){n=(n=+n)>-1?n:0;var index=-1,result=Array(n);for(callback=lodash.createCallback(callback,thisArg,1);++index<n;)result[index]=callback(index);return result}function unescape(string){return null==string?"":String(string).replace(reEscapedHtml,unescapeHtmlChar)
}function uniqueId(prefix){var id=++idCounter;return String(null==prefix?"":prefix)+id}function tap(value,interceptor){return interceptor(value),value}function wrapperToString(){return String(this.__wrapped__)}function wrapperValueOf(){return this.__wrapped__}context=context?_.defaults(window.Object(),context,_.pick(window,contextProps)):window;var Array=context.Array,Boolean=context.Boolean,Date=context.Date,Function=context.Function,Math=context.Math,Number=context.Number,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError,arrayRef=[],objectProto=Object.prototype,oldDash=context._,reNative=RegExp("^"+String(objectProto.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),ceil=Math.ceil,clearTimeout=context.clearTimeout,concat=arrayRef.concat,floor=Math.floor,fnToString=Function.prototype.toString,getPrototypeOf=reNative.test(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,hasOwnProperty=objectProto.hasOwnProperty,push=arrayRef.push,setImmediate=context.setImmediate,setTimeout=context.setTimeout,toString=objectProto.toString,nativeBind=reNative.test(nativeBind=toString.bind)&&nativeBind,nativeCreate=reNative.test(nativeCreate=Object.create)&&nativeCreate,nativeIsArray=reNative.test(nativeIsArray=Array.isArray)&&nativeIsArray,nativeIsFinite=context.isFinite,nativeIsNaN=context.isNaN,nativeKeys=reNative.test(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeSlice=arrayRef.slice,isIeOpera=reNative.test(context.attachEvent),isV8=nativeBind&&!/\n|true/.test(nativeBind+isIeOpera),ctorByClass={};
ctorByClass[arrayClass]=Array,ctorByClass[boolClass]=Boolean,ctorByClass[dateClass]=Date,ctorByClass[funcClass]=Function,ctorByClass[objectClass]=Object,ctorByClass[numberClass]=Number,ctorByClass[regexpClass]=RegExp,ctorByClass[stringClass]=String,lodashWrapper.prototype=lodash.prototype;var support=lodash.support={};support.fastBind=nativeBind&&!isV8,lodash.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:reInterpolate,variable:"",imports:{_:lodash}};var isArray=nativeIsArray,shimKeys=function(object){var index,iterable=object,result=[];
if(!iterable)return result;if(!objectTypes[typeof object])return result;for(index in iterable)hasOwnProperty.call(iterable,index)&&result.push(index);return result},keys=nativeKeys?function(object){return isObject(object)?nativeKeys(object):[]}:shimKeys,htmlEscapes={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},htmlUnescapes=invert(htmlEscapes),assign=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;var args=arguments,argsIndex=0,argsLength="number"==typeof guard?2:args.length;
if(argsLength>3&&"function"==typeof args[argsLength-2])var callback=lodash.createCallback(args[--argsLength-1],args[argsLength--],2);else argsLength>2&&"function"==typeof args[argsLength-1]&&(callback=args[--argsLength]);for(;++argsIndex<argsLength;)if(iterable=args[argsIndex],iterable&&objectTypes[typeof iterable])for(var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;++ownIndex<length;)index=ownProps[ownIndex],result[index]=callback?callback(result[index],iterable[index]):iterable[index];
return result},defaults=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;for(var args=arguments,argsIndex=0,argsLength="number"==typeof guard?2:args.length;++argsIndex<argsLength;)if(iterable=args[argsIndex],iterable&&objectTypes[typeof iterable])for(var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;++ownIndex<length;)index=ownProps[ownIndex],"undefined"==typeof result[index]&&(result[index]=iterable[index]);
return result},forIn=function(collection,callback,thisArg){var index,iterable=collection,result=iterable;if(!iterable)return result;if(!objectTypes[typeof iterable])return result;callback=callback&&"undefined"==typeof thisArg?callback:lodash.createCallback(callback,thisArg);for(index in iterable)if(callback(iterable[index],index,collection)===!1)return result;return result},forOwn=function(collection,callback,thisArg){var index,iterable=collection,result=iterable;if(!iterable)return result;if(!objectTypes[typeof iterable])return result;
callback=callback&&"undefined"==typeof thisArg?callback:lodash.createCallback(callback,thisArg);for(var ownIndex=-1,ownProps=objectTypes[typeof iterable]&&keys(iterable),length=ownProps?ownProps.length:0;++ownIndex<length;)if(index=ownProps[ownIndex],callback(iterable[index],index,collection)===!1)return result;return result},isPlainObject=function(value){if(!value||toString.call(value)!=objectClass)return!1;var valueOf=value.valueOf,objProto="function"==typeof valueOf&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);
return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)},where=filter,flatten=overloadWrapper(function flatten(array,isShallow,callback){for(var index=-1,length=array?array.length:0,result=[];++index<length;){var value=array[index];callback&&(value=callback(value,index,array)),isArray(value)?push.apply(result,isShallow?value:flatten(value)):result.push(value)}return result}),uniq=overloadWrapper(function(array,isSorted,callback){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,result=[],isLarge=!isSorted&&length>=largeArraySize&&indexOf===basicIndexOf,seen=callback||isLarge?getArray():result;
if(isLarge){var cache=createCache(seen);cache?(indexOf=cacheIndexOf,seen=cache):(isLarge=!1,seen=callback?seen:(releaseArray(seen),result))}for(;++index<length;){var value=array[index],computed=callback?callback(value,index,array):value;(isSorted?!index||seen[seen.length-1]!==computed:indexOf(seen,computed)<0)&&((callback||isLarge)&&seen.push(computed),result.push(value))}return isLarge?(releaseArray(seen.array),releaseObject(seen)):callback&&releaseArray(seen),result});isV8&&freeModule&&"function"==typeof setImmediate&&(defer=bind(setImmediate,context));
var parseInt=8==nativeParseInt(whitespace+"08")?nativeParseInt:function(value,radix){return nativeParseInt(isString(value)?value.replace(reLeadingSpacesAndZeros,""):value,radix||0)};return lodash.after=after,lodash.assign=assign,lodash.at=at,lodash.bind=bind,lodash.bindAll=bindAll,lodash.bindKey=bindKey,lodash.compact=compact,lodash.compose=compose,lodash.countBy=countBy,lodash.createCallback=createCallback,lodash.debounce=debounce,lodash.defaults=defaults,lodash.defer=defer,lodash.delay=delay,lodash.difference=difference,lodash.filter=filter,lodash.flatten=flatten,lodash.forEach=forEach,lodash.forIn=forIn,lodash.forOwn=forOwn,lodash.functions=functions,lodash.groupBy=groupBy,lodash.initial=initial,lodash.intersection=intersection,lodash.invert=invert,lodash.invoke=invoke,lodash.keys=keys,lodash.map=map,lodash.max=max,lodash.memoize=memoize,lodash.merge=merge,lodash.min=min,lodash.omit=omit,lodash.once=once,lodash.pairs=pairs,lodash.partial=partial,lodash.partialRight=partialRight,lodash.pick=pick,lodash.pluck=pluck,lodash.range=range,lodash.reject=reject,lodash.rest=rest,lodash.shuffle=shuffle,lodash.sortBy=sortBy,lodash.tap=tap,lodash.throttle=throttle,lodash.times=times,lodash.toArray=toArray,lodash.transform=transform,lodash.union=union,lodash.uniq=uniq,lodash.unzip=unzip,lodash.values=values,lodash.where=where,lodash.without=without,lodash.wrap=wrap,lodash.zip=zip,lodash.zipObject=zipObject,lodash.collect=map,lodash.drop=rest,lodash.each=forEach,lodash.extend=assign,lodash.methods=functions,lodash.object=zipObject,lodash.select=filter,lodash.tail=rest,lodash.unique=uniq,mixin(lodash),lodash.chain=lodash,lodash.prototype.chain=function(){return this
},lodash.clone=clone,lodash.cloneDeep=cloneDeep,lodash.contains=contains,lodash.escape=escape,lodash.every=every,lodash.find=find,lodash.findIndex=findIndex,lodash.findKey=findKey,lodash.has=has,lodash.identity=identity,lodash.indexOf=indexOf,lodash.isArguments=isArguments,lodash.isArray=isArray,lodash.isBoolean=isBoolean,lodash.isDate=isDate,lodash.isElement=isElement,lodash.isEmpty=isEmpty,lodash.isEqual=isEqual,lodash.isFinite=isFinite,lodash.isFunction=isFunction,lodash.isNaN=isNaN,lodash.isNull=isNull,lodash.isNumber=isNumber,lodash.isObject=isObject,lodash.isPlainObject=isPlainObject,lodash.isRegExp=isRegExp,lodash.isString=isString,lodash.isUndefined=isUndefined,lodash.lastIndexOf=lastIndexOf,lodash.mixin=mixin,lodash.noConflict=noConflict,lodash.parseInt=parseInt,lodash.random=random,lodash.reduce=reduce,lodash.reduceRight=reduceRight,lodash.result=result,lodash.runInContext=runInContext,lodash.size=size,lodash.some=some,lodash.sortedIndex=sortedIndex,lodash.template=template,lodash.unescape=unescape,lodash.uniqueId=uniqueId,lodash.all=every,lodash.any=some,lodash.detect=find,lodash.findWhere=find,lodash.foldl=reduce,lodash.foldr=reduceRight,lodash.include=contains,lodash.inject=reduce,forOwn(lodash,function(func,methodName){lodash.prototype[methodName]||(lodash.prototype[methodName]=function(){var args=[this.__wrapped__];
return push.apply(args,arguments),func.apply(lodash,args)})}),lodash.first=first,lodash.last=last,lodash.take=first,lodash.head=first,forOwn(lodash,function(func,methodName){lodash.prototype[methodName]||(lodash.prototype[methodName]=function(callback,thisArg){var result=func(this.__wrapped__,callback,thisArg);return null==callback||thisArg&&"function"!=typeof callback?result:new lodashWrapper(result)})}),lodash.VERSION="1.3.1",lodash.prototype.toString=wrapperToString,lodash.prototype.value=wrapperValueOf,lodash.prototype.valueOf=wrapperValueOf,forEach(["join","pop","shift"],function(methodName){var func=arrayRef[methodName];
lodash.prototype[methodName]=function(){return func.apply(this.__wrapped__,arguments)}}),forEach(["push","reverse","sort","unshift"],function(methodName){var func=arrayRef[methodName];lodash.prototype[methodName]=function(){return func.apply(this.__wrapped__,arguments),this}}),forEach(["concat","slice","splice"],function(methodName){var func=arrayRef[methodName];lodash.prototype[methodName]=function(){return new lodashWrapper(func.apply(this.__wrapped__,arguments))}}),lodash}var undefined,arrayPool=[],objectPool=[],idCounter=0,indicatorObject={},keyPrefix=+new Date+"",largeArraySize=75,maxPoolSize=40,reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g,reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,reFlags=/\w*$/,reInterpolate=/<%=([\s\S]+?)%>/g,reThis=(reThis=/\bthis\b/)&&reThis.test(runInContext)&&reThis,whitespace=" 	\f \n\r\u2028\u2029 ᠎              ",reLeadingSpacesAndZeros=RegExp("^["+whitespace+"]*0+(?=.$)"),reNoMatch=/($^)/,reUnescapedHtml=/[&<>"']/g,reUnescapedString=/['\n\r\t\u2028\u2029\\]/g,contextProps=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setImmediate","setTimeout"],templateCounter=0,argsClass="[object Arguments]",arrayClass="[object Array]",boolClass="[object Boolean]",dateClass="[object Date]",funcClass="[object Function]",numberClass="[object Number]",objectClass="[object Object]",regexpClass="[object RegExp]",stringClass="[object String]",cloneableClasses={};
cloneableClasses[funcClass]=!1,cloneableClasses[argsClass]=cloneableClasses[arrayClass]=cloneableClasses[boolClass]=cloneableClasses[dateClass]=cloneableClasses[numberClass]=cloneableClasses[objectClass]=cloneableClasses[regexpClass]=cloneableClasses[stringClass]=!0;var objectTypes={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","	":"t","\u2028":"u2028","\u2029":"u2029"},freeExports=objectTypes[typeof exports]&&exports,freeModule=objectTypes[typeof module]&&module&&module.exports==freeExports&&module,freeGlobal=objectTypes[typeof global]&&global;
!freeGlobal||freeGlobal.global!==freeGlobal&&freeGlobal.window!==freeGlobal||(window=freeGlobal);var _=$._=runInContext();$.each(_,function(prop,func){Object.hasOwnProperty.call(_,prop)&&!/VERSION/.test(name)&&($[prop]||($[prop]=func))})}),FD31.plugin("bootstrap",function($){!function($){"use strict";$(function(){$.support.transition=function(){var transitionEnd=function(){var name,el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};
for(name in transEndEventNames)if(void 0!==el.style[name])return transEndEventNames[name]}();return transitionEnd&&{end:transitionEnd}}()})}($),!function($){"use strict";var dismiss='[data-foundry-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){function removeElement(){$parent.trigger("closed").remove()}var $parent,$this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),e&&e.preventDefault(),$parent.length||($parent=$this.hasClass("alert")?$this:$this.parent()),$parent.trigger(e=$.Event("close")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.on($.support.transition.end,removeElement):removeElement())
},$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data("alert");data||$this.data("alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})},$.fn.alert.Constructor=Alert,$(document).on("click.alert.data-api",dismiss,Alert.prototype.close)}($),!function($){"use strict";var Button=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.button.defaults,options)};Button.prototype.setState=function(state){var d="disabled",$el=this.$element,data=$el.data(),val=$el.is("input")?"val":"html";
state+="Text",data.resetText||$el.data("resetText",$el[val]()),$el[val](data[state]||this.options[state]),setTimeout(function(){"loadingText"==state?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)},Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-foundry-toggle="buttons-radio"]');$parent.hasClass("disabled")||($parent&&$parent.find(".active").removeClass("active"),this.$element.toggleClass("active"))},$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data("button"),options="object"==typeof option&&option;
data||$this.data("button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})},$.fn.button.defaults={loadingText:"loading..."},$.fn.button.Constructor=Button,$(document).on("click.button.data-api","[data-foundry-toggle^=button]",function(e){var $btn=$(e.target);$btn.hasClass("btn")||($btn=$btn.closest(".btn")),$btn.button("toggle")})}($),!function($){"use strict";var Carousel=function(element,options){this.$element=$(element),this.options=options,this.options.slide&&this.slide(this.options.slide),"hover"==this.options.pause&&this.$element.on("mouseenter",$.proxy(this.pause,this)).on("mouseleave",$.proxy(this.cycle,this))
};Carousel.prototype={cycle:function(e){return e||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},to:function(pos){var $active=this.$element.find(".item.active"),children=$active.parent().children(),activePos=children.index($active),that=this;if(!(pos>children.length-1||0>pos))return this.sliding?this.$element.one("slid",function(){that.to(pos)}):activePos==pos?this.pause().cycle():this.slide(pos>activePos?"next":"prev",$(children[pos]))
},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&$.support.transition.end&&(this.$element.trigger($.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(type,next){var e,$active=this.$element.find(".item.active"),$next=next||$active[type](),isCycling=this.interval,direction="next"==type?"left":"right",fallback="next"==type?"first":"last",that=this;
if(this.sliding=!0,isCycling&&this.pause(),$next=$next.length?$next:this.$element.find(".item")[fallback](),e=$.Event("slide",{relatedTarget:$next[0]}),!$next.hasClass("active")){if($.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;$next.addClass(type),$next[0].offsetWidth,$active.addClass(direction),$next.addClass(direction),this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(" ")).addClass("active"),$active.removeClass(["active",direction].join(" ")),that.sliding=!1,setTimeout(function(){that.$element.trigger("slid")
},0)})}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;$active.removeClass("active"),$next.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return isCycling&&this.cycle(),this}}},$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data("carousel"),options=$.extend({},$.fn.carousel.defaults,"object"==typeof option&&option),action="string"==typeof option?option:options.slide;data||$this.data("carousel",data=new Carousel(this,options)),"number"==typeof option?data.to(option):action?data[action]():options.interval&&data.cycle()
})},$.fn.carousel.defaults={interval:5e3,pause:"hover"},$.fn.carousel.Constructor=Carousel,$(document).on("click.carousel.data-api","[data-foundry-slide]",function(e){var href,$this=$(this),$target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")),options=$.extend({},$target.data(),$this.data());$target.carousel(options),e.preventDefault()})}($),!function($){"use strict";var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.collapse.defaults,options),this.options.parent&&(this.$parent=$(this.options.parent)),this.options.toggle&&this.toggle()
};Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"},show:function(){var dimension,scroll,actives,hasData;if(!this.transitioning){if(dimension=this.dimension(),scroll=$.camelCase(["scroll",dimension].join("-")),actives=this.$parent&&this.$parent.find("> .accordion-group > .in"),actives&&actives.length){if(hasData=actives.data("collapse"),hasData&&hasData.transitioning)return;actives.collapse("hide"),hasData||actives.data("collapse",null)
}this.$element[dimension](0),$.support.transition&&this.$element[dimension](this.$element[0][scroll]),this.transition("addClass",$.Event("bootstrap-show"),"shown")}},hide:function(){var dimension;this.transitioning||(dimension=this.dimension(),this.reset(this.$element[dimension]()),this.transition("removeClass",$.Event("bootstrap-hide"),"hidden"),this.$element[dimension](0))},reset:function(size){var dimension=this.dimension();return this.$element.removeClass("collapse")[dimension](size||"auto")[0].offsetWidth,this.$element[null!==size?"addClass":"removeClass"]("collapse"),this
},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){"bootstrap-show"==startEvent.type&&that.reset(),that.transitioning=0,that.$element.trigger(completeEvent)};this.$element.trigger(startEvent),startEvent.isDefaultPrevented()||(this.transitioning=1,this.$element[method]("in"),$.support.transition&&this.$element.hasClass("collapse")?this.$element.one($.support.transition.end,complete):complete())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data("collapse"),options="object"==typeof option&&option;
data||$this.data("collapse",data=new Collapse(this,options)),"string"==typeof option&&data[option]()})},$.fn.collapse.defaults={toggle:!0},$.fn.collapse.Constructor=Collapse,$(document).on("click.collapse.data-api","[data-foundry-toggle=collapse]",function(e){var href,$this=$(this),target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),option=$(target).data("collapse")?"toggle":$this.data();$this[$(target).hasClass("in")?"addClass":"removeClass"]("collapsed"),$(target).collapse(option)
})}($),!function($){"use strict";function clearMenus(e){$(toggle).each(function(){var $parent=getParent($(this)),wasActive=$parent.hasClass("open");$parent.removeClass("open"),wasActive&&$parent.trigger("dropdownClose",[e.target])})}function getParent($this){var $parent,selector=$this.attr("data-target");return selector||(selector=$this.attr("href"),selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),$parent.length||($parent=$this.parent()),$parent}var toggle="[data-foundry-toggle=dropdown]",Dropdown=function(element){var $el=$(element).on("click.dropdown.data-api",this.toggle);
$("html").on("click.dropdown.data-api",function(){$el.parent().removeClass("open")})};Dropdown.prototype={constructor:Dropdown,toggle:function(e){var $parent,isActive,$this=$(this);if(!$this.is(".disabled, :disabled"))return $parent=getParent($this),isActive=$parent.hasClass("open"),clearMenus(e),isActive||($parent.toggleClass("open"),$parent.trigger("dropdownOpen",[e.target]),$this.focus()),!1},keydown:function(e){var $this,$items,$parent,isActive,index;if(/(38|40|27)/.test(e.keyCode)&&($this=$(this),e.preventDefault(),e.stopPropagation(),!$this.is(".disabled, :disabled"))){if($parent=getParent($this),isActive=$parent.hasClass("open"),!isActive||isActive&&27==e.keyCode)return $this.click();
$items=$("[role=menu] li:not(.divider) a",$parent),$items.length&&(index=$items.index($items.filter(":focus")),38==e.keyCode&&index>0&&index--,40==e.keyCode&&index<$items.length-1&&index++,~index||(index=0),$items.eq(index).focus())}}},$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data("dropdown");data||$this.data("dropdown",data=new Dropdown(this)),"string"==typeof option&&data[option].call($this)})},$.fn.dropdown.Constructor=Dropdown,$(document).on("click.dropdown.data-api",clearMenus).on("click.dropdown",".dropdown_ form, .dropdown-static",function(e){e.stopPropagation()
}).on("click.dropdown.data-api",toggle,Dropdown.prototype.toggle).on("keydown.dropdown.data-api",toggle+", [role=menu]",Dropdown.prototype.keydown)}($),!function($){"use strict";var Modal=function(element,options){this.options=options,this.$element=$(element).delegate('[data-dismiss="modal"]',"click.dismiss.modal",$.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};Modal.prototype={constructor:Modal,toggle:function(){return this[this.isShown?"hide":"show"]()
},show:function(){var that=this,e=$.Event("show");this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass("fade");that.$element.parent().length||that.$element.appendTo(document.body),that.$element.show(),transition&&that.$element[0].offsetWidth,that.$element.addClass("in").attr("aria-hidden",!1).focus(),that.enforceFocus(),transition?that.$element.one($.support.transition.end,function(){that.$element.focus().trigger("shown")
}):that.$element.focus().trigger("shown")}))},hide:function(e){e&&e.preventDefault(),e=$.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),$(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),$.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var that=this;$(document).on("focusin.modal",function(e){that.$element[0]===e.target||that.$element.has(e.target).length||that.$element.focus()
})},escape:function(){var that=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&that.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end),that.hideModal()},500);this.$element.one($.support.transition.end,function(){clearTimeout(timeout),that.hideModal()})},hideModal:function(){this.$element.hide().trigger("hidden"),this.backdrop()
},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(callback){var animate=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;this.$backdrop=$('<div class="modal-backdrop '+animate+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?$.proxy(this.$element[0].focus,this.$element[0]):$.proxy(this.hide,this)),doAnimate&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),doAnimate?this.$backdrop.one($.support.transition.end,callback):callback()
}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),$.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one($.support.transition.end,$.proxy(this.removeBackdrop,this)):this.removeBackdrop()):callback&&callback()}},$.fn.modal=function(option){return this.each(function(){var $this=$(this),data=$this.data("modal"),options=$.extend({},$.fn.modal.defaults,$this.data(),"object"==typeof option&&option);data||$this.data("modal",data=new Modal(this,options)),"string"==typeof option?data[option]():options.show&&data.show()
})},$.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},$.fn.modal.Constructor=Modal,$(document).on("click.modal.data-api",'[data-foundry-toggle="modal"]',function(e){var $this=$(this),href=$this.attr("href"),$target=$($this.attr("data-target")||href&&href.replace(/.*(?=#[^\s]+$)/,"")),option=$target.data("modal")?"toggle":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());e.preventDefault(),$target.modal(option).one("hide",function(){$this.focus()})})}($),!function($){"use strict";var Tooltip=function(element,options){this.init("tooltip",element,options)
};Tooltip.prototype={constructor:Tooltip,init:function(type,element,options){var eventIn,eventOut;this.type=type,this.$element=$(element),this.options=this.getOptions(options),this.enabled=!0,"click"==this.options.trigger?this.$element.on("click."+this.type,this.options.selector,$.proxy(this.toggle,this)):"manual"!=this.options.trigger&&(eventIn="hover"==this.options.trigger?"mouseenter":"focus",eventOut="hover"==this.options.trigger?"mouseleave":"blur",this.$element.on(eventIn+"."+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(eventOut+"."+this.type,this.options.selector,$.proxy(this.leave,this))),this.options.selector?this._options=$.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()
},getOptions:function(options){return options=$.extend({},$.fn[this.type].defaults,options,this.$element.data()),options.delay&&"number"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},enter:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return self.options.delay&&self.options.delay.show?(clearTimeout(this.timeout),self.hoverState="in",this.timeout=setTimeout(function(){"in"==self.hoverState&&self.show()},self.options.delay.show),void 0):self.show()
},leave:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),self.options.delay&&self.options.delay.hide?(self.hoverState="out",this.timeout=setTimeout(function(){"out"==self.hoverState&&self.hide()},self.options.delay.hide),void 0):self.hide()},show:function(){var $tip,inside,pos,actualWidth,actualHeight,placement,tp;if(this.hasContent()&&this.enabled){switch($tip=this.tip(),this.setContent(),this.options.animation&&$tip.addClass("fade"),placement="function"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,inside=/in/.test(placement),$tip.detach().css({top:0,left:0,display:"block"}),this.options.container||"parent"){case"parent":$tip.insertAfter(this.$element);
break;case"body":$tip.appendTo(document.body);break;default:var container=$(this.options.container);container.length?$tip.appendTo(container):$tip.insertAfter(this.$element)}switch(pos=this.getPosition(inside),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight,inside?placement.split(" ")[1]:placement){case"bottom":tp={top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2};break;case"top":tp={top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2};break;case"left":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth};
break;case"right":tp={top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}}$tip.offset(tp).addClass(placement).addClass("in")}},setContent:function(){var $tip=this.tip(),title=this.getTitle();$tip.find(".tooltip-inner")[this.options.html?"html":"text"](title),$tip.removeClass("fade in top bottom left right")},hide:function(){function removeWithAnimation(){var timeout=setTimeout(function(){$tip.off($.support.transition.end).detach()},500);$tip.one($.support.transition.end,function(){clearTimeout(timeout),$tip.detach()
})}var $tip=this.tip();return $tip.removeClass("in"),$.support.transition&&this.$tip.hasClass("fade")?removeWithAnimation():$tip.detach(),this},fixTitle:function(){var $e=this.$element;($e.attr("title")||"string"!=typeof $e.attr("data-original-title"))&&$e.attr("data-original-title",$e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(inside){return $.extend({},inside?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})
},getTitle:function(){var title,$e=this.$element,o=this.options;return title=$e.attr("data-original-title")||("function"==typeof o.title?o.title.call($e[0]):o.title)},tip:function(){return this.$tip=this.$tip||$(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(e){var self=$(e.currentTarget)[this.type](this._options).data(this.type);
self[self.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data("tooltip"),options="object"==typeof option&&option;data||$this.data("tooltip",data=new Tooltip(this,options)),"string"==typeof option&&data[option]()})},$.fn.tooltip.Constructor=Tooltip,$.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1,container:"parent"}
}($),!function($){"use strict";var Popover=function(element,options){this.init("popover",element,options)};Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype,{constructor:Popover,setContent:function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent();$tip.find(".popover-title")[this.options.html?"html":"text"](title),$tip.find(".popover-content > *")[this.options.html?"html":"text"](content),$tip.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()
},getContent:function(){var content,$e=this.$element,o=this.options;return content=$e.attr("data-content")||("function"==typeof o.content?o.content.call($e[0]):o.content)},tip:function(){return this.$tip||(this.$tip=$(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),$.fn.popover=function(option){return this.each(function(){var $this=$(this),data=$this.data("popover"),options="object"==typeof option&&option;data||$this.data("popover",data=new Popover(this,options)),"string"==typeof option&&data[option]()
})},$.fn.popover.Constructor=Popover,$.fn.popover.defaults=$.extend({},$.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover popover-fd"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}($),!function($){"use strict";function ScrollSpy(element,options){var href,process=$.proxy(this.process,this),$element=$(element).is("body")?$(window):$(element);this.options=$.extend({},$.fn.scrollspy.defaults,options),this.$scrollElement=$element.on("scroll.scroll-spy.data-api",process),this.selector=(this.options.target||(href=$(element).attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=$("body"),this.refresh(),this.process()
}ScrollSpy.prototype={constructor:ScrollSpy,refresh:function(){var $targets,self=this;this.offsets=$([]),this.targets=$([]),$targets=this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data("target")||$el.attr("href"),$href=/^#\w/.test(href)&&$(href);return $href&&$href.length&&[[$href.position().top,href]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0]),self.targets.push(this[1])})},process:function(){var i,scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,maxScroll=scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget;
if(scrollTop>=maxScroll)return activeTarget!=(i=targets.last()[0])&&this.activate(i);for(i=offsets.length;i--;)activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||scrollTop<=offsets[i+1])&&this.activate(targets[i])},activate:function(target){var active,selector;this.activeTarget=target,$(this.selector).parent(".active").removeClass("active"),selector=this.selector+'[data-target="'+target+'"],'+this.selector+'[href="'+target+'"]',active=$(selector).parent("li").addClass("active"),active.parent(".dropdown-menu").length&&(active=active.closest("li.dropdown").addClass("active")),active.trigger("activate")
}},$.fn.scrollspy=function(option){return this.each(function(){var $this=$(this),data=$this.data("scrollspy"),options="object"==typeof option&&option;data||$this.data("scrollspy",data=new ScrollSpy(this,options)),"string"==typeof option&&data[option]()})},$.fn.scrollspy.Constructor=ScrollSpy,$.fn.scrollspy.defaults={offset:10},$(window).on("load",function(){$('[data-foundry-spy="scroll"]').each(function(){var $spy=$(this);$spy.scrollspy($spy.data())})})}($),!function($){"use strict";var Tab=function(element){this.element=$(element)
};Tab.prototype={constructor:Tab,show:function(){var previous,$target,e,$this=this.element,$ul=$this.closest("ul:not(.dropdown-menu)"),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$this.parent("li").hasClass("active")||(previous=$ul.find(".active:last a")[0],e=$.Event("show",{relatedTarget:previous}),$this.trigger(e),e.isDefaultPrevented()||($target=$(selector),this.activate($this.parent("li"),$ul),this.activate($target,$target.parent(),function(){$this.trigger({type:"shown",relatedTarget:previous})
})))},activate:function(element,container,callback){function next(){$active.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),element.addClass("active"),transition?(element[0].offsetWidth,element.addClass("in")):element.removeClass("fade"),element.parent(".dropdown-menu")&&element.closest("li.dropdown").addClass("active"),callback&&callback()}var $active=container.find("> .active"),transition=callback&&$.support.transition&&$active.hasClass("fade");transition?$active.one($.support.transition.end,next):next(),$active.removeClass("in")
}},$.fn.tab=function(option){return this.each(function(){var $this=$(this),data=$this.data("tab");data||$this.data("tab",data=new Tab(this)),"string"==typeof option&&data[option]()})},$.fn.tab.Constructor=Tab,$(document).on("click.tab.data-api",'[data-foundry-toggle="tab"], [data-foundry-toggle="pill"]',function(e){e.preventDefault(),$(this).tab("show")})}($),!function($){"use strict";var Typeahead=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.typeahead.defaults,options),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=$(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()
};Typeahead.prototype={constructor:Typeahead,select:function(){var val=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(val)).change(),this.hide()},updater:function(item){return item},show:function(){var pos=$.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:pos.top+pos.height,left:pos.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var items;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(items=$.isFunction(this.source)?this.source(this.query,$.proxy(this.process,this)):this.source,items?this.process(items):this)
},process:function(items){var that=this;return items=$.grep(items,function(item){return that.matcher(item)}),items=this.sorter(items),items.length?this.render(items.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(item){return~item.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(items){for(var item,beginswith=[],caseSensitive=[],caseInsensitive=[];item=items.shift();)item.toLowerCase().indexOf(this.query.toLowerCase())?~item.indexOf(this.query)?caseSensitive.push(item):caseInsensitive.push(item):beginswith.push(item);
return beginswith.concat(caseSensitive,caseInsensitive)},highlighter:function(item){var query=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return item.replace(new RegExp("("+query+")","ig"),function($1,match){return"<strong>"+match+"</strong>"})},render:function(items){var that=this;return items=$(items).map(function(i,item){return i=$(that.options.item).attr("data-value",item),i.find("a").html(that.highlighter(item)),i[0]}),items.first().addClass("active"),this.$menu.html(items),this},next:function(){var active=this.$menu.find(".active").removeClass("active"),next=active.next();
next.length||(next=$(this.$menu.find("li")[0])),next.addClass("active")},prev:function(){var active=this.$menu.find(".active").removeClass("active"),prev=active.prev();prev.length||(prev=this.$menu.find("li").last()),prev.addClass("active")},listen:function(){this.$element.on("blur",$.proxy(this.blur,this)).on("keypress",$.proxy(this.keypress,this)).on("keyup",$.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",$.proxy(this.keydown,this)),this.$menu.on("click",$.proxy(this.click,this)).on("mouseenter","li",$.proxy(this.mouseenter,this))
},eventSupported:function(eventName){var isSupported=eventName in this.$element;return isSupported||(this.$element.setAttribute(eventName,"return;"),isSupported="function"==typeof this.$element[eventName]),isSupported},move:function(e){if(this.shown){switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=!~$.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)
},keypress:function(e){this.suppressKeyPressRepeat||this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(){var that=this;setTimeout(function(){that.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(e){this.$menu.find(".active").removeClass("active"),$(e.currentTarget).addClass("active")
}},$.fn.typeahead=function(option){return this.each(function(){var $this=$(this),data=$this.data("typeahead"),options="object"==typeof option&&option;data||$this.data("typeahead",data=new Typeahead(this,options)),"string"==typeof option&&data[option]()})},$.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},$.fn.typeahead.Constructor=Typeahead,$(document).on("focus.typeahead.data-api",'[data-foundry-provide="typeahead"]',function(e){var $this=$(this);
$this.data("typeahead")||(e.preventDefault(),$this.typeahead($this.data()))})}($),!function($){"use strict";var Affix=function(element,options){this.options=$.extend({},$.fn.affix.defaults,options),this.$window=$(window).on("scroll.affix.data-api",$.proxy(this.checkPosition,this)).on("click.affix.data-api",$.proxy(function(){setTimeout($.proxy(this.checkPosition,this),1)},this)),this.$element=$(element),this.checkPosition()};Affix.prototype.checkPosition=function(){if(this.$element.is(":visible")){var affix,scrollHeight=$(document).height(),scrollTop=this.$window.scrollTop(),position=this.$element.offset(),offset=this.options.offset,offsetBottom=offset.bottom,offsetTop=offset.top,reset="affix affix-top affix-bottom";
"object"!=typeof offset&&(offsetBottom=offsetTop=offset),"function"==typeof offsetTop&&(offsetTop=offset.top()),"function"==typeof offsetBottom&&(offsetBottom=offset.bottom()),affix=null!=this.unpin&&scrollTop+this.unpin<=position.top?!1:null!=offsetBottom&&position.top+this.$element.height()>=scrollHeight-offsetBottom?"bottom":null!=offsetTop&&offsetTop>=scrollTop?"top":!1,this.affixed!==affix&&(this.affixed=affix,this.unpin="bottom"==affix?position.top-scrollTop:null,this.$element.removeClass(reset).addClass("affix"+(affix?"-"+affix:"")))
}},$.fn.affix=function(option){return this.each(function(){var $this=$(this),data=$this.data("affix"),options="object"==typeof option&&option;data||$this.data("affix",data=new Affix(this,options)),"string"==typeof option&&data[option]()})},$.fn.affix.Constructor=Affix,$.fn.affix.defaults={offset:0},$(window).on("load",function(){$('[data-foundry-spy="affix"]').each(function(){var $spy=$(this),data=$spy.data();data.offset=data.offset||{},data.offsetBottom&&(data.offset.bottom=data.offsetBottom),data.offsetTop&&(data.offset.top=data.offsetTop),$spy.affix(data)
})})}($),!function($){var Notification=function(element,options){if(this.$element=$(element),this.$note=$('<div class="alert"></div>'),this.options=$.extend(!0,$.fn.notify.defaults,options),this.options.transition?"fade"==this.options.transition?this.$note.addClass("in").addClass(this.options.transition):this.$note.addClass(this.options.transition):this.$note.addClass("fade").addClass("in"),this.options.type?this.$note.addClass("alert-"+this.options.type):this.$note.addClass("alert-success"),this.options.message||""===this.$element.data("message")?"object"==typeof this.options.message&&(this.options.message.html?this.$note.html(this.options.message.html):this.options.message.text?this.$note.text(this.options.message.text):this.$note.html(this.options.message)):this.$note.html(this.$element.data("message")),this.options.closable)var link=$('<a class="close pull-right" href="javascript: void(0);">&times;</a>');
return $(link).on("click",$.proxy(onClose,this)),this.$note.prepend(link),this};onClose=function(){this.options.onClose(),$(this.$note).remove(),this.options.onClosed()},Notification.prototype.show=function(){this.options.fadeOut.enabled&&this.$note.delay(this.options.fadeOut.delay||3e3).fadeOut("slow",$.proxy(onClose,this)),this.$element.append(this.$note),this.$note.alert()},Notification.prototype.hide=function(){this.options.fadeOut.enabled?this.$note.delay(this.options.fadeOut.delay||3e3).fadeOut("slow",$.proxy(onClose,this)):onClose.call(this)
},$.fn.notify=function(options){return new Notification(this,options)},$.fn.notify.defaults={type:"success",closable:!0,transition:"fade",fadeOut:{enabled:!0,delay:3e3},message:null,onClose:function(){},onClosed:function(){}}}($)}),FD31.plugin("responsive",function($){$.responsive=function(elem,options){return new Responsive(elem,options)},$.fn.responsive=function(conditions){if(conditions){var elem=this,options={elementWidth:function(elem){return elem.outerWidth(!0)},conditions:conditions};$.responsive(elem,options)
}return this};var $window=$(window),$isFunc=$.isFunction,Responsive=function(elem,options){var self=this,elem=$(elem),instance=elem.data("$responsive");instance&&instance.destroy(),$.extend(self,{elem:elem,options:options,conditions:$.sortBy($.makeArray(options.conditions),function(condition){return condition.at}),event:"resize.responsive"+$.uid(),handler:$.debounce(function(){self.set()},250)}),delete options.conditions,elem.data("$responsive",self),$(function(){$window.on(self.event,self.handler),self.set()
}),$(window).load(function(){self.set()})};$.extend(Responsive.prototype,{set:function(){var self=this,elementWidth=self.options.elementWidth;self.elem.each(function(){var elem=$(this),currentWidth=$isFunc(elementWidth)?elementWidth(elem):elementWidth;self.removeCondition(elem.data("currentCondition"),elem),$.each(self.conditions,function(i,condition){var thresholdWidth=condition.at;return thresholdWidth>=currentWidth?(self.applyCondition(condition,elem),!1):void 0})})},applyCondition:function(condition,elem){var switchTo,alsoSwitch,switchStylesheet,whenApplied;
(switchTo=condition.switchTo)&&elem.addClass(switchTo),(alsoSwitch=condition.alsoSwitch)&&$.each(alsoSwitch,function(selector,classname){$(selector).addClass(classname)}),(switchStylesheet=condition.switchStylesheet)&&$.each($.makeArray(switchStylesheet),function(i,url){var stylesheet=$('link[href$="'+url+'"]');stylesheet.length<1&&$("<link/>").attr({rel:"stylesheet",type:"text/css",href:url}).appendTo("head")}),(whenApplied=condition.whenApplied)&&$isFunc(whenApplied)&&whenApplied(),elem.data("currentCondition",condition).trigger("responsive",[condition])
},removeCondition:function(condition,elem){if(condition){var switchTo,alsoSwitch,switchStylesheet,whenRemoved;(switchTo=condition.switchTo)&&elem.removeClass(switchTo),(alsoSwitch=condition.alsoSwitch)&&$.each(alsoSwitch,function(selector,classname){$(selector).removeClass(classname)}),(switchStylesheet=condition.switchStylesheet)&&$.each($.makeArray(switchStylesheet),function(i,url){$('link[href$="'+url+'"]').remove()}),(whenRemoved=condition.whenRemoved)&&$isFunc(whenRemoved)&&whenRemoved(),elem.removeData("currentCondition")
}},resetToDefault:function(current){var self=this,elem=self.elem;$.each(self.conditions,function(i,condition){current&&i==current||self.removeCondition(condition,elem)})},destroy:function(){$window.off(this.event);var self=this;self.elem.each(function(){var elem=$(this);self.removeCondition(elem.data("currentCondition"),elem)})}})}),FD31.plugin("utils",function($){$.IE=function(){if(-1!=navigator.appVersion.indexOf("MSIE 10"))return 10;for(var undef,v=3,div=document.createElement("div"),all=div.getElementsByTagName("i");v++,div.innerHTML="<!--[if gt IE "+v+"]><i></i><![endif]-->",all[0];);return v>4?v:undef
}(),$.uid=function(p,s){return(p?p:"")+Math.random().toString().replace(".","")+(s?s:"")},$.isDeferred=function(obj){return obj&&$.isFunction(obj.always)},$.distinct=function(items){var uniqueElements=$.unique;if(!(items.length<1)){if(items[0].nodeType)return uniqueElements.apply(this,arguments);if("object"==typeof items[0]){var unique=Math.random(),uniqueObjects=[];return $.each(items,function(i){items[i][unique]||(uniqueObjects.push(items[i]),items[i][unique]=!0)}),$.each(uniqueObjects,function(i){delete uniqueObjects[i][unique]
}),uniqueObjects}return $.grep(items,function(item,i){return $.inArray(item,items)===i})}},$.trimSeparators=function(keyword,separator,removeDuplicates){var s=separator;return keyword=keyword.replace(new RegExp("^["+s+"\\s]+|["+s+",\\s]+$","g"),"").replace(new RegExp(s+"["+s+"\\s]*"+s,"g"),s).replace(new RegExp("[\\s]+"+s,"g"),s).replace(new RegExp(s+"[\\s]+","g"),s),removeDuplicates&&(keyword=$.distinct(keyword.split(s)).join(s)),keyword},$.isNumeric=function(n){return!isNaN(parseFloat(n))&&isFinite(n)},$.Number={rotate:function(n,min,max,offset){return void 0===offset&&(offset=0),n+=offset,min>n?n+=max+1:n>max&&(n-=max+1),n
}},$.fn.stretchToFit=function(){return $.each(this,function(){var $this=$(this);$this.css("width","100%").css("width",2*$this.width()-$this.outerWidth(!0)-parseInt($this.css("borderLeftWidth"))-parseInt($this.css("borderRightWidth")))})},$.fn.serializeObject=function(){var obj={};return $.each($(this).serializeArray(),function(i,prop){obj.hasOwnProperty(prop.name)?($.isArray(obj[prop.name])||(obj[prop.name]=[obj[prop.name]]),obj[prop.name].push(prop.value)):obj[prop.name]=prop.value}),obj},$.fn.serializeJSON=function(){return JSON.stringify($(this).serializeObject())
},$.toHTML=function(str){return $("<div>").html(str).html()},$.fn.toHTML=function(){return $.toHTML(this.clone())},function(){var Bloop=function(items){this.items=items,this.start=0,this.end=items.length-1,this.node=null,this.stopped=!1};$.extend(Bloop.prototype,{isLooping:function(){return this.stopped?!1:Math.abs(this.start-this.end)>1?(this.node=Math.floor((this.start+this.end)/2),!0):!1},flip:function(flip){flip?this.end=this.node-1:this.start=this.node+1},stop:function(){this.stop=!0}}),$.Bloop=function(items){return new Bloop(items)
}}(),$.remap=function(to,from,props){return $.each(props,function(i,prop){to[prop]=from[prop]}),obj},$.deletes=function(obj,props){$.each(props,function(i,prop){delete obj[prop]})},function(){var Threads=function(options){this.threads=[],this.threadCount=0,this.threadLimit=options.threadLimit||1,this.threadDelay=options.threadDelay||0};$.extend(Threads.prototype,{add:function(thread,type){$.isFunction(thread)&&(thread.type=type||"normal","deferred"==type&&(thread.deferred=$.Deferred().always($.proxy(this.next,this))),this.threads.push(thread),this.run())
},addDeferred:function(thread){return this.add(thread,"deferred")},next:function(){this.threadCount--,this.run()},run:function(){var self=this;setTimeout(function(){if(!(self.threads.length<1)&&self.threadCount<self.threadLimit){self.threadCount++;var thread=self.threads.shift();try{thread.call(thread,thread.deferred)}catch(e){console.error(e)}!thread.deferred&&self.next()}},self.threadDelay)}}),$.Threads=function(options){return new Threads(options)}}(),function(){var isFunction=$.isFunction,Enqueue=function(){this.lastId=0
};Enqueue.prototype.queue=function(filter){var self=this,id=$.uid();return self.lastId=id,function(){if(self.lastId===id){var args=arguments,args=isFunction(filter)?filter.apply(this,args):args;return isFunction(self.fn)?self.fn.apply(this,args):args}}},$.Enqueue=function(fn){var self=new Enqueue;$.isFunction(fn)&&(self.fn=fn);var func=$.proxy(self.queue,self);return func.reset=function(){self.lastId=0},func}}(),function(){var instance="___eventable",publicMethods=["on","off","fire"],getEventName=function(name){return name.split(".")[0]
},Eventable=function(mode){this.fnList={},this.events={},this.mode=mode};$.extend(Eventable.prototype,{createEvent:function(name){return this.events[name]=$.Callbacks(this.mode)},on:function(name,fn){if(!name||!$.isFunction(fn))return this;var fnList=this.fnList;(fnList[name]||(fnList[name]=[])).push(fn);var basename=getEventName(name);return(this.events[basename]||this.createEvent(basename)).add(fn),this},off:function(name){if(!name)return this;var basename=getEventName(name),event=this.events[basename];if(!event)return this;
var removeCallbacks=function(fnList){$.each(fnList,function(i,fn){event.remove(fn)})};return basename!==name?$.each(this.fnList,function(name,fnList){name.indexOf(basename)>-1&&removeCallbacks(fnList)}):removeCallbacks(this.fnList[name]),this},fire:function(name){var event=this.events[name];if(event)return event.fire.apply(event,$.makeArray(arguments).slice(1)),this},destroy:function(){for(name in this.events)this.events[name].disable()}}),$.eventable=function(obj,mode){var eventable=obj[instance];return eventable&&"destroy"===mode?(eventable.destroy(),$.deletes(obj,publicMethods),delete obj[instance]):(eventable=obj[instance]=new Eventable(mode),obj.on=$.proxy(eventable.on,eventable),obj.off=$.proxy(eventable.off,eventable),obj.fire=$.proxy(eventable.fire,eventable),obj)
}}(),$.Chunk=function(array,options){$.isArray(array)&&(array=[]);var options=$.extend({},{size:256,every:1e3},options),self=$.extend($.Deferred(),{size:options.size,every:options.every,from:0,to:array.length,process:function(callback){return self.process.fn=callback,self},chunkStart:function(callback){return self.chunkStart.fn=callback,self},chunkEnd:function(callback){return self.chunkEnd.fn=callback,self},start:function(){return self.stopped=!1,self.iterate(),self},iterate:function(){if(!self.stopped){var iterator=self.process.fn;
if(iterator){self.to=from.size+self.size;var max=array.length;self.to>max&&(self.to=max);var range={from:self.from,to:self.to};for(self.chunkStart.fn&&self.chunkStart.fn.call(self,range.from,range.to);self.from<self.to&&!self.stopped;)iterator.call(self,array[self.from]),self.from++;return self.chunkEnd.fn&&self.chunkEnd.fn.call(self,range.from,range.to),self.completed=self.from>=array.length-1,self.completed?self.resolveWith(self):self.nextIteration=setTimeout(self.iterate,self.every),self}}},pause:function(){return self.stopped=!0,clearTimeout(self.nextIteration),self
},restart:function(){return"rejected"===self.state()?self:(self.from=0,self.start(),self)},stop:function(){return self.pause(),self.rejectWith(self,[self.from]),self}});return self},$.fn.disabled=function(state){return void 0===state?this.is(":disabled")||this.hasClass("disabled"):this.prop("disabled",!!state).toggleClass("disabled",!!state)},$.fn.enabled=function(state){return void 0===state?!this.disabled():this.disabled(!state)},function(){var self=$.Ajax=function(options){var request=$.Deferred(),args=arguments;
return $.isPlainObject(options)&&$.isFunction(options.beforeCreate)&&options.beforeCreate(request),self.queue.addDeferred(function(queue){request.xhr=$.ajax.apply(null,args).pipe(request.resolve,request.reject,request.notify),setTimeout(queue.resolve,self.requestInterval)}),request};self.queue=$.Threads({threadLimit:1}),self.requestInterval=1200}(),$.callback=function(func,persist){if($.isFunction(func)){var funcName=$.uid("cb");return window[funcName]=function(){return persist||delete window[funcName],func.apply(null,arguments)
},funcName}if($.isString(func))switch(func){case"destroy":var funcName=persist;delete window[funcName]}},$.fn.visible=function(partial){var $t=$(this),$w=$(window);if(!($t.length<1)){var viewTop=$w.scrollTop(),viewBottom=viewTop+$w.height(),_top=$t.offset().top,_bottom=_top+$t.height(),compareTop=partial===!0?_bottom:_top,compareBottom=partial===!0?_top:_bottom;return viewBottom>=compareBottom&&compareTop>=viewTop}},$.fn.selectAll=function(){return this.each(function(){this.select()})},$.fn.unselect=function(){return this.each(function(){var input=this,value=input.value;
input.value+=" ",input.value=value})},$.fn.addTransitionClass=function(classname,duration){var $el=this.addClass(classname);return setTimeout(function(){$el.removeClass(classname)},duration||0),this},$.fn.switchClass=function(classname,delimiter){var delimiter=delimiter||"-",prefix=classname.split(delimiter)[0]+delimiter,length=prefix.length;return this.each(function(){var $el=$(this),classnames=$.map($el.attr("class").split(" "),function(classname){return classname.slice(0,length)==prefix||""==classname?null:classname
});classnames.push(classname),$el.attr("class",classnames.join(" "))})},$.sanitizeHTML=function(html){return $($.parseHTML(html,document,!0)).toHTML()},$.buildHTML=function(html,keepScripts){if(html instanceof $)return html;var html=$.trim(html),scripts=[],fragment=$.buildFragment([html],document,scripts),nodes=$.merge([],fragment.childNodes);if(!keepScripts&&scripts.length>0){var script=document.createElement("script");script.text=$.callback(function(){$(scripts).remove()})+"();";for(var node,inserted,i=nodes.length-1;(node=nodes[i--])&&("SCRIPT"===node.nodeName?inserted=nodes.push(script):1===node.nodeType&&(inserted=node.appendChild(script)),!inserted););inserted||nodes.push(script),scripts.push(script)
}return $(nodes)},$.fn.filterBy=function(key,val,operator){var operator=operator||"=",selector="[data-"+key.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()+operator+val+"]";return this.filter(selector)},$.intersects=function(a,b){return $.isArray(b)&&(b={top:b.y,left:b.x,bottom:b.y,right:b.x}),b.left<=a.right&&a.left<=b.right&&b.top<=a.bottom&&a.top<=b.bottom},$.fn.intersectsWith=function(top,left,width,height){var offset=this.offset(),reference={top:offset.top,left:offset.left,bottom:offset.top+(sourceHeight=this.height()),right:offset.left+(sourceWidth=this.width()),width:sourceWidth,height:sourceHeight},subject={top:top,left:left,bottom:top+(height||(height=0)),right:left+(width||(width=0)),width:width,height:height};
return $.intersects(reference,subject)?{reference:reference,subject:subject}:!1},$.download=function(src){return $("<iframe>").hide().appendTo("body").bind("load",function(){$(this).remove()}).attr("src",src)}}),FD31.plugin("uri",function($){$.isUrl=function(s){var regexp=/^(http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;return regexp.test(s)};var Query=function(queryString){"use strict";var parseQuery=function(q){var i,ps,p,kvp,k,v,arr=[];if("undefined"==typeof q||null===q||""===q)return arr;
for(0===q.indexOf("?")&&(q=q.substring(1)),ps=q.toString().split(/[&;]/),i=0;i<ps.length;i++)p=ps[i],kvp=p.split("="),k=kvp[0],v=-1===p.indexOf("=")?null:null===kvp[1]?"":kvp[1],arr.push([k,v]);return arr},params=parseQuery(queryString),toString=function(){var i,param,s="";for(i=0;i<params.length;i++)param=params[i],s.length>0&&(s+="&"),s+=null===param[1]?param[0]:param.join("=");return s.length>0?"?"+s:s},decode=function(s){return s=decodeURIComponent(s),s=s.replace("+"," ")},getParamValue=function(key){var param,i;
for(i=0;i<params.length;i++)if(param=params[i],decode(key)===decode(param[0]))return param[1]},getParamValues=function(key){var i,param,arr=[];for(i=0;i<params.length;i++)param=params[i],decode(key)===decode(param[0])&&arr.push(param[1]);return arr},deleteParam=function(key,val){var i,param,keyMatchesFilter,valMatchesFilter,arr=[];for(i=0;i<params.length;i++)param=params[i],keyMatchesFilter=decode(param[0])===decode(key),valMatchesFilter=decode(param[1])===decode(val),(1===arguments.length&&!keyMatchesFilter||2===arguments.length&&!keyMatchesFilter&&!valMatchesFilter)&&arr.push(param);
return params=arr,this},addParam=function(key,val,index){return 3===arguments.length&&-1!==index?(index=Math.min(index,params.length),params.splice(index,0,[key,val])):arguments.length>0&&params.push([key,val]),this},replaceParam=function(key,newVal,oldVal){var i,param,index=-1;if(3===arguments.length){for(i=0;i<params.length;i++)if(param=params[i],decode(param[0])===decode(key)&&decodeURIComponent(param[1])===decode(oldVal)){index=i;break}deleteParam(key,oldVal).addParam(key,newVal,index)}else{for(i=0;i<params.length;i++)if(param=params[i],decode(param[0])===decode(key)){index=i;
break}deleteParam(key),addParam(key,newVal,index)}return this};return{getParamValue:getParamValue,getParamValues:getParamValues,deleteParam:deleteParam,addParam:addParam,replaceParam:replaceParam,toString:toString}},Uri=function(uriString){"use strict";var strictMode=!1,urlExtractor=/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi,parseUri=function(str){for(var parsers={strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/},keys=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q={name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},m=parsers[strictMode?"strict":"loose"].exec(str),uri={},i=14;i--;)uri[keys[i]]=m[i]||"";
return uri[q.name]={},uri[keys[12]].replace(q.parser,function($0,$1,$2){$1&&(uri[q.name][$1]=$2)}),uri},uriParts=parseUri(uriString||""),queryObj=new Query(uriParts.query),protocol=function(val){return"undefined"!=typeof val&&(uriParts.protocol=val),uriParts.protocol},hasAuthorityPrefixUserPref=null,hasAuthorityPrefix=function(val){return"undefined"!=typeof val&&(hasAuthorityPrefixUserPref=val),null===hasAuthorityPrefixUserPref?-1!==uriParts.source.indexOf("//"):hasAuthorityPrefixUserPref},userInfo=function(val){return"undefined"!=typeof val&&(uriParts.userInfo=val),uriParts.userInfo
},host=function(val){return"undefined"!=typeof val&&(uriParts.host=val),uriParts.host},port=function(val){return"undefined"!=typeof val&&(uriParts.port=val),uriParts.port},path=function(val){return"undefined"!=typeof val&&(uriParts.path=val),uriParts.path},query=function(val){return"undefined"!=typeof val&&(queryObj=new Query(val)),queryObj},anchor=function(val){return"undefined"!=typeof val&&(uriParts.anchor=val),uriParts.anchor},setProtocol=function(val){return protocol(val),this},setHasAuthorityPrefix=function(val){return hasAuthorityPrefix(val),this
},setUserInfo=function(val){return userInfo(val),this},setHost=function(val){return host(val),this},setPort=function(val){return port(val),this},setPath=function(val){return path(val),this},setQuery=function(val){return query(val),this},setAnchor=function(val){return anchor(val),this},getQueryParamValue=function(key){return query().getParamValue(key)},getQueryParamValues=function(key){return query().getParamValues(key)},deleteQueryParam=function(key,val){return 2===arguments.length?query().deleteParam(key,val):query().deleteParam(key),this
},addQueryParam=function(key,val,index){return 3===arguments.length?query().addParam(key,val,index):query().addParam(key,val),this},replaceQueryParam=function(key,newVal,oldVal){return 3===arguments.length?query().replaceParam(key,newVal,oldVal):query().replaceParam(key,newVal),this},toPath=function(val){if(void 0===val)return uriParts.path;if("/"==val.substring(0,1))return uriParts.path=val;var base_path=uriParts.path.split("/"),rel_path=val.split("/");""===base_path.slice(-1)[0]&&base_path.pop();for(var part;part=rel_path.shift();)switch(part){case"..":base_path.length>1&&base_path.pop();
break;case".":break;default:base_path.push(part)}return uriParts.path=base_path.join("/"),this},toString=function(){var s="",is=function(s){return null!==s&&""!==s};return is(protocol())?(s+=protocol(),protocol().indexOf(":")!==protocol().length-1&&(s+=":"),s+="//"):hasAuthorityPrefix()&&is(host())&&(s+="//"),is(userInfo())&&is(host())&&(s+=userInfo(),userInfo().indexOf("@")!==userInfo().length-1&&(s+="@")),is(host())&&(s+=host(),is(port())&&(s+=":"+port())),is(path())?s+=path():is(host())&&(is(query().toString())||is(anchor()))&&(s+="/"),is(query().toString())&&(0!==query().toString().indexOf("?")&&(s+="?"),s+=query().toString()),is(anchor())&&(0!==anchor().indexOf("#")&&(s+="#"),s+=anchor()),s
},extract=function(i){var urls=uriString.match(urlExtractor)||[];return void 0===i?urls:urls[i]||""},clone=function(){return new Uri(toString())};return{protocol:protocol,hasAuthorityPrefix:hasAuthorityPrefix,userInfo:userInfo,host:host,port:port,path:path,query:query,anchor:anchor,setProtocol:setProtocol,setHasAuthorityPrefix:setHasAuthorityPrefix,setUserInfo:setUserInfo,setHost:setHost,setPort:setPort,setPath:setPath,setQuery:setQuery,setAnchor:setAnchor,getQueryParamValue:getQueryParamValue,getQueryParamValues:getQueryParamValues,deleteQueryParam:deleteQueryParam,addQueryParam:addQueryParam,replaceQueryParam:replaceQueryParam,extract:extract,toPath:toPath,toString:toString,clone:clone}
};$.uri=function(s){return new Uri(s)}}),FD31.plugin("mvc",function($){!function(){var getObject,regs={undHash:/_|-/,colons:/::/,words:/([A-Z]+)([A-Z][a-z])/g,lowUp:/([a-z\d])([A-Z])/g,dash:/([a-z\d])([A-Z])/g,replacer:/\{([^\}]+)\}/g,dot:/\./},getNext=function(current,nextPart,add){return void 0!==current[nextPart]?current[nextPart]:add&&(current[nextPart]={})},isContainer=function(current){var type=typeof current;return current&&("function"==type||"object"==type)},str=$.String=$.extend($.String||{},{getObject:getObject=function(name,roots,add){var current,ret,i,parts=name?name.split(regs.dot):[],length=parts.length,r=0;
if(roots=$.isArray(roots)?roots:[roots||window],0==length)return roots[0];for(;current=roots[r++];){for(i=0;length-1>i&&isContainer(current);i++)current=getNext(current,parts[i],add);if(isContainer(current)&&(ret=getNext(current,parts[i],add),void 0!==ret))return add===!1&&delete current[parts[i]],ret}},capitalize:function(s){return s.charAt(0).toUpperCase()+s.substr(1)},camelize:function(s){return s=str.classize(s),s.charAt(0).toLowerCase()+s.substr(1)},classize:function(s,join){for(var parts=s.split(regs.undHash),i=0;i<parts.length;i++)parts[i]=str.capitalize(parts[i]);
return parts.join(join||"")},niceName:function(s){return str.classize(s," ")},underscore:function(s){return s.replace(regs.colons,"/").replace(regs.words,"$1_$2").replace(regs.lowUp,"$1_$2").replace(regs.dash,"_").toLowerCase()},sub:function(s,data,remove){var obs=[];return obs.push(s.replace(regs.replacer,function(whole,inside){var ob=getObject(whole,data,"boolean"==typeof remove?!remove:remove)||getObject(inside,data,"boolean"==typeof remove?!remove:remove),type=typeof ob;return"object"!==type&&"function"!==type||null===type?""+ob:(obs.push(ob),"")
})),obs.length<=1?obs[0]:obs},_regs:regs})}(),function(){$.String.rsplit=function(string,regex){for(var first_idx,last_idx,result=regex.exec(string),retArr=[];null!==result;)first_idx=result.index,last_idx=regex.lastIndex,0!==first_idx&&(retArr.push(string.substring(0,first_idx)),string=string.slice(first_idx)),retArr.push(result[0]),string=string.slice(result[0].length),result=regex.exec(string);return""!==string&&retArr.push(string),retArr}}(),function(){var digitTest=/^\d+$/,keyBreaker=/([^\[\]]+)|(\[\])/g,plus=/\+/g,paramTest=/([^?#]*)(#.*)?$/;
$.String=$.extend($.String||{},{deparam:function(params){if(!params||!paramTest.test(params))return{};for(var current,data={},pairs=params.split("&"),i=0;i<pairs.length;i++){current=data;var pair=pairs[i].split("=");2!=pair.length&&(pair=[pair[0],pair.slice(1).join("=")]);for(var key=decodeURIComponent(pair[0].replace(plus," ")),value=decodeURIComponent(pair[1].replace(plus," ")),parts=key.match(keyBreaker),j=0;j<parts.length-1;j++){var part=parts[j];current[part]||(current[part]=digitTest.test(parts[j+1])||"[]"==parts[j+1]?[]:{}),current=current[part]
}lastPart=parts[parts.length-1],"[]"==lastPart?current.push(value):current[lastPart]=value}return data}})}(),function(){var oldClean=$.cleanData;$.cleanData=function(elems){for(var elem,i=0;void 0!==(elem=elems[i]);i++)$(elem).triggerHandler("destroyed");oldClean(elems)}}(),function(){var oldClosest=$.fn.closest;$.fn.closest=function(selectors,context){var res,result,i,selector,selector,rooted={},rootedIsEmpty=!0,selectorsArr=selectors;if("string"==typeof selectors&&(selectorsArr=[selectors]),$.each(selectorsArr,function(i,selector){if(0==selector.indexOf(">")){if(-1!=selector.indexOf(" "))throw" closest does not work with > followed by spaces!";
rooted[selectorsArr[i]=selector.substr(1)]=selector,"string"==typeof selectors&&(selectors=selector.substr(1)),rootedIsEmpty=!1}}),res=oldClosest.call(this,selectors,context),rootedIsEmpty)return res;for(i=0;i<res.length;)result=res[i],selector=result.selector,void 0===rooted[selector]||(result.selector=rooted[selector],rooted[selector]=!1,"string"==typeof result.selector&&result.elem.parentNode===context)?i++:res.splice(i,1);return res}}(),function(){$.cookie=function(name,value,options){if("undefined"==typeof value){var cookieValue=null;
if(document.cookie&&""!=document.cookie)for(var cookies=document.cookie.split(";"),i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==name+"="){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}if(jQuery.evalJSON&&cookieValue&&cookieValue.match(/^\s*\{/))try{cookieValue=jQuery.evalJSON(cookieValue)}catch(e){}return cookieValue}options=options||{},null===value&&(value="",options.expires=-1),"object"==typeof value&&jQuery.toJSON&&(value=jQuery.toJSON(value));
var expires="";if(options.expires&&("number"==typeof options.expires||options.expires.toUTCString)){var date;"number"==typeof options.expires?(date=new Date,date.setTime(date.getTime()+1e3*60*60*24*options.expires)):date=options.expires,expires="; expires="+date.toUTCString()}var path=options.path?"; path="+options.path:"",domain=options.domain?"; domain="+options.domain:"",secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("")}}(),function(){var initializing=!1,makeArray=$.makeArray,isFunction=$.isFunction,isArray=$.isArray,extend=$.extend,getObject=$.String.getObject,concatArgs=function(arr,args){return arr.concat(makeArray(args))
},fnTest=/xyz/.test(function(){})?/\b_super\b/:/.*/,inheritProps=function(newProps,oldProps,addTo){addTo=addTo||newProps;for(var name in newProps)addTo[name]=isFunction(newProps[name])&&isFunction(oldProps[name])&&fnTest.test(newProps[name])?function(name,fn){return function(){var ret,tmp=this._super;return this._super=oldProps[name],ret=fn.apply(this,arguments),this._super=tmp,ret}}(name,newProps[name]):newProps[name]},STR_PROTOTYPE="prototype";clss=$.Class=function(){arguments.length&&clss.extend.apply(clss,arguments)
},extend(clss,{proxy:function(funcs){var self,args=makeArray(arguments);return funcs=args.shift(),isArray(funcs)||(funcs=[funcs]),self=this,function(){for(var isString,func,cur=concatArgs(args,arguments),length=funcs.length,f=0;length>f;f++)func=funcs[f],func&&(isString="string"==typeof func,isString&&self._set_called&&(self.called=func),cur=(isString?self[func]:func).apply(self,cur||[]),length-1>f&&(cur=!isArray(cur)||cur._use_call?[cur]:cur));return cur}},newInstance:function(){var args,inst=this.rawInstance();
return inst.setup&&(args=inst.setup.apply(inst,arguments)),inst.init&&inst.init.apply(inst,isArray(args)?args:arguments),inst},setup:function(baseClass){return this.defaults=extend(!0,{},baseClass.defaults,this.defaults),arguments},rawInstance:function(){initializing=!0;var inst=new this;return initializing=!1,inst},extend:function(fullName,klass,proto){function Class(){return initializing?void 0:this.constructor!==Class&&arguments.length?arguments.callee.extend.apply(arguments.callee,arguments):this.Class.newInstance.apply(this.Class,arguments)
}"string"!=typeof fullName&&(proto=klass,klass=fullName,fullName=null),proto||(proto=klass,klass=null),proto=proto||{};var name,shortName,namespace,prototype,_super_class=this,_super=this[STR_PROTOTYPE];initializing=!0,prototype=new this,initializing=!1,inheritProps(proto,_super,prototype);for(name in this)this.hasOwnProperty(name)&&(Class[name]=this[name]);if(inheritProps(klass,this,Class),fullName){var root;klass&&klass.root&&(root=klass.root,$.isString(root)&&(root=getObject(root,window,!0)));var parts=fullName.split(/\./),shortName=parts.pop(),current=getObject(parts.join("."),root||window,!0),namespace=current;
extend(!0,Class,current[shortName]),current[shortName]=Class}extend(Class,{prototype:prototype,namespace:namespace,shortName:shortName,constructor:Class,fullName:fullName}),Class[STR_PROTOTYPE].Class=Class[STR_PROTOTYPE].constructor=Class;var args=Class.setup.apply(Class,concatArgs([_super_class],arguments));return Class.init&&Class.init.apply(Class,args||concatArgs([_super_class],arguments)),Class}}),clss.callback=clss[STR_PROTOTYPE].callback=clss[STR_PROTOTYPE].proxy=clss.proxy}(),function(){var basicProcessor,bind=function(el,ev,callback){var wrappedCallback,binder=el.bind&&el.unbind?el:$(isFunction(el)?[el]:el);
return 0===ev.indexOf(">")&&(ev=ev.substr(1),wrappedCallback=function(event){event.target===el&&callback.apply(this,arguments)}),binder.bind(ev,wrappedCallback||callback),function(){binder.unbind(ev,wrappedCallback||callback),el=ev=callback=wrappedCallback=null}},makeArray=$.makeArray,isArray=$.isArray,isFunction=$.isFunction,isString=$.isString,extend=$.extend,Str=$.String,each=$.each,getObject=Str.getObject,STR_PROTOTYPE="prototype",STR_CONSTRUCTOR="constructor",slice=Array[STR_PROTOTYPE].slice,delegate=function(el,selector,ev,callback){0===selector.indexOf(">")&&(selector=(el.data("directSelector")+" "||"")+selector);
var binder=el.delegate&&el.undelegate?el:$(isFunction(el)?[el]:el);return binder.delegate(selector,ev,callback),function(){binder.undelegate(selector,ev,callback),binder=el=ev=callback=selector=null}},binder=function(el,ev,callback,selector){return selector?delegate(el,selector,ev,callback):bind(el,ev,callback)},shifter=function(context,name){var method="string"==typeof name?context[name]:name;return function(){return context.called=name,method.apply(context,[this.nodeName?$(this):this].concat(slice.call(arguments,0)))
}},dotsReg=/\./g,controllersReg=/_?controllers?/gi,underscoreAndRemoveController=function(className){return Str.underscore(className.replace($.globalNamespace+".","").replace(dotsReg,"_").replace(controllersReg,""))},actionMatcher=/^\S(.*)\s(.*)/,parameterReplacer=/\{([^\}]+)\}/g,controllerReplacer=/\{([^\.]+[\.][^\.]+)\}/g,breaker=/^(?:(.*?)\s)?([\w\.\:>]+)$/,data=function(el,data){return $.data(el,"controllers",data)},controllerRoot=$.globalNamespace+".Controller";$.Controller=function(name){var _prototype,args=makeArray(arguments),_static={root:controllerRoot};
return args.length>2?(_static=$.extend(_static,args[1]),_prototype=args[2]):_prototype=args[1],_static.namespace&&(name=_static.namespace+"."+name),$.Controller.Class(name,_static,_prototype)};var controllerClass=controllerRoot+".Class";$.Class(controllerClass,{setup:function(){if(this._super.apply(this,arguments),this.shortName&&this.fullName!=controllerClass){this._fullName=underscoreAndRemoveController(this.fullName),this._shortName=underscoreAndRemoveController(this.shortName);var funcName,controller=this;
if(isString(this.pluginName)){var _fullName=this._fullName,pluginname=this.pluginName;$.fn[pluginname]||($.fn[pluginname]=function(options){var args=makeArray(arguments);if($.isString(options)&&"controller"===options){var controllers=data(this[0]),instance=controllers&&controllers[_fullName];return instance}return this.each(function(){var controllers=data(this),instance=controllers&&controllers[_fullName];if(instance){if($.isString(options)){var method=instance[options];return $.isFunction(method)&&method.apply(instance,args.slice(1)),void 0
}instance.update.apply(instance,args)}else controller.newInstance.apply(controller,[this].concat(args))})})}var args=makeArray(arguments),prototype=this[STR_PROTOTYPE],protoFactory=args[args.length>3?3:2];isFunction(protoFactory)&&(this.protoFactory=protoFactory,prototype=this.protoFactory.call(this,null)),this.actions={};for(funcName in prototype)"constructor"!=funcName&&isFunction(prototype[funcName])&&this._isAction(funcName)&&(this.actions[funcName]=this._action(funcName));$.module("$:/Controllers/"+this.fullName).resolve(this)
}},hookup:function(el){return new this(el)},_isAction:function(methodName){return actionMatcher.test(methodName)?!0:$.inArray(methodName,this.listensTo)>-1||$.event.special[methodName]||processors[methodName]},_action:function(methodName,options){if(parameterReplacer.lastIndex=0,!options&&parameterReplacer.test(methodName))return null;methodName=methodName.replace("{self} ","");var convertedName=methodName;if(options){var bindingOtherController=!1;if(controllerReplacer.test(methodName)){var controller,selector="";
convertedName=methodName.replace(controllerReplacer,function(whole,inside){var parts=inside.split(".");return controller=options["{"+parts[0]+"}"]||{},$.isControllerInstance(controller)&&(selector=(controller[parts[1]]||{}).selector),selector}).match(breaker),bindingOtherController=!!selector,convertedName=[controller.element].concat(convertedName||[])}bindingOtherController||(convertedName=Str.sub(methodName,[options,window]))}var arr=isArray(convertedName),parts=(arr?convertedName[1]:convertedName).match(breaker),event=parts[2],processor=processors[event]||basicProcessor;
return{processor:processor,parts:parts,delegate:arr?convertedName[0]:void 0}},processors:{},listensTo:[],defaults:{},hostname:"parent"},{setup:function(elem,options){var instance=this,Class=instance[STR_CONSTRUCTOR],prototype=instance[STR_PROTOTYPE],_fullName=Class._fullName;instance.instanceId=$.uid(_fullName+"_");var instanceOptions=instance.options=extend(!0,{},Class.defaults,Class.defaultOptions,options),element=instance.element=$(elem);if(Class.protoFactory&&(prototype=Class.protoFactory.apply(Class,[instance,instanceOptions,element]),extend(!0,instance,prototype)),(data(elem)||data(elem,{}))[_fullName]=instance,!element.data("directSelector")){var selector=$.uid("DS");
element.addClass(selector).data("directSelector","."+selector)}for(name in instanceOptions)if(name.match(/^\{.+\}$/)){var key=name.replace(/^\{|\}$/g,""),val=instanceOptions[name];instance[key]=isString(val)?function(instance,selector,funcName){selector=/^(\.|\#)$/.test(selector)?selector+funcName:selector;var selectorFunc=function(filter){var elements=instance.element.find(selector);return filter&&(elements=elements.filter(filter)),elements};return selectorFunc.selector=selector,selectorFunc.css=function(){var cssRule=selectorFunc.cssRule;
if(!cssRule){var directSelector=element.data("directSelector"),ruleSelector=$.map(selector.split(","),function(selector){return directSelector+" "+selector});cssRule=selectorFunc.cssRule=$.cssRule(ruleSelector),cssRule.important=!0}return arguments.length?cssRule.css.apply(cssRule,arguments):cssRule},selectorFunc}(instance,val,key):val}var views=instanceOptions.view,__view=instance.view;instance.view=function(){return __view.apply(this,arguments)},each(views||{},function(name){instance.view[name]=function(useHtml){var args=makeArray(arguments);
return $.isBoolean(useHtml)?args=args.slice(1):useHtml=!1,instance.view.apply(instance,[useHtml,name].concat(args))}}),$.extend(instance,instanceOptions.controller),instance.pluginInstances={},instance.called="init",instance._bind();var __init=instance.init||$.noop;return instance.init=function(){return instance.init=__init,result=__init.apply(instance,arguments),instance.trigger("init."+Class.fullName.toLowerCase(),[instance]),result},[element,instanceOptions].concat(makeArray(arguments).slice(2))},on:function(eventName){var args=makeArray(arguments),element=this.element,length=args.length;
return 2==length?this._binder(element,eventName,args[1]):3==length&&isString(args[1])?this._binder(element,eventName,args[2],args[1]):this._binder(args[1],eventName,args[2])},_bind:function(){var instance=this,Class=instance[STR_CONSTRUCTOR],actions=Class.actions,bindings=instance._bindings=[],element=instance.element;each(actions||{},function(name){if(actions.hasOwnProperty(name)){var ready=Class.actions[name]||Class._action(name,instance.options);$.isControllerInstance(ready.delegate)&&(ready.delegate=ready.delegate.element),bindings.push(ready.processor(ready.delegate||element,ready.parts[2],ready.parts[1],name,instance))
}});var destroyCB=shifter(this,"destroy");return element.bind("destroyed",destroyCB),bindings.push(function(el){$(el).unbind("destroyed",destroyCB)}),bindings.length},_binder:function(el,eventName,func,selector){return"string"==typeof func&&(func=shifter(this,func)),this._bindings.push(binder(el,eventName,func,selector)),this._bindings.length},_unbind:function(){var el=this.element[0];each(this._bindings,function(key,value){value(el)}),this._bindings=[]},trigger:function(name){var el=this.element;if(el){var event=$.Event(name);
return el.trigger.apply(el,[event].concat($.makeArray(arguments).slice(1))),event}},delegate:function(element,selector,eventName,func){return"string"==typeof element&&(func=eventName,eventName=selector,selector=element,element=this.element),this._binder(element,eventName,func,selector)},update:function(options){extend(this.options,options),this._unbind(),this._bind()},destroy:function(){if(!this._destroyed){var fname=this[STR_CONSTRUCTOR]._fullName;for(pname in this.pluginInstances)this.removePlugin(pname);this._destroyed=!0,this.element.removeClass(fname),this._unbind(),delete this._actions,delete this.element.data("controllers")[fname],$(this).triggerHandler("destroyed"),this.element=$()
}},find:function(selector){return this.element.find(selector)},view:function(){var name,args=makeArray(arguments),options=args,useHtml=!1,context=this[STR_CONSTRUCTOR].component||$,html="",view=this.options.view||{};return"boolean"==typeof args[0]&&(useHtml=args[0],options=args.slice(1)),name=options[0]=view[options[0]],void 0==name?useHtml?"":$(""):(html=context.View.apply(context,options),useHtml?html:$($.parseHTML($.trim(html))))},getPlugin:function(name){return this.pluginInstances[name]},addSubscriber:function(instance){var instances=$.isArray(instance)?instance:[instance||{}],host=this,hostname=this.Class.hostname,options={};
return options["{"+hostname+"}"]=host,$.map(instances,function(instance){return $.isControllerInstance(instance)?instance.options[hostname]===this?instance:(instance[hostname]=host,instance.update(options)):!1}),instances},addPlugin:function(name,plugin,options){if(name){(!plugin&&!options||$.isPlainObject(plugin))&&(options=plugin,plugin=[this.Class.root,this.Class.fullName,$.String.capitalize(name)].join(".")),$.isString(plugin)&&(plugin=$.getController(plugin));var isPluginInstance=$.isControllerInstance(plugin);
if(isFunction(plugin)||isPluginInstance){options=$.extend(!0,{element:this.element},options,(this.options.plugin||{})[name]||{});var type=isPluginInstance?"instance":$.isController(plugin)?"controller":"function";this.trigger("addPlugin",[name,plugin,options,type]);var hostname=this.Class.hostname;options["{"+hostname+"}"]=this;var pluginInstance;switch(type){case"instance":pluginInstance=plugin,plugin.update(options),plugin[hostname]=this;break;case"controller":pluginInstance=options.element.addController(plugin,options);
break;case"function":pluginInstance=plugin(this,options)}if(pluginInstance){if(this.pluginInstances[name]=pluginInstance,"function"!==type){var hostOptions={};hostOptions["{"+name+"}"]=pluginInstance,this.update(hostOptions)}return this.trigger("registerPlugin",[name,pluginInstance,options,type]),pluginInstance}}}},removePlugin:function(name){var plugin=this.getPlugin(name);if(plugin)return this.trigger("removePlugin",[name,plugin]),delete this.pluginInstances[name],$.isFunction(plugin.destroy)?plugin.destroy():null
},invokePlugin:function(name,method,args){var plugin=this.getPlugin(name);if(plugin&&$.isFunction(plugin[method]))return this.trigger("invokePlugin",[name,plugin,args]),plugin[method].apply(this,args)},getMessageGroup:function(){var messageGroup=$.isFunction(this.messageGroup)?this.messageGroup():this.element.find("[data-message-group]");return messageGroup.length<1&&(messageGroup=$("<div data-message-group></div>").prependTo(this.element)),messageGroup},setMessage:function(message,type){var defaultOptions={type:"warning",message:"",parent:this.getMessageGroup(),element:$('<div class="alert fade in"><button type="button" class="close" data-foundry-dismiss="alert">×</button></div>')},userOptions={},isDeferred=$.isDeferred(message);
userOptions=$.isPlainObject(message)&&!isDeferred?message:{message:message,type:type||"warning"};var options=$.extend({},defaultOptions,userOptions),element=options.element;if($.isDeferred(message)){var myself=arguments.callee,context=this;message.done(function(message,type){options.message=message,options.type=type||"warning",myself.call(context,options),element.show()})}else element.addClass("alert-"+options.type).append(options.message),$("html").has(element).length<1&&element.appendTo(options.parent);return element
},clearMessage:function(){this.getMessageGroup().empty()},_set_called:!0});var processors=$.Controller.Class.processors,basicProcessor=function(el,event,selector,methodName,controller){return binder(el,event,shifter(controller,methodName),selector)};each("change click contextmenu dblclick keydown keyup keypress mousedown mousemove mouseout mouseover mouseup reset resize scroll select submit focusin focusout mouseenter mouseleave".split(" "),function(i,v){processors[v]=basicProcessor});var normalizeController=function(controller){return controller.replace("$.Controller",controllerRoot)
},getController=function(controller){return isString(controller)&&(controller=normalizeController(controller),controller=getObject(controller)||getObject(controllerRoot+"."+controller)),isController(controller)?controller:void 0},isController=function(controller){return isFunction(controller)&&controller.hasOwnProperty("_fullName")},flattenControllers=function(controllers){return $.map(controllers,function(controller){return isArray(controller)?flattenControllers(controller):getController(controller)})};$.getController=getController,$.isController=function(controller){return!!getController(controller)
},$.isControllerInstance=function(instance){return instance&&instance[STR_CONSTRUCTOR]&&isController(instance[STR_CONSTRUCTOR])},$.isControllerOf=function(instance,controllers){if(!controllers)return!1;isArray(controllers)||(controllers=[controllers]);for(var i=0;i<controllers.length;i++){var controller=getController(controllers[i]);if(instance instanceof controller)return!0}return!1},$.fn.extend({controllers:function(){var candidates=flattenControllers(makeArray(arguments)),instances=[];return this.each(function(){var controllers=$.data(this,"controllers");
each(controllers||{},function(_fullName,instance){controllers.hasOwnProperty(_fullName)&&(!candidates.length||$.isControllerOf(instance,candidates))&&instances.push(instance)})}),instances},controller:function(controller,options){return void 0===options?this.controllers(controller)[0]:(this.addController.apply(this,arguments),this)},hasController:function(controller){var _fullName=(getController(controller)||{})._fullName||(isString(controller)?underscoreAndRemoveController(normalizeController(controller)):"");
return _fullName?($(this).data("controllers")||{}).hasOwnProperty(_fullName):!1},addController:function(controller,options,callback){var Controller=getController(controller);if(Controller){var instances=[];return this.each(function(){if(1===this.nodeType&&"SCRIPT"!=this.nodeName){var existingInstance=$(this).controller(controller);if(existingInstance)return instances.push(existingInstance),void 0;var instance=new Controller(this,options);isFunction(callback)&&callback.apply(instance,[$(this),instance]),instances.push(instance)
}}),instances.length>1?instances:instances[0]}},removeController:function(controller){return this.each(function(){for(var instances=$(this).controllers(controller);instances.length;)instances.shift().destroy()}),this},addControllerWhenAvailable:function(controller){var elements=this,args=arguments,task=$.Deferred();return $.isController(controller)&&(controller=controller.fullName),isString(controller)?($.module("$:/Controllers/"+controller).pipe(function(){var instance=elements.addController.apply(elements,args);
task.resolveWith(instance,[elements,instance])},task.reject,task.fail),task):task.reject()},implement:function(){return this.addController.apply(this,arguments),this}})}(),function(){var toId=function(src){return src.replace(/^\/\//,"").replace(/[\/\.]/g,"_")},makeArray=$.makeArray,id=1,$view=$.View=function(view,data,helpers,callback){"function"==typeof helpers&&(callback=helpers,helpers=void 0);var deferreds=getDeferreds(data);if(deferreds.length){var deferred=$.Deferred();return deferreds.push(get(view,!0)),$.when.apply($,deferreds).then(function(resolved){var result,objs=makeArray(arguments),renderer=objs.pop()[0];
if(isDeferred(data))data=usefulPart(resolved);else for(var prop in data)isDeferred(data[prop])&&(data[prop]=usefulPart(objs.shift()));result=renderer(data,helpers),deferred.resolve(result),callback&&callback(result)}),deferred.promise()}var response,async="function"==typeof callback,deferred=get(view,async);return async?(response=deferred,deferred.done(function(renderer){callback(renderer(data,helpers))})):deferred.done(function(renderer){response=renderer(data,helpers)}),response},checkText=function(text,url){if(!text.match(/[^\s]/))throw"$.View ERROR: There is no template or an empty template at "+url
},get=function(url,async){return $.ajax({url:url,dataType:"view",async:async})},isDeferred=function(obj){return obj&&$.isFunction(obj.always)},getDeferreds=function(data){var deferreds=[];if(isDeferred(data))return[data];for(var prop in data)isDeferred(data[prop])&&deferreds.push(data[prop]);return deferreds},usefulPart=function(resolved){return $.isArray(resolved)&&3===resolved.length&&"success"===resolved[1]?resolved[0]:resolved};$.ajaxTransport("view",function(options,orig){var type,el,id,jqXHR,url=orig.url,suffix=url.match(/\.[\w\d]+$/),response=function(text){var func=type.renderer(id,text);
return $view.cache&&($view.cached[id]=func),{view:func}};if((el=document.getElementById(url))&&(suffix="."+el.type.match(/\/(x\-)?(.+)/)[2]),suffix||(suffix=$view.ext,url+=$view.ext),id=toId(url),url.match(/^\/\//)){var sub=url.substr(2);url="undefined"==typeof steal?url="/"+sub:steal.root.mapJoin(sub)+""}type=$view.types[suffix];var template=$.template()[orig.url];return{send:function(headers,callback){return template?(type=$view.types["."+template.type],callback(200,"success",response(template.content))):$view.cached[id]?callback(200,"success",{view:$view.cached[id]}):(el?callback(200,"success",response(el.innerHTML)):jqXHR=$.ajax({async:orig.async,url:url,dataType:"text",error:function(){checkText("",url),callback(404)
},success:function(text){checkText(text,url),callback(200,"success",response(text))}}),void 0)},abort:function(){jqXHR&&jqXHR.abort()}}}),$.extend($view,{hookups:{},hookup:function(cb){var myid=++id;return $view.hookups[myid]=cb,myid},cached:{},cache:!0,register:function(info){this.types["."+info.suffix]=info,window.steal&&steal.type(info.suffix+" view js",function(options,success){var type=$view.types["."+options.type],id=toId(options.rootSrc+"");options.text=type.script(id,options.text),success()})},types:{},ext:".ejs",registerScript:function(type,id,src){return"$.View.preload('"+id+"',"+$view.types["."+type].script(id,src)+");"
},preload:function(id,renderer){$view.cached[id]=function(data,helpers){return renderer.call(data,data,helpers)}}}),window.steal&&steal.type("view js",function(options,success){var type=$view.types["."+options.type],id=toId(options.rootSrc+"");options.text="steal('"+(type.plugin||"jquery/view/"+options.type)+"').then(function($){"+"$.View.preload('"+id+"',"+options.text+");\n})",success()});var convert,modify,isTemplate,isHTML,isDOM,getCallback,hookupView,noHookup={val:!0,text:!0};convert=function(func_name){var old=$.fn[func_name];
$.fn[func_name]=function(){var callbackNum,callback,result,args=makeArray(arguments),self=this;if(isDeferred(args[0]))return args[0].done(function(res){modify.call(self,[res],old)}),this;if(isTemplate(args)){if(callbackNum=getCallback(args))return callback=args[callbackNum],args[callbackNum]=function(result){modify.call(self,[result],old),callback.call(self,result)},$view.apply($view,args),this;if(result=$view.apply($view,args),isDeferred(result))return result.done(function(res){modify.call(self,[res],old)}),this;
args=[result]}return noHookup[func_name]?old.apply(this,args):modify.call(this,args,old)}},modify=function(args,old){var res,hooks;for(var hasHookups in $view.hookups)break;return hasHookups&&args[0]&&isHTML(args[0])&&(hooks=$view.hookups,$view.hookups={},args[0]=$(args[0])),res=old.apply(this,args),hooks&&hookupView(args[0],hooks),res},isTemplate=function(args){var secArgType=typeof args[1];return"string"==typeof args[0]&&("object"==secArgType||"function"==secArgType)&&!isDOM(args[1])},isDOM=function(arg){return arg.nodeType||arg.jquery
},isHTML=function(arg){return isDOM(arg)?!0:"string"==typeof arg?(arg=$.trim(arg),"<"===arg.substr(0,1)&&">"===arg.substr(arg.length-1,1)&&arg.length>=3):!1},getCallback=function(args){return"function"==typeof args[3]?3:"function"==typeof args[2]&&2},hookupView=function(els,hooks){var hookupEls,len,id,func,i=0;for(els=els.filter(function(){return 3!=this.nodeType}),hookupEls=els.add("[data-view-id]",els),len=hookupEls.length;len>i;i++)hookupEls[i].getAttribute&&(id=hookupEls[i].getAttribute("data-view-id"))&&(func=hooks[id])&&(func(hookupEls[i],id),delete hooks[id],hookupEls[i].removeAttribute("data-view-id"));
$.extend($view.hookups,hooks)},$.fn.hookup=function(){var hooks=$view.hookups;return $view.hookups={},hookupView(this,hooks),this},$.each(["prepend","append","after","before","text","html","replaceWith","val"],function(i,func){convert(func)})}(),function(){var myEval=function(script){eval(script)},rSplit=$.String.rsplit,extend=$.extend,isArray=$.isArray,returnReg=/\r\n/g,retReg=/\r/g,newReg=/\n/g,nReg=/\n/,slashReg=/\\/g,quoteReg=/"/g,singleQuoteReg=/'/g,tabReg=/\t/g,leftBracket=/\{/g,rightBracket=/\}/g,quickFunc=/\s*\(([\$\w]+)\)\s*->([^\n]*)/,clean=function(content){return content.replace(slashReg,"\\\\").replace(newReg,"\\n").replace(quoteReg,'\\"').replace(tabReg,"\\t")
},escapeHTML=function(content){return content.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(quoteReg,"&#34;").replace(singleQuoteReg,"&#39;")},$View=$.View,bracketNum=function(content){var lefts=content.match(leftBracket),rights=content.match(rightBracket);return(lefts?lefts.length:0)-(rights?rights.length:0)},EJS=function(options){if(this.constructor!=EJS){var ejs=new EJS(options);return function(data,helpers){return ejs.render(data,helpers)}}return"function"==typeof options?(this.template={fn:options},void 0):(extend(this,EJS.options,options),this.template=compile(this.text,this.type,this.name),void 0)
};$&&($.EJS=EJS),EJS.prototype.render=function(object,extraHelpers){object=object||{},this._extra_helpers=extraHelpers;var v=new EJS.Helpers(object,extraHelpers||{});return this.template.fn.call(object,object,v)},extend(EJS,{text:function(input){if("string"==typeof input)return input;if(null===input||void 0===input)return"";var hook=input.hookup&&function(el,id){input.hookup.call(input,el,id)}||"function"==typeof input&&input||isArray(input)&&function(el,id){for(var i=0;i<input.length;i++)input[i].hookup?input[i].hookup(el,id):input[i](el,id)
};return hook?"data-view-id='"+$View.hookup(hook)+"'":input.toString?input.toString():""},clean:function(text){return"string"==typeof text?escapeHTML(text):"number"==typeof text?text:EJS.text(text)},options:{type:"[",ext:".ejs"}});var scan=function(scanner,source,block){for(var source_split=rSplit(source,nReg),i=0;i<source_split.length;i++)scanline(scanner,source_split[i],block)},scanline=function(scanner,line,block){scanner.lines++;for(var token,line_split=rSplit(line,scanner.splitter),i=0;i<line_split.length;i++)token=line_split[i],null!==token&&block(token,scanner)
},makeScanner=function(left,right){var scanner={};return extend(scanner,{left:left+"%",right:"%"+right,dLeft:left+"%%",dRight:"%%"+right,eeLeft:left+"%==",eLeft:left+"%=",cmnt:left+"%#",cleanLeft:left+"%~",scan:scan,lines:0}),scanner.splitter=new RegExp("("+[scanner.dLeft,scanner.dRight,scanner.eeLeft,scanner.eLeft,scanner.cmnt,scanner.left,scanner.right+"\n",scanner.right,"\n"].join(")|(").replace(/\[/g,"\\[").replace(/\]/g,"\\]")+")"),scanner},compile=function(source,left){source=source.replace(returnReg,"\n").replace(retReg,"\n"),left=left||"[";
var put_cmd="___v1ew.push(",insert_cmd=put_cmd,startTxt="var ___v1ew = [];",finishTxt="return ___v1ew.join('')",buff=new EJS.Buffer([startTxt],[]),content="",put=function(content){buff.push(put_cmd,'"',clean(content),'");')},startTag=null,empty=function(){content=""},doubleParen="));",endStack=[];scan(makeScanner(left,"["===left?"]":">"),source||"",function(token,scanner){var bn;if(null===startTag)switch(token){case"\n":content+="\n",put(content),buff.cr(),empty();break;case scanner.left:case scanner.eLeft:case scanner.eeLeft:case scanner.cmnt:startTag=token,content.length>0&&put(content),empty();
break;case scanner.dLeft:content+=scanner.left;break;default:content+=token}else switch(token){case scanner.right:switch(startTag){case scanner.left:bn=bracketNum(content);var last=endStack.length&&-1==bn?endStack.pop():";";last===doubleParen&&buff.push(finishTxt),buff.push(content,last),1===bn&&endStack.push(";");break;case scanner.eLeft:if(bn=bracketNum(content),bn&&endStack.push(doubleParen),quickFunc.test(content)){var parts=content.match(quickFunc);content="function(__){var "+parts[1]+"=$(__);"+parts[2]+"}"
}buff.push(insert_cmd,$.globalNamespace+".EJS.clean(",content,bn?startTxt:doubleParen);break;case scanner.eeLeft:bn=bracketNum(content),bn&&endStack.push(doubleParen),buff.push(insert_cmd,$.globalNamespace+".EJS.text(",content,bn?startTxt:doubleParen)}startTag=null,empty();break;case scanner.dRight:content+=scanner.right;break;default:content+=token}}),content.length>0&&buff.push(put_cmd,'"',clean(content)+'");');var template=buff.close(),out={out:"try { with(_VIEW) { with (_CONTEXT) {"+template+" "+finishTxt+"}}}catch(e){e.lineNumber=null;throw e;}"};
return myEval.call(out,"this.fn = (function(_CONTEXT,_VIEW){ var $ = "+$.globalNamespace+";"+out.out+"});"),out};EJS.Buffer=function(pre_cmd,post){this.line=[],this.script=[],this.post=post,this.push.apply(this,pre_cmd)},EJS.Buffer.prototype={push:function(){this.line.push.apply(this.line,arguments)},cr:function(){this.script.push(this.line.join(""),"\n"),this.line=[]},close:function(){return this.line.length>0&&(this.script.push(this.line.join("")),this.line=[]),this.post.length&&this.push.apply(this,this.post),this.script.push(";"),this.script.join("")
}},EJS.Helpers=function(data,extras){this._data=data,this._extras=extras,extend(this,extras)},EJS.Helpers.prototype={plugin:function(){var args=$.makeArray(arguments),widget=args.shift();return function(el){var jq=$(el);jq[widget].apply(jq,args)}},view:function(url,data,helpers){return helpers=helpers||this._extras,data=data||this._data,$View(url,data,helpers)}},$View.register({suffix:"ejs",script:function(id,src){return $.globalNamespace+".EJS(function(_CONTEXT,_VIEW) { "+new EJS({text:src,name:id}).template.out+" })"
},renderer:function(id,text){return EJS({text:text,name:id})}})}(),function(){var isArray=$.isArray,isObject=function(obj){return"object"==typeof obj&&null!==obj&&obj},makeArray=$.makeArray,each=$.each,hookup=function(val,prop,parent){return val instanceof $.Observe?unhookup([val],parent._namespace):val=isArray(val)?new $.Observe.List(val):new $.Observe(val),val.bind("change"+parent._namespace,function(ev){var args=$.makeArray(arguments),ev=args.shift();args[0]="*"===prop?parent.indexOf(val)+"."+args[0]:prop+"."+args[0],$.event.trigger(ev,args,parent)
}),val},unhookup=function(items,namespace){for(var item,i=0;i<items.length;i++)item=items[i],item&&item.unbind&&item.unbind("change"+namespace)},id=0,collecting=null,collect=function(){return collecting?void 0:(collecting=[],!0)},trigger=function(item,event,args){return item._init?void 0:collecting?(collecting.push({t:item,ev:event,args:args}),void 0):$.event.trigger(event,args,item,!0)},batchNum=0,sendCollection=function(){var cur,len=collecting.length,items=collecting.slice(0);collecting=null,batchNum++;for(var i=0;len>i;i++)cur=items[i],$.event.trigger({type:cur.ev,batchNum:batchNum},cur.args,cur.t)
},serialize=function(observe,how,where){return observe.each(function(name,val){where[name]=isObject(val)&&"function"==typeof val[how]?val[how]():val}),where};$.Class($.globalNamespace+".Observe",{init:function(obj){this._data={},this._namespace=".observe"+ ++id,this._init=!0,this.attrs(obj),delete this._init},attr:function(attr,val){return void 0===val?this._get(attr):(this._set(attr,val),this)},each:function(){return each.apply(null,[this.__get()].concat(makeArray(arguments)))},removeAttr:function(attr){var parts=isArray(attr)?attr:attr.split("."),prop=parts.shift(),current=this._data[prop];
return parts.length?current.removeAttr(parts):(delete this._data[prop],trigger(this,"change",[prop,"remove",void 0,current]),current)},_get:function(attr){var parts=isArray(attr)?attr:(""+attr).split("."),current=this.__get(parts.shift());return parts.length?current?current._get(parts):void 0:current},__get:function(attr){return attr?this._data[attr]:this._data},_set:function(attr,value){var parts=isArray(attr)?attr:(""+attr).split("."),prop=parts.shift(),current=this.__get(prop);if(isObject(current)&&parts.length)current._set(parts,value);
else{if(parts.length)throw"jQuery.Observe: set a property on an object that does not exist";if(value!==current){var changeType=this.__get().hasOwnProperty(prop)?"set":"add";this.__set(prop,isObject(value)?hookup(value,prop,this):value),trigger(this,"change",[prop,changeType,value,current]),current&&unhookup([current],this._namespace)}}},__set:function(prop,val){this._data[prop]=val,prop in this.constructor.prototype||(this[prop]=val)},bind:function(){return $.fn.bind.apply($([this]),arguments),this},unbind:function(){return $.fn.unbind.apply($([this]),arguments),this
},serialize:function(){return serialize(this,"serialize",{})},attrs:function(props,remove){if(void 0===props)return serialize(this,"attrs",{});props=$.extend(!0,{},props);var prop,collectingStarted=collect();for(prop in this._data){var curVal=this._data[prop],newVal=props[prop];void 0!==newVal?(isObject(curVal)&&isObject(newVal)?curVal.attrs(newVal,remove):curVal!=newVal&&this._set(prop,newVal),delete props[prop]):remove&&this.removeAttr(prop)}for(var prop in props)newVal=props[prop],this._set(prop,newVal);collectingStarted&&sendCollection()
}});var list=$.Observe($.globalNamespace+".Observe.List",{init:function(instances,options){this.length=0,this._namespace=".list"+ ++id,this._init=!0,this.bind("change",this.proxy("_changes")),this.push.apply(this,makeArray(instances||[])),$.extend(this,options),this.comparator&&this.sort(),delete this._init},_changes:function(ev,attr,how,newVal,oldVal){if(this.comparator&&/^\d+./.test(attr)){var index=+/^\d+/.exec(attr)[0],item=this[index],newIndex=this.sortedIndex(item);if(newIndex!==index)return[].splice.call(this,index,1),[].splice.call(this,newIndex,0,item),trigger(this,"move",[item,newIndex,index]),ev.stopImmediatePropagation(),trigger(this,"change",[attr.replace(/^\d+/,newIndex),how,newVal,oldVal]),void 0
}-1===attr.indexOf(".")&&("add"===how?trigger(this,how,[newVal,+attr]):"remove"===how&&trigger(this,how,[oldVal,+attr]))},sortedIndex:function(item){for(var i,itemCompare=item.attr(this.comparator),equaled=0,i=0;i<this.length;i++)if(item!==this[i]){if(itemCompare<=this[i].attr(this.comparator))return i+equaled}else equaled=-1;return i+equaled},__get:function(attr){return attr?this[attr]:this},__set:function(attr,val){this[attr]=val},serialize:function(){return serialize(this,"serialize",[])},splice:function(index,count){var i,args=makeArray(arguments);
for(i=2;i<args.length;i++){var val=args[i];isObject(val)&&(args[i]=hookup(val,"*",this))}void 0===count&&(count=args[1]=this.length-index);var removed=[].splice.apply(this,args);return count>0&&(trigger(this,"change",[""+index,"remove",void 0,removed]),unhookup(removed,this._namespace)),args.length>2&&trigger(this,"change",[""+index,"add",args.slice(2),removed]),removed},attrs:function(props,remove){if(void 0===props)return serialize(this,"attrs",[]);props=props.slice(0);for(var len=Math.min(props.length,this.length),collectingStarted=collect(),prop=0;len>prop;prop++){var curVal=this[prop],newVal=props[prop];
isObject(curVal)&&isObject(newVal)?curVal.attrs(newVal,remove):curVal!=newVal&&this._set(prop,newVal)}props.length>this.length?this.push(props.slice(this.length)):props.length<this.length&&remove&&this.splice(props.length),collectingStarted&&sendCollection()},sort:function(method,silent){var comparator=this.comparator,args=comparator?[function(a,b){return a=a[comparator],b=b[comparator],a===b?0:b>a?-1:1}]:[];[].sort.apply(this,args),!silent&&trigger(this,"reset")}}),getArgs=function(args){return args[0]&&$.isArray(args[0])?args[0]:makeArray(args)
};each({push:"length",unshift:0},function(name,where){list.prototype[name]=function(){for(var args=getArgs(arguments),len=where?this.length:0,i=0;i<args.length;i++){var val=args[i];isObject(val)&&(args[i]=hookup(val,"*",this))}if(1==args.length&&this.comparator){var index=this.sortedIndex(args[0]);return this.splice(index,0,args[0]),this.length}var res=[][name].apply(this,args);return this.comparator&&args.length>1?(this.sort(null,!0),trigger(this,"reset",[args])):trigger(this,"change",[""+len,"add",args,void 0]),res
}}),each({pop:"length",shift:0},function(name,where){list.prototype[name]=function(){var args=getArgs(arguments),len=where&&this.length?this.length-1:0,res=[][name].apply(this,args);return trigger(this,"change",[""+len,"remove",void 0,[res]]),res&&res.unbind&&res.unbind("change"+this._namespace),res}}),list.prototype.indexOf=[].indexOf||function(item){return $.inArray(item,this)},$.O=function(data,options){return isArray(data)||data instanceof $.Observe.List?new $.Observe.List(data,options):new $.Observe(data,options)
}}()}),FD31.plugin("joomla",function($){var parser={squeezebox:function(){return self.isJoomla15?window.parent.document.getElementById("sbox-window"):window.parent.SqueezeBox}},self=$.Joomla=function(method,args){if($.isFunction(args)){var fn=args;return self.isJoomla15?window[method]=fn:window.Joomla[method]=fn,void 0}var method=parser[method]||(self.isJoomla15?window[method]:window.Joomla[method]);return $.isFunction(method)?method.apply(window,args):void 0},version=parseFloat($.joomla.version);self.isJoomla15=1.5>=version,self.isJoomla25=version>=1.6&&2.5>=version,self.isJoomla30=version>=3
}),FD31.plugin("module",function($){var Module=function(name){var module=this,ready=$.Callbacks("once memory");$.extend(this,$.Deferred(),{name:name,status:"pending",ready:function(fn){fn===!0&&ready.fire.call(module,$),$.isFunction(fn)&&ready.add(fn)}}),module.then(function(){module.exports=this,module.status="resolved"},function(){module.status="rejected"});var done=module.done;module.done=function(){module.required=!0;var factory=module.factory;return factory&&"ready"===module.status&&factory.call(module,$),module.done=done,module.done.apply(this,arguments)
}};$.module=function(){var self=function(name,factory){var module;if("string"==typeof name){if(module=self.get(name),void 0===factory)return module;if($.isFunction(factory))return"resolved"==module.status?module:(module.factory=factory,module.status="ready",module.ready("true"),module.required&&(module.status="executing",factory.call(module,$)),module)}if($.isArray(name)){var tasks=$.map(name,function(task){var module=self.get($.isString(task)?task:task.name);if(module)return"pending"===module.status&&(module.status="ready"),$.isPlainObject(task)?task:void 0
});$.each(tasks,function(i,task){self(task.name,task.factory)})}};return $.extend(self,{registry:{},get:function(name){return name?($.isModule(name)&&(name=name.replace("module://","")),self.registry[name]||self.create(name)):void 0},create:function(name){return self.registry[name]=new Module(name)},remove:function(name){delete self.registry[name]}}),self}(),$.isModule=function(module){return $.isString(module)?!!module.match("module://"):module&&module instanceof Module}}),FD31.plugin("script",function($){$.script=function(){var self=function(options){if(void 0!==options){"string"==typeof options&&(options={url:options});
var script=new Script(options);return script}},Script=function(options){var script=$.extend(this,options);script.manager=$.Deferred(),$.extend(script,script.manager.promise()),script.load()},head=document.getElementsByTagName("head")[0];return document.getElementsByTagName("base")[0],$.extend(Script.prototype,{timeout:7e3,retry:3,retryCount:1,type:"text/javascript",async:!1,charset:"UTF-8",verbose:!1,insert:function(){var node=this.node;head.appendChild(node)},remove:function(){var node=this.node;setTimeout(function(){node.onload=node.onerror=node.onreadystatechange=null;
try{head.removeChild(node)}catch(e){}},1e3)},load:function(){var node,script=this;script.endTime=void 0,script.startTime=new Date,script.node=node=document.createElement("script"),script.insert(),script._ready=$.proxy(script.ready,script),script._error=$.proxy(script.error,script),node.attachEvent&&!$.browser.opera?(node.attachEvent("onreadystatechange",script._ready),node.attachEvent("onerror",script._error)):(node.addEventListener("load",script._ready,!1),node.addEventListener("error",script._error,!1)),$(node).attr({type:script.type,async:script.async,charset:script.charset,src:script.url}),script.monitor()
},monitor:function(){var script=this;return script.retryCount>script.retry?(script._error(),void 0):(setTimeout(function(){"resolved"!==script.state()&&(script.verbose&&console.warn("$.script: Load timeout. [Retry: "+script.retryCount+"]",script),script.remove(),script.retryCount++,script.load())},script.timeout*script.retryCount),void 0)},ready:function(event){var script=this,node=script.node;("load"===event.type||/loaded|complete/.test(node.readyState))&&(script.complete.call(script,event),script.manager.resolve(script))
},error:function(event){var script=this;script.verbose&&console.error("$.script: Unable to load ",script),script.complete.call(script,event),script.remove(),script.manager.reject(script)},complete:function(){var script=this,node=script.node;script.endTime=new Date,node.detachEvent&&!$.browser.opera?(node.detachEvent("onreadystatechange",script._ready),node.detachEvent("onerror",script._error)):(node.removeEventListener("load",script._ready,!1),node.removeEventListener("error",script._error,!1))}}),self}()}),FD31.plugin("stylesheet",function($){var head=document.getElementsByTagName("head")[0],stylesheets=document.styleSheets,IE_STYLESHEET=document.createStyleSheet,IE_MAX_STYLESHEET=31,IE_MAX_IMPORT=31,IE_MAX_RULE=4095;
$.stylesheet=function(){var self=function(url,attr){var options={};return $.extend(options,self.defaultOptions,$.isPlainObject(url)?url:{url:url,attr:attr||{}}),void 0===options.url?self.create(options):self.load(options)};return $.extend(self,{defaultOptions:{type:"text/css",rel:"stylesheet",media:"all",title:"",forceInject:!1,xhr:!1},setup:function(options){$.extend(self.defaultOptions,options)},availability:function(){var stat={},links=$('link[rel*="stylesheet"]');return styles=$("style"),stat.groups=IE_MAX_STYLESHEET-links.length-styles.length,stat.slots=stat.groups*IE_MAX_IMPORT,self.currentGroup&&(stat.slots+=IE_MAX_IMPORT-self.currentGroup.imports.length),stat
},get:function(style){for(var i=0;i<stylesheets.length;i++){var stylesheet=stylesheets[i];if((stylesheet.ownerNode||stylesheet.owningElement)==style)return stylesheet}},create:function(options){var stylesheet,style,length=stylesheets.length;if(IE_STYLESHEET){if(length>=IE_MAX_STYLESHEET)return;stylesheet=document.createStyleSheet(),style=stylesheet.ownerNode||stylesheet.owningElement}else style=document.createElement("style"),head.appendChild(style);$.extend(style,{type:options.type,title:options.title,media:options.media,rel:options.rel});
var content=options.content;return void 0!==content&&(IE_STYLESHEET?stylesheet.cssText=content:style.appendChild(document.createTextNode(content))),style},nextAvailable:function(alsoCreateIfUnavailable){var stylesheet,length=stylesheets.length;if(length){var i;for(i=length;i--;0>i){stylesheet=stylesheets[i];{if(!(IE_STYLESHEET&&(stylesheet.cssRules||stylesheet.rules).length>=IE_MAX_RULE))break;stylesheet=void 0}}}return stylesheet.ownerNode||stylesheet.owningElement||(alsoCreateIfUnavailable?self():void 0)},load:function(options){if($.browser.msie&&!options.forceInject)return self._import(options);
var link=$("<link>").attr({href:options.url,type:options.type,rel:options.rel,media:options.media}).appendTo("head");return link[0]},_import:function(options){var failed;if(void 0===self.currentGroup){var group;try{group=document.createStyleSheet(),group.media="all",group.title="jquery_stylesheet"}catch(e){failed=!0,options.verbose&&console.error("There is not enough slots left to create a new stylesheet group.")}if(failed)return!1;self.currentGroup=group}try{self.currentGroup.addImport(options.url)}catch(e){failed=!0,options.verbose&&console.info("Import slots exceeded. Creating a new stylesheet group.")
}return failed?(self.currentGroup=void 0,self._import(options)):!0}}),self}(),function(){var cssRule=function(selectors,rules,style){$.extend(this,{id:$.uid(),style:style,selectors:[],preRule:"",rules:{},legacy:8===$.IE,important:!1}),selectors&&this.set(selectors,rules)};$.extend(cssRule.prototype,{set:function(selectors,rules){return this.selectors=$.isString(selectors)?selectors.split(","):selectors,$.isString(rules)?(this.preRule=rules+"\n",this.rules={}):(this.preRule="",this.rules=rules||this.rules),this.update(),this
},cssText:function(){return this.selectors.join(",")+"{"+this.ruleText()+"}\n"},ruleText:function(){var important=this.important;return this.preRule+(this.legacy?"-rule-id:"+this.id+";":"")+$.map(this.rules,function(val,prop){return $.isNumeric(val)&&!$.cssNumber[prop]&&(val+="px"),important&&(val+=" !important"),prop+":"+val}).join(";")},update:function(){if(this.legacy)return this.updateLegacy();var cssText=this.cssText();return void 0===this.textNode?(this.textNode=document.createTextNode(cssText),this.style.appendChild(this.textNode)):this.textNode.nodeValue=cssText,this
},updateLegacy:function(){this.removeLegacy();for(var stylesheet=$.stylesheet.get(this.style),selectors=this.selectors,ruleText=this.ruleText(),i=0;i<selectors.length;i++)stylesheet.addRule(selectors[i],ruleText);return this},remove:function(){return this.legacy?this.removeLegacy():(void 0!==this.textNode&&(this.style.removeChild(this.textNode),delete this.textNode),this)},removeLegacy:function(){for(var stylesheet=$.stylesheet.get(this.style),rules=stylesheet.rules,i=0;i<rules.length;i++)null!==rules[i].cssText.match(this.id)&&stylesheet.removeRule(i);
return this},css:function(prop,val){return $.isString(prop)&&void 0===val?this.rules[prop]:($.isPlainObject(prop)?$.extend(this.rules,prop):this.rules[prop]=val,this.update(),this)}});var self=$.cssRule=function(selector,rules,style){var style=style||self.style||$.stylesheet.nextAvailable(!0);if(style)return new cssRule(selector,rules,style)};self.style=$.stylesheet()}(),function(){$.cssUrl=function(url){return'url("'+encodeURI(url)+'")'}}()}),FD31.plugin("language",function($){$.sprintf=function(){var regex=/%%|%(\d+\$)?([-+\'#0 ]*)(\*\d+\$|\*|\d+)?(\.(\*\d+\$|\*|\d+))?([scboxXuidfegEG])/g,a=arguments,i=0,format=a[i++],pad=function(str,len,chr,leftJustify){chr||(chr=" ");
var padding=str.length>=len?"":Array(1+len-str.length>>>0).join(chr);return leftJustify?str+padding:padding+str},justify=function(value,prefix,leftJustify,minWidth,zeroPad,customPadChar){var diff=minWidth-value.length;return diff>0&&(value=leftJustify||!zeroPad?pad(value,minWidth,customPadChar,leftJustify):value.slice(0,prefix.length)+pad("",diff,"0",!0)+value.slice(prefix.length)),value},formatBaseX=function(value,base,prefix,leftJustify,minWidth,precision,zeroPad){var number=value>>>0;return prefix=prefix&&number&&{2:"0b",8:"0",16:"0x"}[base]||"",value=prefix+pad(number.toString(base),precision||0,"0",!1),justify(value,prefix,leftJustify,minWidth,zeroPad)
},formatString=function(value,leftJustify,minWidth,precision,zeroPad,customPadChar){return null!=precision&&(value=value.slice(0,precision)),justify(value,"",leftJustify,minWidth,zeroPad,customPadChar)},doFormat=function(substring,valueIndex,flags,minWidth,_,precision,type){var number,prefix,method,textTransform,value;if("%%"==substring)return"%";for(var leftJustify=!1,positivePrefix="",zeroPad=!1,prefixBaseX=!1,customPadChar=" ",flagsl=flags.length,j=0;flags&&flagsl>j;j++)switch(flags.charAt(j)){case" ":positivePrefix=" ";
break;case"+":positivePrefix="+";break;case"-":leftJustify=!0;break;case"'":customPadChar=flags.charAt(j+1);break;case"0":zeroPad=!0;break;case"#":prefixBaseX=!0}if(minWidth=minWidth?"*"==minWidth?+a[i++]:"*"==minWidth.charAt(0)?+a[minWidth.slice(1,-1)]:+minWidth:0,0>minWidth&&(minWidth=-minWidth,leftJustify=!0),!isFinite(minWidth))throw new Error("sprintf: (minimum-)width must be finite");switch(precision=precision?"*"==precision?+a[i++]:"*"==precision.charAt(0)?+a[precision.slice(1,-1)]:+precision:"fFeE".indexOf(type)>-1?6:"d"==type?0:void 0,value=valueIndex?a[valueIndex.slice(0,-1)]:a[i++],type){case"s":return formatString(String(value),leftJustify,minWidth,precision,zeroPad,customPadChar);
case"c":return formatString(String.fromCharCode(+value),leftJustify,minWidth,precision,zeroPad);case"b":return formatBaseX(value,2,prefixBaseX,leftJustify,minWidth,precision,zeroPad);case"o":return formatBaseX(value,8,prefixBaseX,leftJustify,minWidth,precision,zeroPad);case"x":return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad);case"X":return formatBaseX(value,16,prefixBaseX,leftJustify,minWidth,precision,zeroPad).toUpperCase();case"u":return formatBaseX(value,10,prefixBaseX,leftJustify,minWidth,precision,zeroPad);
case"i":case"d":return number=0|+value,prefix=0>number?"-":positivePrefix,value=prefix+pad(String(Math.abs(number)),precision,"0",!1),justify(value,prefix,leftJustify,minWidth,zeroPad);case"e":case"E":case"f":case"F":case"g":case"G":return number=+value,prefix=0>number?"-":positivePrefix,method=["toExponential","toFixed","toPrecision"]["efg".indexOf(type.toLowerCase())],textTransform=["toString","toUpperCase"]["eEfFgG".indexOf(type)%2],value=prefix+Math.abs(number)[method](precision),justify(value,prefix,leftJustify,minWidth,zeroPad)[textTransform]();
default:return substring}};return format.replace(regex,doFormat)};var self=$.language=$.JText=function(key){return arguments.length<2?self._(key):self.sprintf.apply(null,arguments)};$.extend(self,{lang:{},add:function(key,val){$.isPlainObject(key)?$.extend(self.lang,key):self.lang[key]=val},remove:function(key){delete self.lang[key]},_:function(key){return self.lang[key]||""},sprintf:function(){var key=arguments[0];return arguments[0]=self.lang[key],$.sprintf.apply(null,arguments)}})}),FD31.plugin("template",function($){$.template=function(){var defaultTemplate={content:"",type:"ejs"},self=function(name,content){if(void 0===name)return self.templates;
var template;return"string"==typeof content?(template=$.isPlainObject(content)?content:$.extend({},defaultTemplate,{name:name,content:content}),self.templates[name]=template,template):(template=self.templates[name]||{},template.content||"")};return $.extend(self,{templates:{},remove:function(name){delete self.templates[name]}}),self}()}),FD31.plugin("require",function($){$.require=function(){var getFolderPath=function(path){return $.uri(path).setAnchor("").setQuery("").toPath("../").toString()},self=function(options){var batch=new Batch(options);
return self.batches[batch.id]=batch,batch};$.extend(self,{defaultOptions:{path:function(){var path=$.path+"/scripts/"||$("[require-path]").attr("require-path")||getFolderPath($("script:last").attr("src"))||getFolderPath(window.location.href);return/^(\/|\.)/.test(path)&&(path=$.uri(window.location.href).toPath(path).toString()),path}(),timeout:1e4,retry:3,verbose:"development"==$.environment},setup:function(options){$.extend(self.defaultOptions,options)},batches:{},status:function(filter){return $.each(self.batches,function(i,batch){var count={pending:0,resolved:0,rejected:0,ready:0,total:0},messages=[];
$.each(batch.tasks,function(i,task){state=task.module&&"ready"==task.module.status?"ready":task.state(),count[state]++,count.total++,messages.push({state:state,content:"["+state+"] "+task.name})});var batchName=batch.id+": "+batch.state()+" ["+count.resolved+"/"+count.total+"]";filter&&count[filter]<1||($.IE?(console.log('$.require.batches["'+batch.id+'"]'),$.each(messages,function(i,message){console.log(message.content)}),console.log("")):(console.groupCollapsed(batchName),console.log('$.require.batches["'+batch.id+'"]',batch),$.each(messages,function(i,message){var state=message.state,content=message.content;
if(!filter||state==filter)switch(state){case"pending":console.warn(content);break;case"rejected":console.error(content);break;default:console.info(content)}}),console.groupEnd(batchName)))}),"$.require.status(pending|resolved|rejected|ready);"},loaders:{},addLoader:function(name,factory){self[name]=factory,Batch.prototype[name]=function(){var batch=this;return batch.autoFinalize(),factory.apply(batch,arguments),batch},self.loaders[name]=self[name]=factory},removeLoader:function(name){delete Batch.prototype[name],delete self[name]
}});var id=0,Batch=function(options){var required=$.Callbacks("once memory"),isRequired=!1,batch=$.extend(this,{id:++id,tasks:[],options:$.extend({},self.defaultOptions,options),autoFinalizeDuration:300,finalized:!1,required:function(fn){return fn===!0&&(isRequired=!0&&required.fire()),$.isFunction(fn)&&required.add(fn),isRequired}});return batch};return $.extend(Batch.prototype,{addTask:function(task){var batch=this;$.isDeferred(task)&&(batch.finalized||(batch.tasks.push(task),task.batch=batch))},autoFinalize:function(){var batch=this,duration=batch.autoFinalizeDuration;
duration!==!1&&(clearTimeout(batch.autoFinalizeTimer),batch.autoFinalizeTimer=setTimeout(function(){batch.finalize()},duration))},finalize:function(){var batch=this;if(!batch.finalized){batch.finalized=!0;var manager=batch.manager=$.when.apply(null,batch.tasks),promise=manager.promise(),progress=$.Callbacks();$.extend(batch,promise,{progress:progress.add,notify:progress.fire,done:function(){return batch.required(!0),batch.done=promise.done,batch.done.apply(batch,arguments)}});var verbose=batch.options.verbose;
manager.progress(function(state,task){verbose&&"rejected"==state&&console.warn("Require: Task "+task.name+" failed to load.",task)}).fail(function(){verbose&&console.warn("Require: Batch "+batch.id+" failed.",batch)}),setTimeout(function(){$.each(batch.tasks,function(i,task){task.then(function(){batch.notify("resolved",task)},function(){batch.notify("rejected",task)},function(){batch.notify("progress",task)})})},1)}},expand:function(args,opts){var args=$.makeArray(args),options=opts||{},names=[];return $.isPlainObject(args[0])?(options=$.extend(args[0],opts),names=args.slice(1)):names=args,{options:options,names:names}
}}),$.each(["done","fail","progress","always","then"],function(i,method){Batch.prototype[method]=function(){var batch=this;return batch.finalize(),batch[method].apply(batch,arguments)}}),self}(),$.require.addLoader("script",function(){var ajaxHost=$.uri($.indexUrl).host(),documentHost=$.uri(document.location.href).host();ajaxHost!==documentHost&&ajaxHost.match("xn--")&&($.support.cors=!0),document.createElement("script").async===!0||"MozAppearance"in document.documentElement.style||window.opera;var self=function(){var options,names,batch=this,args=$.makeArray(arguments);
$.isPlainObject(args[0])?(options=args[0],names=args.slice(1)):names=args,options=$.extend({},self.defaultOptions,batch.options,options,{batch:batch});var taskBefore;$.each(names,function(i,name){var task=new self.task(name,options,taskBefore);batch.addTask(task),options.serial&&void 0!==taskBefore?taskBefore.always(task.start):task.start(),taskBefore=task})};return $.extend(self,{defaultOptions:{path:"",extension:"compressed"==$.mode?"min.js":"js",serial:!1,async:!1,xhr:!1},setup:function(){$.extend(self.defaultOptions,options)
},scripts:{},task:function(name,options,taskBefore){var task=$.extend(this,$.Deferred());if(task.name=name,task.options=options,task.taskBefore=taskBefore,$.isArray(name)){task.name=name[0]+"@"+name[1],task.moduleName=name[0];var overrideModuleUrl=name[2];overrideModuleUrl||(task.defineModule=!0,$.module.registry[task.moduleName]&&console.warn("$.require.script: "+task.moduleName+" exists! Using existing module instead."),task.options.xhr=!0),name=name[1],task.module=$.module(task.moduleName)}$.isUrl(name)?task.url=name:/^(\/|\.)/.test(name)?task.url=$.uri(task.options.path).toPath(name).toString():(task.url=$.uri(task.options.path).toPath("./"+name+"."+task.options.extension).toString(),task.module=$.module(name))
}}),$.extend(self.task.prototype,{start:function(){var task=this,module=task.module;return module&&"pending"!==module.status?(task.waitForModule(),void 0):(task.load(),void 0)},waitForModule:function(){var task=this,module=task.module;module.then(task.resolve,task.reject,task.notify),task.batch.required(function(){module.done(task.resolve)})},load:function(){var task=this,taskBefore=task.taskBefore;task.script=self.scripts[task.url]||function(){var script=task.options.xhr?$.ajax({url:task.url,dataType:"text"}):$.script({url:task.url,type:"text/javascript",async:task.options.async,timeout:task.batch.options.timeout,retry:task.batch.options.retry,verbose:task.batch.options.verbose});
return self.scripts[task.url]=script}(),task.script.done(function(data){var resolveTask=function(){task.module?task.waitForModule():task.resolve()};return task.options.xhr&&(task.defineModule&&(task.module=$.module(task.moduleName,function(){var module=this;$.globalEval(data),module.resolveWith(data)})),!task.options.async||taskBefore)?(taskBefore.done(function(){$.globalEval(data),resolveTask()}),void 0):(resolveTask(),void 0)}).fail(function(){task.reject()})}}),self}()),$.require.addLoader("stylesheet",function(){var self=function(){var options,names,batch=this,args=$.makeArray(arguments);
$.isPlainObject(args[0])?(options=args[0],names=args.slice(1)):names=args,options=$.extend({},self.defaultOptions,batch.options,{path:$.path+"/styles/"},options,{batch:batch}),$.each(names,function(i,name){var task=new self.task(name,options),existingTask=self.stylesheets[task.url];task=existingTask||task,batch.addTask(task),existingTask||(self.stylesheets[task.url]=task,task.start())})};return $.extend(self,{defaultOptions:{path:"",extension:"compressed"==$.mode?"min.css":"css",xhr:!1},setup:function(){$.extend(self.defaultOptions,options)
},stylesheets:{},task:function(name,options){var task=$.extend(this,$.Deferred());task.name=name,task.options=options,task.url=$.isUrl(name)?name:/^(\/|\.)/.test(name)?$.uri(task.options.path).toPath(name).toString():$.uri(task.options.path).toPath("./"+name+"."+task.options.extension).toString(),task.options.url=task.url},loaders:{},loader:function(name){if($.isArray(name))return $.map(name,function(name){return self.loader(name)});if($.isPlainObject(name))return $.map(name,function(name,options){return self.loader(name).resolve(options)
});var loader=self.loaders[name];return loader||(loader=self.loaders[name]=$.Deferred().done(function(options){$.isPlainObject(options)||$.stylesheet(options)})),loader}}),$.extend(self.task.prototype,{start:function(){var task=this,loader=self.loaders[task.name];loader||(loader=self.loader(task.name),$.stylesheet(task.options)?loader.resolve():loader.reject()),loader.then(task.resolve,task.reject)}}),self}()),$.require.addLoader("template",function(){var self=function(){var options,names,batch=this,args=$.makeArray(arguments);
$.isPlainObject(args[0])?(options=args[0],names=args.slice(1)):names=args,options=$.extend({},self.defaultOptions,batch.options,options,{batch:batch}),$.each(names,function(i,name){var task=new self.task(name,options);batch.addTask(task),task.start()})};return $.extend(self,{defaultOptions:{path:"",extension:"htm"},setup:function(){$.extend(self.defaultOptions,options)},task:function(name,options){var task=$.extend(this,$.Deferred());task.name=name,task.options=options,$.isArray(name)&&(task.name=name[0],name=name[1]),task.url=$.isUrl(name)?name:/^(\/|\.)/.test(name)?$.uri(task.options.path).toPath(name).toString():$.uri(task.options.path).toPath("./"+name+"."+task.options.extension).toString()
},loaders:{},loader:function(name){if($.isArray(name))return $.map(name,function(name){return self.loader(name)});if($.isPlainObject(name))return $.map(name,function(content,name){return self.loader(name).resolve(content)});var loader=self.loaders[name];return loader||(loader=self.loaders[name]=$.Deferred().done(function(content){$.template(name,content)})),loader}}),$.extend(self.task.prototype,{start:function(){var task=this,loader=self.loaders[task.name];return loader||(loader=self.loader(task.name),loader.xhr=$.Ajax({url:task.url,dataType:"text"}).then(loader.resolve,loader.reject).then(task.resolve,task.reject)),task.loader=loader,task
}}),self}()),$.require.addLoader("language",function(){var self=function(){var options,names,batch=this,args=$.makeArray(arguments);$.isPlainObject(args[0])?(options=args[0],names=args.slice(1)):names=args,options=$.extend({},self.defaultOptions,batch.options,options,{batch:batch});var task=new self.task(names,options);batch.addTask(task),task.start()};return $.extend(self,{defaultOptions:{path:""},setup:function(){$.extend(self.defaultOptions,options)},loaders:{},task:function(names,options){var task=$.extend(this,$.Deferred());
task.name=names.join(","),task.options=options,task.url=options.path,task.names=names},loaders:{},loader:function(name){if($.isArray(name))return $.map(name,function(name){return self.loader(name)});if($.isPlainObject(name))return $.map(name,function(content,name){return self.loader(name).resolve(content)});var loader=self.loaders[name];return loader||(loader=self.loaders[name]=$.Deferred().done(function(string){$.language.add(name,string)})),loader}}),$.extend(self.task.prototype,{start:function(){var task=this,loaders=[],names=$.map(task.names,function(name){var loader=self.loader(name);
return loader.push(loader),/resolved|rejected/.test(loader.state())?null:name});return task.fail(function(){$.each(names,function(i,name){self.loader(name).reject()})}),$.when.apply(null,loaders).then(task.resolve,task.reject),names.length<1?task:(task.xhr=$.Ajax({url:task.url,type:"POST",data:{keys:names}}).done(function(strings){$.isPlainObject(strings)?self.loader(strings):task.reject()}).fail(function(){task.reject()}),task)}}),self}()),$.require.addLoader("library",function(){var names,batch=this,args=$.makeArray(arguments),options={};
return $.isPlainObject(args[0])?(options=args[0],names=args.slice(1)):names=args,$.extend(options,{path:$.scriptPath}),batch.script.apply(batch,[options].concat(names))}),$.require.addLoader("image",function(){var self=function(){var options,names,batch=this,args=$.makeArray(arguments);$.isPlainObject(args[0])?(options=args[0],names=args.slice(1)):names=args,options=$.extend({},self.defaultOptions,batch.options,options,{batch:batch}),$.each(names,function(i,name){var task=new self.task(name,options),existingTask=self.images[task.url];
task=existingTask||task,batch.addTask(task),existingTask||(self.images[task.url]=task,task.start())})};return $.extend(self,{defaultOptions:{path:""},setup:function(){$.extend(self.defaultOptions,options)},images:{},task:function(name,options){var task=$.extend(this,$.Deferred());task.name=name,task.options=options,task.url=$.isUrl(name)?name:/^(\/|\.)/.test(name)?$.uri(task.options.path).toPath(name).toString():$.uri(task.options.path).toPath("./"+name).toString(),task.options.url=task.url}}),$.extend(self.task.prototype,{start:function(){var task=this;
task.image=$(new Image).load(function(){task.resolve()}).error(function(){task.reject()}).attr("src",task.options.url)}}),self}())}),FD31.plugin("iframe-transport",function($){$.ajaxPrefilter(function(options){return options.iframe?"iframe":void 0}),$.ajaxTransport("iframe",function(options){function cleanUp(){hasFiles&&markers.replaceWith(function(idx){return files.get(idx)}),form.remove(),iframe.attr("src","javascript:false;").remove()}var form=null,iframe=null,name="iframe-"+$.now(),files=$(options.files).filter(":file:enabled"),hasFiles=files.length>0,markers=null;
return options.dataTypes.shift(),form=$("<form enctype='multipart/form-data' method='post'></form>").hide().attr({action:options.url,target:name}),"string"==typeof options.data&&options.data.length>0&&$.error("data must not be serialized"),$.each(options.data||{},function(name,value){$.isPlainObject(value)&&(name=value.name,value=value.value),$.isArray(value)||(value=[value]),$.each(value,function(i,value){$("<input type='hidden' />").attr({name:name,value:value}).appendTo(form)})}),$("<input type='hidden' value='IFrame' name='X-Requested-With' />").appendTo(form),hasFiles&&(markers=files.after(function(){return $(this).clone().prop("disabled",!0)
}).next(),files.appendTo(form)),{send:function(headers,completeCallback){iframe=$("<iframe src='javascript:false;' name='"+name+"' id='"+name+"' style='display:none'></iframe>"),iframe.bind("load",function(){iframe.unbind("load").bind("load",function(){var doc=this.contentWindow?this.contentWindow.document:this.contentDocument?this.contentDocument:this.document,root=doc.documentElement?doc.documentElement:doc.body,textarea=root.getElementsByTagName("textarea")[0],type=textarea?textarea.getAttribute("data-type"):null,status=textarea?textarea.getAttribute("data-status"):200,statusText=textarea?textarea.getAttribute("data-statusText"):"OK",content={html:root.innerHTML,text:type?textarea.value:root?root.textContent||root.innerText:null};
cleanUp(),completeCallback(status,statusText,content,type?"Content-Type: "+type:null)}),form[0].submit()}),$("body").append(form,iframe)},abort:function(){null!==iframe&&(iframe.unbind("load").attr("src","javascript:false;"),cleanUp())}}})}),FD31.plugin("server",function($){var self=$.server=function(options){var request=$.Deferred(),ajaxOptions=$.extend(!0,{},self.defaultOptions,options,{success:function(){}});return request.xhr=$.Ajax(ajaxOptions).done(function(commands){if("string"==typeof commands)try{commands=$.parseJSON(commands)
}catch(e){request.rejectWith(request,["Unable to parse Ajax commands.","error"])}if($.isArray(commands)){var parse=function(command){var type=command.type,parser=self.parsers[type]||options[type];return $.isFunction(parser)?parser.apply(request,command.data):void 0},commands=$.map(commands,function(command){return"notify"!=command.type?command:(parse(command),void 0)});$.each(commands,function(i,command){parse(command)})}else request.rejectWith(request,["Invalid ajax commands.","error"]);"pending"===request.state()&&request.resolveWith(request)
}).fail(function(xhr,status,statusText){request.rejectWith(request,[statusText,status])}),request};self.defaultOptions={type:"POST",data:{tmpl:"component",format:"ajax",no_html:1},dataType:"json"},self.parsers={script:function(){var data=$.makeArray(arguments);if("string"!=typeof data[0]){var chain=window,chainBroken=!1;$.each(data,function(i,chainer){"Foundry"===chainer.property&&(chainer.property=$.globalNamespace),"Foundry"===chainer.method&&(chainer.method=$.globalNamespace);try{switch(chainer.type){case"get":chain=chain[chainer.property];
break;case"set":chain[chainer.property]=chainer.value,chainBroken=!0;break;case"call":chain=chain[chainer.method].apply(chain,chainer.args)}}catch(err){chainBroken=!0}})}else try{eval(data[0])}catch(err){}},resolve:function(){this.resolveWith(this,arguments)},reject:function(){this.rejectWith(this,arguments)},notify:function(){this.notifyWith(this,arguments)},redirect:function(url){window.location=url}}}),FD31.plugin("component",function($){var Component=$.Component=function(name,options){return arguments.length<1?Component.registry:arguments.length<2?Component.registry[name]:Component.register(name,options)
};Component.registry={},Component.proxy=function(component,property,value){component[property]=$.isFunction(value)?$.proxy(value,component):value},Component.register=function(name,options){var abstractComponent;$.isFunction(name)&&(abstractComponent=name,name=abstractComponent.className,options=abstractComponent.options);var self=Component.registry[name]=window[name]=function(command){return $.isFunction(command)?command($):component};if($.each(Component.prototype,function(property,value){Component.proxy(self,property,value)
}),self.$=$,self.options=options,self.className=name,self.identifier=name.toLowerCase(),self.componentName="com_"+self.identifier,self.prefix=self.identifier+"/",self.version=options.version,self.safeVersion=self.version.replace(/\./g,""),self.environment=options.environment||$.environment,self.mode=options.mode||$.mode,self.debug="development"===self.environment,self.console=Component.console(self),self.language=options.language||$.locale.lang||"en",self.baseUrl=options.baseUrl||$.indexUrl+"?option="+self.componentName,self.ajaxUrl=options.ajaxUrl||$.basePath+"/?option="+self.componentName,self.scriptPath=options.scriptPath||$.rootPath+"/media/"+self.componentName+"/scripts/",self.stylePath=options.stylePath||$.rootPath+"/media/"+self.componentName+"/styles/",self.templatePath=options.templatePath||options.scriptPath,self.languagePath=options.languagePath||self.ajaxUrl+"&tmpl=component&no_html=1&controller=lang&task=getLanguage",self.viewPath=options.viewPath||self.ajaxUrl+"&tmpl=component&no_html=1&controller=themes&task=getAjaxTemplate",self.optimizeResources=!0,self.resourcePath=options.resourcePath||self.ajaxUrl+"&tmpl=component&no_html=1&controller=foundry&task=getResource",self.resourceInterval=1200,self.scriptVersioning=options.scriptVersioning||!1,self.token=(abstractComponent||{}).token,self.tasks=[],FD31.component(name,self),abstractComponent)if(self.debug)abstractComponent.queue.execute();
else{for(var installer,installers=FD31.installer(name);installer=installers.shift();)self.install.apply(self,installer);$.when(self.install("definitions"),self.install("scripts"),self.install("resources")).done(function(){abstractComponent.queue.execute()})}},Component.extend=function(property,value){Component.prototype[property]=value,$.each(Component.registry,function(name,component){Component.proxy(component,property,value)})},$.template("component/console",'<div id="[%== component.identifier %]-console" class="foundry-console" style="display: none; z-index: 999999;"><div class="console-header"><div class="console-title">[%= component.className %] [%= component.version %]</div><div class="console-remove-button">x</div></div><div class="console-log-item-group"></div><style type="text/css">.foundry-console{position:fixed;width:50%;height:50%;bottom:0;left:0;background:white;box-shadow: 0 0 5px 0;margin-left: 25px;}.console-log-item-group{width: 100%;height: 100%;overflow-y:scroll;}.console-header{position: absolute;background:red;color:white;font-weight:bold;top:-24px;left: 0;line-height:24px;width:100%}.console-remove-button{text-align:center;cursor: pointer;display:block;width: 24px;float:right}.console-remove-button:hover{color: yellow}.console-title{padding: 0 5px;float:left}.console-log-item{padding: 5px}.console-log-item + .console-log-item{border-top: 1px solid #ccc}</style></div>'),Component.console=function(component){return function(self){var element,instance=function(method){return arguments.length<1?instance.toggle():instance[method]&&instance[method].apply(instance,arguments)
};return instance.selector="#"+self.identifier+"-console",instance.init=function(){return element=$(instance.selector),element.length<1&&(element=$($.View("component/console",{component:self})).appendTo("body"),element.find(".console-remove-button").click(function(){element.hide()})),instance.element=element,arguments.callee}(),instance.methods={log:function(message,type,code){type=type||"info";var itemGroup=element.find(".console-log-item-group"),item=$(document.createElement("div")).addClass("console-log-item type-"+type).attr("data-code",code).html(message);
itemGroup.append(item),itemGroup[0].scrollTop=itemGroup[0].scrollHeight,self.debug&&element.show()},toggle:function(){element.toggle()},reset:function(){element.find(".console-log-item-group").empty()}},$.each(instance.methods,function(method,fn){instance[method]=function(){return instance.init(),fn.apply(instance,arguments)}}),instance}(component)};var doc=$(document),proto=Component.prototype;$.extend(proto,{run:function(command){return $.isFunction(command)?command($):this},ready:function(){return doc.ready(function(){proto.ready=proto.run
}),function(callback){$.isFunction(callback)&&doc.ready(function(){callback($)})}}(),install:function(name,factory){var self=this,task=self.tasks[name]||(self.tasks[name]=$.Deferred());if(!factory)return task;var install=function(){return factory($,self),task.resolve()};return"definitions"==name?install():($.when(self.install("definitions")).done(install),void 0)},template:function(name){var self=this;return void 0==name?$.grep($.template(),function(template){return 0==template.indexOf(self.prefix)}):(arguments[0]=self.prefix+name,$.template.apply(null,arguments))
},require:function(options){var self=this,options=options||{},require=$.require(options),_require={};return $.each(["library","script","language","template","done"],function(i,method){_require[method]=require[method]}),require.resource=function(resource){if($.isPlainObject(resource)&&resource.type&&resource.name&&$.isDeferred(resource.loader)){var resourceCollector=self.resourceCollector;resourceCollector||(resourceCollector=self.resourceCollector=$.Deferred(),$.extend(resourceCollector,{name:$.uid("ResourceCollector"),manifest:[],loaderList:[],loaders:[],load:function(){if(delete self.resourceCollector,resourceCollector.manifest.length<0)return resourceCollector.resolve(),void 0;
var retry=0,loadResources=function(){retry++,$.Ajax({type:"POST",url:self.resourcePath,dataType:"json",data:{resource:resourceCollector.manifest}}).done(function(manifest){return $.isArray(manifest)?($.each(manifest,function(i,resource){var content=resource.content;resourceCollector.loaders[resource.id][void 0!==content?"resolve":"reject"](content)}),retry>1&&self.debug&&console.info("Attempt to try and get resources again was successful!"),void 0):(resourceCollector.reject("Server did not return a valid resource manifest."),void 0)
}).fail(function(){return retry>2?(self.debug&&console.error("Unable to get resource again. Giving up!"),void 0):(self.debug&&console.warn("Unable to get resource. Trying again..."),loadResources(),void 0)})};loadResources(),$.when.apply(null,resourceCollector.loaderList).done(resourceCollector.resolve).fail(resourceCollector.reject)}}),setTimeout(resourceCollector.load,self.resourceCollectionInterval));var id=resource.id=$.uid("Resource");return resourceCollector.loaders[id]=resource.loader,resourceCollector.loaderList.push(resource.loader),delete resource.loader,resourceCollector.manifest.push(resource),require
}},require.view=function(){var batch=this,request=batch.expand(arguments,{path:self.viewPath}),loaders={},options=request.options,names=$.map(request.names,function(name){var absoluteName=self.prefix+name,loader=$.require.template.loaders[absoluteName];if(!loader)return loader=$.require.template.loader(absoluteName),loader.name=absoluteName,batch.addTask(loader),self.optimizeResources?(require.resource({type:"view",name:name,loader:loader}),void 0):(loaders[name]=loader,name)});return names.length>0&&$.Ajax({url:options.path,dataType:"json",data:{names:names}}).done(function(templates){$.isArray(templates)&&$.each(templates,function(i,template){var content=template.content;
loaders[template.name][void 0!==content?"resolve":"reject"](content)})}),require},require.language=function(){var batch=this,request=batch.expand(arguments,{path:self.languagePath});return self.optimizeResources?$.each(request.names,function(i,name){var loader=$.require.language.loaders[name];loader||(loader=$.require.language.loader(name),loader.name=name,batch.addTask(loader),require.resource({type:"language",name:name,loader:loader}))}):_require.language.apply(require,[request.options].concat(request.names)),require
},require.library=function(){return _require.script.apply(this,arguments),require},require.script=function(){var batch=this,request=batch.expand(arguments,{path:self.scriptPath});return names=$.map(request.names,function(name){if($.isArray(name)||$.isUrl(name)||/^(\/|\.)/.test(name))return name;var moduleName=self.prefix+name,moduleUrl=$.uri(request.options.path).toPath("./"+name+"."+(request.options.extension||"js")+(self.scriptVersioning?"?version="+self.safeVersion:"")).toString();return[[moduleName,moduleUrl,!0]]
}),_require.script.apply(require,[request.options].concat(names)),require},require.template=function(){var batch=this,request=batch.expand(arguments,{path:self.templatePath});return _require.template.apply(require,[request.options].concat($.map(request.names,function(name){return[[self.prefix+name,name]]}))),require},require.done=function(callback){return _require.done.call(require,function(){self.ready(callback)})},require},module:function(name,factory){var self=this;if(!$.isArray(name)){var fullname=self.prefix+name;
return factory?$.module.apply(null,[fullname,function(){var module=this;factory.call(module,$)}]):$.module(fullname)}}}),$.Component.extend("getToken",function(){var self=this;return $("span#"+self.identifier+"-token input").attr("name")||self.token}),$.Component.extend("ajax",function(namespace,params,callback){var self=this,options={url:self.ajaxUrl,data:$.extend(params,{option:self.componentName,namespace:namespace})};if(options=$.extend(!0,options,self.options.ajax),options.data[self.getToken()]=1,options.data.hasOwnProperty("args")&&(options.data.args=$.toJSON(options.data.args)),$.isPlainObject(callback)){if(callback.type){switch(callback.type){case"jsonp":callback.dataType="jsonp",callback.crossDomain=!0,options.data.transport="jsonp";
break;case"iframe":callback.iframe=!0,callback.processData=!1,callback.files=options.data.files,delete options.data.files,options.data.transport="iframe"}delete callback.type}$.extend(options,callback)}$.isFunction(callback)&&(options.success=callback);var ajax=$.server(options);return ajax.progress(function(message,type,code){"debug"==type&&self.console.log(message,type,code)}),ajax}),$.Component.extend("Controller",function(){var staticProps,protoFactory,self=this,args=$.makeArray(arguments),name=args[0];return 1==args.length?$.String.getObject(name):(args.length>2?(staticProps=args[1],protoFactory=args[2]):(staticProps={},protoFactory=args[1]),$.extend(staticProps,{root:self.className+".Controller",component:self}),$.Controller.apply(this,[name,staticProps,protoFactory]))
}),$.Component.extend("Model",function(){var staticProps,protoFactory,self=this,args=$.makeArray(arguments),name=self.className+".Model."+args[0];return 1==args.length?$.String.getObject(args[0]):(2==args.length&&(staticProps={},protoFactory=args[1]),args.length>2&&(staticProps=args[1],protoFactory=args[2]),$.extend(staticProps,{component:self}),$.Model.apply(this,[name,staticProps,protoFactory]))}),$.Component.extend("Model.List",function(){var staticProps,protoFactory,self=this,args=$.makeArray(arguments),name=self.className+".Model.List."+args[0];
return 1==args.length?$.String.getObject(args[0]):(2==args.length&&(staticProps={},protoFactory=args[1]),args.length>2&&(staticProps=args[1],protoFactory=args[2]),$.extend(staticProps,{component:self}),$.Model.List.apply(this,[name,staticProps,protoFactory]))}),$.Component.extend("View",function(){var self=this;return arguments.length<1?self.template():(arguments[0]=self.prefix+arguments[0],$.View.apply(this,arguments))}),FD31.module.execute(),$.each(FD31.component(),function(i,abstractComponent){abstractComponent.registered||$.Component.register(abstractComponent)
})});