Igor Nazarenko af6e101937 v0.1.12
2013-12-04 14:00:42 -08:00

115 lines
60 KiB
JavaScript

(function() {var h,ba=ba||{},k=this,ca=function(){},da=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},l=function(a){return void 0!==a},n=function(a){return"array"==da(a)},ea=function(a){var b=da(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"==da(a)},s=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},fa=function(a,
b,c){return a.call.apply(a.bind,arguments)},ga=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)}},t=function(a,b,c){t=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?fa:ga;return t.apply(null,arguments)},ha=Date.now||function(){return+new Date},
u=function(a,b){var c=a.split("."),d=k;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b},v=function(a,b){function c(){}c.prototype=b.prototype;a.w=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.vb=function(a,c,f){var g=Array.prototype.slice.call(arguments,2);return b.prototype[c].apply(a,g)}};
Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return t.apply(null,c)}return t(this,a)};var ia=function(a,b){for(var c in a)b.call(void 0,a[c],c,a)},ka=function(a){var b=ja,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},la=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},ma=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},na=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},oa=function(a,b){b in a&&delete a[b]},x=function(a){var b={},c;for(c in a)b[c]=a[c];return b},pa=function(a){var b=da(a);if("object"==b||"array"==b){if(a.G)return a.G();
var b="array"==b?[]:{},c;for(c in a)b[c]=pa(a[c]);return b}return a},qa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),ra=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<qa.length;f++)c=qa[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var sa=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);},ta=function(a){this.Z=a};ta.prototype.g=function(a){var b=[];ua(this,a,b);return b.join("")};
var ua=function(a,b,c){switch(typeof b){case "string":va(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(n(b)){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),e=b[f],ua(a,a.Z?a.Z.call(b,String(f),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(f in b)Object.prototype.hasOwnProperty.call(b,f)&&(e=b[f],"function"!=typeof e&&(c.push(d),va(f,
c),c.push(":"),ua(a,a.Z?a.Z.call(b,f,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}},wa={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},xa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,va=function(a,b){b.push('"',a.replace(xa,function(a){if(a in wa)return wa[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return wa[a]=
e+b.toString(16)}),'"')};var ya=function(a){Error.captureStackTrace?Error.captureStackTrace(this,ya):this.stack=Error().stack||"";a&&(this.message=String(a))};v(ya,Error);ya.prototype.name="CustomError";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")},Ga=function(a){if(!Aa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Ba,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ca,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Da,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Ea,"&quot;"));-1!=a.indexOf("'")&&(a=a.replace(Fa,"&#39;"));return a},Ba=/&/g,Ca=/</g,Da=/>/g,Ea=/"/g,Fa=/'/g,Aa=/[&<>"']/,Ha=function(a,
b){return a<b?-1:a>b?1:0};var Ia=function(a,b){b.unshift(a);ya.call(this,za.apply(null,b));b.shift()};v(Ia,ya);Ia.prototype.name="AssertionError";var y=function(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b)var e=e+(": "+b),f=d;throw new Ia(""+e,f||[]);}return a},Ja=function(a,b){throw new Ia("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var B=Array.prototype,Ka=B.indexOf?function(a,b,c){y(null!=a.length);return B.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},La=B.forEach?function(a,b,c){y(null!=a.length);B.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)},C=B.map?function(a,b,c){y(null!=a.length);return B.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},Na=function(a){var b;t:{b=Ma;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 t}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},Oa=function(a,b){var c=Ka(a,b),d;if(d=0<=c)y(null!=a.length),B.splice.call(a,c,1);return d},Pa=function(a){return B.concat.apply(B,arguments)},Qa=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;
if(n(d)||(e=ea(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(e)for(var f=a.length,g=d.length,m=0;m<g;m++)a[f+m]=d[m];else a.push(d)}},Ra=function(a,b,c){y(null!=a.length);return 2>=arguments.length?B.slice.call(a,b):B.slice.call(a,b,c)},Ta=function(a){var b=["properties"];if(!ea(a)||!ea(b)||a.length!=b.length)return!1;for(var c=a.length,d=Sa,e=0;e<c;e++)if(!d(a[e],b[e]))return!1;return!0},Sa=function(a,b){return a===b};var Ua=function(){};Ua.prototype.pa=!1;Ua.prototype.Ea=function(){this.pa||(this.pa=!0,this.C())};Ua.prototype.C=function(){if(this.Fa)for(;this.Fa.length;)this.Fa.shift()()};var Va=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Y=!1;this.La=!0};Va.prototype.C=function(){};Va.prototype.Ea=function(){};var Wa,Xa,Ya,Za,$a=function(){return k.navigator?k.navigator.userAgent:null};Za=Ya=Xa=Wa=!1;var ab;if(ab=$a()){var bb=k.navigator;Wa=0==ab.lastIndexOf("Opera",0);Xa=!Wa&&(-1!=ab.indexOf("MSIE")||-1!=ab.indexOf("Trident"));Ya=!Wa&&-1!=ab.indexOf("WebKit");Za=!Wa&&!Ya&&!Xa&&"Gecko"==bb.product}var cb=Wa,db=Xa,eb=Za,fb=Ya,gb;
t:{var hb="",ib;if(cb&&k.opera)var jb=k.opera.version,hb="function"==typeof jb?jb():jb;else if(eb?ib=/rv\:([^\);]+)(\)|;)/:db?ib=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:fb&&(ib=/WebKit\/(\S+)/),ib)var kb=ib.exec($a()),hb=kb?kb[1]:"";if(db){var lb,mb=k.document;lb=mb?mb.documentMode:void 0;if(lb>parseFloat(hb)){gb=String(lb);break t}}gb=hb}
var nb=gb,ob={},D=function(a){var b;if(!(b=ob[a])){b=0;for(var c=String(nb).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",m=d[f]||"",w=RegExp("(\\d*)(\\D*)","g"),A=RegExp("(\\d*)(\\D*)","g");do{var z=w.exec(g)||["","",""],Z=A.exec(m)||["","",""];if(0==z[0].length&&0==Z[0].length)break;b=Ha(0==z[1].length?0:parseInt(z[1],10),0==Z[1].length?0:parseInt(Z[1],10))||Ha(0==z[2].length,
0==Z[2].length)||Ha(z[2],Z[2])}while(0==b)}b=ob[a]=0<=b}return b};db&&D("9");!fb||D("528");eb&&D("1.9b")||db&&D("8")||cb&&D("9.5")||fb&&D("528");eb&&!D("8")||db&&D("9");var pb="closure_listenable_"+(1E6*Math.random()|0),qb=0;var rb=function(a,b,c,d,e){this.ja=a;this.Oa=null;this.src=b;this.type=c;this.capture=!!d;this.ia=e;this.key=++qb;this.ka=this.ma=!1},sb=function(a){a.ka=!0;a.ja=null;a.Oa=null;a.src=null;a.ia=null};var tb=function(a){this.src=a;this.m={};this.fa=0};tb.prototype.add=function(a,b,c,d,e){var f=this.m[a];f||(f=this.m[a]=[],this.fa++);var g;t:{for(g=0;g<f.length;++g){var m=f[g];if(!m.ka&&m.ja==b&&m.capture==!!d&&m.ia==e)break t}g=-1}-1<g?(a=f[g],c||(a.ma=!1)):(a=new rb(b,this.src,a,!!d,e),a.ma=c,f.push(a));return a};var ub=function(){this.A=new tb(this);this.Qa=this};v(ub,Ua);ub.prototype[pb]=!0;ub.prototype.na=null;
ub.prototype.dispatchEvent=function(a){vb(this);var b,c=this.na;if(c){b=[];for(var d=1;c;c=c.na)b.push(c),y(1E3>++d,"infinite loop")}c=this.Qa;d=a.type||a;if(p(a))a=new Va(a,c);else if(a instanceof Va)a.target=a.target||c;else{var e=a;a=new Va(d,c);ra(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Y&&0<=g;g--)f=a.currentTarget=b[g],e=wb(f,d,!0,a)&&e;a.Y||(f=a.currentTarget=c,e=wb(f,d,!0,a)&&e,a.Y||(e=wb(f,d,!1,a)&&e));if(b)for(g=0;!a.Y&&g<b.length;g++)f=a.currentTarget=b[g],e=wb(f,d,!1,a)&&e;return e};
ub.prototype.C=function(){ub.w.C.call(this);if(this.A){var a=this.A,b=0,c;for(c in a.m){for(var d=a.m[c],e=0;e<d.length;e++)++b,sb(d[e]);delete a.m[c];a.fa--}}this.na=null};
var wb=function(a,b,c,d){b=a.A.m[String(b)];if(!b)return!0;var e=b.length;if(0<e){for(var f=Array(e),g=0;g<e;g++)f[g]=b[g];b=f}else b=[];e=!0;for(f=0;f<b.length;++f){var m=b[f];if(m&&!m.ka&&m.capture==c){var g=m.ja,w=m.ia||m.src;if(m.ma){var A=a.A,z=m.type;z in A.m&&Oa(A.m[z],m)&&(sb(m),0==A.m[z].length&&(delete A.m[z],A.fa--))}e=!1!==g.call(w,d)&&e}}return e&&!1!=d.La},vb=function(a){y(a.A,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var xb="StopIteration"in k?k.StopIteration:Error("StopIteration"),yb=function(){};yb.prototype.next=function(){throw xb;};yb.prototype.Xa=function(){return this};var E=function(a,b){this.s={};this.f=[];this.ha=this.l=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 if(a){a instanceof E?(c=a.u(),d=a.n()):(c=na(a),d=ma(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}};E.prototype.n=function(){zb(this);for(var a=[],b=0;b<this.f.length;b++)a.push(this.s[this.f[b]]);return a};E.prototype.u=function(){zb(this);return this.f.concat()};
E.prototype.V=function(a){return Object.prototype.hasOwnProperty.call(this.s,a)};var zb=function(a){if(a.l!=a.f.length){for(var b=0,c=0;b<a.f.length;){var d=a.f[b];Object.prototype.hasOwnProperty.call(a.s,d)&&(a.f[c++]=d);b++}a.f.length=c}if(a.l!=a.f.length){for(var e={},c=b=0;b<a.f.length;)d=a.f[b],Object.prototype.hasOwnProperty.call(e,d)||(a.f[c++]=d,e[d]=1),b++;a.f.length=c}};E.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.s,a)?this.s[a]:b};
E.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.s,a)||(this.l++,this.f.push(a),this.ha++);this.s[a]=b};E.prototype.G=function(){return new E(this)};E.prototype.Xa=function(a){zb(this);var b=0,c=this.f,d=this.s,e=this.ha,f=this,g=new yb;g.next=function(){for(;;){if(e!=f.ha)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw xb;var g=c[b++];return a?g:d[g]}};return g};var Ab=function(a){if("function"==typeof a.n)return a.n();if(p(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return ma(a)},Bb=function(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(ea(a)||p(a))La(a,b,c);else{var d;if("function"==typeof a.u)d=a.u();else if("function"!=typeof a.n)if(ea(a)||p(a)){d=[];for(var e=a.length,f=0;f<e;f++)d.push(f)}else d=na(a);else d=void 0;for(var e=Ab(a),f=e.length,g=0;g<f;g++)b.call(c,e[g],d&&d[g],a)}};var Db=function(a){return Cb(a||arguments.callee.caller,[])},Cb=function(a,b){var c=[];if(0<=Ka(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(Eb(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){0<e&&c.push(", ");var f;f=d[e];switch(typeof f){case "object":f=f?"object":"null";break;case "string":break;case "number":f=String(f);break;case "boolean":f=f?"true":"false";break;case "function":f=(f=Eb(f))?f:"[fn]";break;default:f=typeof f}40<f.length&&(f=f.substr(0,40)+"...");
c.push(f)}b.push(a);c.push(")\n");try{c.push(Cb(a.caller,b))}catch(g){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")},Eb=function(a){if(Fb[a])return Fb[a];a=String(a);if(!Fb[a]){var b=/function ([^\(]+)/.exec(a);Fb[a]=b?b[1]:"[Anonymous]"}return Fb[a]},Fb={};var Gb=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Gb.prototype.xa=null;Gb.prototype.wa=null;var Hb=0;Gb.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Hb++;d||ha();this.M=a;this.Pa=b;delete this.xa;delete this.wa};Gb.prototype.za=function(a){this.M=a};var F=function(a){this.L=a};F.prototype.X=null;F.prototype.M=null;F.prototype.qa=null;F.prototype.Ba=null;var Ib=function(a,b){this.name=a;this.value=b};Ib.prototype.toString=function(){return this.name};var Jb=new Ib("SEVERE",1E3),Kb=new Ib("WARNING",900),Lb=new Ib("CONFIG",700),Mb=new Ib("FINE",500);F.prototype.getParent=function(){return this.X};F.prototype.za=function(a){this.M=a};var Nb=function(a){if(a.M)return a.M;if(a.X)return Nb(a.X);Ja("Root logger has no level set.");return null};
F.prototype.log=function(a,b,c){if(a.value>=Nb(this).value)for(r(b)&&(b=b()),a=this.Ta(a,b,c),b="log:"+a.Pa,k.console&&(k.console.timeStamp?k.console.timeStamp(b):k.console.markTimeline&&k.console.markTimeline(b)),k.msWriteProfilerMark&&k.msWriteProfilerMark(b),b=this;b;){c=b;var d=a;if(c.Ba)for(var e=0,f=void 0;f=c.Ba[e];e++)f(d);b=b.getParent()}};
F.prototype.Ta=function(a,b,c){var d=new Gb(a,String(b),this.L);if(c){d.xa=c;var e;var f=arguments.callee.caller;try{var g;var m;e:{for(var w=["window","location","href"],A=k,z;z=w.shift();)if(null!=A[z])A=A[z];else{m=null;break e}m=A}if(p(c))g={message:c,name:"Unknown error",lineNumber:"Not available",fileName:m,stack:"Not available"};else{var Z,aa,w=!1;try{Z=c.lineNumber||c.ub||"Not available"}catch(re){Z="Not available",w=!0}try{aa=c.fileName||c.filename||c.sourceURL||k.$googDebugFname||m}catch(se){aa=
"Not available",w=!0}g=!w&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||"Not available",name:c.name||"UnknownError",lineNumber:Z,fileName:aa,stack:c.stack||"Not available"}}e="Message: "+Ga(g.message)+'\nUrl: <a href="view-source:'+g.fileName+'" target="_new">'+g.fileName+"</a>\nLine: "+g.lineNumber+"\n\nBrowser stack:\n"+Ga(g.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Ga(Db(f)+"-> ")}catch(ae){e="Exception trying to expose exception! You win, we lose. "+ae}d.wa=e}return d};
var Ob={},Pb=null,Qb=function(a){Pb||(Pb=new F(""),Ob[""]=Pb,Pb.za(Lb));var b;if(!(b=Ob[a])){b=new F(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Qb(a.substr(0,c));c.qa||(c.qa={});c.qa[d]=b;b.X=c;Ob[a]=b}return b};var G=function(a,b){a&&a.log(Mb,b,void 0)};var Rb=function(a,b,c){if(r(a))c&&(a=t(a,c));else if(a&&"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:k.setTimeout(a,b||0)};var Sb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),Tb=fb,Ub=function(a,b){if(Tb){Tb=!1;var c=k.location;if(c){var d=c.href;if(d&&(d=(d=Ub(3,d))&&decodeURIComponent(d))&&d!=c.hostname)throw Tb=!0,Error();}}return b.match(Sb)[a]||null};var Vb=function(){};Vb.prototype.Da=null;Vb.prototype.I=function(){var a;(a=this.Da)||(a={},Wb(this)&&(a[0]=!0,a[1]=!0),a=this.Da=a);return a};var Xb=function(a,b){this.Wa=a;this.Va=b};v(Xb,Vb);Xb.prototype.ba=function(){return this.Wa()};Xb.prototype.I=function(){return this.Va()};var H=function(){return H.ya.ba()};H.Ua=!1;H.I=function(){return H.ya.I()};H.yb=function(a,b){H.Ga(new Xb(y(a),y(b)))};H.Ga=function(a){H.ya=a};var Yb=function(){};v(Yb,Vb);Yb.prototype.ba=function(){var a=Wb(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Wb=function(a){if(H.Ua)return"";if(!a.Ca&&"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.Ca=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Ca};H.Ga(new Yb);var I=function(a){ub.call(this);this.headers=new E;this.S=a||null;this.q=!1;this.O=this.a=null;this.H=this.ra=this.P="";this.v=this.$=this.N=this.aa=!1;this.B=0;this.Q=null;this.sa="";this.R=this.Ia=!1};v(I,ub);var Zb=I.prototype,$b=Qb("goog.net.XhrIo");Zb.h=$b;var ac=/^https?$/i,bc=["POST","PUT"],cc=[],ec=function(a,b,c,d){var e=dc,f=new I;cc.push(f);b&&(vb(f),f.A.add("complete",b,!1,void 0,void 0));f.A.add("ready",f.Ra,!0,void 0,void 0);e&&(f.B=Math.max(0,e));f.send(a,c,d,{"Content-Type":"application/x-www-form-urlencoded"})};
I.prototype.Ra=function(){this.Ea();Oa(cc,this)};
I.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.P+"; newUri="+a);b=b?b.toUpperCase():"GET";this.P=a;this.H="";this.ra=b;this.aa=!1;this.q=!0;this.a=this.S?this.S.ba():H();this.O=this.S?this.S.I():H.I();this.a.onreadystatechange=t(this.ta,this);try{G(this.h,fc(this,"Opening Xhr")),this.$=!0,this.a.open(b,a,!0),this.$=!1}catch(e){G(this.h,fc(this,"Error opening Xhr: "+e.message));gc(this,e);return}a=c||"";var f=this.headers.G();
d&&Bb(d,function(a,b){f.set(b,a)});d=Na(f.u());c=k.FormData&&a instanceof k.FormData;!(0<=Ka(bc,b))||d||c||f.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");Bb(f,function(a,b){this.a.setRequestHeader(b,a)},this);this.sa&&(this.a.responseType=this.sa);"withCredentials"in this.a&&(this.a.withCredentials=this.Ia);try{hc(this),0<this.B&&(this.R=ic(this.a),G(this.h,fc(this,"Will abort after "+this.B+"ms if incomplete, xhr2 "+this.R)),this.R?(this.a.timeout=this.B,this.a.ontimeout=
t(this.ua,this)):this.Q=Rb(this.ua,this.B,this)),G(this.h,fc(this,"Sending request")),this.N=!0,this.a.send(a),this.N=!1}catch(g){G(this.h,fc(this,"Send error: "+g.message)),gc(this,g)}};var ic=function(a){return db&&D(9)&&q(a.timeout)&&l(a.ontimeout)},Ma=function(a){return"content-type"==a.toLowerCase()};I.prototype.ua=function(){"undefined"!=typeof ba&&this.a&&(this.H="Timed out after "+this.B+"ms, aborting",G(this.h,fc(this,this.H)),this.dispatchEvent("timeout"),this.abort(8))};
var gc=function(a,b){a.q=!1;a.a&&(a.v=!0,a.a.abort(),a.v=!1);a.H=b;jc(a);kc(a)},jc=function(a){a.aa||(a.aa=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};I.prototype.abort=function(){this.a&&this.q&&(G(this.h,fc(this,"Aborting")),this.q=!1,this.v=!0,this.a.abort(),this.v=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),kc(this))};I.prototype.C=function(){this.a&&(this.q&&(this.q=!1,this.v=!0,this.a.abort(),this.v=!1),kc(this,!0));I.w.C.call(this)};
I.prototype.ta=function(){this.pa||(this.$||this.N||this.v?lc(this):this.Na())};I.prototype.Na=function(){lc(this)};
var lc=function(a){if(a.q&&"undefined"!=typeof ba)if(a.O[1]&&4==mc(a)&&2==nc(a))G(a.h,fc(a,"Local request error detected and ignored"));else if(a.N&&4==mc(a))Rb(a.ta,0,a);else if(a.dispatchEvent("readystatechange"),4==mc(a)){G(a.h,fc(a,"Request complete"));a.q=!1;try{var b=nc(a),c,d;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break t;default:d=!1}if(!(c=d)){var e;if(e=0===b){var f=Ub(1,String(a.P));if(!f&&self.location)var g=self.location.protocol,f=g.substr(0,
g.length-1);e=!ac.test(f?f.toLowerCase():"")}c=e}if(c)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var m;try{m=2<mc(a)?a.a.statusText:""}catch(w){G(a.h,"Can not get status: "+w.message),m=""}a.H=m+" ["+nc(a)+"]";jc(a)}}finally{kc(a)}}},kc=function(a,b){if(a.a){hc(a);var c=a.a,d=a.O[0]?ca:null;a.a=null;a.O=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.h)&&c.log(Jb,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},hc=function(a){a.a&&
a.R&&(a.a.ontimeout=null);q(a.Q)&&(k.clearTimeout(a.Q),a.Q=null)},mc=function(a){return a.a?a.a.readyState:0},nc=function(a){try{return 2<mc(a)?a.a.status:-1}catch(b){return(a=a.h)&&a.log(Kb,"Can not get status: "+b.message,void 0),-1}},fc=function(a,b){return b+" ["+a.ra+" "+a.P+" "+nc(a)+"]"};var oc=function(a,b,c){this.o=a||null;this.Sa=!!c},qc=function(a){if(!a.c&&(a.c=new E,a.l=0,a.o))for(var b=a.o.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null,f=null;0<=d?(e=b[c].substring(0,d),f=b[c].substring(d+1)):e=b[c];e=decodeURIComponent(e.replace(/\+/g," "));e=pc(a,e);a.add(e,f?decodeURIComponent(f.replace(/\+/g," ")):"")}};h=oc.prototype;h.c=null;h.l=null;h.add=function(a,b){qc(this);this.o=null;a=pc(this,a);var c=this.c.get(a);c||this.c.set(a,c=[]);c.push(b);this.l++;return this};
h.V=function(a){qc(this);a=pc(this,a);return this.c.V(a)};h.u=function(){qc(this);for(var a=this.c.n(),b=this.c.u(),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.n=function(a){qc(this);var b=[];if(p(a))this.V(a)&&(b=Pa(b,this.c.get(pc(this,a))));else{a=this.c.n();for(var c=0;c<a.length;c++)b=Pa(b,a[c])}return b};h.set=function(a,b){qc(this);this.o=null;a=pc(this,a);this.V(a)&&(this.l-=this.c.get(a).length);this.c.set(a,[b]);this.l++;return this};
h.get=function(a,b){var c=a?this.n(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.o)return this.o;if(!this.c)return"";for(var a=[],b=this.c.u(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.n(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.o=a.join("&")};h.G=function(){var a=new oc;a.o=this.o;this.c&&(a.c=this.c.G(),a.l=this.l);return a};
var pc=function(a,b){var c=String(b);a.Sa&&(c=c.toLowerCase());return c};var rc=null,sc=null,tc=!1,dc=0,uc=function(a,b){null!=a?rc=a:tc||(rc="/api");null!=b?sc=b:tc||(sc="https://earthengine.googleapis.com");tc=!0};u("ee.data.setDeadline",function(a){dc=a});u("ee.data.getTileBaseUrl",function(){return sc});u("ee.data.getInfo",function(a,b){k.console&&k.console.error&&k.console.error("ee.data.getInfo is DEPRECATED. Use ee.data.getValue() instead.");return J("/info",(new oc).add("id",a),b)});u("ee.data.getList",function(a,b){var c=vc(a);return J("/list",c,b)});
var wc=function(a,b){a=x(a);a.json_format="v2";return J("/mapid",vc(a),b)};u("ee.data.getMapId",wc);u("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[sc,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var xc=function(a,b){a=x(a);a.json_format="v2";return J("/value",vc(a),b)};u("ee.data.getValue",xc);var yc=function(a,b){a=x(a);a.json_format="v2";n(a.size)&&(a.size=a.size.join("x"));var c=vc(a).add("getid","1");return J("/thumb",c,b)};u("ee.data.getThumbId",yc);
var zc=function(a){return sc+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};u("ee.data.makeThumbUrl",zc);var Ac=function(a,b){a=x(a);a.json_format="v2";return J("/download",vc(a),b)};u("ee.data.getDownloadId",Ac);var Bc=function(a){return sc+"/api/download?docid="+a.docid+"&token="+a.token};u("ee.data.makeDownloadUrl",Bc);u("ee.data.createAsset",function(a,b,c){a={value:a,json_format:"v2"};void 0!==b&&(a.id=b);return J("/create",vc(a),c)});
u("ee.data.newTaskId",function(a,b){var c={};q(a)&&(c.count=a);return J("/newtaskid",vc(c),b)});u("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid task_id: expected a string or an array of strings.");return J("/taskstatus?q="+a.join(),null,b,"GET")});u("ee.data.prepareValue",function(a,b,c){b=x(b);b.tid=a;return J("/prepare",vc(b),c)});u("ee.data.startProcessing",function(a,b,c){b=x(b);b.id=a;return J("/processingrequest",vc(b),c)});
var J=function(a,b,c,d){function e(a,b){var c=!1;try{var d=sa(a),e=d.data}catch(f){c=!0}var aa=void 0;c||!("data"in d||"error"in d)?aa="Malformed response: "+a:"error"in d&&(aa=d.error.message);if(b)b(e,aa);else{if(!aa)return e;throw Error(aa);}}uc();d=d||"POST";a=rc+a;b=b?b.toString():"";if(c)ec(a,function(a){var b;a=a.target;try{b=a.a?a.a.responseText:""}catch(d){G(a.h,"Can not get responseText: "+d.message),b=""}return e(b,c)},d,b);else{var f=H();f.open(d,a,!1);f.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");f.send(b);return e(f.responseText,null)}},vc=function(a){var b=new oc,c;for(c in a)b.set(c,a[c]);return b};var Cc=function(){};var Dc=function(){};var Ec=function(){this.b=Array(4);this.Ma=Array(64);this.W=this.J=0;this.reset()};v(Ec,Dc);Ec.prototype.reset=function(){this.b[0]=1732584193;this.b[1]=4023233417;this.b[2]=2562383102;this.b[3]=271733878;this.W=this.J=0};
var Fc=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.b[0];c=a.b[1];var e=a.b[2],f=a.b[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.b[0]=a.b[0]+b&4294967295;a.b[1]=a.b[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.b[2]=a.b[2]+e&4294967295;a.b[3]=a.b[3]+f&4294967295};
Ec.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-64,d=this.Ma,e=this.J,f=0;f<b;){if(0==e)for(;f<=c;)Fc(this,a,f),f+=64;if(p(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),64==e){Fc(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],64==e){Fc(this,d);e=0;break}}this.J=e;this.W+=b};
var Hc=function(){var a=Gc,b=Array((56>a.J?64:128)-a.J);b[0]=128;for(var c=1;c<b.length-8;++c)b[c]=0;for(var d=8*a.W,c=b.length-8;c<b.length;++c)b[c]=d&255,d/=256;a.update(b);b=Array(16);for(c=d=0;4>c;++c)for(var e=0;32>e;e+=8)b[d++]=a.b[c]>>>e&255;return b};var Ic=function(a){this.T="__ee_hash__";this.ga=!1!==a;this.D=[];this.r={}};u("ee.Serializer",Ic);var Jc=new ta,Gc=new Ec,Lc=function(a){return Kc(new Ic(!0),a)};u("ee.Serializer.encode",Lc);var Mc=function(a){return Jc.g(Lc(a))};u("ee.Serializer.toJSON",Mc);var Nc=function(a){a=Kc(new Ic(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Jc.g(a)};u("ee.Serializer.toReadableJSON",Nc);
var Kc=function(a,b){var c=a.U(b);if(a.ga){c=s(c)&&"ValueRef"==c.type&&1==a.D.length?a.D[0][1]:{type:"CompoundValue",scope:a.D,value:c};a.D=[];for(var d in a.r)delete a.r[d].object[a.T];a.r={}}return c};
Ic.prototype.U=function(a){if(!l(a))throw Error("Can't encode an undefined value.");var b,c=s(a)?a[this.T]:null;if(this.ga&&null!=c&&this.r[c])return{type:"ValueRef",value:this.r[c].name};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(s(a)&&"function"==typeof a.getFullYear)return{type:"Date",value:Math.floor(1E3*a.getTime())};if(a instanceof Cc){if(b=a.d(t(this.U,this)),!s(b)||"ArgumentRef"==b.type)return b}else if(n(a))b=C(a,function(a){return this.U(a)},this);else if(s(a)&&!r(a))b=la(a,
function(a){if(!r(a))return this.U(a)},this),oa(b,this.T),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.ga){Gc.reset();Gc.update(Jc.g(b));var c=Hc(),d;this.r[c]?d=this.r[c].name:(d=String(this.D.length),this.D.push([d,b]),this.r[c]={name:d,object:a});a[this.T]=c;return{type:"ValueRef",value:d}}return b};var K=function(a,b){if(!(this instanceof K))return new K(a,b);this.e=a;this.j=b};v(K,Cc);u("ee.ComputedObject",K);K.prototype.i=function(a){return xc({json:this.g()},a)};u("ee.ComputedObject.prototype.getInfo",K.prototype.i);K.prototype.d=function(a){var b={},c;for(c in this.j)l(this.j[c])&&(b[c]=a(this.j[c]));b={type:"Invocation",arguments:b};a=a(this.e);b[p(a)?"functionName":"function"]=a;return b};K.prototype.g=function(){return Mc(this)};u("ee.ComputedObject.prototype.serialize",K.prototype.g);
K.prototype.toString=function(){return"ee."+this.name()+"("+Nc(this)+")"};u("ee.ComputedObject.prototype.toString",K.prototype.toString);K.prototype.name=function(){return"ComputedObject"};var L=function(){if(!(this instanceof L))return new L};v(L,Cc);u("ee.Function",L);var Oc=function(a){return a};L.prototype.call=function(a){return this.apply(Pc(this,Array.prototype.slice.call(arguments,0)))};u("ee.Function.prototype.call",L.prototype.call);L.prototype.apply=function(a){a=new K(this,Qc(this,a));return Oc(a,this.p().returns)};u("ee.Function.prototype.apply",L.prototype.apply);
var Qc=function(a,b){for(var c=a.p().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&l(b[g]))d[g]=Oc(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+g+") missing to function: "+a);e[g]=!0}var c=[],m;for(m in b)e[m]||c.push(m);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},Pc=function(a,b){var c=a.p().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};L.prototype.toString=function(a,b){var c=this.p(),d=[];d.push(a||c.name);d.push("(");d.push(C(c.args.slice(1),function(a){return a.name}).join(", "));d.push(")\n");c.description&&(d.push("\n"),d.push(c.description),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("): ");d.push(f.description)}}return d.join("")};
L.prototype.g=function(){return Mc(this)};var Rc={},Sc=function(a){return a in Rc?Rc[a]:null};u("ee.Types.nameToClass",Sc);var Tc=function(a){return a.prototype instanceof K?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"};u("ee.Types.classToName",Tc);
var Uc=function(a,b){if(b==a)return!0;switch(a){case "EEObject":return"Image"==b||"Feature"==b||"Collection"==b||"EECollection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "EECollection":case "Collection":return"Collection"==b||"EECollection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}},Wc=function(a){return p(a)||Vc(a,String)},Vc=function(a,b){if(a instanceof Cc){var c=a.__EE_VAR_TYPE;return c&&(c==b||c.prototype instanceof
b)}return!1},Xc=function(a){return s(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var M=function(a,b){if(!l(b))return Yc(a);if(!(this instanceof M))return new M(a,b);this.F=pa(b);this.F.name=a};v(M,L);u("ee.ApiFunction",M);var N=function(a,b){return L.prototype.call.apply(Yc(a),Array.prototype.slice.call(arguments,1))};u("ee.ApiFunction._call",N);var Zc=function(a,b){return Yc(a).apply(b)};u("ee.ApiFunction._apply",Zc);M.prototype.d=function(){return this.F.name};M.prototype.p=function(){return this.F};
var ja=null,$c={},bd=function(){ad();return la(ja,function(a){return a.p()})},cd=function(){ad();return ka(function(a,b){return!$c[b]})},Yc=function(a){ad();var b=ja[a];if(!b)throw Error("Unknown built-in function name: "+a);return b};u("ee.ApiFunction.lookup",Yc);
var ad=function(a,b){if(!ja){var c=function(c,e){e?b&&b(Error(e)):(ja=la(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 M(b,a)}),a&&a())};a?J("/algorithms",null,c,"GET"):c(J("/algorithms",null,void 0,"GET"))}},O=function(a,b,c,d){ad();var e=d||"";ia(ja,function(d,g){var m=g.split(".");if(2==m.length&&m[0]==b){var w=e+m[1],A=d.p();$c[g]=!0;var z=!1;A.args.length&&(m=A.args[0].type,z="Object"!=m&&Uc(m,
c));m=z?a.prototype:a;w in m&&(w+="_");m[w]=function(a){var b=Array.prototype.slice.call(arguments,0);if(1==b.length&&Xc(b[0])){if(b=x(b[0]),z){var c=A.args[0].name;if(c in b)throw Error("Named args for "+w+" can't contain keyword "+c);b[c]=this}}else b=Pc(d,z?[this].concat(b):b);return d.apply(b)};m[w].toString=t(d.toString,d,w,z);m[w].signature=A}})},P=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 dd=function(a,b){if(!(this instanceof dd))return new dd(a,b);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e];c.push(ed(Sc(f.type),f.name))}this.Aa=b.apply(null,c);this.F=fd(a,c,this.Aa)};v(dd,L);u("ee.CustomFunction",dd);dd.prototype.d=function(a){return{type:"Function",argumentNames:C(this.F.args,function(a){return a.name}),body:a(this.Aa)}};dd.prototype.p=function(){return this.F};
var ed=function(a,b){var c=function(){};a=a||Object;c.prototype=a.prototype instanceof Cc?a.prototype:Cc.prototype;c=new c;c.L=b;c.d=function(){return{type:"ArgumentRef",value:this.L}};c.__EE_VAR_TYPE=a;return c},fd=function(a,b,c){for(var d=[],e=0;e<b.length;e++)null===b[e].L&&d.push(e);if(0==d.length)return a;var f=function(a){var b=0;s(a)&&!r(a)&&("ArgumentRef"!=a.type||null===a.value?ia(a,function(a){b+=f(a)}):b++);return b},e=Lc(c);c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],
m=c+e;b[g].L=m;a.args[g].name=m}return a};var Q=function(a){if(!(this instanceof Q))return new Q(a);if(a instanceof Q)return a;gd();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new Q(a[0]);K.call(this,new M("Filter.and"),{filters:a});this.K=a}else if(a instanceof K)K.call(this,a.e,a.j),this.K=[a];else{if(l(a))throw Error("Invalid argument specified for ee.Filter(): "+a);K.call(this,null,null);this.K=[]}};v(Q,K);u("ee.Filter",Q);
var hd=!1,gd=function(){hd||(O(Q,"Filter","Filter"),hd=!0)},id={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};Q.prototype.length=function(){return this.K.length};Q.prototype.length=Q.prototype.length;var R=function(a,b){var c=a.K.slice(0);b instanceof Q?Qa(c,b.K):b instanceof Array?Qa(c,b):c.push(b);return new Q(c)};Q.prototype.t=function(){return N("Filter.not",this)};Q.prototype.not=Q.prototype.t;
var jd=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in id))throw Error("Unknown filtering operator: "+b);a=N("Filter."+id[b],a,c);return d?a.t():a};Q.metadata=jd;var kd=function(a,b){return N("Filter.equals",a,b)};Q.eq=kd;var ld=function(a,b){return kd(a,b).t()};Q.neq=ld;var md=function(a,b){return N("Filter.lessThan",a,b)};Q.lt=md;var nd=function(a,b){return md(a,b).t()};Q.gte=nd;var od=function(a,b){return N("Filter.greaterThan",a,b)};
Q.gt=od;var pd=function(a,b){return od(a,b).t()};Q.lte=pd;var qd=function(a,b){return N("Filter.stringContains",a,b)};Q.contains=qd;var rd=function(a,b){return qd(a,b).t()};Q.not_contains=rd;var sd=function(a,b){return N("Filter.stringStartsWith",a,b)};Q.starts_with=sd;var td=function(a,b){return sd(a,b).t()};Q.not_starts_with=td;var ud=function(a,b){return N("Filter.stringEndsWith",a,b)};Q.ends_with=ud;var vd=function(a,b){return ud(a,b).t()};Q.not_ends_with=vd;
var wd=function(a){var b=Array.prototype.slice.call(arguments);return N("Filter.and",b)};Q.and=wd;Q.or=function(a){var b=Array.prototype.slice.call(arguments);return N("Filter.or",b)};var xd=function(a,b){l(b)||(b=0xffffffffffff);var c=N("DateRange",a,b);return Zc("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=xd;var yd=function(a,b,c,d){return Zc("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};Q.inList=yd;
var zd=function(a,b){return Zc("Filter.intersects",{leftField:".all",rightValue:N("Feature",a),maxError:b})};Q.bounds=zd;Q.prototype.bb=function(){return R(this,kd.apply(null,[].slice.call(arguments)))};Q.prototype.eq=Q.prototype.bb;Q.prototype.pb=function(){return R(this,ld.apply(null,[].slice.call(arguments)))};Q.prototype.neq=Q.prototype.pb;Q.prototype.nb=function(){return R(this,md.apply(null,[].slice.call(arguments)))};Q.prototype.lt=Q.prototype.nb;
Q.prototype.kb=function(){return R(this,nd.apply(null,[].slice.call(arguments)))};Q.prototype.gte=Q.prototype.kb;Q.prototype.jb=function(){return R(this,od.apply(null,[].slice.call(arguments)))};Q.prototype.gt=Q.prototype.jb;Q.prototype.ob=function(){return R(this,pd.apply(null,[].slice.call(arguments)))};Q.prototype.lte=Q.prototype.ob;Q.prototype.contains=function(){return R(this,qd.apply(null,[].slice.call(arguments)))};Q.prototype.contains=Q.prototype.contains;
Q.prototype.qb=function(){return R(this,rd.apply(null,[].slice.call(arguments)))};Q.prototype.not_contains=Q.prototype.qb;Q.prototype.tb=function(){return R(this,sd.apply(null,[].slice.call(arguments)))};Q.prototype.starts_with=Q.prototype.tb;Q.prototype.sb=function(){return R(this,td.apply(null,[].slice.call(arguments)))};Q.prototype.not_starts_with=Q.prototype.sb;Q.prototype.ab=function(){return R(this,ud.apply(null,[].slice.call(arguments)))};Q.prototype.ends_with=Q.prototype.ab;
Q.prototype.rb=function(){return R(this,vd.apply(null,[].slice.call(arguments)))};Q.prototype.not_ends_with=Q.prototype.rb;Q.prototype.Ya=function(){return R(this,wd.apply(null,[].slice.call(arguments)))};Q.prototype.and=Q.prototype.Ya;Q.prototype.$a=function(){return R(this,xd.apply(null,[].slice.call(arguments)))};Q.prototype.date=Q.prototype.$a;Q.prototype.lb=function(){return R(this,yd.apply(null,[].slice.call(arguments)))};Q.prototype.inList=Q.prototype.lb;
Q.prototype.Za=function(){return R(this,zd.apply(null,[].slice.call(arguments)))};Q.prototype.bounds=Q.prototype.Za;Q.prototype.name=function(){return"Filter"};var S=function(a,b){K.call(this,a,b);Ad()};v(S,K);u("ee.Collection",S);var Bd=!1,Ad=function(){Bd||(O(S,"Collection","Collection"),O(S,"AggregateFeatureCollection","Collection","aggregate_"),Bd=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Cd(this,N("Collection.filter",this,a))};u("ee.Collection.prototype.filter",S.prototype.filter);S.prototype.gb=function(a,b,c){return this.filter(jd(a,b,c))};u("ee.Collection.prototype.filterMetadata",S.prototype.gb);
S.prototype.eb=function(a){return this.filter(zd(a))};u("ee.Collection.prototype.filterBounds",S.prototype.eb);S.prototype.fb=function(a,b){return this.filter(xd(a,b))};u("ee.Collection.prototype.filterDate",S.prototype.fb);S.prototype.mb=function(a,b,c){return Cd(this,N("Collection.limit",this,a,b,c))};u("ee.Collection.prototype.limit",S.prototype.mb);S.prototype.sort=function(a,b){return Cd(this,N("Collection.limit",this,void 0,a,b))};u("ee.Collection.prototype.sort",S.prototype.sort);
var Cd=function(a,b){return b instanceof a.constructor?b:new a.constructor(b)};S.prototype.name=function(){return"Collection"};var Dd=function(a,b,c){if(!r(c))throw Error("Can't map non-callable object: "+c);b={name:"",returns:"Object",args:[{name:null,type:Tc(b)}]};return Cd(a,Zc("Collection.map",{collection:a,baseAlgorithm:new dd(b,c)}))};S.prototype.map=function(a){return Dd(this,K,a)};u("ee.Collection.prototype.map",S.prototype.map);var T=function(a,b,c){if(!(this instanceof T))return new T(a,b,c);Ed();var d=null!=b||null!=c;if(a instanceof K&&Boolean(a.e)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");K.call(this,a.e,a.j)}else{a instanceof T&&(a=a.d());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!Fd(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));K.call(this,null,null);
this.ca=a.type;this.Ja=a.coordinates||null;this.Ka=a.geometries||null;if(null!=b)this.ea=b;else if("crs"in a)if(s(a.crs)&&"name"==a.crs.type&&s(a.crs.properties)&&p(a.crs.properties.name))this.ea=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new ta).g(a.crs));this.da=c;!l(c)&&"geodesic"in a&&(this.da=Boolean(a.geodesic))}};v(T,K);u("ee.Geometry",T);
var Gd=!1,Ed=function(){Gd||(O(T,"Geometry","Geometry"),Gd=!0)},Hd=function(a,b){if(!(this instanceof Hd))return Id(Hd,arguments);if(2<arguments.length)throw Error("The Geometry.Point constructor takes at most 2 arguments ("+arguments.length+" given)");if(1==arguments.length&&n(arguments[0])&&2==arguments[0].length){var c=arguments[0];a=c[0];b=c[1]}T.call(this,{type:"Point",coordinates:[a,b]})};v(Hd,T);T.Point=Hd;
var Jd=function(a){if(!(this instanceof Jd))return Id(Jd,arguments);T.call(this,{type:"MultiPoint",coordinates:Kd(a,2,arguments)})};v(Jd,T);T.MultiPoint=Jd;var Ld=function(a,b,c,d){if(!(this instanceof Ld))return new Ld(a,b,c,d);if(4<arguments.length)throw Error("The Geometry.Rectangle constructor takes at most 4 arguments ("+arguments.length+" given)");if(n(a)){var e=a;a=e[0];b=e[1];c=e[2];d=e[3]}T.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};v(Ld,T);T.Rectangle=Ld;
var Md=function(a){if(!(this instanceof Md))return Id(Md,arguments);T.call(this,{type:"LineString",coordinates:Kd(a,2,arguments)})};v(Md,T);T.LineString=Md;var Nd=function(a){if(!(this instanceof Nd))return Id(Nd,arguments);T.call(this,{type:"LinearRing",coordinates:Kd(a,2,arguments)})};v(Nd,T);T.LinearRing=Nd;var Od=function(a){if(!(this instanceof Od))return Id(Od,arguments);T.call(this,{type:"MultiLineString",coordinates:Kd(a,3,arguments)})};v(Od,T);T.MultiLineString=Od;
var Pd=function(a){if(!(this instanceof Pd))return Id(Pd,arguments);T.call(this,{type:"Polygon",coordinates:Kd(a,3,arguments)})};v(Pd,T);T.Polygon=Pd;var Qd=function(a){if(!(this instanceof Qd))return Id(Qd,arguments);T.call(this,{type:"MultiPolygon",coordinates:Kd(a,4,arguments)})};v(Qd,T);T.MultiPolygon=Qd;
T.prototype.d=function(a){if(this.e){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return K.prototype.d.call(this,a)}a={type:this.ca};"GeometryCollection"==this.ca?a.geometries=this.Ka:a.coordinates=this.Ja;null!=this.ea&&(a.crs={type:"name",properties:{name:this.ea}});null!=this.da&&(a.geodesic=this.da);return a};T.prototype.va=function(){if(this.e)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.d()};
T.prototype.toGeoJSON=T.prototype.va;T.prototype.Ha=function(){if(this.e)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new ta).g(this.va())};T.prototype.toGeoJSONString=T.prototype.Ha;T.prototype.type=function(){if(this.e)throw Error("Can't get the type of a computed Geometry to GeoJSON. Use getInfo() instead.");return this.ca};T.prototype.type=T.prototype.type;T.prototype.g=function(){return Mc(this)};T.prototype.serialize=T.prototype.g;
T.prototype.toString=function(){return"ee.Geometry("+this.Ha()+")"};
var Fd=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(!Fd(b[a]))return!1;return!0}a=Rd(a.coordinates);return"Point"==b&&1==a||"MultiPoint"==b&&2==a||"LineString"==b&&2==a||"LinearRing"==b&&2==a||"MultiLineString"==b&&3==a||"Polygon"==b&&3==a||"MultiPolygon"==b&&4==a},Rd=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=Rd(a[0]),c=1;c<a.length;c++)if(Rd(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},Kd=function(a,b,c){if(2>b||4<b)throw Error("Unexpected nesting level.");if(!n(a)&&c&&(a=Array.prototype.slice.call(c),"number"==typeof a[0])){if(0!=a.length%2)throw Error("Invalid number of coordinates: "+a.length);c=[];for(var d=0;d<a.length;d+=2)c.push([a[d],a[d+1]]);a=c}c=a;for(d=0;n(c);)c=c[0],d++;for(;d<b;)a=[a],d++;if(Rd(a)!=b)throw Error("Invalid geometry");return a},Id=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};T.prototype.name=function(){return"Geometry"};u("ee.Deserializer",function(){});u("ee.Deserializer.fromJSON",function(a){return Sd(sa(a))});var Sd=function(a){var b={};if(s(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]=Td(f,b)}a=a.value}return Td(a,b)};u("ee.Deserializer.decode",Sd);
var Td=function(a,b){if(null===a||q(a)||"boolean"==typeof a||p(a))return a;if(n(a))return C(a,function(a){return Td(a,b)});if(!s(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 ed(Object,c);case "Date":c=a.value;if(!q(c))throw Error("Invalid date value: "+c);return new Date(c/1E3);case "Bytes":return c=new Cc,
c.d=function(){return a},c;case "Invocation":var c="functionName"in a?Yc(a.functionName):Td(a["function"],b),d=la(a.arguments,function(a){return Td(a,b)});if(c instanceof L)return c.apply(d);if(c instanceof K)return new K(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return la(a.value,function(a){return Td(a,b)});case "Function":var e=Td(a.body,b),c={name:"",args:C(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new dd(c,
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new T(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var U=function(a,b){if(!(this instanceof U))return new U(a,b);if(a instanceof U){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)");Ud();a instanceof T||null===a?K.call(this,new M("Feature"),{geometry:a,metadata:b||null}):a instanceof K?K.call(this,a.e,a.j):"Feature"==a.type?K.call(this,new M("Feature"),{geometry:new T(a.geometry),metadata:a.properties||
null}):K.call(this,new M("Feature"),{geometry:new T(a),metadata:b||null})};v(U,K);u("ee.Feature",U);var Vd=!1,Ud=function(){Vd||(O(U,"Feature","Feature"),Vd=!0)};U.prototype.i=function(a){return U.w.i.call(this,a)};U.prototype.getInfo=U.prototype.i;U.prototype.k=function(a,b){return N("Collection",[this]).k(a,b)};U.prototype.getMap=U.prototype.k;U.Point=function(a,b){return Hd.apply(null,arguments)};U.MultiPoint=function(a){return Jd.apply(null,arguments)};
U.Rectangle=function(a,b,c,d){return new Ld(a,b,c,d)};U.LineString=function(a){return Md.apply(null,arguments)};U.LinearRing=function(a){return Nd.apply(null,arguments)};U.MultiLine=function(a){return Od.apply(null,arguments)};U.Polygon=function(a){return Pd.apply(null,arguments)};U.MultiPolygon=function(a){return Qd.apply(null,arguments)};
U.prototype.set=function(a){if(1!=arguments.length||!s(a))throw Error("Feature.set() takes only one argument (a dictionary).");Xc(a)&&Ta(na(a))&&Xc(a.properties)&&(a=a.properties);return new U(N("Feature.set",this,a))};U.prototype.set=U.prototype.set;U.prototype.name=function(){return"Feature"};var V=function(a,b){if(!(this instanceof V))return new V(a,b);if(a instanceof V)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");Wd();a instanceof T&&(a=new U(a));a instanceof U&&(a=[a]);if(q(a)||Vc(a,Number)||Wc(a)){var c={tableId:a};b&&(c.geometryColumn=b);S.call(this,new M("Collection.loadTable"),c)}else if(n(a))S.call(this,new M("Collection"),{features:C(a,function(a){return new U(a)})});else if(a instanceof
K)S.call(this,a.e,a.j);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};v(V,S);u("ee.FeatureCollection",V);var Xd=!1,Wd=function(){Xd||(O(V,"FeatureCollection","FeatureCollection"),Xd=!0)};V.prototype.k=function(a,b){var c=Zc("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.k(null,b);else return c.k()};V.prototype.getMap=V.prototype.k;V.prototype.i=function(a){return V.w.i.call(this,a)};V.prototype.getInfo=V.prototype.i;
V.prototype.map=function(a){return Dd(this,U,a)};V.prototype.name=function(){return"FeatureCollection"};var W=function(a){if(!(this instanceof W))return new W(a);if(a instanceof W)return a;Yd();var b=arguments.length;if(0==b||1==b&&!l(a))K.call(this,new M("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(q(a)||Vc(a,Number))K.call(this,new M("Image.constant"),{value:a});else if(Wc(a))K.call(this,new M("Image.load"),{id:a});else{if(n(a))return Zd(C(a,function(a){return new W(a)}));if(a instanceof K)K.call(this,a.e,a.j);else throw Error("Unrecognized argument type to convert to an Image: "+
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Wc(b)&&(q(c)||Vc(c,Number)))K.call(this,new M("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)");};v(W,K);u("ee.Image",W);var $d=!1,Yd=function(){$d||(O(W,"Image","Image"),O(W,"Window","Image","focal_"),$d=!0)};W.prototype.i=function(a){return W.w.i.call(this,a)};W.prototype.getInfo=W.prototype.i;
W.prototype.k=function(a,b){var c=a?x(a):{};c.image=this.g();if(b)wc(c,t(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=wc(c),c.image=this,c};W.prototype.getMap=W.prototype.k;W.prototype.hb=function(a,b){var c=a?x(a):{};c.image=this.g();if(b)Ac(c,function(a,c){a?b(Bc(a)):b(null,c)});else return Bc(Ac(c))};W.prototype.getDownloadURL=W.prototype.hb;W.prototype.ib=function(a){a=a?x(a):{};a.image=this.g();return zc(yc(a))};W.prototype.getThumbURL=W.prototype.ib;
W.rgb=function(a,b,c){return Zd([a,b,c],["vis-red","vis-green","vis-blue"])};W.cat=function(a){var b=Array.prototype.slice.call(arguments);return Zd(b,null)};var Zd=function(a,b){if(0==a.length)throw Error("Can't combine 0 images.");for(var c=new W(a[0]),d=1;d<a.length;d++)c=N("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
W.prototype.select=function(a,b){var c={input:this,bandSelectors:a};if(n(a))b&&(c.newNames=b);else{a=Array.prototype.slice.call(arguments);for(var d=0;d<a.length;d++)if(!p(a[d])&&!q(a[d]))throw Error("Illegal argument to select(): "+a[d]);c.bandSelectors=a}return Zc("Image.select",c)};W.prototype.select=W.prototype.select;
W.prototype.cb=function(a,b){var c=N("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE"),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(b)for(var f in b)d.push(f),e[f]=new W(b[f]);f=new L;f.d=function(a){return c.d(a)};f.p=function(){return{name:"",args:C(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return f.apply(e)};W.prototype.expression=W.prototype.cb;W.prototype.clip=function(a){try{a=new T(a)}catch(b){}return N("Image.clip",this,a)};
W.prototype.clip=W.prototype.clip;W.prototype.set=function(a){if(1!=arguments.length||!s(a))throw Error("Image.set() takes only one argument (a dictionary).");Xc(a)&&Ta(na(a))&&Xc(a.properties)&&(a=a.properties);return new W(N("Image.set",this,a))};W.prototype.set=W.prototype.set;W.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return new X(a);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");be();a instanceof W&&(a=[a]);if(Wc(a))S.call(this,new M("ImageCollection.load"),{id:a});else if(n(a))S.call(this,new M("ImageCollection.fromImages"),{images:C(a,function(a){return new W(a)})});else if(a instanceof K)S.call(this,a.e,a.j);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
a);};v(X,S);u("ee.ImageCollection",X);var ce=!1,be=function(){ce||(O(X,"ImageCollection","ImageCollection"),O(X,"reduce","ImageCollection"),ce=!0)};X.prototype.k=function(a,b){var c=N("ImageCollection.mosaic",this);if(b)c.k(a,b);else return c.k(a)};X.prototype.getMap=X.prototype.k;X.prototype.i=function(a){return X.w.i.call(this,a)};X.prototype.getInfo=X.prototype.i;X.prototype.map=function(a){return Dd(this,W,a)};
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"};var Y=function(a){if(!(this instanceof Y))return new Y(a);if(a instanceof Y)return a;de();if(q(a))K.call(this,null,null),this.la=a;else if(a instanceof K)K.call(this,a.e,a.j),this.la=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};v(Y,K);u("ee.Number",Y);var fe=!1,de=function(){fe||(O(Y,"Number","Number"),fe=!0)};Y.prototype.d=function(a){return q(this.la)?this.la:Y.w.d.call(this,a)};Y.prototype.name=function(){return"Number"};var $=function(a){if(!(this instanceof $))return new $(a);if(a instanceof $)return a;ge();if(p(a))K.call(this,null,null);else if(a instanceof K)K.call(this,a.e,a.j);else throw Error("Invalid argument specified for ee.String(): "+a);this.oa=a};v($,K);u("ee.String",$);var he=!1,ge=function(){he||(O($,"String","String"),he=!0)};$.prototype.d=function(a){return p(this.oa)?this.oa:this.oa.d(a)};$.prototype.name=function(){return"String"};u("ee.initialize",function(a,b,c,d){if("ready"!=ie||a||b){var e=null!=c;if(d)if(e)je.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==ie&&e)ke.push(c);else if(ie="loading",uc(a,b),e)ke.push(c),ad(le,me);else try{ad(),le()}catch(f){throw me(f),f;}}else c&&c()});
u("ee.reset",function(){ie="not_ready";sc=rc=null;tc=!1;ja=null;$c={};P(W);$d=!1;P(U);Vd=!1;P(S);Bd=!1;P(X);ce=!1;P(V);Xd=!1;P(Q);hd=!1;P(T);Gd=!1;P(Y);fe=!1;P($);he=!1;for(var a=k.ee,b=0;b<ne.length;b++){var c=ne[b];P(a[c]);delete a[c]}ne=[];Rc=a;var a=oe,d;for(d in a)delete a[d]});u("ee.InitState",{wb:"not_ready",LOADING:"loading",xb:"ready"});u("ee.InitState.NOT_READY","not_ready");u("ee.InitState.LOADING","loading");u("ee.InitState.READY","ready");var ie="not_ready",ke=[],je=[];
u("ee.TILE_SIZE",256);var ne=[],oe={};u("ee.Algorithms",oe);u("ee.call",function(a,b){p(a)&&(a=new M(a));var c=Array.prototype.slice.call(arguments,1);return L.prototype.call.apply(a,c)});u("ee.apply",function(a,b){p(a)&&(a=new M(a));return a.apply(b)});
var le=function(){if("loading"==ie){try{Yd();Ud();Ad();be();Wd();gd();Ed();de();ge();var a=bd(),b={},c={},d;for(d in a){if(-1!=d.indexOf(".")){var e=d.slice(0,d.indexOf("."));b[e]=!0}var f=a[d].returns.replace(/<.*>/,"");c[f]=!0}var a=["List"],g;for(g in a)b[g]&&delete b[g];var m=k.ee,w;for(w in b)w in c&&!(w in m)&&(m[w]=pe(w),ne.push(w));Rc=m;qe()}catch(A){me(A);return}ie="ready";for(je=[];0<ke.length;)ke.shift()()}},me=function(a){if("loading"==ie)for(ie="not_ready",ke=[];0<je.length;)je.shift()(a)},
qe=function(){ia(cd(),function(a,b){var c=a.p();if(!c.hidden){for(var d=b.split("."),e=oe;1<d.length;){var f=d[0];f in e||(e[f]={signature:{}});e=e[f];d=Ra(d,1)}f=t(a.call,a);f.signature=c;f.toString=t(a.toString,a);e[d[0]]=f}})},pe=function(a){var b=function(b){var d=Array.prototype.slice.apply(arguments);d[0]instanceof K&&1==d.length?d=d[0]:(d.unshift(a),d=N.apply(null,d));var e=k.ee;if(this instanceof e[a])K.call(this,d.e,d.j);else return new e[a](d)};v(b,K);O(b,a,a);return b},Oc=function(a,b){if(null===
a)return null;if(l(a)){var c=k.ee;switch(b){case "Image":return new W(a);case "ImageCollection":return new X(a);case "Feature":case "EEObject":return a instanceof S?N("Feature",N("Collection.geometry",a)):"EEObject"==b&&a instanceof W?a:new U(a);case "Geometry":return a instanceof V?N("Collection.geometry",a):new T(a);case "FeatureCollection":case "EECollection":case "Collection":return a instanceof S?a:new V(a);case "Filter":return new Q(a);case "ErrorMargin":return q(a)?N("ErrorMargin",a,"meters"):
a;case "Algorithm":return p(a)?new M(a):a;case "Date":return p(a)?new Date(a):q(a)?new Date(a):a instanceof K?(c=Yc("Date"),new K(c,Qc(c,Pc(c,[a])))):a;case "Dictionary":return b in c?a instanceof c[b]?a:a instanceof K?new c[b](a):a:a;case "String":return Wc(a)||a instanceof $||a instanceof K||Vc(a,$)?new $(a):a;case "List":return a;default:if(b in c&&a){if(a instanceof c[b])return a;if(p(a)){if(!(a in c[b]))throw Error("Unknown algorithm: "+b+"."+a);return c[b][a].call()}return new c[b](a)}return a}}};})();
//@ sourceMappingURL=ee_api_js.sourcemap