forked from s79/OurJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
our.js
22 lines (22 loc) · 69.8 KB
/
our.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*!
* OurJS
* Released under the MIT License.
* Version: 201207
*/
(function(){var b=Object.prototype.hasOwnProperty;var n=Object.prototype.toString;var a="\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u200B\u2028\u2029\u202F\u205F\u3000\uFEFF";var f=/YYYY|MM|DD|hh|mm|ss|s|TZD/g;var m=!{toString:null}.propertyIsEnumerable("toString");var o=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];var e=o.length;var g=function(p){p=Number(p)||0;p=Math[p<0?"ceil":"floor"](p);return p};var l="x"[0]==="x";var k=function(p){if(p==null){throw new TypeError()}if(!l&&typeof p==="string"){return p.split("")}return Object(p)};if(!Object.keys){Object.keys=function(r){if(typeof r!="object"&&typeof r!="function"||r===null){throw new TypeError("Object.keys called on non-object")}var t=[];for(var q in r){if(b.call(r,q)){t.push(q)}}if(m){var s=0;while(s<e){var p=o[s];if(b.call(r,p)){t.push(p)}s++}}return t}}if(!Array.isArray){Array.isArray=function(p){return n.call(p)==="[object Array]"}}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(q){var p=k(this);var s=p.length>>>0;if(!s){return -1}var r=0;if(arguments.length>1){r=g(arguments[1]);if(r<0){r=Math.max(0,s+r)}}while(r<s){if(r in p&&p[r]===q){return r}r++}return -1}}if(!Array.prototype.lastIndexOf){Array.prototype.lastIndexOf=function(q){var p=k(this);var s=p.length>>>0;if(!s){return -1}var r=s-1;if(arguments.length>1){r=Math.min(r,g(arguments[1]));if(r<0){r=s+r}}while(r>-1){if(r in p&&p[r]===q){return r}r--}return -1}}if(!Array.prototype.every){Array.prototype.every=function(t){var q=k(this);var p=arguments[1];var s=q.length>>>0;if(typeof t!=="function"){throw new TypeError("Array.prototype.every")}var r=0;while(r<s){if(r in q&&!t.call(p,q[r],r,q)){return false}r++}return true}}if(!Array.prototype.some){Array.prototype.some=function(t){var q=k(this);var p=arguments[1];var s=q.length>>>0;if(typeof t!=="function"){throw new TypeError("Array.prototype.some")}var r=0;while(r<s){if(r in q&&t.call(p,q[r],r,q)){return true}r++}return false}}if(!Array.prototype.forEach){Array.prototype.forEach=function(t){var q=k(this);var p=arguments[1];var s=q.length>>>0;if(typeof t!=="function"){throw new TypeError("Array.prototype.forEach")}var r=0;while(r<s){if(r in q){t.call(p,q[r],r,q)}r++}}}if(!Array.prototype.map){Array.prototype.map=function(u){var r=k(this);var q=arguments[1];var t=r.length>>>0;if(typeof u!=="function"){throw new TypeError("Array.prototype.map")}var p=new Array(t);var s=0;while(s<t){if(s in r){p[s]=u.call(q,r[s],s,r)}s++}return p}}if(!Array.prototype.filter){Array.prototype.filter=function(v){var r=k(this);var q=arguments[1];var u=r.length>>>0;if(typeof v!=="function"){throw new TypeError("Array.prototype.filter")}var p=[];var s=0;var t;while(s<u){if(s in r){t=r[s];if(v.call(q,t,s,r)){p.push(t)}}s++}return p}}if(!String.prototype.trim||a.trim()){var h=new RegExp("^["+a+"]+");var d=new RegExp("["+a+"]+$");String.prototype.trim=function(){return String(this).replace(h,"").replace(d,"")}}if(!Date.now){Date.now=function(){return new Date().getTime()}}String.prototype.repeat=function(q){q=g(q);var p="";while(q){p+=this;q--}return p};String.prototype.startsWith=function(p){return this.indexOf(p)===0};String.prototype.endsWith=function(p){var q=this.lastIndexOf(p);return q>=0&&q===this.length-p.length};String.prototype.contains=function(p){return this.indexOf(p)!==-1};String.prototype.toArray=function(){return this.split("")};Number.isFinite=function(p){return typeof p==="number"&&isFinite(p)};Number.isNaN=function(p){return typeof p==="number"&&isNaN(p)};Number.isInteger=function(p){return Number.isFinite(p)&&Math.floor(p)===p&&p>-9007199254740992&&p<9007199254740992};Number.toInteger=g;Object.forEach=function(r,u,p){for(var t in r){if(b.call(r,t)){u.call(p,r[t],t,r)}}if(m){var s=0;while(s<e){var q=o[s];if(b.call(r,q)){u.call(p,r[q],q,r)}s++}}};Object.clone=function(q,p){var r;switch(typeOf(q)){case"object.Array":r=[];q.forEach(function(t,s){r[s]=p?Object.clone(t,true):t});break;case"object.Object":r={};Object.forEach(q,function(t,s){r[s]=p?Object.clone(t,true):t});break;default:r=q}return r};Object.append=function(r,u,s){var t=Object.keys(u);if(s){var q=s.whiteList;var p=s.blackList;if(q){t=q.filter(function(v){return t.contains(v)})}if(p){t=t.filter(function(v){return !p.contains(v)})}}t.forEach(function(v){r[v]=u[v]});return r};Array.from=function(s){var p=[];switch(typeOf(s)){case"object.Array":p=s;break;case"object.Arguments":case"object.Collection":case"object.Object":var q=0;var r=s.length;while(q<r){p[q]=s[q];q++}break;default:p.push(s);break}return p};Array.prototype.contains=function(p){return this.indexOf(p)!==-1};Array.prototype.getFirst=function(){return this[0]};Array.prototype.getLast=function(){return this[this.length-1]};var j=new RegExp("["+a+"]+","g");String.prototype.clean=function(){return this.replace(j," ").trim()};Number.prototype.padZero=function(s){var p=(this<0)?"-":"";var r=Math.abs(this)+"";if(isFinite(this)){var q=r.length-(Math.ceil(this)==this?0:1);if(q<s){r="0".repeat(s-q)+r}}return p+r};Math.limit=function(r,q,p){return Number.isFinite(r)?Math.min(p,Math.max(q,r)):(r===Infinity?p:q)};Math.randomRange=function(q,p){return Math.floor(Math.random()*(p-q+1)+q)};var i=new Date().getTimezoneOffset()*60000;Date.from=function(u,w,r){w=w||"YYYY-MM-DD";var s={};var t;var v;var z;var y;var q;var A;var x=0;while(t=f.exec(w)){z=t[0];v=t.index;q=v+x;if(z==="TZD"){A=u.charAt(q)==="Z"?-2:3}else{if(z==="s"){A=2}else{A=0}}y=u.substring(q,q+z.length+A);if(z==="TZD"){y=y==="Z"?0:(y.slice(0,1)==="-"?1000:-1000)*(y.slice(1,3)*3600+y.slice(4,6)*60)}else{y=Number.toInteger(y);if(z==="MM"){--y}}s[z]=y;x+=A}var p=Object.append({YYYY:2012,MM:0,DD:1,hh:0,mm:0,ss:0,s:0,TZD:r?0:i},s);return new Date(Date.UTC(p.YYYY,p.MM,p.DD,p.hh,p.mm,p.ss,p.s)+p.TZD)};Date.prototype.format=function(w,q){w=w||"YYYY-MM-DD";var r=q?"getUTC":"get";var u=this.getTimezoneOffset();var p=u<0?"+":"-";var v=(Math.floor(Math.abs(u)/60)).padZero(2);var s=(Math.abs(u)-v*60).padZero(2);var t={YYYY:this[r+"FullYear"](),MM:(this[r+"Month"]()+1).padZero(2),DD:this[r+"Date"]().padZero(2),hh:this[r+"Hours"]().padZero(2),mm:this[r+"Minutes"]().padZero(2),ss:this[r+"Seconds"]().padZero(2),s:this[r+"Milliseconds"]().padZero(3),TZD:(q||u===0)?"Z":(p+v+":"+s)};return w.replace(f,function(x){return t[x]})};var c=/([.*+?^=!:${}()|[\]\/\\])/g;RegExp.escape=function(p){return(p+"").replace(c,"\\$1")}})();(function(){var types={};["Boolean","Number","String","Array","Date","RegExp","Error","Math","JSON","Arguments"].forEach(function(type){types["[object "+type+"]"]="object."+type});var TO_STRING=Object.prototype.toString;var RE_FUNCTION=/^\s+function .+\s+\[native code\]\s+\}\s+$/;window.typeOf=function(value){var type=typeof value;if(type==="function"&&typeof value.item==="function"){type="object.Collection"}else{if(type==="object"){if(value===null){type="null"}else{type=types[TO_STRING.call(value)]||"object.Object";if(type==="object.Object"){var string=value+"";if(string==="[object Window]"||string==="[object DOMWindow]"){type="object.Global"}else{if(string==="[object JSON]"){type="object.JSON"}else{if(RE_FUNCTION.test(string)){type="function"}else{if("nodeType" in value){type="object.Node"}else{if(typeof value.length==="number"){if("navigator" in value){type="object.Global"}else{if("item" in value){type="object.Collection"}else{if("callee" in value){type="object.Arguments"}}}}}}}}}}}}return type};if(!window.execScript){window.execScript=function(code){window.eval(code)}}window.getNamespace=function(namespace){var o=window;namespace.split(".").forEach(function(item){o=item in o?o[item]:o[item]={}});return o};navigator.warn=function(message){if(console&&typeOf(console.warn)==="function"){console.warn("OurJS: "+message)}};Object.append(navigator,function(){var engine="Unknown";var name="Unknown";var version=0;var userAgent=navigator.userAgent;if(/Trident|MSIE/.test(userAgent)){engine="Trident"}else{if(/WebKit/.test(userAgent)){engine="WebKit"}else{if(/Gecko/.test(userAgent)){engine="Gecko"}else{if(/Presto/.test(userAgent)){engine="Presto"}}}}if(userAgent.match(/(IE|Firefox|Chrome|Safari|Opera)(?: |\/)(\d+)/)){name=RegExp.$1;version=Number.toInteger(RegExp.$2);if(userAgent.match(/Version\/(\d+)/)){version=Number.toInteger(RegExp.$1)}}var inStandardsMode=document.compatMode==="CSS1Compat";if(!inStandardsMode){navigator.warn("Browser is working in non-standards mode!")}var isIE10=false;var isIElt10=false;var isIE9=false;var isIElt9=false;var isIE8=false;var isIElt8=false;var isIE7=false;var isIE6=false;var isFirefox=false;var isChrome=false;var isSafari=false;var isOpera=false;var html=document.documentElement;if("ActiveXObject" in window){if(inStandardsMode){if("WebSocket" in window){isIE10=true}else{if("HTMLElement" in window){isIE9=true}else{if("Element" in window){isIE8=true}else{if("minWidth" in html.currentStyle){isIE7=true}else{isIE6=true}}}}}isIElt8=isIE7||isIE6;isIElt9=isIE8||isIElt8;isIElt10=isIE9||isIElt9}else{if("uneval" in window){isFirefox=true}else{if(getComputedStyle(html,null).getPropertyValue("-webkit-user-select")){if("chrome" in window){isChrome=true}else{isSafari=true}}else{if("opera" in window){isOpera=true}}}}return{userAgentInfo:{engine:engine,name:name,version:version},inStandardsMode:inStandardsMode,isIE10:isIE10,isIElt10:isIElt10,isIE9:isIE9,isIElt9:isIElt9,isIE8:isIE8,isIElt8:isIElt8,isIE7:isIE7,isIE6:isIE6,isFirefox:isFirefox,isChrome:isChrome,isSafari:isSafari,isOpera:isOpera}}());Object.append(location,function(){var parameters={};var searchString=location.search.slice(1);if(searchString){searchString.split("&").forEach(function(item){var valuePair=item.split("=");var key=valuePair[0];var value=valuePair[1];if(key in parameters){typeof parameters[key]==="string"?parameters[key]=[parameters[key],value]:parameters[key].push(value)}else{parameters[key]=value}})}return{parameters:parameters}}());var cookie={};window.cookie=cookie;cookie.getItem=function(key){var matchs=document.cookie.match(new RegExp("(?:^|;)\\s*"+RegExp.escape(key)+"=([^;]*)"));return matchs?decodeURIComponent(matchs[1]):undefined};cookie.setItem=function(key,value,options){options=options||{};var item=key+"="+encodeURIComponent(value);if(options.path){item+="; path="+options.path}if(options.domain){item+="; domain="+options.domain}if(options.secure){item+="; secure"}if(options.expires){item+="; expires="+options.expires.toUTCString()}document.cookie=item};cookie.removeItem=function(key,options){options=options||{};options.expires=new Date(0);this.set(key,"",options)};if(window.localStorage||!document.documentElement.addBehavior||location.protocol==="file:"){return}var localStorage={};window.localStorage=localStorage;var userDataElement;var USER_DATA_PATH="/favicon.ico";var USER_DATA_FILE_NAME="localStorage";try{var hiddenDocument=new ActiveXObject("htmlfile");hiddenDocument.open();hiddenDocument.write('<iframe id="root_path" src="'+USER_DATA_PATH+'"></frame>');hiddenDocument.close();var userDataOwnerDocument=hiddenDocument.getElementById("root_path").contentWindow.document;userDataElement=userDataOwnerDocument.createElement("var");userDataOwnerDocument.appendChild(userDataElement)}catch(e){userDataElement=document.documentElement}userDataElement.addBehavior("#default#userData");localStorage.getItem=function(key){userDataElement.load(USER_DATA_FILE_NAME);return userDataElement.getAttribute(key)};localStorage.setItem=function(key,value){userDataElement.load(USER_DATA_FILE_NAME);userDataElement.setAttribute(key,value);userDataElement.save(USER_DATA_FILE_NAME)};localStorage.removeItem=function(key){userDataElement.load(USER_DATA_FILE_NAME);userDataElement.removeAttribute(key);userDataElement.save(USER_DATA_FILE_NAME)};localStorage.clear=function(){var attributes=userDataElement.XMLDocument.documentElement.attributes;userDataElement.load(USER_DATA_FILE_NAME);var index=0;var attribute;while(attribute=attributes[index++]){userDataElement.removeAttribute(attribute.name)}userDataElement.save(USER_DATA_FILE_NAME)}})();(function(){var w=document.documentElement;var p=/\s*,\s*/;var j=/-([a-z])/g;var t=function(Q){return Q.replace(j,function(R,S){return S.toUpperCase()})};var o=/[A-Z]/g;var a=function(Q){return Q.replace(o,function(R){return"-"+R.toLowerCase()})};if(!document.head){document.head=w.firstChild}if(!("innerText" in document.head)){HTMLElement.prototype.__defineGetter__("innerText",function(){return this.textContent});HTMLElement.prototype.__defineSetter__("innerText",function(Q){this.textContent=Q;return Q})}if(!("outerText" in document.head)){HTMLElement.prototype.__defineGetter__("outerText",function(){return this.textContent});HTMLElement.prototype.__defineSetter__("outerText",function(R){var Q=this.ownerDocument.createTextNode(R);this.parentNode.replaceChild(Q,this);return R})}if(!("outerHTML" in document.head)){var A=/^(area|base|br|col|embed|hr|img|input|link|meta|param|command|keygen|source|track|wbr)$/;var k=function(Q){return A.test(Q)};HTMLElement.prototype.__defineGetter__("outerHTML",function(){var U=this.nodeName.toLowerCase();var S="<"+U;var Q=this.attributes;var R=0;var T=Q.length;while(R<T){if(Q[R].specified){S+=" "+Q[R].name+'="'+Q[R].value+'"'}R++}if(k(U)){S+=">"}else{S+=">"+this.innerHTML+"</"+U+">"}return S});HTMLElement.prototype.__defineSetter__("outerHTML",function(R){var Q=this.ownerDocument.createRange();Q.setStartBefore(this);this.parentNode.replaceChild(Q.createContextualFragment(R),this);return R})}if(!window.Element){window.Element={prototype:{}}}if(!window.HTMLFormElement){window.HTMLFormElement={prototype:{}}}var e=0;var F=Element.prototype;var M=HTMLFormElement.prototype;var y=navigator.isIElt8?function(Q){if(Q&&!Q.uid){Q.uid=++e;var R;for(R in F){Q[R]=F[R]}switch(Q.nodeName){case"FORM":for(R in M){Q[R]=M[R]}break}}return Q}:function(Q){if(Q&&!Q.uid){Q.uid=++e}return Q};Element.prototype.hasClass=function(R){if(R.contains(",")){var T=R.split(p);var Q=0;var S=T.length;while(Q<S){if(!this.hasClass(T[Q++])){return false}}return true}else{return(" "+this.className.clean()+" ").contains(" "+R.trim()+" ")}};Element.prototype.addClass=function(R){var Q=this;if(R.contains(",")){R.split(p).forEach(function(S){Q.addClass(S)})}else{if(!Q.hasClass(R)){Q.className=(Q.className+" "+R).clean()}}return Q};Element.prototype.removeClass=function(R){var Q=this;if(R.contains(",")){R.split(p).forEach(function(S){Q.removeClass(S)})}else{Q.className=(" "+Q.className.clean()+" ").replace(" "+R.trim()+" "," ").trim()}return Q};Element.prototype.toggleClass=function(R){var Q=this;if(R.contains(",")){R.split(p).forEach(function(S){Q.toggleClass(S)})}else{Q[Q.hasClass(R)?"removeClass":"addClass"](R)}console.log(Q.className);return Q};var g={fillOpacity:true,fontWeight:true,lineHeight:true,opacity:true,orphans:true,widows:true,zIndex:true,zoom:true};var D="getComputedStyle" in window?{"float":function(R,Q){R.style.cssFloat=Q}}:{"float":function(R,Q){R.style.styleFloat=Q},opacity:function(R,Q){if(R.filters.alpha){R.filters.alpha.opacity=Q*100}else{if(R.style.filter){R.style.filter+=" "}R.style.filter+="alpha(opacity="+(Q*100)+")"}}};var u={};if(navigator.isIE6){var x={};var L=0;var c=function(Q,V){var U=V.left.usedValue;var T=V.top.usedValue;var S=V.right.usedValue;var R=V.bottom.usedValue;if(isFinite(U)){Q.style.setExpression("left","(document && document.documentElement.scrollLeft + "+U+') + "px"')}else{Q.style.setExpression("left","(document && (document.documentElement.scrollLeft + document.documentElement.clientWidth - this.offsetWidth - (parseInt(this.currentStyle.marginLeft, 10) || 0) - (parseInt(this.currentStyle.marginRight, 10) || 0)) - "+S+') + "px"')}if(isFinite(T)){Q.style.setExpression("top","(document && document.documentElement.scrollTop + "+T+') + "px"')}else{Q.style.setExpression("top","(document && (document.documentElement.scrollTop + document.documentElement.clientHeight - this.offsetHeight - (parseInt(this.currentStyle.marginTop, 10) || 0) - (parseInt(this.currentStyle.marginBottom, 10) || 0)) - "+R+') + "px"')}};var C=function(Q){Q.style.removeExpression("left");Q.style.removeExpression("top")};D.position=function(R,Q){var T=R.uid;var V=x[T];if(Q.toLowerCase()==="fixed"){if(!V){V=x[T]={left:{},right:{},top:{},bottom:{},enabled:false};var U={};var S=R.currentStyle;V.left.specifiedValue=U.left=S.left;V.right.specifiedValue=U.right=S.right;V.top.specifiedValue=U.top=S.top;V.bottom.specifiedValue=U.bottom=S.bottom;Object.forEach(U,function(X,W,Y){V[W].usedValue=Y[W]=X.endsWith("px")?parseInt(X,10):NaN});if(isNaN(V.left.usedValue)&&isNaN(V.right.usedValue)){V.left.usedValue=document.documentElement.scrollLeft+R.getClientRect().left-(parseInt(R.currentStyle.marginLeft,10)||0)}if(isNaN(V.top.usedValue)&&isNaN(V.bottom.usedValue)){V.top.usedValue=document.documentElement.scrollTop+R.getClientRect().top-(parseInt(R.currentStyle.marginTop,10)||0)}if(R.currentStyle.display!=="none"){V.enabled=true;c(R,V)}if(L++===0){document.documentElement.style.backgroundImage="url(about:blank)"}}Q="absolute"}else{if(V){C(R);R.style.left=V.left.specifiedValue;R.style.right=V.right.specifiedValue;R.style.top=V.top.specifiedValue;R.style.bottom=V.bottom.specifiedValue;delete x[T];if(--L===0){document.documentElement.style.backgroundImage="none"}}}R.style.position=Q};u.position=function(Q){return x[Q.uid]?"fixed":Q.currentStyle.position};D.display=function(R,Q){var S=x[R.uid];if(S){if(Q.toLowerCase()==="none"){if(S.enabled){S.enabled=false;C(R)}}else{if(!S.enabled){S.enabled=true;c(R,S)}}}R.style.display=Q};var r=function(R,S,Q){var T=x[R.uid];if(T){T[S].specifiedValue=Q;if(Q.endsWith("px")){var U=parseInt(Q,10);if(T[S].usedValue!==U){T[S].usedValue=U;if(T.enabled){c(R,T)}}}}else{R.style[S]=Q}};var l=function(Q,R){var S=x[Q.uid];return S?S[R].specifiedValue:Q.currentStyle[R]};["left","right","top","bottom"].forEach(function(Q){D[Q]=function(S,R){r(S,Q,R)};u[Q]=function(R){return l(R,Q)}})}function b(Q){this.element=Q;this.currentStyle=Q.currentStyle}b.prototype.getPropertyValue=function(Q){var R;switch(Q){case"float":R=this.currentStyle.styleFloat;break;case"opacity":R=this.element.filters.alpha&&this.element.filters.alpha.opacity/100+""||"1";break;default:R=u[Q]?u[Q](this.element):this.currentStyle[t(Q)]}return R||""};var m="getComputedStyle" in window?function(Q){return window.getComputedStyle(Q,null)}:function(Q){return new b(Q)};Element.prototype.getStyle=function(Q){return m(this).getPropertyValue(a(Q))};Element.prototype.getStyles=function(R){var S={};var Q=m(this);R.forEach(function(T){S[T]=Q.getPropertyValue(a(T))});return S};Element.prototype.setStyle=function(S,R){S=t(S);if(typeof R==="number"&&isFinite(R)){R+=g.hasOwnProperty(S)?"":"px"}if(typeof R==="string"){var Q=D[S];if(Q){Q(this,R)}else{this.style[S]=R}}return this};Element.prototype.setStyles=function(R){for(var Q in R){this.setStyle(Q,R[Q])}return this};Element.prototype.getClientRect=navigator.isIElt8?function(){var U=this.getBoundingClientRect();var T=U.left-w.clientLeft;var S=U.top-w.clientTop;var R=this.offsetWidth;var Q=this.offsetHeight;return{left:T,right:T+R,top:S,bottom:S+Q,width:R,height:Q}}:function(){var Q=this.getBoundingClientRect();if("width" in Q){return Q}else{return{left:Q.left,right:Q.right,top:Q.top,bottom:Q.bottom,width:this.offsetWidth,height:this.offsetHeight}}};var q=/^[a-z][a-zA-Z]*$/;var B=function(Q){return q.test(Q)?"data-"+a(Q):""};Element.prototype.getData="dataset" in w?function(Q){return this.dataset[Q]||undefined}:function(Q){Q=B(Q);var R=this.getAttribute(Q);return typeof R==="string"?R:undefined};Element.prototype.setData=function(Q,R){Q=B(Q);if(Q){this.setAttribute(Q,R)}return this};Element.prototype.removeData=function(Q){Q=B(Q);if(Q){this.removeAttribute(Q)}return this};Element.prototype.comparePosition="compareDocumentPosition" in w?function(Q){return this.compareDocumentPosition(Q)}:function(Q){return(this!=Q&&this.contains(Q)&&16)+(this!=Q&&Q.contains(this)&&8)+(this.sourceIndex>=0&&Q.sourceIndex>=0?(this.sourceIndex<Q.sourceIndex&&4)+(this.sourceIndex>Q.sourceIndex&&2):1)+0};if(!("contains" in w)){Element.prototype.contains=function(Q){return(this===Q||!!(this.compareDocumentPosition(Q)&16))}}Element.prototype.getParent="parentElement" in w?function(){return y(this.parentElement)}:function(){var Q=this.parentNode;if(Q.nodeType!=1){Q=null}return y(Q)};Element.prototype.getPreviousSibling="previousElementSibling" in w?function(){return y(this.previousElementSibling)}:function(){var Q=this;while((Q=Q.previousSibling)&&Q.nodeType!==1){}return y(Q)};Element.prototype.getNextSibling="nextElementSibling" in w?function(){return y(this.nextElementSibling)}:function(){var Q=this;while((Q=Q.nextSibling)&&Q.nodeType!==1){}return y(Q)};Element.prototype.getFirstChild="firstElementChild" in w?function(){return y(this.firstElementChild)}:function(){var Q=this.firstChild;while(Q&&Q.nodeType!==1&&(Q=Q.nextSibling)){}return y(Q)};Element.prototype.getLastChild="lastElementChild" in w?function(){return y(this.lastElementChild)}:function(){var Q=this.lastChild;while(Q&&Q.nodeType!==1&&(Q=Q.previousSibling)){}return y(Q)};Element.prototype.getChildren=function(){var R=[];var Q=this.getFirstChild();while(Q){R.push(Q);Q=Q.getNextSibling()}return R};Element.prototype.getChildCount="childElementCount" in w?function(){return this.childElementCount}:function(){var R=0;var Q=this.firstChild;while(Q){if(Q.nodeType===1){R++}Q=Q.nextSibling}return R};Element.prototype.append=function(Q){this.appendChild(Q);return this};Element.prototype.prepend=function(Q){this.insertBefore(Q,this.firstChild);return this};Element.prototype.putBefore=function(R){var Q=y(R).getParent();if(Q){Q.insertBefore(this,R)}return this};Element.prototype.putAfter=function(R){var Q=y(R).getParent();if(Q){Q.insertBefore(this,R.nextSibling)}return this};Element.prototype.replace=function(T,R){var Q=y(T);var S=Q.getParent();if(S){if(!R){Array.from(I(Q).getElementsByTagName("*")).forEach(I)}S.replaceChild(Q,this)}return this};Element.prototype.remove=function(Q){var R=this.getParent();if(R){if(!Q){Array.from(I(this).getElementsByTagName("*")).forEach(I)}R.removeChild(this)}return this};Element.prototype.empty=function(){Array.from(this.getElementsByTagName("*")).forEach(I);while(this.firstChild){this.removeChild(this.firstChild)}return this};var f={};var E=/^(\w+)(\.\w+)?(?::relay\(([^\)]+)\))?$/;var H=/^(\w*)(?:\.([\w\-]+))?$/;var v={mousedown:1,mouseup:1,click:1,dblclick:1,contextmenu:1,mousemove:1,mouseover:1,mouseout:1,mousewheel:1,mouseenter:1,mouseleave:1,mousedragstart:1,mousedrag:1,mousedragend:1,keydown:2,keyup:2,keypress:2,focus:4,blur:4,focusin:0,focusout:0,select:4,input:4,change:4,submit:4,reset:4,scroll:4,resize:4,load:4,unload:4,error:4,domready:4,beforeunload:4};var J=function(){return true};var N=function(){return false};function G(W,T){this.originalEvent=W;this.type=T;var U=v[T]||0;this.isMouseEvent=!!(U&1);this.isKeyboardEvent=!!(U&2);this.bubbles=!(U&4);var V="target" in W?W.target:W.srcElement||document;if(V.nodeType===3){V=V.parentNode}this.target=y(V);var Q="relatedTarget" in W?W.relatedTarget:("fromElement" in W?(W.fromElement===V?W.toElement:W.fromElement):null);if(Q){this.relatedTarget=y(Q)}this.timeStamp=W.timeStamp||Date.now();if(this.isMouseEvent||this.isKeyboardEvent){this.ctrlKey=!!W.ctrlKey;this.altKey=!!W.altKey;this.shiftKey=!!W.shiftKey;this.metaKey=!!W.metaKey;if(this.isMouseEvent){this.clientX=W.clientX||0;this.clientY=W.clientY||0;this.screenX=W.screenX||0;this.screenY=W.screenY||0;if("pageX" in W){this.pageX=W.pageX;this.pageY=W.pageY}else{var S=window.getPageOffset();this.pageX=this.clientX+S.x;this.pageY=this.clientY+S.y}if("which" in W){var X=W.which;this.leftButton=X===1;this.middleButton=X===2;this.rightButton=X===3}else{var R=W.button;this.leftButton=!!(R&1);this.middleButton=!!(R&4);this.rightButton=!!(R&2)}}else{this.which=W.which||W.charCode||W.keyCode||0}}}Object.append(G.prototype,{stopPropagation:function(){var Q=this.originalEvent;Q.stopPropagation?Q.stopPropagation():Q.cancelBubble=true;this.isPropagationStopped=J},isPropagationStopped:N,preventDefault:function(){var Q=this.originalEvent;Q.preventDefault?Q.preventDefault():Q.returnValue=false;this.isDefaultPrevented=J},isDefaultPrevented:N,stopImmediatePropagation:function(){this.stopPropagation();this.isImmediatePropagationStopped=J},isImmediatePropagationStopped:N});var n=function(R){var Q={};var S;if(R&&(S=R.match(E))){Q.type=S[1];Q.label=S[2]||"";Q.selector=S[3]||""}if(Q.type+Q.label+(Q.selector?":relay("+Q.selector+")":"")!==R){throw new Error('Invalid event name "'+R+'"')}return Q};var P="addEventListener" in window?function(R,T,S,Q){R.addEventListener(T,S,Q)}:function(Q,S,R){Q.attachEvent("on"+S,R)};var d="removeEventListener" in window?function(R,T,S,Q){R.removeEventListener(T,S,Q)}:function(Q,S,R){Q.detachEvent("on"+S,R)};var i={mousedragstart:{related:["mousedrag","mousedragend"]},mousedrag:{related:["mousedragstart","mousedragend"]},mousedragend:{related:["mousedragstart","mousedrag"]},input:{dispatchers:{},setup:function(Q){Q.currentValue=Q.value;P(document,"selectionchange",this.dispatchers[Q.uid]=function(){if(Q.currentValue!==Q.value){Q.currentValue=Q.value;Q.fire("input")}})},teardown:function(Q){d(document,"selectionchange",this.dispatchers[Q.uid]);delete this.dispatchers[Q.uid]}},change:{dispatcher:function(Q){if(Q.propertyName==="checked"){Q.srcElement.changed=true}},setup:function(Q){P(Q,"propertychange",this.dispatcher)},teardown:function(Q){d(Q,"propertychange",this.dispatcher)}}};var h=function(aa,U,Q,T){var W=U.delegateCount;var S=W?Q.target:aa;var R={};var X;var ab;var V;var Z;var Y;while(S){if(S!==aa){X=true;Z=0;Y=W}else{X=false;Z=W;Y=U.length}while(Z<Y){ab=U[Z];V=ab.selector;if(!V||(R[V]||(R[V]=function(ad){if(ad){return function(ae){var af=ad.tagName;var ag=ad.className;return(af?ae.nodeName===af:true)&&(ag?ae.hasClass(ag):true)}}else{var ac=aa.find(V);return function(ae){return ac.contains(ae)}}}(ab.simpleSelector)))(S)){if(!T||T.call(S,Q)){if(ab.listener.call(S,Q)===false){Q.stopPropagation();Q.preventDefault()}if(Q.isImmediatePropagationStopped()){break}}}Z++}if(Q.isPropagationStopped()||!X){break}S=S.getParent()}return Q};var I=function(T){var S=T.uid;if(!S){return T}var U=f[S];if(!U){return T}var R=Object.keys(U);var Q;while(R.length){Q=U[R.shift()];while(Q.length){T.off(Q[0].name)}}return T};Element.prototype.on=function(ai,U){var W=this.uid;if(!W){return this}var aa=this;if(ai.contains(",")){ai.split(p).forEach(function(aj){Element.prototype.on.call(aa,aj,U)});return aa}var af=n(ai);var T=af.type;var ad=af.selector;var ag=f[W]||(f[W]={});var ac=ag[T]||(ag[T]=[]);if(!ac.dispatcher){var V=function(aj){h(aa,ac,new G(aj||window.event,T))};V.type=T;V.useCapture=false;switch(T){case"mousewheel":V=function(al){al=al||window.event;var ak=new G(al,T);var aj="wheelDelta" in al?-al.wheelDelta:al.detail||0;ak.wheelUp=aj<0;ak.wheelDown=aj>0;h(aa,ac,ak)};V.type=navigator.isFirefox?"DOMMouseScroll":"mousewheel";break;case"mouseenter":case"mouseleave":V=function(aj){h(aa,ac,new G(aj||window.event,T),function(al){var ak=al.relatedTarget;return !ak||!this.contains(ak)})};V.type=T==="mouseenter"?"mouseover":"mouseout";break;case"mousedragstart":case"mousedrag":case"mousedragend":var Z={};var ah=null;var ab=function(al){var ak=new G(al||window.event,"mousedragstart");ak.offsetX=ak.offsetY=0;if(!ak.leftButton||h(aa,Z.mousedragstart,ak).isDefaultPrevented()){return}var aj=ak.target;if(aj.setCapture){aj.setCapture()}ak.preventDefault();ah={target:aj,startX:ak.pageX,startY:ak.pageY};ah.lastEvent=ak;P(document,"mousemove",ae);P(document,"mousedown",Y);P(document,"mouseup",Y);P(window,"blur",Y)};var ae=function(ak){var aj=new G(ak||window.event,"mousedrag");aj.target=ah.target;aj.offsetX=aj.pageX-ah.startX;aj.offsetY=aj.pageY-ah.startY;h(aa,Z.mousedrag,aj);ah.lastEvent=aj};var Y=function(al){var ak=new G(al||window.event,"mousedragend");if(al.type==="mousedown"&&ak.leftButton){return}var aj=ah.target;if(aj.releaseCapture){aj.releaseCapture()}ak=ah.lastEvent;ak.type="mousedragend";h(aa,Z.mousedragend,ak);ah=null;d(document,"mousemove",ae);d(document,"mousedown",Y);d(document,"mouseup",Y);d(window,"blur",Y)};V=ab;V.type="mousedown";Z[T]=ac;i[T].related.forEach(function(ak){var aj=[];aj.dispatcher=V;aj.delegateCount=0;Z[ak]=ag[ak]=aj});break;case"focusin":case"focusout":if(navigator.isFirefox){V.type=T==="focusin"?"focus":"blur";V.useCapture=true}break;case"input":var Q=aa.nodeName;var S=aa.type;if(navigator.isIElt10&&(Q==="TEXTAREA"||Q==="INPUT"&&(S==="text"||S==="password"))){if(navigator.isIE9){i.input.setup(aa);V=function(aj){aa.currentValue=aa.value;h(aa,ac,new G(aj||window.event,T))};V.type="input"}else{if(navigator.isIE8&&Q==="TEXTAREA"){i.input.setup(aa);V=function(aj){if(aj.propertyName==="value"&&aa.currentValue!==aa.value){aa.currentValue=aa.value;h(aa,ac,new G(aj||window.event,T))}};V.type="propertychange"}else{V=function(aj){if(aj.propertyName==="value"){h(aa,ac,new G(aj||window.event,T))}};V.type="propertychange"}}}break;case"change":if(navigator.isIElt9&&aa.nodeName==="INPUT"&&(aa.type==="checkbox"||aa.type==="radio")){i.change.setup(aa);V=function(ak){var aj=ak.srcElement;if(aj.changed){aj.changed=false;h(aa,ac,new G(ak||window.event,T))}};V.type="click"}break}P(aa,V.type,V,V.useCapture);ac.dispatcher=V;ac.delegateCount=0}var R={name:ai,listener:U};if(ad){R.selector=ad;var X;if(X=ad.match(H)){R.simpleSelector={tagName:X[1].toUpperCase(),className:X[2]||""}}ac.splice(ac.delegateCount++,0,R);if(v[T]&4){navigator.warn('Incompatible event delegation type "'+ai+'".')}}else{ac.push(R)}return aa};Element.prototype.off=function(Q){var U=this.uid;if(!U){return this}var W=this;if(Q.contains(",")){Q.split(p).forEach(function(aa){Element.prototype.off.call(W,aa)});return W}var V=n(Q).type;var X=f[U];if(!X){return W}var S=X[V];if(!S){return W}var T=0;var Y;while(T<S.length){Y=S[T];if(Y.name===Q){S.splice(T,1);if(Y.selector){S.delegateCount--}}else{T++}}if(S.length===0){var Z=S.dispatcher;switch(V){case"mousedragstart":case"mousedrag":case"mousedragend":var R=0;i[V].related.forEach(function(aa){R+=X[aa].length});if(R){return W}d(W,Z.type,Z);i[V].related.forEach(function(ab){var aa=X[ab].dispatcher;d(W,aa.type,aa);delete X[ab]});break;case"input":if(i.input.dispatchers[W.uid]){i.input.teardown(W)}d(W,Z.type,Z);break;case"change":if(navigator.isIElt9&&W.nodeName==="INPUT"&&(W.type==="checkbox"||W.type==="radio")){i.change.teardown(W)}d(W,Z.type,Z);break;default:d(W,Z.type,Z,Z.useCapture)}delete X[V]}if(Object.keys(X).length===0){delete f[U]}return W};Element.prototype.fire=function(S,V){var U;var R;var W={type:"",target:this,stopPropagation:J,preventDefault:J};var T=Object.append(new G(W,S),V||{},{blackList:["originalEvent"]});var Q=this;while(Q){if(R=(U=f[Q.uid])&&U[S]){T=h(Q,R,T)}if(!T.bubbles||T.isPropagationStopped()||Q===window){break}Q=Q===document?window:Q.getParent()||Q===w&&document||null}return this};var O=function(R){var Q=[];if(R.nodeType){switch(R.type){case"select-one":case"select-multiple":if(!R.disabled){Array.from(R.options).forEach(function(S){if(!S.disabled&&!S.parentNode.disabled&&S.selected&&S.value){Q.push(S.value)}})}break;case"radio":case"checkbox":if(!R.disabled&&R.checked&&R.value){Q.push(R.value)}break;default:Q=R.disabled?"":R.value;break}}else{R.forEach(function(T){var S=O(T);if(S){Q=Q.concat(S)}})}return Q};HTMLFormElement.prototype.getFieldValue=function(Q){var R=this.elements[Q];return O(R.nodeType?R:Array.from(R))};document.uid="document";var z=/^<(\w+)/;var K={area:[1,"<map>","</map>"],legend:[1,"<fieldset>","</fieldset>"],option:[1,"<select>","</select>"],tbody:[1,"<table><tbody></tbody>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]};K.optgroup=K.option;K.thead=K.tfoot=K.colgroup=K.caption=K.tbody;K.th=K.td;if(navigator.isIElt9){K.link=K.style=K.script=[1,"#<div>","</div>"]}document.$=function(R){var Q=null;switch(typeof R){case"string":if(R.charAt(0)==="<"&&R.charAt(R.length-1)===">"){var U=K[(z.exec(R)||["",""])[1].toLowerCase()]||[0,"",""];var S=U[0]+1;var T=document.createElement("div");Q=T;T.innerHTML=U[1]+R+U[2];while(S--){Q=Q.lastChild}Q=Q&&Q.nodeType===1?Q:T}else{if(R.charAt(0)==="#"){Q=document.getElementById(R.slice(1))}}break;case"object":if(R.nodeType===1){Q=R}break}return y(Q)};var s=function(){var T=[];var S=function(V){setTimeout(function(){V.call(document)},0)};var U=function(){if(T){if(document.body){T.forEach(S);T=null}else{setTimeout(U,10)}}};var R;if("addEventListener" in document){R=function(){document.removeEventListener("DOMContentLoaded",R,false);window.removeEventListener("load",R,false);U()};document.addEventListener("DOMContentLoaded",R,false);window.addEventListener("load",R,false)}else{R=function(W,V){if(V||document.readyState==="complete"){document.detachEvent("onreadystatechange",R);window.detachEvent("onload",R);U()}};document.attachEvent("onreadystatechange",R);window.attachEvent("onload",R);if(window==top&&w.doScroll){(function Q(){try{w.doScroll("left")}catch(V){setTimeout(Q,10);return}R(null,true)})()}}return{addListener:function(V){T?T.push(V):S(V)}}}();document.on=function(R,S){var Q=R.split(p).filter(function(T){if(T==="domready"){s.addListener(S);return false}return true}).join(", ");if(Q){Element.prototype.on.call(document,Q,S)}return this};document.off=Element.prototype.off;document.fire=Element.prototype.fire;document.preloadImages=function(Q){Q.forEach(function(R){new Image().src=R})};window.uid="window";window.getClientSize=function(){return{width:w.clientWidth,height:w.clientHeight}};window.getScrollSize=function(){var Q=document.body;return{width:Math.max(w.scrollWidth,Q.scrollWidth,w.clientWidth),height:Math.max(w.scrollHeight,Q.scrollHeight,w.clientHeight)}};window.getPageOffset=function(){var Q=document.body;return{x:w.scrollLeft||Q.scrollLeft,y:w.scrollTop||Q.scrollTop}};window.on=function(R,S){var Q=R.split(p).filter(function(T){if(T==="beforeunload"){window.onbeforeunload=function(){return S.call(window)};return false}return true}).join(", ");if(Q){Element.prototype.on.call(window,Q,S)}return this};window.off=function(R){var Q=R.split(p).filter(function(S){if(S==="beforeunload"){window.onbeforeunload=null;return false}return true}).join(", ");if(Q){Element.prototype.off.call(window,Q)}return this};window.fire=Element.prototype.fire})();(function(){var a=/\s*,\s*/;var c=/^(\w+)(\.\w+)?$/;function e(f,g){this.type=f;this.target=g}var d=function(g){var f={};var h;if(g&&(h=g.match(c))){f.type=h[1];f.label=h[2]||""}if(f.type+f.label!==g){throw new SyntaxError('Invalid event name "'+g+'"')}return f};function b(i,h,g){var j=i.length;var f=function(){this.options=Object.clone(f.options);var k=Array.from(arguments);if(k.length>j){this.setOptions(k[j]);k.length=j}this.events={};i.apply(this,k)};f.options=h||{};f.prototype=this;if(g){Object.append(f.prototype,g)}f.prototype.constructor=f;return f}b.prototype.setOptions=function(f){Object.append(this.options,f||{},{whiteList:Object.keys(this.options)});return this};b.prototype.on=function(h,k){var g=this;if(h.contains(",")){h.split(a).forEach(function(l){b.prototype.on.call(g,l,k)});return g}var i=g.events;var j=d(h).type;var f=i[j]||(i[j]=[]);f.push({name:h,listener:k});return g};b.prototype.off=function(h){var g=this;if(h.contains(",")){h.split(a).forEach(function(i){b.prototype.off.call(g,i)});return g}var k=g.events;var m=d(h).type;var f=k[m];if(!f){return g}var j=0;var l;while(j<f.length){l=f[j];if(l.name===h){f.splice(j,1)}else{j++}}if(f.length===0){delete k[m]}return g};b.prototype.fire=function(h,j){var g=this;var f=g.events[h];if(f){var i=Object.append(new e(h,g),j||{});f.forEach(function(k){k.listener.call(g,i)})}return g};window.Component=b})();(function(){var a=new Component(function(b){this.items=b;this.activeItem=null;this.activeIndex=-1});a.prototype.active=function(h){var f=this;var e=null;var c=-1;var b;if(typeof h==="number"){b=f.items[h];if(b){e=b;c=h}}else{b=f.items.indexOf(h);if(b>-1){e=h;c=b}}var d=f.activeItem;var g=f.activeIndex;if(c!==g){f.activeItem=e;f.activeIndex=c;f.fire("active",{activeItem:e,activeIndex:c,inactiveItem:d,inactiveIndex:g})}return f};window.Switcher=a})();(function(){var f=0;var l={};var o=-2;var i=-1;var s=0;var b=1;var k=2;var g=-1;var e=0;var p=1;var j=function(w,v,F,E){var u=0,D=0,B=0,G=0,C=0,A=0;var z=function(H){return((u*H+D)*H+B)*H};var y=function(H){return((G*H+C)*H+A)*H};var x=function(J){var N,M,K,H,L,I;var O=0.001;for(K=J,I=0;I<8;I++){H=z(K)-J;if(Math.abs(H)<O){return K}L=(3*u*K+2*D)*K+B;if(Math.abs(L)<0.000001){break}K=K-H/L}N=0;M=1;K=J;if(K<N){return N}if(K>M){return M}while(N<M){H=z(K);if(Math.abs(H-J)<O){return K}if(J>H){N=K}else{M=K}K=(M-N)*0.5+N}return K};B=3*w;D=3*(F-w)-B;u=1-B-D;A=3*v;C=3*(E-v)-A;G=1-A-C;return function(H){return y(x(H))}};var c={linear:function(u){return u},bounceIn:function(v){v=1-v;var z;for(var w=0,u=1;1;w+=u,u/=2){if(v>=(7-4*w)/11){z=u*u-Math.pow((11-6*w-11*v)/4,2);break}}return 1-z},bounceOut:function(v){var z;for(var w=0,u=1;1;w+=u,u/=2){if(v>=(7-4*w)/11){z=u*u-Math.pow((11-6*w-11*v)/4,2);break}}return z},ease:j(0.25,0.1,0.25,1),easeIn:j(0.42,0,1,1),easeOut:j(0,0,0.58,1),easeInOut:j(0.42,0,0.58,1),easeOutIn:j(0,0.42,1,0.58)};var m=function(u){u=u||"";return c[u]||(u.startsWith("cubicBezier")?j.apply(null,u.slice(12,-1).split(",").map(function(v){return parseFloat(v)})):c.ease)};var a=function(u,w,v){u.clips.forEach(function(z){var B=false;var A=z.duration;var y=(w-z.delay)/Math.max(1,A);if(v){if(z.status===p){return}if(z.status===g){if(y>=0){y=A?0:1;z.status=e}}if(z.status===e){B=true;if(y>=1){y=1;z.status=p}}}else{if(z.status===g){return}if(z.status===p){if(y<=1){y=A?1:0;z.status=e}}if(z.status===e){B=true;if(y<=0){y=0;z.status=g}}}if(B){z.call(u,y,y===0?0:(y===1?1:z.timingFunction(y)))}});u.fire("step");if(v){if(w===u.duration){if(u.timestamp){n(u)}u.status=k;u.fire("playfinish")}}else{if(w===0){if(u.timestamp){n(u)}u.status=o;u.fire("reversefinish")}}};var r;var d={};var t=0;var h=function(u){u.timestamp=Date.now();d[u.uid]=u;t++;if(!r){r=setInterval(function(){var v=Date.now();Object.forEach(d,function(w){var y=w.status===b;var x=Math.limit(w.timePoint+(v-w.timestamp)*(y?1:-1),0,w.duration);w.timestamp=v;w.timePoint=x;a(w,x,y)});if(t===0){clearInterval(r);r=undefined}},16)}};var n=function(u){delete u.timestamp;delete d[u.uid];t--};var q=new Component(function(){this.uid=++f;this.clips=[];this.timePoint=0;this.status=o;this.duration=0});q.prototype.addClip=function(w,u,x,v){w.delay=u;w.duration=x;w.timingFunction=m(v);w.status=g;this.clips.push(w);this.duration=Math.max(this.duration,u+x);return this};q.prototype.play=function(v){var w=this;var z=v!==l;var u=w.status;if(z&&u!=b&&u!=k||!z&&u!=i&&u!=o){if(z){w.status=b;w.fire("play");if(u===o&&w.status===b){w.fire("playstart")}}else{w.status=i;w.fire("reverse");if(u===k&&w.status===i){w.fire("reversestart")}}if(!w.timestamp&&(w.status===b||w.status===i)){var y=w.timePoint;var x=w.duration;a(w,y,z);if(z?y!==x:y!==0){h(w)}}}return w};q.prototype.reverse=function(){return this.play(l)};q.prototype.pause=function(){var u=this;if(u.status===b||u.status===i){if(u.timestamp){n(u)}u.status=s;u.fire("pause")}return u};q.prototype.stop=function(){var u=this;if(u.status!==o){if(u.timestamp){n(u)}u.timePoint=0;u.status=o;u.clips.forEach(function(v){v.call(u,0,0);v.status=g});u.fire("stop")}return u};window.Animation=q})();(function(){var k=1;var e=2;var f=4;var b={};var l=["opacity"];var g=["top","right","bottom","left","width","height","outlineWidth","backgroundPositionX","backgroundPositionY","fontSize","lineHeight","letterSpacing","wordSpacing","textIndent"];g.push("margin","padding","borderWidth","borderColor");var o=["color","backgroundColor","outlineColor"];["Top","Right","Bottom","Left"].forEach(function(r){g.push("margin"+r,"padding"+r,"border"+r+"Width");o.push("border"+r+"Color")});l.forEach(function(r){b[r]=k});g.forEach(function(r){b[r]=e});o.forEach(function(r){b[r]=f});var n=function(s){var r=parseFloat(s);return isFinite(r)?r:0};var m={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8B",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};var d=/^#([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i;var q=/^#([\da-f])([\da-f])([\da-f])$/i;var c=/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/;var a=function(t){var s=[255,255,255];if(m.hasOwnProperty(t)){t=m[t]}var r;if(r=t.match(d)){s=Array.from(r).slice(1).map(function(u){return parseInt(u,16)})}else{if(r=t.match(q)){s=Array.from(r).slice(1).map(function(u){return parseInt(u+u,16)})}else{if(r=t.match(c)){s=Array.from(r).slice(1).map(function(u){return +u})}}}return s};var p=/^[+\-]=\d+$/;var j=function(s,r){var t=s.getStyles(Object.keys(r));var u={before:{},after:{}};Object.forEach(t,function(w,v){var x=r[v];switch(b[v]){case k:u.before[v]=n(w);u.after[v]=n(x);break;case e:u.before[v]=w=n(w);if(typeof x==="string"&&p.test(x)){u.after[v]=w+(+(x.slice(0,1)+"1")*+x.slice(2))}else{u.after[v]=n(x)}break;case f:u.before[v]=a(w);u.after[v]=a(x);break}});return u};var i=function(r){return"rgb("+r[0]+", "+r[1]+", "+r[2]+")"};Animation.createBasicRenderer=function(r){r.type="basic";return r};var h=document.$;Animation.createStyleRenderer=function(s,t){var r=h(s);var v=j(r,t);var u=function(w,z){Object.forEach(v.before,function(A,x){var B=v.after[x];var y;switch(b[x]){case k:y=(A+(B-A)*z).toFixed(2);break;case e:y=Math.floor(A+(B-A)*z)+"px";break;case f:y=i([Math.floor(A[0]+(B[0]-A[0])*z),Math.floor(A[1]+(B[1]-A[1])*z),Math.floor(A[2]+(B[2]-A[2])*z)]);break}r.setStyle(x,y)})};u.type="style";return u}})();(function(){var c=function(){};var a={};var b=function(e){var f=e.uid;return a[f]||(a[f]={})};var d=function(p,g,r){var l=b(p);if(l[g]){return p}var q=g==="fadeIn";var k=q?"fadeOut":"fadeIn";r=Object.append({duration:200,timingFunction:"easeIn",onStart:c,onFinish:c},r||{});var o=function(s){r.onStart.call(p,s)};var m=function(s){delete l[g];r.onFinish.call(p,s)};if(l[k]){var h=l[k].off("play.callback, playfinish.callback, reverse.callback, reversefinish.callback");l[g]=h;delete l[k];if(h.originalFadeMode===g){h.on("play.callback",o).on("playfinish.callback",m).play()}else{h.on("reverse.callback",o).on("reversefinish.callback",m).reverse()}return p}var n=p.getStyle("display")==="none";if(q?n:!n){var e=p.getStyle("opacity");var j=function(){p.setStyles({display:"block",opacity:0})};var f=function(){p.setStyles({display:"none",opacity:e})};var i=new Animation().addClip(Animation.createBasicRenderer(function(s,t){p.setStyle("opacity",(e*(q?t:1-t)).toFixed(2))}),0,r.duration,r.timingFunction);if(q){i.on("playstart",j).on("reversefinish",f)}else{i.on("reversestart",j).on("playfinish",f)}i.originalFadeMode=g;l[g]=i.on("play.callback",o).on("playfinish.callback",m);l[g].play()}return p};Element.prototype.morph=function(g,f){var e=this;f=Object.append({duration:400,timingFunction:"ease",onStart:c,onFinish:c},f||{});var h=b(e);if(h.morph){h.morph.pause()}h.morph=new Animation().addClip(Animation.createStyleRenderer(e,g),0,f.duration,f.timingFunction).on("playstart",function(i){f.onStart.call(e,i)}).on("playfinish",function(i){delete h.morph;f.onFinish.call(e,i)});h.morph.play();return e};Element.prototype.highlight=function(f,l,g){var e=this;f=f||"yellow";l=l||"backgroundColor";g=Object.append({duration:500,timingFunction:"easeIn",onStart:c,onFinish:c},g||{});var k;var j=b(e);if(j.highlight){var i=j.highlight.pause();if(l===i.highlightProperty){k=i.originalColor}else{e.setStyle(i.highlightProperty,i.originalColor)}}if(!k){k=e.getStyle(l)}var h={};h[l]=k;j.highlight=new Animation().on("playstart",function(m){e.setStyle(l,f);this.addClip(Animation.createStyleRenderer(e,h),0,g.duration,g.timingFunction);g.onStart.call(e,m)}).on("playfinish",function(m){delete j.highlight;g.onFinish.call(e,m)});j.highlight.originalColor=k;j.highlight.highlightProperty=l;j.highlight.play();return e};Element.prototype.fadeIn=function(e){d(this,"fadeIn",e);return this};Element.prototype.fadeOut=function(e){d(this,"fadeOut",e);return this}})();(function(){var e=0;var b=-498;var c=-408;var g=Date.now();var f=function(){};var h=function(){try{var l=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")}catch(k){l=null}return l};var d=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg;var j=function(m){var l={};var k;while(k=d.exec(m)){l[k[1]]=k[2]}return l};var i=function(n,k){var t=n.options;if(t.async){if(Number.isFinite(t.minTime)){if(n.minTimeTimer){k=e;clearTimeout(n.minTimeTimer);delete n.minTimeTimer}else{if(k===e){n.minTimeTimer=setTimeout(function(){i(n,e)},Math.max(0,t.minTime-(Date.now()-n.timestamp)));return}}}if(n.maxTimeTimer){clearTimeout(n.maxTimeTimer);delete n.maxTimeTimer}}var s=n.xhr;s.onreadystatechange=f;delete n.timestamp;var o=0;var m="";var l={};var r="";var p=null;switch(k){case e:try{o=s.status;if(o===1223){o=204}m=s.statusText;l=j(s.getAllResponseHeaders());r=s.responseText;if(s.responseXML&&s.responseXML.documentElement){p=s.responseXML}}catch(q){}break;case b:o=b;m="Abort";s.abort();break;case c:o=c;m="Timeout";s.abort();break}n.fire("finish",t.responseParser.call(n,{status:o,statusText:m,headers:l,text:r,xml:p}))};var a=new Component(function(k){this.xhr=h();this.url=k});a.options={username:"",password:"",method:"get",headers:{"X-Requested-With":"XMLHttpRequest",Accept:"*/*"},contentType:"application/x-www-form-urlencoded",useCache:true,async:true,minTime:undefined,maxTime:undefined,requestParser:function(k){return k?k+"":""},responseParser:function(k){return k}};a.prototype.send=function(m){var o=this;var l=o.options;var p=o.xhr;if(o.timestamp||!p){return o}o.fire("send",{data:m});m=l.requestParser.call(o,m);o.fire("start",{data:m});var k=o.url;var q=l.method.toLowerCase();var n=l.async;if(q==="get"&&m){k+=(k.contains("?")?"&":"?")+m;m=""}if(!l.useCache){k+=(k.contains("?")?"&":"?")+ ++g}if(l.username){p.open(q,k,n,l.username,l.password)}else{p.open(q,k,n)}if(q==="post"){p.setRequestHeader("Content-Type",l.contentType)}Object.forEach(l.headers,function(s,r){p.setRequestHeader(r,s)});p.send(m||null);o.timestamp=Date.now();if(n&&Number.isFinite(l.maxTime)){o.maxTimeTimer=setTimeout(function(){i(o,c)},Math.max(0,l.maxTime))}if(!n||p.readyState===4){i(o,e)}else{p.onreadystatechange=function(){if(p.readyState===4){i(o,e)}}}return o};a.prototype.abort=function(){var k=this;if(k.timestamp){i(k,b);k.fire("abort")}return k};window.Request=a})();(function(){var d=document.$;var b={};var c={};c.cache={};var a=/^\w+$/;window.declareModule=function(j,e,h){if(!a.test(j)){throw new Error("[declareModule] 非法 id: "+j)}if(b[j]){throw new Error("[declareModule] id 已存在: "+j)}var i=b[j]={};var g=function(l,k){(i[l]||(i[l]=[])).push(k)};var f=function(n,o){var m=j+"."+n;var l=c.cache;if(l){(l[m]||(l[m]=[])).push(o)}else{var k=c[m];if(k){k.forEach(function(p){p(o)})}}};h?document.on("domready",function(){e(g,f,d)}):e(g,f,d)};window.runApplication=function(e,h){var g=function(i,k){if(i.contains(",")){var m=i.split(/,\s*/);var j=[];m.forEach(function(o,n,p){g(o,function(r){j[n]=r;var q=p.length;while(j.hasOwnProperty(--q)){}if(q===-1){k.apply(null,j)}})})}else{(c[i]||(c[i]=[])).push(k);if(c.cache){var l=c.cache[i];if(l){l.forEach(function(n){k(n)})}}}};var f=function(j,l){var m=j.split(".");var k=b[m[0]];if(k){var i=k[m[1]];if(i){i.forEach(function(n){n(l)})}}};h?document.on("domready",function(){e(g,f,d)}):e(g,f,d);delete c.cache}})();(function(){var a=document.$;window.execute=function(b,c){c?document.on("domready",function(){b(a)}):b(a)}})();
/*!
* JSON in JavaScript
* Douglas Crockford
* http://www.JSON.org/json2.js
* 2011-10-19
* Public Domain.
*/
(function(){if(!window.JSON){window.JSON={toString:function(){return"[object JSON]"}}}function f(n){return n<10?"0"+n:n}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null};String.prototype.toJSON=Boolean.prototype.toJSON=Number.prototype.toJSON=function(key){return this.valueOf()}}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+string+'"'}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)}if(typeof rep==="function"){value=rep.call(holder,key,value)}switch(typeof value){case"string":return quote(value);case"number":return isFinite(value)?String(value):"null";case"boolean":case"null":return String(value);case"object":if(!value){return"null"}gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||"null"}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";gap=mind;return v}if(rep&&typeof rep==="object"){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==="string"){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?": ":":")+v)}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";gap=mind;return v}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;gap="";indent="";if(typeof space==="number"){for(i=0;i<space;i+=1){indent+=" "}}else{if(typeof space==="string"){indent=space}}rep=replacer;if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")}return str("",{"":value})}}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==="object"){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}}return reviver.call(holder,key,value)}text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");return typeof reviver==="function"?walk({"":j},""):j}throw new SyntaxError("JSON.parse")}}})();
/*!
* Sizzle CSS Selector Engine
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
* Version: jquery-sizzle-1.5.1-86-g3136f48
* More information: http://sizzlejs.com/
*/
(function(T,r){var e=T.document,j=e.documentElement,W="sizcache"+(Math.random()+"").replace(".",""),p=0,d=Object.prototype.toString,C=Array.prototype.concat,D="undefined",m=false,h=true,O=/^#([\w\-]+$)|^(\w+$)|^\.([\w\-]+$)/,N=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,B=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,U=/^[+~]$/,A=/\\(?!\\)/g,X=/\W/,g=/^\w/,u=/\D/,f=/(-?)(\d*)(?:n([+\-]?\d*))?/,y=/^\+|\s*/g,x=/h\d/i,P=/input|select|textarea|button/i,n=/[\t\n\f\r]/g,t="(?:[-\\w]|[^\\x00-\\xa0]|\\\\.)",K={ID:new RegExp("#("+t+"+)"),CLASS:new RegExp("\\.("+t+"+)"),NAME:new RegExp("\\[name=['\"]*("+t+"+)['\"]*\\]"),TAG:new RegExp("^("+t.replace("[-","[-\\*")+"+)"),ATTR:new RegExp("\\[\\s*("+t+"+)\\s*(?:(\\S?=)\\s*(?:(['\"])(.*?)\\3|(#?"+t+"*)|)|)\\s*\\]"),PSEUDO:new RegExp(":("+t+"+)(?:\\((['\"]?)((?:\\([^\\)]+\\)|[^\\(\\)]*)+)\\2\\))?"),CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/},Q=K.POS,R=(function(){var Z,aa=function(ac,ab){return"\\"+(ab-0+1)},Y={};for(Z in K){K[Z]=new RegExp(K[Z].source+(/(?![^\[]*\])(?![^\(]*\))/.source));Y[Z]=new RegExp(/(^(?:.|\r|\n)*?)/.source+K[Z].source.replace(/\\(\d+)/g,aa))}K.globalPOS=Q;return Y})(),l={},F={},E={},M=function(Y){var Z=false,ab=e.createElement("div");try{Z=Y(ab)}catch(aa){}ab=null;return Z},w=M(function(Z){Z.innerHTML="<select></select>";var Y=typeof Z.lastChild.getAttribute("multiple");return Y!=="boolean"&&Y!=="string"}),i=M(function(aa){var Y=true,Z="script"+(new Date()).getTime();aa.innerHTML="<a name ='"+Z+"'/>";j.insertBefore(aa,j.firstChild);if(e.getElementById(Z)){Y=false}j.removeChild(aa);return Y}),c=M(function(Y){Y.appendChild(e.createComment(""));return Y.getElementsByTagName("*").length===0}),I=M(function(Y){Y.innerHTML="<a href='#'></a>";return Y.firstChild&&typeof Y.firstChild.getAttribute!==D&&Y.firstChild.getAttribute("href")==="#"}),H=M(function(Y){Y.innerHTML="<div class='test e'></div><div class='test'></div>";if(!Y.getElementsByClassName||Y.getElementsByClassName("e").length===0){return false}Y.lastChild.className="e";return Y.getElementsByClassName("e").length!==1});var S=function(ac,Y,ae,ag){ae=ae||[];Y=Y||e;var af,Z,ab,aa,ad=Y.nodeType;if(ad!==1&&ad!==9){return[]}if(!ac||typeof ac!=="string"){return ae}ab=v(Y);if(!ab&&!ag){if((af=O.exec(ac))){if((aa=af[1])){if(ad===9){Z=Y.getElementById(aa);if(Z&&Z.parentNode){if(Z.id===aa){return s([Z],ae)}}else{return s([],ae)}}else{if(Y.ownerDocument&&(Z=Y.ownerDocument.getElementById(aa))&&G(Y,Z)&&Z.id===aa){return s([Z],ae)}}}else{if(af[2]){return s(Y.getElementsByTagName(ac),ae)}else{if(H&&(aa=af[3])&&Y.getElementsByClassName){return s(Y.getElementsByClassName(aa),ae)}}}}}return V(ac,Y,ae,ag,ab)};var V=function(am,ab,ai,ad,ae){var ak,ah,ar,aa,at,ac,ag,aj,an,ao,aq,au,af,al,Y=ab,Z=true,ap=am;if((aj=l[am])===r){aj=[];do{B.exec("");ak=B.exec(ap);if(ak){ap=ak[3];aj.push(ak[1]);if(ak[2]){aa=ak[3];break}}}while(ak);l[am]=aj&&aj.slice(0);F[am]=aa}else{aj=aj.slice(0);aa=F[am]}if(aj.length>1&&Q.exec(am)){if(aj.length===2&&L.relative[aj[0]]){ah=z(aj[0]+aj[1],ab,ad,ae)}else{ah=L.relative[aj[0]]?[ab]:S(aj.shift(),ab);while(aj.length){am=aj.shift();if(L.relative[am]){am+=aj.shift()}ah=z(am,ah,ad,ae)}}}else{if(!ad&&aj.length>1&&ab.nodeType===9&&!ae&&K.ID.test(aj[0])&&!K.ID.test(aj[aj.length-1])){at=S.find(aj.shift(),ab,ae);ab=at.expr?S.filter(at.expr,at.set)[0]:at.set[0]}if(ab){at=ad?{expr:aj.pop(),set:s(ad)}:S.find(aj.pop(),(aj.length>=1&&U.test(aj[0])&&ab.parentNode)||ab,ae);ah=at.expr?S.filter(at.expr,at.set):at.set;if(aj.length>0){ar=s(ah);an=0;ao=ar.length;af=[];for(;an<ao;an++){af[an]=an}}else{Z=false}while(aj.length){ac=aj.pop();if(L.relative[ac]){ag=aj.pop()}else{ag=ac;ac=""}if(ag==null){ag=ab}L.relative[ac](ar,af,ag,ae);ar=C.apply([],ar);af=C.apply([],af)}}else{ar=aj=[]}}if(!ar){ar=ah}if(!ar){S.error(ac||am)}if(d.call(ar)==="[object Array]"){if(!Z){ai.push.apply(ai,ar)}else{au=ab&&ab.nodeType===1;ah=s(ah);for(an=0;(aq=ar[an])!=null;an++){if(aq===true||(aq.nodeType===1&&(!au||G(ab,aq)))){al=af?af[an]:an;if(ah[al]){ai.push(ah[al]);ah[al]=false}}}}}else{s(ar,ai)}if(aa){V(aa,Y,ai,ad,ae);o(ai)}return ai};S.matches=function(Y,Z){return S(Y,null,null,Z)};S.matchesSelector=function(Y,Z){return S(Z,null,null,[Y]).length>0};S.find=function(ag,Y,aa){var af,ab,ad,ac,ae,Z;if(!ag){return[]}for(ab=0,ad=L.order.length;ab<ad;ab++){ae=L.order[ab];if((ac=R[ae].exec(ag))){Z=ac[1];ac.splice(1,1);if(Z.substr(Z.length-1)!=="\\"){ac[1]=(ac[1]||"").replace(A,"");af=L.find[ae](ac,Y,aa);if(af!=null){ag=ag.replace(K[ae],"");break}}}}if(!af){af=L.find.TAG([0,"*"],Y)}return{set:af,expr:ag}};S.filter=function(aj,ai,am,ac){var Y,ah,ao,ad,Z,ab,al,ae,ak,af=E[aj],aa=aj,an=[],ag=ai&&ai[0]&&v(ai[0]);if(!af){af=N.exec(aj);if(af){af[1]=(af[1]||"").toLowerCase();af[3]=af[3]&&(" "+af[3]+" ");E[aj]=af}}if(af&&!ag){for(ae=0;(ad=ai[ae])!=null;ae++){if(ad){al=ad.attributes||{};ao=(!af[1]||(ad.nodeName&&ad.nodeName.toLowerCase()===af[1]))&&(!af[2]||(al.id||{}).value===af[2])&&(!af[3]||~(" "+((al["class"]||{}).value||"").replace(n," ")+" ").indexOf(af[3]));ak=ac^ao;if(am&&!ak){ai[ae]=false}else{if(ak){an.push(ad)}}}}if(!am){ai=an}return ai}while(aj&&ai.length){for(ah in L.filter){if((af=R[ah].exec(aj))&&af[2]){Z=L.filter[ah];ab=af[1];Y=false;af.splice(1,1);if(ab.substr(ab.length-1)==="\\"){continue}if(ai===an){an=[]}if(L.preFilter[ah]){af=L.preFilter[ah](af,ai,am,an,ac,ag);if(!af){Y=ao=true}else{if(af===true){continue}}}if(af){for(ae=0;(ad=ai[ae])!=null;ae++){if(ad){ao=Z(ad,af,ae,ai);ak=ac^ao;if(am&&ao!=null){if(ak){Y=true}else{ai[ae]=false}}else{if(ak){an.push(ad);Y=true}}}}}if(ao!==r){if(!am){ai=an}aj=aj.replace(K[ah],"");if(!Y){return[]}break}}}if(aj===aa){if(Y==null){S.error(aj)}else{break}}aa=aj}return ai};S.attr=function(aa,Z){if(L.attrHandle[Z]){return L.attrHandle[Z](aa)}if(w||v(aa)){return aa.getAttribute(Z)}var Y=(aa.attributes||{})[Z];return Y&&Y.specified?Y.value:null};S.error=function(Y){throw new Error("Syntax error, unrecognized expression: "+Y)};if(e.querySelectorAll){(function(){var ae,ag=V,Y="__sizzle__",ah=/[^\\],/g,ac=/^\s*[+~]/,aa=/'/g,ad=/\=\s*([^'"\]]*)\s*\]/g,Z=[],af=[],ab=j.matchesSelector||j.mozMatchesSelector||j.webkitMatchesSelector||j.oMatchesSelector||j.msMatchesSelector;M(function(ai){ai.innerHTML="<select><option selected></option></select>";if(!ai.querySelectorAll("[selected]").length){Z.push("\\[[\\x20\\t\\n\\r\\f]*(?:checked|disabled|ismap|multiple|readonly|selected|value)")}if(!ai.querySelectorAll(":checked").length){Z.push(":checked")}});M(function(ai){ai.innerHTML="<p test=''></p>";if(ai.querySelectorAll("[test^='']").length){Z.push("[*^$]=[\\x20\\t\\n\\r\\f]*(?:\"\"|'')")}ai.innerHTML="<input type='hidden'>";if(!ai.querySelectorAll(":enabled").length){Z.push(":enabled",":disabled")}});Z=Z.length&&new RegExp(Z.join("|"));V=function(ao,aj,aq,ar,an){if(!ar&&!an&&(!Z||!Z.test(ao))){if(aj.nodeType===9){try{return s(aj.querySelectorAll(ao),aq)}catch(am){}}else{if(aj.nodeType===1&&aj.nodeName.toLowerCase()!=="object"){var ap,ak=aj,al=aj.getAttribute("id"),ai=al||Y,au=aj.parentNode,at=ac.test(ao);if(!al){aj.setAttribute("id",ai)}else{ai=ai.replace(aa,"\\$&")}if(at&&au){aj=au}try{if(!at||au){ai="[id='"+ai+"'] ";ap=ai+ao.replace(ah,"$&"+ai);return s(aj.querySelectorAll(ap),aq)}}catch(am){}finally{if(!al){ak.removeAttribute("id")}}}}}return ag(ao,aj,aq,ar,an)};if(ab){M(function(aj){ae=ab.call(aj,"div");try{ab.call(aj,"[test!='']:sizzle");af.push(L.match.PSEUDO)}catch(ai){}});af.push(":active");af=af.length&&new RegExp(af.join("|"));S.matchesSelector=function(aj,al){al=al.replace(ad,"='$1']");if(!v(aj)&&(!af||!af.test(al))&&(!Z||!Z.test(al))){try{var ai=ab.call(aj,al);if(ai||ae||aj.document&&aj.document.nodeType!==11){return ai}}catch(ak){}}return S(al,null,null,[aj]).length>0}}})()}function s(ab,aa){aa=aa||[];var Z=0,Y=ab.length;if(typeof Y==="number"){for(;Z<Y;Z++){aa.push(ab[Z])}}else{for(;ab[Z];Z++){aa.push(ab[Z])}}return aa}var v=S.isXML=function(Y){var Z=(Y?Y.ownerDocument||Y:0).documentElement;return Z?Z.nodeName!=="HTML":false};var G=S.contains=j.compareDocumentPosition?function(Z,Y){return !!(Z.compareDocumentPosition(Y)&16)}:j.contains?function(Z,Y){return Z!==Y&&(Z.contains?Z.contains(Y):false)}:function(Z,Y){while((Y=Y.parentNode)){if(Y===Z){return true}}return false};var a=S.getText=function(ac){var aa,ab,Y=ac.nodeType,Z="";if(Y){if(Y===1||Y===9||Y===11){if(typeof ac.textContent==="string"){return ac.textContent}else{for(ac=ac.firstChild;ac;ac=ac.nextSibling){Z+=a(ac)}}}else{if(Y===3||Y===4){return ac.nodeValue}}}else{for(aa=0;(ab=ac[aa]);aa++){if(ab.nodeType!==8){Z+=a(ab)}}}return Z};function k(ac,ao,al,Y,ag){var ab,an,am,af,aa,Z,ad,aj,ae=0,ai=ao.length,ah=typeof Y==="string",ak=++p;if(ah&&!X.test(Y)){Y=Y.toLowerCase();an=true}for(;ae<ai;ae++){if((ab=ao[ae])){af=[];aa=0;ab=ab[ac];while(ab){if(ab[W]===ak&&ab.sizLevelIndex===aa){Z=ao[ab.sizset];af=af.length?Z.length?af.concat(Z):af:Z;break}am=ab.nodeType===1;if(am&&!ag){ab[W]=ak;ab.sizset=ae;ab.sizLevelIndex=aa}if(an){if(ab.nodeName.toLowerCase()===Y){af.push(ab)}}else{if(am){if(!ah){if(ab===Y){af=true;break}}else{if(S.filter(Y,[ab]).length>0){af.push(ab)}}}}ab=ab[ac];aa++}if((aj=af.length)){ao[ae]=af;if(aj>1){al[ae]=[];ad=0;for(;ad<aj;ad++){al[ae].push(ae)}}}else{ao[ae]=typeof af==="boolean"?af:false}}}}function z(aa,Y,ae,Z){var ad,ag=[],ac="",ah=Y.nodeType?[Y]:Y,ab=0,af=ah.length;while((ad=K.PSEUDO.exec(aa))){ac+=ad[0];aa=aa.replace(K.PSEUDO,"")}if(L.relative[aa]){aa+="*"}for(;ab<af;ab++){V(aa,ah[ab],ag,ae,Z)}return S.filter(ac,ag)}var L=S.selectors={match:K,leftMatch:R,order:["ID","NAME","TAG"],attrHandle:{},relative:{"+":function(af,ae,Y){var Z,aa=0,ac=af.length,ab=typeof Y==="string",ag=ab&&!X.test(Y),ad=ab&&!ag;if(ag){Y=Y.toLowerCase()}for(;aa<ac;aa++){if((Z=af[aa])){while((Z=Z.previousSibling)&&Z.nodeType!==1){}af[aa]=ad||Z&&Z.nodeName.toLowerCase()===Y?Z||false:Z===Y}}if(ad){S.filter(Y,af,true)}},">":function(af,aa,Z){var ae,ab=0,Y=af.length,ad=typeof Z==="string";if(ad&&!X.test(Z)){Z=Z.toLowerCase();for(;ab<Y;ab++){if((ae=af[ab])){var ac=ae.parentNode;af[ab]=ac.nodeName.toLowerCase()===Z?ac:false}}}else{for(;ab<Y;ab++){if((ae=af[ab])){af[ab]=ad?ae.parentNode:ae.parentNode===Z}}if(ad){S.filter(Z,af,true)}}},"":function(ab,aa,Z,Y){k("parentNode",ab,aa,Z,Y)},"~":function(ab,aa,Z,Y){k("previousSibling",ab,aa,Z,Y)}},find:{ID:i?function(aa,ab,Z){if(typeof ab.getElementById!==D&&!Z){var Y=ab.getElementById(aa[1]);return Y&&Y.parentNode?[Y]:[]}}:function(aa,ab,Z){if(typeof ab.getElementById!==D&&!Z){var Y=ab.getElementById(aa[1]);return Y?Y.id===aa[1]||typeof Y.getAttributeNode!==D&&Y.getAttributeNode("id").value===aa[1]?[Y]:r:[]}},NAME:function(aa,ad){if(typeof ad.getElementsByName!==D){var Z=[],ac=ad.getElementsByName(aa[1]),ab=0,Y=ac.length;for(;ab<Y;ab++){if(ac[ab].getAttribute("name")===aa[1]){Z.push(ac[ab])}}return Z.length===0?null:Z}},TAG:c?function(Y,Z){if(typeof Z.getElementsByTagName!==D){return Z.getElementsByTagName(Y[1])}}:function(Y,ac){var ab=ac.getElementsByTagName(Y[1]);if(Y[1]==="*"){var aa=[],Z=0;for(;ab[Z];Z++){if(ab[Z].nodeType===1){aa.push(ab[Z])}}ab=aa}return ab}},preFilter:{CLASS:function(ac,Z,aa,Y,af,ab){var ae,ad=0;ac=" "+ac[1].replace(A,"")+" ";if(ab){return ac}for(;(ae=Z[ad])!=null;ad++){if(ae){if(af^(ae.className&&~(" "+ae.className+" ").replace(n," ").indexOf(ac))){if(!aa){Y.push(ae)}}else{if(aa){Z[ad]=false}}}}return false},ID:function(Y){return Y[1].replace(A,"")},TAG:function(Y){return Y[1].replace(A,"").toLowerCase()},CHILD:function(Y){if(Y[1]==="nth"){if(!Y[2]){S.error(Y[0])}Y[2]=Y[2].replace(y,"");var Z=f.exec(Y[2]==="even"&&"2n"||Y[2]==="odd"&&"2n+1"||!u.test(Y[2])&&"0n+"+Y[2]||Y[2]);Y[2]=(Z[1]+(Z[2]||1))-0;Y[3]=Z[3]-0}else{if(Y[2]){S.error(Y[0])}}Y[0]=++p;return Y},ATTR:function(Y){Y[1]=Y[1].replace(A,"");Y[4]=(Y[4]||Y[5]||"").replace(A,"");if(Y[2]==="~="){Y[4]=" "+Y[4]+" "}return Y},PSEUDO:function(ad,Z,aa,Y,ae,ac){if(ad[1]==="not"){if((B.exec(ad[3])||"").length>1||g.test(ad[3])){ad[3]=V(ad[3],e,[],Z,ac)}else{var ab=S.filter(ad[3],Z,aa,!ae);if(!aa){Y.push.apply(Y,ab)}return false}}else{if(K.POS.test(ad[0])||K.CHILD.test(ad[0])){return true}}return ad},POS:function(Y){Y.unshift(true);return Y}},filters:{enabled:function(Y){return Y.disabled===false},disabled:function(Y){return Y.disabled===true},checked:function(Y){var Z=Y.nodeName.toLowerCase();return(Z==="input"&&!!Y.checked)||(Z==="option"&&!!Y.selected)},selected:function(Y){if(Y.parentNode){Y.parentNode.selectedIndex}return Y.selected===true},parent:function(Y){return !!Y.firstChild},empty:function(Y){return !Y.firstChild},has:function(aa,Z,Y){return !!S(Y[3],aa).length},header:function(Y){return x.test(Y.nodeName)},text:function(aa){var Y=aa.getAttribute("type"),Z=aa.type;return aa.nodeName.toLowerCase()==="input"&&"text"===Z&&(Y===null||Y.toLowerCase()===Z)},radio:function(Y){return Y.nodeName.toLowerCase()==="input"&&"radio"===Y.type},checkbox:function(Y){return Y.nodeName.toLowerCase()==="input"&&"checkbox"===Y.type},file:function(Y){return Y.nodeName.toLowerCase()==="input"&&"file"===Y.type},password:function(Y){return Y.nodeName.toLowerCase()==="input"&&"password"===Y.type},submit:function(Z){var Y=Z.nodeName.toLowerCase();return(Y==="input"||Y==="button")&&"submit"===Z.type},image:function(Y){return Y.nodeName.toLowerCase()==="input"&&"image"===Y.type},reset:function(Z){var Y=Z.nodeName.toLowerCase();return(Y==="input"||Y==="button")&&"reset"===Z.type},button:function(Z){var Y=Z.nodeName.toLowerCase();return Y==="input"&&"button"===Z.type||Y==="button"},input:function(Y){return P.test(Y.nodeName)},focus:function(Y){var Z=Y.ownerDocument;return Y===Z.activeElement&&(!Z.hasFocus||Z.hasFocus())&&!!(Y.type||Y.href)},active:function(Y){return Y===Y.ownerDocument.activeElement},contains:function(aa,Z,Y){return ~(aa.textContent||aa.innerText||a(aa)).indexOf(Y[3])}},setFilters:{first:function(Z,Y){return Y===0},last:function(aa,Z,Y,ab){return Z===ab.length-1},even:function(Z,Y){return Y%2===0},odd:function(Z,Y){return Y%2===1},lt:function(aa,Z,Y){return Z<Y[3]-0},gt:function(aa,Z,Y){return Z>Y[3]-0},nth:function(aa,Z,Y){return Y[3]-0===Z},eq:function(aa,Z,Y){return Y[3]-0===Z}},filter:{PSEUDO:function(aa,ae,ad,ag){var Y=ae[1],Z=L.filters[Y];if(Z){return Z(aa,ad,ae,ag)}else{if(Y==="not"){var ab=ae[3],ac=0,af=ab.length;for(;ac<af;ac++){if(ab[ac]===aa){return false}}return true}else{S.error(Y)}}},CHILD:function(Z,ab){var aa,ah,ad,ag,ac,af,ae=ab[1],Y=Z;switch(ae){case"only":case"first":while((Y=Y.previousSibling)){if(Y.nodeType===1){return false}}if(ae==="first"){return true}Y=Z;case"last":while((Y=Y.nextSibling)){if(Y.nodeType===1){return false}}return true;case"nth":aa=ab[2];ah=ab[3];if(aa===1&&ah===0){return true}ad=ab[0];ag=Z.parentNode;if(ag&&(ag[W]!==ad||!Z.sizset)){ac=0;for(Y=ag.firstChild;Y;Y=Y.nextSibling){if(Y.nodeType===1){Y.sizset=++ac;if(Y===Z){break}}}ag[W]=ad}af=Z.sizset-ah;if(aa===0){return af===0}else{return(af%aa===0&&af/aa>=0)}}},ID:i?function(Z,Y){return Z.nodeType===1&&Z.getAttribute("id")===Y}:function(aa,Y){var Z=typeof aa.getAttributeNode!==D&&aa.getAttributeNode("id");return aa.nodeType===1&&Z&&Z.value===Y},TAG:function(Z,Y){return(Y==="*"&&Z.nodeType===1)||Z.nodeName&&Z.nodeName.toLowerCase()===Y},CLASS:function(Z,Y){return ~(" "+(Z.className||Z.getAttribute("class"))+" ").indexOf(Y)},ATTR:function(ad,ab){var aa=ab[1],Y=S.attr(ad,aa),ae=Y+"",ac=ab[2],Z=ab[4];return Y==null?ac==="!=":!ac?Y!=null:ac==="="?ae===Z:ac==="*="?~ae.indexOf(Z):ac==="~="?~(" "+ae+" ").indexOf(Z):!Z?ae&&Y!==false:ac==="!="?ae!==Z:ac==="^="?ae.indexOf(Z)===0:ac==="$="?ae.substr(ae.length-Z.length)===Z:ac==="|="?ae===Z||ae.substr(0,Z.length+1)===Z+"-":false},POS:function(ac,Z,aa,ad){var Y=Z[2],ab=L.setFilters[Y];if(ab){return ab(ac,aa,Z,ad)}}}};if(!I){L.attrHandle={href:function(Y){return Y.getAttribute("href",2)},type:function(Y){return Y.getAttribute("type")}}}if(H){L.order.splice(1,0,"CLASS");L.find.CLASS=function(Z,aa,Y){if(typeof aa.getElementsByClassName!==D&&!Y){return aa.getElementsByClassName(Z[1])}}}[0,0].sort(function(){h=false;return 0});var q,b;if(j.compareDocumentPosition){q=function(Z,Y){if(Z===Y){m=true;return 0}if(!Z.compareDocumentPosition||!Y.compareDocumentPosition){return Z.compareDocumentPosition?-1:1}return Z.compareDocumentPosition(Y)&4?-1:1}}else{q=function(ag,af){if(ag===af){m=true;return 0}else{if(ag.sourceIndex&&af.sourceIndex){return ag.sourceIndex-af.sourceIndex}}var ad,Z,aa=[],Y=[],ac=ag.parentNode,ae=af.parentNode,ah=ac;if(ac===ae){return b(ag,af)}else{if(!ac){return -1}else{if(!ae){return 1}}}while(ah){aa.unshift(ah);ah=ah.parentNode}ah=ae;while(ah){Y.unshift(ah);ah=ah.parentNode}ad=aa.length;Z=Y.length;for(var ab=0;ab<ad&&ab<Z;ab++){if(aa[ab]!==Y[ab]){return b(aa[ab],Y[ab])}}return ab===ad?b(ag,Y[ab],-1):b(aa[ab],af,1)};b=function(Z,Y,aa){if(Z===Y){return aa}var ab=Z.nextSibling;while(ab){if(ab===Y){return -1}ab=ab.nextSibling}return 1}}var o=S.uniqueSort=function(Z){if(q){m=h;Z.sort(q);if(m){for(var Y=1;Y<Z.length;Y++){if(Z[Y]===Z[Y-1]){Z.splice(Y--,1)}}}}return Z};if("Element" in T){var J=e.$;Element.prototype.find=function(Y){return S(Y,this).map(function(Z){return J(Z)})}}else{T.Sizzle=S}})(window);