Shuo/client/js/libs.min.js

8 lines
237 KiB
JavaScript
Raw Normal View History

2014-09-10 16:50:59 +00:00
(function(){var a=function(a){"use strict";a=a?a:{};var b={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:false};var c,d,e,f,g,h,i,j,k,l,m,n,o;o={};o.ff=/firefox/i.test(navigator.userAgent.toLowerCase());o.chrome=/chrome/i.test(navigator.userAgent.toLowerCase());o.opera=/opera/i.test(navigator.userAgent.toLowerCase());o.ie=/msie/i.test(navigator.userAgent.toLowerCase())||/trident/i.test(navigator.userAgent.toLowerCase());o.supported=o.chrome||o.ff||o.opera;var p=[];m=function(){};j=n=false;var q=function(){c=B(b,a);c.bgColor=A(c.bgColor);c.textColor=A(c.textColor);c.position=c.position.toLowerCase();c.animation=D.types[""+c.animation]?c.animation:b.animation;var j=c.position.indexOf("up")>-1;var k=c.position.indexOf("left")>-1;if(j||k){for(var l=0;l<D.types[""+c.animation].length;l++){var m=D.types[""+c.animation][l];if(j){if(m.y<.6){m.y=m.y-.4}else{m.y=m.y-2*m.y+(1-m.w)}}if(k){if(m.x<.6){m.x=m.x-.4}else{m.x=m.x-2*m.x+(1-m.h)}}D.types[""+c.animation][l]=m}}c.type=s[""+c.type]?c.type:b.type;try{d=z.getIcon();g=document.createElement("canvas");i=document.createElement("img");if(d.hasAttribute("href")){i.setAttribute("src",d.getAttribute("href"));i.onload=function(){e=i.height>0?i.height:32;f=i.width>0?i.width:32;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}else{i.setAttribute("src","");e=32;f=32;i.height=e;i.width=f;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}catch(n){throw"Error initializing favico. Message: "+n.message}};var r={};r.ready=function(){j=true;r.reset();m()};r.reset=function(){p=[];k=false;h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);z.setIcon(g)};r.start=function(){if(!j||l){return}var a=function(){k=p[0];l=false;if(p.length>0){p.shift();r.start()}else{}};if(p.length>0){l=true;if(k){D.run(k.options,function(){D.run(p[0].options,function(){a()},false)},true)}else{D.run(p[0].options,function(){a()},false)}}};var s={};var t=function(a){a.n=typeof a.n==="number"?Math.abs(a.n|0):a.n;a.x=f*a.x;a.y=e*a.y;a.w=f*a.w;a.h=e*a.h;a.len=(""+a.n).length;return a};s.circle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font=c.fontStyle+" "+Math.floor(a.h*(a.n>99?.85:1))+"px "+c.fontFamily;h.textAlign="center";if(b){h.moveTo(a.x+a.w/2,a.y);h.lineTo(a.x+a.w-a.h/2,a.y);h.quadraticCurveTo(a.x+a.w,a.y,a.x+a.w,a.y+a.h/2);h.lineTo(a.x+a.w,a.y+a.h-a.h/2);h.quadraticCurveTo(a.x+a.w,a.y+a.h,a.x+a.w-a.h/2,a.y+a.h);h.lineTo(a.x+a.h/2,a.y+a.h);h.quadraticCurveTo(a.x,a.y+a.h,a.x,a.y+a.h-a.h/2);h.lineTo(a.x,a.y+a.h/2);h.quadraticCurveTo(a.x,a.y,a.x+a.h/2,a.y)}else{h.arc(a.x+a.w/2,a.y+a.h/2,a.h/2,0,2*Math.PI)}h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fill();h.closePath();h.beginPath();h.stroke();h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.n>999){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};s.rectangle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font="bold "+Math.floor(a.h*(a.n>99?.9:1))+"px sans-serif";h.textAlign="center";h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fillRect(a.x,a.y,a.w,a.h);h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.len>3){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};var u=function(a,b){m=function(){try{if(typeof a==="number"?a>0:a!==""){if(D.types[""+b]){c.animation=b}p.push({type:"badge",options:{n:a}});if(p.length>100){throw"Too many badges requests in queu
})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);if(e==null){return b==="!="}if(!b){return true}e+="";return b==="="?e===c:b==="!="?e!==c:b==="^="?c&&e.indexOf(c)===0:b==="*="?c&&e.indexOf(c)>-1:b==="$="?c&&e.slice(-c.length)===c:b==="~="?(" "+e+" ").indexOf(c)>-1:b==="|="?e===c||e.slice(0,c.length+1)===c+"-":false}},CHILD:function(a,b,c,d,e){var f=a.slice(0,3)!=="nth",g=a.slice(-4)!=="last",h=b==="of-type";return d===1&&e===0?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:l.nodeType===1){return false}}o=p=a==="only"&&!o&&"nextSibling"}return true}o=[g?q.firstChild:q.lastChild];if(g&&s){k=q[u]||(q[u]={});j=k[a]||[];n=j[0]===w&&j[1];m=j[0]===w&&j[2];l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(l.nodeType===1&&++m&&l===b){k[a]=[w,n,m];break}}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:l.nodeType===1)&&++m){if(s){(l[u]||(l[u]={}))[a]=[w,m]}if(l===b){break}}}}m-=e;return m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);if(e[u]){return e(b)}if(e.length>1){c=[a,a,"",b];return d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=K.call(a,f[g]);a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}}return e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--){if(f=g[h]){a[h]=!(b[h]=f)}}}):function(a,e,f){b[0]=a;d(b,null,f,c);return!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){if(!W.test(a||"")){fb.error("unsupported lang: "+a)}a=a.replace(cb,db).toLowerCase();return function(b){var c;do{if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){c=c.toLowerCase();return c===a||c.indexOf(a+"-")===0}}while((b=b.parentNode)&&b.nodeType===1);return false}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===false},disabled:function(a){return a.disabled===true},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){if(a.parentNode){a.parentNode.selectedIndex}return a.selected===true},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling){if(a.nodeType<6){return false}}return true},parent:function(a){return!d.pseudos["empty"](a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},text:function(a){var b;return a.nodeName.toLowerCase()==="input"&&a.type==="text"&&((b=a.getAttribute("type"))==null||b.toLowerCase()==="text")},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[c<0?c+b:c]}),even:nb(function(a,b){var c=0;for(;c<b;c+=2){a.push(c)}return a}),odd:nb(function(a,b){var c=1;for(;c<b;c+=2){a.push(c)}return a}),lt:nb(function(a,b,c){var d=c<0?c+b:c;for(;--d>=0;){a.push(d)}return a}),gt:nb(function(a,b,c){var d=c<0?c+b:c;for(;++d<b;){a.push(d)}return a})}};d.pseudos["nth"]=d.pseudos["eq"];for(b in{radio:true,checkbox:true,file:true,password:true,image:true}){d.pseudos[b]=lb(b)}for(b in{submit:true,reset:true}){d.pseudos[b]=mb(b)}function pb(){}pb.prototype=d.filters=d.pseudos;d.setFilters=new pb;g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k){return b?0:k.slice(0)}h=a;i=[];j=d.preFilter;while(h){if(!c||(e=S.exec(h))){if(e){h=h.slice(e[0].length)||h}i.push(f=[])}c=false;if(e
g.events={};for(e in j){for(c=0,d=j[e].length;c<d;c++){n.event.add(b,e,j[e][c])}}}}if(M.hasData(a)){h=M.access(a);i=n.extend({},h);M.set(b,i)}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return b===undefined||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();if(c==="input"&&T.test(a.type)){b.checked=a.checked}else if(c==="input"||c==="textarea"){b.defaultValue=a.defaultValue}}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(true),i=n.contains(a.ownerDocument,a);if(!k.noCloneChecked&&(a.nodeType===1||a.nodeType===11)&&!n.isXMLDoc(a)){g=ob(h);f=ob(a);for(d=0,e=f.length;d<e;d++){pb(f[d],g[d])}}if(b){if(c){f=f||ob(a);g=g||ob(h);for(d=0,e=f.length;d<e;d++){nb(f[d],g[d])}}else{nb(a,h)}}g=ob(h,"script");if(g.length>0){mb(g,!i&&ob(a,"script"))}return h},buildFragment:function(a,b,c,d){var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;for(;m<o;m++){e=a[m];if(e||e===0){if(n.type(e)==="object"){n.merge(l,e.nodeType?[e]:e)}else if(!cb.test(e)){l.push(b.createTextNode(e))}else{f=f||k.appendChild(b.createElement("div"));g=(bb.exec(e)||["",""])[1].toLowerCase();h=ib[g]||ib._default;f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2];j=h[0];while(j--){f=f.lastChild}n.merge(l,f.childNodes);f=k.firstChild;f.textContent=""}}}k.textContent="";m=0;while(e=l[m++]){if(d&&n.inArray(e,d)!==-1){continue}i=n.contains(e.ownerDocument,e);f=ob(k.appendChild(e),"script");if(i){mb(f)}if(c){j=0;while(e=f[j++]){if(fb.test(e.type||"")){c.push(e)}}}}return k},cleanData:function(a){var b,c,d,e,f=n.event.special,g=0;for(;(c=a[g])!==undefined;g++){if(n.acceptData(c)){e=c[L.expando];if(e&&(b=L.cache[e])){if(b.events){for(d in b.events){if(f[d]){n.event.remove(c,d)}else{n.removeEvent(c,d,b.handle)}}}if(L.cache[e]){delete L.cache[e]}}}delete M.cache[c[M.expando]]}}});n.fn.extend({text:function(a){return J(this,function(a){return a===undefined?n.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=a}})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){if(this.parentNode){this.parentNode.insertBefore(a,this)}})},after:function(){return this.domManip(arguments,function(a){if(this.parentNode){this.parentNode.insertBefore(a,this.nextSibling)}})},remove:function(a,b){var c,d=a?n.filter(a,this):this,e=0;for(;(c=d[e])!=null;e++){if(!b&&c.nodeType===1){n.cleanData(ob(c))}if(c.parentNode){if(b&&n.contains(c.ownerDocument,c)){mb(ob(c,"script"))}c.parentNode.removeChild(c)}}return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){if(a.nodeType===1){n.cleanData(ob(a,false));a.textContent=""}}return this},clone:function(a,b){a=a==null?false:a;b=b==null?a:b;return this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(a===undefined&&b.nodeType===1){return b.innerHTML}if(typeof a==="string"&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;c<d;c++){b=this[c]||{};if(b.nodeType===1){n.cleanData(ob(b,false));b.innerHTML=a}}b=0}catch(e){}}if(b){this.empty().append(a)}},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];this.domManip(arguments,function(b){a=this.parentNode;n.cleanData(ob(this));if(a){a.replaceChild(b,this)}});return a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,true)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&typeof p==="string"&&!k.checkClone&&eb.test(p)){return this.each(function(c){var d=m.eq(c);if(q){a[0]=p.call(this,c,d.html())}d.dom
},getScript:function(a,b){return n.get(a,undefined,b,"script")}});n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){if(n.isFunction(c)){e=e||d;d=c;c=undefined}return n.ajax({url:a,type:b,dataType:e,data:c,success:d})}});n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}});n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:false,global:false,"throws":true})};n.fn.extend({wrapAll:function(a){var b;if(n.isFunction(a)){return this.each(function(b){n(this).wrapAll(a.call(this,b))})}if(this[0]){b=n(a,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){b.insertBefore(this[0])}b.map(function(){var a=this;while(a.firstElementChild){a=a.firstElementChild}return a}).append(this)}return this},wrapInner:function(a){if(n.isFunction(a)){return this.each(function(b){n(this).wrapInner(a.call(this,b))})}return this.each(function(){var b=n(this),c=b.contents();if(c.length){c.wrapAll(a)}else{b.append(a)}})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){if(!n.nodeName(this,"body")){n(this).replaceWith(this.childNodes)}}).end()}});n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0};n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b)){n.each(b,function(b,e){if(c||xc.test(a)){d(a,e)}else{Bc(a+"["+(typeof e==="object"?b:"")+"]",e,c,d)}})}else if(!c&&n.type(b)==="object"){for(e in b){Bc(a+"["+e+"]",b[e],c,d)}}else{d(a,b)}}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():b==null?"":b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(b===undefined){b=n.ajaxSettings&&n.ajaxSettings.traditional}if(n.isArray(a)||a.jquery&&!n.isPlainObject(a)){n.each(a,function(){e(this.name,this.value)})}else{for(c in a){Bc(c,a[c],b,e)}}return d.join("&").replace(wc,"+")};n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return c==null?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}});n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();if(a.ActiveXObject){n(a).on("unload",function(){for(var a in Dc){Dc[a]()}})}k.cors=!!Fc&&"withCredentials"in Fc;k.ajax=Fc=!!Fc;n.ajaxTransport(function(a){var b;if(k.cors||Fc&&!a.crossDomain){return{send:function(c,d){var e,f=a.xhr(),g=++Cc;f.open(a.type,a.url,a.async,a.username,a.password);if(a.xhrFields){for(e in a.xhrFields){f[e]=a.xhrFields[e]}}if(a.mimeType&&f.overrideMimeType){f.overrideMimeType(a.mimeType)}if(!a.crossDomain&&!c["X-Requested-With"]){c["X-Requested-With"]="XMLHttpRequest"}for(e in c){f.setRequestHeader(e,c[e])}b=function(a){return function(){if(b){delete Dc[g];b=f.onload=f.onerror=null;if(a==="abort"){f.abort()}else if(a==="error"){d(f.status,f.statusText)}else{d(Ec[f.status]||f.status,f.statusText,typeof f.responseText==="string"?{text:f.responseText}:undefined,f.getAllResponseHeaders())}}}};f.onload=b();f.onerror=b("error");b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b){throw h}}},abort:function(){if(b){b()}}}}});n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){n.globalEval(a);return a}}});n.ajaxPrefilter("script",function(a){if(a.cache===undefined){a.cache=false}if(a.crossDom
}}while(X.length){g=X.pop();Z[g+"o"]=db(Z[g],g)}while(Y.length){g=Y.pop();Z[g+g]=cb(Z[g],2)}Z.DDDD=cb(Z.DDD,3);function eb(){}function fb(a){xb(a);hb(this,a)}function gb(a){var b=qb(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+j*1e3+i*6e4+h*36e5;this._days=+g+f*7;this._months=+e+d*3+c*12;this._data={};this._bubble()}function hb(a,b){for(var c in b){if(b.hasOwnProperty(c)){a[c]=b[c]}}if(b.hasOwnProperty("toString")){a.toString=b.toString}if(b.hasOwnProperty("valueOf")){a.valueOf=b.valueOf}return a}function ib(a){var b={},c;for(c in a){if(a.hasOwnProperty(c)&&p.hasOwnProperty(c)){b[c]=a[c]}}return b}function jb(a){if(a<0){return Math.ceil(a)}else{return Math.floor(a)}}function kb(a,b,c){var d=""+Math.abs(a),e=a>=0;while(d.length<b){d="0"+d}return(e?c?"+":"":"-")+d}function lb(a,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=e==null?true:e;if(f){a._d.setTime(+a._d+f*d)}if(g){fc(a,"Date",ec(a,"Date")+g*d)}if(h){dc(a,ec(a,"Month")+h*d)}if(e){b.updateOffset(a,g||h)}}function mb(a){return Object.prototype.toString.call(a)==="[object Array]"}function nb(a){return Object.prototype.toString.call(a)==="[object Date]"||a instanceof Date}function ob(a,b,c){var d=Math.min(a.length,b.length),e=Math.abs(a.length-b.length),f=0,g;for(g=0;g<d;g++){if(c&&a[g]!==b[g]||!c&&sb(a[g])!==sb(b[g])){f++}}return f+e}function pb(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=T[a]||U[b]||b}return a}function qb(a){var b={},c,d;for(d in a){if(a.hasOwnProperty(d)){c=pb(d);if(c){b[c]=a[d]}}}return b}function rb(c){var d,e;if(c.indexOf("week")===0){d=7;e="day"}else if(c.indexOf("month")===0){d=12;e="month"}else{return}b[c]=function(f,g){var h,i,j=b.fn._lang[c],k=[];if(typeof f==="number"){g=f;f=a}i=function(a){var c=b().utc().set(e,a);return j.call(b.fn._lang,c,f||"")};if(g!=null){return i(g)}else{for(h=0;h<d;h++){k.push(i(h))}return k}}}function sb(a){var b=+a,c=0;if(b!==0&&isFinite(b)){if(b>=0){c=Math.floor(b)}else{c=Math.ceil(b)}}return c}function tb(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ub(a,c,d){return _b(b([a,11,31+c-d]),c,d).week}function vb(a){return wb(a)?366:365}function wb(a){return a%4===0&&a%100!==0||a%400===0}function xb(a){var b;if(a._a&&a._pf.overflow===-2){b=a._a[i]<0||a._a[i]>11?i:a._a[j]<1||a._a[j]>tb(a._a[h],a._a[i])?j:a._a[k]<0||a._a[k]>23?k:a._a[l]<0||a._a[l]>59?l:a._a[m]<0||a._a[m]>59?m:a._a[n]<0||a._a[n]>999?n:-1;if(a._pf._overflowDayOfYear&&(b<h||b>j)){b=j}a._pf.overflow=b}}function yb(a){if(a._isValid==null){a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated;if(a._strict){a._isValid=a._isValid&&a._pf.charsLeftOver===0&&a._pf.unusedTokens.length===0}}return a._isValid}function zb(a){return a?a.toLowerCase().replace("_","-"):a}function Ab(a,c){return c._isUTC?b(a).zone(c._offset||0):b(a).local()}hb(eb.prototype,{set:function(a){var b,c;for(c in a){b=a[c];if(typeof b==="function"){this[c]=b}else{this["_"+c]=b}}},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var c,d,e;if(!this._monthsParse){this._monthsParse=[]}for(c=0;c<12;c++){if(!this._monthsParse[c]){d=b.utc([2e3,c]);e="^"+this.months(d,"")+"|^"+this.monthsShort(d,"");this._monthsParse[c]=new RegExp(e.replace(".",""),"i")}if(this._monthsParse[c].test(a)){return c}}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var c,d,e;if(!this._weekdaysParse){t
this.packet(a)}};m.prototype.cleanup=function(){var a;while(a=this.subs.shift())a.destroy();this.packetBuffer=[];this.encoding=false;this.decoder.destroy()};m.prototype.close=m.prototype.disconnect=function(){this.skipReconnect=true;this.engine.close()};m.prototype.onclose=function(a){l("close");this.cleanup();this.readyState="closed";this.emit("close",a);if(this._reconnection&&!this.skipReconnect){this.reconnect()}};m.prototype.reconnect=function(){if(this.reconnecting)return this;var a=this;this.attempts++;if(this.attempts>this._reconnectionAttempts){l("reconnect failed");this.emitAll("reconnect_failed");this.reconnecting=false}else{var b=this.attempts*this.reconnectionDelay();b=Math.min(b,this.reconnectionDelayMax());l("will wait %dms before reconnect attempt",b);this.reconnecting=true;var c=setTimeout(function(){l("attempting reconnect");a.emitAll("reconnect_attempt",a.attempts);a.emitAll("reconnecting",a.attempts);a.open(function(b){if(b){l("reconnect attempt error");a.reconnecting=false;a.reconnect();a.emitAll("reconnect_error",b.data)}else{l("reconnect success");a.onreconnect()}})},b);this.subs.push({destroy:function(){clearTimeout(c)}})}};m.prototype.onreconnect=function(){var a=this.attempts;this.attempts=0;this.reconnecting=false;this.emitAll("reconnect",a)}},{"./on":4,"./socket":5,"./url":6,"component-bind":7,"component-emitter":8,debug:9,"engine.io-client":11,"object-component":37,"socket.io-parser":40}],4:[function(a,b,c){b.exports=d;function d(a,b,c){a.on(b,c);return{destroy:function(){a.removeListener(b,c)}}}},{}],5:[function(a,b,c){var d=a("socket.io-parser");var e=a("component-emitter");var f=a("to-array");var g=a("./on");var h=a("component-bind");var i=a("debug")("socket.io-client:socket");var j=a("has-binary-data");var k=a("indexof");b.exports=c=n;var l={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1};var m=e.prototype.emit;function n(a,b){this.io=a;this.nsp=b;this.json=this;this.ids=0;this.acks={};this.open();this.receiveBuffer=[];this.sendBuffer=[];this.connected=false;this.disconnected=true;this.subEvents()}e(n.prototype);n.prototype.subEvents=function(){var a=this.io;this.subs=[g(a,"open",h(this,"onopen")),g(a,"packet",h(this,"onpacket")),g(a,"close",h(this,"onclose"))]};n.prototype.open=n.prototype.connect=function(){if(this.connected)return this;this.io.open();if("open"==this.io.readyState)this.onopen();return this};n.prototype.send=function(){var a=f(arguments);a.unshift("message");this.emit.apply(this,a);return this};n.prototype.emit=function(a){if(l.hasOwnProperty(a)){m.apply(this,arguments);return this}var b=f(arguments);var c=d.EVENT;if(j(b)){c=d.BINARY_EVENT}var e={type:c,data:b};if("function"==typeof b[b.length-1]){i("emitting packet with ack id %d",this.ids);this.acks[this.ids]=b.pop();e.id=this.ids++}if(this.connected){this.packet(e)}else{this.sendBuffer.push(e)}return this};n.prototype.packet=function(a){a.nsp=this.nsp;this.io.packet(a)};n.prototype.onopen=function(){i("transport is open - connecting");if("/"!=this.nsp){this.packet({type:d.CONNECT})}};n.prototype.onclose=function(a){i("close (%s)",a);this.connected=false;this.disconnected=true;this.emit("disconnect",a)};n.prototype.onpacket=function(a){if(a.nsp!=this.nsp)return;switch(a.type){case d.CONNECT:this.onconnect();break;case d.EVENT:this.onevent(a);break;case d.BINARY_EVENT:this.onevent(a);break;case d.ACK:this.onack(a);break;case d.BINARY_ACK:this.onack(a);break;case d.DISCONNECT:this.ondisconnect();break;case d.ERROR:this.emit("error",a.data);break}};n.prototype.onevent=function(a){var b=a.data||[];i("emitting event %j",b);if(null!=a.id){i("attaching ack callback to event");b.push(this.ack(a.id))}if(this.connected){m.apply(this,b)}else{this.receiveBuffer.push(b)}};n.prototype.ack=function(a){var b=this;var c=false;return function(){if(c)return;c=true;var e=f(arguments);i("sending ack %j",e);var g=j(e)?d.BINARY_ACK:d.ACK;b.packet({type:g,id:a,data:e})}};n.prototype.onack=function(a){i("calling ack %s with %j",a.id,a.data);va
}var e=g.decode(a.substr(1));if(b==="blob"&&n){e=new n([e])}return{type:c,data:e}};c.encodePayload=function(a,b,d){if(typeof b=="function"){d=b;b=null}if(b){if(n&&!j){return c.encodePayloadAsBlob(a,d)}return c.encodePayloadAsArrayBuffer(a,d)}if(!a.length){return d("0:")}function e(a){return a.length+":"+a}function f(a,d){c.encodePacket(a,b,function(a){d(null,e(a))})}r(a,f,function(a,b){return d(b.join(""))})};function r(a,b,c){var d=new Array(a.length);var e=h(a.length,c);var f=function(a,c,e){b(c,function(b,c){d[a]=c;e(b,d)})};for(var g=0;g<a.length;g++){f(g,a[g],e)}}c.decodePayload=function(a,b,d){if(typeof a!="string"){return c.decodePayloadAsBinary(a,b,d)}if(typeof b==="function"){d=b;b=null}var e;if(a==""){return d(m,0,1)}var f="",g,h;for(var i=0,j=a.length;i<j;i++){var k=a.charAt(i);if(":"!=k){f+=k}else{if(""==f||f!=(g=Number(f))){return d(m,0,1)}h=a.substr(i+1,g);if(f!=h.length){return d(m,0,1)}if(h.length){e=c.decodePacket(h,b);if(m.type==e.type&&m.data==e.data){return d(m,0,1)}var l=d(e,i+g,j);if(false===l)return}i+=g;f=""}}if(f!=""){return d(m,0,1)}};c.encodePayloadAsArrayBuffer=function(a,b){if(!a.length){return b(new ArrayBuffer(0))}function d(a,b){c.encodePacket(a,true,function(a){return b(null,a)})}r(a,d,function(a,c){var d=c.reduce(function(a,b){var c;if(typeof b==="string"){c=b.length}else{c=b.byteLength}return a+c.toString().length+c+2},0);var e=new Uint8Array(d);var f=0;c.forEach(function(a){var b=typeof a==="string";var c=a;if(b){var d=new Uint8Array(a.length);for(var g=0;g<a.length;g++){d[g]=a.charCodeAt(g)}c=d.buffer}if(b){e[f++]=0}else{e[f++]=1}var h=c.byteLength.toString();for(var g=0;g<h.length;g++){e[f++]=parseInt(h[g])}e[f++]=255;var d=new Uint8Array(c);for(var g=0;g<d.length;g++){e[f++]=d[g]}});return b(e.buffer)})};c.encodePayloadAsBlob=function(a,b){function d(a,b){c.encodePacket(a,true,function(a){var c=new Uint8Array(1);c[0]=1;if(typeof a==="string"){var d=new Uint8Array(a.length);for(var e=0;e<a.length;e++){d[e]=a.charCodeAt(e)}a=d.buffer;c[0]=0}var f=a instanceof ArrayBuffer?a.byteLength:a.size;var g=f.toString();var h=new Uint8Array(g.length+1);for(var e=0;e<g.length;e++){h[e]=parseInt(g[e])}h[g.length]=255;if(n){var i=new n([c.buffer,h.buffer,a]);b(null,i)}})}r(a,d,function(a,c){return b(new n(c))})};c.decodePayloadAsBinary=function(a,b,d){if(typeof b==="function"){d=b;b=null}var e=a;var g=[];while(e.byteLength>0){var h=new Uint8Array(e);var i=h[0]===0;var j="";for(var k=1;;k++){if(h[k]==255)break;j+=h[k]}e=f(e,2+j.length);j=parseInt(j);var l=f(e,0,j);if(i){try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(m){var n=new Uint8Array(l);l="";for(var k=0;k<n.length;k++){l+=String.fromCharCode(n[k])}}}g.push(l);e=f(e,j)}var o=g.length;g.forEach(function(a,e){d(c.decodePacket(a,b),e,o)})}},{"./keys":23,after:24,"arraybuffer.slice":25,"base64-arraybuffer":26,blob:27,utf8:28}],23:[function(a,b,c){b.exports=Object.keys||function d(a){var b=[];var c=Object.prototype.hasOwnProperty;for(var d in a){if(c.call(a,d)){b.push(d)}}return b}},{}],24:[function(a,b,c){b.exports=d;function d(a,b,c){var d=false;c=c||e;f.count=a;return a===0?b():f;function f(a,e){if(f.count<=0){throw new Error("after called too many times")}--f.count;if(a){d=true;b(a);b=c}else if(f.count===0&&!d){b(null,e)}}}function e(){}},{}],25:[function(a,b,c){b.exports=function(a,b,c){var d=a.byteLength;b=b||0;c=c||d;if(a.slice){return a.slice(b,c)}if(b<0){b+=d}if(c<0){c+=d}if(c>d){c=d}if(b>=d||b>=c||d===0){return new ArrayBuffer(0)}var e=new Uint8Array(a);var f=new Uint8Array(c-b);for(var g=b,h=0;g<c;g++,h++){f[h]=e[g]}return f.buffer}},{}],26:[function(a,b,c){(function(a){"use strict";c.encode=function(b){var c=new Uint8Array(b),d,e=c.length,f="";for(d=0;d<e;d+=3){f+=a[c[d]>>2];f+=a[(c[d]&3)<<4|c[d+1]>>4];f+=a[(c[d+1]&15)<<2|c[d+2]>>6];f+=a[c[d+2]&63]}if(e%3===2){f=f.substring(0,f.length-1)+"="}else if(e%3===1){f=f.substring(0,f.length-2)+"=="}return f};c.decode=function(b){var c=b.length*.75,d=b.length,e,f=0,g,h,i,j;if(b[b.length-1]==="="){c--;if(b[b.length-2]==="="){c--}}var k=new ArrayBuffer(c),l=new Uint8Array(k);for(e=0
case"String":if(!k(a[b])){return a[b]===c}if(!d){return false}return m(a[b],c);default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}};f.commonPath=function(a,b){var c=Math.min(a.length,b.length);var d;for(d=0;d<c;d++){if(a.charAt(d)!==b.charAt(d)){d--;break}}if(d<1){return a.charAt(0)===b.charAt(0)&&a.charAt(0)==="/"?"/":""}if(a.charAt(d)!=="/"||b.charAt(d)!=="/"){d=a.substring(0,d).lastIndexOf("/")}return a.substring(0,d+1)};f.withinString=function(a,b,c){c||(c={});var d=c.start||f.findUri.start;var e=c.end||f.findUri.end;var g=c.trim||f.findUri.trim;var h=/[a-z0-9-]=["']?$/i;d.lastIndex=0;while(true){var i=d.exec(a);if(!i){break}var j=i.index;if(c.ignoreHtml){var k=a.slice(Math.max(j-3,0),j);if(k&&h.test(k)){continue}}var l=j+a.slice(j).search(e);var m=a.slice(j,l).replace(g,"");if(c.ignore&&c.ignore.test(m)){continue}l=j+m.length;var n=b(m,j,l,a);a=a.slice(0,j)+n+a.slice(l);d.lastIndex=j+n.length}d.lastIndex=0;return a};f.ensureValidHostname=function(b){if(b.match(f.invalid_hostname_characters)){if(!a){throw new TypeError('Hostname "'+b+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available')}if(a.toASCII(b).match(f.invalid_hostname_characters)){throw new TypeError('Hostname "'+b+'" contains characters other than [A-Z0-9.-]')}}};f.noConflict=function(a){if(a){var b={URI:this.noConflict()};if(d.URITemplate&&typeof d.URITemplate.noConflict==="function"){b.URITemplate=d.URITemplate.noConflict()}if(d.IPv6&&typeof d.IPv6.noConflict==="function"){b.IPv6=d.IPv6.noConflict()}if(d.SecondLevelDomains&&typeof d.SecondLevelDomains.noConflict==="function"){b.SecondLevelDomains=d.SecondLevelDomains.noConflict()}return b}else if(d.URI===this){d.URI=e}return this};g.build=function(a){if(a===true){this._deferred_build=true}else if(a===undefined||this._deferred_build){this._string=f.build(this._parts);this._deferred_build=false}return this};g.clone=function(){return new f(this)};g.valueOf=g.toString=function(){return this.build(false)._string};q={protocol:"protocol",username:"username",password:"password",hostname:"hostname",port:"port"};s=function(a){return function(b,c){if(b===undefined){return this._parts[a]||""}else{this._parts[a]=b||null;this.build(!c);return this}}};for(r in q){g[r]=s(q[r])}q={query:"?",fragment:"#"};s=function(a,b){return function(c,d){if(c===undefined){return this._parts[a]||""}else{if(c!==null){c=c+"";if(c.charAt(0)===b){c=c.substring(1)}}this._parts[a]=c;this.build(!d);return this}}};for(r in q){g[r]=s(r,q[r])}q={search:["?","query"],hash:["#","fragment"]};s=function(a,b){return function(c,d){var e=this[a](c,d);return typeof e==="string"&&e.length?b+e:e}};for(r in q){g[r]=s(q[r][1],q[r][0])}g.pathname=function(a,b){if(a===undefined||a===true){var c=this._parts.path||(this._parts.hostname?"/":"");return a?f.decodePath(c):c}else{this._parts.path=a?f.recodePath(a):"/";this.build(!b);return this}};g.path=g.pathname;g.href=function(a,b){var c;if(a===undefined){return this.toString()}this._string="";this._parts=f._parts();var d=a instanceof f;var e=typeof a==="object"&&(a.hostname||a.path||a.pathname);if(a.nodeName){var g=f.getDomAttribute(a);a=a[g]||"";e=false}if(!d&&e&&a.pathname!==undefined){a=a.toString()}if(typeof a==="string"){this._parts=f.parse(a,this._parts)}else if(d||e){var i=d?a._parts:a;for(c in i){if(h.call(this._parts,c)){this._parts[c]=i[c]}}}else{throw new TypeError("invalid input")}this.build(!b);return this};g.is=function(a){var b=false;var d=false;var e=false;var g=false;var h=false;var i=false;var j=false;var k=!this._parts.urn;if(this._parts.hostname){k=false;d=f.ip4_expression.test(this._parts.hostname);e=f.ip6_expression.test(this._parts.hostname);b=d||e;g=!b;h=g&&c&&c.has(this._parts.hostname);i=g&&f.idn_expression.test(this._parts.hostname);j=g&&f.punycode_expression.test(this._parts.hostname)}switch(a.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return g;case"sld":return h;case"ip":return b;case"ip4":case"ipv4":case"inet4":return d;case"ip6":case"i