Shuo/client/js/libs.min.js

11 lines
316 KiB
JavaScript
Raw Normal View History

2014-10-04 19:47:27 +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,p,q;o={};o.ff=typeof InstallTrigger!="undefined";o.chrome=!!window.chrome;o.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0;o.ie=false;o.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0;o.supported=o.chrome||o.ff||o.opera;var r=[];m=function(){};j=n=false;var s=function(){c=D(b,a);c.bgColor=C(c.bgColor);c.textColor=C(c.textColor);c.position=c.position.toLowerCase();c.animation=F.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<F.types[""+c.animation].length;l++){var m=F.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)}}F.types[""+c.animation][l]=m}}c.type=u[""+c.type]?c.type:b.type;try{d=B.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");t.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");t.ready()}}catch(n){throw"Error initializing favico. Message: "+n.message}};var t={};t.ready=function(){j=true;t.reset();m()};t.reset=function(){if(!j){return}r=[];k=false;h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);B.setIcon(g);window.clearTimeout(p);window.clearTimeout(q)};t.start=function(){if(!j||l){return}var a=function(){k=r[0];l=false;if(r.length>0){r.shift();t.start()}else{}};if(r.length>0){l=true;var b=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(a){if(a in r[0].options){c[a]=r[0].options[a]}});F.run(r[0].options,function(){a()},false)};if(k){F.run(k.options,function(){b()},true)}else{b()}}};var u={};var v=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};u.circle=function(a){a=v(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()};u.rectangle=function(a){a=v(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?.9:1))+"px "+c.fontFamily;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.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()};var w=function(a,b){b=(typeof b==="string"?{animation:b
a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db);if(a[2]==="~="){a[3]=" "+a[3]+" "}return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();if(a[1].slice(0,3)==="nth"){if(!a[3]){fb.error(a[0])}a[4]=+(a[4]?a[5]+(a[6]||1):2*(a[3]==="even"||a[3]==="odd"));a[5]=+(a[7]+a[8]||a[3]==="odd")}else if(a[3]){fb.error(a[0])}return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(X["CHILD"].test(a[0])){return null}if(a[3]){a[2]=a[4]||a[5]||""}else if(c&&V.test(c)&&(b=g(c,true))&&(b=c.indexOf(")",c.length-b)-c.length)){a[0]=a[0].slice(0,b);a[2]=c.slice(0,b)}return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return a==="*"?function(){return true}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test(typeof a.className==="string"&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},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;retur
2014-09-27 22:01:28 +00:00
ib.optgroup=ib.option;ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead;ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(b.nodeType!==11?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){a.type=(a.getAttribute("type")!==null)+"/"+a.type;return a}function lb(a){var b=gb.exec(a.type);if(b){a.type=b[1]}else{a.removeAttribute("type")}return a}function mb(a,b){var c=0,d=a.length;for(;c<d;c++){L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}}function nb(a,b){var c,d,e,f,g,h,i,j;if(b.nodeType!==1){return}if(L.hasData(a)){f=L.access(a);g=L.set(b,f);j=f.events;if(j){delete g.handle;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.repla
v.readyState=a>0?4:0;j=a>=200&&a<300||a===304;if(f){u=uc(k,v,f)}u=vc(k,u,v,j);if(j){if(k.ifModified){w=v.getResponseHeader("Last-Modified");if(w){n.lastModified[d]=w}w=v.getResponseHeader("etag");if(w){n.etag[d]=w}}if(a===204||k.type==="HEAD"){x="nocontent"}else if(a===304){x="notmodified"}else{x=u.state;r=u.data;s=u.error;j=!s}}else{s=x;if(a||!x){x="error";if(a<0){a=0}}}v.status=a;v.statusText=(b||x)+"";if(j){o.resolveWith(l,[r,x,v])}else{o.rejectWith(l,[v,x,s])}v.statusCode(q);q=undefined;if(i){m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s])}p.fireWith(l,[v,x]);if(i){m.trigger("ajaxComplete",[v,k]);if(!--n.active){n.event.trigger("ajaxStop")}}}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},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){d
}this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var c=this,d=b.which===1,e=typeof this.options.cancel==="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:false;if(!d||e||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==false;if(!this._mouseStarted){b.preventDefault();return true}}if(true===a.data(b.target,this.widgetName+".preventClickEvent")){a.removeData(b.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.preventDefault();g=true;return true},_mouseMove:function(b){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button){return this._mouseUp(b)}else if(!b.which){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false;this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)}return!this._mouseStarted},_mouseUp:function(b){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(b.target===this._mouseDownEvent.target){a.data(b.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(b)}g=false;return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}});a.widget("ui.draggable",a.ui.mouse,{version:"1.11.1",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}if(this.options.addClasses){this.element.addClass("ui-draggable")}if(this.options.disabled){this.element.addClass("ui-draggable-disabled")}this._setHandleClassName();this._mouseInit()},_setOption:function(a,b){this._super(a,b);if(a==="handle"){this._removeHandleClassName();this._setHandleClassName()}},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=true;return}this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(b){var c=this.document[0],d=this.options;try{if(c.activeElement&&c.activeElement.nodeName.toLowerCase()!=="body"){a(c.activeElement).blur()}}catch(e){}if(this.helper||d.disabled||a(b.target).closest(".ui-resizable-handle").length>0){return false}this.handle=this._getHandle(b);if(!this.handle){return false}a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")});return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this
},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]);b!=="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};if(e&&e.length){a(e[0]).css({width:d.width,height:d.height})}c._updateCache(d);c._propagate("resize",b)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;if(!m){return}i.containerElement=a(m);if(/document/.test(l)||l===document){i.containerOffset={left:0,top:0};i.containerPosition={left:0,top:0};i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{b=a(m);c=[];a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))});i.containerOffset=b.offset();i.containerPosition=b.position();i.containerSize={height:b.innerHeight()-c[3],width:b.innerWidth()-c[1]};d=i.containerOffset;e=i.containerSize.height;f=i.containerSize.width;g=i._hasScroll(m,"left")?m.scrollWidth:f;h=i._hasScroll(m)?m.scrollHeight:e;i.parentData={element:m,left:d.left,top:d.top,width:g,height:h}}},resize:function(b){var c,d,e,f,g=a(this).resizable("instance"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement,n=true;if(m[0]!==document&&/static/.test(m.css("position"))){l=i}if(j.left<(g._helper?i.left:0)){g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left);if(k){g.size.height=g.size.width/g.aspectRatio;n=false}g.position.left=h.helper?i.left:0}if(j.top<(g._helper?i.top:0)){g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top);if(k){g.size.width=g.size.height*g.aspectRatio;n=false}g.position.top=g._helper?i.top:0}e=g.containerElement.get(0)===g.element.parent().get(0);f=/relative|absolute/.test(g.containerElement.css("position"));if(e&&f){g.offset.left=g.parentData.left+g.position.left;g.offset.top=g.parentData.top+g.position.top}else{g.offset.left=g.element.offset().left;g.offset.top=g.element.offset().top}c=Math.abs(g.sizeDiff.width+(g._helper?g.offset.left-l.left:g.offset.left-i.left));d=Math.abs(g.sizeDiff.height+(g._helper?g.offset.top-l.top:g.offset.top-i.top));if(c+g.size.width>=g.parentData.width){g.size.width=g.parentData.width-c;if(k){g.size.height=g.size.width/g.aspectRatio;n=false}}if(d+g.size.height>=g.parentData.height){g.size.height=g.parentData.height-d;if(k){g.size.width=g.size.height*g.aspectRatio;n=false}}if(!n){g.position.left=g.prevPosition.left;g.position.top=g.prevPosition.top;g.size.width=g.prevSize.width;g.size.height=g.prevSize.height}},stop:function(){var b=a(this).resizable("instance"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.c
}})});(function(a,b,c){var d={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},e={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},f={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},g={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},h,i={},j={},k={},l,m=false,n=false,o=false;for(var p=1;p<20;++p){d[111+p]="f"+p}for(p=0;p<=9;++p){d[p+96]=p}function q(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false);return}a.attachEvent("on"+b,c)}function r(a){if(a.type=="keypress"){var b=String.fromCharCode(a.which);if(!a.shiftKey){b=b.toLowerCase()}return b}if(d[a.which]){return d[a.which]}if(e[a.which]){return e[a.which]}return String.fromCharCode(a.which).toLowerCase()}function s(a,b){return a.sort().join(",")===b.sort().join(",")}function t(a){a=a||{};var b=false,c;for(c in k){if(a[c]){b=true;continue}k[c]=0}if(!b){o=false}}function u(a,b,c,d,e,f){var g,h,j=[],l=c.type;if(!i[a]){return[]}if(l=="keyup"&&B(a)){b=[a]}for(g=0;g<i[a].length;++g){h=i[a][g];if(!d&&h.seq&&k[h.seq]!=h.level){continue}if(l!=h.action){continue}if(l=="keypress"&&!c.metaKey&&!c.ctrlKey||s(b,h.modifiers)){var m=!d&&h.combo==e;var n=d&&h.seq==d&&h.level==f;if(m||n){i[a].splice(g,1)}j.push(h)}}return j}function v(a){var b=[];if(a.shiftKey){b.push("shift")}if(a.altKey){b.push("alt")}if(a.ctrlKey){b.push("ctrl")}if(a.metaKey){b.push("meta")}return b}function w(a){if(a.preventDefault){a.preventDefault();return}a.returnValue=false}function x(a){if(a.stopPropagation){a.stopPropagation();return}a.cancelBubble=true}function y(a,b,c,d){if(K.stopCallback(b,b.target||b.srcElement,c,d)){return}if(a(b,c)===false){w(b);x(b)}}function z(a,b,c){var d=u(a,b,c),e,f={},g=0,h=false;for(e=0;e<d.length;++e){if(d[e].seq){g=Math.max(g,d[e].level)}}for(e=0;e<d.length;++e){if(d[e].seq){if(d[e].level!=g){continue}h=true;f[d[e].seq]=1;y(d[e].callback,c,d[e].combo,d[e].seq);continue}if(!h){y(d[e].callback,c,d[e].combo)}}var i=c.type=="keypress"&&n;if(c.type==o&&!B(a)&&!i){t(f)}n=h&&c.type=="keydown"}function A(a){if(typeof a.which!=="number"){a.which=a.keyCode}var b=r(a);if(!b){return}if(a.type=="keyup"&&m===b){m=false;return}K.handleKey(b,v(a),a)}function B(a){return a=="shift"||a=="ctrl"||a=="alt"||a=="meta"}function C(){clearTimeout(l);l=setTimeout(t,1e3)}function D(){if(!h){h={};for(var a in d){if(a>95&&a<112){continue}if(d.hasOwnProperty(a)){h[d[a]]=a}}}return h}function E(a,b,c){if(!c){c=D()[a]?"keydown":"keypress"}if(c=="keypress"&&b.length){c="keydown"}return c}function F(a,b,c,d){k[a]=0;function e(b){return function(){o=b;++k[a];C()}}function f(b){y(c,b,a);if(d!=="keyup"){m=r(b)}setTimeout(t,10)}for(var g=0;g<b.length;++g){var h=g+1===b.length;var i=h?f:e(d||H(b[g+1]).action);I(b[g],i,d,a,g)}}function G(a){if(a==="+"){return["+"]}return a.split("+")}function H(a,b){var c,d,e,h=[];c=G(a);for(e=0;e<c.length;++e){d=c[e];if(g[d]){d=g[d]}if(b&&b!="keypress"&&f[d]){d=f[d];h.push("shift")}if(B(d)){h.push(d)}}b=E(d,h,b);return{key:d,modifiers:h,action:b}}function I(a,b,c,d,e){j[a+":"+c]=b;a=a.replace(/\s+/g," ");var f=a.split(" "),g;if(f.length>1){F(a,f,b,c);return}g=H(a,c);i[g.key]=i[g.key]||[];u(g.key,g.modifiers,{type:g.action},d,a,e);i[g.key][d?"unshift":"push"]({callback:b,modifiers:g.modifiers,action:g.action,seq:d,level:e,combo:a})}function J(a,b,c){for(var d=0;d<a.length;++d){I(a[d],b,c)}}q(b,"keypress",A);q(b,"keydown",A);q(b,"keyup",A);var K={bind:function(a,b,c){a=a instanceof Array?a:[a];J(a,b,c);return this},unbind:function(a,b){return K.bind(a,function(){},b)},trigger:function(a,b){if(j[a+":"+b]){j[a+":"+b]({},a)}return this},reset:function(){i={};j={};return this},stopCallback:function(a,b){if((" "+b.className+" ").indexOf(" mousetra
2014-09-27 19:17:05 +00:00
return this.lang().postformat(c)},add:function(a,c){var d;if(typeof a==="string"&&typeof c==="string"){d=b.duration(isNaN(+c)?+a:+c,isNaN(+c)?c:a)}else if(typeof a==="string"){d=b.duration(+c,a)}else{d=b.duration(a,c)}lb(this,d,1);return this},subtract:function(a,c){var d;if(typeof a==="string"&&typeof c==="string"){d=b.duration(isNaN(+c)?+a:+c,isNaN(+c)?c:a)}else if(typeof a==="string"){d=b.duration(+c,a)}else{d=b.duration(a,c)}lb(this,d,-1);return this},diff:function(a,c,d){var e=Ab(a,this),f=(this.zone()-e.zone())*6e4,g,h;c=pb(c);if(c==="year"||c==="month"){g=(this.daysInMonth()+e.daysInMonth())*432e5;h=(this.year()-e.year())*12+(this.month()-e.month());h+=(this-b(this).startOf("month")-(e-b(e).startOf("month")))/g;h-=(this.zone()-b(this).startOf("month").zone()-(e.zone()-b(e).startOf("month").zone()))*6e4/g;if(c==="year"){h=h/12}}else{g=this-e;h=c==="second"?g/1e3:c==="minute"?g/6e4:c==="hour"?g/36e5:c==="day"?(g-f)/864e5:c==="week"?(g-f)/6048e5:g}return d?h:jb(h)},from:function(a,c){return b.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!c)},fromNow:function(a){return this.from(b(),a)},calendar:function(a){var c=a||b(),d=Ab(c,this).startOf("day"),e=this.diff(d,"days",true),f=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(f,this))},isLeapYear:function(){return wb(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();if(a!=null){a=Yb(a,this.lang());return this.add({d:a-b})}else{return b}},month:gc("Month",true),startOf:function(a){a=pb(a);switch(a){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}if(a==="week"){this.weekday(0)}else if(a==="isoWeek"){this.isoWeekday(1)}if(a==="quarter"){this.month(Math.floor(this.month()/3)*3)}return this},endOf:function(a){a=pb(a);return this.startOf(a).add(a==="isoWeek"?"week":a,1).subtract("ms",1)},isAfter:function(a,c){c=typeof c!=="undefined"?c:"millisecond";return+this.clone().startOf(c)>+b(a).startOf(c)},isBefore:function(a,c){c=typeof c!=="undefined"?c:"millisecond";return+this.clone().startOf(c)<+b(a).startOf(c)},isSame:function(a,b){b=b||"ms";return+this.clone().startOf(b)===+Ab(a,this).startOf(b)},min:bb("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){a=b.apply(null,arguments);return a<this?this:a}),max:bb("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){a=b.apply(null,arguments);return a>this?this:a}),zone:function(a,c){var d=this._offset||0;if(a!=null){if(typeof a==="string"){a=Jb(a)}if(Math.abs(a)<16){a=a*60}this._offset=a;this._isUTC=true;if(d!==a){if(!c||this._changeInProgress){lb(this,b.duration(d-a,"m"),1,false)}else if(!this._changeInProgress){this._changeInProgress=true;b.updateOffset(this,true);this._changeInProgress=null}}}else{return this._isUTC?d:this._d.getTimezoneOffset()}return this},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){if(this._tzm){this.zone(this._tzm)}else if(typeof this._i==="string"){this.zone(this._i)}return this},hasAlignedHourOffset:function(a){if(!a){a=0}else{a=b(a).zone()}return(this.zone()-a)%60===0},daysInMonth:function(){return tb(this.year(),this.month())},dayOfYear:function(a){var c=f((b(this).startOf("day")-b(this).startOf("year"))/864e5)+1;return a==null?c:this.add("d",a-c)},quarter:function(a){return a==null?Math.ceil((this.month()+1)/3):this.month((a-1)*3+this.month()%3)},weekYear:function(a){var b=_b(this,this.lang()._week.dow,this.lang()._week.doy).year;return a==null?b:this.add("y",a-b)},isoWeekYear:function(a){var b=_b(this,1,4).year;return a==null?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return
this.callbackBuffer.push(c);this.flush()};n.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState){this.onClose("forced close");g("socket closing - telling transport to close");this.transport.close()}return this};n.prototype.onError=function(a){g("socket error %j",a);n.priorWebsocketSuccess=false;this.emit("error",a);this.onClose("transport error",a)};n.prototype.onClose=function(a,b){if("opening"==this.readyState||"open"==this.readyState){g('socket close with reason: "%s"',a);var c=this;clearTimeout(this.pingIntervalTimer);clearTimeout(this.pingTimeoutTimer);setTimeout(function(){c.writeBuffer=[];c.callbackBuffer=[];c.prevBufferLen=0},0);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();this.readyState="closed";this.id=null;this.emit("close",a,b)}};n.prototype.filterUpgrades=function(a){var b=[];for(var c=0,d=a.length;c<d;c++){if(~h(this.transports,a[c]))b.push(a[c])}return b}},{"./transport":14,"./transports":15,"component-emitter":8,debug:9,"engine.io-parser":22,indexof:36,parsejson:29,parseqs:30,parseuri:38}],14:[function(a,b,c){var d=a("engine.io-parser");var e=a("component-emitter");b.exports=f;function f(a){this.path=a.path;this.hostname=a.hostname;this.port=a.port;this.secure=a.secure;this.query=a.query;this.timestampParam=a.timestampParam;this.timestampRequests=a.timestampRequests;this.readyState="";this.agent=a.agent||false;this.socket=a.socket}e(f.prototype);f.timestamps=0;f.prototype.onError=function(a,b){var c=new Error(a);c.type="TransportError";c.description=b;this.emit("error",c);return this};f.prototype.open=function(){if("closed"==this.readyState||""==this.readyState){this.readyState="opening";this.doOpen()}return this};f.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState){this.doClose();this.onClose()}return this};f.prototype.send=function(a){if("open"==this.readyState){this.write(a)}else{throw new Error("Transport not open")}};f.prototype.onOpen=function(){this.readyState="open";this.writable=true;this.emit("open")};f.prototype.onData=function(a){try{var b=d.decodePacket(a,this.socket.binaryType);this.onPacket(b)}catch(c){c.data=a;this.onError("parser decode error",c)}};f.prototype.onPacket=function(a){this.emit("packet",a)};f.prototype.onClose=function(){this.readyState="closed";this.emit("close")}},{"component-emitter":8,"engine.io-parser":22}],15:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("xmlhttprequest");var f=a("./polling-xhr");var g=a("./polling-jsonp");var h=a("./websocket");c.polling=i;c.websocket=h;function i(a){var b;var c=false;if(d.location){var h="https:"==location.protocol;var i=location.port;if(!i){i=h?443:80}c=a.hostname!=location.hostname||i!=a.port}a.xdomain=c;b=new e(a);if("open"in b&&!a.forceJSONP){return new f(a)}else{return new g(a)}}},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("./polling");var f=a("component-inherit");b.exports=l;var g=/\n/g;var h=/\\n/g;var i;var j=0;function k(){}function l(a){e.call(this,a);this.query=this.query||{};if(!i){if(!d.___eio)d.___eio=[];i=d.___eio}this.index=i.length;var b=this;i.push(function(a){b.onData(a)});this.query.j=this.index;if(d.document&&d.addEventListener){d.addEventListener("beforeunload",function(){if(b.script)b.script.onerror=k})}}f(l,e);l.prototype.supportsBinary=false;l.prototype.doClose=function(){if(this.script){this.script.parentNode.removeChild(this.script);this.script=null}if(this.form){this.form.parentNode.removeChild(this.form);this.form=null}e.prototype.doClose.call(this)};l.prototype.doPoll=function(){var a=this;var b=document.createElement("script");if(this.script){this.script.parentNode.removeChild(this.script);this.script=null}b.async=true;b.src=this.uri();b.onerror=function(b){a.onError("jsonp poll error",b)};var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c);this.script=b;var d="undefine
2014-09-30 18:00:23 +00:00
h=new g;for(i in h){if(e.call(h,i)){d++}}g=h=null;if(!d){h=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];f=function(a,b){var d=c.call(a)==n,f,g;var i=!d&&typeof a.constructor!="function"&&y(a,"hasOwnProperty")?a.hasOwnProperty:e;for(f in a){if(!(d&&f=="prototype")&&i.call(a,f)){b(f)}}for(g=h.length;f=h[--g];i.call(a,f)&&b(f));}}else if(d==2){f=function(a,b){var d={},f=c.call(a)==n,g;for(g in a){if(!(f&&g=="prototype")&&!e.call(d,g)&&(d[g]=1)&&e.call(a,g)){b(g)}}}}else{f=function(a,b){var d=c.call(a)==n,f,g;for(f in a){if(!(d&&f=="prototype")&&e.call(a,f)&&!(g=f==="constructor")){b(f)}}if(g||e.call(a,f="constructor")){b(f)}}}return f(a,b)};if(!m("json-stringify")){var z={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"};var A="000000";var B=function(a,b){return(A+(b||0)).slice(-a)};var C="\\u00";var D=function(a){var b='"',c=0,d=a.length,e=d>10&&t,f;if(e){f=a.split("")}for(;c<d;c++){var g=a.charCodeAt(c);switch(g){case 8:case 9:case 10:case 12:case 13:case 34:case 92:b+=z[g];break;default:if(g<32){b+=C+B(2,g.toString(16));break}b+=e?f[c]:t?a.charAt(c):a[c]}}return b+'"'};var E=function(a,b,d,h,i,j,k){var l,m,n,t,v,x,y,z,A,C,F,G,H,I,J,K;try{l=b[a]}catch(L){}if(typeof l=="object"&&l){m=c.call(l);if(m==o&&!e.call(l,"toJSON")){if(l>-1/0&&l<1/0){if(w){v=u(l/864e5);for(n=u(v/365.2425)+1970-1;w(n+1,0)<=v;n++);for(t=u((v-w(n,0))/30.42);w(n,t+1)<=v;t++);v=1+v-w(n,t);x=(l%864e5+864e5)%864e5;y=u(x/36e5)%24;z=u(x/6e4)%60;A=u(x/1e3)%60;C=x%1e3}else{n=l.getUTCFullYear();t=l.getUTCMonth();v=l.getUTCDate();y=l.getUTCHours();z=l.getUTCMinutes();A=l.getUTCSeconds();C=l.getUTCMilliseconds()}l=(n<=0||n>=1e4?(n<0?"-":"+")+B(6,n<0?-n:n):B(4,n))+"-"+B(2,t+1)+"-"+B(2,v)+"T"+B(2,y)+":"+B(2,z)+":"+B(2,A)+"."+B(3,C)+"Z"}else{l=null}}else if(typeof l.toJSON=="function"&&(m!=p&&m!=q&&m!=r||e.call(l,"toJSON"))){l=l.toJSON(a)}}if(d){l=d.call(b,a,l)}if(l===null){return"null"}m=c.call(l);if(m==s){return""+l}else if(m==p){return l>-1/0&&l<1/0?""+l:"null"}else if(m==q){return D(""+l)}if(typeof l=="object"){for(I=k.length;I--;){if(k[I]===l){throw TypeError()}}k.push(l);F=[];J=j;j+=i;if(m==r){for(H=0,I=l.length;H<I;H++){G=E(H,l,d,h,i,j,k);F.push(G===g?"null":G)}K=F.length?i?"[\n"+j+F.join(",\n"+j)+"\n"+J+"]":"["+F.join(",")+"]":"[]"}else{f(h||l,function(a){var b=E(a,l,d,h,i,j,k);if(b!==g){F.push(D(a)+":"+(i?" ":"")+b)}});K=F.length?i?"{\n"+j+F.join(",\n"+j)+"\n"+J+"}":"{"+F.join(",")+"}":"{}"}k.pop();return K}};j.stringify=function(a,b,d){var e,f,g,h;if(typeof b=="function"||typeof b=="object"&&b){if((h=c.call(b))==n){f=b}else if(h==r){g={};for(var i=0,j=b.length,k;i<j;k=b[i++],(h=c.call(k),h==q||h==p)&&(g[k]=1));}}if(d){if((h=c.call(d))==p){if((d-=d%1)>0){for(e="",d>10&&(d=10);e.length<d;e+=" ");}}else if(h==q){e=d.length<=10?d:d.slice(0,10)}}return E("",(k={},k[""]=a,k),f,g,e,"",[])}}if(!m("json-parse")){var F=String.fromCharCode;var G={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:"\n",102:"\f",114:"\r"};var H,I;var J=function(){H=I=null;throw SyntaxError()};var K=function(){var a=I,b=a.length,c,d,e,f,g;while(H<b){g=a.charCodeAt(H);switch(g){case 9:case 10:case 13:case 32:H++;break;case 123:case 125:case 91:case 93:case 58:case 44:c=t?a.charAt(H):a[H];H++;return c;case 34:for(c="@",H++;H<b;){g=a.charCodeAt(H);if(g<32){J()}else if(g==92){g=a.charCodeAt(++H);switch(g){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:c+=G[g];H++;break;case 117:d=++H;for(e=H+4;H<e;H++){g=a.charCodeAt(H);if(!(g>=48&&g<=57||g>=97&&g<=102||g>=65&&g<=70)){J()}}c+=F("0x"+a.slice(d,H));break;default:J()}}else{if(g==34){break}g=a.charCodeAt(H);d=H;while(g>=32&&g!=92&&g!=34){g=a.charCodeAt(++H)}c+=a.slice(d,H)}}if(a.charCodeAt(H)==34){H++;return c}J();default:d=H;if(g==45){f=true;g=a.charCodeAt(++H)}if(g>=48&&g<=57){if(g==48&&(g=a.charCodeAt(H+1),g>=48&&g<=57)){J()}f=false;for(;H<b&&(g=a.charCodeAt(H),g>=48&&g<=57);H++);if(a.charCodeAt(H)==46){e=++H;for(;e<b&&(g=a.charCodeAt(e),g>=48&&g<=57);e++);if(e==H){J()}H=e}g=a.charCodeAt(H);if(g==101||g==69){g=a.charCodeAt(++H);if(g==43||g==45){H++}for
var c=["protocol","username","password","hostname","port"];var d,e,g;if(this._parts.urn){throw new Error("URNs do not have any generally defined hierarchical components")}if(!(a instanceof f)){a=new f(a)}if(!b._parts.protocol){b._parts.protocol=a._parts.protocol}if(this._parts.hostname){return b}for(e=0;g=c[e];e++){b._parts[g]=a._parts[g]}if(!b._parts.path){b._parts.path=a._parts.path;if(!b._parts.query){b._parts.query=a._parts.query}}else if(b._parts.path.substring(-2)===".."){b._parts.path+="/"}if(b.path().charAt(0)!=="/"){d=a.directory();b._parts.path=(d?d+"/":"")+b._parts.path;b.normalizePath()}b.build();return b};g.relativeTo=function(a){var b=this.clone().normalize();var c,d,e,g,h;if(b._parts.urn){throw new Error("URNs do not have any generally defined hierarchical components")}a=new f(a).normalize();c=b._parts;d=a._parts;g=b.path();h=a.path();if(g.charAt(0)!=="/"){throw new Error("URI is already relative")}if(h.charAt(0)!=="/"){throw new Error("Cannot calculate a URI relative to another relative URI")}if(c.protocol===d.protocol){c.protocol=null}if(c.username!==d.username||c.password!==d.password){return b.build()}if(c.protocol!==null||c.username!==null||c.password!==null){return b.build()}if(c.hostname===d.hostname&&c.port===d.port){c.hostname=null;c.port=null}else{return b.build()}if(g===h){c.path="";return b.build()}e=f.commonPath(b.path(),a.path());if(!e){return b.build()}var i=d.path.substring(e.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");c.path=i+c.path.substring(e.length);return b.build()};g.equals=function(a){var b=this.clone();var c=new f(a);var d={};var e={};var g={};var i,j,l;b.normalize();c.normalize();if(b.toString()===c.toString()){return true}i=b.query();j=c.query();b.query("");c.query("");if(b.toString()!==c.toString()){return false}if(i.length!==j.length){return false}d=f.parseQuery(i,this._parts.escapeQuerySpace);e=f.parseQuery(j,this._parts.escapeQuerySpace);for(l in d){if(h.call(d,l)){if(!k(d[l])){if(d[l]!==e[l]){return false}}else if(!n(d[l],e[l])){return false}g[l]=true}}for(l in e){if(h.call(e,l)){if(!g[l]){return false}}}return true};g.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};g.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return f});