mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
122 lines
64 KiB
JavaScript
122 lines
64 KiB
JavaScript
(function() {var h,aa=aa||{},k=this,l=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},m=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},ea=function(a){return"number"==typeof a},fa=function(a){return"function"==ca(a)},q=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},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)}},r=function(a,b,c){r=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ga:ha;return r.apply(null,arguments)},ia=Date.now||function(){return+new Date},
|
|
t=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&&l(b)?d[e]=b:d=d[e]?d[e]:d[e]={}},u=function(a,b){function c(){}c.prototype=b.prototype;a.o=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Gb=function(a,c,g){for(var f=Array(arguments.length-2),n=2;n<arguments.length;n++)f[n-2]=arguments[n];return b.prototype[c].apply(a,f)}};
|
|
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 r.apply(null,c)}return r(this,a)};var ja=function(a,b){for(var c in a)b.call(void 0,a[c],c,a)},la=function(a){var b=ka,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},ma=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},na=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},oa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},pa=function(a,b){b in a&&delete a[b]},v=function(a){var b={},c;for(c in a)b[c]=a[c];return b},qa=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]=qa(a[c]);return b}return a},ra="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),sa=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 g=0;g<ra.length;g++)c=ra[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},ta=function(a){var b=arguments.length;if(1==b&&m(arguments[0]))return ta.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=
|
|
!0;return c};var ua=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);},wa=function(a){return eval("("+a+")")},xa=function(a){this.V=a};xa.prototype.i=function(a){var b=[];ya(this,a,b);return b.join("")};
|
|
var ya=function(a,b,c){switch(typeof b){case "string":za(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(m(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],ya(a,a.V?a.V.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),za(g,
|
|
c),c.push(":"),ya(a,a.V?a.V.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}},Aa={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Ba=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,za=function(a,b){b.push('"',a.replace(Ba,function(a){if(a in Aa)return Aa[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Aa[a]=
|
|
e+b.toString(16)}),'"')};var Ca=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,Ca);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};u(Ca,Error);Ca.prototype.name="CustomError";var Da=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")},Fa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ga=function(a,b){return a<b?-1:a>b?1:0};var Ha=function(a,b){b.unshift(a);Ca.call(this,Da.apply(null,b));b.shift()};u(Ha,Ca);Ha.prototype.name="AssertionError";var Ia=function(a,b,c){if(!a){var d="Assertion failed";if(b)var d=d+(": "+b),e=Array.prototype.slice.call(arguments,2);throw new Ha(""+d,e||[]);}return a},Ja=function(a,b){throw new Ha("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var w=Array.prototype,Ka=w.indexOf?function(a,b,c){Ia(null!=a.length);return w.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=w.forEach?function(a,b,c){Ia(null!=a.length);w.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},Ma=w.map?function(a,b,c){Ia(null!=a.length);return w.map.call(a,b,c)}:
|
|
function(a,b,c){for(var d=a.length,e=Array(d),g=p(a)?a.split(""):a,f=0;f<d;f++)f in g&&(e[f]=b.call(c,g[f],f,a));return e},Oa=function(a){var b;t:{b=Na;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]},Pa=function(a,b){var c=Ka(a,b),d;if(d=0<=c)Ia(null!=a.length),w.splice.call(a,c,1);return d},Qa=function(a){return w.concat.apply(w,arguments)},Ra=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];
|
|
if(da(d)){var e=a.length||0,g=d.length||0;a.length=e+g;for(var f=0;f<g;f++)a[e+f]=d[f]}else a.push(d)}},Sa=function(a,b,c){Ia(null!=a.length);return 2>=arguments.length?w.slice.call(a,b):w.slice.call(a,b,c)};var Ta=function(){this.I=this.I;this.S=this.S};Ta.prototype.I=!1;Ta.prototype.Ua=function(){this.I||(this.I=!0,this.H())};Ta.prototype.H=function(){if(this.S)for(;this.S.length;)this.S.shift()()};var Ua=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.U=!1;this.yb=!0};var x;t:{var Va=k.navigator;if(Va){var Wa=Va.userAgent;if(Wa){x=Wa;break t}}x=""};var Xa=-1!=x.indexOf("Opera")||-1!=x.indexOf("OPR"),y=-1!=x.indexOf("Trident")||-1!=x.indexOf("MSIE"),Ya=-1!=x.indexOf("Gecko")&&-1==x.toLowerCase().indexOf("webkit")&&!(-1!=x.indexOf("Trident")||-1!=x.indexOf("MSIE")),Za=-1!=x.toLowerCase().indexOf("webkit"),$a=function(){var a=k.document;return a?a.documentMode:void 0},ab=function(){var a="",b;if(Xa&&k.opera)return a=k.opera.version,fa(a)?a():a;Ya?b=/rv\:([^\);]+)(\)|;)/:y?b=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:Za&&(b=/WebKit\/(\S+)/);b&&(a=(a=b.exec(x))?
|
|
a[1]:"");return y&&(b=$a(),b>parseFloat(a))?String(b):a}(),bb={},z=function(a){var b;if(!(b=bb[a])){b=0;for(var c=Fa(String(ab)).split("."),d=Fa(String(a)).split("."),e=Math.max(c.length,d.length),g=0;0==b&&g<e;g++){var f=c[g]||"",n=d[g]||"",T=RegExp("(\\d*)(\\D*)","g"),N=RegExp("(\\d*)(\\D*)","g");do{var E=T.exec(f)||["","",""],Ea=N.exec(n)||["","",""];if(0==E[0].length&&0==Ea[0].length)break;b=Ga(0==E[1].length?0:parseInt(E[1],10),0==Ea[1].length?0:parseInt(Ea[1],10))||Ga(0==E[2].length,0==Ea[2].length)||
|
|
Ga(E[2],Ea[2])}while(0==b)}b=bb[a]=0<=b}return b},cb=k.document,db=cb&&y?$a()||("CSS1Compat"==cb.compatMode?parseInt(ab,10):5):void 0;y&&z("9");!Za||z("528");Ya&&z("1.9b")||y&&z("8")||Xa&&z("9.5")||Za&&z("528");Ya&&!z("8")||y&&z("9");var eb="closure_listenable_"+(1E6*Math.random()|0),fb=0;var gb=function(a,b,c,d,e){this.na=a;this.wb=null;this.src=b;this.type=c;this.xa=!!d;this.ia=e;this.key=++fb;this.ra=this.ba=!1},hb=function(a){a.ra=!0;a.na=null;a.wb=null;a.src=null;a.ia=null};var ib=function(a){this.src=a;this.n={};this.ta=0};ib.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.n[g];a||(a=this.n[g]=[],this.ta++);var f;t:{for(f=0;f<a.length;++f){var n=a[f];if(!n.ra&&n.na==b&&n.xa==!!d&&n.ia==e)break t}f=-1}-1<f?(b=a[f],c||(b.ba=!1)):(b=new gb(b,this.src,g,!!d,e),b.ba=c,a.push(b));return b};ib.prototype.xb=function(){var a=0,b;for(b in this.n){for(var c=this.n[b],d=0;d<c.length;d++)++a,hb(c[d]);delete this.n[b];this.ta--}};var jb=function(){Ta.call(this);this.w=new ib(this);this.Ma=this;this.pa=null};u(jb,Ta);jb.prototype[eb]=!0;
|
|
jb.prototype.dispatchEvent=function(a){kb(this);var b,c=this.pa;if(c){b=[];for(var d=1;c;c=c.pa)b.push(c),Ia(1E3>++d,"infinite loop")}c=this.Ma;d=a.type||a;if(p(a))a=new Ua(a,c);else if(a instanceof Ua)a.target=a.target||c;else{var e=a;a=new Ua(d,c);sa(a,e)}var e=!0,g;if(b)for(var f=b.length-1;!a.U&&0<=f;f--)g=a.currentTarget=b[f],e=lb(g,d,!0,a)&&e;a.U||(g=a.currentTarget=c,e=lb(g,d,!0,a)&&e,a.U||(e=lb(g,d,!1,a)&&e));if(b)for(f=0;!a.U&&f<b.length;f++)g=a.currentTarget=b[f],e=lb(g,d,!1,a)&&e;return e};
|
|
jb.prototype.H=function(){jb.o.H.call(this);this.w&&this.w.xb();this.pa=null};jb.prototype.kb=function(a){kb(this);this.w.add("complete",a,!1,void 0,void 0)};jb.prototype.lb=function(a){this.w.add("ready",a,!0,void 0,void 0)};
|
|
var lb=function(a,b,c,d){b=a.w.n[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,g=0;g<b.length;++g){var f=b[g];if(f&&!f.ra&&f.xa==c){var n=f.na,T=f.ia||f.src;if(f.ba){var N=a.w,E=f.type;E in N.n&&Pa(N.n[E],f)&&(hb(f),0==N.n[E].length&&(delete N.n[E],N.ta--))}e=!1!==n.call(T,d)&&e}}return e&&0!=d.yb},kb=function(a){Ia(a.w,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};ta("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));ta("action","cite","data","formaction","href","manifest","poster","src");ta("embed","iframe","link","object","script","style","template");var mb="StopIteration"in k?k.StopIteration:Error("StopIteration"),nb=function(){};nb.prototype.next=function(){throw mb;};nb.prototype.La=function(){return this};var ob=function(a,b){this.u={};this.h=[];this.ua=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 a&&this.Na(a)};ob.prototype.r=function(){pb(this);for(var a=[],b=0;b<this.h.length;b++)a.push(this.u[this.h[b]]);return a};ob.prototype.t=function(){pb(this);return this.h.concat()};ob.prototype.O=function(a){return Object.prototype.hasOwnProperty.call(this.u,a)};
|
|
var pb=function(a){if(a.l!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Object.prototype.hasOwnProperty.call(a.u,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.l!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Object.prototype.hasOwnProperty.call(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}};h=ob.prototype;h.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.u,a)?this.u[a]:b};
|
|
h.set=function(a,b){Object.prototype.hasOwnProperty.call(this.u,a)||(this.l++,this.h.push(a),this.ua++);this.u[a]=b};h.Na=function(a){var b;a instanceof ob?(b=a.t(),a=a.r()):(b=oa(a),a=na(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.t(),d=0;d<c.length;d++){var e=c[d],g=this.get(e);a.call(b,g,e,this)}};h.clone=function(){return new ob(this)};
|
|
h.La=function(a){pb(this);var b=0,c=this.h,d=this.u,e=this.ua,g=this,f=new nb;f.next=function(){for(;;){if(e!=g.ua)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw mb;var f=c[b++];return a?f:d[f]}};return f};var qb=function(a){if("function"==typeof a.r)return a.r();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 na(a)},rb=function(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||p(a))La(a,b,void 0);else{var c;if("function"==typeof a.t)c=a.t();else if("function"!=typeof a.r)if(da(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=oa(a);else c=void 0;for(var d=qb(a),e=d.length,g=0;g<e;g++)b.call(void 0,d[g],c&&c[g],
|
|
a)}};var sb=function(a,b,c,d,e){this.reset(a,b,c,d,e)};sb.prototype.ya=null;var tb=0;sb.prototype.reset=function(a,b,c,d,e){"number"==typeof e||tb++;d||ia();this.M=a;this.ob=b;delete this.ya};sb.prototype.Ga=function(a){this.M=a};var ub=function(a){this.pb=a;this.Aa=this.ca=this.M=this.T=null},vb=function(a,b){this.name=a;this.value=b};vb.prototype.toString=function(){return this.name};var wb=new vb("SEVERE",1E3),xb=new vb("CONFIG",700),yb=new vb("FINE",500);ub.prototype.getParent=function(){return this.T};ub.prototype.bb=function(){this.ca||(this.ca={});return this.ca};ub.prototype.Ga=function(a){this.M=a};var zb=function(a){if(a.M)return a.M;if(a.T)return zb(a.T);Ja("Root logger has no level set.");return null};
|
|
ub.prototype.log=function(a,b,c){if(a.value>=zb(this).value)for(fa(b)&&(b=b()),a=new sb(a,String(b),this.pb),c&&(a.ya=c),c="log:"+a.ob,k.console&&(k.console.timeStamp?k.console.timeStamp(c):k.console.markTimeline&&k.console.markTimeline(c)),k.msWriteProfilerMark&&k.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.Aa)for(var e=0,g=void 0;g=b.Aa[e];e++)g(d);c=c.getParent()}};
|
|
var Ab={},Bb=null,Cb=function(a){Bb||(Bb=new ub(""),Ab[""]=Bb,Bb.Ga(xb));var b;if(!(b=Ab[a])){b=new ub(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Cb(a.substr(0,c));c.bb()[d]=b;b.T=c;Ab[a]=b}return b};var Db=function(a,b){a&&a.log(yb,b,void 0)};[].push(function(){});var Eb=function(a,b,c){if(fa(a))c&&(a=r(a,c));else if(a&&"function"==typeof a.handleEvent)a=r(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:k.setTimeout(a,b||0)};var Fb=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,Hb=function(a){if(Gb){Gb=!1;var b=k.location;if(b){var c=b.href;if(c&&(c=(c=Hb(c)[3]||null)?decodeURI(c):c)&&c!=b.hostname)throw Gb=!0,Error();}}return a.match(Fb)},Gb=Za,Ib=function(a,b){for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),g=null,f=null;0<=e?(g=c[d].substring(0,e),f=c[d].substring(e+1)):g=c[d];b(g,f?decodeURIComponent(f.replace(/\+/g," ")):"")}};var Jb=function(){};Jb.prototype.wa=null;Jb.prototype.K=function(){var a;(a=this.wa)||(a={},Kb(this)&&(a[0]=!0,a[1]=!0),a=this.wa=a);return a};var Lb=function(a,b){this.Bb=a;this.vb=b};u(Lb,Jb);Lb.prototype.da=function(){return this.Bb()};Lb.prototype.K=function(){return this.vb()};var A=function(){return A.za.da()};A.Ka=!1;A.K=function(){return A.za.K()};A.Hb=function(a,b){A.Fa(new Lb(Ia(a),Ia(b)))};A.Fa=function(a){A.za=a};var Mb=function(){};u(Mb,Jb);Mb.prototype.da=function(){var a=Kb(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var Kb=function(a){if(A.Ka)return"";if(!a.Ba&&"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.Ba=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Ba};A.Fa(new Mb);var B=function(a){jb.call(this);this.headers=new ob;this.aa=a||null;this.s=!1;this.$=this.a=null;this.L=this.Ca=this.R="";this.A=this.ja=this.Q=this.fa=!1;this.F=0;this.W=null;this.Ea="";this.Z=this.Ab=!1};u(B,jb);var Nb=B.prototype,Ob=Cb("goog.net.XhrIo");Nb.k=Ob;var Pb=/^https?$/i,Qb=["POST","PUT"],Rb=[],Tb=function(a,b,c,d){var e=Sb,g=new B;Rb.push(g);b&&g.kb(b);g.lb(g.Ra);e&&(g.F=Math.max(0,e));g.send(a,c,d,{"Content-Type":"application/x-www-form-urlencoded"})};
|
|
B.prototype.Ra=function(){this.Ua();Pa(Rb,this)};
|
|
B.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.R+"; newUri="+a);b=b?b.toUpperCase():"GET";this.R=a;this.L="";this.Ca=b;this.fa=!1;this.s=!0;this.a=this.aa?this.aa.da():A();this.$=this.aa?this.aa.K():A.K();this.a.onreadystatechange=r(this.Da,this);try{Db(this.k,Ub(this,"Opening Xhr")),this.ja=!0,this.a.open(b,String(a),!0),this.ja=!1}catch(e){Db(this.k,Ub(this,"Error opening Xhr: "+e.message));Vb(this,e);return}a=c||"";var g=
|
|
this.headers.clone();d&&rb(d,function(a,b){g.set(b,a)});d=Oa(g.t());c=k.FormData&&a instanceof k.FormData;!(0<=Ka(Qb,b))||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");g.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.Ea&&(this.a.responseType=this.Ea);"withCredentials"in this.a&&(this.a.withCredentials=this.Ab);try{Wb(this),0<this.F&&(this.Z=Xb(this.a),Db(this.k,Ub(this,"Will abort after "+this.F+"ms if incomplete, xhr2 "+this.Z)),this.Z?(this.a.timeout=
|
|
this.F,this.a.ontimeout=r(this.Ha,this)):this.W=Eb(this.Ha,this.F,this)),Db(this.k,Ub(this,"Sending request")),this.Q=!0,this.a.send(a),this.Q=!1}catch(f){Db(this.k,Ub(this,"Send error: "+f.message)),Vb(this,f)}};var Xb=function(a){return y&&z(9)&&ea(a.timeout)&&l(a.ontimeout)},Na=function(a){return"content-type"==a.toLowerCase()};B.prototype.Ha=function(){"undefined"!=typeof aa&&this.a&&(this.L="Timed out after "+this.F+"ms, aborting",Db(this.k,Ub(this,this.L)),this.dispatchEvent("timeout"),this.abort(8))};
|
|
var Vb=function(a,b){a.s=!1;a.a&&(a.A=!0,a.a.abort(),a.A=!1);a.L=b;Yb(a);Zb(a)},Yb=function(a){a.fa||(a.fa=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};B.prototype.abort=function(){this.a&&this.s&&(Db(this.k,Ub(this,"Aborting")),this.s=!1,this.A=!0,this.a.abort(),this.A=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Zb(this))};B.prototype.H=function(){this.a&&(this.s&&(this.s=!1,this.A=!0,this.a.abort(),this.A=!1),Zb(this,!0));B.o.H.call(this)};
|
|
B.prototype.Da=function(){this.I||(this.ja||this.Q||this.A?$b(this):this.ub())};B.prototype.ub=function(){$b(this)};
|
|
var $b=function(a){if(a.s&&"undefined"!=typeof aa)if(a.$[1]&&4==ac(a)&&2==a.getStatus())Db(a.k,Ub(a,"Local request error detected and ignored"));else if(a.Q&&4==ac(a))Eb(a.Da,0,a);else if(a.dispatchEvent("readystatechange"),4==ac(a)){Db(a.k,Ub(a,"Request complete"));a.s=!1;try{var b=a.getStatus(),c;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break t;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var g=Hb(String(a.R))[1]||null;if(!g&&self.location)var f=self.location.protocol,
|
|
g=f.substr(0,f.length-1);e=!Pb.test(g?g.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var n;try{n=2<ac(a)?a.a.statusText:""}catch(T){Db(a.k,"Can not get status: "+T.message),n=""}a.L=n+" ["+a.getStatus()+"]";Yb(a)}}finally{Zb(a)}}},Zb=function(a,b){if(a.a){Wb(a);var c=a.a,d=a.$[0]?ba:null;a.a=null;a.$=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.k)&&c.log(wb,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},
|
|
Wb=function(a){a.a&&a.Z&&(a.a.ontimeout=null);ea(a.W)&&(k.clearTimeout(a.W),a.W=null)},ac=function(a){return a.a?a.a.readyState:0};B.prototype.getStatus=function(){try{return 2<ac(this)?this.a.status:-1}catch(a){return-1}};var Ub=function(a,b){return b+" ["+a.Ca+" "+a.R+" "+a.getStatus()+"]"};var bc=function(a,b,c){this.q=a||null;this.gb=!!c},cc=function(a){a.g||(a.g=new ob,a.l=0,a.q&&Ib(a.q,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=bc.prototype;h.g=null;h.l=null;h.add=function(a,b){cc(this);this.q=null;a=dc(this,a);var c=this.g.get(a);c||this.g.set(a,c=[]);c.push(b);this.l++;return this};h.O=function(a){cc(this);a=dc(this,a);return this.g.O(a)};
|
|
h.t=function(){cc(this);for(var a=this.g.r(),b=this.g.t(),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};h.r=function(a){cc(this);var b=[];if(p(a))this.O(a)&&(b=Qa(b,this.g.get(dc(this,a))));else{a=this.g.r();for(var c=0;c<a.length;c++)b=Qa(b,a[c])}return b};h.set=function(a,b){cc(this);this.q=null;a=dc(this,a);this.O(a)&&(this.l-=this.g.get(a).length);this.g.set(a,[b]);this.l++;return this};
|
|
h.get=function(a,b){var c=a?this.r(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.q)return this.q;if(!this.g)return"";for(var a=[],b=this.g.t(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.r(d),g=0;g<d.length;g++){var f=e;""!==d[g]&&(f+="="+encodeURIComponent(String(d[g])));a.push(f)}return this.q=a.join("&")};h.clone=function(){var a=new bc;a.q=this.q;this.g&&(a.g=this.g.clone(),a.l=this.l);return a};
|
|
var dc=function(a,b){var c=String(b);a.gb&&(c=c.toLowerCase());return c};var ec=null,fc=null,gc=null,hc=!1,Sb=0,ic={Cb:"CANCEL",Fb:"UPDATE"},jc=function(a,b,c){null!=a?ec=a:hc||(ec="/api");null!=b?fc=b:hc||(fc="https://earthengine.googleapis.com");l(c)&&(gc=c);hc=!0};t("ee.data.setDeadline",function(a){Sb=a});t("ee.data.getApiBaseUrl",function(){return ec});t("ee.data.getTileBaseUrl",function(){return fc});t("ee.data.getXsrfToken",function(){return gc});
|
|
t("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 C("/info",(new bc).add("id",a),b)});t("ee.data.getList",function(a,b){var c=D(a);return C("/list",c,b)});var kc=function(a,b){a=v(a);return C("/mapid",D(a),b)};t("ee.data.getMapId",kc);t("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[fc,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});
|
|
var lc=function(a,b){a=v(a);return C("/value",D(a),b)};t("ee.data.getValue",lc);var mc=function(a,b){a=v(a);m(a.size)&&(a.size=a.size.join("x"));var c=D(a).add("getid","1");return C("/thumb",c,b)};t("ee.data.getThumbId",mc);var nc=function(a){return fc+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};t("ee.data.makeThumbUrl",nc);var oc=function(a,b){a=v(a);return C("/download",D(a),b)};t("ee.data.getDownloadId",oc);var pc=function(a){return fc+"/api/download?docid="+a.docid+"&token="+a.token};
|
|
t("ee.data.makeDownloadUrl",pc);var qc=function(a,b){a=v(a);return C("/table",D(a),b)};t("ee.data.getTableDownloadId",qc);var rc=function(a){return fc+"/api/table?docid="+a.docid+"&token="+a.token};t("ee.data.makeTableDownloadUrl",rc);t("ee.data.createAsset",function(a,b,c,d){a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return C("/create",D(a),d)});t("ee.data.createFolder",function(a,b,c){return C("/createfolder",D({id:a,force:b||!1}),c)});
|
|
t("ee.data.newTaskId",function(a,b){var c={};ea(a)&&(c.count=a);return C("/newtaskid",D(c),b)});t("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!m(a))throw Error("Invalid task_id: expected a string or an array of strings.");return C("/taskstatus?q="+a.join(),null,b,"GET")});t("ee.data.getTaskList",function(a){return C("/tasklist",null,a,"GET")});t("ee.data.cancelTask",function(a,b){return sc(a,"CANCEL",b)});
|
|
var sc=function(a,b,c){if(p(a))a=[a];else if(!m(a))throw Error("Invalid task_id: expected a string or an array of strings.");var d;t:{for(d in ic)if(ic[d]==b){d=!0;break t}d=!1}if(!d)throw Error("Invalid action: "+b);return C("/updatetask",D({id:a,action:b}),c,"POST")};t("ee.data.updateTask",sc);t("ee.data.prepareValue",function(a,b,c){b=v(b);b.tid=a;return C("/prepare",D(b),c)});t("ee.data.startProcessing",function(a,b,c){b=v(b);b.id=a;return C("/processingrequest",D(b),c)});
|
|
var C=function(a,b,c,d){function e(a,b,c){var d=!0,e,g;try{e=wa(b),g=e.data}catch(se){d=!1}var va=void 0;d&&q(e)?"error"in e&&"message"in e.error?va=e.error.message:"data"in e||(va="Malformed response: "+b):300<=a.status&&(va="HTTP "+a.status+": "+(b||a.statusText));if(c)return c(g,va),null;if(!va)return g;throw Error(va);}jc();d=d||"POST";null!=gc&&("GET"==d?(a+=-1!=a.indexOf("?")?"&":"?",a+="xsrfToken="+gc):(b||(b=new bc),b.add("xsrfToken",gc)));a=ec+a;b=b?b.toString():"";if(c)return Tb(a,function(a){var b;
|
|
var d=a.target;try{b=d.a?d.a.responseText:""}catch(g){Db(d.k,"Can not get responseText: "+g.message),b=""}return e(a.target,b,c)},d,b),null;var g=A();g.open(d,a,!1);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.send(b);return e(g,g.responseText,null)},D=function(a){var b=new bc,c;for(c in a)b.set(c,a[c]);return b};var tc=function(){};var uc=function(){this.p=-1};var vc=function(){this.p=-1;this.p=64;this.f=Array(4);this.Pa=Array(this.p);this.X=this.G=0;this.reset()};u(vc,uc);vc.prototype.reset=function(){this.f[0]=1732584193;this.f[1]=4023233417;this.f[2]=2562383102;this.f[3]=271733878;this.X=this.G=0};
|
|
var wc=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.f[0];c=a.f[1];var e=a.f[2],g=a.f[3],f=0,f=b+(g^c&(e^g))+d[0]+3614090360&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[1]+3905402710&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[2]+606105819&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&
|
|
(g^b))+d[3]+3250441966&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[4]+4118548399&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[5]+1200080426&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[6]+2821735955&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[7]+4249261313&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[8]+1770035416&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[9]+2336552879&4294967295;g=b+(f<<12&4294967295|f>>>20);f=
|
|
e+(c^g&(b^c))+d[10]+4294925233&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[11]+2304563134&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[12]+1804603682&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[13]+4254626195&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[14]+2792965006&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[15]+1236535329&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(e^g&(c^e))+d[1]+4129170786&4294967295;b=c+(f<<5&4294967295|
|
|
f>>>27);f=g+(c^e&(b^c))+d[6]+3225465664&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[11]+643717713&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[0]+3921069994&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(e^g&(c^e))+d[5]+3593408605&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[10]+38016083&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[15]+3634488961&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[4]+3889429448&4294967295;c=e+(f<<20&4294967295|
|
|
f>>>12);f=b+(e^g&(c^e))+d[9]+568446438&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[14]+3275163606&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[3]+4107603335&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[8]+1163531501&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(e^g&(c^e))+d[13]+2850285829&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[2]+4243563512&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[7]+1735328473&4294967295;e=g+(f<<14&4294967295|
|
|
f>>>18);f=c+(g^b&(e^g))+d[12]+2368359562&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(c^e^g)+d[5]+4294588738&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[8]+2272392833&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[11]+1839030562&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[14]+4259657740&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[1]+2763975236&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[4]+1272893353&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^
|
|
b^c)+d[7]+4139469664&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[10]+3200236656&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[13]+681279174&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[0]+3936430074&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[3]+3572445317&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[6]+76029189&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[9]+3654602809&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[12]+3873151461&4294967295;
|
|
g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[15]+530742520&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[2]+3299628645&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(e^(c|~g))+d[0]+4096336452&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[7]+1126891415&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[14]+2878612391&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[5]+4237533241&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[12]+1700485571&4294967295;b=c+
|
|
(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[3]+2399980690&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[10]+4293915773&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[1]+2240044497&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[8]+1873313359&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[15]+4264355552&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[6]+2734768916&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[13]+1309151649&4294967295;
|
|
c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[4]+4149444226&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[11]+3174756917&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[2]+718787259&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[9]+3951481745&4294967295;a.f[0]=a.f[0]+b&4294967295;a.f[1]=a.f[1]+(e+(f<<21&4294967295|f>>>11))&4294967295;a.f[2]=a.f[2]+e&4294967295;a.f[3]=a.f[3]+g&4294967295};
|
|
vc.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-this.p,d=this.Pa,e=this.G,g=0;g<b;){if(0==e)for(;g<=c;)wc(this,a,g),g+=this.p;if(p(a))for(;g<b;){if(d[e++]=a.charCodeAt(g++),e==this.p){wc(this,d);e=0;break}}else for(;g<b;)if(d[e++]=a[g++],e==this.p){wc(this,d);e=0;break}}this.G=e;this.X+=b};
|
|
var yc=function(){var a=xc,b=Array((56>a.G?a.p:2*a.p)-a.G);b[0]=128;for(var c=1;c<b.length-8;++c)b[c]=0;for(var d=8*a.X,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.f[c]>>>e&255;return b};var zc=function(a){this.N="__ee_hash__";this.la=!1!==a;this.C=[];this.B={};this.va=[]};t("ee.Serializer",zc);var Ac=new xa,xc=new vc,Cc=function(a,b){return Bc(new zc(l(b)?b:!0),a)};t("ee.Serializer.encode",Cc);var Dc=function(a){return Ac.i(Cc(a))};t("ee.Serializer.toJSON",Dc);var Ec=function(a){a=Bc(new zc(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Ac.i(a)};t("ee.Serializer.toReadableJSON",Ec);
|
|
var Bc=function(a,b){var c=a.P(b);a.la&&(c=q(c)&&"ValueRef"==c.type&&1==a.C.length?a.C[0][1]:{type:"CompoundValue",scope:a.C,value:c},a.C=[],La(a.va,r(function(a){delete a[this.N]},a)),a.va=[],a.B={});return c};
|
|
zc.prototype.P=function(a){if(!l(a))throw Error("Can't encode an undefined value.");var b,c=q(a)?a[this.N]:null;if(this.la&&null!=c&&this.B[c])return{type:"ValueRef",value:this.B[c]};if(null===a||"boolean"==typeof a||ea(a)||p(a))return a;if(q(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof tc){if(b=a.e(r(this.P,this)),!(m(b)||q(b)&&"ArgumentRef"!=b.type))return b}else if(m(a))b=Ma(a,function(a){return this.P(a)},
|
|
this);else if(q(a)&&!fa(a))b=ma(a,function(a){if(!fa(a))return this.P(a)},this),pa(b,this.N),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.la){xc.reset();xc.update(Ac.i(b));var c=yc().toString(),d;this.B[c]?d=this.B[c]:(d=String(this.C.length),this.C.push([d,b]),this.B[c]=d);a[this.N]=c;this.va.push(a);return{type:"ValueRef",value:d}}return b};var F=function(a,b,c){if(!(this instanceof F))return G(F,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.c=b;this.d=c||null};u(F,tc);t("ee.ComputedObject",F);F.prototype.j=function(a){return lc({json:this.i()},a)};t("ee.ComputedObject.prototype.getInfo",F.prototype.j);
|
|
F.prototype.e=function(a){if(null===this.b&&null===this.c)return{type:"ArgumentRef",value:this.d};var b={},c;for(c in this.c)l(this.c[c])&&(b[c]=a(this.c[c]));b={type:"Invocation",arguments:b};a=a(this.b);b[p(a)?"functionName":"function"]=a;return b};F.prototype.i=function(){return Dc(this)};t("ee.ComputedObject.prototype.serialize",F.prototype.i);F.prototype.toString=function(){return"ee."+this.name()+"("+Ec(this)+")"};t("ee.ComputedObject.prototype.toString",F.prototype.toString);
|
|
F.prototype.name=function(){return"ComputedObject"};var Fc=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.c=b.c;c.d=b.d;return c},G=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var H=function(){if(!(this instanceof H))return new H};u(H,tc);t("ee.Function",H);var Gc=function(a){return a};H.prototype.call=function(a){return this.apply(Hc(this,Array.prototype.slice.call(arguments,0)))};t("ee.Function.prototype.call",H.prototype.call);H.prototype.apply=function(a){a=new F(this,Ic(this,a));return Gc(a,this.m().returns)};t("ee.Function.prototype.apply",H.prototype.apply);
|
|
var Ic=function(a,b){for(var c=a.m().args,d={},e={},g=0;g<c.length;g++){var f=c[g].name;if(f in b&&l(b[f]))d[f]=Gc(b[f],c[g].type);else if(!c[g].optional)throw Error("Required argument ("+f+") missing to function: "+a);e[f]=!0}var c=[],n;for(n in b)e[n]||c.push(n);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},Hc=function(a,b){var c=a.m().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};
|
|
H.prototype.toString=function(a,b){var c=this.m(),d=[];d.push(a||c.name);d.push("(");d.push(Ma(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 g=c.args[e];d.push(g.name);d.push(" (");d.push(g.type);g.optional&&d.push(", optional");d.push("): ");g.description?d.push(g.description):
|
|
d.push("Undocumented.")}}return d.join("")};H.prototype.i=function(){return Dc(this)};var Jc={},Kc=function(a){return a.prototype instanceof F?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Lc=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}},Mc=function(a){return ea(a)||
|
|
a instanceof F&&"Number"==a.name()},Nc=function(a){return p(a)||a instanceof F&&"String"==a.name()},Oc=function(a){return q(a)&&!fa(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var I=function(a,b){if(!l(b))return Pc(a);if(!(this instanceof I))return G(I,arguments);this.D=qa(b);this.D.name=a};u(I,H);t("ee.ApiFunction",I);var J=function(a,b){return H.prototype.call.apply(Pc(a),Array.prototype.slice.call(arguments,1))};t("ee.ApiFunction._call",J);var Qc=function(a,b){return Pc(a).apply(b)};t("ee.ApiFunction._apply",Qc);I.prototype.e=function(){return this.D.name};I.prototype.m=function(){return this.D};
|
|
var ka=null,Rc={},Tc=function(){Sc();return ma(ka,function(a){return a.m()})},Uc=function(){Sc();return la(function(a,b){return!Rc[b]})},Pc=function(a){var b=Vc(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};t("ee.ApiFunction.lookup",Pc);
|
|
var Vc=function(a){Sc();return ka[a]||null},Sc=function(a,b){if(ka)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(ka=ma(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 I(b,a)}),a&&a())};a?C("/algorithms",null,c,"GET"):c(C("/algorithms",null,void 0,"GET"))}},K=function(a,b,c,d){Sc();var e=d||"";ja(ka,function(d,f){var n=f.split(".");if(2==n.length&&n[0]==b){var T=e+n[1],N=d.m();Rc[f]=!0;var E=!1;N.args.length&&
|
|
(n=N.args[0].type,E="Object"!=n&&Lc(n,c));n=E?a.prototype:a;T in n||(n[T]=function(a){var b=Array.prototype.slice.call(arguments,0),c=!1;if(1==b.length&&Oc(b[0])){var e=N.args;E&&(e=e.slice(1));e.length&&(c=!((1==e.length||e[1].optional)&&"Dictionary"==e[0].type))}if(c){if(b=v(b[0]),E){c=N.args[0].name;if(c in b)throw Error("Named args for "+T+" can't contain keyword "+c);b[c]=this}}else b=Hc(d,E?[this].concat(b):b);return d.apply(b)},n[T].toString=r(d.toString,d,T,E),n[T].signature=N)}})},L=function(a){var b=
|
|
function(a){for(var b in a)fa(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var M=function(a,b,c){F.call(this,a,b,c);Wc()};u(M,F);t("ee.Element",M);var Xc=!1,Wc=function(){Xc||(K(M,"Element","Element"),Xc=!0)};M.prototype.name=function(){return"Element"};
|
|
M.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=Oc(c))t:{b=oa(c);var d=["properties"];if(da(b)&&da(d)&&b.length==d.length){for(var e=b.length,g=0;g<e;g++)if(b[g]!==d[g]){b=!1;break t}b=!0}else b=!1}b&&q(c.properties)&&(c=c.properties);if(Oc(c)){b=this;for(var f in c)d=c[f],b=J("Element.set",b,f,d)}else if(c instanceof F&&Vc("Element.setMulti"))b=J("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)f=arguments[c],d=arguments[c+1],b=J("Element.set",b,f,d)}return Fc(this,b)};t("ee.Element.prototype.set",M.prototype.set);var O=function(a){if(!(this instanceof O))return G(O,arguments);if(a instanceof O)return a;Yc();if(m(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new O(a[0]);F.call(this,new I("Filter.and"),{filters:a});this.J=a}else if(a instanceof F)F.call(this,a.b,a.c,a.d),this.J=[a];else{if(l(a))throw Error("Invalid argument specified for ee.Filter(): "+a);F.call(this,null,null);this.J=[]}};u(O,F);t("ee.Filter",O);
|
|
var Zc=!1,Yc=function(){Zc||(K(O,"Filter","Filter"),Zc=!0)},$c={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};O.prototype.length=function(){return this.J.length};O.prototype.length=O.prototype.length;var P=function(a,b){var c=a.J.slice(0);b instanceof O?Ra(c,b.J):b instanceof Array?Ra(c,b):c.push(b);return new O(c)};O.prototype.v=function(){return J("Filter.not",this)};O.prototype.not=O.prototype.v;
|
|
var ad=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in $c))throw Error("Unknown filtering operator: "+b);a=J("Filter."+$c[b],a,c);return d?a.v():a};O.metadata=ad;var bd=function(a,b){return J("Filter.equals",a,b)};O.eq=bd;var cd=function(a,b){return bd(a,b).v()};O.neq=cd;var dd=function(a,b){return J("Filter.lessThan",a,b)};O.lt=dd;var ed=function(a,b){return dd(a,b).v()};O.gte=ed;var fd=function(a,b){return J("Filter.greaterThan",a,b)};
|
|
O.gt=fd;var gd=function(a,b){return fd(a,b).v()};O.lte=gd;var hd=function(a,b){return J("Filter.stringContains",a,b)};O.contains=hd;var id=function(a,b){return hd(a,b).v()};O.not_contains=id;var jd=function(a,b){return J("Filter.stringStartsWith",a,b)};O.starts_with=jd;var kd=function(a,b){return jd(a,b).v()};O.not_starts_with=kd;var ld=function(a,b){return J("Filter.stringEndsWith",a,b)};O.ends_with=ld;var md=function(a,b){return ld(a,b).v()};O.not_ends_with=md;
|
|
var nd=function(a){return J("Filter.and",Array.prototype.slice.call(arguments))};O.and=nd;O.or=function(a){return J("Filter.or",Array.prototype.slice.call(arguments))};var od=function(a,b){var c=J("DateRange",a,b);return Qc("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};O.date=od;var pd=function(a,b,c,d){return Qc("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};O.inList=pd;
|
|
var qd=function(a,b){return Qc("Filter.intersects",{leftField:".all",rightValue:J("Feature",a),maxError:b})};O.bounds=qd;O.prototype.Wa=function(){return P(this,bd.apply(null,[].slice.call(arguments)))};O.prototype.eq=O.prototype.Wa;O.prototype.qb=function(){return P(this,cd.apply(null,[].slice.call(arguments)))};O.prototype.neq=O.prototype.qb;O.prototype.mb=function(){return P(this,dd.apply(null,[].slice.call(arguments)))};O.prototype.lt=O.prototype.mb;
|
|
O.prototype.fb=function(){return P(this,ed.apply(null,[].slice.call(arguments)))};O.prototype.gte=O.prototype.fb;O.prototype.eb=function(){return P(this,fd.apply(null,[].slice.call(arguments)))};O.prototype.gt=O.prototype.eb;O.prototype.nb=function(){return P(this,gd.apply(null,[].slice.call(arguments)))};O.prototype.lte=O.prototype.nb;O.prototype.contains=function(){return P(this,hd.apply(null,[].slice.call(arguments)))};O.prototype.contains=O.prototype.contains;
|
|
O.prototype.rb=function(){return P(this,id.apply(null,[].slice.call(arguments)))};O.prototype.not_contains=O.prototype.rb;O.prototype.zb=function(){return P(this,jd.apply(null,[].slice.call(arguments)))};O.prototype.starts_with=O.prototype.zb;O.prototype.tb=function(){return P(this,kd.apply(null,[].slice.call(arguments)))};O.prototype.not_starts_with=O.prototype.tb;O.prototype.Va=function(){return P(this,ld.apply(null,[].slice.call(arguments)))};O.prototype.ends_with=O.prototype.Va;
|
|
O.prototype.sb=function(){return P(this,md.apply(null,[].slice.call(arguments)))};O.prototype.not_ends_with=O.prototype.sb;O.prototype.Oa=function(){return P(this,nd.apply(null,[].slice.call(arguments)))};O.prototype.and=O.prototype.Oa;O.prototype.Ta=function(){return P(this,od.apply(null,[].slice.call(arguments)))};O.prototype.date=O.prototype.Ta;O.prototype.hb=function(){return P(this,pd.apply(null,[].slice.call(arguments)))};O.prototype.inList=O.prototype.hb;
|
|
O.prototype.bounds=function(){return P(this,qd.apply(null,[].slice.call(arguments)))};O.prototype.bounds=O.prototype.bounds;O.prototype.name=function(){return"Filter"};var Q=function(a,b,c){M.call(this,a,b,c);rd()};u(Q,M);t("ee.Collection",Q);var sd=!1,rd=function(){sd||(K(Q,"Collection","Collection"),K(Q,"AggregateFeatureCollection","Collection","aggregate_"),sd=!0)};Q.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Fc(this,J("Collection.filter",this,a))};t("ee.Collection.prototype.filter",Q.prototype.filter);Q.prototype.$a=function(a,b,c){return this.filter(ad(a,b,c))};t("ee.Collection.prototype.filterMetadata",Q.prototype.$a);
|
|
Q.prototype.Ya=function(a){return this.filter(qd(a))};t("ee.Collection.prototype.filterBounds",Q.prototype.Ya);Q.prototype.Za=function(a,b){return this.filter(od(a,b))};t("ee.Collection.prototype.filterDate",Q.prototype.Za);Q.prototype.limit=function(a,b,c){return Fc(this,J("Collection.limit",this,a,b,c))};t("ee.Collection.prototype.limit",Q.prototype.limit);Q.prototype.sort=function(a,b){return Fc(this,J("Collection.limit",this,void 0,a,b))};t("ee.Collection.prototype.sort",Q.prototype.sort);
|
|
Q.prototype.name=function(){return"Collection"};Q.prototype.elementType=function(){return M};Q.prototype.map=function(a){var b=this.elementType();return Fc(this,J("Collection.map",this,function(c){return a(new b(c))}))};t("ee.Collection.prototype.map",Q.prototype.map);Q.prototype.jb=function(a,b){var c=l(b)?b:null,d=this.elementType();return J("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};t("ee.Collection.prototype.iterate",Q.prototype.jb);var R=function(a){if(!(this instanceof R))return G(R,arguments);if(a instanceof R)return a;td();if(ea(a))F.call(this,null,null),this.oa=a;else if(a instanceof F)F.call(this,a.b,a.c,a.d),this.oa=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};u(R,F);t("ee.Number",R);var ud=!1,td=function(){ud||(K(R,"Number","Number"),ud=!0)};R.prototype.e=function(a){return ea(this.oa)?this.oa:R.o.e.call(this,a)};R.prototype.name=function(){return"Number"};var S=function(a){if(!(this instanceof S))return G(S,arguments);if(a instanceof S)return a;vd();if(p(a))F.call(this,null,null),this.sa=a;else if(a instanceof F)this.sa=null,a.b&&"String"==a.b.m().returns?F.call(this,a.b,a.c,a.d):F.call(this,new I("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};u(S,F);t("ee.String",S);var wd=!1,vd=function(){wd||(K(S,"String","String"),wd=!0)};S.prototype.e=function(a){return p(this.sa)?this.sa:S.o.e.call(this,a)};
|
|
S.prototype.name=function(){return"String"};var xd=function(a,b){if(!(this instanceof xd))return G(xd,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var g=d[e],f=g.type;c.push(yd(f in Jc?Jc[f]:null,g.name))}if(!l(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.D=zd(a,c,b);this.Qa=b.apply(null,c)};u(xd,H);t("ee.CustomFunction",xd);xd.prototype.e=function(a){return{type:"Function",argumentNames:Ma(this.D.args,function(a){return a.name}),body:a(this.Qa)}};xd.prototype.m=function(){return this.D};
|
|
var yd=function(a,b){a=a||Object;if(!(a.prototype instanceof F))if(a&&a!=Object)if(a==String)a=S;else if(a==Number)a=R;else if(a==Array)a=k.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=F;var c=function(){};c.prototype=a.prototype;c=new c;c.b=null;c.c=null;c.d=b;return c},Ad=function(a,b){var c=Ma(b,function(a){return{name:null,type:p(a)?a:Kc(a)}}),c={name:"",returns:p("Object")?"Object":Kc("Object"),args:c};return new xd(c,a)},zd=function(a,b,c){for(var d=
|
|
[],e=0;e<b.length;e++)null===b[e].d&&d.push(e);if(0==d.length)return a;var g=function(a){var b=0;q(a)&&!fa(a)&&("Function"==a.type&&b++,ja(a,function(a){b+=g(a)}));return b},e=Cc(c.apply(null,b));c="_MAPPING_VAR_"+g(e)+"_";for(e=0;e<d.length;e++){var f=d[e],n=c+e;b[f].d=n;a.args[f].name=n}return a};var Bd=function(a,b){if(!(this instanceof Bd))return G(Bd,arguments);if(a instanceof Bd)return a;Cd();var c=new I("Date"),d={},e=null;if(Nc(a)){if(d.value=a,b)if(Nc(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(Mc(a))d.value=a;else if(q(a)&&"function"==typeof a.getFullYear)d.value=Math.floor(a.getTime());else if(a instanceof F)a.b&&"Date"==a.b.m().returns?(c=a.b,d=a.c,e=a.d):d.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);F.call(this,c,d,e)};u(Bd,F);t("ee.Date",Bd);var Dd=!1,Cd=function(){Dd||(K(Bd,"Date","Date"),Dd=!0)};Bd.prototype.name=function(){return"Date"};var U=function(a,b,c){if(!(this instanceof U))return G(U,arguments);Ed();var d=null!=b||null!=c;if(a instanceof F&&!(a instanceof U&&a.Y)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");F.call(this,a.b,a.c,a.d)}else{a instanceof U&&(a=a.e());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));F.call(this,
|
|
null,null);this.Y=a.type;this.Sa=a.coordinates||null;this.ab=a.geometries||null;if(null!=b)this.qa=b;else if("crs"in a)if(q(a.crs)&&"name"==a.crs.type&&q(a.crs.properties)&&p(a.crs.properties.name))this.qa=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new xa).i(a.crs));this.ga=c;!l(c)&&"geodesic"in a&&(this.ga=Boolean(a.geodesic))}};u(U,F);t("ee.Geometry",U);
|
|
var Gd=!1,Ed=function(){Gd||(K(U,"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&&m(arguments[0])&&2==arguments[0].length){var c=arguments[0];a=c[0];b=c[1]}U.call(this,{type:"Point",coordinates:[a,b]})};u(Hd,U);U.Point=Hd;
|
|
var Jd=function(a){if(!(this instanceof Jd))return Id(Jd,arguments);U.call(this,{type:"MultiPoint",coordinates:Kd(a,2,arguments)})};u(Jd,U);U.MultiPoint=Jd;var Ld=function(a,b,c,d){if(!(this instanceof Ld))return G(Ld,arguments);if(4<arguments.length)throw Error("The Geometry.Rectangle constructor takes at most 4 arguments ("+arguments.length+" given)");if(m(a)){var e=a;a=e[0];b=e[1];c=e[2];d=e[3]}U.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};u(Ld,U);U.Rectangle=Ld;
|
|
var Md=function(a){if(!(this instanceof Md))return Id(Md,arguments);U.call(this,{type:"LineString",coordinates:Kd(a,2,arguments)})};u(Md,U);U.LineString=Md;var Nd=function(a){if(!(this instanceof Nd))return Id(Nd,arguments);U.call(this,{type:"LinearRing",coordinates:Kd(a,2,arguments)})};u(Nd,U);U.LinearRing=Nd;var Od=function(a){if(!(this instanceof Od))return Id(Od,arguments);U.call(this,{type:"MultiLineString",coordinates:Kd(a,3,arguments)})};u(Od,U);U.MultiLineString=Od;
|
|
var Pd=function(a){if(!(this instanceof Pd))return Id(Pd,arguments);U.call(this,{type:"Polygon",coordinates:Kd(a,3,arguments)})};u(Pd,U);U.Polygon=Pd;var Qd=function(a){if(!(this instanceof Qd))return Id(Qd,arguments);U.call(this,{type:"MultiPolygon",coordinates:Kd(a,4,arguments)})};u(Qd,U);U.MultiPolygon=Qd;
|
|
U.prototype.e=function(a){if(!this.Y){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return F.prototype.e.call(this,a)}a={type:this.Y};"GeometryCollection"==this.Y?a.geometries=this.ab:a.coordinates=this.Sa;null!=this.qa&&(a.crs={type:"name",properties:{name:this.qa}});null!=this.ga&&(a.geodesic=this.ga);return a};U.prototype.Ia=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.e()};
|
|
U.prototype.toGeoJSON=U.prototype.Ia;U.prototype.Ja=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new xa).i(this.Ia())};U.prototype.toGeoJSONString=U.prototype.Ja;U.prototype.i=function(){return Dc(this)};U.prototype.serialize=U.prototype.i;U.prototype.toString=function(){return"ee.Geometry("+this.Ja()+")"};
|
|
var Fd=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!m(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(!m(a))return-1;if(m(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(!ea(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(!m(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;m(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};U.prototype.name=function(){return"Geometry"};t("ee.Deserializer",function(){});t("ee.Deserializer.fromJSON",function(a){return Sd(ua(a))});var Sd=function(a){var b={};if(q(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],g=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=Td(g,b)}a=a.value}return Td(a,b)};t("ee.Deserializer.decode",Sd);
|
|
var Td=function(a,b){if(null===a||ea(a)||"boolean"==typeof a||p(a))return a;if(m(a))return Ma(a,function(a){return Td(a,b)});if(!q(a)||fa(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 yd(Object,c);case "Date":c=a.value;if(!ea(c))throw Error("Invalid date value: "+c);return new Bd(c/1E3);case "Bytes":return c=
|
|
new tc,c.e=function(){return a},c;case "Invocation":var c="functionName"in a?Pc(a.functionName):Td(a["function"],b),d=ma(a.arguments,function(a){return Td(a,b)});if(c instanceof H)return c.apply(d);if(c instanceof F)return new F(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return ma(a.value,function(a){return Td(a,b)});case "Function":var e=Td(a.body,b),c={name:"",args:Ma(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new xd(c,
|
|
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new U(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var Ud=function(a){if(!(this instanceof Ud))return G(Ud,arguments);if(a instanceof Ud)return a;Vd();if(Oc(a))F.call(this,null,null),this.ea=a;else if(a instanceof F)F.call(this,a.b,a.c,a.d),this.ea=null;else throw Error("Invalid argument specified for ee.Dictionary(): "+a);};u(Ud,F);t("ee.Dictionary",Ud);var Wd=!1,Vd=function(){Wd||(K(Ud,"Dictionary","Dictionary"),Wd=!0)};Ud.prototype.e=function(a){return null===this.ea?Ud.o.e.call(this,a):a(this.ea)};Ud.prototype.name=function(){return"Dictionary"};var V=function(a,b){if(!(this instanceof V))return G(V,arguments);if(a instanceof V){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)");Xd();if(a instanceof U||null===a)M.call(this,new I("Feature"),{geometry:a,metadata:b||null});else if(a instanceof F)M.call(this,a.b,a.c,a.d);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=v(c);c["system:index"]=a.id}M.call(this,new I("Feature"),{geometry:new U(a.geometry),metadata:c})}else M.call(this,new I("Feature"),{geometry:new U(a),metadata:b||null})};u(V,M);t("ee.Feature",V);var Yd=!1,Xd=function(){Yd||(K(V,"Feature","Feature"),Yd=!0)};V.prototype.j=function(a){return V.o.j.call(this,a)};V.prototype.getInfo=V.prototype.j;V.prototype.getMap=function(a,b){return J("Collection",[this]).getMap(a,b)};
|
|
V.prototype.getMap=V.prototype.getMap;V.Point=function(a,b){return Hd.apply(null,arguments)};V.MultiPoint=function(a){return Jd.apply(null,arguments)};V.Rectangle=function(a,b,c,d){return new Ld(a,b,c,d)};V.LineString=function(a){return Md.apply(null,arguments)};V.LinearRing=function(a){return Nd.apply(null,arguments)};V.MultiLine=function(a){return Od.apply(null,arguments)};V.Polygon=function(a){return Pd.apply(null,arguments)};V.MultiPolygon=function(a){return Qd.apply(null,arguments)};
|
|
V.prototype.name=function(){return"Feature"};var W=function(a){if(!(this instanceof W))return G(W,arguments);if(a instanceof W)return a;Zd();if(m(a))F.call(this,null,null),this.ma=a;else if(a instanceof F)F.call(this,a.b,a.c,a.d),this.ma=null;else throw Error("Invalid argument specified for ee.List(): "+a);};u(W,F);t("ee.List",W);var $d=!1,Zd=function(){$d||(K(W,"List","List"),$d=!0)};W.prototype.e=function(a){return m(this.ma)?Ma(this.ma,function(b){return a(b)}):W.o.e.call(this,a)};W.prototype.name=function(){return"List"};var X=function(a,b){if(!(this instanceof X))return G(X,arguments);if(a instanceof X)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");ae();a instanceof U&&(a=new V(a));a instanceof V&&(a=[a]);if(Mc(a)||Nc(a)){var c={tableId:a};b&&(c.geometryColumn=b);Q.call(this,new I("Collection.loadTable"),c)}else if(m(a))Q.call(this,new I("Collection"),{features:Ma(a,function(a){return new V(a)})});else if(a instanceof W)Q.call(this,
|
|
new I("Collection"),{features:a});else if(a instanceof F)Q.call(this,a.b,a.c,a.d);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};u(X,Q);t("ee.FeatureCollection",X);var be=!1,ae=function(){be||(K(X,"FeatureCollection","FeatureCollection"),be=!0)};X.prototype.getMap=function(a,b){var c=Qc("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(null,b);else return c.getMap()};X.prototype.getMap=X.prototype.getMap;
|
|
X.prototype.j=function(a){return X.o.j.call(this,a)};X.prototype.getInfo=X.prototype.j;X.prototype.ha=function(a,b,c,d){var e={};e.table=this.i();a&&(e.format=a.toUpperCase());c&&(e.filename=c);b&&(e.selectors=b);if(d)qc(e,function(a,b){a?d(rc(a)):d(null,b)});else return rc(qc(e))};X.prototype.getDownloadURL=X.prototype.ha;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"FeatureCollection"};
|
|
X.prototype.elementType=function(){return V};var Y=function(a){if(!(this instanceof Y))return G(Y,arguments);if(a instanceof Y)return a;ce();var b=arguments.length;if(0==b||1==b&&!l(a))M.call(this,new I("Image.mask"),{image:new Y(0),mask:new Y(0)});else if(1==b)if(Mc(a))M.call(this,new I("Image.constant"),{value:a});else if(Nc(a))M.call(this,new I("Image.load"),{id:a});else{if(m(a))return de(Ma(a,function(a){return new Y(a)}));if(a instanceof F)"Array"==a.name()?M.call(this,new I("Image.constant"),{value:a}):M.call(this,a.b,a.c,a.d);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Nc(b)&&Mc(c))M.call(this,new I("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)");};u(Y,M);t("ee.Image",Y);var fe=!1,ce=function(){fe||(K(Y,"Image","Image"),K(Y,"Window","Image","focal_"),fe=!0)};Y.prototype.j=function(a){return Y.o.j.call(this,a)};Y.prototype.getInfo=Y.prototype.j;
|
|
Y.prototype.getMap=function(a,b){var c=a?v(a):{};c.image=this.i();if(b)kc(c,r(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=kc(c),c.image=this,c};Y.prototype.getMap=Y.prototype.getMap;Y.prototype.ha=function(a,b){var c=a?v(a):{};c.image=this.i();if(b)oc(c,function(a,c){a?b(pc(a)):b(null,c)});else return pc(oc(c))};Y.prototype.getDownloadURL=Y.prototype.ha;Y.prototype.cb=function(a){a=a?v(a):{};a.image=this.i();return nc(mc(a))};Y.prototype.getThumbURL=Y.prototype.cb;
|
|
Y.rgb=function(a,b,c){return de([a,b,c],["vis-red","vis-green","vis-blue"])};Y.cat=function(a){return de(Array.prototype.slice.call(arguments),null)};var de=function(a,b){if(0==a.length)throw Error("Can't combine 0 images.");for(var c=new Y(a[0]),d=1;d<a.length;d++)c=J("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
Y.prototype.select=function(a,b){l(a)||(a=[]);var c={input:this,bandSelectors:a};if(Nc(a)||Mc(a)){a=Array.prototype.slice.call(arguments);for(var d=0;d<a.length;d++)if(!(Nc(a[d])||Mc(a[d])||a[d]instanceof F))throw Error("Illegal argument to select(): "+a[d]);c.bandSelectors=a}else b&&(c.newNames=b);return Qc("Image.select",c)};Y.prototype.select=Y.prototype.select;
|
|
Y.prototype.Xa=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 Y(b[e]);var g=J("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE",c);e=new H;e.e=function(a){return g.e(a)};e.m=function(){return{name:"",args:Ma(c,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return e.apply(d)};Y.prototype.expression=Y.prototype.Xa;
|
|
Y.prototype.clip=function(a){try{a=new U(a)}catch(b){}return J("Image.clip",this,a)};Y.prototype.clip=Y.prototype.clip;Y.prototype.name=function(){return"Image"};var Z=function(a){if(!(this instanceof Z))return G(Z,arguments);if(a instanceof Z)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");ge();a instanceof Y&&(a=[a]);if(Nc(a))Q.call(this,new I("ImageCollection.load"),{id:a});else if(m(a))Q.call(this,new I("ImageCollection.fromImages"),{images:Ma(a,function(a){return new Y(a)})});else if(a instanceof F)Q.call(this,a.b,a.c,a.d);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
|
|
a);};u(Z,Q);t("ee.ImageCollection",Z);var he=!1,ge=function(){he||(K(Z,"ImageCollection","ImageCollection"),K(Z,"reduce","ImageCollection"),he=!0)};Z.prototype.getMap=function(a,b){var c=J("ImageCollection.mosaic",this);if(b)c.getMap(a,b);else return c.getMap(a)};Z.prototype.getMap=Z.prototype.getMap;Z.prototype.j=function(a){return Z.o.j.call(this,a)};Z.prototype.getInfo=Z.prototype.j;Z.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};
|
|
Z.prototype.select=Z.prototype.select;Z.prototype.name=function(){return"ImageCollection"};Z.prototype.elementType=function(){return Y};var ie={};t("ee.Terrain",ie);ie.ka=!1;ie.ib=function(){ie.ka||(K(ie,"Terrain","Terrain"),ie.ka=!0)};ie.reset=function(){L(ie);ie.ka=!1};t("ee.initialize",function(a,b,c,d,e){if("ready"!=je||a||b){var g=null!=c;if(d)if(g)ke.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==je&&g)le.push(c);else if(je="loading",jc(a,b,e),g)le.push(c),Sc(me,ne);else try{Sc(),me()}catch(f){throw ne(f),f;}}else c&&c()});
|
|
t("ee.reset",function(){je="not_ready";gc=fc=ec=null;hc=!1;ka=null;Rc={};L(Bd);Dd=!1;L(Ud);Wd=!1;L(M);Xc=!1;L(Y);fe=!1;L(V);Yd=!1;L(Q);sd=!1;L(Z);he=!1;L(X);be=!1;L(O);Zc=!1;L(U);Gd=!1;L(W);$d=!1;L(R);ud=!1;L(S);wd=!1;ie.reset();for(var a=k.ee,b=0;b<oe.length;b++){var c=oe[b];L(a[c]);delete a[c]}oe=[];Jc=a;var a=pe,d;for(d in a)delete a[d]});t("ee.InitState",{Db:"not_ready",LOADING:"loading",Eb:"ready"});t("ee.InitState.NOT_READY","not_ready");t("ee.InitState.LOADING","loading");
|
|
t("ee.InitState.READY","ready");var je="not_ready",le=[],ke=[];t("ee.TILE_SIZE",256);var oe=[],pe={};t("ee.Algorithms",pe);t("ee.call",function(a,b){p(a)&&(a=new I(a));return H.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});t("ee.apply",function(a,b){p(a)&&(a=new I(a));return a.apply(b)});
|
|
var me=function(){if("loading"==je){try{Cd();Vd();Wc();ce();Xd();rd();ge();ae();Yc();Ed();Zd();td();vd();ie.ib();var a=Tc(),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 g=k.ee,f;for(f in b)f in c&&!(f in g)&&(g[f]=qe(f),oe.push(f),a[f]?(g[f].signature=a[f],g[f].signature.isConstructor=!0,Rc[f]=!0):g[f].signature={});Jc=g;re()}catch(n){ne(n);return}je="ready";for(ke=[];0<le.length;)le.shift()()}},ne=function(a){if("loading"==
|
|
je)for(je="not_ready",le=[];0<ke.length;)ke.shift()(a)},re=function(){var a=Uc();oa(a).sort().forEach(function(b){var c=a[b],d=c.m();if(!d.hidden){b=b.split(".");var e=pe;for(e.signature={};1<b.length;){var g=b[0];g in e||(e[g]={signature:{}});e=e[g];b=Sa(b,1)}g=r(c.call,c);g.signature=d;g.toString=r(c.toString,c);e[b[0]]=g}})},qe=function(a){var b=function(b){var d=k.ee[a],e=Array.prototype.slice.call(arguments),g=1==e.length;if(g&&e[0]instanceof d)return e[0];if(!(this instanceof d))return G(d,
|
|
e);var d=Vc(a),f=!(e[0]instanceof F),n=!1;d&&(g?f?n=!0:e[0].b!=d&&(n=!0):n=!0);if(n)F.call(this,d,Ic(d,Hc(d,e)));else{if(!g)throw Error("Too many arguments for ee."+a+"(): "+e);if(f)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];F.call(this,e.b,e.c,e.d)}};u(b,F);b.prototype.name=function(){return a};K(b,a,a);return b},Gc=function(a,b){if(null===a)return null;if(l(a)){var c=k.ee;switch(b){case "Image":return new Y(a);case "Feature":return a instanceof Q?J("Feature",
|
|
J("Collection.geometry",a)):new V(a);case "Element":if(a instanceof M)return a;if(a instanceof F)return new M(a.b,a.c,a.d);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof X?J("Collection.geometry",a):new U(a);case "FeatureCollection":case "Collection":return a instanceof Q?a:new X(a);case "ImageCollection":return new Z(a);case "Filter":return new O(a);case "Algorithm":if(p(a))return new I(a);if(fa(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return Ad(a,
|
|
d)}if(a instanceof tc)return a;throw Error("Argument is not a function: "+a);case "String":return Nc(a)||a instanceof S||a instanceof F?new S(a):a;case "Dictionary":return Oc(a)?a:new Ud(a);case "List":return new W(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new R(a);default:if(b in c){d=Vc(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}}};!Ya&&!y||y&&y&&9<=db||Ya&&z("1.9.1");y&&z("9");y&&z("11");})();
|
|
//@ sourceMappingURL=ee_api_js.sourcemap
|