Michael DeWitt e102acd87e v0.1.63
2015-08-01 06:33:10 -07:00

184 lines
96 KiB
JavaScript

(function() {var h,aa=aa||{},l=this,m=function(a){return void 0!==a},ba=function(){},ca=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=
typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},n=function(a){return"array"==ca(a)},da=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},q=function(a){return"number"==typeof a},r=function(a){return"function"==ca(a)},t=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},ea="closure_uid_"+
(1E9*Math.random()>>>0),fa=0,ga=function(a,b,c){return a.call.apply(a.bind,arguments)},ha=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},u=function(a,b,c){u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ga:ha;return u.apply(null,arguments)},
ia=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},ja=Date.now||function(){return+new Date},v=function(a,b){var c=a.split("."),d=l;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&m(b)?d[e]=b:d=d[e]?d[e]:d[e]={}},w=function(a,b){function c(){}c.prototype=b.prototype;a.l=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Hd=function(a,c,f){for(var g=
Array(arguments.length-2),k=2;k<arguments.length;k++)g[k-2]=arguments[k];return b.prototype[c].apply(a,g)}};var ka=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},na=function(a){var b=la,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},oa=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},qa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},ra=function(a){for(var b in a)return!1;return!0},sa=function(a,b){b in a&&delete a[b]},ta=function(a){var b={},c;for(c in a)b[c]=a[c];return b},ua=function(a){var b=
ca(a);if("object"==b||"array"==b){if(a.clone)return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=ua(a[c]);return b}return a},va="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),wa=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<va.length;f++)c=va[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},xa=function(a){var b=arguments.length;if(1==b&&n(arguments[0]))return xa.apply(null,
arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};var x=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,x);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};w(x,Error);x.prototype.name="CustomError";var ya;var za=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},Aa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ia=function(a){if(!Ba.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ca,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Da,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Ea,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Fa,"&quot;"));-1!=a.indexOf("'")&&
(a=a.replace(Ga,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(Ha,"&#0;"));return a},Ca=/&/g,Da=/</g,Ea=/>/g,Fa=/"/g,Ga=/'/g,Ha=/\x00/g,Ba=/[\x00&<>"']/,Ja=function(a,b){return a<b?-1:a>b?1:0};var Ka=function(a,b){b.unshift(a);x.call(this,za.apply(null,b));b.shift()};w(Ka,x);Ka.prototype.name="AssertionError";
var La=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),f=d;else a&&(e+=": "+a,f=b);throw new Ka(""+e,f||[]);},z=function(a,b,c){a||La("",null,b,Array.prototype.slice.call(arguments,2));return a},Ma=function(a,b){throw new Ka("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Na=function(a,b,c){r(a)||La("Expected function but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var A=Array.prototype,Oa=A.indexOf?function(a,b,c){z(null!=a.length);return A.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Pa=A.lastIndexOf?function(a,b,c){z(null!=a.length);return A.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(p(a))return p(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=
c;c--)if(c in a&&a[c]===b)return c;return-1},Qa=A.forEach?function(a,b,c){z(null!=a.length);A.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Ra=A.filter?function(a,b,c){z(null!=a.length);return A.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=p(a)?a.split(""):a,k=0;k<d;k++)if(k in g){var y=g[k];b.call(c,y,k,a)&&(e[f++]=y)}return e},Sa=A.map?function(a,b,c){z(null!=a.length);return A.map.call(a,b,c)}:function(a,
b,c){for(var d=a.length,e=Array(d),f=p(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Ta=A.some?function(a,b,c){z(null!=a.length);return A.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},Ua=A.every?function(a,b,c){z(null!=a.length);return A.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0},Wa=function(a){var b;
a:{b=Va;for(var c=a.length,d=p(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},Xa=function(a){if(!n(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},Za=function(a,b){var c=Oa(a,b),d;(d=0<=c)&&Ya(a,c);return d},Ya=function(a,b){z(null!=a.length);A.splice.call(a,b,1)},$a=function(a){return A.concat.apply(A,arguments)},ab=function(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]},cb=function(a,
b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(da(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}},db=function(a,b,c){z(null!=a.length);return 2>=arguments.length?A.slice.call(a,b):A.slice.call(a,b,c)},eb=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],f;f=e;f=t(f)?"o"+(f[ea]||(f[ea]=++fa)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c};var fb=function(a){return a};var gb=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},hb=function(a){return eval("("+a+")")},jb=function(a){return(new ib(void 0)).v(a)},ib=function(a){this.$a=a};
ib.prototype.v=function(a){var b=[];kb(this,a,b);return b.join("")};
var kb=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(n(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],kb(a,a.$a?a.$a.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),lb(d,c),c.push(":"),kb(a,a.$a?a.$a.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":lb(b,
c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},mb={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},nb=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,lb=function(a,b){b.push('"',a.replace(nb,function(a){var b=mb[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
mb[a]=b);return b}),'"')};xa("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));var ob;a:{var pb=l.navigator;if(pb){var qb=pb.userAgent;if(qb){ob=qb;break a}}ob=""}var B=function(a){return-1!=ob.indexOf(a)};var rb=B("Opera")||B("OPR"),C=B("Trident")||B("MSIE"),sb=B("Edge"),tb=B("Gecko")&&!(-1!=ob.toLowerCase().indexOf("webkit")&&!B("Edge"))&&!(B("Trident")||B("MSIE"))&&!B("Edge"),ub=-1!=ob.toLowerCase().indexOf("webkit")&&!B("Edge"),vb=function(){var a=ob;if(tb)return/rv\:([^\);]+)(\)|;)/.exec(a);if(sb)return/Edge\/([\d\.]+)/.exec(a);if(C)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(ub)return/WebKit\/(\S+)/.exec(a)},wb=function(){var a=l.document;return a?a.documentMode:void 0},xb=function(){if(rb&&
l.opera){var a=l.opera.version;return r(a)?a():a}var a="",b=vb();b&&(a=b?b[1]:"");return C&&(b=wb(),b>parseFloat(a))?String(b):a}(),yb={},zb=function(a){var b;if(!(b=yb[a])){b=0;for(var c=Aa(String(xb)).split("."),d=Aa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",k=d[f]||"",y=RegExp("(\\d*)(\\D*)","g"),ma=RegExp("(\\d*)(\\D*)","g");do{var V=y.exec(g)||["","",""],bb=ma.exec(k)||["","",""];if(0==V[0].length&&0==bb[0].length)break;b=Ja(0==V[1].length?0:parseInt(V[1],
10),0==bb[1].length?0:parseInt(bb[1],10))||Ja(0==V[2].length,0==bb[2].length)||Ja(V[2],bb[2])}while(0==b)}b=yb[a]=0<=b}return b},Ab=l.document,Bb=Ab&&C?wb()||("CSS1Compat"==Ab.compatMode?parseInt(xb,10):5):void 0;var Cb=!C||9<=Bb,Db=!tb&&!C||C&&9<=Bb||tb&&zb("1.9.1");C&&zb("9");var Fb=function(a,b){ka(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:Eb.hasOwnProperty(d)?a.setAttribute(Eb[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},Eb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Hb=function(a,b,c){return Gb(document,
arguments)},Gb=function(a,b){var c=b[0],d=b[1];if(!Cb&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',Ia(d.name),'"');if(d.type){c.push(' type="',Ia(d.type),'"');var e={};wa(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(p(d)?c.className=d:n(d)?c.className=d.join(" "):Fb(c,d));2<b.length&&Ib(a,c,b);return c},Ib=function(a,b,c){function d(c){c&&b.appendChild(p(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var f=c[e];!da(f)||t(f)&&0<f.nodeType?d(f):Qa(Jb(f)?
ab(f):f,d)}},Kb=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},Lb=function(a){z(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},Jb=function(a){if(a&&"number"==typeof a.length){if(t(a))return"function"==typeof a.item||"string"==typeof a.item;if(r(a))return"function"==typeof a.item}return!1},Mb=function(a){this.vb=a||l.document||document};h=Mb.prototype;h.Ic=function(a,b,c){return Gb(this.vb,arguments)};h.createElement=function(a){return this.vb.createElement(a)};
h.createTextNode=function(a){return this.vb.createTextNode(String(a))};h.appendChild=function(a,b){a.appendChild(b)};h.cc=function(a){return Db&&void 0!=a.children?a.children:Ra(a.childNodes,function(a){return 1==a.nodeType})};h.contains=function(a,b){if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};var Nb=function(a,b,c){this.cd=c;this.Jc=a;this.sd=b;this.Wa=0;this.Ra=null};Nb.prototype.get=function(){var a;0<this.Wa?(this.Wa--,a=this.Ra,this.Ra=a.next,a.next=null):a=this.Jc();return a};Nb.prototype.put=function(a){this.sd(a);this.Wa<this.cd&&(this.Wa++,a.next=this.Ra,this.Ra=a)};var Ob=function(a){l.setTimeout(function(){throw a;},0)},Pb,Qb=function(){var a=l.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!B("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,
a=u(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!B("Trident")&&!B("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(m(c.next)){c=c.next;var a=c.Wb;c.Wb=null;a()}};return function(a){d.next={Wb:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?
function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){l.setTimeout(a,0)}};var Rb=function(){this.kb=this.da=null},Tb=new Nb(function(){return new Sb},function(a){a.reset()},100);Rb.prototype.add=function(a,b){var c=Tb.get();c.set(a,b);this.kb?this.kb.next=c:(z(!this.da),this.da=c);this.kb=c};Rb.prototype.remove=function(){var a=null;this.da&&(a=this.da,this.da=this.da.next,this.da||(this.kb=null),a.next=null);return a};var Sb=function(){this.next=this.scope=this.yb=null};Sb.prototype.set=function(a,b){this.yb=a;this.scope=b;this.next=null};
Sb.prototype.reset=function(){this.next=this.scope=this.yb=null};var Yb=function(a,b){Ub||Vb();Wb||(Ub(),Wb=!0);Xb.add(a,b)},Ub,Vb=function(){if(l.Promise&&l.Promise.resolve){var a=l.Promise.resolve(void 0);Ub=function(){a.then(Zb)}}else Ub=function(){var a=Zb;!r(l.setImmediate)||l.Window&&l.Window.prototype&&l.Window.prototype.setImmediate==l.setImmediate?(Pb||(Pb=Qb()),Pb(a)):l.setImmediate(a)}},Wb=!1,Xb=new Rb;[].push(function(){Wb=!1;Xb=new Rb});var Zb=function(){for(var a=null;a=Xb.remove();){try{a.yb.call(a.scope)}catch(b){Ob(b)}Tb.put(a)}Wb=!1};var $b=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},ac=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var dc=function(a,b){this.C=0;this.T=void 0;this.fa=this.P=this.f=null;this.Oa=this.xb=!1;if(a!=ba)try{var c=this;a.call(b,function(a){bc(c,2,a)},function(a){if(!(a instanceof cc))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}bc(c,3,a)})}catch(d){bc(this,3,d)}},ec=function(){this.next=this.context=this.ja=this.ba=this.X=null;this.Ha=!1};ec.prototype.reset=function(){this.context=this.ja=this.ba=this.X=null;this.Ha=!1};
var fc=new Nb(function(){return new ec},function(a){a.reset()},100),gc=function(a,b,c){var d=fc.get();d.ba=a;d.ja=b;d.context=c;return d};dc.prototype.then=function(a,b,c){null!=a&&Na(a,"opt_onFulfilled should be a function.");null!=b&&Na(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return hc(this,r(a)?a:null,r(b)?b:null,c)};$b(dc);dc.prototype.cancel=function(a){0==this.C&&Yb(function(){var b=new cc(a);ic(this,b)},this)};
var ic=function(a,b){if(0==a.C)if(a.f){var c=a.f;if(c.P){for(var d=0,e=null,f=null,g=c.P;g&&(g.Ha||(d++,g.X==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.C&&1==d?ic(c,b):(f?(d=f,z(c.P),z(null!=d),d.next==c.fa&&(c.fa=d),d.next=d.next.next):jc(c),kc(c,e,3,b)))}a.f=null}else bc(a,3,b)},mc=function(a,b){a.P||2!=a.C&&3!=a.C||lc(a);z(null!=b.ba);a.fa?a.fa.next=b:a.P=b;a.fa=b},hc=function(a,b,c,d){var e=gc(null,null,null);e.X=new dc(function(a,g){e.ba=b?function(c){try{var e=b.call(d,c);a(e)}catch(ma){g(ma)}}:
a;e.ja=c?function(b){try{var e=c.call(d,b);!m(e)&&b instanceof cc?g(b):a(e)}catch(ma){g(ma)}}:g});e.X.f=a;mc(a,e);return e.X};dc.prototype.yd=function(a){z(1==this.C);this.C=0;bc(this,2,a)};dc.prototype.zd=function(a){z(1==this.C);this.C=0;bc(this,3,a)};
var bc=function(a,b,c){if(0==a.C){a==c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.C=1;var d;a:{var e=c,f=a.yd,g=a.zd;if(e instanceof dc)null!=f&&Na(f,"opt_onFulfilled should be a function."),null!=g&&Na(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),mc(e,gc(f||ba,g||null,a)),d=!0;else if(ac(e))e.then(f,g,a),d=!0;else{if(t(e))try{var k=e.then;if(r(k)){nc(e,k,f,g,a);d=!0;break a}}catch(y){g.call(a,y);d=!0;break a}d=!1}}d||
(a.T=c,a.C=b,a.f=null,lc(a),3!=b||c instanceof cc||oc(a,c))}},nc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},k=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,k)}catch(y){k(y)}},lc=function(a){a.xb||(a.xb=!0,Yb(a.Nc,a))},jc=function(a){var b=null;a.P&&(b=a.P,a.P=b.next,b.next=null);a.P||(a.fa=null);null!=b&&z(null!=b.ba);return b};dc.prototype.Nc=function(){for(var a=null;a=jc(this);)kc(this,a,this.C,this.T);this.xb=!1};
var kc=function(a,b,c,d){if(3==c&&b.ja&&!b.Ha)for(;a&&a.Oa;a=a.f)a.Oa=!1;if(b.X)b.X.f=null,pc(b,c,d);else try{b.Ha?b.ba.call(b.context):pc(b,c,d)}catch(e){qc.call(null,e)}fc.put(b)},pc=function(a,b,c){2==b?a.ba.call(a.context,c):a.ja&&a.ja.call(a.context,c)},oc=function(a,b){a.Oa=!0;Yb(function(){a.Oa&&qc.call(null,b)})},qc=Ob,cc=function(a){x.call(this,a)};w(cc,x);cc.prototype.name="cancel";/*
Portions of this code are from MochiKit, received by
The Closure Authors under the MIT license. All other code is Copyright
2005-2009 The Closure Authors. All Rights Reserved.
*/
var rc=function(a,b){this.bb=[];this.mc=a;this.Zb=b||null;this.va=this.ia=!1;this.T=void 0;this.Nb=this.Ub=this.ob=!1;this.hb=0;this.f=null;this.pb=0};rc.prototype.cancel=function(a){if(this.ia)this.T instanceof rc&&this.T.cancel();else{if(this.f){var b=this.f;delete this.f;a?b.cancel(a):(b.pb--,0>=b.pb&&b.cancel())}this.mc?this.mc.call(this.Zb,this):this.Nb=!0;this.ia||sc(this,new tc)}};rc.prototype.Xb=function(a,b){this.ob=!1;uc(this,a,b)};
var uc=function(a,b,c){a.ia=!0;a.T=c;a.va=!b;vc(a)},xc=function(a){if(a.ia){if(!a.Nb)throw new wc;a.Nb=!1}},sc=function(a,b){xc(a);yc(b);uc(a,!1,b)},yc=function(a){z(!(a instanceof rc),"An execution sequence may not be initiated with a blocking Deferred.")},zc=function(a,b,c){z(!a.Ub,"Blocking Deferreds can not be re-used");a.bb.push([b,c,void 0]);a.ia&&vc(a)};
rc.prototype.then=function(a,b,c){var d,e,f=new dc(function(a,b){d=a;e=b});zc(this,d,function(a){a instanceof tc?f.cancel():e(a)});return f.then(a,b,c)};$b(rc);
var Ac=function(a){return Ta(a.bb,function(a){return r(a[1])})},vc=function(a){if(a.hb&&a.ia&&Ac(a)){var b=a.hb,c=Bc[b];c&&(l.clearTimeout(c.S),delete Bc[b]);a.hb=0}a.f&&(a.f.pb--,delete a.f);for(var b=a.T,d=c=!1;a.bb.length&&!a.ob;){var e=a.bb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.va?g:f)try{var k=f.call(e||a.Zb,b);m(k)&&(a.va=a.va&&(k==b||k instanceof Error),a.T=b=k);if(ac(b)||"function"===typeof l.Promise&&b instanceof l.Promise)d=!0,a.ob=!0}catch(y){b=y,a.va=!0,Ac(a)||(c=!0)}}a.T=b;d&&(k=u(a.Xb,
a,!0),d=u(a.Xb,a,!1),b instanceof rc?(zc(b,k,d),b.Ub=!0):b.then(k,d));c&&(b=new Cc(b),Bc[b.S]=b,a.hb=b.S)},wc=function(){x.call(this)};w(wc,x);wc.prototype.message="Deferred has already fired";wc.prototype.name="AlreadyCalledError";var tc=function(){x.call(this)};w(tc,x);tc.prototype.message="Deferred was canceled";tc.prototype.name="CanceledError";var Cc=function(a){this.S=l.setTimeout(u(this.vd,this),0);this.Ma=a};
Cc.prototype.vd=function(){z(Bc[this.S],"Cannot throw an error that is not scheduled.");delete Bc[this.S];throw this.Ma;};var Bc={};var Hc=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={sc:d,Ba:void 0},f=new rc(Dc,e),g=null,k=null!=b.timeout?b.timeout:5E3;0<k&&(g=window.setTimeout(function(){Ec(d,!0);sc(f,new Fc(1,"Timeout reached for loading script "+a))},k),e.Ba=g);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(Ec(d,b.Id||!1,g),xc(f),yc(null),uc(f,!0,null))};d.onerror=function(){Ec(d,!0,g);sc(f,new Fc(0,"Error while loading script "+
a))};e=b.attributes||{};wa(e,{type:"text/javascript",charset:"UTF-8",src:a});Fb(d,e);Gc(c).appendChild(d)},Gc=function(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement},Dc=function(){if(this&&this.sc){var a=this.sc;a&&"SCRIPT"==a.tagName&&Ec(a,!0,this.Ba)}},Ec=function(a,b,c){null!=c&&l.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},0)},Fc=function(a,b){var c="Jsloader error (code #"+
a+")";b&&(c+=": "+b);x.call(this,c);this.code=a};w(Fc,x);var Ic=function(){this.U=this.U;this.Xa=this.Xa};Ic.prototype.U=!1;Ic.prototype.R=function(){this.U||(this.U=!0,this.s())};Ic.prototype.s=function(){if(this.Xa)for(;this.Xa.length;)this.Xa.shift()()};var Jc=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.ka=!1;this.rc=!0};Jc.prototype.preventDefault=function(){this.defaultPrevented=!0;this.rc=!1};var Kc=function(a){Kc[" "](a);return a};Kc[" "]=ba;var Lc=!C||9<=Bb,Mc=C&&!zb("9");!ub||zb("528");tb&&zb("1.9b")||C&&zb("8")||rb&&zb("9.5")||ub&&zb("528");tb&&!zb("8")||C&&zb("9");var Nc=function(a,b){Jc.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.ha=this.state=null;if(a){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(tb){var e;a:{try{Kc(d.nodeName);e=!0;break a}catch(f){}e=!1}e||(d=null)}}else"mouseover"==
c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.offsetX=ub||void 0!==a.offsetX?a.offsetX:a.layerX;this.offsetY=ub||void 0!==a.offsetY?a.offsetY:a.layerY;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;
this.metaKey=a.metaKey;this.state=a.state;this.ha=a;a.defaultPrevented&&this.preventDefault()}};w(Nc,Jc);Nc.prototype.preventDefault=function(){Nc.l.preventDefault.call(this);var a=this.ha;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Mc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Oc="closure_listenable_"+(1E6*Math.random()|0),Pc=function(a){return!(!a||!a[Oc])},Qc=0;var Rc=function(a,b,c,d,e){this.listener=a;this.Ya=null;this.src=b;this.type=c;this.Ja=!!d;this.Qa=e;this.key=++Qc;this.la=this.Ia=!1},Sc=function(a){a.la=!0;a.listener=null;a.Ya=null;a.src=null;a.Qa=null};var Tc=function(a){this.src=a;this.A={};this.Ca=0};Tc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.A[f];a||(a=this.A[f]=[],this.Ca++);var g=Uc(a,b,d,e);-1<g?(b=a[g],c||(b.Ia=!1)):(b=new Rc(b,this.src,f,!!d,e),b.Ia=c,a.push(b));return b};Tc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.A))return!1;var e=this.A[a];b=Uc(e,b,c,d);return-1<b?(Sc(e[b]),Ya(e,b),0==e.length&&(delete this.A[a],this.Ca--),!0):!1};
var Vc=function(a,b){var c=b.type;c in a.A&&Za(a.A[c],b)&&(Sc(b),0==a.A[c].length&&(delete a.A[c],a.Ca--))};Tc.prototype.Za=function(a){a=a&&a.toString();var b=0,c;for(c in this.A)if(!a||c==a){for(var d=this.A[c],e=0;e<d.length;e++)++b,Sc(d[e]);delete this.A[c];this.Ca--}return b};Tc.prototype.ta=function(a,b,c,d){a=this.A[a.toString()];var e=-1;a&&(e=Uc(a,b,c,d));return-1<e?a[e]:null};var Uc=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.la&&f.listener==b&&f.Ja==!!c&&f.Qa==d)return e}return-1};var Wc="closure_lm_"+(1E6*Math.random()|0),Xc={},Yc=0,Zc=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)Zc(a,b[f],c,d,e);return null}c=$c(c);return Pc(a)?a.Ua(b,c,d,e):ad(a,b,c,!1,d,e)},ad=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,k=bd(a);k||(a[Wc]=k=new Tc(a));c=k.add(b,c,d,e,f);if(c.Ya)return c;d=cd();c.Ya=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(dd(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
Yc++;return c},cd=function(){var a=ed,b=Lc?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},fd=function(a,b,c,d,e){if(n(b)){for(var f=0;f<b.length;f++)fd(a,b[f],c,d,e);return null}c=$c(c);return Pc(a)?a.Hb(b,c,d,e):ad(a,b,c,!0,d,e)},gd=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)gd(a,b[f],c,d,e);else c=$c(c),Pc(a)?a.ib(b,c,d,e):a&&(a=bd(a))&&(b=a.ta(b,c,!!d,e))&&hd(b)},hd=function(a){if(!q(a)&&a&&!a.la){var b=a.src;if(Pc(b))Vc(b.L,
a);else{var c=a.type,d=a.Ya;b.removeEventListener?b.removeEventListener(c,d,a.Ja):b.detachEvent&&b.detachEvent(dd(c),d);Yc--;(c=bd(b))?(Vc(c,a),0==c.Ca&&(c.src=null,b[Wc]=null)):Sc(a)}}},dd=function(a){return a in Xc?Xc[a]:Xc[a]="on"+a},jd=function(a,b,c,d){var e=!0;if(a=bd(a))if(b=a.A[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.Ja==c&&!f.la&&(f=id(f,d),e=e&&!1!==f)}return e},id=function(a,b){var c=a.listener,d=a.Qa||a.src;a.Ia&&hd(a);return c.call(d,b)},ed=function(a,b){if(a.la)return!0;
if(!Lc){var c;if(!(c=b))a:{c=["window","event"];for(var d=l,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new Nc(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(g){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,k=e.length-1;!c.ka&&0<=k;k--){c.currentTarget=e[k];var y=jd(e[k],f,!0,c),d=d&&y}for(k=0;!c.ka&&k<e.length;k++)c.currentTarget=e[k],
y=jd(e[k],f,!1,c),d=d&&y}return d}return id(a,new Nc(b,this))},bd=function(a){a=a[Wc];return a instanceof Tc?a:null},kd="__closure_events_fn_"+(1E9*Math.random()>>>0),$c=function(a){z(a,"Listener can not be null.");if(r(a))return a;z(a.handleEvent,"An object listener must have handleEvent method.");a[kd]||(a[kd]=function(b){return a.handleEvent(b)});return a[kd]};var D=function(){Ic.call(this);this.L=new Tc(this);this.zc=this;this.Lb=null};w(D,Ic);D.prototype[Oc]=!0;h=D.prototype;h.addEventListener=function(a,b,c,d){Zc(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){gd(this,a,b,c,d)};
h.dispatchEvent=function(a){ld(this);var b,c=this.Lb;if(c){b=[];for(var d=1;c;c=c.Lb)b.push(c),z(1E3>++d,"infinite loop")}c=this.zc;d=a.type||a;if(p(a))a=new Jc(a,c);else if(a instanceof Jc)a.target=a.target||c;else{var e=a;a=new Jc(d,c);wa(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.ka&&0<=g;g--)f=a.currentTarget=b[g],e=md(f,d,!0,a)&&e;a.ka||(f=a.currentTarget=c,e=md(f,d,!0,a)&&e,a.ka||(e=md(f,d,!1,a)&&e));if(b)for(g=0;!a.ka&&g<b.length;g++)f=a.currentTarget=b[g],e=md(f,d,!1,a)&&e;return e};
h.s=function(){D.l.s.call(this);this.L&&this.L.Za(void 0);this.Lb=null};h.Ua=function(a,b,c,d){ld(this);return this.L.add(String(a),b,!1,c,d)};h.Hb=function(a,b,c,d){return this.L.add(String(a),b,!0,c,d)};h.ib=function(a,b,c,d){return this.L.remove(String(a),b,c,d)};var md=function(a,b,c,d){b=a.L.A[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.la&&g.Ja==c){var k=g.listener,y=g.Qa||g.src;g.Ia&&Vc(a.L,g);e=!1!==k.call(y,d)&&e}}return e&&0!=d.rc};
D.prototype.ta=function(a,b,c,d){return this.L.ta(String(a),b,c,d)};var ld=function(a){z(a.L,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var nd="StopIteration"in l?l.StopIteration:{message:"StopIteration",stack:""},od=function(){};od.prototype.next=function(){throw nd;};od.prototype.ea=function(){return this};
var pd=function(a){if(a instanceof od)return a;if("function"==typeof a.ea)return a.ea(!1);if(da(a)){var b=0,c=new od;c.next=function(){for(;;){if(b>=a.length)throw nd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},qd=function(a,b){if(da(a))try{Qa(a,b,void 0)}catch(c){if(c!==nd)throw c;}else{a=pd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(d){if(d!==nd)throw d;}}};var rd=function(a,b){this.j={};this.c=[];this.Da=this.g=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};h=rd.prototype;h.u=function(){return this.g};h.w=function(){sd(this);for(var a=[],b=0;b<this.c.length;b++)a.push(this.j[this.c[b]]);return a};h.N=function(){sd(this);return this.c.concat()};h.Y=function(a){return td(this.j,a)};h.isEmpty=function(){return 0==this.g};
h.clear=function(){this.j={};this.Da=this.g=this.c.length=0};h.remove=function(a){return td(this.j,a)?(delete this.j[a],this.g--,this.Da++,this.c.length>2*this.g&&sd(this),!0):!1};var sd=function(a){if(a.g!=a.c.length){for(var b=0,c=0;b<a.c.length;){var d=a.c[b];td(a.j,d)&&(a.c[c++]=d);b++}a.c.length=c}if(a.g!=a.c.length){for(var e={},c=b=0;b<a.c.length;)d=a.c[b],td(e,d)||(a.c[c++]=d,e[d]=1),b++;a.c.length=c}};h=rd.prototype;h.get=function(a,b){return td(this.j,a)?this.j[a]:b};
h.set=function(a,b){td(this.j,a)||(this.g++,this.c.push(a),this.Da++);this.j[a]=b};h.addAll=function(a){var b;a instanceof rd?(b=a.N(),a=a.w()):(b=qa(a),a=pa(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.N(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new rd(this)};
h.ea=function(a){sd(this);var b=0,c=this.Da,d=this,e=new od;e.next=function(){if(c!=d.Da)throw Error("The map has changed since the iterator was created");if(b>=d.c.length)throw nd;var e=d.c[b++];return a?e:d.j[e]};return e};var td=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var ud=function(a){if("function"==typeof a.w)return a.w();if(p(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return pa(a)},vd=function(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||p(a))Qa(a,b,void 0);else{var c;if("function"==typeof a.N)c=a.N();else if("function"!=typeof a.w)if(da(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=qa(a);else c=void 0;for(var d=ud(a),e=d.length,f=0;f<e;f++)b.call(void 0,d[f],c&&c[f],
a)}};var wd=function(a){this.j=new rd;a&&this.addAll(a)},xd=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[ea]||(a[ea]=++fa)):b.substr(0,1)+a};h=wd.prototype;h.u=function(){return this.j.u()};h.add=function(a){this.j.set(xd(a),a)};h.addAll=function(a){a=ud(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.Za=function(a){a=ud(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.j.remove(xd(a))};h.clear=function(){this.j.clear()};h.isEmpty=function(){return this.j.isEmpty()};
h.contains=function(a){return this.j.Y(xd(a))};h.w=function(){return this.j.w()};h.clone=function(){return new wd(this)};h.ea=function(){return this.j.ea(!1)};var yd=function(a,b,c,d,e){this.reset(a,b,c,d,e)};yd.prototype.ac=null;var zd=0;yd.prototype.reset=function(a,b,c,d,e){"number"==typeof e||zd++;d||ja();this.za=a;this.hd=b;delete this.ac};yd.prototype.uc=function(a){this.za=a};var Ad=function(a){this.jd=a;this.ec=this.qb=this.za=this.f=null},Bd=function(a,b){this.name=a;this.value=b};Bd.prototype.toString=function(){return this.name};var Cd=new Bd("SEVERE",1E3),Dd=new Bd("CONFIG",700),Ed=new Bd("FINE",500);Ad.prototype.getParent=function(){return this.f};Ad.prototype.cc=function(){this.qb||(this.qb={});return this.qb};Ad.prototype.uc=function(a){this.za=a};var Fd=function(a){if(a.za)return a.za;if(a.f)return Fd(a.f);Ma("Root logger has no level set.");return null};
Ad.prototype.log=function(a,b,c){if(a.value>=Fd(this).value)for(r(b)&&(b=b()),a=new yd(a,String(b),this.jd),c&&(a.ac=c),c="log:"+a.hd,l.console&&(l.console.timeStamp?l.console.timeStamp(c):l.console.markTimeline&&l.console.markTimeline(c)),l.msWriteProfilerMark&&l.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.ec)for(var e=0,f=void 0;f=b.ec[e];e++)f(d);c=c.getParent()}};
var Gd={},Hd=null,Id=function(a){Hd||(Hd=new Ad(""),Gd[""]=Hd,Hd.uc(Dd));var b;if(!(b=Gd[a])){b=new Ad(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Id(a.substr(0,c));c.cc()[d]=b;b.f=c;Gd[a]=b}return b};var Jd=function(a,b){a&&a.log(Ed,b,void 0)};var Kd=function(a,b,c){if(r(a))c&&(a=u(a,c));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:l.setTimeout(a,b||0)};var Ld=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Nd=function(a){if(Md){Md=!1;var b=l.location;if(b){var c=b.href;if(c&&(c=(c=Nd(c)[3]||null)?decodeURI(c):c)&&c!=b.hostname)throw Md=!0,Error();}}return a.match(Ld)},Md=ub,Od=function(a,b){if(a)for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),f=null,g=null;0<=e?(f=c[d].substring(0,e),g=c[d].substring(e+1)):f=c[d];b(f,g?decodeURIComponent(g.replace(/\+/g," ")):"")}};var Pd=function(){};Pd.prototype.Vb=null;Pd.prototype.ua=function(){var a;(a=this.Vb)||(a={},Qd(this)&&(a[0]=!0,a[1]=!0),a=this.Vb=a);return a};var Rd=function(a,b){this.Cd=a;this.pd=b};w(Rd,Pd);Rd.prototype.rb=function(){return this.Cd()};Rd.prototype.ua=function(){return this.pd()};var Sd=function(){return Sd.bc.rb()};Sd.yc=!1;Sd.ua=function(){return Sd.bc.ua()};Sd.Jd=function(a,b){Sd.tc(new Rd(z(a),z(b)))};Sd.tc=function(a){Sd.bc=a};var Td=function(){};w(Td,Pd);Td.prototype.rb=function(){var a=Qd(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Qd=function(a){if(Sd.yc)return"";if(!a.fc&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.fc=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.fc};Sd.tc(new Td);var E=function(a){D.call(this);this.headers=new rd;this.mb=a||null;this.H=!1;this.lb=this.a=null;this.ya=this.kc=this.Ta="";this.aa=this.Cb=this.Sa=this.wb=!1;this.pa=0;this.cb=null;this.qc="";this.jb=this.Bd=!1};w(E,D);var Ud=E.prototype,Vd=Id("goog.net.XhrIo");Ud.G=Vd;var Wd=/^https?$/i,Xd=["POST","PUT"],Yd=[],$d=function(a,b,c,d,e){var f=Zd,g=new E;Yd.push(g);b&&g.Ua("complete",b);g.Hb("ready",g.Gc);f&&(g.pa=Math.max(0,f));g.send(a,c,d,e)};E.prototype.Gc=function(){this.R();Za(Yd,this)};
E.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Ta+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Ta=a;this.ya="";this.kc=b;this.wb=!1;this.H=!0;this.a=this.mb?this.mb.rb():Sd();this.lb=this.mb?this.mb.ua():Sd.ua();this.a.onreadystatechange=u(this.oc,this);try{Jd(this.G,ae(this,"Opening Xhr")),this.Cb=!0,this.a.open(b,String(a),!0),this.Cb=!1}catch(e){Jd(this.G,ae(this,"Error opening Xhr: "+e.message));this.Ma(5,e);return}a=c||
"";var f=this.headers.clone();d&&vd(d,function(a,b){f.set(b,a)});d=Wa(f.N());c=l.FormData&&a instanceof l.FormData;!(0<=Oa(Xd,b))||d||c||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");f.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.qc&&(this.a.responseType=this.qc);"withCredentials"in this.a&&(this.a.withCredentials=this.Bd);try{be(this),0<this.pa&&(this.jb=ce(this.a),Jd(this.G,ae(this,"Will abort after "+this.pa+"ms if incomplete, xhr2 "+this.jb)),this.jb?
(this.a.timeout=this.pa,this.a.ontimeout=u(this.Ba,this)):this.cb=Kd(this.Ba,this.pa,this)),Jd(this.G,ae(this,"Sending request")),this.Sa=!0,this.a.send(a),this.Sa=!1}catch(g){Jd(this.G,ae(this,"Send error: "+g.message)),this.Ma(5,g)}};var ce=function(a){return C&&zb(9)&&q(a.timeout)&&m(a.ontimeout)},Va=function(a){return"content-type"==a.toLowerCase()};
E.prototype.Ba=function(){"undefined"!=typeof aa&&this.a&&(this.ya="Timed out after "+this.pa+"ms, aborting",Jd(this.G,ae(this,this.ya)),this.dispatchEvent("timeout"),this.abort(8))};E.prototype.Ma=function(a,b){this.H=!1;this.a&&(this.aa=!0,this.a.abort(),this.aa=!1);this.ya=b;de(this);fe(this)};var de=function(a){a.wb||(a.wb=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
E.prototype.abort=function(){this.a&&this.H&&(Jd(this.G,ae(this,"Aborting")),this.H=!1,this.aa=!0,this.a.abort(),this.aa=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),fe(this))};E.prototype.s=function(){this.a&&(this.H&&(this.H=!1,this.aa=!0,this.a.abort(),this.aa=!1),fe(this,!0));E.l.s.call(this)};E.prototype.oc=function(){this.U||(this.Cb||this.Sa||this.aa?ge(this):this.od())};E.prototype.od=function(){ge(this)};
var ge=function(a){if(a.H&&"undefined"!=typeof aa)if(a.lb[1]&&4==he(a)&&2==a.getStatus())Jd(a.G,ae(a,"Local request error detected and ignored"));else if(a.Sa&&4==he(a))Kd(a.oc,0,a);else if(a.dispatchEvent("readystatechange"),4==he(a)){Jd(a.G,ae(a,"Request complete"));a.H=!1;try{var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=Nd(String(a.Ta))[1]||null;if(!f&&l.self&&l.self.location)var g=
l.self.location.protocol,f=g.substr(0,g.length-1);e=!Wd.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var k;try{k=2<he(a)?a.a.statusText:""}catch(y){Jd(a.G,"Can not get status: "+y.message),k=""}a.ya=k+" ["+a.getStatus()+"]";de(a)}}finally{fe(a)}}},fe=function(a,b){if(a.a){be(a);var c=a.a,d=a.lb[0]?ba:null;a.a=null;a.lb=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.G)&&c.log(Cd,"Problem encountered resetting onreadystatechange: "+
e.message,void 0)}}},be=function(a){a.a&&a.jb&&(a.a.ontimeout=null);q(a.cb)&&(l.clearTimeout(a.cb),a.cb=null)};E.prototype.hc=function(){return!!this.a};var he=function(a){return a.a?a.a.readyState:0};E.prototype.getStatus=function(){try{return 2<he(this)?this.a.status:-1}catch(a){return-1}};E.prototype.getResponseHeader=function(a){return this.a&&4==he(this)?this.a.getResponseHeader(a):void 0};var ae=function(a,b){return b+" ["+a.kc+" "+a.Ta+" "+a.getStatus()+"]"};var ie=function(a,b,c){this.g=this.i=null;this.I=a||null;this.Zc=!!c},je=function(a){a.i||(a.i=new rd,a.g=0,a.I&&Od(a.I,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=ie.prototype;h.u=function(){je(this);return this.g};h.add=function(a,b){je(this);this.I=null;a=ke(this,a);var c=this.i.get(a);c||this.i.set(a,c=[]);c.push(b);this.g++;return this};h.remove=function(a){je(this);a=ke(this,a);return this.i.Y(a)?(this.I=null,this.g-=this.i.get(a).length,this.i.remove(a)):!1};
h.clear=function(){this.i=this.I=null;this.g=0};h.isEmpty=function(){je(this);return 0==this.g};h.Y=function(a){je(this);a=ke(this,a);return this.i.Y(a)};h.N=function(){je(this);for(var a=this.i.w(),b=this.i.N(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};h.w=function(a){je(this);var b=[];if(p(a))this.Y(a)&&(b=$a(b,this.i.get(ke(this,a))));else{a=this.i.w();for(var c=0;c<a.length;c++)b=$a(b,a[c])}return b};
h.set=function(a,b){je(this);this.I=null;a=ke(this,a);this.Y(a)&&(this.g-=this.i.get(a).length);this.i.set(a,[b]);this.g++;return this};h.get=function(a,b){var c=a?this.w(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.I)return this.I;if(!this.i)return"";for(var a=[],b=this.i.N(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.w(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.I=a.join("&")};
h.clone=function(){var a=new ie;a.I=this.I;this.i&&(a.i=this.i.clone(),a.g=this.g);return a};var ke=function(a,b){var c=String(b);a.Zc&&(c=c.toLowerCase());return c};v("ee.data.authenticate",function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine.readonly"];d&&(cb(f,d),eb(f));le=a;me=f;null===a?ne=null:oe(function(){pe(b,c,e||ia(qe,b,c))})});var qe=function(a,b){l.gapi.auth.authorize({client_id:le,immediate:!1,scope:me.join(" ")},ia(re,a,b))};v("ee.data.authenticateViaPopup",qe);
v("ee.data.setAuthToken",function(a,b,c,d,e,f,g){var k=["https://www.googleapis.com/auth/earthengine.readonly"];e&&(cb(k,e),eb(k));le=a;me=k;var y={token_type:b,access_token:c,state:k.join(" "),expires_in:d};re(void 0,void 0,y);!1===g?f&&f():oe(function(){l.gapi.auth.setToken(y);f&&f()})});var pe=function(a,b,c){l.gapi.auth.authorize({client_id:le,immediate:!0,scope:me.join(" ")},function(d){"immediate_failed"==d.error&&c?c():re(a,b,d)})};v("ee.data.getAuthToken",function(){return ne});
v("ee.data.clearAuthToken",function(){ne=null});v("ee.data.getAuthClientId",function(){return le});v("ee.data.getAuthScopes",function(){return me});var we=function(a,b,c){null!=a?se=a:te||(se="https://earthengine.googleapis.com/api");null!=b?ue=b:te||(ue="https://earthengine.googleapis.com");m(c)&&(ve=c);te=!0};v("ee.data.setDeadline",function(a){Zd=a});v("ee.data.setParamAugmenter",function(a){xe=a||fb});v("ee.data.getApiBaseUrl",function(){return se});v("ee.data.getTileBaseUrl",function(){return ue});
v("ee.data.getXsrfToken",function(){return ve});var ye=function(a,b){a=ta(a);return F("/mapid",G(a),b)};v("ee.data.getMapId",ye);v("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[ue,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var ze=function(a,b){a=ta(a);return F("/value",G(a),b)};v("ee.data.getValue",ze);var Ae=function(a,b){a=ta(a);n(a.size)&&(a.size=a.size.join("x"));var c=G(a).add("getid","1");return F("/thumb",c,b)};v("ee.data.getThumbId",Ae);
var Be=function(a){return ue+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};v("ee.data.makeThumbUrl",Be);var Ce=function(a,b){a=ta(a);return F("/download",G(a),b)};v("ee.data.getDownloadId",Ce);var De=function(a){return ue+"/api/download?docid="+a.docid+"&token="+a.token};v("ee.data.makeDownloadUrl",De);var Ee=function(a,b){a=ta(a);return F("/table",G(a),b)};v("ee.data.getTableDownloadId",Ee);var Fe=function(a){return ue+"/api/table?docid="+a.docid+"&token="+a.token};
v("ee.data.makeTableDownloadUrl",Fe);v("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return F("/newtaskid",G(c),b)});v("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");return F("/taskstatus?q="+a.join(),null,b,"GET")});v("ee.data.getTaskList",function(a){return F("/tasklist",null,a,"GET")});v("ee.data.cancelTask",function(a,b){return Ge(a,"CANCEL",b)});
var Ge=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");var d;a:{d=He;for(var e in d)if(d[e]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return F("/updatetask",G({id:a,action:b}),c,"POST")};v("ee.data.updateTask",Ge);v("ee.data.prepareValue",function(a,b,c){b=ta(b);b.tid=a;return F("/prepare",G(b),c)});v("ee.data.startProcessing",function(a,b,c){b=ta(b);b.id=a;return F("/processingrequest",G(b),c)});
v("ee.data.startIngestion",function(a,b,c){a={id:a,request:jb(b)};return F("/ingestionrequest",G(a),c)});v("ee.data.getInfo",function(a,b){return F("/info",(new ie).add("id",a),b)});v("ee.data.getList",function(a,b){var c=G(a);return F("/list",c,b)});v("ee.data.getAssetRoots",function(a){return F("/buckets",null,a,"GET")});v("ee.data.createAssetHome",function(a,b){var c=G({id:a});F("/createbucket",c,b)});
v("ee.data.createAsset",function(a,b,c,d){a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return F("/create",G(a),d)});v("ee.data.createFolder",function(a,b,c){return F("/createfolder",G({id:a,force:b||!1}),c)});v("ee.data.getAssetAcl",function(a,b){return F("/getacl",G({id:a}),b,"GET")});v("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:jb(b)};F("/setacl",G(a),c)});
var He={Dd:"CANCEL",Gd:"UPDATE"},F=function(a,b,c,d){we();d=d||"POST";var e={"Content-Type":"application/x-www-form-urlencoded"};null!=ne&&(e.Authorization=ne);b=xe(b||new ie,a);null!=ve&&(e["X-XSRF-Token"]=ve);var f=function(a,b,c,d){var e,f,g;b=b?b.replace(/;.*/,""):"application/json";if("application/json"==b||"text/json"==b)try{e=hb(c),f=e.data}catch(k){g="Invalid JSON: "+c}else g="Response was unexpectedly not JSON, but "+b;if(t(e))"error"in e&&"message"in e.error?g=e.error.message:"data"in e||
(g="Malformed response: "+c);else if(200>a||300<=a)g="Server returned HTTP code: "+a;if(d)return d(f,g),null;if(!g)return f;throw Error(g);};b=b?b.toString():"";"GET"!=d||/^[\s\xa0]*$/.test(b)||(a+=-1!=a.indexOf("?")?"&":"?",a+=b,b=null);a=se+a;if(c)return $d(a,function(a){a=a.target;var b=a.getStatus(),d=a.getResponseHeader("Content-Type"),e;try{e=a.a?a.a.responseText:""}catch(g){Jd(a.G,"Can not get responseText: "+g.message),e=""}return f(b,d,e,c)},d,b,e),null;var g=Sd();g.open(d,a,!1);ka(e,function(a,
b){g.setRequestHeader(b,a)});g.send(b);var k;try{k=g.getResponseHeader("Content-Type")}catch(y){k="application/json"}return f(g.status,k,g.responseText,null)},oe=function(a){var b=function(){l.gapi.config.update("client/cors",!0);a()};if(t(l.gapi)&&t(l.gapi.auth)&&r(l.gapi.auth.authorize))b();else{for(var c=ja().toString(36);c in l;)c+="_";l[c]=function(){delete l[c];b()};Hc("https://apis.google.com/js/client.js?onload="+c)}},re=function(a,b,c){if(c.access_token){var d=c.token_type+" "+c.access_token;
isFinite(c.expires_in)&&(b=1E3*c.expires_in,setTimeout(pe,.5*b),setTimeout(function(){ne==d&&(ne=null)},.95*b));ne=d;a&&a()}else b&&b(c.error||"Unknown error.")},G=function(a){var b=new ie,c;for(c in a)b.set(c,a[c]);return b},se=null,ue=null,ve=null,xe=fb,ne=null,le=null,me=[],te=!1,Zd=0;var Ie=function(){};var Je=function(){this.O=-1};var Ke=function(){this.O=-1;this.O=64;this.o=Array(4);this.Dc=Array(this.O);this.fb=this.qa=0;this.reset()};w(Ke,Je);Ke.prototype.reset=function(){this.o[0]=1732584193;this.o[1]=4023233417;this.o[2]=2562383102;this.o[3]=271733878;this.fb=this.qa=0};
var Le=function(a,b,c){c||(c=0);var d=Array(16);if(p(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.o[0];c=a.o[1];var e=a.o[2],f=a.o[3],g=0,g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&
(f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g=
e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295|
g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295|
g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295|
g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^
b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295;
f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+
(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295;
c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.o[0]=a.o[0]+b&4294967295;a.o[1]=a.o[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.o[2]=a.o[2]+e&4294967295;a.o[3]=a.o[3]+f&4294967295};
Ke.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.O,d=this.Dc,e=this.qa,f=0;f<b;){if(0==e)for(;f<=c;)Le(this,a,f),f+=this.O;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.O){Le(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.O){Le(this,d);e=0;break}}this.qa=e;this.fb+=b};
Ke.prototype.digest=function(){var a=Array((56>this.qa?this.O:2*this.O)-this.qa);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.fb,b=a.length-8;b<a.length;++b)a[b]=c&255,c/=256;this.update(a);a=Array(16);for(b=c=0;4>b;++b)for(var d=0;32>d;d+=8)a[c++]=this.o[b]>>>d&255;return a};var Me=function(a){this.Ea="__ee_hash__";this.Eb=!1!==a;this.na=[];this.ga={};this.Sb=[]};v("ee.Serializer",Me);var Ne=new ib,Oe=new Ke,Qe=function(a,b){return Pe(new Me(m(b)?b:!0),a)};v("ee.Serializer.encode",Qe);var Re=function(a){return Ne.v(Qe(a))};v("ee.Serializer.toJSON",Re);var Se=function(a){a=Pe(new Me(!1),a);return"JSON"in l?l.JSON.stringify(a,null," "):Ne.v(a)};v("ee.Serializer.toReadableJSON",Se);
var Pe=function(a,b){var c=a.La(b);a.Eb&&(c=t(c)&&"ValueRef"==c.type&&1==a.na.length?a.na[0][1]:{type:"CompoundValue",scope:a.na,value:c},a.na=[],Qa(a.Sb,u(function(a){delete a[this.Ea]},a)),a.Sb=[],a.ga={});return c};
Me.prototype.La=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b,c=t(a)?a[this.Ea]:null;if(this.Eb&&null!=c&&this.ga[c])return{type:"ValueRef",value:this.ga[c]};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(t(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Ie){if(b=a.encode(u(this.La,this)),!(n(b)||t(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Sa(a,function(a){return this.La(a)},
this);else if(t(a)&&!r(a))b=oa(a,function(a){if(!r(a))return this.La(a)},this),sa(b,this.Ea),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.Eb){Oe.reset();Oe.update(Ne.v(b));var c=Oe.digest().toString(),d;this.ga[c]?d=this.ga[c]:(d=String(this.na.length),this.na.push([d,b]),this.ga[c]=d);a[this.Ea]=c;this.Sb.push(a);return{type:"ValueRef",value:d}}return b};var H=function(a,b,c){if(!(this instanceof H))return I(H,arguments);if(c&&(a||b))throw Error('When "opt_varName" is specified, "func" and "args" must be null.');if(a&&!b)throw Error('When "func" is specified, "args" must not be null.');this.b=a;this.h=b;this.m=c||null};w(H,Ie);v("ee.ComputedObject",H);H.prototype.B=function(a){return ze({json:this.v()},a)};H.prototype.getInfo=H.prototype.B;
H.prototype.encode=function(a){if(null===this.b&&null===this.h)return{type:"ArgumentRef",value:this.m};var b={},c;for(c in this.h)m(this.h[c])&&(b[c]=a(this.h[c]));b={type:"Invocation",arguments:b};a=a(this.b);b[p(a)?"functionName":"function"]=a;return b};H.prototype.v=function(){return Re(this)};H.prototype.serialize=H.prototype.v;H.prototype.toString=function(){return"ee."+this.name()+"("+Se(this)+")"};H.prototype.toString=H.prototype.toString;H.prototype.name=function(){return"ComputedObject"};
H.prototype.Cc=function(a,b){var c=ab(arguments);c[0]=this;a.apply(l,c);return this};H.prototype.aside=H.prototype.Cc;var Te=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;c=new c;c.b=b.b;c.h=b.h;c.m=b.m;return c},I=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Ue={},Ve=function(a){return a.prototype instanceof H?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},We=function(a,b){if(b==a)return!0;switch(a){case "Element":return"Element"==b||"Image"==b||"Feature"==b||"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "Collection":return"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}},Xe=function(a){return q(a)||
a instanceof H&&"Number"==a.name()},Ye=function(a){return p(a)||a instanceof H&&"String"==a.name()},Ze=function(a){return t(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var J=function(){if(!(this instanceof J))return new J};w(J,Ie);v("ee.Function",J);var $e=fb;J.prototype.call=function(a){return this.apply(af(this,Array.prototype.slice.call(arguments,0)))};J.prototype.call=J.prototype.call;J.prototype.apply=function(a){a=new H(this,bf(this,a));return $e(a,this.F().returns)};J.prototype.apply=J.prototype.apply;
var cf=function(a,b,c){var d=m(b),e=a.F(),f=!1;if(1==c.length&&Ze(c[0])){var g=e.args;d&&(g=g.slice(1));g.length&&(f=!((1==g.length||g[1].optional)&&"Dictionary"==g[0].type))}if(f){if(c=ta(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=af(a,d?[b].concat(c):c);return a.apply(c)},bf=function(a,b){for(var c=a.F().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&m(b[g]))d[g]=$e(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+
g+") missing to function: "+a);e[g]=!0}var c=[],k;for(k in b)e[k]||c.push(k);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},af=function(a,b){var c=a.F().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);for(var d={},e=0;e<b.length;e++)d[c[e].name]=b[e];return d};
J.prototype.toString=function(a,b){var c=this.F(),d=[];d.push(a||c.name);d.push("(");d.push(Sa(c.args.slice(b?1:0),function(a){return a.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length){d.push("\nArgs:\n");for(var e=0;e<c.args.length;e++){b&&0==e?d.push(" this:"):d.push("\n ");var f=c.args[e];d.push(f.name);d.push(" (");d.push(f.type);f.optional&&d.push(", optional");d.push("): ");f.description?d.push(f.description):
d.push("Undocumented.")}}return d.join("")};J.prototype.v=function(){return Re(this)};var K=function(a,b){if(!m(b))return df(a);if(!(this instanceof K))return I(K,arguments);this.oa=ua(b);this.oa.name=a};w(K,J);v("ee.ApiFunction",K);var L=function(a,b){return J.prototype.call.apply(df(a),Array.prototype.slice.call(arguments,1))};v("ee.ApiFunction._call",L);var ef=function(a,b){return df(a).apply(b)};v("ee.ApiFunction._apply",ef);K.prototype.encode=function(){return this.oa.name};K.prototype.F=function(){return this.oa};
var la=null,ff={},hf=function(){gf();return oa(la,function(a){return a.F()})},jf=function(){gf();return na(function(a,b){return!ff[b]})},df=function(a){var b=kf(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};v("ee.ApiFunction.lookup",df);
var kf=function(a){gf();return la[a]||null},gf=function(a,b){if(la)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(la=oa(c,function(a,b){a.returns=a.returns.replace(/<.*>/,"");for(var c=0;c<a.args.length;c++)a.args[c].type=a.args[c].type.replace(/<.*>/,"");return new K(b,a)}),a&&a())};a?F("/algorithms",null,c,"GET"):c(F("/algorithms",null,void 0,"GET"))}},M=function(a,b,c,d){gf();var e=d||"";ka(la,function(d,g){var k=g.split(".");if(2==k.length&&k[0]==b){var k=e+k[1],y=d.F();ff[g]=!0;var ma=!1;
if(y.args.length)var V=y.args[0].type,ma="Object"!=V&&We(V,c);V=ma?a.prototype:a;k in V&&!V[k].signature||(V[k]=function(a){return cf(d,ma?this:void 0,Array.prototype.slice.call(arguments,0))},V[k].toString=u(d.toString,d,k,ma),V[k].signature=y)}})},N=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var O=function(a,b,c){H.call(this,a,b,c);lf()};w(O,H);v("ee.Element",O);var mf=!1,lf=function(){mf||(M(O,"Element","Element"),mf=!0)};O.prototype.name=function(){return"Element"};
O.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=Ze(c))a:{b=qa(c);var d=["properties"];if(da(b)&&da(d)&&b.length==d.length){for(var e=b.length,f=0;f<e;f++)if(b[f]!==d[f]){b=!1;break a}b=!0}else b=!1}b&&t(c.properties)&&(c=c.properties);if(Ze(c)){b=this;for(var g in c)d=c[g],b=L("Element.set",b,g,d)}else if(c instanceof H&&kf("Element.setMulti"))b=L("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(0!=
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)g=arguments[c],d=arguments[c+1],b=L("Element.set",b,g,d)}return Te(this,b)};O.prototype.set=O.prototype.set;var P=function(a){if(!(this instanceof P))return I(P,arguments);if(a instanceof P)return a;nf();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new P(a[0]);H.call(this,new K("Filter.and"),{filters:a});this.sa=a}else if(a instanceof H)H.call(this,a.b,a.h,a.m),this.sa=[a];else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);H.call(this,null,null);this.sa=[]}};w(P,H);v("ee.Filter",P);
var of=!1,nf=function(){of||(M(P,"Filter","Filter"),of=!0)},pf={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};P.prototype.length=function(){return this.sa.length};P.prototype.length=P.prototype.length;var Q=function(a,b){var c=a.sa.slice(0);b instanceof P?cb(c,b.sa):b instanceof Array?cb(c,b):c.push(b);return new P(c)};P.prototype.W=function(){return L("Filter.not",this)};P.prototype.not=P.prototype.W;
var qf=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in pf))throw Error("Unknown filtering operator: "+b);a=L("Filter."+pf[b],a,c);return d?a.W():a};P.metadata=qf;var rf=function(a,b){return L("Filter.equals",a,b)};P.eq=rf;var sf=function(a,b){return rf(a,b).W()};P.neq=sf;var tf=function(a,b){return L("Filter.lessThan",a,b)};P.lt=tf;var uf=function(a,b){return tf(a,b).W()};P.gte=uf;var vf=function(a,b){return L("Filter.greaterThan",a,b)};
P.gt=vf;var wf=function(a,b){return vf(a,b).W()};P.lte=wf;var xf=function(a,b){return L("Filter.stringContains",a,b)};P.contains=xf;var yf=function(a,b){return xf(a,b).W()};P.not_contains=yf;var zf=function(a,b){return L("Filter.stringStartsWith",a,b)};P.starts_with=zf;var Af=function(a,b){return zf(a,b).W()};P.not_starts_with=Af;var Bf=function(a,b){return L("Filter.stringEndsWith",a,b)};P.ends_with=Bf;var Cf=function(a,b){return Bf(a,b).W()};P.not_ends_with=Cf;
var Df=function(a){return L("Filter.and",Array.prototype.slice.call(arguments))};P.and=Df;P.or=function(a){return L("Filter.or",Array.prototype.slice.call(arguments))};var Ef=function(a,b){var c=L("DateRange",a,b);return ef("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};P.date=Ef;var Ff=function(a,b,c,d){return ef("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};P.inList=Ff;
var Gf=function(a,b){return ef("Filter.intersects",{leftField:".all",rightValue:L("Feature",a),maxError:b})};P.bounds=Gf;P.prototype.Mc=function(a){return Q(this,rf.apply(null,[].slice.call(arguments)))};P.prototype.eq=P.prototype.Mc;P.prototype.kd=function(a){return Q(this,sf.apply(null,[].slice.call(arguments)))};P.prototype.neq=P.prototype.kd;P.prototype.dd=function(a){return Q(this,tf.apply(null,[].slice.call(arguments)))};P.prototype.lt=P.prototype.dd;
P.prototype.Vc=function(a){return Q(this,uf.apply(null,[].slice.call(arguments)))};P.prototype.gte=P.prototype.Vc;P.prototype.Uc=function(a){return Q(this,vf.apply(null,[].slice.call(arguments)))};P.prototype.gt=P.prototype.Uc;P.prototype.ed=function(a){return Q(this,wf.apply(null,[].slice.call(arguments)))};P.prototype.lte=P.prototype.ed;P.prototype.contains=function(a){return Q(this,xf.apply(null,[].slice.call(arguments)))};P.prototype.contains=P.prototype.contains;
P.prototype.ld=function(a){return Q(this,yf.apply(null,[].slice.call(arguments)))};P.prototype.not_contains=P.prototype.ld;P.prototype.ud=function(a){return Q(this,zf.apply(null,[].slice.call(arguments)))};P.prototype.starts_with=P.prototype.ud;P.prototype.nd=function(a){return Q(this,Af.apply(null,[].slice.call(arguments)))};P.prototype.not_starts_with=P.prototype.nd;P.prototype.Lc=function(a){return Q(this,Bf.apply(null,[].slice.call(arguments)))};P.prototype.ends_with=P.prototype.Lc;
P.prototype.md=function(a){return Q(this,Cf.apply(null,[].slice.call(arguments)))};P.prototype.not_ends_with=P.prototype.md;P.prototype.Bc=function(a){return Q(this,Df.apply(null,[].slice.call(arguments)))};P.prototype.and=P.prototype.Bc;P.prototype.Kc=function(a){return Q(this,Ef.apply(null,[].slice.call(arguments)))};P.prototype.date=P.prototype.Kc;P.prototype.$c=function(a){return Q(this,Ff.apply(null,[].slice.call(arguments)))};P.prototype.inList=P.prototype.$c;
P.prototype.bounds=function(a){return Q(this,Gf.apply(null,[].slice.call(arguments)))};P.prototype.bounds=P.prototype.bounds;P.prototype.name=function(){return"Filter"};var R=function(a,b,c){O.call(this,a,b,c);Hf()};w(R,O);v("ee.Collection",R);var If=!1,Hf=function(){If||(M(R,"Collection","Collection"),M(R,"AggregateFeatureCollection","Collection","aggregate_"),If=!0)};R.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Te(this,L("Collection.filter",this,a))};R.prototype.filter=R.prototype.filter;R.prototype.Rc=function(a,b,c){return this.filter(qf(a,b,c))};R.prototype.filterMetadata=R.prototype.Rc;R.prototype.Pc=function(a){return this.filter(Gf(a))};
R.prototype.filterBounds=R.prototype.Pc;R.prototype.Qc=function(a,b){return this.filter(Ef(a,b))};R.prototype.filterDate=R.prototype.Qc;R.prototype.limit=function(a,b,c){return Te(this,L("Collection.limit",this,a,b,c))};R.prototype.limit=R.prototype.limit;R.prototype.sort=function(a,b){return Te(this,L("Collection.limit",this,void 0,a,b))};R.prototype.sort=R.prototype.sort;R.prototype.name=function(){return"Collection"};R.prototype.elementType=function(){return O};
R.prototype.map=function(a,b){var c=this.elementType();return Te(this,L("Collection.map",this,function(b){return a(new c(b))},b))};R.prototype.map=R.prototype.map;R.prototype.bd=function(a,b){var c=m(b)?b:null,d=this.elementType();return L("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};R.prototype.iterate=R.prototype.bd;var Jf=function(a){if(!(this instanceof Jf))return I(Jf,arguments);if(a instanceof Jf)return a;Kf();if(q(a))H.call(this,null,null),this.Ib=a;else if(a instanceof H)H.call(this,a.b,a.h,a.m),this.Ib=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};w(Jf,H);v("ee.Number",Jf);var Lf=!1,Kf=function(){Lf||(M(Jf,"Number","Number"),Lf=!0)};Jf.prototype.encode=function(a){return q(this.Ib)?this.Ib:Jf.l.encode.call(this,a)};Jf.prototype.name=function(){return"Number"};var Mf=function(a){if(!(this instanceof Mf))return I(Mf,arguments);if(a instanceof Mf)return a;Nf();if(p(a))H.call(this,null,null),this.Ob=a;else if(a instanceof H)this.Ob=null,a.b&&"String"==a.b.F().returns?H.call(this,a.b,a.h,a.m):H.call(this,new K("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};w(Mf,H);v("ee.String",Mf);var Of=!1,Nf=function(){Of||(M(Mf,"String","String"),Of=!0)};
Mf.prototype.encode=function(a){return p(this.Ob)?this.Ob:Mf.l.encode.call(this,a)};Mf.prototype.name=function(){return"String"};var Pf=function(a,b){if(!(this instanceof Pf))return I(Pf,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Qf(g in Ue?Ue[g]:null,f.name))}if(!m(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.oa=Rf(a,c,b);this.Ec=b.apply(null,c)};w(Pf,J);v("ee.CustomFunction",Pf);Pf.prototype.encode=function(a){return{type:"Function",argumentNames:Sa(this.oa.args,function(a){return a.name}),body:a(this.Ec)}};Pf.prototype.F=function(){return this.oa};
var Qf=function(a,b){a=a||Object;if(!(a.prototype instanceof H))if(a&&a!=Object)if(a==String)a=Mf;else if(a==Number)a=Jf;else if(a==Array)a=l.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=H;var c=function(){};c.prototype=a.prototype;c=new c;c.b=null;c.h=null;c.m=b;return c},Sf=function(a,b){var c=Sa(b,function(a){return{name:null,type:p(a)?a:Ve(a)}}),c={name:"",returns:p("Object")?"Object":Ve("Object"),args:c};return new Pf(c,a)},Rf=function(a,b,c){for(var d=
[],e=0;e<b.length;e++)null===b[e].m&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;t(a)&&!r(a)&&("Function"==a.type&&b++,ka(a,function(a){b+=f(a)}));return b},e=Qe(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],k=c+e;b[g].m=k;a.args[g].name=k}return a};var Tf=function(a,b){if(!(this instanceof Tf))return I(Tf,arguments);if(a instanceof Tf)return a;Uf();var c=new K("Date"),d={},e=null;if(Ye(a)){if(d.value=a,b)if(Ye(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(Xe(a))d.value=a;else if(t(a)&&"function"==typeof a.getFullYear)d.value=Math.floor(a.getTime());else if(a instanceof H)a.b&&"Date"==a.b.F().returns?(c=a.b,d=a.h,e=a.m):d.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
a);H.call(this,c,d,e)};w(Tf,H);v("ee.Date",Tf);var Vf=!1,Uf=function(){Vf||(M(Tf,"Date","Date"),Vf=!0)};Tf.prototype.name=function(){return"Date"};var S=function(a,b,c){if(!(this instanceof S))return I(S,arguments);Wf();var d=null!=b||null!=c;if(a instanceof H&&!(a instanceof S&&a.gb)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");H.call(this,a.b,a.h,a.m)}else{a instanceof S&&(a=a.encode());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!Xf(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));
H.call(this,null,null);this.gb=a.type;this.Hc=a.coordinates||null;this.Sc=a.geometries||null;if(null!=b)this.Mb=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&p(a.crs.properties.name))this.Mb=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new ib).v(a.crs));this.zb=c;!m(c)&&"geodesic"in a&&(this.zb=Boolean(a.geodesic))}};w(S,H);v("ee.Geometry",S);
var Yf=!1,Wf=function(){Yf||(M(S,"Geometry","Geometry"),Yf=!0)},Zf=function(a,b){if(!(this instanceof Zf))return $f(Zf,arguments);var c=ag("Point",1,arguments);if(!(c instanceof H)){var d=c.coordinates;if(!n(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}S.call(this,c)};w(Zf,S);S.Point=Zf;var bg=function(a,b){if(!(this instanceof bg))return $f(bg,arguments);S.call(this,ag("MultiPoint",2,arguments))};w(bg,S);S.MultiPoint=bg;
var cg=function(a,b,c,d){if(!(this instanceof cg))return $f(cg,arguments);var e=ag("Rectangle",2,arguments);if(!(e instanceof H)){var f=e.coordinates;if(2!=f.length)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var g=f[0][0],k=f[0][1],y=f[1][0],f=f[1][1];e.coordinates=[[[g,f],[g,k],[y,k],[y,f]]];e.type="Polygon"}S.call(this,e)};w(cg,S);S.Rectangle=cg;var dg=function(a,b,c,d){if(!(this instanceof dg))return $f(dg,arguments);S.call(this,ag("LineString",2,arguments))};
w(dg,S);S.LineString=dg;var eg=function(a,b,c,d){if(!(this instanceof eg))return $f(eg,arguments);S.call(this,ag("LinearRing",2,arguments))};w(eg,S);S.LinearRing=eg;var fg=function(a,b,c,d){if(!(this instanceof fg))return $f(fg,arguments);S.call(this,ag("MultiLineString",3,arguments))};w(fg,S);S.MultiLineString=fg;var gg=function(a,b,c,d){if(!(this instanceof gg))return $f(gg,arguments);S.call(this,ag("Polygon",3,arguments))};w(gg,S);S.Polygon=gg;
var hg=function(a,b,c,d){if(!(this instanceof hg))return $f(hg,arguments);S.call(this,ag("MultiPolygon",4,arguments))};w(hg,S);S.MultiPolygon=hg;
S.prototype.encode=function(a){if(!this.gb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return H.prototype.encode.call(this,a)}a={type:this.gb};"GeometryCollection"==this.gb?a.geometries=this.Sc:a.coordinates=this.Hc;null!=this.Mb&&(a.crs={type:"name",properties:{name:this.Mb}});null!=this.zb&&(a.geodesic=this.zb);return a};S.prototype.wc=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};
S.prototype.toGeoJSON=S.prototype.wc;S.prototype.xc=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new ib).v(this.wc())};S.prototype.toGeoJSONString=S.prototype.xc;S.prototype.v=function(){return Re(this)};S.prototype.serialize=S.prototype.v;S.prototype.toString=function(){return"ee.Geometry("+this.xc()+")"};
var Xf=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!n(b))return!1;for(a=0;a<b.length;a++)if(!Xf(b[a]))return!1;return!0}a=a.coordinates;var c=ig(a);return"Point"==b&&1==c||"MultiPoint"==b&&(2==c||0==a.length)||"LineString"==b&&2==c||"LinearRing"==b&&2==c||"MultiLineString"==b&&(3==c||0==a.length)||"Polygon"==b&&3==c||"MultiPolygon"==b&&(4==c||0==a.length)},ig=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=ig(a[0]),c=1;c<a.length;c++)if(ig(a[c])!=b)return-1;return b+
1}for(c=0;c<a.length;c++)if(!q(a[c]))return-1;return 0==a.length%2?1:-1},ag=function(a,b,c){var d={},e=["coordinates","crs","geodesic","maxError"];if(Ua(c,Xe))d.coordinates=ab(c);else{if(c.length>e.length)throw Error("Geometry constructor given extra arguments.");for(var f=0;f<e.length;f++)null!=c[f]&&(d[e[f]]=c[f])}if(jg(d.coordinates)||null!=d.crs||null!=d.geodesic||null!=d.maxError)return(new K("GeometryConstructors."+a)).apply(d);d.type=a;a=d.coordinates;if(1>b||4<b)throw Error("Unexpected nesting level.");
if(Ua(a,q)&&q(a[0])&&2!=a.length){if(0!=a.length%2)throw Error("Invalid number of coordinates: "+a.length);c=[];for(e=0;e<a.length;e+=2)c.push([a[e],a[e+1]]);a=c}c=a;for(e=0;n(c);)c=c[0],e++;for(;e<b;)a=[a],e++;if(ig(a)!=b)throw Error("Invalid geometry");for(c=a;n(c)&&1==c.length;)c=c[0];b=n(c)&&0==c.length?[]:a;d.coordinates=b;return d},jg=function(a){return n(a)?Ta(a,jg):a instanceof H},$f=function(a,b){var c=function(){};c.prototype=a.prototype;var c=new c,d=a.apply(c,b);return void 0!==d?d:c};
S.prototype.name=function(){return"Geometry"};v("ee.Deserializer",function(){});v("ee.Deserializer.fromJSON",function(a){return kg(gb(a))});var kg=function(a){var b={};if(t(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],f=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=lg(f,b)}a=a.value}return lg(a,b)};v("ee.Deserializer.decode",kg);
var lg=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Sa(a,function(a){return lg(a,b)});if(!t(a)||r(a))throw Error("Cannot decode object: "+a);var c=a.type;switch(c){case "ValueRef":if(a.value in b)return b[a.value];throw Error("Unknown ValueRef: "+a);case "ArgumentRef":c=a.value;if(!p(c))throw Error("Invalid variable name: "+c);return Qf(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new Tf(c/1E3);case "Bytes":return c=new Ie,
c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?df(a.functionName):lg(a["function"],b),d=oa(a.arguments,function(a){return lg(a,b)});if(c instanceof J)return c.apply(d);if(c instanceof H)return new H(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return oa(a.value,function(a){return lg(a,b)});case "Function":var e=lg(a.body,b),c={name:"",args:Sa(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new Pf(c,
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new S(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var mg=function(a){if(!(this instanceof mg))return I(mg,arguments);if(a instanceof mg)return a;ng();if(Ze(a))H.call(this,null,null),this.ub=a;else if(a instanceof H)H.call(this,a.b,a.h,a.m),this.ub=null;else throw Error("Invalid argument specified for ee.Dictionary(): "+a);};w(mg,H);v("ee.Dictionary",mg);var og=!1,ng=function(){og||(M(mg,"Dictionary","Dictionary"),og=!0)};mg.prototype.encode=function(a){return null===this.ub?mg.l.encode.call(this,a):a(this.ub)};mg.prototype.name=function(){return"Dictionary"};var T=function(a,b){if(!(this instanceof T))return I(T,arguments);if(a instanceof T){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");pg();if(a instanceof S||null===a)O.call(this,new K("Feature"),{geometry:a,metadata:b||null});else if(a instanceof H)O.call(this,a.b,a.h,a.m);else if("Feature"==a.type){var c=a.properties||{};if("id"in a){if("system:index"in
c)throw Error('Can\'t specify both "id" and "system:index".');c=ta(c);c["system:index"]=a.id}O.call(this,new K("Feature"),{geometry:new S(a.geometry),metadata:c})}else O.call(this,new K("Feature"),{geometry:new S(a),metadata:b||null})};w(T,O);v("ee.Feature",T);var qg=!1,pg=function(){qg||(M(T,"Feature","Feature"),qg=!0)};T.prototype.B=function(a){return T.l.B.call(this,a)};T.prototype.getInfo=T.prototype.B;T.prototype.getMap=function(a,b){return L("Collection",[this]).getMap(a,b)};
T.prototype.getMap=T.prototype.getMap;T.Point=function(a,b){return Zf.apply(null,arguments)};T.MultiPoint=function(a){return bg.apply(null,arguments)};T.Rectangle=function(a,b,c,d){return new cg([a,b,c,d])};T.LineString=function(a){return dg.apply(null,arguments)};T.LinearRing=function(a){return eg.apply(null,arguments)};T.MultiLine=function(a){return fg.apply(null,arguments)};T.Polygon=function(a){return gg.apply(null,arguments)};T.MultiPolygon=function(a){return hg.apply(null,arguments)};
T.prototype.name=function(){return"Feature"};var rg=function(a){if(this instanceof rg){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof rg)return a}else return I(rg,arguments);sg();if(n(a))H.call(this,null,null),this.Gb=a;else if(a instanceof H)H.call(this,a.b,a.h,a.m),this.Gb=null;else throw Error("Invalid argument specified for ee.List(): "+a);};w(rg,H);v("ee.List",rg);var tg=!1,sg=function(){tg||(M(rg,"List","List"),tg=!0)};
rg.prototype.encode=function(a){return n(this.Gb)?Sa(this.Gb,function(b){return a(b)}):rg.l.encode.call(this,a)};rg.prototype.name=function(){return"List"};var U=function(a,b){if(!(this instanceof U))return I(U,arguments);if(a instanceof U)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");ug();a instanceof S&&(a=new T(a));a instanceof T&&(a=[a]);if(Xe(a)||Ye(a)){var c={tableId:a};b&&(c.geometryColumn=b);R.call(this,new K("Collection.loadTable"),c)}else if(n(a))R.call(this,new K("Collection"),{features:Sa(a,function(a){return new T(a)})});else if(a instanceof rg)R.call(this,
new K("Collection"),{features:a});else if(a instanceof H)R.call(this,a.b,a.h,a.m);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};w(U,R);v("ee.FeatureCollection",U);var vg=!1,ug=function(){vg||(M(U,"FeatureCollection","FeatureCollection"),vg=!0)};U.prototype.getMap=function(a,b){var c=ef("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(null,b);else return c.getMap()};U.prototype.getMap=U.prototype.getMap;
U.prototype.B=function(a){return U.l.B.call(this,a)};U.prototype.getInfo=U.prototype.B;U.prototype.Ab=function(a,b,c,d){var e={};e.table=this.v();a&&(e.format=a.toUpperCase());c&&(e.filename=c);b&&(da(b)&&(b=b.join(",")),e.selectors=b);if(d)Ee(e,function(a,b){a?d(Fe(a)):d(null,b)});else return Fe(Ee(e))};U.prototype.getDownloadURL=U.prototype.Ab;U.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};U.prototype.select=U.prototype.select;
U.prototype.name=function(){return"FeatureCollection"};U.prototype.elementType=function(){return T};var W=function(a){if(!(this instanceof W))return I(W,arguments);if(a instanceof W)return a;wg();var b=arguments.length;if(0==b||1==b&&!m(a))O.call(this,new K("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(Xe(a))O.call(this,new K("Image.constant"),{value:a});else if(Ye(a))O.call(this,new K("Image.load"),{id:a});else{if(n(a))return xg(Sa(a,function(a){return new W(a)}));if(a instanceof H)"Array"==a.name()?O.call(this,new K("Image.constant"),{value:a}):O.call(this,a.b,a.h,a.m);else throw Error("Unrecognized argument type to convert to an Image: "+
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Ye(b)&&Xe(c))O.call(this,new K("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};w(W,O);v("ee.Image",W);var yg=!1,wg=function(){yg||(M(W,"Image","Image"),M(W,"Window","Image","focal_"),yg=!0)};W.prototype.B=function(a){return W.l.B.call(this,a)};W.prototype.getInfo=W.prototype.B;
W.prototype.getMap=function(a,b){var c=a?ta(a):{};c.image=this.v();if(b)ye(c,u(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=ye(c),c.image=this,c};W.prototype.getMap=W.prototype.getMap;W.prototype.Ab=function(a,b){var c=a?ta(a):{};c.image=this.v();if(b)Ce(c,function(a,c){a?b(De(a)):b(null,c)});else return De(Ce(c))};W.prototype.getDownloadURL=W.prototype.Ab;
W.prototype.Tc=function(a,b){var c=a?ta(a):{};c.image=this.v();if(c.region)if(n(c.region)||Ze(c.region))c.region=jb(c.region);else if(!p(c.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(b)Ae(c,function(a,c){var f="";if(!m(c))try{f=Be(a)}catch(g){c=String(g.message)}b(f,c)});else return Be(Ae(c))};W.prototype.getThumbURL=W.prototype.Tc;W.rgb=function(a,b,c){return xg([a,b,c],["vis-red","vis-green","vis-blue"])};
W.cat=function(a){return xg(Array.prototype.slice.call(arguments),null)};var xg=function(a,b){if(0==a.length)return L("Image.constant",[]);for(var c=new W(a[0]),d=1;d<a.length;d++)c=L("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
W.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||Ye(b[0])||Xe(b[0])){for(var d=0;d<b.length;d++)if(!(Ye(b[d])||Xe(b[d])||b[d]instanceof H))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return ef("Image.select",c)};W.prototype.select=W.prototype.select;
W.prototype.Oc=function(a,b){var c=["DEFAULT_EXPRESSION_IMAGE"],d={DEFAULT_EXPRESSION_IMAGE:this};if(b)for(var e in b)c.push(e),d[e]=new W(b[e]);var f=L("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE",c);e=new J;e.encode=function(a){return f.encode(a)};e.F=function(){return{name:"",args:Sa(c,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return e.apply(d)};W.prototype.expression=W.prototype.Oc;
W.prototype.clip=function(a){try{a=new S(a)}catch(b){}return L("Image.clip",this,a)};W.prototype.clip=W.prototype.clip;W.prototype.rd=function(a){var b;b=1!=arguments.length||Ye(arguments[0])?ab(arguments):arguments[0];return L("Image.rename",this,b)};W.prototype.rename=W.prototype.rd;W.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return I(X,arguments);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");zg();a instanceof W&&(a=[a]);if(Ye(a))R.call(this,new K("ImageCollection.load"),{id:a});else if(n(a))R.call(this,new K("ImageCollection.fromImages"),{images:Sa(a,function(a){return new W(a)})});else if(a instanceof rg)R.call(this,new K("ImageCollection.fromImages"),{images:a});else if(a instanceof
H)R.call(this,a.b,a.h,a.m);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};w(X,R);v("ee.ImageCollection",X);var Ag=!1,zg=function(){Ag||(M(X,"ImageCollection","ImageCollection"),M(X,"reduce","ImageCollection"),Ag=!0)};X.prototype.getMap=function(a,b){var c=L("ImageCollection.mosaic",this);if(b)c.getMap(a,b);else return c.getMap(a)};X.prototype.getMap=X.prototype.getMap;X.prototype.B=function(a){return X.l.B.call(this,a)};X.prototype.getInfo=X.prototype.B;
X.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"ImageCollection"};X.prototype.elementType=function(){return W};var Bg={};v("ee.Terrain",Bg);Bg.Db=!1;Bg.ad=function(){Bg.Db||(M(Bg,"Terrain","Terrain"),Bg.Db=!0)};Bg.reset=function(){N(Bg);Bg.Db=!1};v("ee.initialize",function(a,b,c,d,e){if("ready"!=Cg||a||b){var f=null!=c;if(d)if(f)Dg.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Cg&&f)Eg.push(c);else if(Cg="loading",we(a,b,e),f)Eg.push(c),gf(Fg,Gg);else try{gf(),Fg()}catch(g){throw Gg(g),g;}}else c&&c()});
v("ee.reset",function(){Cg="not_ready";ve=ue=se=null;te=!1;la=null;ff={};N(Tf);Vf=!1;N(mg);og=!1;N(O);mf=!1;N(W);yg=!1;N(T);qg=!1;N(R);If=!1;N(X);Ag=!1;N(U);vg=!1;N(P);of=!1;N(S);Yf=!1;N(rg);tg=!1;N(Jf);Lf=!1;N(Mf);Of=!1;Bg.reset();for(var a=l.ee,b=0;b<Hg.length;b++){var c=Hg[b];N(a[c]);delete a[c]}Hg=[];Ue=a;var a=Ig,d;for(d in a)delete a[d]});v("ee.InitState",{Ed:"not_ready",LOADING:"loading",Fd:"ready"});v("ee.InitState.NOT_READY","not_ready");v("ee.InitState.LOADING","loading");
v("ee.InitState.READY","ready");var Cg="not_ready",Eg=[],Dg=[];v("ee.TILE_SIZE",256);var Hg=[],Ig={};v("ee.Algorithms",Ig);v("ee.call",function(a,b){p(a)&&(a=new K(a));return J.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});v("ee.apply",function(a,b){p(a)&&(a=new K(a));return a.apply(b)});
var Fg=function(){if("loading"==Cg){try{Uf();ng();lf();wg();pg();Hf();zg();ug();nf();Wf();sg();Kf();Nf();Bg.ad();var a=hf(),b={},c={},d;for(d in a){b[-1!=d.indexOf(".")?d.slice(0,d.indexOf(".")):d]=!0;var e=a[d].returns.replace(/<.*>/,"");c[e]=!0}var f=l.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=Jg(g),Hg.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,ff[g]=!0):f[g].signature={});Ue=f;Kg()}catch(k){Gg(k);return}Cg="ready";for(Dg=[];0<Eg.length;)Eg.shift()()}},Gg=function(a){if("loading"==
Cg)for(Cg="not_ready",Eg=[];0<Dg.length;)Dg.shift()(a)},Kg=function(){var a=jf();qa(a).sort().forEach(function(b){var c=a[b],d=c.F();if(!d.hidden){b=b.split(".");var e=Ig;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=db(b,1)}f=function(a){return cf(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=u(c.toString,c);e[b[0]]=f}})},Jg=function(a){var b=function(b){var d=l.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof
d)return e[0];if(!(this instanceof d))return I(d,e);var d=kf(a),g=!(e[0]instanceof H),k=!1;d&&(f?g?k=!0:e[0].b!=d&&(k=!0):k=!0);if(k)H.call(this,d,bf(d,af(d,e)));else{if(!f)throw Error("Too many arguments for ee."+a+"(): "+e);if(g)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];H.call(this,e.b,e.h,e.m)}};w(b,H);b.prototype.name=function(){return a};M(b,a,a);return b},$e=function(a,b){if(null===a)return null;if(m(a)){var c=l.ee;switch(b){case "Image":return new W(a);
case "Feature":return a instanceof R?L("Feature",L("Collection.geometry",a)):new T(a);case "Element":if(a instanceof O)return a;if(a instanceof S)return new T(a);if(a instanceof H)return new O(a.b,a.h,a.m);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof U?L("Collection.geometry",a):new S(a);case "FeatureCollection":case "Collection":return a instanceof R?a:new U(a);case "ImageCollection":return new X(a);case "Filter":return new P(a);case "Algorithm":if(p(a))return new K(a);
if(r(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return Sf(a,d)}if(a instanceof Ie)return a;throw Error("Argument is not a function: "+a);case "String":return Ye(a)||a instanceof Mf||a instanceof H?new Mf(a):a;case "Dictionary":return Ze(a)?a:new mg(a);case "List":return new rg(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Jf(a);default:if(b in c){d=kf(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if(p(a)){if(a in c[b])return c[b][a].call();
throw Error("Unknown algorithm: "+b+"."+a);}return new c[b](a)}return a}}};var Lg=function(a,b){var c=a.style;"opacity"in c?c.opacity=b:"MozOpacity"in c?c.MozOpacity=b:"filter"in c&&(c.filter=""===b?"":"alpha(opacity="+100*b+")")};var Mg=function(a){Ic.call(this);this.Z=a;this.c={}};w(Mg,Ic);var Ng=[];Mg.prototype.Ua=function(a,b,c,d){n(b)||(b&&(Ng[0]=b.toString()),b=Ng);for(var e=0;e<b.length;e++){var f=Zc(a,b[e],c||this.handleEvent,d||!1,this.Z||this);if(!f)break;this.c[f.key]=f}return this};Mg.prototype.Hb=function(a,b,c,d){return Og(this,a,b,c,d)};var Og=function(a,b,c,d,e,f){if(n(c))for(var g=0;g<c.length;g++)Og(a,b,c[g],d,e,f);else{b=fd(b,c,d||a.handleEvent,e,f||a.Z||a);if(!b)return a;a.c[b.key]=b}return a};
Mg.prototype.ib=function(a,b,c,d,e){if(n(b))for(var f=0;f<b.length;f++)this.ib(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.Z||this,c=$c(c),d=!!d,b=Pc(a)?a.ta(b,c,d,e):a?(a=bd(a))?a.ta(b,c,d,e):null:null,b&&(hd(b),delete this.c[b.key]);return this};Mg.prototype.Za=function(){ka(this.c,function(a,b){this.c.hasOwnProperty(b)&&hd(a)},this);this.c={}};Mg.prototype.s=function(){Mg.l.s.call(this);this.Za()};
Mg.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var Pg=function(a){D.call(this);this.xa={};this.wa={};this.Z=new Mg(this);this.f=a};w(Pg,D);var Qg=[C&&!zb("11")?"readystatechange":"load","abort","error"],Rg=function(a,b){delete a.xa[b];var c=a.wa[b];c&&(delete a.wa[b],a.Z.ib(c,Qg,a.nc),ra(a.wa)&&ra(a.xa)&&a.dispatchEvent("complete"))};
Pg.prototype.start=function(){var a=this.xa;Qa(qa(a),function(b){var c=a[b];if(c&&(delete a[b],!this.U)){var d;this.f?(d=this.f,d=(d?new Mb(Lb(d)):ya||(ya=new Mb)).Ic("IMG")):d=new Image;c.Yb&&(d.crossOrigin=c.Yb);this.Z.Ua(d,Qg,this.nc);this.wa[b]=d;d.id=b;d.src=c.src}},this)};
Pg.prototype.nc=function(a){var b=a.currentTarget;if(b){if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";else return;"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));this.dispatchEvent({type:a.type,target:b});this.U||Rg(this,b.id)}};Pg.prototype.s=function(){delete this.xa;delete this.wa;var a=this.Z;a&&"function"==typeof a.R&&a.R();Pg.l.s.call(this)};var Sg=function(){this.D=[];this.K=[]};h=Sg.prototype;h.enqueue=function(a){this.K.push(a)};h.ra=function(){0==this.D.length&&(this.D=this.K,this.D.reverse(),this.K=[]);return this.D.pop()};h.u=function(){return this.D.length+this.K.length};h.isEmpty=function(){return 0==this.D.length&&0==this.K.length};h.clear=function(){this.D=[];this.K=[]};h.contains=function(a){return 0<=Oa(this.D,a)||0<=Oa(this.K,a)};h.remove=function(a){var b=Pa(this.D,a);if(0>b)return Za(this.K,a);Ya(this.D,b);return!0};
h.w=function(){for(var a=[],b=this.D.length-1;0<=b;--b)a.push(this.D[b]);for(var c=this.K.length,b=0;b<c;++b)a.push(this.K[b]);return a};var Tg=function(a,b){Ic.call(this);this.lc=a||0;this.Va=b||10;if(this.lc>this.Va)throw Error("[goog.structs.Pool] Min can not be greater than max");this.M=new Sg;this.V=new wd;this.tb=0;this.Fb=null;this.Ga()};w(Tg,Ic);h=Tg.prototype;h.Na=function(){var a=ja();if(!(null!=this.Fb&&a-this.Fb<this.tb)){for(var b;0<this.M.u()&&(b=this.M.ra(),!this.Jb(b));)this.Ga();!b&&this.u()<this.Va&&(b=this.sb());b&&(this.Fb=a,this.V.add(b));return b}};
h.nb=function(a){this.V.remove(a);this.Jb(a)&&this.u()<this.Va?this.M.enqueue(a):this.Ka(a)};h.Ga=function(){for(var a=this.M;this.u()<this.lc;)a.enqueue(this.sb());for(;this.u()>this.Va&&0<this.M.u();)this.Ka(a.ra())};h.sb=function(){return{}};h.Ka=function(a){if("function"==typeof a.R)a.R();else for(var b in a)a[b]=null};h.Jb=function(a){return"function"==typeof a.Fc?a.Fc():!0};h.contains=function(a){return this.M.contains(a)||this.V.contains(a)};h.u=function(){return this.M.u()+this.V.u()};
h.isEmpty=function(){return this.M.isEmpty()&&this.V.isEmpty()};h.s=function(){Tg.l.s.call(this);if(0<this.V.u())throw Error("[goog.structs.Pool] Objects not released");delete this.V;for(var a=this.M;!a.isEmpty();)this.Ka(a.ra());delete this.M};var Ug=function(a,b){this.jc=a;this.Rb=b};Ug.prototype.getKey=function(){return this.jc};Ug.prototype.clone=function(){return new Ug(this.jc,this.Rb)};var Vg=function(a){this.J=[];if(a)a:{var b,c;if(a instanceof Vg){if(b=a.N(),c=a.w(),0>=a.u()){a=this.J;for(var d=0;d<b.length;d++)a.push(new Ug(b[d],c[d]));break a}}else b=qa(a),c=pa(a);for(d=0;d<b.length;d++)Wg(this,b[d],c[d])}},Wg=function(a,b,c){var d=a.J;d.push(new Ug(b,c));b=d.length-1;a=a.J;for(c=a[b];0<b;)if(d=b-1>>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=Vg.prototype;
h.remove=function(){var a=this.J,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Xa(a);else{a[0]=a.pop();for(var a=0,b=this.J,d=b.length,e=b[a];a<d>>1;){var f=2*a+1,g=2*a+2,f=g<d&&b[g].getKey()<b[f].getKey()?g:f;if(b[f].getKey()>e.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.Rb}};h.w=function(){for(var a=this.J,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].Rb);return b};h.N=function(){for(var a=this.J,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
h.Y=function(a){return Ta(this.J,function(b){return b.getKey()==a})};h.clone=function(){return new Vg(this)};h.u=function(){return this.J.length};h.isEmpty=function(){return 0==this.J.length};h.clear=function(){Xa(this.J)};var Xg=function(){Vg.call(this)};w(Xg,Vg);Xg.prototype.enqueue=function(a,b){Wg(this,a,b)};Xg.prototype.ra=function(){return this.remove()};var Yg=function(a,b){this.$b=void 0;this.ab=new Xg;Tg.call(this,a,b)};w(Yg,Tg);h=Yg.prototype;h.Na=function(a,b){if(!a){var c=Yg.l.Na.call(this);c&&this.tb&&(this.$b=l.setTimeout(u(this.Pa,this),this.tb));return c}this.ab.enqueue(m(b)?b:100,a);this.Pa()};h.Pa=function(){for(var a=this.ab;0<a.u();){var b=this.Na();if(b)a.ra().apply(this,[b]);else break}};h.nb=function(a){Yg.l.nb.call(this,a);this.Pa()};h.Ga=function(){Yg.l.Ga.call(this);this.Pa()};
h.s=function(){Yg.l.s.call(this);l.clearTimeout(this.$b);this.ab.clear();this.ab=null};var Y=function(){D.call(this);this.eb=new Zg(0,4);this.ma=new rd};w(Y,D);v("ee.MapTileManager",Y);Y.dc=function(){return Y.gc?Y.gc:Y.gc=new Y};Y.prototype.send=function(a,b,c,d,e){if(this.ma.get(a))throw Error("[ee.MapTileManager] ID in use");b=new $g(a,b,d,u(this.pc,this),m(e)?e:1);this.ma.set(a,b);a=u(this.Wc,this,b);this.eb.Na(a,c);return b};Y.prototype.abort=function(a){if(a=this.ma.get(a))a.Fa||(a.Fa=!0,a.ha=new Jc("abort")),this.pc(a)};
Y.prototype.Wc=function(a,b){if(a.$||a.Fa)ah(this,b);else{a.xd=b;b.setActive(!0);var c=new Pg;a.$=c;if(!bh(a))throw Error("Cannot dispatch first request!");}};Y.prototype.pc=function(a){this.ma.remove(a.S);a.$&&(ah(this,a.xd),a.$.R());a.Bb&&a.Bb(a.ha)};var ah=function(a,b){b.setActive(!1);var c;c=a.eb;c.V.remove(b)?(c.nb(b),c=!0):c=!1;if(!c)throw Error("Object not released");};
Y.prototype.s=function(){Y.l.s.call(this);this.eb.R();this.eb=null;var a=this.ma;Qa(a.w(),function(a){a.R()});a.clear();this.ma=null};var $g=function(a,b,c,d,e){Ic.call(this);this.S=a;this.Ad=b;this.gd=m(e)?e:1;this.Bb=c;this.ca=d};w($g,Ic);$g.prototype.Tb=0;var ch=["load","abort","error"];$g.prototype.getUrl=function(){return this.Ad};
$g.prototype.Yc=function(a){if(this.Fa)this.ca&&this.ca(this);else switch(a.type){case "load":this.ha=a;this.ca&&this.ca(this);break;case "error":case "abort":bh(this)||(this.ha=a,this.ca&&this.ca(this))}};$g.prototype.s=function(){$g.l.s.call(this);delete this.Bb;delete this.ca};var bh=function(a){if(a.Tb>a.gd)return!1;a.Tb++;Rg(a.$,a.S);setTimeout(u(a.td,a),0);return!0};
$g.prototype.td=function(){if(!this.Fa){var a=this.getUrl();(a=p(a)?a:a.src)&&(this.$.xa[this.S]={src:a,Yb:m(void 0)?void 0:null});fd(this.$,ch,u(this.Yc,this));this.$.start()}};var dh=function(){this.H=!1};w(dh,Ic);dh.prototype.setActive=function(a){this.H=a};dh.prototype.hc=function(){return this.H};var Zg=function(a,b){Yg.call(this,a,b)};w(Zg,Yg);Zg.prototype.sb=function(){return new dh};Zg.prototype.Ka=function(a){a.R()};Zg.prototype.Jb=function(a){return!a.U&&!a.hc()};var Z=function(a,b,c,d){D.call(this);this.fd=b;this.wd=c;this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.ic=m(d.ic)?d.ic:!0;this.name=d.name;this.Aa=[];this.Qb=new wd;this.vc=new wd;this.Pb=0;this.url=a;this.Kb=1};w(Z,D);v("ee.MapLayerOverlay",Z);Z.prototype.Ac=function(a){return Zc(this,"tileevent",a)};Z.prototype.addTileCallback=Z.prototype.Ac;
Z.prototype.qd=function(a){hd(a)};Z.prototype.removeTileCallback=Z.prototype.qd;Z.prototype.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.y||a.y>=d)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;c=a.x%d;0>c&&(c+=d);b=[this.fd,b,c,a.y].join("/");a=[this.url,b].join("/")+"?token="+this.wd;b=b+"/"+this.Pb;this.Pb+=1;d=Hb("div",{id:b});c=(new Date).getTime()/1E3;this.Aa.push(b);Y.dc().send(b,a,c,u(this.Xc,this,d,b));this.dispatchEvent(new eh(this.Aa.length));return d};
Z.prototype.releaseTile=function(a){Y.dc().abort(a.id);this.Qb.remove(m(a.firstElementChild)?a.firstElementChild:Kb(a.firstChild));this.vc.remove(a.id)};Z.prototype.setOpacity=function(a){this.Kb=a;var b=this.Qb.ea();qd(b,function(b){Lg(b,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
Z.prototype.Xc=function(a,b,c){"error"==c.type?(Za(this.Aa,b),this.vc.add(b),this.dispatchEvent(c)):(Za(this.Aa,b),c.target&&"load"==c.type&&(b=c.target,this.Qb.add(b),1!=this.Kb&&Lg(b,this.Kb),a.appendChild(b)),this.dispatchEvent(new eh(this.Aa.length)))};var eh=function(a){Jc.call(this,"tileevent");this.count=a};w(eh,Jc);})();
//@ sourceMappingURL=ee_api_js.sourcemap