From cdfe00b9d862fa753d647c2788d7d0f4a56bb647 Mon Sep 17 00:00:00 2001 From: Google Earth Engine Authors Date: Fri, 26 Jan 2024 20:01:02 +0000 Subject: [PATCH] v0.1.388 PiperOrigin-RevId: 601829646 --- javascript/build/ee_api_js.js | 558 +++++++++--------- javascript/build/ee_api_js_debug.js | 357 +++++------ javascript/build/ee_api_js_npm.js | 401 +++++-------- javascript/package.json | 2 +- javascript/src/apiclient.js | 83 +-- javascript/src/data.js | 13 +- .../examples/Demos/TerrainVisualization.js | 3 +- python/ee/__init__.py | 20 +- python/ee/blob.py | 20 +- python/ee/confusionmatrix.py | 71 +++ python/ee/daterange.py | 82 +++ python/ee/deserializer.py | 12 +- python/ee/ee_array.py | 82 +++ python/ee/errormargin.py | 2 +- python/ee/function.py | 9 +- python/ee/join.py | 5 +- python/ee/model.py | 57 ++ python/ee/pixeltype.py | 2 +- python/ee/projection.py | 103 ++++ python/ee/reducer.py | 58 ++ python/ee/tests/algorithms.json | 2 +- python/ee/tests/blob_test.py | 5 +- python/ee/tests/computedobject_test.py | 2 +- python/ee/tests/confusionmatrix_test.py | 85 +++ python/ee/tests/daterange_test.py | 146 +++++ python/ee/tests/ee_array_test.py | 79 +++ python/ee/tests/errormargin_test.py | 13 +- python/ee/tests/join_test.py | 10 +- python/ee/tests/model_test.py | 57 ++ python/ee/tests/pixeltype_test.py | 25 +- python/ee/tests/projection_test.py | 120 ++++ python/ee/tests/reducer_test.py | 59 ++ python/pyproject.toml | 2 +- 33 files changed, 1704 insertions(+), 841 deletions(-) create mode 100644 python/ee/confusionmatrix.py create mode 100644 python/ee/daterange.py create mode 100644 python/ee/ee_array.py create mode 100644 python/ee/model.py create mode 100644 python/ee/projection.py create mode 100644 python/ee/reducer.py create mode 100644 python/ee/tests/confusionmatrix_test.py create mode 100644 python/ee/tests/daterange_test.py create mode 100644 python/ee/tests/ee_array_test.py create mode 100644 python/ee/tests/model_test.py create mode 100644 python/ee/tests/projection_test.py create mode 100644 python/ee/tests/reducer_test.py diff --git a/javascript/build/ee_api_js.js b/javascript/build/ee_api_js.js index f67e25e85..422e36012 100644 --- a/javascript/build/ee_api_js.js +++ b/javascript/build/ee_api_js.js @@ -412,80 +412,80 @@ var Zh=function(a){a.fc=Xh(function(){a.fc=null;a.yc&&!a.Zc&&(a.yc=!1,Zh(a))},a. SPDX-License-Identifier: MIT */ var ai=function(a,b){this.he=[];this.di=a;this.oh=b||null;this.Pc=this.pc=!1;this.ia=void 0;this.kg=this.Qg=this.Se=!1;this.re=0;this.X=null;this.Te=0};x(ai,$h);ai.prototype.cancel=function(a){if(this.pc)this.ia instanceof ai&&this.ia.cancel();else{if(this.X){var b=this.X;delete this.X;a?b.cancel(a):(b.Te--,0>=b.Te&&b.cancel())}this.di?this.di.call(this.oh,this):this.kg=!0;this.pc||bi(this,new ci(this))}};ai.prototype.bh=function(a,b){this.Se=!1;di(this,a,b)}; -var di=function(a,b,c){a.pc=!0;a.ia=c;a.Pc=!b;ei(a)},gi=function(a){if(a.pc){if(!a.kg)throw new fi(a);a.kg=!1}};ai.prototype.callback=function(a){gi(this);hi(a);di(this,!0,a)};var bi=function(a,b){gi(a);hi(b);di(a,!1,b)},hi=function(a){B(!(a instanceof ai),"An execution sequence may not be initiated with a blocking Deferred.")},ii=function(a,b,c,d){B(!a.Qg,"Blocking Deferreds can not be re-used");a.he.push([b,c,d]);a.pc&&ei(a)}; -ai.prototype.then=function(a,b,c){var d,e,g=new Jh(function(f,l){e=f;d=l});ii(this,e,function(f){f instanceof ci?g.cancel():d(f);return ji},this);return g.then(a,b,c)};ai.prototype.$goog_Thenable=!0; -var ki=function(a){return Xa(a.he,function(b){return"function"===typeof b[1]})},ji={},ei=function(a){if(a.re&&a.pc&&ki(a)){var b=a.re,c=li[b];c&&(r.clearTimeout(c.fa),delete li[b]);a.re=0}a.X&&(a.X.Te--,delete a.X);b=a.ia;for(var d=c=!1;a.he.length&&!a.Se;){var e=a.he.shift(),g=e[0],f=e[1];e=e[2];if(g=a.Pc?f:g)try{var l=g.call(e||a.oh,b);l===ji&&(l=void 0);void 0!==l&&(a.Pc=a.Pc&&(l==b||l instanceof Error),a.ia=b=l);if(Gh(b)||"function"===typeof r.Promise&&b instanceof r.Promise)d=!0,a.Se=!0}catch(m){b= -m,a.Pc=!0,ki(a)||(c=!0)}}a.ia=b;d&&(l=u(a.bh,a,!0),d=u(a.bh,a,!1),b instanceof ai?(ii(b,l,d),b.Qg=!0):b.then(l,d));c&&(b=new mi(b),li[b.fa]=b,a.re=b.fa)},fi=function(){Ia.call(this)};x(fi,Ia);fi.prototype.message="Deferred has already fired";fi.prototype.name="AlreadyCalledError";var ci=function(){Ia.call(this)};x(ci,Ia);ci.prototype.message="Deferred was canceled";ci.prototype.name="CanceledError";var mi=function(a){this.fa=r.setTimeout(u(this.Dl,this),0);this.Gd=a}; -mi.prototype.Dl=function(){B(li[this.fa],"Cannot throw an error that is not scheduled.");delete li[this.fa];throw this.Gd;};var li={};var ri=function(a){var b={},c=b.document||document,d=gd(a).toString(),e=(new qh(c)).createElement("SCRIPT"),g={yi:e,ld:void 0},f=new ai(ni,g),l=null,m=null!=b.timeout?b.timeout:5E3;0=e.value}if(d){b=b||yi;d=Li(Mi(),a.wf());"function"===typeof c&&(c=c());Ei||(Ei=new Di);e=Ei;a=a.wf();if(0=e.value}if(d){b=b||Bi;d=Oi(Pi(),a.wf());"function"===typeof c&&(c=c());Hi||(Hi=new Gi);e=Hi;a=a.wf();if(0\r\n\r\n"+m+"\r\n"}).join("")+"--batch_EARTHENGINE_batch--\r\n",g=function(f){var l={};a.forEach(function(m){var p=n(m);m=p.next().value;p=n(p.next().value);p.next();p=p.next().value;null!=f[m]&&(l[m]= -Wc(p,f[m]))});return b?b(l):l};return this.callback?(Hj(d,null,function(f,l){return c.callback(l?f:g(f),l)},"multipart/mixed; boundary=batch_EARTHENGINE_batch",e,void 0,this.Rb),null):g(Hj(d,null,void 0,"multipart/mixed; boundary=batch_EARTHENGINE_batch",e,void 0,this.Rb))};var Ij=function(){};q(Ij,gh); -Ij.prototype.send=function(a,b){var c=[a.B+" "+a.path+" HTTP/1.1"];c.push("Content-Type: application/json; charset=utf-8");var d=Kj();null!=d&&c.push("Authorization: "+d);a=a.body?JSON.stringify(a.body):"";return[c.join("\r\n")+"\r\n\r\n"+a,b]}; -var Lj=function(a,b,c){a=n(b.split("--"+a.split("; boundary=")[1]));for(b=a.next();!b.done;b=a.next())if(b=b.value.split("\r\n\r\n"),!(3>b.length)){var d=b[0].match(/\r\nContent-ID: ]*)>/)[1],e=Number(b[1].match(/^HTTP\S*\s(\d+)\s/)[1]);c(d,e,b.slice(2).join("\r\n\r\n"))}},Fj=function(){var a=Mj.replace(/\/api$/,"");return"window"in r&&!a.match(/^https?:\/\/content-/)?a.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):a},Oj=function(a,b,c){var d=[];a&&(d=d.concat(Nj)); -b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};cg)break;z++}return jk(C.status,function(Q){try{return C.getResponseHeader(Q)}catch(oa){return null}},C.responseText,l,void 0,e,d,f)},hk=function(a,b,c,d,e,g,f){var l=0,m={url:a,method:c,content:d,headers:e},p=bk,v=null!=g?g:10; -m.callback=function(z){z=z.target;if(429==z.getStatus()&&l\r\n\r\n"+m+"\r\n"}).join("")+"--batch_EARTHENGINE_batch--\r\n",g=function(f){var l={};a.forEach(function(m){var p=n(m);m=p.next().value;p=n(p.next().value);p.next();p=p.next().value;null!=f[m]&&(l[m]= +Wc(p,f[m]))});return b?b(l):l};return this.callback?(Ij(d,null,function(f,l){return c.callback(l?f:g(f),l)},"multipart/mixed; boundary=batch_EARTHENGINE_batch",e,void 0,this.Rb),null):g(Ij(d,null,void 0,"multipart/mixed; boundary=batch_EARTHENGINE_batch",e,void 0,this.Rb))};var Jj=function(){};q(Jj,gh); +Jj.prototype.send=function(a,b){var c=[a.B+" "+a.path+" HTTP/1.1"];c.push("Content-Type: application/json; charset=utf-8");var d=Lj();null!=d&&c.push("Authorization: "+d);a=a.body?JSON.stringify(a.body):"";return[c.join("\r\n")+"\r\n\r\n"+a,b]}; +var Mj=function(a,b,c){a=n(b.split("--"+a.split("; boundary=")[1]));for(b=a.next();!b.done;b=a.next())if(b=b.value.split("\r\n\r\n"),!(3>b.length)){var d=b[0].match(/\r\nContent-ID: ]*)>/)[1],e=Number(b[1].match(/^HTTP\S*\s(\d+)\s/)[1]);c(d,e,b.slice(2).join("\r\n\r\n"))}},Gj=function(){var a=Nj.replace(/\/api$/,"");return"window"in r&&!a.match(/^https?:\/\/content-/)?a.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/,"$1content-$2"):a},Pj=function(a,b,c){var d=[];a&&(d=d.concat(Oj)); +b&&d.push("https://www.googleapis.com/auth/devstorage.read_write");a=d=d.concat(c);c=b=0;for(var e={};cg)break;z++}return kk(C.status,function(Q){try{return C.getResponseHeader(Q)}catch(oa){return null}},C.responseText,l,void 0,e,d,f)},ik=function(a,b,c,d,e,g,f){var l=0,m={url:a,method:c,content:d,headers:e},p=ck,v=null!=g?g:10; +m.callback=function(z){z=z.target;if(429==z.getStatus()&&lS||300<=S)return"Server returned HTTP code: "+S+" for "+f+" "+g},z,C;b=b("Content-Type")||"application/json";d=b.replace(/;.*/,"");if("application/json"===d||"text/json"===d)c=p(c),c.parsed? -C=c.parsed:z=c;else if("multipart/mixed"===d){C={};var Q=[];Lj(b,c,function(S,Aa,Jb){Jb=p(Jb);Jb.parsed&&(C[S]=Jb.parsed);(Aa=(Jb.parsed?"":Jb)||v(Aa))&&Q.push(S+": "+Aa)});Q.length&&(z=Q.join("\n"))}else var oa="Response was unexpectedly not JSON, but "+d;z=z||v(a)||oa;if(e)return e(C,z),null;if(!z)return C;throw Error(z);},Sj=function(a){var b=function(){r.gapi.config.update("client/cors",!0);Pj||(Pj=r.gapi.auth2.authorize);a()};if(t(r.gapi)&&t(r.gapi.auth2)&&"function"===typeof r.gapi.auth2.authorize)b(); -else{for(var c=Date.now().toString(36);c in r;)c+="_";r[c]=function(){delete r[c];b()};ri(zj(Aj,c))}},Tj=function(a,b,c){if(c.access_token){b=c.token_type+" "+c.access_token;if(c.expires_in||0===c.expires_in){c=900*c.expires_in;var d=setTimeout(Uj,.9*c);void 0!==d.unref&&d.unref();Vj=Date.now()+c}Xj=b;a&&a()}else b&&b(c.error||"Unknown error.")},Gj=function(a){var b=new Ed;a=n(Object.entries(a));for(var c=a.next();!c.done;c=a.next()){var d=n(c.value);c=d.next().value;d=d.next().value;b.set(c,d)}return b}, -gk=[],ik=new Yh(function(){var a=gk.shift();if(a){var b=a.url,c=a.callback,d=a.method,e=a.content;a=a.headers;var g=kk,f=new Xi;$i.push(f);c&&f.Xa("complete",c);f.Vc("ready",f.Rk);g&&(f.zc=Math.max(0,g));f.send(b,d,e,a)}0==gk.length||ik.qf()},350),Mj=null,Zj=null,ak=null,fk=null,ek=qc,Xj=null,Vj=null,Qj=null,Rj=[],Pj=null,Nj=["https://www.googleapis.com/auth/earthengine","https://www.googleapis.com/auth/cloud-platform"],dk=null,Yj=!1,kk=0,bk=null;w("ee.api.ListAssetsResponse",pg); -w("ee.api.EarthEngineAsset",lf);w("ee.api.Operation",sg);w("ee.api.ListFeaturesResponse",qg);w("ee.api.FeatureViewLocation",of);var lk=function(){};lk.prototype.Eh=function(){return null};var mk=function(){};w("ee.Encodable.SourceFrame",mk); -var nk=function(a){if(void 0===a||null===a)a=Rc;return new Le({hb:a})},ok=function(a){return new Le({Oa:a})},pk=function(a){return new Le({Fa:new Ke({values:a})})},qk=function(a){return new Le({Ga:new hf({values:a})})},rk=function(a,b){return new Le({ya:new Wf({functionName:a,arguments:b})})},sk=function(a,b){return new Le({ya:new Wf({Va:a,arguments:b})})},tk=function(a,b){return new Le({Ua:new Vf({lc:a,body:b})})},uk=function(a){if(!a)return"AUTO_JPEG_PNG";a=a.toUpperCase();switch(a){case "JPG":return"JPEG"; -case "AUTO":return"AUTO_JPEG_PNG";case "TIF":case "TIFF":case "GEOTIF":case "GEOTIFF":return"GEO_TIFF";case "TF_RECORD":case "TFRECORD":return"TF_RECORD_IMAGE";case "NUMPY":return"NPY";case "ZIPPED_TIF":case "ZIPPED_TIFF":case "ZIPPED_GEOTIF":case "ZIPPED_GEOTIFF":return"ZIPPED_GEO_TIFF";case "ZIPPED_TIF_PER_BAND":case "ZIPPED_TIFF_PER_BAND":case "ZIPPED_GEOTIF_PER_BAND":case "ZIPPED_GEOTIFF_PER_BAND":return"ZIPPED_GEO_TIFF_PER_BAND";default:return a}},vk=function(a){if(!a)return"CSV";a=a.toUpperCase(); -switch(a){case "TF_RECORD":case "TFRECORD":return"TF_RECORD_TABLE";case "JSON":case "GEOJSON":return"GEO_JSON";default:return a}},wk=function(a){if(!a)return"VERTICAL";a=a.toUpperCase();if("HORIZONTAL"!==a&&"VERTICAL"!==a)throw Error('Orientation must be "horizontal" or "vertical"');return a},xk=function(a){if(!a)return[];if("string"===typeof a)return a.split(",");if(Array.isArray(a))return a;throw Error("Invalid band list "+a);},Ak=function(a){var b=new tf,c=!1;"palette"in a&&(c=a.palette,b.Yc="string"=== -typeof c?c.split(","):c,c=!0);var d=[];if("gain"in a||"bias"in a){if("min"in a||"max"in a)throw Error("Gain and bias can't be specified with min and max");var e=b.Yc?b.Yc.length-1:255;d=yk(a,"bias","gain").map(function(g){var f=-g.bias/g.gain;return{min:f,max:e/g.gain+f}})}else if("min"in a||"max"in a)d=yk(a,"min","max");0!==d.length&&(b.Wf=d.map(function(g){return new jf(g)}),c=!0);a=zk(a.gamma);if(1= "'+(new Date(a.startTime)).toISOString()+'"'),delete a.startTime);"endTime"in a&&(b.push('endTime < "'+(new Date(a.endTime)).toISOString()+ +return b},Mk=function(a){var b=new lf,c=function(g){return null===g?Rc:void 0},d=Object.assign({},a),e;a=function(g){e=d[g];delete d[g];return e};void 0!==a("system:asset_size")&&(b.sizeBytes=c(e)||String(e));void 0!==a("system:time_start")&&(b.startTime=c(e)||(new Date(Number(e))).toISOString());void 0!==a("system:time_end")&&(b.endTime=c(e)||(new Date(Number(e))).toISOString());void 0!==a("system:footprint")&&(b.geometry=c(e)||e);a("system:title");"string"!==typeof e&&null!==e||null!=d.title||(d.title= +c(e)||e);a("system:description");"string"!==typeof e&&null!==e||null!=d.description||(d.description=c(e)||e);Object.entries(d).forEach(function(g){var f=n(g);g=f.next().value;f=f.next().value;d[g]=c(f)||f});b.properties=d;return b},Lk=function(a,b){var c={};c.type=a;null!=b&&(a=b.split("/"),b="projects"===a[0]&&"assets"===a[2]&&["earthengine-legacy","earthengine-public"].includes(a[1])?a.slice(3).join("/"):b,c.id=b);return c},Pk=function(a){var b={};a.num&&(b.pageSize=a.num);a.starttime&&(b.startTime= +(new Date(a.starttime)).toISOString());a.endtime&&(b.endTime=(new Date(a.endtime)).toISOString());a.bbox&&(b.region=Nk(a.bbox));a.region&&(b.region=a.region);a.bbox&&a.region&&console.warn("Multiple request parameters converted to region");var c="id num starttime endtime bbox region".split(" ");a=n(Object.keys(a).filter(function(e){return!c.includes(e)}));for(var d=a.next();!d.done;d=a.next())console.warn("Unrecognized key "+d.value+" ignored");return Ok(b)},Nk=function(a){return'{"type":"Polygon","coordinates":[[['+ +[[0,1],[2,1],[2,3],[0,3],[0,1]].map(function(b){return a[b[0]]+","+a[b[1]]}).join("],[")+"]]]}"},Qk=function(a){var b={};(a.xd||[]).forEach(function(g){b[g.role]=g.Xb});var c=new Set,d=function(g){var f=g.replace(/^domain:|^group:|^serviceAccount:|^user:/,"");g.startsWith("group:")&&c.add(f);return f};a=b["roles/viewer"]||[];var e=a.filter(function(g){return"allUsers"!==g});d={owners:(b["roles/owner"]||[]).map(d),writers:(b["roles/editor"]||[]).map(d),readers:e.map(d)};0= "'+(new Date(a.startTime)).toISOString()+'"'),delete a.startTime);"endTime"in a&&(b.push('endTime < "'+(new Date(a.endTime)).toISOString()+ '"'),delete a.endTime);if("region"in a){var c=a.region;if("object"===typeof c)try{c=JSON.stringify(c)}catch(e){throw Error('Filter parameter "region" must be a GeoJSON or WKT string.');}else if("string"!==typeof c)throw Error('Filter parameter "region" must be a GeoJSON or WKT string.');c=c.replace(/"/g,"'");b.push('intersects("'+c+'")');delete a.region}if("properties"in a){if(!Array.isArray(a.properties)&&a.properties.some(function(e){return"string"!==typeof e}))throw Error('Filter parameter "properties" must be an array of strings'); -c=n(a.properties);for(var d=c.next();!d.done;d=c.next())b.push(d.value.trim().replace(/^(properties\.)?/,"properties."));delete a.properties}return b.join(" AND ")},Nk=function(a){a=Object.assign({},a);var b=$k(a);b&&(a.filter=a.filter?a.filter+" AND "+b:b);return a};var al=function(){this.blockSize=-1};var bl=function(){this.blockSize=-1;this.blockSize=64;this.W=Array(4);this.Ok=Array(this.blockSize);this.qe=this.Gc=0;this.reset()};x(bl,al);bl.prototype.reset=function(){this.W[0]=1732584193;this.W[1]=4023233417;this.W[2]=2562383102;this.W[3]=271733878;this.qe=this.Gc=0}; -var cl=function(a,b,c){c||(c=0);var d=Array(16);if("string"===typeof 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.W[0];c=a.W[1];e=a.W[2];var g=a.W[3];var 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>>> +c=n(a.properties);for(var d=c.next();!d.done;d=c.next())b.push(d.value.trim().replace(/^(properties\.)?/,"properties."));delete a.properties}return b.join(" AND ")},Ok=function(a){a=Object.assign({},a);var b=al(a);b&&(a.filter=a.filter?a.filter+" AND "+b:b);return a};var bl=function(){this.blockSize=-1};var cl=function(){this.blockSize=-1;this.blockSize=64;this.W=Array(4);this.Ok=Array(this.blockSize);this.qe=this.Gc=0;this.reset()};x(cl,bl);cl.prototype.reset=function(){this.W[0]=1732584193;this.W[1]=4023233417;this.W[2]=2562383102;this.W[3]=271733878;this.qe=this.Gc=0}; +var dl=function(a,b,c){c||(c=0);var d=Array(16);if("string"===typeof 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.W[0];c=a.W[1];e=a.W[2];var g=a.W[3];var 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= @@ -495,227 +495,227 @@ f>>>21);f=e+(g^b^c)+d[7]+4139469664&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c 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.W[0]=a.W[0]+b&4294967295;a.W[1]=a.W[1]+(e+(f<<21&4294967295|f>>>11))&4294967295;a.W[2]=a.W[2]+e&4294967295;a.W[3]=a.W[3]+g&4294967295}; -bl.prototype.update=function(a,b){void 0===b&&(b=a.length);for(var c=b-this.blockSize,d=this.Ok,e=this.Gc,g=0;gthis.Gc?this.blockSize:2*this.blockSize)-this.Gc);a[0]=128;for(var b=1;bb;++b)for(var d=0;32>d;d+=8)a[c++]=this.W[b]>>>d&255;return a};var dl=function(a){this.qd="__ee_hash__";this.Sd=!1!==a;this.Ya=[];this.wa={};this.Dg=[];this.Od=new WeakMap;this.ng=new WeakMap;this.Ri=void 0};w("ee.Serializer",dl);var el=new si,fl=new bl,hl=function(a,b){return gl(new dl(void 0!==b?b:!0),a)};w("ee.Serializer.encode",hl);var il=function(a){return el.va(hl(a))};w("ee.Serializer.toJSON",il);var kl=function(a){return jl(hl(a,!1))};w("ee.Serializer.toReadableJSON",kl); -var jl=function(a){return"JSON"in r?r.JSON.stringify(a,null," "):el.va(a)},gl=function(a,b){b=a.Fd(b);a.Sd&&(b=t(b)&&"ValueRef"==b.type&&1==a.Ya.length?a.Ya[0][1]:{type:"CompoundValue",scope:a.Ya,value:b},a.Ya=[],Ua(a.Dg,u(function(c){delete c[this.qd]},a)),a.Dg=[],a.wa={});return b}; -dl.prototype.Fd=function(a){if(void 0===a)throw Error("Can't encode an undefined value.");var b=t(a)?a[this.qd]:null;if(this.Sd&&null!=b&&this.wa[b])return{type:"ValueRef",value:this.wa[b]};if(null===a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a)return a;if(ya(a))return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof lk){var c=a.encode(u(this.Fd,this));if(!(Array.isArray(c)||t(c)&&"ArgumentRef"!=c.type))return c}else if(Array.isArray(a))c= -Wa(a,function(e){return this.Fd(e)},this);else if(t(a)&&"function"!==typeof a)c=Hb(a,function(e){if("function"!==typeof e)return this.Fd(e)},this),Qb(c,this.qd),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Sd){b=ll(c);if(this.wa[b])var d=this.wa[b];else d=String(this.Ya.length),this.Ya.push([d,c]),this.wa[b]=d;a[this.qd]=b;this.Dg.push(a);return{type:"ValueRef",value:d}}return c}; -var ll=function(a){fl.reset();fl.update(el.va(a));return fl.digest().toString()},nl=function(a){return Xc(ml(a),Tc,Uc,Vc)};w("ee.Serializer.encodeCloudApi",nl); -var ml=function(a,b){return ol(new dl(!0),a,b)},ol=function(a,b,c){a.Ri=c;return pl(a,b)},ql=function(a,b){var c={};b=b.values;for(var d in b){var e=a.ng.get(b[d]);c[d]=Object.assign({},e)}return c},rl=function(a){a=pl(new dl(!1),a);var b=a.values,c=function(d){if(!t(d))return d;var e=Array.isArray(d)?[]:{},g=d instanceof Object.getPrototypeOf(Le);d=n(Object.entries(g?d.h:d));for(var f=d.next();!f.done;f=d.next()){var l=n(f.value);f=l.next().value;l=l.next().value;g?null!==l&&(e[f]="functionDefinitionValue"=== -f&&null!=l.body?{argumentNames:l.lc,body:c(b[l.body])}:"functionInvocationValue"===f&&null!=l.Va?{arguments:Hb(l.arguments,c),functionReference:c(b[l.Va])}:"constantValue"===f?l===Rc?null:l:c(l)):e[f]=c(l)}return e};return a.result&&c(b[a.result])};w("ee.Serializer.encodeCloudApiPretty",rl);var sl=function(a){return el.va(nl(a))};w("ee.Serializer.toCloudApiJSON",sl);var tl=function(a){return jl(rl(a))};w("ee.Serializer.toReadableCloudApiJSON",tl); -var pl=function(a,b){try{var c=ul(a,b),d=new vl(c,a.Ya,a.Sd,a.ng),e=wl(d,d.xi);return new af({result:e,values:d.ii})}finally{a.Od=new WeakMap,a.wa={},a.Ya=[]}},ul=function(a,b){var c=function(f){var l=ll(f);t(b)&&a.Od.set(b,l);if(a.wa[l])return a.wa[l];var m=String(a.Ya.length);a.Ya.push([m,f]);return a.wa[l]=m};if(t(b)&&a.wa[a.Od.get(b)])return a.wa[a.Od.get(b)];if(null===b||"boolean"===typeof b||"string"===typeof b||"number"===typeof b)return c(nk(b));if(ya(b))return c(rk("Date",{value:nk(Math.floor(b.getTime()))})); -if(b instanceof lk){var d=b.na(a),e=b.Eh();null!==e&&a.ng.set(d,e);return c(d)}if(Array.isArray(b))return c(pk(b.map(function(f){return ok(ul(a,f))})));if(t(b)&&"function"!==typeof b){var g={};Object.keys(b).sort().forEach(function(f){g[f]=ok(ul(a,b[f]))});return c(qk(g))}throw Error("Can't encode object: "+b);},vl=function(a,b,c,d){var e=this;this.xi=a;this.values={};b.forEach(function(g){return e.values[g[0]]=g[1]});this.ri=c?xl(this):null;this.ii={};this.Zf={};this.ll=0;this.hd=d},wl=function(a, -b){if(b in a.Zf)return a.Zf[b];var c=String(a.ll++);a.Zf[b]=c;a.ii[c]=yl(a,a.values[b],0);return c},yl=function(a,b,c){var d=function(z){return null!==z.hb},e=function(z){return z===Rc?null:z},g=function(z,C){a.hd&&a.hd.has(z)&&!a.hd.has(C)&&a.hd.set(C,a.hd.get(z));return C};if(d(b)||null!=b.Wa||null!=b.qb||null!=b.Mb)return b;if(null!=b.Oa){d=a.values[b.Oa];if(null===a.ri||50>c&&1===a.ri[b.Oa])return d=yl(a,d,c),g(b,d);if(zl(d))return g(b,d);d=ok(wl(a,b.Oa));return g(b,d)}if(null!=b.Fa){var f=b.Fa.values.map(function(z){return yl(a, -z,c+3)});d=f.every(d)?nk(f.map(function(z){return e(z.hb)})):pk(f);return g(b,d)}if(null!=b.Ga){f={};for(var l={},m=n(Object.entries(b.Ga.values||{})),p=m.next();!p.done;p=m.next()){var v=n(p.value);p=v.next().value;v=v.next().value;f[p]=yl(a,v,c+3);null!==l&&d(f[p])?l[p]=e(f[p].hb):l=null}return null!==l?g(b,nk(l)):g(f,qk(f))}if(null!=b.Ua)return d=b.Ua,d=tk(d.lc||[],wl(a,d.body||"")),g(b,d);if(null!=b.ya){d=b.ya;f={};l=n(Object.keys(d.arguments||{}));for(m=l.next();!m.done;m=l.next())m=m.value, -f[m]=yl(a,d.arguments[m],c+3);d=d.functionName?rk(d.functionName,f):sk(wl(a,d.Va||""),f);return g(b,d)}throw Error("Can't optimize value: "+b);},zl=function(a){var b=a.hb;return null!==b?b===Rc||"number"===typeof b||"boolean"===typeof b:null!=a.Mb},xl=function(a){var b={},c=function(e){b[e]?b[e]++:(b[e]=1,d(a.values[e]))},d=function(e){null!=e.Fa?e.Fa.values.forEach(d):null!=e.Ga?Object.values(e.Ga.values).forEach(d):null!=e.Ua?c(e.Ua.body):null!=e.ya?(e=e.ya,null!=e.Va&&c(e.Va),Object.values(e.arguments).forEach(d)): -null!=e.Oa&&c(e.Oa)};c(a.xi);return b};var Fl=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b=a.selectors||null;null!=b&&"string"===typeof b&&(b=b.split(","));b=new Cf({l:ml(a.element),description:K(a.description),oa:null,sa:null,Id:null,wd:null,selectors:b,Vb:L(a.maxErrorMeters),requestId:K(a.id),maxVertices:L(a.maxVertices),O:L(a.maxWorkers)});var c=Al(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":var d=new Ff({ja:null,ma:null,F:vk(a.fileFormat)});"GOOGLE_CLOUD_STORAGE"===c?d.ja=Bl(a):d.ma= -Cl(a);b.oa=d;break;case "ASSET":b.sa=new Df({Ha:Dl(a)});break;case "FEATURE_VIEW":c=new Nf({name:Gk(a.mapName)});d=null==a?null:new Sf({Of:L(a.maxFeaturesPerTile),tg:a.thinningStrategy});var e=null==a?null:new Rf({Eg:El(a.zOrderRanking),sg:El(a.thinningRanking)});d=new Of({rg:d,Yf:e});c=new Ef({mf:c,rc:d});b.Id=c;break;case "BIGQUERY":b.wd=new Qe({Re:new Pe({table:K(a.table),overwrite:!!a.overwrite,append:!!a.append})});break;default:throw Error('Export destination "'+c+'" unknown');}a.workloadTag&& +cl.prototype.update=function(a,b){void 0===b&&(b=a.length);for(var c=b-this.blockSize,d=this.Ok,e=this.Gc,g=0;gthis.Gc?this.blockSize:2*this.blockSize)-this.Gc);a[0]=128;for(var b=1;bb;++b)for(var d=0;32>d;d+=8)a[c++]=this.W[b]>>>d&255;return a};var el=function(a){this.qd="__ee_hash__";this.Sd=!1!==a;this.Ya=[];this.wa={};this.Dg=[];this.Od=new WeakMap;this.ng=new WeakMap;this.Ri=void 0};w("ee.Serializer",el);var fl=new vi,gl=new cl,il=function(a,b){return hl(new el(void 0!==b?b:!0),a)};w("ee.Serializer.encode",il);var jl=function(a){return fl.va(il(a))};w("ee.Serializer.toJSON",jl);var ll=function(a){return kl(il(a,!1))};w("ee.Serializer.toReadableJSON",ll); +var kl=function(a){return"JSON"in r?r.JSON.stringify(a,null," "):fl.va(a)},hl=function(a,b){b=a.Fd(b);a.Sd&&(b=t(b)&&"ValueRef"==b.type&&1==a.Ya.length?a.Ya[0][1]:{type:"CompoundValue",scope:a.Ya,value:b},a.Ya=[],Ua(a.Dg,u(function(c){delete c[this.qd]},a)),a.Dg=[],a.wa={});return b}; +el.prototype.Fd=function(a){if(void 0===a)throw Error("Can't encode an undefined value.");var b=t(a)?a[this.qd]:null;if(this.Sd&&null!=b&&this.wa[b])return{type:"ValueRef",value:this.wa[b]};if(null===a||"boolean"===typeof a||"number"===typeof a||"string"===typeof a)return a;if(ya(a))return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof mk){var c=a.encode(u(this.Fd,this));if(!(Array.isArray(c)||t(c)&&"ArgumentRef"!=c.type))return c}else if(Array.isArray(a))c= +Wa(a,function(e){return this.Fd(e)},this);else if(t(a)&&"function"!==typeof a)c=Hb(a,function(e){if("function"!==typeof e)return this.Fd(e)},this),Qb(c,this.qd),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Sd){b=ml(c);if(this.wa[b])var d=this.wa[b];else d=String(this.Ya.length),this.Ya.push([d,c]),this.wa[b]=d;a[this.qd]=b;this.Dg.push(a);return{type:"ValueRef",value:d}}return c}; +var ml=function(a){gl.reset();gl.update(fl.va(a));return gl.digest().toString()},ol=function(a){return Xc(nl(a),Tc,Uc,Vc)};w("ee.Serializer.encodeCloudApi",ol); +var nl=function(a,b){return pl(new el(!0),a,b)},pl=function(a,b,c){a.Ri=c;return ql(a,b)},rl=function(a,b){var c={};b=b.values;for(var d in b){var e=a.ng.get(b[d]);c[d]=Object.assign({},e)}return c},sl=function(a){a=ql(new el(!1),a);var b=a.values,c=function(d){if(!t(d))return d;var e=Array.isArray(d)?[]:{},g=d instanceof Object.getPrototypeOf(Le);d=n(Object.entries(g?d.h:d));for(var f=d.next();!f.done;f=d.next()){var l=n(f.value);f=l.next().value;l=l.next().value;g?null!==l&&(e[f]="functionDefinitionValue"=== +f&&null!=l.body?{argumentNames:l.lc,body:c(b[l.body])}:"functionInvocationValue"===f&&null!=l.Va?{arguments:Hb(l.arguments,c),functionReference:c(b[l.Va])}:"constantValue"===f?l===Rc?null:l:c(l)):e[f]=c(l)}return e};return a.result&&c(b[a.result])};w("ee.Serializer.encodeCloudApiPretty",sl);var tl=function(a){return fl.va(ol(a))};w("ee.Serializer.toCloudApiJSON",tl);var ul=function(a){return kl(sl(a))};w("ee.Serializer.toReadableCloudApiJSON",ul); +var ql=function(a,b){try{var c=vl(a,b),d=new wl(c,a.Ya,a.Sd,a.ng),e=xl(d,d.xi);return new af({result:e,values:d.ii})}finally{a.Od=new WeakMap,a.wa={},a.Ya=[]}},vl=function(a,b){var c=function(f){var l=ml(f);t(b)&&a.Od.set(b,l);if(a.wa[l])return a.wa[l];var m=String(a.Ya.length);a.Ya.push([m,f]);return a.wa[l]=m};if(t(b)&&a.wa[a.Od.get(b)])return a.wa[a.Od.get(b)];if(null===b||"boolean"===typeof b||"string"===typeof b||"number"===typeof b)return c(ok(b));if(ya(b))return c(sk("Date",{value:ok(Math.floor(b.getTime()))})); +if(b instanceof mk){var d=b.na(a),e=b.Eh();null!==e&&a.ng.set(d,e);return c(d)}if(Array.isArray(b))return c(qk(b.map(function(f){return pk(vl(a,f))})));if(t(b)&&"function"!==typeof b){var g={};Object.keys(b).sort().forEach(function(f){g[f]=pk(vl(a,b[f]))});return c(rk(g))}throw Error("Can't encode object: "+b);},wl=function(a,b,c,d){var e=this;this.xi=a;this.values={};b.forEach(function(g){return e.values[g[0]]=g[1]});this.ri=c?yl(this):null;this.ii={};this.Zf={};this.ll=0;this.hd=d},xl=function(a, +b){if(b in a.Zf)return a.Zf[b];var c=String(a.ll++);a.Zf[b]=c;a.ii[c]=zl(a,a.values[b],0);return c},zl=function(a,b,c){var d=function(z){return null!==z.hb},e=function(z){return z===Rc?null:z},g=function(z,C){a.hd&&a.hd.has(z)&&!a.hd.has(C)&&a.hd.set(C,a.hd.get(z));return C};if(d(b)||null!=b.Wa||null!=b.qb||null!=b.Mb)return b;if(null!=b.Oa){d=a.values[b.Oa];if(null===a.ri||50>c&&1===a.ri[b.Oa])return d=zl(a,d,c),g(b,d);if(Al(d))return g(b,d);d=pk(xl(a,b.Oa));return g(b,d)}if(null!=b.Fa){var f=b.Fa.values.map(function(z){return zl(a, +z,c+3)});d=f.every(d)?ok(f.map(function(z){return e(z.hb)})):qk(f);return g(b,d)}if(null!=b.Ga){f={};for(var l={},m=n(Object.entries(b.Ga.values||{})),p=m.next();!p.done;p=m.next()){var v=n(p.value);p=v.next().value;v=v.next().value;f[p]=zl(a,v,c+3);null!==l&&d(f[p])?l[p]=e(f[p].hb):l=null}return null!==l?g(b,ok(l)):g(f,rk(f))}if(null!=b.Ua)return d=b.Ua,d=uk(d.lc||[],xl(a,d.body||"")),g(b,d);if(null!=b.ya){d=b.ya;f={};l=n(Object.keys(d.arguments||{}));for(m=l.next();!m.done;m=l.next())m=m.value, +f[m]=zl(a,d.arguments[m],c+3);d=d.functionName?sk(d.functionName,f):tk(xl(a,d.Va||""),f);return g(b,d)}throw Error("Can't optimize value: "+b);},Al=function(a){var b=a.hb;return null!==b?b===Rc||"number"===typeof b||"boolean"===typeof b:null!=a.Mb},yl=function(a){var b={},c=function(e){b[e]?b[e]++:(b[e]=1,d(a.values[e]))},d=function(e){null!=e.Fa?e.Fa.values.forEach(d):null!=e.Ga?Object.values(e.Ga.values).forEach(d):null!=e.Ua?c(e.Ua.body):null!=e.ya?(e=e.ya,null!=e.Va&&c(e.Va),Object.values(e.arguments).forEach(d)): +null!=e.Oa&&c(e.Oa)};c(a.xi);return b};var Gl=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b=a.selectors||null;null!=b&&"string"===typeof b&&(b=b.split(","));b=new Cf({l:nl(a.element),description:K(a.description),oa:null,sa:null,Id:null,wd:null,selectors:b,Vb:L(a.maxErrorMeters),requestId:K(a.id),maxVertices:L(a.maxVertices),O:L(a.maxWorkers)});var c=Bl(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":var d=new Ff({ja:null,ma:null,F:wk(a.fileFormat)});"GOOGLE_CLOUD_STORAGE"===c?d.ja=Cl(a):d.ma= +Dl(a);b.oa=d;break;case "ASSET":b.sa=new Df({Ha:El(a)});break;case "FEATURE_VIEW":c=new Nf({name:Hk(a.mapName)});d=null==a?null:new Sf({Of:L(a.maxFeaturesPerTile),tg:a.thinningStrategy});var e=null==a?null:new Rf({Eg:Fl(a.zOrderRanking),sg:Fl(a.thinningRanking)});d=new Of({rg:d,Yf:e});c=new Ef({mf:c,rc:d});b.Id=c;break;case "BIGQUERY":b.wd=new Qe({Re:new Pe({table:K(a.table),overwrite:!!a.overwrite,append:!!a.append})});break;default:throw Error('Export destination "'+c+'" unknown');}a.workloadTag&& (b.workloadTag=a.workloadTag);return b};function K(a){return null!=a?String(a):null}function L(a){return null!=a?Number(a):null} -var Al=function(a){var b="DRIVE";if(null==a)return b;null!=a.outputBucket||null!=a.outputPrefix?b="GOOGLE_CLOUD_STORAGE":null!=a.assetId?b="ASSET":null!=a.mapName&&(b="FEATURE_VIEW");null!=a.table&&(b="BIGQUERY");return b},Hl=function(a){var b=new fg({Ze:!!a.tfrecordCompressed,Wb:K(a.tfrecordMaxFileSize),gg:!!a.tfrecordSequenceData,Xe:!!a.tfrecordCollapseBands,Pf:L(a.tfrecordMaskedThreshold),defaultValue:L(a.tfrecordDefaultValue),cc:Gl(a.tfrecordPatchDimensions),Lf:Gl(a.tfrecordKernelSize),le:null}); -a=a.tfrecordTensorDepths;if(null!=a)if(t(a)){var c={};Fb(a,function(d,e){if("string"!==typeof e||"number"!==typeof d)throw Error('"tensorDepths" option must be an object of type Object');c[e]=d});b.le=c}else throw Error('"tensorDepths" option needs to have the form Object.');return b},Il=function(a,b){var c=new yf({ja:null,ma:null,Jd:null,me:null,F:uk(a.fileFormat)});if("GEO_TIFF"===c.F){if(a.fileDimensions&&a.tiffFileDimensions)throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".'); -var d=a.tiffShardSize||a.shardSize;var e=!!a.tiffCloudOptimized;var g=!(!a.skipEmptyTiles&&!a.tiffSkipEmptyFiles),f=Gl(a.fileDimensions||a.tiffFileDimensions);d=L(d);var l=a.tiffNoData;l=null!=l?new Yf({rf:Number(l)}):null;e=new Xf({We:e,mg:g,cc:f,tileSize:d,Rf:l});c.Jd=e}else"TF_RECORD_IMAGE"===c.F&&(c.me=Hl(a));"GOOGLE_CLOUD_STORAGE"===b?c.ja=Bl(a):c.ma=Cl(a);return c},Jl=function(a,b){var c=new If({ja:null,ma:null,F:"MP4"});"GOOGLE_CLOUD_STORAGE"===b?c.ja=Bl(a):c.ma=Cl(a);return c},Kl=function(a){var b, -c,d,e,g=L(null!=(b=a.endZoom)?b:a.maxZoom);b=L(null!=(c=a.startZoom)?c:a.minZoom);c=L(a.scale);var f=!(null!=(d=a.skipEmpty)?!d:!a.skipEmptyTiles);d=K(a.mapsApiKey);var l=Gl(null!=(e=a.dimensions)?e:a.tileDimensions);e=L(a.stride);var m=L(a.minTimeMachineZoomSubset);a=L(a.maxTimeMachineZoomSubset);a=null==m&&null==a?null:new Lg({start:null!=m?m:0,end:a});return new Bf({hf:g,og:b,scale:c,lg:f,Kf:d,dimensions:l,stride:e,Fg:a})},Gl=function(a){if(null==a)return null;var b=new Zf({height:0,width:0}); +var Bl=function(a){var b="DRIVE";if(null==a)return b;null!=a.outputBucket||null!=a.outputPrefix?b="GOOGLE_CLOUD_STORAGE":null!=a.assetId?b="ASSET":null!=a.mapName&&(b="FEATURE_VIEW");null!=a.table&&(b="BIGQUERY");return b},Il=function(a){var b=new fg({Ze:!!a.tfrecordCompressed,Wb:K(a.tfrecordMaxFileSize),gg:!!a.tfrecordSequenceData,Xe:!!a.tfrecordCollapseBands,Pf:L(a.tfrecordMaskedThreshold),defaultValue:L(a.tfrecordDefaultValue),cc:Hl(a.tfrecordPatchDimensions),Lf:Hl(a.tfrecordKernelSize),le:null}); +a=a.tfrecordTensorDepths;if(null!=a)if(t(a)){var c={};Fb(a,function(d,e){if("string"!==typeof e||"number"!==typeof d)throw Error('"tensorDepths" option must be an object of type Object');c[e]=d});b.le=c}else throw Error('"tensorDepths" option needs to have the form Object.');return b},Jl=function(a,b){var c=new yf({ja:null,ma:null,Jd:null,me:null,F:vk(a.fileFormat)});if("GEO_TIFF"===c.F){if(a.fileDimensions&&a.tiffFileDimensions)throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".'); +var d=a.tiffShardSize||a.shardSize;var e=!!a.tiffCloudOptimized;var g=!(!a.skipEmptyTiles&&!a.tiffSkipEmptyFiles),f=Hl(a.fileDimensions||a.tiffFileDimensions);d=L(d);var l=a.tiffNoData;l=null!=l?new Yf({rf:Number(l)}):null;e=new Xf({We:e,mg:g,cc:f,tileSize:d,Rf:l});c.Jd=e}else"TF_RECORD_IMAGE"===c.F&&(c.me=Il(a));"GOOGLE_CLOUD_STORAGE"===b?c.ja=Cl(a):c.ma=Dl(a);return c},Kl=function(a,b){var c=new If({ja:null,ma:null,F:"MP4"});"GOOGLE_CLOUD_STORAGE"===b?c.ja=Cl(a):c.ma=Dl(a);return c},Ll=function(a){var b, +c,d,e,g=L(null!=(b=a.endZoom)?b:a.maxZoom);b=L(null!=(c=a.startZoom)?c:a.minZoom);c=L(a.scale);var f=!(null!=(d=a.skipEmpty)?!d:!a.skipEmptyTiles);d=K(a.mapsApiKey);var l=Hl(null!=(e=a.dimensions)?e:a.tileDimensions);e=L(a.stride);var m=L(a.minTimeMachineZoomSubset);a=L(a.maxTimeMachineZoomSubset);a=null==m&&null==a?null:new Lg({start:null!=m?m:0,end:a});return new Bf({hf:g,og:b,scale:c,lg:f,Kf:d,dimensions:l,stride:e,Fg:a})},Hl=function(a){if(null==a)return null;var b=new Zf({height:0,width:0}); "string"===typeof a&&(-1!==a.indexOf("x")?a=a.split("x").map(Number):-1!==a.indexOf(",")&&(a=a.split(",").map(Number)));if(Array.isArray(a))if(2===a.length)b.height=a[0],b.width=a[1];else if(1===a.length)b.height=a[0],b.width=a[0];else throw Error("Unable to construct grid from dimensions: "+a);else if("number"!==typeof a||isNaN(a))if(t(a)&&null!=a.height&&null!=a.width)b.height=a.height,b.width=a.width;else throw Error("Unable to construct grid from dimensions: "+a);else b.height=a,b.width=a;return b}, -Bl=function(a){var b=null;null!=a.writePublicTiles&&(b=a.writePublicTiles?"PUBLIC":"DEFAULT_OBJECT_ACL");return new Ye({Ue:K(a.outputBucket),xa:K(a.outputPrefix),Ve:a.bucketCorsUris||null,permissions:b})},Cl=function(a){return new kf({tf:K(a.driveFolder),xa:K(a.driveFileNamePrefix)})},Dl=function(a){return new We({name:Gk(a.assetId)})},El=function(a){if(!a)return null;var b=a;"string"===typeof a&&(a=a.split(","));if(Array.isArray(a))return new Gg({Xf:(a||[]).map(Ll)});throw Error("Unable to build ranking rule from rules: "+ -JSON.stringify(b)+". Rules should either be a comma-separated string or list of strings.");},Ll=function(a){var b=new Fg({direction:null,ae:null,ce:null,be:null});a=a.trim();a=a.match(/^([\S]+.*)\s+(ASC|DESC)$/);if(null==a)throw Error("Ranking rule format is invalid. Each rule should be defined by a rule type and a direction (ASC or DESC), separated by a space. Valid rule types are: .geometryType, .minZoomLevel, or a feature property name.");var c=n(a);c.next();a=c.next().value;c=c.next().value;switch(c.toUpperCase()){case "ASC":b.direction= -"ASCENDING";break;case "DESC":b.direction="DESCENDING";break;default:throw Error("Ranking rule direction '"+c+"' is invalid. Directions are: ASC, DESC.");}switch(a.trim()){case ".geometryType":b.be=new Cg({});break;case ".minZoomLevel":b.ce=new Eg({});break;default:b.ae=new Bg({attributeName:K(a)})}return b};var Ml=[],Nl=function(a){B(!Object.isSealed(a),"Cannot use getInstance() with a sealed constructor.");var b="Ef";if(a.Ef&&a.hasOwnProperty(b))return a.Ef;Ml.push(a);var c=new a;a.Ef=c;B(a.hasOwnProperty(b),"Could not instantiate singleton.");return c};var Pl=function(a,b,c,d,e,g){d=Oj(!g,!1,d||[]);Qj=a;Rj=d;null===a?Wj():Sj(function(){Uj(b,c,e||Fa(Ol,b,c))})};w("ee.data.authenticateViaOauth",Pl);var Ql=function(a,b,c,d,e){Pl(a,b,c,d,e)};w("ee.data.authenticate",Ql);var Ol=function(a,b){r.gapi.auth2.authorize({client_id:Qj,immediate:!1,scope:Rj.join(" ")},Fa(Tj,a,b))};w("ee.data.authenticateViaPopup",Ol); -var Rl=function(a,b,c,d,e){if("window"in r)throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead.");d=Oj(!e,!e,d||[]);Qj=a.client_email;Rj=d;var g=new google.auth.JWT(a.client_email,null,a.private_key,d,null);Pj=function(f,l){g.authorize(function(m,p){m?l({error:m}):l({access_token:p.access_token,token_type:p.token_type,expires_in:(p.expiry_date-Date.now())/1E3})})};Uj(b,c)};w("ee.data.authenticateViaPrivateKey",Rl); -w("ee.data.setExpressionAugmenter",function(a){Sl=a||qc});var Sl=qc;w("ee.data.setAuthToken",function(a,b,c,d,e,g,f,l){e=Oj(!l,!1,e||[]);Qj=a;Rj=e;var m={token_type:b,access_token:c,state:e.join(" "),expires_in:d};Tj(void 0,void 0,m);!1===f?g&&g():Sj(function(){r.gapi.client.setToken(m);g&&g()})});w("ee.data.refreshAuthToken",Uj);w("ee.data.setAuthTokenRefresher",function(a){Pj=a});w("ee.data.getAuthToken",Kj);w("ee.data.clearAuthToken",Wj);w("ee.data.getAuthClientId",function(){return Qj}); -w("ee.data.getAuthScopes",function(){return Rj});w("ee.data.setDeadline",function(a){kk=a});w("ee.data.setParamAugmenter",function(a){ek=a||qc}); -var Tl=function(a){a=new J(a);return a.handle(a.Fc().list(Ej(),{prettyPrint:!1}).then(Bk))},Wl=function(a,b){if("string"===typeof a.image)throw Error("Image as JSON string not supported.");if(void 0!==a.version)throw Error("Image version specification not supported.");a=new sf({name:null,l:Sl(ml(a.image)),F:uk(a.format),da:xk(a.bands),ic:Ak(a)});var c={fields:"name"},d=Ul();d&&(c.workloadTag=d);b=new J(b);return b.handle(b.maps().create(Ej(),a,c).then(function(e){return Vl(e.name,"")}))}; -w("ee.data.getMapId",Wl);var Xl=function(a,b,c,d){if(!a.formatTileUrl){var e=Vl(a.mapid,a.token,a.urlFormat);a.urlFormat=e.urlFormat;a.formatTileUrl=e.formatTileUrl}return a.formatTileUrl(b,c,d)};w("ee.data.getTileUrl",Xl); -var Vl=function(a,b,c){var d=void 0===c?"":c;d||(Cj(),c=Zj,d=b?c+"/map/"+a+"/{z}/{x}/{y}?token="+b:c+"/v1/"+a+"/tiles/{z}/{x}/{y}");return{mapid:a,token:b,formatTileUrl:function(e,g,f){var l=Math.pow(2,f);e%=l;e=String(0>e?e+l:e);return d.replace("{x}",e).replace("{y}",g).replace("{z}",f)},urlFormat:d}},Yl=function(a,b){var c=a.visParams?Sl(ml(a.visParams)):null;a=new Mf({name:null,Nb:a.assetId,mapName:a.mapName,Cg:c});b=new J(b);return b.handle((new Tg(b.M)).create(Ej(),a,{fields:["name"]}).then(function(d){var e= -d.name.split("/").pop();return{token:e,formatTileUrl:function(g,f,l){return Zj+"/v1/"+d.name+"/tiles/"+l+"/"+g+"/"+f},rawTilesKey:e.substring(0,e.lastIndexOf("-"))}}))};w("ee.data.getFeatureViewTilesKey",Yl); -var Zl=function(a,b,c){c=new J(c);var d=Gk(a);a=c.handle;var e=c.assets();b=void 0===b?{}:b;var g=void 0===g?{}:g;e.j.C(d,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:null,B:"GET",D:"earthengine.projects.assets.listFeatures",path:"/"+e.m+"/"+d+":listFeatures",u:H(b,g),G:qg});return a.call(c,g)};w("ee.data.listFeatures",Zl); -var $l=function(a,b){var c=new dl(!0);a=ol(c,a);var d={};c=ql(c,a);Object.keys(c).length&&(d={__source_code_nodes__:c});c={l:Sl(a,d)};if(a=Ul())c.workloadTag=a;b=new J(b);return b.handle(ch(b.value(),Ej(),new $e(c)).then(function(e){return e.result}))};w("ee.data.computeValue",$l); -var am=function(a,b){if("string"===typeof a.image)throw Error("Image as JSON string not supported.");if(void 0!==a.version)throw Error("Image version specification not supported.");if(void 0!==a.region)throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');if(void 0!==a.dimensions)throw Error('"dimensions" is not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');a=new Kg({name:null,l:Sl(ml(a.image)),F:uk(a.format),xa:a.name,da:xk(a.bands), -ic:Ak(a),grid:null});var c={fields:"name"},d=Ul();d&&(c.workloadTag=d);b=new J(b);return b.handle((new ah(b.M)).create(Ej(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getThumbId",am); -var bm=function(a,b){var c=new Jf({framesPerSecond:a.framesPerSecond||null,maxFrames:a.maxFrames||null,maxPixelsPerFrame:a.maxPixelsPerFrame||null});a=new Og({name:null,l:Sl(ml(a.imageCollection)),F:uk(a.format),Pa:c,grid:null});c={fields:"name"};var d=Ul();d&&(c.workloadTag=d);b=new J(b);return b.handle((new fh(b.M)).create(Ej(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getVideoThumbId",bm); -var cm=function(a,b){a=new Uf({name:null,l:Sl(ml(a.imageCollection)),F:uk(a.format),orientation:wk(a.orientation),grid:null});var c={fields:"name"},d=Ul();d&&(c.workloadTag=d);b=new J(b);return b.handle((new Ug(b.M)).create(Ej(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getFilmstripThumbId",cm);var dm=function(a){return Zj+"/v1/"+a.thumbid+":getPixels"};w("ee.data.makeThumbUrl",dm); -var fm=function(a,b){a=Object.assign({},a);a.id&&(a.image=new M(a.id));if("string"===typeof a.image)throw Error("Image as serialized JSON string not supported.");if(!a.image)throw Error("Missing ID or image parameter.");a.filePerBand=!1!==a.filePerBand;a.format=a.format||(a.filePerBand?"ZIPPED_GEO_TIFF_PER_BAND":"ZIPPED_GEO_TIFF");if(null!=a.region&&(null!=a.scale||null!=a.crs_transform)&&null!=a.dimensions)throw Error("Cannot specify (bounding region, crs_transform/scale, dimensions) simultaneously."); -if("string"===typeof a.bands)try{a.bands=JSON.parse(a.bands)}catch(e){a.bands=xk(a.bands)}if(a.bands&&!Array.isArray(a.bands))throw Error("Bands parameter must be an array.");a.bands&&a.bands.every(function(e){return"string"===typeof e})&&(a.bands=a.bands.map(function(e){return{id:e}}));if(a.bands&&a.bands.some(function(e){return null==e.id}))throw Error("Each band dictionary must have an id.");"string"===typeof a.region&&(a.region=JSON.parse(a.region));if("string"===typeof a.crs_transform)try{a.crs_transform= -JSON.parse(a.crs_transform)}catch(e){}var c=em(a.image,a);a=new Kg({name:null,l:Sl(ml(c)),F:uk(a.format),xa:a.name,da:a.bands&&xk(a.bands.map(function(e){return e.id})),grid:null});c={fields:"name"};var d=Ul();d&&(c.workloadTag=d);b=new J(b);return b.handle((new ah(b.M)).create(Ej(),a,c).then(function(e){return{docid:e.name,token:""}}))};w("ee.data.getDownloadId",fm);var gm=function(a){Cj();return Zj+"/v1/"+a.docid+":getPixels"};w("ee.data.makeDownloadUrl",gm); -var hm=function(a,b){b=new J(b);var c=vk(a.format),d=Sl(ml(a.table)),e=null;if(null!=a.selectors)if("string"===typeof a.selectors)e=a.selectors.split(",");else if(Array.isArray(a.selectors)&&a.selectors.every(function(g){return"string"===typeof g}))e=a.selectors;else throw Error("'selectors' parameter must be an array of strings.");a=new Ig({name:null,l:d,F:c,selectors:e,filename:a.filename||null});c={fields:"name"};if(d=Ul())c.workloadTag=d;return b.handle((new $g(b.M)).create(Ej(),a,c).then(function(g){return{docid:g.name|| -"",token:""}}))};w("ee.data.getTableDownloadId",hm);var im=function(a){return Zj+"/v1/"+a.docid+":getFeatures"};w("ee.data.makeTableDownloadUrl",im);var jm=function(a,b){var c=function(d){return Math.floor(Math.random()*Math.pow(2,4*d)).toString(16).padStart(d,"0")};a=fb(a||1).map(function(){return[c(8),c(4),"4"+c(3),(8+Math.floor(4*Math.random())).toString(16)+c(3),c(12)].join("-")});return b?b(a):a};w("ee.data.newTaskId",jm); -var km=function(a){return a.name&&a.done&&a.error},mm=function(a,b){var c=lm(a).map(Sk);if(1===c.length)return a=(new J(b)).pd(km),a.handle(a.Na().get(c[0]).then(function(e){return[Tk(e)]}));a=(new Jj(b)).pd(km);var d=a.Na();return a.send(c.map(function(e){return[e,d.get(e)]}),function(e){return c.map(function(g){return Tk(e[g])})})};w("ee.data.getTaskStatus",mm); -var lm=function(a){if("string"===typeof a)return[a];if(Array.isArray(a))return a;throw Error("Invalid value: expected a string or an array of strings.");},om=function(a){return nm(void 0,a)};w("ee.data.getTaskList",om);var nm=function(a,b){return b?(pm(a,function(c,d){return b(c?{tasks:c.map(Tk)}:null,d)}),null):{tasks:pm(a).map(Tk)}};w("ee.data.getTaskListWithLimit",nm); -var pm=function(a,b){var c=[],d={pageSize:500},e=function(l){db(c,l.Na||[]);!l.nextPageToken||a&&c.length>=a?b&&b(a?c.slice(0,a):c):(d.pageToken=l.nextPageToken,g.handle(f.list(Ej(),d).then(e)));return null},g=new J(b?function(l,m){return m&&b(l,m)}:void 0),f=g.Na();g.handle(f.list(Ej(),d).then(e));return b?null:a?c.slice(0,a):c};w("ee.data.listOperations",pm); -var qm=function(a,b){a=lm(a).map(Sk);var c=new Te;if(1===a.length)b=new J(b),b.handle(b.Na().cancel(a[0],c));else{b=new Jj(b);var d=b.Na();b.send(a.map(function(e){return[e,d.cancel(e,c)]}))}};w("ee.data.cancelOperation",qm);var rm=function(a,b){var c=lm(a).map(Sk);if(!Array.isArray(a))return a=(new J(b)).pd(km),a.handle(a.Na().get(c[0]));a=(new Jj(b)).pd(km);var d=a.Na();return a.send(c.map(function(e){return[e,d.get(e)]}))};w("ee.data.getOperation",rm); -var tm=function(a,b){return sm(a,"CANCEL",b)};w("ee.data.cancelTask",tm);var sm=function(a,b,c){if(!Mb(um,b))throw Error("Invalid action: "+b);a=lm(a);a=a.map(Sk);qm(a,c);return null};w("ee.data.updateTask",sm); -var Am=function(a,b,c){b.id=a;var d=b.type;a=null!=b.sourceUrl?{__source_url__:b.sourceUrl}:{};if("workloadTag"in b)b.workloadTag||delete b.workloadTag;else{var e=Ul();e&&(b.workloadTag=e)}var g=new J(c);c=function(f){return g.handle(f.then(Uk))};switch(d){case "EXPORT_IMAGE":return b=vm(b,a),c(g.image().Ka(Ej(),b));case "EXPORT_FEATURES":return b=Fl(b),b.l=Sl(b.l,a),c(g.table().Ka(Ej(),b));case "EXPORT_VIDEO":return b=wm(b,a),c(g.video().Ka(Ej(),b));case "EXPORT_TILES":return b=xm(b,a),c(g.map().Ka(Ej(), -b));case "EXPORT_VIDEO_MAP":return b=ym(b),c((new eh(g.M)).Ka(Ej(),b));case "EXPORT_CLASSIFIER":return b=zm(b,a),c((new Sg(g.M)).Ka(Ej(),b));default:throw Error("Unable to start processing for task of type "+d);}};w("ee.data.startProcessing",Am); -var vm=function(a,b){var c=Bm(a);if(null==c.element)throw Error('"element" not found in params '+c);var d=new wf({l:ml(c.element),description:K(c.description),oa:null,sa:null,grid:null,Qf:K(c.maxPixels),requestId:K(c.id),O:L(c.maxWorkers)}),e=Al(c);switch(e){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":d.oa=Il(c,e);break;case "ASSET":e=c.pyramidingPolicy||{};try{e=JSON.parse(e)}catch(f){}var g="PYRAMIDING_POLICY_UNSPECIFIED";"string"===typeof e?(g=e,e={}):e[".default"]&&(g=e[".default"],delete e[".default"]); -c=new xf({Ha:Dl(c),pyramidingPolicy:g,Vf:Pb(e)?null:e,tileSize:L(c.shardSize)});d.sa=c;break;default:throw Error('Export destination "'+e+'" unknown');}d.l=Sl(d.l,b);a.workloadTag&&(d.workloadTag=a.workloadTag);return d},wm=function(a,b){var c=Cm(a);if(null==c.element)throw Error('"element" not found in params '+c);var d=new Kf({l:ml(c.element),description:K(c.description),Pa:new Jf({framesPerSecond:L(c.framesPerSecond),maxFrames:L(c.maxFrames),maxPixelsPerFrame:K(c.maxPixels)}),oa:null,requestId:K(c.id), -O:L(c.maxWorkers)});d.oa=Jl(c,Al(c));d.l=Sl(d.l,b);a.workloadTag&&(d.workloadTag=a.workloadTag);return d},xm=function(a,b){var c=a.scale;delete a.scale;var d=Bm(a);d.scale=c;if(null==d.element)throw Error('"element" not found in params '+d);c=new Af({l:ml(d.element),description:K(d.description),ec:Kl(d),dc:Il(d,"GOOGLE_CLOUD_STORAGE"),requestId:K(d.id),O:L(d.maxWorkers)});c.l=Sl(c.l,b);a.workloadTag&&(c.workloadTag=a.workloadTag);return c},ym=function(a){var b=a.scale;delete a.scale;var c=Cm(a);c.scale= -b;if(null==c.element)throw Error('"element" not found in params '+c);b=new Hf({l:ml(c.element),description:K(c.description),Pa:new Jf({framesPerSecond:L(c.framesPerSecond),maxFrames:L(c.maxFrames),maxPixelsPerFrame:null}),ec:Kl(c),dc:Jl(c,"GOOGLE_CLOUD_STORAGE"),requestId:K(c.id),version:K(c.version),O:L(c.maxWorkers)});b.l=Sl(b.l);a.workloadTag&&(b.workloadTag=a.workloadTag);return b},zm=function(a,b){if(null==a.element)throw Error('"element" not found in params '+a);var c=Al(a);if("ASSET"!=c)throw Error('Export destination "'+ -c+'" unknown');c=new vf({l:ml(a.element),description:K(a.description),requestId:K(a.id),sa:new Ve({Ha:Dl(a)}),O:L(a.maxWorkers)});c.l=Sl(c.l,b);a.workloadTag&&(c.workloadTag=a.workloadTag);return c},Em=function(a,b,c){b=Yk(b);var d=function(e){return e?Uk(e):null};return d(Dm(a,b,c&&function(e,g){return c(d(e),g)}))};w("ee.data.startIngestion",Em); -var Dm=function(a,b,c){b=new lg({Bf:b,requestId:a,overwrite:null,description:null});a=new J(c,a?void 0:0);return a.handle(a.image().import(Ej(),b))},Fm=function(a,b,c){b=new mg({qg:b,requestId:a,overwrite:null,description:null});a=new J(c,a?void 0:0);return a.handle(a.table().import(Ej(),b))},Gm=function(a,b,c){b=Zk(b);var d=function(e){return e?Uk(e):null};return d(Fm(a,b,c&&function(e,g){return c(d(e),g)}))};w("ee.data.startTableIngestion",Gm); -var Hm=function(a,b){b=new J(b);a=Gk(a);return b.handle(b.assets().get(a,{prettyPrint:!1}).then(Hk))};w("ee.data.getAsset",Hm);w("ee.data.getInfo",Hm);var Im=function(a,b,c,d){b=void 0===b?{}:b;d=void 0===d?qc:d;var e=Ek.test(a);c=new J(c);var g=e?new Qg(c.M):c.assets();a=e?"projects/"+Fk(a):Gk(a);return c.handle(g.Ud(a,b).then(d))},Jm=function(a,b){return Im(a.id,Ok(a),b,function(c){return null==c?null:Ik(c)})};w("ee.data.getList",Jm);var Km=function(a,b,c){b=void 0===b?{}:b;return Im(a,b,c)}; -w("ee.data.listAssets",Km);var Lm=function(a,b,c){b=void 0===b?{}:b;b=Nk(b);return Im(a,b,c,function(d){if(null==d)return null;var e={};d.assets&&(e.images=d.assets);d.nextPageToken&&(e.nextPageToken=d.nextPageToken);return e})};w("ee.data.listImages",Lm);var Mm=function(a,b){b=new J(b);return b.handle((new Qg(b.M)).Ud(a||Ej()))};w("ee.data.listBuckets",Mm);var Nm=function(a){a=new J(a);return a.handle((new Qg(a.M)).Ud(Ej()).then(Ik))};w("ee.data.getAssetRoots",Nm); -var Om=function(a,b){var c="projects/"+Fk(a);a="projects/earthengine-legacy"===c?a:void 0;var d=new lf({type:"Folder"});b=new J(b);b.handle(b.assets().create(c,d,{assetId:a}).then(Hk))};w("ee.data.createAssetHome",Om); -var Pm=function(a,b,c,d,e){if(c)throw Error("Asset overwrite not supported.");if("string"===typeof a)throw Error("Asset cannot be specified as string.");b=a.name||b&&Gk(b);if(!b)throw Error("Either asset name or opt_path must be specified.");c=b.indexOf("/assets/");if(-1===c)throw Error("Asset name must contain /assets/.");a=Object.assign({},a);a.tilestoreEntry&&!a.tilestoreLocation&&(a.tilestoreLocation=a.tilestoreEntry,delete a.tilestoreEntry);a.tilestoreLocation&&(a.tilestoreLocation=new rf(a.tilestoreLocation)); +Cl=function(a){var b=null;null!=a.writePublicTiles&&(b=a.writePublicTiles?"PUBLIC":"DEFAULT_OBJECT_ACL");return new Ye({Ue:K(a.outputBucket),xa:K(a.outputPrefix),Ve:a.bucketCorsUris||null,permissions:b})},Dl=function(a){return new kf({tf:K(a.driveFolder),xa:K(a.driveFileNamePrefix)})},El=function(a){return new We({name:Hk(a.assetId)})},Fl=function(a){if(!a)return null;var b=a;"string"===typeof a&&(a=a.split(","));if(Array.isArray(a))return new Gg({Xf:(a||[]).map(Ml)});throw Error("Unable to build ranking rule from rules: "+ +JSON.stringify(b)+". Rules should either be a comma-separated string or list of strings.");},Ml=function(a){var b=new Fg({direction:null,ae:null,ce:null,be:null});a=a.trim();a=a.match(/^([\S]+.*)\s+(ASC|DESC)$/);if(null==a)throw Error("Ranking rule format is invalid. Each rule should be defined by a rule type and a direction (ASC or DESC), separated by a space. Valid rule types are: .geometryType, .minZoomLevel, or a feature property name.");var c=n(a);c.next();a=c.next().value;c=c.next().value;switch(c.toUpperCase()){case "ASC":b.direction= +"ASCENDING";break;case "DESC":b.direction="DESCENDING";break;default:throw Error("Ranking rule direction '"+c+"' is invalid. Directions are: ASC, DESC.");}switch(a.trim()){case ".geometryType":b.be=new Cg({});break;case ".minZoomLevel":b.ce=new Eg({});break;default:b.ae=new Bg({attributeName:K(a)})}return b};var Nl=[],Ol=function(a){B(!Object.isSealed(a),"Cannot use getInstance() with a sealed constructor.");var b="Ef";if(a.Ef&&a.hasOwnProperty(b))return a.Ef;Nl.push(a);var c=new a;a.Ef=c;B(a.hasOwnProperty(b),"Could not instantiate singleton.");return c};var Ql=function(a,b,c,d,e,g){d=Pj(!g,!1,d||[]);Rj=a;Sj=d;null===a?Xj():Tj(function(){Vj(b,c,e||Fa(Pl,b,c))})};w("ee.data.authenticateViaOauth",Ql);var Rl=function(a,b,c,d,e){Ql(a,b,c,d,e)};w("ee.data.authenticate",Rl);var Pl=function(a,b){r.google.accounts.oauth2.initTokenClient({client_id:Rj,callback:Fa(Uj,a,b),scope:Sj.join(" ")}).requestAccessToken()};w("ee.data.authenticateViaPopup",Pl); +var Sl=function(a,b,c,d,e){if("window"in r)throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead.");d=Pj(!e,!e,d||[]);Rj=a.client_email;Sj=d;var g=new google.auth.JWT(a.client_email,null,a.private_key,d,null);Qj=function(f,l){g.authorize(function(m,p){m?l({error:m}):l({access_token:p.access_token,token_type:p.token_type,expires_in:(p.expiry_date-Date.now())/1E3})})};Vj(b,c)};w("ee.data.authenticateViaPrivateKey",Sl); +w("ee.data.setExpressionAugmenter",function(a){Tl=a||qc});var Tl=qc;w("ee.data.setAuthToken",function(a,b,c,d,e,g,f,l){e=Pj(!l,!1,e||[]);Rj=a;Sj=e;Uj(void 0,void 0,{token_type:b,access_token:c,state:e.join(" "),expires_in:d});!1===f?g&&g():Tj(function(){g&&g()})});w("ee.data.refreshAuthToken",Vj);w("ee.data.setAuthTokenRefresher",function(a){Qj=a});w("ee.data.getAuthToken",Lj);w("ee.data.clearAuthToken",Xj);w("ee.data.getAuthClientId",function(){return Rj});w("ee.data.getAuthScopes",function(){return Sj}); +w("ee.data.setDeadline",function(a){lk=a});w("ee.data.setParamAugmenter",function(a){fk=a||qc}); +var Ul=function(a){a=new J(a);return a.handle(a.Fc().list(Fj(),{prettyPrint:!1}).then(Ck))},Xl=function(a,b){if("string"===typeof a.image)throw Error("Image as JSON string not supported.");if(void 0!==a.version)throw Error("Image version specification not supported.");a=new sf({name:null,l:Tl(nl(a.image)),F:vk(a.format),da:yk(a.bands),ic:Bk(a)});var c={fields:"name"},d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle(b.maps().create(Fj(),a,c).then(function(e){return Wl(e.name,"")}))}; +w("ee.data.getMapId",Xl);var Yl=function(a,b,c,d){if(!a.formatTileUrl){var e=Wl(a.mapid,a.token,a.urlFormat);a.urlFormat=e.urlFormat;a.formatTileUrl=e.formatTileUrl}return a.formatTileUrl(b,c,d)};w("ee.data.getTileUrl",Yl); +var Wl=function(a,b,c){var d=void 0===c?"":c;d||(Dj(),c=ak,d=b?c+"/map/"+a+"/{z}/{x}/{y}?token="+b:c+"/v1/"+a+"/tiles/{z}/{x}/{y}");return{mapid:a,token:b,formatTileUrl:function(e,g,f){var l=Math.pow(2,f);e%=l;e=String(0>e?e+l:e);return d.replace("{x}",e).replace("{y}",g).replace("{z}",f)},urlFormat:d}},Zl=function(a,b){var c=a.visParams?Tl(nl(a.visParams)):null;a=new Mf({name:null,Nb:a.assetId,mapName:a.mapName,Cg:c});b=new J(b);return b.handle((new Tg(b.M)).create(Fj(),a,{fields:["name"]}).then(function(d){var e= +d.name.split("/").pop();return{token:e,formatTileUrl:function(g,f,l){return ak+"/v1/"+d.name+"/tiles/"+l+"/"+g+"/"+f},rawTilesKey:e.substring(0,e.lastIndexOf("-"))}}))};w("ee.data.getFeatureViewTilesKey",Zl); +var $l=function(a,b,c){c=new J(c);var d=Hk(a);a=c.handle;var e=c.assets();b=void 0===b?{}:b;var g=void 0===g?{}:g;e.j.C(d,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:null,B:"GET",D:"earthengine.projects.assets.listFeatures",path:"/"+e.m+"/"+d+":listFeatures",u:H(b,g),G:qg});return a.call(c,g)};w("ee.data.listFeatures",$l); +var am=function(a,b){var c=new el(!0);a=pl(c,a);var d={};c=rl(c,a);Object.keys(c).length&&(d={__source_code_nodes__:c});c={l:Tl(a,d)};if(a=Vl())c.workloadTag=a;b=new J(b);return b.handle(ch(b.value(),Fj(),new $e(c)).then(function(e){return e.result}))};w("ee.data.computeValue",am); +var bm=function(a,b){if("string"===typeof a.image)throw Error("Image as JSON string not supported.");if(void 0!==a.version)throw Error("Image version specification not supported.");if(void 0!==a.region)throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');if(void 0!==a.dimensions)throw Error('"dimensions" is not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');a=new Kg({name:null,l:Tl(nl(a.image)),F:vk(a.format),xa:a.name,da:yk(a.bands), +ic:Bk(a),grid:null});var c={fields:"name"},d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle((new ah(b.M)).create(Fj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getThumbId",bm); +var cm=function(a,b){var c=new Jf({framesPerSecond:a.framesPerSecond||null,maxFrames:a.maxFrames||null,maxPixelsPerFrame:a.maxPixelsPerFrame||null});a=new Og({name:null,l:Tl(nl(a.imageCollection)),F:vk(a.format),Pa:c,grid:null});c={fields:"name"};var d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle((new fh(b.M)).create(Fj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getVideoThumbId",cm); +var dm=function(a,b){a=new Uf({name:null,l:Tl(nl(a.imageCollection)),F:vk(a.format),orientation:xk(a.orientation),grid:null});var c={fields:"name"},d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle((new Ug(b.M)).create(Fj(),a,c).then(function(e){return{thumbid:e.name,token:""}}))};w("ee.data.getFilmstripThumbId",dm);var em=function(a){return ak+"/v1/"+a.thumbid+":getPixels"};w("ee.data.makeThumbUrl",em); +var gm=function(a,b){a=Object.assign({},a);a.id&&(a.image=new M(a.id));if("string"===typeof a.image)throw Error("Image as serialized JSON string not supported.");if(!a.image)throw Error("Missing ID or image parameter.");a.filePerBand=!1!==a.filePerBand;a.format=a.format||(a.filePerBand?"ZIPPED_GEO_TIFF_PER_BAND":"ZIPPED_GEO_TIFF");if(null!=a.region&&(null!=a.scale||null!=a.crs_transform)&&null!=a.dimensions)throw Error("Cannot specify (bounding region, crs_transform/scale, dimensions) simultaneously."); +if("string"===typeof a.bands)try{a.bands=JSON.parse(a.bands)}catch(e){a.bands=yk(a.bands)}if(a.bands&&!Array.isArray(a.bands))throw Error("Bands parameter must be an array.");a.bands&&a.bands.every(function(e){return"string"===typeof e})&&(a.bands=a.bands.map(function(e){return{id:e}}));if(a.bands&&a.bands.some(function(e){return null==e.id}))throw Error("Each band dictionary must have an id.");"string"===typeof a.region&&(a.region=JSON.parse(a.region));if("string"===typeof a.crs_transform)try{a.crs_transform= +JSON.parse(a.crs_transform)}catch(e){}var c=fm(a.image,a);a=new Kg({name:null,l:Tl(nl(c)),F:vk(a.format),xa:a.name,da:a.bands&&yk(a.bands.map(function(e){return e.id})),grid:null});c={fields:"name"};var d=Vl();d&&(c.workloadTag=d);b=new J(b);return b.handle((new ah(b.M)).create(Fj(),a,c).then(function(e){return{docid:e.name,token:""}}))};w("ee.data.getDownloadId",gm);var hm=function(a){Dj();return ak+"/v1/"+a.docid+":getPixels"};w("ee.data.makeDownloadUrl",hm); +var im=function(a,b){b=new J(b);var c=wk(a.format),d=Tl(nl(a.table)),e=null;if(null!=a.selectors)if("string"===typeof a.selectors)e=a.selectors.split(",");else if(Array.isArray(a.selectors)&&a.selectors.every(function(g){return"string"===typeof g}))e=a.selectors;else throw Error("'selectors' parameter must be an array of strings.");a=new Ig({name:null,l:d,F:c,selectors:e,filename:a.filename||null});c={fields:"name"};if(d=Vl())c.workloadTag=d;return b.handle((new $g(b.M)).create(Fj(),a,c).then(function(g){return{docid:g.name|| +"",token:""}}))};w("ee.data.getTableDownloadId",im);var jm=function(a){return ak+"/v1/"+a.docid+":getFeatures"};w("ee.data.makeTableDownloadUrl",jm);var km=function(a,b){var c=function(d){return Math.floor(Math.random()*Math.pow(2,4*d)).toString(16).padStart(d,"0")};a=fb(a||1).map(function(){return[c(8),c(4),"4"+c(3),(8+Math.floor(4*Math.random())).toString(16)+c(3),c(12)].join("-")});return b?b(a):a};w("ee.data.newTaskId",km); +var lm=function(a){return a.name&&a.done&&a.error},nm=function(a,b){var c=mm(a).map(Tk);if(1===c.length)return a=(new J(b)).pd(lm),a.handle(a.Na().get(c[0]).then(function(e){return[Uk(e)]}));a=(new Kj(b)).pd(lm);var d=a.Na();return a.send(c.map(function(e){return[e,d.get(e)]}),function(e){return c.map(function(g){return Uk(e[g])})})};w("ee.data.getTaskStatus",nm); +var mm=function(a){if("string"===typeof a)return[a];if(Array.isArray(a))return a;throw Error("Invalid value: expected a string or an array of strings.");},pm=function(a){return om(void 0,a)};w("ee.data.getTaskList",pm);var om=function(a,b){return b?(qm(a,function(c,d){return b(c?{tasks:c.map(Uk)}:null,d)}),null):{tasks:qm(a).map(Uk)}};w("ee.data.getTaskListWithLimit",om); +var qm=function(a,b){var c=[],d={pageSize:500},e=function(l){db(c,l.Na||[]);!l.nextPageToken||a&&c.length>=a?b&&b(a?c.slice(0,a):c):(d.pageToken=l.nextPageToken,g.handle(f.list(Fj(),d).then(e)));return null},g=new J(b?function(l,m){return m&&b(l,m)}:void 0),f=g.Na();g.handle(f.list(Fj(),d).then(e));return b?null:a?c.slice(0,a):c};w("ee.data.listOperations",qm); +var rm=function(a,b){a=mm(a).map(Tk);var c=new Te;if(1===a.length)b=new J(b),b.handle(b.Na().cancel(a[0],c));else{b=new Kj(b);var d=b.Na();b.send(a.map(function(e){return[e,d.cancel(e,c)]}))}};w("ee.data.cancelOperation",rm);var sm=function(a,b){var c=mm(a).map(Tk);if(!Array.isArray(a))return a=(new J(b)).pd(lm),a.handle(a.Na().get(c[0]));a=(new Kj(b)).pd(lm);var d=a.Na();return a.send(c.map(function(e){return[e,d.get(e)]}))};w("ee.data.getOperation",sm); +var um=function(a,b){return tm(a,"CANCEL",b)};w("ee.data.cancelTask",um);var tm=function(a,b,c){if(!Mb(vm,b))throw Error("Invalid action: "+b);a=mm(a);a=a.map(Tk);rm(a,c);return null};w("ee.data.updateTask",tm); +var Bm=function(a,b,c){b.id=a;var d=b.type;a=null!=b.sourceUrl?{__source_url__:b.sourceUrl}:{};if("workloadTag"in b)b.workloadTag||delete b.workloadTag;else{var e=Vl();e&&(b.workloadTag=e)}var g=new J(c);c=function(f){return g.handle(f.then(Vk))};switch(d){case "EXPORT_IMAGE":return b=wm(b,a),c(g.image().Ka(Fj(),b));case "EXPORT_FEATURES":return b=Gl(b),b.l=Tl(b.l,a),c(g.table().Ka(Fj(),b));case "EXPORT_VIDEO":return b=xm(b,a),c(g.video().Ka(Fj(),b));case "EXPORT_TILES":return b=ym(b,a),c(g.map().Ka(Fj(), +b));case "EXPORT_VIDEO_MAP":return b=zm(b),c((new eh(g.M)).Ka(Fj(),b));case "EXPORT_CLASSIFIER":return b=Am(b,a),c((new Sg(g.M)).Ka(Fj(),b));default:throw Error("Unable to start processing for task of type "+d);}};w("ee.data.startProcessing",Bm); +var wm=function(a,b){var c=Cm(a);if(null==c.element)throw Error('"element" not found in params '+c);var d=new wf({l:nl(c.element),description:K(c.description),oa:null,sa:null,grid:null,Qf:K(c.maxPixels),requestId:K(c.id),O:L(c.maxWorkers)}),e=Bl(c);switch(e){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":d.oa=Jl(c,e);break;case "ASSET":e=c.pyramidingPolicy||{};try{e=JSON.parse(e)}catch(f){}var g="PYRAMIDING_POLICY_UNSPECIFIED";"string"===typeof e?(g=e,e={}):e[".default"]&&(g=e[".default"],delete e[".default"]); +c=new xf({Ha:El(c),pyramidingPolicy:g,Vf:Pb(e)?null:e,tileSize:L(c.shardSize)});d.sa=c;break;default:throw Error('Export destination "'+e+'" unknown');}d.l=Tl(d.l,b);a.workloadTag&&(d.workloadTag=a.workloadTag);return d},xm=function(a,b){var c=Dm(a);if(null==c.element)throw Error('"element" not found in params '+c);var d=new Kf({l:nl(c.element),description:K(c.description),Pa:new Jf({framesPerSecond:L(c.framesPerSecond),maxFrames:L(c.maxFrames),maxPixelsPerFrame:K(c.maxPixels)}),oa:null,requestId:K(c.id), +O:L(c.maxWorkers)});d.oa=Kl(c,Bl(c));d.l=Tl(d.l,b);a.workloadTag&&(d.workloadTag=a.workloadTag);return d},ym=function(a,b){var c=a.scale;delete a.scale;var d=Cm(a);d.scale=c;if(null==d.element)throw Error('"element" not found in params '+d);c=new Af({l:nl(d.element),description:K(d.description),ec:Ll(d),dc:Jl(d,"GOOGLE_CLOUD_STORAGE"),requestId:K(d.id),O:L(d.maxWorkers)});c.l=Tl(c.l,b);a.workloadTag&&(c.workloadTag=a.workloadTag);return c},zm=function(a){var b=a.scale;delete a.scale;var c=Dm(a);c.scale= +b;if(null==c.element)throw Error('"element" not found in params '+c);b=new Hf({l:nl(c.element),description:K(c.description),Pa:new Jf({framesPerSecond:L(c.framesPerSecond),maxFrames:L(c.maxFrames),maxPixelsPerFrame:null}),ec:Ll(c),dc:Kl(c,"GOOGLE_CLOUD_STORAGE"),requestId:K(c.id),version:K(c.version),O:L(c.maxWorkers)});b.l=Tl(b.l);a.workloadTag&&(b.workloadTag=a.workloadTag);return b},Am=function(a,b){if(null==a.element)throw Error('"element" not found in params '+a);var c=Bl(a);if("ASSET"!=c)throw Error('Export destination "'+ +c+'" unknown');c=new vf({l:nl(a.element),description:K(a.description),requestId:K(a.id),sa:new Ve({Ha:El(a)}),O:L(a.maxWorkers)});c.l=Tl(c.l,b);a.workloadTag&&(c.workloadTag=a.workloadTag);return c},Fm=function(a,b,c){b=Zk(b);var d=function(e){return e?Vk(e):null};return d(Em(a,b,c&&function(e,g){return c(d(e),g)}))};w("ee.data.startIngestion",Fm); +var Em=function(a,b,c){b=new lg({Bf:b,requestId:a,overwrite:null,description:null});a=new J(c,a?void 0:0);return a.handle(a.image().import(Fj(),b))},Gm=function(a,b,c){b=new mg({qg:b,requestId:a,overwrite:null,description:null});a=new J(c,a?void 0:0);return a.handle(a.table().import(Fj(),b))},Hm=function(a,b,c){b=$k(b);var d=function(e){return e?Vk(e):null};return d(Gm(a,b,c&&function(e,g){return c(d(e),g)}))};w("ee.data.startTableIngestion",Hm); +var Im=function(a,b){b=new J(b);a=Hk(a);return b.handle(b.assets().get(a,{prettyPrint:!1}).then(Ik))};w("ee.data.getAsset",Im);w("ee.data.getInfo",Im);var Jm=function(a,b,c,d){b=void 0===b?{}:b;d=void 0===d?qc:d;var e=Fk.test(a);c=new J(c);var g=e?new Qg(c.M):c.assets();a=e?"projects/"+Gk(a):Hk(a);return c.handle(g.Ud(a,b).then(d))},Km=function(a,b){return Jm(a.id,Pk(a),b,function(c){return null==c?null:Jk(c)})};w("ee.data.getList",Km);var Lm=function(a,b,c){b=void 0===b?{}:b;return Jm(a,b,c)}; +w("ee.data.listAssets",Lm);var Mm=function(a,b,c){b=void 0===b?{}:b;b=Ok(b);return Jm(a,b,c,function(d){if(null==d)return null;var e={};d.assets&&(e.images=d.assets);d.nextPageToken&&(e.nextPageToken=d.nextPageToken);return e})};w("ee.data.listImages",Mm);var Nm=function(a,b){b=new J(b);return b.handle((new Qg(b.M)).Ud(a||Fj()))};w("ee.data.listBuckets",Nm);var Om=function(a){a=new J(a);return a.handle((new Qg(a.M)).Ud(Fj()).then(Jk))};w("ee.data.getAssetRoots",Om); +var Pm=function(a,b){var c="projects/"+Gk(a);a="projects/earthengine-legacy"===c?a:void 0;var d=new lf({type:"Folder"});b=new J(b);b.handle(b.assets().create(c,d,{assetId:a}).then(Ik))};w("ee.data.createAssetHome",Pm); +var Qm=function(a,b,c,d,e){if(c)throw Error("Asset overwrite not supported.");if("string"===typeof a)throw Error("Asset cannot be specified as string.");b=a.name||b&&Hk(b);if(!b)throw Error("Either asset name or opt_path must be specified.");c=b.indexOf("/assets/");if(-1===c)throw Error("Asset name must contain /assets/.");a=Object.assign({},a);a.tilestoreEntry&&!a.tilestoreLocation&&(a.tilestoreLocation=a.tilestoreEntry,delete a.tilestoreEntry);a.tilestoreLocation&&(a.tilestoreLocation=new rf(a.tilestoreLocation)); a.gcsLocation&&!a.cloudStorageLocation&&(a.cloudStorageLocation=a.gcsLocation,delete a.gcsLocation);a.cloudStorageLocation&&(a.cloudStorageLocation=new Ze(a.cloudStorageLocation));d&&!a.properties&&(a.properties=Object.assign({},d));d=n(["title","description"]);for(var g=d.next();!g.done;g=d.next())if(g=g.value,a[g]){var f={};a.properties=Object.assign((f[g]=a[g],f),a.properties||{});delete a[g]}a=new lf(a);d=b.slice(0,c);b=b.slice(c+8);a.id=null;a.name=null;a:switch(c=a.type,c){case "ImageCollection":c= -"IMAGE_COLLECTION";break a;case "Folder":c="FOLDER"}a.type=c;e=new J(e);return e.handle(e.assets().create(d,a,{assetId:b}).then(Hk))};w("ee.data.createAsset",Pm);var Qm=function(a,b,c){return Pm({type:"Folder"},a,b,void 0,c)};w("ee.data.createFolder",Qm);var Rm=function(a,b,c){a=Gk(a);b=Gk(b);b=new ug({Qb:b});c=new J(c);c.handle(c.assets().move(a,b).then(Hk))};w("ee.data.renameAsset",Rm); -var Sm=function(a,b,c,d){a=Gk(a);b=Gk(b);c=new df({Qb:b,overwrite:null!=c?c:null});d=new J(d);b=d.handle;var e=d.assets();var g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:c,B:"POST",D:"earthengine.projects.assets.copy",path:"/"+e.m+"/"+a+":copy",u:H(g,f),G:lf});b.call(d,g.then(Hk))};w("ee.data.copyAsset",Sm);var Tm=function(a,b){b=new J(b);b.handle(b.assets().delete(Gk(a)))};w("ee.data.deleteAsset",Tm); -var Um=function(a,b){a=Gk(a);var c=new $f;b=new J(b);var d=b.handle,e=b.assets(),g={prettyPrint:!1};g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));f=I(e.j,{body:c,B:"POST",D:"earthengine.projects.assets.getIamPolicy",path:"/"+e.m+"/"+a+":getIamPolicy",u:H(g,f),G:Gf});return d.call(b,f.then(Pk))};w("ee.data.getAssetAcl",Um); -var Vm=function(a,b,c,d){b=new Ng({Nb:b,updateMask:(c||[]).join(",")});d=new J(d);c=d.handle;var e=d.assets();a=Gk(a);var g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:b,B:"PATCH",D:"earthengine.projects.assets.patch",path:"/"+e.m+"/"+a,u:H(g,f),G:lf});return c.call(d,g.then(Hk))};w("ee.data.updateAsset",Vm); -var Wm=function(a,b,c){a=Gk(a);b=Qk(b);b=new Hg({kb:b});c=new J(c);var d=c.handle,e=c.assets(),g={prettyPrint:!1};g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));f=I(e.j,{body:b,B:"POST",D:"earthengine.projects.assets.setIamPolicy",path:"/"+e.m+"/"+a+":setIamPolicy",u:H(g,f),G:Gf});d.call(c,f)};w("ee.data.setAssetAcl",Wm); -var Xm=function(a,b,c){var d=Lk(b);b=Sc(d.i()).keys.filter(function(e){return"properties"!==e&&G(d,e)}).map(function(e){return e.replace(/([A-Z])/g,function(g,f){return"_"+f.toLowerCase()})}).concat(Object.keys(d.properties||{}).map(function(e){return'properties."'+e+'"'}));Vm(a,d,b,c)};w("ee.data.setAssetProperties",Xm); -var Ym=function(a,b){var c=Gk(a);b=new J(b);var d=b.assets(),e=d.j.C;d.j.C=function(g,f){"^projects\\/[^/]+\\/assets\\/.+$"===f.source&&(f=RegExp("^projects/[^/]+/assets/.*$"));return e(g,f)};c=d.get(c,{prettyPrint:!1});return b.handle(c.then(function(g){if(!(g instanceof lf&&g.quota))throw Error(a+" is not a root folder.");g=g.quota;return{asset_count:{usage:Number(g.Pe||0),limit:Number(g.Nf||0)},asset_size:{usage:Number(g.sizeBytes||0),limit:Number(g.Wb||0)}}}))};w("ee.data.getAssetRootQuota",Ym); -var Zm=function(){this.default=this.tag=""};Zm.prototype.get=function(){return this.tag};Zm.prototype.set=function(a){this.tag=this.validate(a)};Zm.prototype.reset=function(){this.tag=this.default}; -Zm.prototype.validate=function(a){if(null==a||""===a)return"";a=String(a);if(!/^([a-z0-9]|[a-z0-9][-_a-z0-9]{0,61}[a-z0-9])$/g.test(a))throw Error('Invalid tag, "'+a+'". Tags must be 1-63 characters, beginning and ending with a lowercase alphanumeric character ([a-z0-9]) with dashes (-), underscores (_), and lowercase alphanumerics between.');return a};var Ul=function(){return Nl(Zm).get()};w("ee.data.getWorkloadTag",Ul);var $m=function(a){Nl(Zm).set(a)};w("ee.data.setWorkloadTag",$m); -var an=function(a){var b=Nl(Zm);b.default=b.validate(a);Nl(Zm).set(a)};w("ee.data.setDefaultWorkloadTag",an);var bn=function(a){a&&(a=Nl(Zm),a.default=a.validate(""));Nl(Zm).reset()};w("ee.data.resetWorkloadTag",bn);var um={Hl:"CANCEL",Kl:"UPDATE"};var N=function(a,b,c){if(!(this instanceof N))return cn(N,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.I=a;this.args=b;this.U=c||null;this.zl=null};x(N,lk);w("ee.ComputedObject",N);N.prototype.Eh=function(){return this.zl};N.prototype.evaluate=function(a){if(!a||"function"!==typeof a)throw Error("evaluate() requires a callback function.");$l(this,a)}; -N.prototype.evaluate=N.prototype.evaluate;N.prototype.V=function(a){return $l(this,a)};N.prototype.getInfo=N.prototype.V;N.prototype.encode=function(a){if(null===this.I&&null===this.args)return{type:"ArgumentRef",value:this.U};var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.I);b["string"===typeof a?"functionName":"function"]=a;return b}; -N.prototype.na=function(a){if(null===this.I&&null===this.args){a=this.U||a.Ri;if(!a)throw Error("A mapped function's arguments cannot be used in client-side operations");return new Le({Mb:a})}var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=ok(ul(a,this.args[c])));return"string"===typeof this.I?rk(String(this.I),b):this.I.Ed(a,b)};N.prototype.va=function(a){return(void 0===a?0:a)?il(this):sl(this)};N.prototype.serialize=N.prototype.va; -N.prototype.toString=function(){return"ee."+this.name()+"("+kl(this)+")"};w("ee.ComputedObject.prototype.toString",N.prototype.toString);N.prototype.name=function(){return"ComputedObject"};N.prototype.Gg=function(a,b){var c=Array.from(arguments);c[0]=this;a.apply(r,c);return this};N.prototype.aside=N.prototype.Gg; -var dn=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.I=b.I;a.args=b.args;a.U=b.U;return a},cn=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var en={},fn=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}},gn=function(a){return"number"===typeof a||a instanceof N&&"Number"==a.name()},hn=function(a){return"string"===typeof a||a instanceof N&&"String"==a.name()},jn=function(a){return t(a)&& -"function"!==typeof a?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1},kn=function(a,b,c){c=void 0===c?!1:c;return 1===a.length&&jn(a[0])&&(a=b.args,c&&(a=a.slice(1)),a.length)?!(1===a.length||a[1].optional)||"Dictionary"!==a[0].type:!1};var ln=function(){if(!(this instanceof ln))return new ln};x(ln,lk);w("ee.Function",ln);var mn=qc;ln.prototype.call=function(a){return this.apply(nn(this,Array.prototype.slice.call(arguments,0)))};ln.prototype.call=ln.prototype.call;ln.prototype.apply=function(a){a=new N(this,on(this,a));return mn(a,this.Z().returns)};ln.prototype.apply=ln.prototype.apply; -var pn=function(a,b,c){var d=void 0!==b,e=a.Z();if(kn(c,e,d)){if(c=Rb(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=nn(a,d?[b].concat(c):c);return a.apply(c)},on=function(a,b){for(var c=a.Z().args,d={},e={},g=0;g/,"");for(var l=0;l/,"");return new O(f,g)}),a&&a())};a?Tl(c):c(Tl())}},yn=function(a,b,c,d){un();var e=d||"";Fb(sn,function(g,f){var l=f.split(".");if(2==l.length&&l[0]==b){l=e+l[1];var m=g.Z();tn[f]=!0;var p=!1;m.args.length&&(f=m.args[0].type,p="Object"!=f&&fn(f,c)); -f=p?a.prototype:a;l in f&&!f[l].signature||(f[l]=function(v){return pn(g,p?this:void 0,Array.prototype.slice.call(arguments,0))},f[l].toString=u(g.toString,g,l,p),f[l].signature=m)}})},zn=function(a){var b=function(c){for(var d in c)"function"===typeof c[d]&&c[d].signature&&delete c[d]};b(a);b(a.prototype||{})};var R=function(a,b){var c=An(a),d=Wa(c,function(m){return m.replace(/^opt_/,"")});a=(a=r.EXPORTED_FN_INFO?r.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},g=b[0],f=t(g)&&"function"!==typeof g&&!Array.isArray(g)&&"Object"===Object.getPrototypeOf(g).constructor.name;if(1d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(g=0;g=arguments.length){var c=arguments[0];if(b=jn(c))a:{b=Lb(c);var d=["properties"];if(xa(b)&&xa(d)&&b.length==d.length){for(var e=b.length,g=0;ga))throw Error("Geometry.BBox: west must not be "+a);if(!(-Infinity=b))throw Error("Geometry.BBox: south must be at most +90\u00b0, but was "+b+"\u00b0");if(!(-90<=d))throw Error("Geometry.BBox: north must be at least -90\u00b0, but was "+ -d+"\u00b0");b=Math.max(b,-90);d=Math.min(d,90);360<=c-a?(a=-180,c=180):(a=Rn(a),c=Rn(c),ca&&(a+=360);return a},Sn=function(a,b,c,d){if(!(this instanceof Sn))return Ln(Sn,arguments);U.call(this,Mn(Sn,"LineString",2,arguments))};x(Sn,U);U.LineString=Sn; -var Tn=function(a,b,c,d){if(!(this instanceof Tn))return Ln(Tn,arguments);U.call(this,Mn(Tn,"LinearRing",2,arguments))};x(Tn,U);U.LinearRing=Tn;var Un=function(a,b,c,d){if(!(this instanceof Un))return Ln(Un,arguments);U.call(this,Mn(Un,"MultiLineString",3,arguments))};x(Un,U);U.MultiLineString=Un;var Vn=function(a,b,c,d,e){if(!(this instanceof Vn))return Ln(Vn,arguments);U.call(this,Mn(Vn,"Polygon",3,arguments))};x(Vn,U);U.Polygon=Vn; -var Wn=function(a,b,c,d,e){if(!(this instanceof Wn))return Ln(Wn,arguments);U.call(this,Mn(Wn,"MultiPolygon",4,arguments))};x(Wn,U);U.MultiPolygon=Wn; +"IMAGE_COLLECTION";break a;case "Folder":c="FOLDER"}a.type=c;e=new J(e);return e.handle(e.assets().create(d,a,{assetId:b}).then(Ik))};w("ee.data.createAsset",Qm);var Rm=function(a,b,c){return Qm({type:"Folder"},a,b,void 0,c)};w("ee.data.createFolder",Rm);var Sm=function(a,b,c){a=Hk(a);b=Hk(b);b=new ug({Qb:b});c=new J(c);c.handle(c.assets().move(a,b).then(Ik))};w("ee.data.renameAsset",Sm); +var Tm=function(a,b,c,d){a=Hk(a);b=Hk(b);c=new df({Qb:b,overwrite:null!=c?c:null});d=new J(d);b=d.handle;var e=d.assets();var g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:c,B:"POST",D:"earthengine.projects.assets.copy",path:"/"+e.m+"/"+a+":copy",u:H(g,f),G:lf});b.call(d,g.then(Ik))};w("ee.data.copyAsset",Tm);var Um=function(a,b){b=new J(b);b.handle(b.assets().delete(Hk(a)))};w("ee.data.deleteAsset",Um); +var Vm=function(a,b){a=Hk(a);var c=new $f;b=new J(b);var d=b.handle,e=b.assets(),g={prettyPrint:!1};g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));f=I(e.j,{body:c,B:"POST",D:"earthengine.projects.assets.getIamPolicy",path:"/"+e.m+"/"+a+":getIamPolicy",u:H(g,f),G:Gf});return d.call(b,f.then(Qk))};w("ee.data.getAssetAcl",Vm); +var Wm=function(a,b,c,d){b=new Ng({Nb:b,updateMask:(c||[]).join(",")});d=new J(d);c=d.handle;var e=d.assets();a=Hk(a);var g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));g=I(e.j,{body:b,B:"PATCH",D:"earthengine.projects.assets.patch",path:"/"+e.m+"/"+a,u:H(g,f),G:lf});return c.call(d,g.then(Ik))};w("ee.data.updateAsset",Wm); +var Xm=function(a,b,c){a=Hk(a);b=Rk(b);b=new Hg({kb:b});c=new J(c);var d=c.handle,e=c.assets(),g={prettyPrint:!1};g=void 0===g?{}:g;var f=void 0===f?{}:f;e.j.C(a,RegExp("^projects/[^/]+/assets/.*$"));f=I(e.j,{body:b,B:"POST",D:"earthengine.projects.assets.setIamPolicy",path:"/"+e.m+"/"+a+":setIamPolicy",u:H(g,f),G:Gf});d.call(c,f)};w("ee.data.setAssetAcl",Xm); +var Ym=function(a,b,c){var d=Mk(b);b=Sc(d.i()).keys.filter(function(e){return"properties"!==e&&G(d,e)}).map(function(e){return e.replace(/([A-Z])/g,function(g,f){return"_"+f.toLowerCase()})}).concat(Object.keys(d.properties||{}).map(function(e){return'properties."'+e+'"'}));Wm(a,d,b,c)};w("ee.data.setAssetProperties",Ym); +var Zm=function(a,b){var c=Hk(a);b=new J(b);var d=b.assets(),e=d.j.C;d.j.C=function(g,f){"^projects\\/[^/]+\\/assets\\/.+$"===f.source&&(f=RegExp("^projects/[^/]+/assets/.*$"));return e(g,f)};c=d.get(c,{prettyPrint:!1});return b.handle(c.then(function(g){if(!(g instanceof lf&&g.quota))throw Error(a+" is not a root folder.");g=g.quota;return{asset_count:{usage:Number(g.Pe||0),limit:Number(g.Nf||0)},asset_size:{usage:Number(g.sizeBytes||0),limit:Number(g.Wb||0)}}}))};w("ee.data.getAssetRootQuota",Zm); +var $m=function(){this.default=this.tag=""};$m.prototype.get=function(){return this.tag};$m.prototype.set=function(a){this.tag=this.validate(a)};$m.prototype.reset=function(){this.tag=this.default}; +$m.prototype.validate=function(a){if(null==a||""===a)return"";a=String(a);if(!/^([a-z0-9]|[a-z0-9][-_a-z0-9]{0,61}[a-z0-9])$/g.test(a))throw Error('Invalid tag, "'+a+'". Tags must be 1-63 characters, beginning and ending with a lowercase alphanumeric character ([a-z0-9]) with dashes (-), underscores (_), and lowercase alphanumerics between.');return a};var Vl=function(){return Ol($m).get()};w("ee.data.getWorkloadTag",Vl);var an=function(a){Ol($m).set(a)};w("ee.data.setWorkloadTag",an); +var bn=function(a){var b=Ol($m);b.default=b.validate(a);Ol($m).set(a)};w("ee.data.setDefaultWorkloadTag",bn);var cn=function(a){a&&(a=Ol($m),a.default=a.validate(""));Ol($m).reset()};w("ee.data.resetWorkloadTag",cn);var vm={Hl:"CANCEL",Kl:"UPDATE"};var N=function(a,b,c){if(!(this instanceof N))return dn(N,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.I=a;this.args=b;this.U=c||null;this.zl=null};x(N,mk);w("ee.ComputedObject",N);N.prototype.Eh=function(){return this.zl};N.prototype.evaluate=function(a){if(!a||"function"!==typeof a)throw Error("evaluate() requires a callback function.");am(this,a)}; +N.prototype.evaluate=N.prototype.evaluate;N.prototype.V=function(a){return am(this,a)};N.prototype.getInfo=N.prototype.V;N.prototype.encode=function(a){if(null===this.I&&null===this.args)return{type:"ArgumentRef",value:this.U};var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.I);b["string"===typeof a?"functionName":"function"]=a;return b}; +N.prototype.na=function(a){if(null===this.I&&null===this.args){a=this.U||a.Ri;if(!a)throw Error("A mapped function's arguments cannot be used in client-side operations");return new Le({Mb:a})}var b={},c;for(c in this.args)void 0!==this.args[c]&&(b[c]=pk(vl(a,this.args[c])));return"string"===typeof this.I?sk(String(this.I),b):this.I.Ed(a,b)};N.prototype.va=function(a){return(void 0===a?0:a)?jl(this):tl(this)};N.prototype.serialize=N.prototype.va; +N.prototype.toString=function(){return"ee."+this.name()+"("+ll(this)+")"};w("ee.ComputedObject.prototype.toString",N.prototype.toString);N.prototype.name=function(){return"ComputedObject"};N.prototype.Gg=function(a,b){var c=Array.from(arguments);c[0]=this;a.apply(r,c);return this};N.prototype.aside=N.prototype.Gg; +var en=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.I=b.I;a.args=b.args;a.U=b.U;return a},dn=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var fn={},gn=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}},hn=function(a){return"number"===typeof a||a instanceof N&&"Number"==a.name()},jn=function(a){return"string"===typeof a||a instanceof N&&"String"==a.name()},kn=function(a){return t(a)&& +"function"!==typeof a?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1},ln=function(a,b,c){c=void 0===c?!1:c;return 1===a.length&&kn(a[0])&&(a=b.args,c&&(a=a.slice(1)),a.length)?!(1===a.length||a[1].optional)||"Dictionary"!==a[0].type:!1};var mn=function(){if(!(this instanceof mn))return new mn};x(mn,mk);w("ee.Function",mn);var nn=qc;mn.prototype.call=function(a){return this.apply(on(this,Array.prototype.slice.call(arguments,0)))};mn.prototype.call=mn.prototype.call;mn.prototype.apply=function(a){a=new N(this,pn(this,a));return nn(a,this.Z().returns)};mn.prototype.apply=mn.prototype.apply; +var qn=function(a,b,c){var d=void 0!==b,e=a.Z();if(ln(c,e,d)){if(c=Rb(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=on(a,d?[b].concat(c):c);return a.apply(c)},pn=function(a,b){for(var c=a.Z().args,d={},e={},g=0;g/,"");for(var l=0;l/,"");return new O(f,g)}),a&&a())};a?Ul(c):c(Ul())}},zn=function(a,b,c,d){vn();var e=d||"";Fb(tn,function(g,f){var l=f.split(".");if(2==l.length&&l[0]==b){l=e+l[1];var m=g.Z();un[f]=!0;var p=!1;m.args.length&&(f=m.args[0].type,p="Object"!=f&&gn(f,c)); +f=p?a.prototype:a;l in f&&!f[l].signature||(f[l]=function(v){return qn(g,p?this:void 0,Array.prototype.slice.call(arguments,0))},f[l].toString=u(g.toString,g,l,p),f[l].signature=m)}})},An=function(a){var b=function(c){for(var d in c)"function"===typeof c[d]&&c[d].signature&&delete c[d]};b(a);b(a.prototype||{})};var R=function(a,b){var c=Bn(a),d=Wa(c,function(m){return m.replace(/^opt_/,"")});a=(a=r.EXPORTED_FN_INFO?r.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},g=b[0],f=t(g)&&"function"!==typeof g&&!Array.isArray(g)&&"Object"===Object.getPrototypeOf(g).constructor.name;if(1d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(g=0;g=arguments.length){var c=arguments[0];if(b=kn(c))a:{b=Lb(c);var d=["properties"];if(xa(b)&&xa(d)&&b.length==d.length){for(var e=b.length,g=0;ga))throw Error("Geometry.BBox: west must not be "+a);if(!(-Infinity=b))throw Error("Geometry.BBox: south must be at most +90\u00b0, but was "+b+"\u00b0");if(!(-90<=d))throw Error("Geometry.BBox: north must be at least -90\u00b0, but was "+ +d+"\u00b0");b=Math.max(b,-90);d=Math.min(d,90);360<=c-a?(a=-180,c=180):(a=Sn(a),c=Sn(c),ca&&(a+=360);return a},Tn=function(a,b,c,d){if(!(this instanceof Tn))return Mn(Tn,arguments);U.call(this,Nn(Tn,"LineString",2,arguments))};x(Tn,U);U.LineString=Tn; +var Un=function(a,b,c,d){if(!(this instanceof Un))return Mn(Un,arguments);U.call(this,Nn(Un,"LinearRing",2,arguments))};x(Un,U);U.LinearRing=Un;var Vn=function(a,b,c,d){if(!(this instanceof Vn))return Mn(Vn,arguments);U.call(this,Nn(Vn,"MultiLineString",3,arguments))};x(Vn,U);U.MultiLineString=Vn;var Wn=function(a,b,c,d,e){if(!(this instanceof Wn))return Mn(Wn,arguments);U.call(this,Nn(Wn,"Polygon",3,arguments))};x(Wn,U);U.Polygon=Wn; +var Xn=function(a,b,c,d,e){if(!(this instanceof Xn))return Mn(Xn,arguments);U.call(this,Nn(Xn,"MultiPolygon",4,arguments))};x(Xn,U);U.MultiPolygon=Xn; U.prototype.encode=function(a){if(!this.ob){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return N.prototype.encode.call(this,a)}a={type:this.ob};"GeometryCollection"==this.ob?a.geometries=this.Dh:a.coordinates=this.dh;null!=this.ac&&(a.crs={type:"name",properties:{name:this.ac}});null!=this.qc&&(a.geodesic=this.qc);null!=this.oc&&(a.evenOdd=this.oc);return a}; -U.prototype.oe=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return this.encode()};U.prototype.toGeoJSON=U.prototype.oe;U.prototype.yg=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return(new si).va(this.oe())};U.prototype.toGeoJSONString=U.prototype.yg;U.prototype.va=function(a){return(void 0===a?0:a)?il(this):sl(this)};U.prototype.serialize=U.prototype.va; +U.prototype.oe=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return this.encode()};U.prototype.toGeoJSON=U.prototype.oe;U.prototype.yg=function(){if(this.I)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return(new vi).va(this.oe())};U.prototype.toGeoJSONString=U.prototype.yg;U.prototype.va=function(a){return(void 0===a?0:a)?jl(this):tl(this)};U.prototype.serialize=U.prototype.va; U.prototype.toString=function(){return"ee.Geometry("+this.yg()+")"}; U.prototype.na=function(a){if(!this.ob){if(!a)throw Error("Must specify a serializer when encoding a computed geometry.");return N.prototype.na.call(this,a)}var b={},c="";"GeometryCollection"===this.ob?(b.geometries=this.Dh.map(function(e){return new U(e)}),c="GeometryConstructors.MultiGeometry"):(b.coordinates=this.dh,c="GeometryConstructors."+this.ob);null!=this.ac&&(b.crs="string"===typeof this.ac?(new O("Projection")).call(this.ac):this.ac);var d="Point"!==this.ob&&"MultiPoint"!==this.ob;null!= this.qc&&d&&(b.geodesic=this.qc);null!=this.oc&&(b.evenOdd=this.oc);return(new O(c)).apply(b).na(a)}; -var In=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!Array.isArray(b))return!1;for(a=0;aa||4');}d.geometry=f;break;case "region":null!= -d.geometry&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof U)){l=f;if("string"===typeof f)try{l=JSON.parse(f)}catch(m){throw Error('Region string "'+f+'" is not valid GeoJSON.');}if(Array.isArray(l))f=new Vn(l,null,!1);else if(t(l))f=new U(l,null,!1);else throw Error("Region {region} was not convertible to an ee.Geometry.");}d.geometry=f;break;case "scale":d.scale=Number(f);break;default:c[l]=f}});Pb(d)||(d.input=a,a=g.some(function(f){return f in d})||e?rn("Image.clipToBoundsAndScale", -d):rn("Image.clip",d));return a},uo=function(a,b){var c=b.crs||"",d=b.crsTransform||b.crs_transform;null!=d&&(d=wo(d));if(!c&&!d)return a;if(d&&!c)throw Error('Must specify "crs" if "crsTransform" is specified.');if(d){if(a=rn("Image.reproject",{image:a,crs:c,crsTransform:d}),null!=b.dimensions&&null==b.scale&&null==b.region){var e=b.dimensions;"string"===typeof e&&(e=e.split("x").map(Number));2===e.length&&(delete b.dimensions,b.dimensions_consumed=!0,c=(new O("Projection")).call(c,d),b.region=new On([0, -0,e[0],e[1]],c,!1))}}else a=rn("Image.setDefaultProjection",{image:a,crs:c,crsTransform:[1,0,0,0,-1,0]});return a},wo=function(a){if("string"===typeof a)try{a=JSON.parse(a)}catch(b){}if(Array.isArray(a)){if(6===a.length&&Ya(a,function(b){return"number"===typeof b}))return a;throw Error("Invalid argument, crs transform must be a list of 6 numbers.");}throw Error("Invalid argument, crs transform was not a string or array.");},yo=function(a,b){var c={};b=xo(b,c);Pb(b)||(b.image=a,a=rn("Image.visualize", -b));c.image=a;return c},xo=function(a,b){var c="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),d={};Fb(a,function(e,g){$a(c,g)?d[g]=e:b[g]=e});return d},em=function(a,b){b=Object.assign({},b);var c=function(e){var g={};["crs","crs_transform","dimensions","region"].forEach(function(f){f in e&&(g[f]=e[f])});null!=e.scale&&null==e.dimensions&&(g.scale=e.scale);return g},d=function(e){var g=e.id;if(void 0===g)throw Error("Each band dictionary must have an id.");g=a.select(g); -var f=c(b);e=c(e);e=c(Object.assign(f,e));g=uo(g,e);return g=vo(g,e,{})};"ZIPPED_GEO_TIFF_PER_BAND"===b.format&&b.bands&&b.bands.length?(d=b.bands.map(d),a=d.reduce(function(e,g){return P("Image.addBands",e,g,null,!0)},d.shift())):(d=c(b),a=uo(a,d),a=vo(a,d,{}));return a};var M=function(a){if(!(this instanceof M))return cn(M,arguments);if(a instanceof M)return a;zo();var b=arguments.length;if(0==b||1==b&&void 0===a)T.call(this,new O("Image.mask"),{image:new M(0),mask:new M(0)});else if(1==b)if(gn(a))T.call(this,new O("Image.constant"),{value:a});else if(hn(a))T.call(this,new O("Image.load"),{id:a});else{if(Array.isArray(a))return Ao(Wa(a,function(d){return new M(d)}));if(a instanceof N)"Array"==a.name()?T.call(this,new O("Image.constant"),{value:a}):T.call(this,a.I, -a.args,a.U);else throw Error("Unrecognized argument type to convert to an Image: "+a);}else if(2==b){b=arguments[0];var c=arguments[1];if(hn(b)&&gn(c))T.call(this,new O("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)");};x(M,T);w("ee.Image",M);var Bo=!1,zo=function(){Bo||(yn(M,"Image","Image"),Bo=!0)};M.prototype.V=function(a){return M.L.V.call(this,a)}; -M.prototype.getInfo=M.prototype.V;M.prototype.S=function(a,b){var c=this,d=R(M.prototype.getMap,arguments),e=yo(this,d.visParams);if(d.callback){var g=d.callback;Wl(e,function(f,l){f=f?Object.assign(f,{image:c}):void 0;g(f,l)})}else return d=Wl(e),d.image=this,d};M.prototype.getMapId=M.prototype.S;M.prototype.getMap=M.prototype.S;M.prototype.getMap=M.prototype.getMap; -M.prototype.sb=function(a,b){var c=R(M.prototype.sb,arguments),d=c.params?Rb(c.params):{};d.image=this;if(c.callback){var e=c.callback;fm(d,function(g,f){g?e(gm(g)):e(null,f)})}else return gm(fm(d))};M.prototype.getDownloadURL=M.prototype.sb;M.prototype.Kd=function(a,b){var c=R(M.prototype.sb,arguments),d=c.params?Rb(c.params):{},e={},g=uo(this,d);g=vo(g,d,e);d=yo(g,e);return c.callback?(am(d,c.callback),null):am(d)};M.prototype.getThumbId=M.prototype.Kd; -M.prototype.xf=function(a,b){var c=R(M.prototype.xf,arguments);if(c.callback)this.Kd(c.params,function(d,e){var g="";if(void 0===e)try{g=dm(d)}catch(f){e=String(f.message)}c.callback(g,e)});else return dm(this.Kd(c.params))};M.prototype.getThumbURL=M.prototype.xf;var Co=function(a,b,c){var d=R(Co,arguments);return Ao([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};M.rgb=Co;var Do=function(a){return Ao(Array.prototype.slice.call(arguments),null)};M.cat=Do; -var Ao=function(a,b){if(0==a.length)return P("Image.constant",[]);for(var c=new M(a[0]),d=1;da||4');}d.geometry=f;break;case "region":null!= +d.geometry&&console.warn("Multiple request parameters converted to region.");if(!(f instanceof U)){l=f;if("string"===typeof f)try{l=JSON.parse(f)}catch(m){throw Error('Region string "'+f+'" is not valid GeoJSON.');}if(Array.isArray(l))f=new Wn(l,null,!1);else if(t(l))f=new U(l,null,!1);else throw Error("Region {region} was not convertible to an ee.Geometry.");}d.geometry=f;break;case "scale":d.scale=Number(f);break;default:c[l]=f}});Pb(d)||(d.input=a,a=g.some(function(f){return f in d})||e?sn("Image.clipToBoundsAndScale", +d):sn("Image.clip",d));return a},vo=function(a,b){var c=b.crs||"",d=b.crsTransform||b.crs_transform;null!=d&&(d=xo(d));if(!c&&!d)return a;if(d&&!c)throw Error('Must specify "crs" if "crsTransform" is specified.');if(d){if(a=sn("Image.reproject",{image:a,crs:c,crsTransform:d}),null!=b.dimensions&&null==b.scale&&null==b.region){var e=b.dimensions;"string"===typeof e&&(e=e.split("x").map(Number));2===e.length&&(delete b.dimensions,b.dimensions_consumed=!0,c=(new O("Projection")).call(c,d),b.region=new Pn([0, +0,e[0],e[1]],c,!1))}}else a=sn("Image.setDefaultProjection",{image:a,crs:c,crsTransform:[1,0,0,0,-1,0]});return a},xo=function(a){if("string"===typeof a)try{a=JSON.parse(a)}catch(b){}if(Array.isArray(a)){if(6===a.length&&Ya(a,function(b){return"number"===typeof b}))return a;throw Error("Invalid argument, crs transform must be a list of 6 numbers.");}throw Error("Invalid argument, crs transform was not a string or array.");},zo=function(a,b){var c={};b=yo(b,c);Pb(b)||(b.image=a,a=sn("Image.visualize", +b));c.image=a;return c},yo=function(a,b){var c="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),d={};Fb(a,function(e,g){$a(c,g)?d[g]=e:b[g]=e});return d},fm=function(a,b){b=Object.assign({},b);var c=function(e){var g={};["crs","crs_transform","dimensions","region"].forEach(function(f){f in e&&(g[f]=e[f])});null!=e.scale&&null==e.dimensions&&(g.scale=e.scale);return g},d=function(e){var g=e.id;if(void 0===g)throw Error("Each band dictionary must have an id.");g=a.select(g); +var f=c(b);e=c(e);e=c(Object.assign(f,e));g=vo(g,e);return g=wo(g,e,{})};"ZIPPED_GEO_TIFF_PER_BAND"===b.format&&b.bands&&b.bands.length?(d=b.bands.map(d),a=d.reduce(function(e,g){return P("Image.addBands",e,g,null,!0)},d.shift())):(d=c(b),a=vo(a,d),a=wo(a,d,{}));return a};var M=function(a){if(!(this instanceof M))return dn(M,arguments);if(a instanceof M)return a;Ao();var b=arguments.length;if(0==b||1==b&&void 0===a)T.call(this,new O("Image.mask"),{image:new M(0),mask:new M(0)});else if(1==b)if(hn(a))T.call(this,new O("Image.constant"),{value:a});else if(jn(a))T.call(this,new O("Image.load"),{id:a});else{if(Array.isArray(a))return Bo(Wa(a,function(d){return new M(d)}));if(a instanceof N)"Array"==a.name()?T.call(this,new O("Image.constant"),{value:a}):T.call(this,a.I, +a.args,a.U);else throw Error("Unrecognized argument type to convert to an Image: "+a);}else if(2==b){b=arguments[0];var c=arguments[1];if(jn(b)&&hn(c))T.call(this,new O("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)");};x(M,T);w("ee.Image",M);var Co=!1,Ao=function(){Co||(zn(M,"Image","Image"),Co=!0)};M.prototype.V=function(a){return M.L.V.call(this,a)}; +M.prototype.getInfo=M.prototype.V;M.prototype.S=function(a,b){var c=this,d=R(M.prototype.getMap,arguments),e=zo(this,d.visParams);if(d.callback){var g=d.callback;Xl(e,function(f,l){f=f?Object.assign(f,{image:c}):void 0;g(f,l)})}else return d=Xl(e),d.image=this,d};M.prototype.getMapId=M.prototype.S;M.prototype.getMap=M.prototype.S;M.prototype.getMap=M.prototype.getMap; +M.prototype.sb=function(a,b){var c=R(M.prototype.sb,arguments),d=c.params?Rb(c.params):{};d.image=this;if(c.callback){var e=c.callback;gm(d,function(g,f){g?e(hm(g)):e(null,f)})}else return hm(gm(d))};M.prototype.getDownloadURL=M.prototype.sb;M.prototype.Kd=function(a,b){var c=R(M.prototype.sb,arguments),d=c.params?Rb(c.params):{},e={},g=vo(this,d);g=wo(g,d,e);d=zo(g,e);return c.callback?(bm(d,c.callback),null):bm(d)};M.prototype.getThumbId=M.prototype.Kd; +M.prototype.xf=function(a,b){var c=R(M.prototype.xf,arguments);if(c.callback)this.Kd(c.params,function(d,e){var g="";if(void 0===e)try{g=em(d)}catch(f){e=String(f.message)}c.callback(g,e)});else return em(this.Kd(c.params))};M.prototype.getThumbURL=M.prototype.xf;var Do=function(a,b,c){var d=R(Do,arguments);return Bo([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};M.rgb=Do;var Eo=function(a){return Bo(Array.prototype.slice.call(arguments),null)};M.cat=Eo; +var Bo=function(a,b){if(0==a.length)return P("Image.constant",[]);for(var c=new M(a[0]),d=1;d"))+"_";for(e=0;e< -d.length;e++){var g=d[e],f=c+e;b[g].U=f;a.args[g].name=f}return a};var sp=function(a,b){if(!(this instanceof sp))return cn(sp,arguments);if(a instanceof sp)return a;tp();var c=R(sp,arguments);a=c.date;c=c.tz;var d=new O("Date"),e={},g=null;if(hn(a)){if(e.value=a,c)if(hn(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(gn(a))e.value=a;else if(ya(a))e.value=Math.floor(a.getTime());else if(a instanceof N)a.I&&"Date"==a.I.Z().returns?(d=a.I,e=a.args,g=a.U):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+ -a);N.call(this,d,e,g)};x(sp,N);w("ee.Date",sp);var up=!1,tp=function(){up||(yn(sp,"Date","Date"),up=!0)};sp.prototype.name=function(){return"Date"};w("ee.Deserializer",function(){});var wp=function(a){return vp(JSON.parse(a))};w("ee.Deserializer.fromJSON",wp);var vp=function(a){if("result"in a&&"values"in a)return xp(a);var b={};if(t(a)&&"CompoundValue"===a.type){for(var c=a.scope,d=0;d/,"");c[g]=!0}var f=r.ee,l;for(l in b)l in c&&!(l in f)&&(f[l]=Sp(l),Mp.push(l),a[l]?(f[l].signature=a[l],f[l].signature.isConstructor=!0,tn[l]=!0):f[l].signature={});en=f;Tp()}catch(m){Kp(m);return}Gp="ready";for(Hp=[];0a.y||a.y>=d)return c.createElement("div");var e=a.x%d;0>e&&(e+=d);d=new google.maps.Point(e,a.y);a=[a.x,a.y,b,this.yb++].join("-");e=this.ug.getUniqueId();a=[a,e].join("-");b=this.fh(d,b,c,a);b.tileSize=this.tileSize;gq(b.la,this.opacity);this.zb.set(a,b);jq(this,b);this.dispatchEvent(new kq(this.Nc()));this.ug.If(b,(new Date).getTime()/1E3);return b.la};h.releaseTile=function(a){var b=this.zb.get(a.id);this.zb.remove(a.id);b&&(b.abort(),Ha(b))}; -var jq=function(a,b){a.jb.Xa(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var c=b.gl,d=(new Date).getTime();Yp(this.ie,b.zoom).tileLatencies.push(d-c);this.dispatchEvent(new lq(this.Nc()));break;case "throttled":Yp(this.ie,b.zoom).throttleCount++;this.dispatchEvent(new mq(b.Ca));break;case "failed":Yp(this.ie,b.zoom).errorCount++;this.dispatchEvent(new nq(b.Ca,b.Uk));break;case "aborted":this.dispatchEvent(new oq(this.Nc()))}})}; -hq.prototype.J=function(){D.prototype.J.call(this);this.zb.forEach(Ha);this.zb.clear();this.zb=null;Ha(this.jb);this.ug=this.jb=null};var iq=function(a,b){return Za(a.zb.aa(),function(c){return c.getStatus()==b})};w("ee.layers.AbstractOverlay",hq);hq.prototype.removeTileCallback=hq.prototype.bg;hq.prototype.addTileCallback=hq.prototype.Oe;var lq=function(){A.call(this,"tile-load")};q(lq,A);var kq=function(){A.call(this,"tile-start")};q(kq,A);var mq=function(){A.call(this,"tile-throttle")};q(mq,A); -var nq=function(a,b){A.call(this,"tile-fail");this.errorMessage=b};q(nq,A);var oq=function(){A.call(this,"tile-abort")};q(oq,A);var pq=function(a,b,c,d){D.call(this);this.rb=a;this.zoom=b;this.la=c.createElement("div");this.la.id=d;this.jl=5;this.de=function(){};this.ke="new";this.wi=0;this.Ff=!1};q(pq,D);pq.prototype.getDiv=function(){return this.la}; -var rq=function(a){if(!a.Ff&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");qq(a,"loading");a.gl=(new Date).getTime();a.Za=new Xi;a.Za.xc="blob";a.Za.Xa("complete",function(){var b=hj(a.Za),c=a.Za.getStatus();429==c&&qq(a,"throttled");if(Qi(c)){var d={};Fb(ij(a.Za),function(g,f){d[f.toLowerCase()]=g});a.Al=d;a.Di=b;a.Lc()}else if(b){var e=new fq;e.Xa("loadend",function(){a.gd(e.ca.result)});e.readAsText(b)}else a.gd("Failed to load tile.")}, -!1);a.Za.Vc("ready",Fa(Ha,a.Za));a.Ca&&a.Ca.endsWith("&profiling=1")&&(a.Ca=a.Ca.replace("&profiling=1",""),a.Za.headers.set("X-Earth-Engine-Computation-Profiling","1"));a.Za.send(a.Ca,"GET")};h=pq.prototype;h.Lc=function(){this.de(this);qq(this,"loaded")};h.Hc=function(){Ha(this.Za)}; -h.gd=function(a){var b=function(c){try{if(c=JSON.parse(c),c.error&&c.error.message)return c.error.message}catch(d){}return c};this.wi>=this.jl?(this.Uk=b(a),qq(this,"failed")):(this.Hc(),setTimeout(u(function(){this.Sa||(this.Ff=!0,rq(this),this.Ff=!1)},this),1E3*Math.pow(2,this.wi++)))};h.abort=function(){this.Hc();"aborted"!=this.getStatus()&&"removed"!=this.getStatus()&&qq(this,this.ke in sq?"removed":"aborted")};h.getStatus=function(){return this.ke};var qq=function(a,b){a.ke=b;a.dispatchEvent("status-changed")}; -pq.prototype.J=function(){D.prototype.J.call(this);this.Hc();this.la.remove();this.de=null};var sq={aborted:!0,failed:!0,loaded:!0,removed:!0};var tq=function(){y.call(this)};q(tq,y);var uq=function(a,b){hq.call(this,a,b);this.Tg=new zc;this.rh=new zc};q(uq,hq);uq.prototype.fh=function(a,b,c,d){var e=new vq(a,b,c,d);this.jb.Xa(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Tg.set(a,new Float32Array(e.yd)),this.rh.set(a,e.la))});return e};uq.prototype.J=function(){hq.prototype.J.call(this);this.rh=this.Tg=null};w("ee.layers.BinaryOverlay",uq);var vq=function(a,b,c,d){pq.call(this,a,b,c,d)};q(vq,pq); -vq.prototype.Lc=function(){var a=new fq;a.Xa("loadend",function(){this.yd=a.ca.result;pq.prototype.Lc.call(this)},void 0,this);a.readAsArrayBuffer(this.Di)};var wq=function(a){D.call(this);this.Rc={};this.Qc={};this.Tb=new Zp(this);this.X=a;this.Ye=!1};x(wq,D);var xq=["load","abort","error"],yq=function(a,b,c){if(c="string"===typeof c?c:c.src)a.Ye=!1,a.Rc[b]={src:c,eh:null}},zq=function(a,b){delete a.Rc[b];var c=a.Qc[b];c&&(delete a.Qc[b],a.Tb.se(c,xq,a.ei))}; -wq.prototype.start=function(){var a=this.Rc;Lb(a).forEach(function(b){var c=a[b];if(c&&(delete a[b],!this.Sa)){if(this.X){var d=this.X;d=(d?new qh(ph(d)):Ja||(Ja=new qh)).Sk("IMG")}else d=new Image;c.eh&&(d.crossOrigin=c.eh);this.Tb.Xa(d,xq,this.ei);this.Qc[b]=d;d.id=b;d.src=c.src}},this)}; -wq.prototype.ei=function(a){var b=a.currentTarget;if(b){if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";else return;"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));zq(this,b.id);this.dispatchEvent({type:a.type,target:b});!this.Sa&&Pb(this.Qc)&&Pb(this.Rc)&&!this.Ye&&(this.Ye=!0,this.dispatchEvent("complete"))}};wq.prototype.J=function(){delete this.Rc;delete this.Qc;Ha(this.Tb);wq.L.J.call(this)};var Aq=function(a,b){hq.call(this,a,b)};q(Aq,hq);Aq.prototype.fh=function(a,b,c,d){return new Bq(a,b,c,d)};w("ee.layers.ImageOverlay",Aq);var Bq=function(a,b,c,d){pq.call(this,a,b,c,d);this.de=Cq;this.Ih=this.ga=this.Qd=null;this.Xc=""};q(Bq,pq); -Bq.prototype.Lc=function(){try{var a=vj(this.Di);this.Xc=kd(a);var b=this.Xc!==ld.toString()?this.Xc:this.Ca}catch(c){b=this.Ca}this.ga=new wq;yq(this.ga,this.la.id+"-image",b);this.Ih=ac(this.ga,Dq,function(c){"load"==c.type?(this.Qd=c.target,pq.prototype.Lc.call(this)):this.gd()},void 0,this);this.ga.start()};Bq.prototype.Hc=function(){pq.prototype.Hc.call(this);this.ga&&(jc(this.Ih),Ha(this.ga))};Bq.prototype.J=function(){pq.prototype.J.call(this);this.Xc&&URL.revokeObjectURL(this.Xc)}; -var Cq=function(a){a.la.appendChild(a.Qd)},Dq=["load","abort","error"];var Eq=function(a){for(var b=arguments[0],c=1;cthis.Wd)throw Error("[goog.structs.Pool] Min can not be greater than max");this.Ta=new Hq;this.vb=new Ic;this.delay=0;this.Gf=null;this.rd()};x(Iq,y);Iq.prototype.Oc=function(){var a=Date.now();if(!(null!=this.Gf&&a-this.Gfthis.Wd&&0=this.R()){for(var c=this.Aa,d=0;d>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=Lq.prototype; +Z.prototype.name=function(){return"ImageCollection"};Z.prototype.elementType=function(){return M};var No=function(a){this.af=a;this.id=null},Po=function(a){var b={element:Oo(a)};Object.assign(b,a);b=Gb(b,function(c){return null!=c});return new No(b)};No.prototype.start=function(a,b){var c=this;B(this.af,"Task config must be specified for tasks to be started.");this.id=this.id||km(1)[0];Pa(this.id,"Failed to obtain task ID.");if(a)Bm(this.id,this.af,function(e,g){if(g)b(g);else{var f;c.id=null!=(f=e.taskId)?f:null;a()}});else{var d;this.id=null!=(d=Bm(this.id,this.af).taskId)?d:null}}; +No.prototype.start=No.prototype.start;var Qo=function(a,b,c,d,e,g,f,l,m,p,v){var z=R(Qo,arguments);z=Ro(z,"ASSET","EXPORT_IMAGE");return Po(z)};w("module$contents$ee$batch_Export.image.toAsset",Qo);var So=function(a,b,c,d,e,g,f,l,m,p,v,z,C,Q,oa){var S=R(So,arguments);S=Ro(S,"GOOGLE_CLOUD_STORAGE","EXPORT_IMAGE");return Po(S)};w("module$contents$ee$batch_Export.image.toCloudStorage",So);var To=function(a,b,c,d,e,g,f,l,m,p,v,z,C,Q,oa){var S=R(To,arguments);S=Ro(S,"DRIVE","EXPORT_IMAGE");return Po(S)}; +w("module$contents$ee$batch_Export.image.toDrive",To);var Uo=function(a,b,c,d,e,g,f,l,m,p,v,z,C){var Q=R(Uo,arguments);Q=Ro(Q,"GOOGLE_CLOUD_STORAGE","EXPORT_TILES");return Po(Q)};w("module$contents$ee$batch_Export.map.toCloudStorage",Uo);var Vo=function(a,b,c,d,e,g,f){var l=R(Vo,arguments);l=Ro(l,"GOOGLE_CLOUD_STORAGE","EXPORT_FEATURES");return Po(l)};w("module$contents$ee$batch_Export.table.toCloudStorage",Vo); +var Wo=function(a,b,c,d,e,g,f){var l=R(Wo,arguments);l.type="EXPORT_FEATURES";l=Ro(l,"DRIVE","EXPORT_FEATURES");return Po(l)};w("module$contents$ee$batch_Export.table.toDrive",Wo);var Xo=function(a,b,c,d){var e=R(Xo,arguments);e=Ro(e,"ASSET","EXPORT_FEATURES");return Po(e)};w("module$contents$ee$batch_Export.table.toAsset",Xo);var Yo=function(a,b,c,d,e,g,f){var l=R(Yo,arguments);l=Ro(l,"FEATURE_VIEW","EXPORT_FEATURES");return Po(l)};w("module$contents$ee$batch_Export.table.toFeatureView",Yo); +var Zo=function(a,b,c,d,e,g,f){var l=R(Zo,arguments);l=Ro(l,"BIGQUERY","EXPORT_FEATURES");return Po(l)};w("module$contents$ee$batch_Export.table.toBigQuery",Zo);var $o=function(a,b,c,d,e,g,f,l,m,p,v,z){var C=R($o,arguments);C=Ro(C,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO");return Po(C)};w("module$contents$ee$batch_Export.video.toCloudStorage",$o);var ap=function(a,b,c,d,e,g,f,l,m,p,v,z){var C=R(ap,arguments);C=Ro(C,"DRIVE","EXPORT_VIDEO");return Po(C)}; +w("module$contents$ee$batch_Export.video.toDrive",ap);var bp=function(a,b,c,d,e,g,f,l,m,p,v,z,C,Q,oa,S,Aa,Jb,ar,br){var yj=R(bp,arguments);yj=Ro(yj,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO_MAP");return Po(yj)};w("module$contents$ee$batch_Export.videoMap.toCloudStorage",bp);var cp=function(a,b,c){var d=R(cp,arguments);d=Ro(d,"ASSET","EXPORT_CLASSIFIER");return Po(d)};w("module$contents$ee$batch_Export.classifier.toAsset",cp); +var Oo=function(a){var b=function(d){return d in a},c=dp.find(b);B(1===Za(dp,b),'Expected a single "image", "collection" or "classifier" key.');b=a[c];if(!(b instanceof M||b instanceof Y||b instanceof Z||b instanceof T||b instanceof N))throw Error("Unknown element type provided: "+typeof b+". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection, ee.Element or ee.ComputedObject.");delete a[c];return b},Ro=function(a,b,c){var d=void 0===d?!0:d;var e={type:c};Object.assign(e,a);switch(c){case "EXPORT_IMAGE":null== +e.fileFormat&&(e.fileFormat="GeoTIFF");a=e.fileFormat;null==a&&(a="GEO_TIFF");a=a.toUpperCase();switch(a){case "TIFF":case "TIF":case "GEO_TIFF":case "GEOTIFF":a="GEO_TIFF";break;case "TF_RECORD":case "TF_RECORD_IMAGE":case "TFRECORD":a="TF_RECORD_IMAGE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'GEOTIFF', 'TFRECORD'.");}e.fileFormat=a;null!=e.formatOptions&&(a=ep(e,a),delete e.formatOptions,Object.assign(e,a));e=fp(e,b);null!=e.crsTransform&&(e.crs_transform=e.crsTransform, +delete e.crsTransform);break;case "EXPORT_TILES":b=fp(e,b);e=b.fileFormat;null==e&&(e="AUTO_JPEG_PNG");e=e.toUpperCase();switch(e){case "AUTO":case "AUTO_JPEG_PNG":case "AUTO_JPG_PNG":e="AUTO_JPEG_PNG";break;case "JPG":case "JPEG":e="JPEG";break;case "PNG":e="PNG";break;default:throw Error("Invalid file format "+e+". Supported formats are: 'AUTO', 'PNG', and 'JPEG'.");}b.fileFormat=e;e=b;break;case "EXPORT_FEATURES":Array.isArray(e.selectors)&&(e.selectors=e.selectors.join());a=e.fileFormat;null== +a&&(a="CSV");a=a.toUpperCase();switch(a){case "CSV":a="CSV";break;case "JSON":case "GEOJSON":case "GEO_JSON":a="GEO_JSON";break;case "KML":a="KML";break;case "KMZ":a="KMZ";break;case "SHP":a="SHP";break;case "TF_RECORD":case "TF_RECORD_TABLE":case "TFRECORD":a="TF_RECORD_TABLE";break;default:throw Error("Invalid file format "+a+". Supported formats are: 'CSV', 'GeoJSON', 'KML', 'KMZ', 'SHP', and 'TFRecord'.");}e.fileFormat=a;e=fp(e,b);break;case "EXPORT_VIDEO":e=gp(e);e=fp(e,b);null!=e.crsTransform&& +(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_VIDEO_MAP":e=gp(e);e.version=e.version||"V1";e.stride=e.stride||1;e.tileDimensions={width:e.tileWidth||256,height:e.tileHeight||256};e=fp(e,b);break;case "EXPORT_CLASSIFIER":e=fp(e,b);break;default:throw Error("Unknown export type: "+e.type);}if(d&&null!=e.region){d=e;b=e.region;if(b instanceof U)b=b.oe();else if("string"===typeof b)try{b=Ra(JSON.parse(b))}catch(g){throw Error("Invalid format for region property. Region must be GeoJSON LinearRing or Polygon specified as actual coordinates or serialized as a string. See Export documentation."); +}if(!(t(b)&&"type"in b))try{new Tn(b)}catch(g){try{new Wn(b)}catch(f){throw Error("Invalid format for region property. Region must be GeoJSON LinearRing or Polygon specified as actual coordinates or serialized as a string. See Export documentation.");}}b=JSON.stringify(b);d.region=b}return e},fp=function(a,b){switch(b){case "GOOGLE_CLOUD_STORAGE":a.outputBucket=a.bucket||"";a.outputPrefix=a.fileNamePrefix||a.path||"";delete a.fileNamePrefix;delete a.path;delete a.bucket;break;case "ASSET":a.assetId= +a.assetId||"";break;case "FEATURE_VIEW":a.mapName=a.mapName||"";break;case "BIGQUERY":a.table=a.table||"";break;default:b=wa(a.folder);if(!$a(["string","undefined"],b))throw Error('Error: toDrive "folder" parameter must be a string, but is of type '+b+".");a.driveFolder=a.folder||"";a.driveFileNamePrefix=a.fileNamePrefix||"";delete a.folder;delete a.fileNamePrefix}return a},hp={GEO_TIFF:["cloudOptimized","fileDimensions","noData","shardSize"],TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")}, +ip={GEO_TIFF:"tiff",TF_RECORD_IMAGE:"tfrecord"},gp=function(a){a.videoOptions=a.framesPerSecond||5;a.maxFrames=a.maxFrames||1E3;a.maxPixels=a.maxPixels||1E8;var b=a.fileFormat;null==b&&(b="MP4");b=b.toUpperCase();switch(b){case "MP4":b="MP4";break;case "GIF":case "JIF":b="GIF";break;case "VP9":case "WEBM":b="VP9";break;default:throw Error("Invalid file format "+b+". Supported formats are: 'MP4', 'GIF', and 'WEBM'.");}a.fileFormat=b;return a},ep=function(a,b){var c=a.formatOptions;if(null==c)return{}; +if(Object.keys(a).some(function(m){return null!==c&&m in c}))throw Error("Parameter specified at least twice: once in config, and once in config format options.");a=ip[b];for(var d=hp[b],e={},g=n(Object.entries(c)),f=g.next();!f.done;f=g.next()){var l=n(f.value);f=l.next().value;l=l.next().value;if(!$a(d,f))throw Error('"'+f+'" is not a valid option, the image format "'+b+'""may have the following options: '+(d.join(", ")+'".'));e[a+f[0].toUpperCase()+f.substring(1)]=Array.isArray(l)?l.join():l}return e}, +dp=["image","collection","classifier"];var jp=function(a){if(!(this instanceof jp))return dn(jp,arguments);if(a instanceof jp)return a;kp();if("number"===typeof a)N.call(this,null,null),this.Wc=a;else if(a instanceof N)N.call(this,a.I,a.args,a.U),this.Wc=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};x(jp,N);w("ee.Number",jp);var lp=!1,kp=function(){lp||(zn(jp,"Number","Number"),lp=!0)};jp.prototype.encode=function(a){return"number"===typeof this.Wc?this.Wc:jp.L.encode.call(this,a)}; +jp.prototype.na=function(a){return"number"===typeof this.Wc?pk(vl(a,this.Wc)):jp.L.na.call(this,a)};jp.prototype.name=function(){return"Number"};var mp=function(a){if(!(this instanceof mp))return dn(mp,arguments);if(a instanceof mp)return a;np();if("string"===typeof a)N.call(this,null,null),this.jd=a;else if(a instanceof N)this.jd=null,a.I&&"String"==a.I.Z().returns?N.call(this,a.I,a.args,a.U):N.call(this,new O("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};x(mp,N);w("ee.String",mp);var op=!1,np=function(){op||(zn(mp,"String","String"),op=!0)}; +mp.prototype.encode=function(a){return"string"===typeof this.jd?this.jd:mp.L.encode.call(this,a)};mp.prototype.na=function(a){return"string"===typeof this.jd?pk(vl(a,this.jd)):mp.L.na.call(this,a)};mp.prototype.name=function(){return"String"};var pp=function(a,b){if(!(this instanceof pp))return dn(pp,arguments);for(var c=[],d=a.args,e=0;e"))+"_";for(e=0;e< +d.length;e++){var g=d[e],f=c+e;b[g].U=f;a.args[g].name=f}return a};var tp=function(a,b){if(!(this instanceof tp))return dn(tp,arguments);if(a instanceof tp)return a;up();var c=R(tp,arguments);a=c.date;c=c.tz;var d=new O("Date"),e={},g=null;if(jn(a)){if(e.value=a,c)if(jn(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(hn(a))e.value=a;else if(ya(a))e.value=Math.floor(a.getTime());else if(a instanceof N)a.I&&"Date"==a.I.Z().returns?(d=a.I,e=a.args,g=a.U):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+ +a);N.call(this,d,e,g)};x(tp,N);w("ee.Date",tp);var vp=!1,up=function(){vp||(zn(tp,"Date","Date"),vp=!0)};tp.prototype.name=function(){return"Date"};w("ee.Deserializer",function(){});var xp=function(a){return wp(JSON.parse(a))};w("ee.Deserializer.fromJSON",xp);var wp=function(a){if("result"in a&&"values"in a)return yp(a);var b={};if(t(a)&&"CompoundValue"===a.type){for(var c=a.scope,d=0;d/,"");c[g]=!0}var f=r.ee,l;for(l in b)l in c&&!(l in f)&&(f[l]=Tp(l),Np.push(l),a[l]?(f[l].signature=a[l],f[l].signature.isConstructor=!0,un[l]=!0):f[l].signature={});fn=f;Up()}catch(m){Lp(m);return}Hp="ready";for(Ip=[];0a.y||a.y>=d)return c.createElement("div");var e=a.x%d;0>e&&(e+=d);d=new google.maps.Point(e,a.y);a=[a.x,a.y,b,this.yb++].join("-");e=this.ug.getUniqueId();a=[a,e].join("-");b=this.fh(d,b,c,a);b.tileSize=this.tileSize;hq(b.la,this.opacity);this.zb.set(a,b);kq(this,b);this.dispatchEvent(new lq(this.Nc()));this.ug.If(b,(new Date).getTime()/1E3);return b.la};h.releaseTile=function(a){var b=this.zb.get(a.id);this.zb.remove(a.id);b&&(b.abort(),Ha(b))}; +var kq=function(a,b){a.jb.Xa(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var c=b.gl,d=(new Date).getTime();Zp(this.ie,b.zoom).tileLatencies.push(d-c);this.dispatchEvent(new mq(this.Nc()));break;case "throttled":Zp(this.ie,b.zoom).throttleCount++;this.dispatchEvent(new nq(b.Ca));break;case "failed":Zp(this.ie,b.zoom).errorCount++;this.dispatchEvent(new oq(b.Ca,b.Uk));break;case "aborted":this.dispatchEvent(new pq(this.Nc()))}})}; +iq.prototype.J=function(){D.prototype.J.call(this);this.zb.forEach(Ha);this.zb.clear();this.zb=null;Ha(this.jb);this.ug=this.jb=null};var jq=function(a,b){return Za(a.zb.aa(),function(c){return c.getStatus()==b})};w("ee.layers.AbstractOverlay",iq);iq.prototype.removeTileCallback=iq.prototype.bg;iq.prototype.addTileCallback=iq.prototype.Oe;var mq=function(){A.call(this,"tile-load")};q(mq,A);var lq=function(){A.call(this,"tile-start")};q(lq,A);var nq=function(){A.call(this,"tile-throttle")};q(nq,A); +var oq=function(a,b){A.call(this,"tile-fail");this.errorMessage=b};q(oq,A);var pq=function(){A.call(this,"tile-abort")};q(pq,A);var qq=function(a,b,c,d){D.call(this);this.rb=a;this.zoom=b;this.la=c.createElement("div");this.la.id=d;this.jl=5;this.de=function(){};this.ke="new";this.wi=0;this.Ff=!1};q(qq,D);qq.prototype.getDiv=function(){return this.la}; +var sq=function(a){if(!a.Ff&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");rq(a,"loading");a.gl=(new Date).getTime();a.Za=new $i;a.Za.xc="blob";a.Za.Xa("complete",function(){var b=kj(a.Za),c=a.Za.getStatus();429==c&&rq(a,"throttled");if(Ti(c)){var d={};Fb(lj(a.Za),function(g,f){d[f.toLowerCase()]=g});a.Al=d;a.Di=b;a.Lc()}else if(b){var e=new gq;e.Xa("loadend",function(){a.gd(e.ca.result)});e.readAsText(b)}else a.gd("Failed to load tile.")}, +!1);a.Za.Vc("ready",Fa(Ha,a.Za));a.Ca&&a.Ca.endsWith("&profiling=1")&&(a.Ca=a.Ca.replace("&profiling=1",""),a.Za.headers.set("X-Earth-Engine-Computation-Profiling","1"));a.Za.send(a.Ca,"GET")};h=qq.prototype;h.Lc=function(){this.de(this);rq(this,"loaded")};h.Hc=function(){Ha(this.Za)}; +h.gd=function(a){var b=function(c){try{if(c=JSON.parse(c),c.error&&c.error.message)return c.error.message}catch(d){}return c};this.wi>=this.jl?(this.Uk=b(a),rq(this,"failed")):(this.Hc(),setTimeout(u(function(){this.Sa||(this.Ff=!0,sq(this),this.Ff=!1)},this),1E3*Math.pow(2,this.wi++)))};h.abort=function(){this.Hc();"aborted"!=this.getStatus()&&"removed"!=this.getStatus()&&rq(this,this.ke in tq?"removed":"aborted")};h.getStatus=function(){return this.ke};var rq=function(a,b){a.ke=b;a.dispatchEvent("status-changed")}; +qq.prototype.J=function(){D.prototype.J.call(this);this.Hc();this.la.remove();this.de=null};var tq={aborted:!0,failed:!0,loaded:!0,removed:!0};var uq=function(){y.call(this)};q(uq,y);var vq=function(a,b){iq.call(this,a,b);this.Tg=new zc;this.rh=new zc};q(vq,iq);vq.prototype.fh=function(a,b,c,d){var e=new wq(a,b,c,d);this.jb.Xa(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Tg.set(a,new Float32Array(e.yd)),this.rh.set(a,e.la))});return e};vq.prototype.J=function(){iq.prototype.J.call(this);this.rh=this.Tg=null};w("ee.layers.BinaryOverlay",vq);var wq=function(a,b,c,d){qq.call(this,a,b,c,d)};q(wq,qq); +wq.prototype.Lc=function(){var a=new gq;a.Xa("loadend",function(){this.yd=a.ca.result;qq.prototype.Lc.call(this)},void 0,this);a.readAsArrayBuffer(this.Di)};var xq=function(a){D.call(this);this.Rc={};this.Qc={};this.Tb=new $p(this);this.X=a;this.Ye=!1};x(xq,D);var yq=["load","abort","error"],zq=function(a,b,c){if(c="string"===typeof c?c:c.src)a.Ye=!1,a.Rc[b]={src:c,eh:null}},Aq=function(a,b){delete a.Rc[b];var c=a.Qc[b];c&&(delete a.Qc[b],a.Tb.se(c,yq,a.ei))}; +xq.prototype.start=function(){var a=this.Rc;Lb(a).forEach(function(b){var c=a[b];if(c&&(delete a[b],!this.Sa)){if(this.X){var d=this.X;d=(d?new qh(ph(d)):Ja||(Ja=new qh)).Sk("IMG")}else d=new Image;c.eh&&(d.crossOrigin=c.eh);this.Tb.Xa(d,yq,this.ei);this.Qc[b]=d;d.id=b;d.src=c.src}},this)}; +xq.prototype.ei=function(a){var b=a.currentTarget;if(b){if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";else return;"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));Aq(this,b.id);this.dispatchEvent({type:a.type,target:b});!this.Sa&&Pb(this.Qc)&&Pb(this.Rc)&&!this.Ye&&(this.Ye=!0,this.dispatchEvent("complete"))}};xq.prototype.J=function(){delete this.Rc;delete this.Qc;Ha(this.Tb);xq.L.J.call(this)};var Bq=function(a,b){iq.call(this,a,b)};q(Bq,iq);Bq.prototype.fh=function(a,b,c,d){return new Cq(a,b,c,d)};w("ee.layers.ImageOverlay",Bq);var Cq=function(a,b,c,d){qq.call(this,a,b,c,d);this.de=Dq;this.Ih=this.ga=this.Qd=null;this.Xc=""};q(Cq,qq); +Cq.prototype.Lc=function(){try{var a=zj(this.Di);this.Xc=kd(a);var b=this.Xc!==ld.toString()?this.Xc:this.Ca}catch(c){b=this.Ca}this.ga=new xq;zq(this.ga,this.la.id+"-image",b);this.Ih=ac(this.ga,Eq,function(c){"load"==c.type?(this.Qd=c.target,qq.prototype.Lc.call(this)):this.gd()},void 0,this);this.ga.start()};Cq.prototype.Hc=function(){qq.prototype.Hc.call(this);this.ga&&(jc(this.Ih),Ha(this.ga))};Cq.prototype.J=function(){qq.prototype.J.call(this);this.Xc&&URL.revokeObjectURL(this.Xc)}; +var Dq=function(a){a.la.appendChild(a.Qd)},Eq=["load","abort","error"];var Fq=function(a){for(var b=arguments[0],c=1;cthis.Wd)throw Error("[goog.structs.Pool] Min can not be greater than max");this.Ta=new Iq;this.vb=new Ic;this.delay=0;this.Gf=null;this.rd()};x(Jq,y);Jq.prototype.Oc=function(){var a=Date.now();if(!(null!=this.Gf&&a-this.Gfthis.Wd&&0=this.R()){for(var c=this.Aa,d=0;d>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};h=Mq.prototype; h.remove=function(){var a=this.Aa,b=a.length,c=a[0];if(!(0>=b)){if(1==b)a.length=0;else{a[0]=a.pop();a=0;b=this.Aa;for(var d=b.length,e=b[a];a>1;){var g=2*a+1,f=2*a+2;g=fe.getKey())break;b[a]=b[g];a=g}b[a]=e}return c.ue}};h.aa=function(){for(var a=this.Aa,b=[],c=a.length,d=0;dthis.kl)return!1;this.Kg++;zq(this.ga,this.fa);setTimeout(u(this.Bl,this),0);return!0}; -h.Bl=function(){if(!this.kc){var a=u(function(d){this.kc||(yq(this.ga,this.fa,d),ac(this.ga,Xq,u(this.Zk,this)),this.ga.start())},this),b=this.getUrl();if(Ld(b).Ba.Pb("profiling")){var c=new Xi;c.xc="blob";c.Xa("complete",u(function(){this.ni=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=kd(vj(hj(c)));var e=d!==ld.toString()}catch(g){}a(e?d:b)},this));c.Vc("ready",u(c.Ra,c));c.send(b,"GET")}else a(b)}};h.Kg=0;h.kc=!1;h.ga=null; -h.Oi=null;h.Ja=null;h.ni=null;var Xq=["load","abort","error"],Yq=function(){y.call(this);this.Ea=!1};q(Yq,y);Yq.prototype.setActive=function(a){this.Ea=a};Yq.prototype.isActive=function(){return this.Ea};var Tq=function(a,b){Oq.call(this,a,b)};q(Tq,Oq);Tq.prototype.bf=function(){return new Yq};Tq.prototype.Cd=function(a){a.Ra()};Tq.prototype.Sf=function(a){return!a.Sa&&!a.isActive()};var Zq=function(a,b,c,d,e){Nc.call(this,a,b,c,d,e);this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.name=d.name;this.wg=new Ic;this.Tf=1;this.ua=e||null};q(Zq,Nc);h=Zq.prototype;h.Oe=function(a){return bc(this,"tileevent",a)};h.bg=function(a){jc(a)}; -h.getTile=function(a,b,c){if(ba.y||a.y>=1<this.kl)return!1;this.Kg++;Aq(this.ga,this.fa);setTimeout(u(this.Bl,this),0);return!0}; +h.Bl=function(){if(!this.kc){var a=u(function(d){this.kc||(zq(this.ga,this.fa,d),ac(this.ga,Yq,u(this.Zk,this)),this.ga.start())},this),b=this.getUrl();if(Ld(b).Ba.Pb("profiling")){var c=new $i;c.xc="blob";c.Xa("complete",u(function(){this.ni=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=kd(zj(kj(c)));var e=d!==ld.toString()}catch(g){}a(e?d:b)},this));c.Vc("ready",u(c.Ra,c));c.send(b,"GET")}else a(b)}};h.Kg=0;h.kc=!1;h.ga=null; +h.Oi=null;h.Ja=null;h.ni=null;var Yq=["load","abort","error"],Zq=function(){y.call(this);this.Ea=!1};q(Zq,y);Zq.prototype.setActive=function(a){this.Ea=a};Zq.prototype.isActive=function(){return this.Ea};var Uq=function(a,b){Pq.call(this,a,b)};q(Uq,Pq);Uq.prototype.bf=function(){return new Zq};Uq.prototype.Cd=function(a){a.Ra()};Uq.prototype.Sf=function(a){return!a.Sa&&!a.isActive()};var $q=function(a,b,c,d,e){Nc.call(this,a,b,c,d,e);this.minZoom=d.minZoom||0;this.maxZoom=d.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=d.tileSize||new google.maps.Size(256,256);this.name=d.name;this.wg=new Ic;this.Tf=1;this.ua=e||null};q($q,Nc);h=$q.prototype;h.Oe=function(a){return bc(this,"tileevent",a)};h.bg=function(a){jc(a)}; +h.getTile=function(a,b,c){if(ba.y||a.y>=1< groups.length)) { var id = groups[0].match(/\r\nContent-ID: ]*)>/)[1], status = Number(groups[1].match(/^HTTP\S*\s(\d+)\s/)[1]), text = groups.slice(2).join("\r\n\r\n"); handle(id, status, text); @@ -18877,13 +18794,12 @@ module$contents$ee$apiclient_apiclient.setAuthToken = function(clientId, tokenTy var tokenObject = {token_type:tokenType, access_token:accessToken, state:scopes.join(" "), expires_in:expiresIn}; module$contents$ee$apiclient_apiclient.handleAuthResult_(void 0, void 0, tokenObject); !1 === updateAuthLibrary ? callback && callback() : module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function() { - goog.global.gapi.client.setToken(tokenObject); callback && callback(); }); }; module$contents$ee$apiclient_apiclient.refreshAuthToken = function(success, error, onImmediateFailed) { if (module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_()) { - var authArgs = {client_id:String(module$contents$ee$apiclient_apiclient.authClientId_), immediate:!0, scope:module$contents$ee$apiclient_apiclient.authScopes_.join(" "), plugin_name:"earthengine"}; + var authArgs = {client_id:String(module$contents$ee$apiclient_apiclient.authClientId_), scope:module$contents$ee$apiclient_apiclient.authScopes_.join(" "), plugin_name:"earthengine"}; module$contents$ee$apiclient_apiclient.authTokenRefresher_(authArgs, function(result) { if ("immediate_failed" == result.error && onImmediateFailed) { onImmediateFailed(); @@ -18892,7 +18808,7 @@ module$contents$ee$apiclient_apiclient.refreshAuthToken = function(success, erro try { module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function() { try { - goog.global.gapi.client.setToken(result), module$contents$ee$apiclient_apiclient.handleAuthResult_(success, error, result); + module$contents$ee$apiclient_apiclient.handleAuthResult_(success, error, result); } catch (e) { error(e.toString()); } @@ -18967,8 +18883,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded"; body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST")); method = method || "POST"; - var headers = {"Content-Type":contentType}, version = "0.1.386"; - "0.1.386" === version && (version = "latest"); + var headers = {"Content-Type":contentType}, version = "0.1.388"; + "0.1.388" === version && (version = "latest"); headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version; var authToken = module$contents$ee$apiclient_apiclient.getAuthToken(); if (null != authToken) { @@ -19077,22 +18993,14 @@ module$contents$ee$apiclient_apiclient.handleResponse_ = function(status, getRes }; module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_ = function(callback) { var done = function() { - goog.global.gapi.config.update("client/cors", !0); - module$contents$ee$apiclient_apiclient.authTokenRefresher_ || module$contents$ee$apiclient_apiclient.setAuthTokenRefresher(goog.global.gapi.auth2.authorize); + module$contents$ee$apiclient_apiclient.authTokenRefresher_ || module$contents$ee$apiclient_apiclient.setAuthTokenRefresher(function(authArgs, refresherCallback) { + goog.global.google.accounts.oauth2.initTokenClient({client_id:authArgs.client_id, callback:refresherCallback, scope:authArgs.scope}).requestAccessToken(); + }); callback(); }; - if (goog.isObject(goog.global.gapi) && goog.isObject(goog.global.gapi.auth2) && "function" === typeof goog.global.gapi.auth2.authorize) { - done(); - } else { - for (var callbackName = Date.now().toString(36); callbackName in goog.global;) { - callbackName += "_"; - } - goog.global[callbackName] = function() { - delete goog.global[callbackName]; - done(); - }; - goog.net.jsloader.safeLoad(module$contents$safevalues$builders$resource_url_builders_trustedResourceUrl($jscomp$templatelit$294235699$94, callbackName)); - } + (function() { + goog.isObject(goog.global.default_gsi) ? done() : goog.net.jsloader.safeLoad(module$contents$safevalues$builders$resource_url_builders_trustedResourceUrl($jscomp$templatelit$294235699$96)).addCallback(done); + })(); }; module$contents$ee$apiclient_apiclient.handleAuthResult_ = function(success, error, result) { if (result.access_token) { @@ -19109,8 +19017,8 @@ module$contents$ee$apiclient_apiclient.handleAuthResult_ = function(success, err } }; module$contents$ee$apiclient_apiclient.makeRequest_ = function(params) { - for (var request = new goog.Uri.QueryData(), $jscomp$iter$42 = $jscomp.makeIterator(Object.entries(params)), $jscomp$key$ = $jscomp$iter$42.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$42.next()) { - var $jscomp$destructuring$var47 = $jscomp.makeIterator($jscomp$key$.value), name = $jscomp$destructuring$var47.next().value, item = $jscomp$destructuring$var47.next().value; + for (var request = new goog.Uri.QueryData(), $jscomp$iter$42 = $jscomp.makeIterator(Object.entries(params)), $jscomp$key$294235699$98$ = $jscomp$iter$42.next(); !$jscomp$key$294235699$98$.done; $jscomp$key$294235699$98$ = $jscomp$iter$42.next()) { + var $jscomp$destructuring$var47 = $jscomp.makeIterator($jscomp$key$294235699$98$.value), name = $jscomp$destructuring$var47.next().value, item = $jscomp$destructuring$var47.next().value; request.set(name, item); } return request; @@ -19209,7 +19117,6 @@ module$contents$ee$apiclient_apiclient.AUTH_SCOPE_ = "https://www.googleapis.com module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_ = "https://www.googleapis.com/auth/earthengine.readonly"; module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_ = "https://www.googleapis.com/auth/cloud-platform"; module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_ = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; -module$contents$ee$apiclient_apiclient.AUTH_LIBRARY_URL_ = goog.string.Const.from("https://apis.google.com/js/client.js?onload=%{onload}"); module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_ = "https://www.googleapis.com/auth/devstorage.read_write"; module$contents$ee$apiclient_apiclient.cloudApiKey_ = null; module$contents$ee$apiclient_apiclient.initialized_ = !1; @@ -19228,6 +19135,8 @@ module$contents$ee$apiclient_apiclient.DEFAULT_API_BASE_URL_ = "https://eartheng module$contents$ee$apiclient_apiclient.DEFAULT_TILE_BASE_URL_ = "https://earthengine.googleapis.com"; module$contents$ee$apiclient_apiclient.AuthArgs = function() { }; +var module$contents$ee$apiclient_TokenClient = function() { +}; module$contents$ee$apiclient_apiclient.AuthResponse = function() { }; ee.apiclient.Call = module$contents$ee$apiclient_Call; @@ -19463,8 +19372,8 @@ ee.rpc_convert.algorithms = function(result) { algorithm.deprecated && (internalAlgorithm.deprecated = algorithm.deprecationReason); algorithm.sourceCodeUri && (internalAlgorithm.sourceCodeUri = algorithm.sourceCodeUri); return internalAlgorithm; - }, internalAlgorithms = {}, $jscomp$iter$43 = $jscomp.makeIterator(result.algorithms || []), $jscomp$key$algorithm = $jscomp$iter$43.next(); !$jscomp$key$algorithm.done; $jscomp$key$algorithm = $jscomp$iter$43.next()) { - var algorithm = $jscomp$key$algorithm.value, name = algorithm.name.replace(/^algorithms\//, ""); + }, internalAlgorithms = {}, $jscomp$iter$43 = $jscomp.makeIterator(result.algorithms || []), $jscomp$key$1418108943$48$algorithm = $jscomp$iter$43.next(); !$jscomp$key$1418108943$48$algorithm.done; $jscomp$key$1418108943$48$algorithm = $jscomp$iter$43.next()) { + var algorithm = $jscomp$key$1418108943$48$algorithm.value, name = algorithm.name.replace(/^algorithms\//, ""); internalAlgorithms[name] = convertAlgorithm(algorithm); } return internalAlgorithms; @@ -19613,8 +19522,8 @@ ee.rpc_convert.getListToListAssets = function(param) { param.bbox && param.region && console.warn("Multiple request parameters converted to region"); for (var allKeys = "id num starttime endtime bbox region".split(" "), $jscomp$iter$44 = $jscomp.makeIterator(Object.keys(param).filter(function(k) { return !allKeys.includes(k); - })), $jscomp$key$key = $jscomp$iter$44.next(); !$jscomp$key$key.done; $jscomp$key$key = $jscomp$iter$44.next()) { - console.warn("Unrecognized key " + $jscomp$key$key.value + " ignored"); + })), $jscomp$key$1418108943$49$key = $jscomp$iter$44.next(); !$jscomp$key$1418108943$49$key.done; $jscomp$key$1418108943$49$key = $jscomp$iter$44.next()) { + console.warn("Unrecognized key " + $jscomp$key$1418108943$49$key.value + " ignored"); } return ee.rpc_convert.processListImagesParams(assetsRequest); }; @@ -19837,8 +19746,8 @@ ee.rpc_convert.parseFilterParamsFromListImages_ = function(params) { })) { throw Error('Filter parameter "properties" must be an array of strings'); } - for (var $jscomp$iter$45 = $jscomp.makeIterator(params.properties), $jscomp$key$propertyQuery = $jscomp$iter$45.next(); !$jscomp$key$propertyQuery.done; $jscomp$key$propertyQuery = $jscomp$iter$45.next()) { - queryStrings.push($jscomp$key$propertyQuery.value.trim().replace(/^(properties\.)?/, "properties.")); + for (var $jscomp$iter$45 = $jscomp.makeIterator(params.properties), $jscomp$key$1418108943$50$propertyQuery = $jscomp$iter$45.next(); !$jscomp$key$1418108943$50$propertyQuery.done; $jscomp$key$1418108943$50$propertyQuery = $jscomp$iter$45.next()) { + queryStrings.push($jscomp$key$1418108943$50$propertyQuery.value.trim().replace(/^(properties\.)?/, "properties.")); } delete params.properties; } @@ -20174,8 +20083,8 @@ ee.Serializer.encodeCloudApiPretty = function(obj) { if (!goog.isObject(object)) { return object; } - for (var ret = Array.isArray(object) ? [] : {}, isNode = object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode), $jscomp$iter$46 = $jscomp.makeIterator(Object.entries(isNode ? object.Serializable$values : object)), $jscomp$key$ = $jscomp$iter$46.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$46.next()) { - var $jscomp$destructuring$var51 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var51.next().value, val = $jscomp$destructuring$var51.next().value; + for (var ret = Array.isArray(object) ? [] : {}, isNode = object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode), $jscomp$iter$46 = $jscomp.makeIterator(Object.entries(isNode ? object.Serializable$values : object)), $jscomp$key$1175707268$28$ = $jscomp$iter$46.next(); !$jscomp$key$1175707268$28$.done; $jscomp$key$1175707268$28$ = $jscomp$iter$46.next()) { + var $jscomp$destructuring$var51 = $jscomp.makeIterator($jscomp$key$1175707268$28$.value), key = $jscomp$destructuring$var51.next().value, val = $jscomp$destructuring$var51.next().value; isNode ? null !== val && (ret[key] = "functionDefinitionValue" === key && null != val.body ? {argumentNames:val.argumentNames, body:walkObject(values[val.body])} : "functionInvocationValue" === key && null != val.functionReference ? {arguments:module$contents$goog$object_map(val.arguments, walkObject), functionReference:walkObject(values[val.functionReference])} : "constantValue" === key ? val === module$exports$eeapiclient$domain_object.NULL_VALUE ? null : val : walkObject(val)) : ret[key] = walkObject(val); } @@ -20298,8 +20207,8 @@ ExpressionOptimizer.prototype.optimizeValue = function(value, depth) { return storeInSourceMap(value, optimized$jscomp$1); } if (null != value.dictionaryValue) { - for (var values = {}, constantValues = {}, $jscomp$iter$47 = $jscomp.makeIterator(Object.entries(value.dictionaryValue.values || {})), $jscomp$key$ = $jscomp$iter$47.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$47.next()) { - var $jscomp$destructuring$var53 = $jscomp.makeIterator($jscomp$key$.value), k = $jscomp$destructuring$var53.next().value, v = $jscomp$destructuring$var53.next().value; + for (var values = {}, constantValues = {}, $jscomp$iter$47 = $jscomp.makeIterator(Object.entries(value.dictionaryValue.values || {})), $jscomp$key$1175707268$29$ = $jscomp$iter$47.next(); !$jscomp$key$1175707268$29$.done; $jscomp$key$1175707268$29$ = $jscomp$iter$47.next()) { + var $jscomp$destructuring$var53 = $jscomp.makeIterator($jscomp$key$1175707268$29$.value), k = $jscomp$destructuring$var53.next().value, v = $jscomp$destructuring$var53.next().value; values[k] = this.optimizeValue(v, depth + 3); null !== constantValues && isConst(values[k]) ? constantValues[k] = serializeConst(values[k].constantValue) : constantValues = null; } @@ -20310,8 +20219,8 @@ ExpressionOptimizer.prototype.optimizeValue = function(value, depth) { return storeInSourceMap(value, optimized$jscomp$2); } if (null != value.functionInvocationValue) { - for (var inv = value.functionInvocationValue, args = {}, $jscomp$iter$48 = $jscomp.makeIterator(Object.keys(inv.arguments || {})), $jscomp$key$k = $jscomp$iter$48.next(); !$jscomp$key$k.done; $jscomp$key$k = $jscomp$iter$48.next()) { - var k$jscomp$0 = $jscomp$key$k.value; + for (var inv = value.functionInvocationValue, args = {}, $jscomp$iter$48 = $jscomp.makeIterator(Object.keys(inv.arguments || {})), $jscomp$key$1175707268$30$k = $jscomp$iter$48.next(); !$jscomp$key$1175707268$30$k.done; $jscomp$key$1175707268$30$k = $jscomp$iter$48.next()) { + var k$jscomp$0 = $jscomp$key$1175707268$30$k.value; args[k$jscomp$0] = this.optimizeValue(inv.arguments[k$jscomp$0], depth + 3); } var optimized$jscomp$3 = inv.functionName ? ee.rpc_node.functionByName(inv.functionName, args) : ee.rpc_node.functionByReference(this.optimizeReference(inv.functionReference || ""), args); @@ -20652,7 +20561,7 @@ ee.data.authenticate = function(clientId, success, opt_error, opt_extraScopes, o }; goog.exportSymbol("ee.data.authenticate", ee.data.authenticate); ee.data.authenticateViaPopup = function(opt_success, opt_error) { - goog.global.gapi.auth2.authorize({client_id:module$contents$ee$apiclient_apiclient.getAuthClientId(), immediate:!1, scope:module$contents$ee$apiclient_apiclient.getAuthScopes().join(" ")}, goog.partial(module$contents$ee$apiclient_apiclient.handleAuthResult_, opt_success, opt_error)); + goog.global.google.accounts.oauth2.initTokenClient({client_id:module$contents$ee$apiclient_apiclient.getAuthClientId(), callback:goog.partial(module$contents$ee$apiclient_apiclient.handleAuthResult_, opt_success, opt_error), scope:module$contents$ee$apiclient_apiclient.getAuthScopes().join(" ")}).requestAccessToken(); }; goog.exportSymbol("ee.data.authenticateViaPopup", ee.data.authenticateViaPopup); ee.data.authenticateViaPrivateKey = function(privateKey, opt_success, opt_error, opt_extraScopes, opt_suppressDefaultScopes) { @@ -21193,8 +21102,8 @@ ee.data.createAsset = function(value, opt_path, opt_force, opt_properties, opt_c value.gcsLocation && !value.cloudStorageLocation && (value.cloudStorageLocation = value.gcsLocation, delete value.gcsLocation); value.cloudStorageLocation && (value.cloudStorageLocation = new module$exports$eeapiclient$ee_api_client.CloudStorageLocation(value.cloudStorageLocation)); opt_properties && !value.properties && (value.properties = Object.assign({}, opt_properties)); - for (var $jscomp$iter$49 = $jscomp.makeIterator(["title", "description"]), $jscomp$key$prop = $jscomp$iter$49.next(); !$jscomp$key$prop.done; $jscomp$key$prop = $jscomp$iter$49.next()) { - var prop = $jscomp$key$prop.value; + for (var $jscomp$iter$49 = $jscomp.makeIterator(["title", "description"]), $jscomp$key$m358301524$123$prop = $jscomp$iter$49.next(); !$jscomp$key$m358301524$123$prop.done; $jscomp$key$m358301524$123$prop = $jscomp$iter$49.next()) { + var prop = $jscomp$key$m358301524$123$prop.value; if (value[prop]) { var $jscomp$compprop17 = {}; value.properties = Object.assign(($jscomp$compprop17[prop] = value[prop], $jscomp$compprop17), value.properties || {}); @@ -23466,8 +23375,8 @@ module$contents$ee$batch_Export.prefixImageFormatOptions_ = function(taskConfig, })) { throw Error("Parameter specified at least twice: once in config, and once in config format options."); } - for (var prefix = module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat], validOptionKeys = module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat], prefixedOptions = {}, $jscomp$iter$50 = $jscomp.makeIterator(Object.entries(formatOptions)), $jscomp$key$ = $jscomp$iter$50.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$50.next()) { - var $jscomp$destructuring$var58 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var58.next().value, value = $jscomp$destructuring$var58.next().value; + for (var prefix = module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat], validOptionKeys = module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat], prefixedOptions = {}, $jscomp$iter$50 = $jscomp.makeIterator(Object.entries(formatOptions)), $jscomp$key$m1704548930$35$ = $jscomp$iter$50.next(); !$jscomp$key$m1704548930$35$.done; $jscomp$key$m1704548930$35$ = $jscomp$iter$50.next()) { + var $jscomp$destructuring$var58 = $jscomp.makeIterator($jscomp$key$m1704548930$35$.value), key = $jscomp$destructuring$var58.next().value, value = $jscomp$destructuring$var58.next().value; if (!module$contents$goog$array_contains(validOptionKeys, key)) { var validKeysMsg = validOptionKeys.join(", "); throw Error('"' + key + '" is not a valid option, the image format "' + imageFormat + '""may have the following options: ' + (validKeysMsg + '".')); diff --git a/javascript/build/ee_api_js_npm.js b/javascript/build/ee_api_js_npm.js index 7e8c2237c..c71045065 100644 --- a/javascript/build/ee_api_js_npm.js +++ b/javascript/build/ee_api_js_npm.js @@ -6057,9 +6057,9 @@ module$exports$eeapiclient$domain_object.strictDeserialize = function(type, raw) }; var module$contents$eeapiclient$domain_object_CopyValueGetter, module$contents$eeapiclient$domain_object_CopyValueSetter, module$contents$eeapiclient$domain_object_CopyConstructor, module$contents$eeapiclient$domain_object_CopyInstanciator; function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, valueSetter, copyInstanciator, targetConstructor) { - for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$iter$19 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$19.next(), $jscomp$loop$m192531680$40 = {}; !$jscomp$key$key.done; $jscomp$loop$m192531680$40 = {mapMetadata:void 0}, - $jscomp$key$key = $jscomp$iter$19.next()) { - var key = $jscomp$key$key.value, value = valueGetter(key, source); + for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$iter$19 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$m192531680$40$key = $jscomp$iter$19.next(), $jscomp$loop$m192531680$44 = {}; !$jscomp$key$m192531680$40$key.done; $jscomp$loop$m192531680$44 = + {mapMetadata:void 0}, $jscomp$key$m192531680$40$key = $jscomp$iter$19.next()) { + var key = $jscomp$key$m192531680$40$key.value, value = valueGetter(key, source); if (null != value) { var copy = void 0; if (arrays.hasOwnProperty(key)) { @@ -6070,11 +6070,11 @@ function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, } else if (objects.hasOwnProperty(key)) { copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]); } else if (objectMaps.hasOwnProperty(key)) { - $jscomp$loop$m192531680$40.mapMetadata = objectMaps[key], copy = $jscomp$loop$m192531680$40.mapMetadata.isPropertyArray ? value.map(function($jscomp$loop$m192531680$40) { + $jscomp$loop$m192531680$44.mapMetadata = objectMaps[key], copy = $jscomp$loop$m192531680$44.mapMetadata.isPropertyArray ? value.map(function($jscomp$loop$m192531680$44) { return function(v) { - return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$m192531680$40.mapMetadata, valueGetter, valueSetter, copyInstanciator); + return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$m192531680$44.mapMetadata, valueGetter, valueSetter, copyInstanciator); }; - }($jscomp$loop$m192531680$40)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$m192531680$40.mapMetadata, valueGetter, valueSetter, copyInstanciator); + }($jscomp$loop$m192531680$44)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$m192531680$44.mapMetadata, valueGetter, valueSetter, copyInstanciator); } else if (Array.isArray(value)) { if (metadata.emptyArrayIsUnset && 0 === value.length) { continue; @@ -6089,8 +6089,8 @@ function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, return target; } function module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, mapMetadata, valueGetter, valueSetter, copyInstanciator) { - for (var objMap = {}, $jscomp$iter$20 = $jscomp.makeIterator(Object.keys(value)), $jscomp$key$mapKey = $jscomp$iter$20.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$20.next()) { - var mapKey = $jscomp$key$mapKey.value, mapValue = value[mapKey]; + for (var objMap = {}, $jscomp$iter$20 = $jscomp.makeIterator(Object.keys(value)), $jscomp$key$m192531680$41$mapKey = $jscomp$iter$20.next(); !$jscomp$key$m192531680$41$mapKey.done; $jscomp$key$m192531680$41$mapKey = $jscomp$iter$20.next()) { + var mapKey = $jscomp$key$m192531680$41$mapKey.value, mapValue = value[mapKey]; null != mapValue && (objMap[mapKey] = module$contents$eeapiclient$domain_object_deepCopyValue(mapValue, valueGetter, valueSetter, copyInstanciator, mapMetadata.isValueArray, mapMetadata.isSerializable, mapMetadata.ctor)); } return objMap; @@ -6120,39 +6120,39 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser if (!(module$contents$eeapiclient$domain_object_sameKeys(keys1, metadata2.keys || []) && module$contents$eeapiclient$domain_object_sameKeys(arrays1, arrays2) && module$contents$eeapiclient$domain_object_sameKeys(objects1, objects2) && module$contents$eeapiclient$domain_object_sameKeys(objectMaps1, objectMaps2))) { return !1; } - for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$21.next(), $jscomp$loop$m192531680$41 = {}; !$jscomp$key$key.done; $jscomp$loop$m192531680$41 = {value2$jscomp$7:void 0, mapMetadata$jscomp$2:void 0}, $jscomp$key$key = $jscomp$iter$21.next()) { - var key = $jscomp$key$key.value, has1 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable1, key, metadata1), has2 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable2, key, metadata2); + for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$m192531680$42$key = $jscomp$iter$21.next(), $jscomp$loop$m192531680$45 = {}; !$jscomp$key$m192531680$42$key.done; $jscomp$loop$m192531680$45 = {value2$jscomp$7:void 0, mapMetadata$jscomp$2:void 0}, $jscomp$key$m192531680$42$key = $jscomp$iter$21.next()) { + var key = $jscomp$key$m192531680$42$key.value, has1 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable1, key, metadata1), has2 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable2, key, metadata2); if (has1 !== has2) { return !1; } if (has1) { var value1 = serializable1.Serializable$get(key); - $jscomp$loop$m192531680$41.value2$jscomp$7 = serializable2.Serializable$get(key); + $jscomp$loop$m192531680$45.value2$jscomp$7 = serializable2.Serializable$get(key); if (arrays1.hasOwnProperty(key)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$41.value2$jscomp$7, !0, !0)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, !0, !0)) { return !1; } } else if (objects1.hasOwnProperty(key)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$41.value2$jscomp$7, !1, !0)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, !1, !0)) { return !1; } } else if (objectMaps1.hasOwnProperty(key)) { - if ($jscomp$loop$m192531680$41.mapMetadata$jscomp$2 = objectMaps1[key], $jscomp$loop$m192531680$41.mapMetadata$jscomp$2.isPropertyArray) { - if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$m192531680$41.value2$jscomp$7) || value1.some(function($jscomp$loop$m192531680$41) { + if ($jscomp$loop$m192531680$45.mapMetadata$jscomp$2 = objectMaps1[key], $jscomp$loop$m192531680$45.mapMetadata$jscomp$2.isPropertyArray) { + if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$m192531680$45.value2$jscomp$7) || value1.some(function($jscomp$loop$m192531680$45) { return function(v1, i) { - return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$m192531680$41.value2$jscomp$7[i], $jscomp$loop$m192531680$41.mapMetadata$jscomp$2); + return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$m192531680$45.value2$jscomp$7[i], $jscomp$loop$m192531680$45.mapMetadata$jscomp$2); }; - }($jscomp$loop$m192531680$41))) { + }($jscomp$loop$m192531680$45))) { return !1; } - } else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$m192531680$41.value2$jscomp$7, $jscomp$loop$m192531680$41.mapMetadata$jscomp$2)) { + } else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, $jscomp$loop$m192531680$45.mapMetadata$jscomp$2)) { return !1; } } else if (Array.isArray(value1)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$41.value2$jscomp$7, !0, !1)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, !0, !1)) { return !1; } - } else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$41.value2$jscomp$7, !1, !1)) { + } else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$45.value2$jscomp$7, !1, !1)) { return !1; } } @@ -6174,8 +6174,8 @@ function module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, v if (!module$contents$eeapiclient$domain_object_sameKeys(value1, value2)) { return !1; } - for (var $jscomp$iter$22 = $jscomp.makeIterator(Object.keys(value1)), $jscomp$key$mapKey = $jscomp$iter$22.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$22.next()) { - var mapKey = $jscomp$key$mapKey.value; + for (var $jscomp$iter$22 = $jscomp.makeIterator(Object.keys(value1)), $jscomp$key$m192531680$43$mapKey = $jscomp$iter$22.next(); !$jscomp$key$m192531680$43$mapKey.done; $jscomp$key$m192531680$43$mapKey = $jscomp$iter$22.next()) { + var mapKey = $jscomp$key$m192531680$43$mapKey.value; if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1[mapKey], value2[mapKey], mapMetadata.isValueArray, mapMetadata.isSerializable)) { return !1; } @@ -6663,8 +6663,6 @@ goog.html.TrustedResourceUrl.stringifyParams_ = function(prefix, currentString, } return currentString; }; -goog.string.TypedString = function() { -}; goog.html.SafeUrl = function(value, token) { if (goog.DEBUG && token !== goog.html.SafeUrl.CONSTRUCTOR_TOKEN_PRIVATE_) { throw Error("SafeUrl is not meant to be built directly"); @@ -6675,10 +6673,6 @@ goog.html.SafeUrl.prototype.toString = function() { return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString(); }; goog.html.SafeUrl.INNOCUOUS_STRING = "about:invalid#zClosurez"; -goog.html.SafeUrl.prototype.implementsGoogStringTypedString = !0; -goog.html.SafeUrl.prototype.getTypedStringValue = function() { - return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString(); -}; goog.html.SafeUrl.unwrap = function(safeUrl) { if (safeUrl instanceof goog.html.SafeUrl && safeUrl.constructor === goog.html.SafeUrl) { return safeUrl.privateDoNotAccessOrElseSafeUrlWrappedValue_; @@ -6705,11 +6699,6 @@ goog.html.SafeUrl.revokeObjectUrl = function(safeUrl) { var url = safeUrl.toString(); url !== goog.html.SafeUrl.INNOCUOUS_STRING && goog.fs.url.revokeObjectUrl(url); }; -goog.html.SafeUrl.fromMediaSource = function(mediaSource) { - goog.asserts.assert("MediaSource" in goog.global, "No support for MediaSource"); - var url = mediaSource instanceof MediaSource ? goog.fs.url.createObjectUrl(mediaSource) : goog.html.SafeUrl.INNOCUOUS_STRING; - return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(url); -}; goog.html.DATA_URL_PATTERN_ = /^data:(.*);base64,[a-z0-9+\/]+=*$/i; goog.html.SafeUrl.tryFromDataUrl = function(dataUrl) { dataUrl = String(dataUrl); @@ -6719,61 +6708,14 @@ goog.html.SafeUrl.tryFromDataUrl = function(dataUrl) { goog.html.SafeUrl.fromDataUrl = function(dataUrl) { return goog.html.SafeUrl.tryFromDataUrl(dataUrl) || goog.html.SafeUrl.INNOCUOUS_URL; }; -goog.html.SafeUrl.fromTelUrl = function(telUrl) { - goog.string.internal.caseInsensitiveStartsWith(telUrl, "tel:") || (telUrl = goog.html.SafeUrl.INNOCUOUS_STRING); - return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(telUrl); -}; goog.html.SIP_URL_PATTERN_ = RegExp("^sip[s]?:[+a-z0-9_.!$%&'*\\/=^`{|}~-]+@([a-z0-9-]+\\.)+[a-z0-9]{2,63}$", "i"); goog.html.SafeUrl.fromSipUrl = function(sipUrl) { goog.html.SIP_URL_PATTERN_.test(decodeURIComponent(sipUrl)) || (sipUrl = goog.html.SafeUrl.INNOCUOUS_STRING); return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(sipUrl); }; -goog.html.SafeUrl.fromFacebookMessengerUrl = function(facebookMessengerUrl) { - goog.string.internal.caseInsensitiveStartsWith(facebookMessengerUrl, "fb-messenger://share") || (facebookMessengerUrl = goog.html.SafeUrl.INNOCUOUS_STRING); - return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(facebookMessengerUrl); -}; -goog.html.SafeUrl.fromWhatsAppUrl = function(whatsAppUrl) { - goog.string.internal.caseInsensitiveStartsWith(whatsAppUrl, "whatsapp://send") || (whatsAppUrl = goog.html.SafeUrl.INNOCUOUS_STRING); - return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(whatsAppUrl); -}; -goog.html.SafeUrl.fromSmsUrl = function(smsUrl) { - goog.string.internal.caseInsensitiveStartsWith(smsUrl, "sms:") && goog.html.SafeUrl.isSmsUrlBodyValid_(smsUrl) || (smsUrl = goog.html.SafeUrl.INNOCUOUS_STRING); - return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(smsUrl); -}; -goog.html.SafeUrl.isSmsUrlBodyValid_ = function(smsUrl) { - var hash = smsUrl.indexOf("#"); - 0 < hash && (smsUrl = smsUrl.substring(0, hash)); - var bodyParams = smsUrl.match(/[?&]body=/gi); - if (!bodyParams) { - return !0; - } - if (1 < bodyParams.length) { - return !1; - } - var bodyValue = smsUrl.match(/[?&]body=([^&]*)/)[1]; - if (!bodyValue) { - return !0; - } - try { - decodeURIComponent(bodyValue); - } catch (error) { - return !1; - } - return /^(?:[a-z0-9\-_.~]|%[0-9a-f]{2})+$/i.test(bodyValue); -}; -goog.html.SafeUrl.fromSshUrl = function(sshUrl) { - goog.string.internal.caseInsensitiveStartsWith(sshUrl, "ssh://") || (sshUrl = goog.html.SafeUrl.INNOCUOUS_STRING); - return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(sshUrl); -}; goog.html.SafeUrl.sanitizeChromeExtensionUrl = function(url, extensionId) { return goog.html.SafeUrl.sanitizeExtensionUrl_(/^chrome-extension:\/\/([^\/]+)\//, url, extensionId); }; -goog.html.SafeUrl.sanitizeFirefoxExtensionUrl = function(url, extensionId) { - return goog.html.SafeUrl.sanitizeExtensionUrl_(/^moz-extension:\/\/([^\/]+)\//, url, extensionId); -}; -goog.html.SafeUrl.sanitizeEdgeExtensionUrl = function(url, extensionId) { - return goog.html.SafeUrl.sanitizeExtensionUrl_(/^ms-browser-extension:\/\/([^\/]+)\//, url, extensionId); -}; goog.html.SafeUrl.sanitizeExtensionUrl_ = function(scheme, url, extensionId) { var matches = scheme.exec(url); if (matches) { @@ -7249,46 +7191,8 @@ goog.html.SafeHtml = module$contents$goog$html$SafeHtml_SafeHtml; SPDX-License-Identifier: Apache-2.0 */ var module$contents$safevalues$environment$dev_module = module$contents$safevalues$environment$dev_module || {id:"third_party/javascript/safevalues/environment/dev.closure.js"}; -var module$contents$goog$html$SafeScript_CONSTRUCTOR_TOKEN_PRIVATE = {}, module$contents$goog$html$SafeScript_SafeScript = function(value, token) { - if (goog.DEBUG && token !== module$contents$goog$html$SafeScript_CONSTRUCTOR_TOKEN_PRIVATE) { - throw Error("SafeScript is not meant to be built directly"); - } - this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = value; -}; -module$contents$goog$html$SafeScript_SafeScript.prototype.toString = function() { - return this.privateDoNotAccessOrElseSafeScriptWrappedValue_.toString(); -}; -module$contents$goog$html$SafeScript_SafeScript.fromConstant = function(script) { - var scriptString = goog.string.Const.unwrap(script); - return 0 === scriptString.length ? module$contents$goog$html$SafeScript_SafeScript.EMPTY : module$contents$goog$html$SafeScript_SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(scriptString); -}; -module$contents$goog$html$SafeScript_SafeScript.fromJson = function(val) { - return module$contents$goog$html$SafeScript_SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(module$contents$goog$html$SafeScript_SafeScript.stringify_(val)); -}; -module$contents$goog$html$SafeScript_SafeScript.unwrap = function(safeScript) { - return module$contents$goog$html$SafeScript_SafeScript.unwrapTrustedScript(safeScript).toString(); -}; -module$contents$goog$html$SafeScript_SafeScript.unwrapTrustedScript = function(safeScript) { - if (safeScript instanceof module$contents$goog$html$SafeScript_SafeScript && safeScript.constructor === module$contents$goog$html$SafeScript_SafeScript) { - return safeScript.privateDoNotAccessOrElseSafeScriptWrappedValue_; - } - (0,goog.asserts.fail)("expected object of type SafeScript, got '" + safeScript + "' of type " + goog.typeOf(safeScript)); - return "type_error:SafeScript"; -}; -module$contents$goog$html$SafeScript_SafeScript.stringify_ = function(val) { - return JSON.stringify(val).replace(/ groups.length)) { var id = groups[0].match(/\r\nContent-ID: ]*)>/)[1], status = Number(groups[1].match(/^HTTP\S*\s(\d+)\s/)[1]), text = groups.slice(2).join("\r\n\r\n"); handle(id, status, text); @@ -18877,13 +18794,12 @@ module$contents$ee$apiclient_apiclient.setAuthToken = function(clientId, tokenTy var tokenObject = {token_type:tokenType, access_token:accessToken, state:scopes.join(" "), expires_in:expiresIn}; module$contents$ee$apiclient_apiclient.handleAuthResult_(void 0, void 0, tokenObject); !1 === updateAuthLibrary ? callback && callback() : module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function() { - goog.global.gapi.client.setToken(tokenObject); callback && callback(); }); }; module$contents$ee$apiclient_apiclient.refreshAuthToken = function(success, error, onImmediateFailed) { if (module$contents$ee$apiclient_apiclient.isAuthTokenRefreshingEnabled_()) { - var authArgs = {client_id:String(module$contents$ee$apiclient_apiclient.authClientId_), immediate:!0, scope:module$contents$ee$apiclient_apiclient.authScopes_.join(" "), plugin_name:"earthengine"}; + var authArgs = {client_id:String(module$contents$ee$apiclient_apiclient.authClientId_), scope:module$contents$ee$apiclient_apiclient.authScopes_.join(" "), plugin_name:"earthengine"}; module$contents$ee$apiclient_apiclient.authTokenRefresher_(authArgs, function(result) { if ("immediate_failed" == result.error && onImmediateFailed) { onImmediateFailed(); @@ -18892,7 +18808,7 @@ module$contents$ee$apiclient_apiclient.refreshAuthToken = function(success, erro try { module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function() { try { - goog.global.gapi.client.setToken(result), module$contents$ee$apiclient_apiclient.handleAuthResult_(success, error, result); + module$contents$ee$apiclient_apiclient.handleAuthResult_(success, error, result); } catch (e) { error(e.toString()); } @@ -18967,8 +18883,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded"; body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST")); method = method || "POST"; - var headers = {"Content-Type":contentType}, version = "0.1.386"; - "0.1.386" === version && (version = "latest"); + var headers = {"Content-Type":contentType}, version = "0.1.388"; + "0.1.388" === version && (version = "latest"); headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version; var authToken = module$contents$ee$apiclient_apiclient.getAuthToken(); if (null != authToken) { @@ -19077,22 +18993,14 @@ module$contents$ee$apiclient_apiclient.handleResponse_ = function(status, getRes }; module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_ = function(callback) { var done = function() { - goog.global.gapi.config.update("client/cors", !0); - module$contents$ee$apiclient_apiclient.authTokenRefresher_ || module$contents$ee$apiclient_apiclient.setAuthTokenRefresher(goog.global.gapi.auth2.authorize); + module$contents$ee$apiclient_apiclient.authTokenRefresher_ || module$contents$ee$apiclient_apiclient.setAuthTokenRefresher(function(authArgs, refresherCallback) { + goog.global.google.accounts.oauth2.initTokenClient({client_id:authArgs.client_id, callback:refresherCallback, scope:authArgs.scope}).requestAccessToken(); + }); callback(); }; - if (goog.isObject(goog.global.gapi) && goog.isObject(goog.global.gapi.auth2) && "function" === typeof goog.global.gapi.auth2.authorize) { - done(); - } else { - for (var callbackName = Date.now().toString(36); callbackName in goog.global;) { - callbackName += "_"; - } - goog.global[callbackName] = function() { - delete goog.global[callbackName]; - done(); - }; - goog.net.jsloader.safeLoad(module$contents$safevalues$builders$resource_url_builders_trustedResourceUrl($jscomp$templatelit$294235699$94, callbackName)); - } + (function() { + goog.isObject(goog.global.default_gsi) ? done() : goog.net.jsloader.safeLoad(module$contents$safevalues$builders$resource_url_builders_trustedResourceUrl($jscomp$templatelit$294235699$96)).addCallback(done); + })(); }; module$contents$ee$apiclient_apiclient.handleAuthResult_ = function(success, error, result) { if (result.access_token) { @@ -19109,8 +19017,8 @@ module$contents$ee$apiclient_apiclient.handleAuthResult_ = function(success, err } }; module$contents$ee$apiclient_apiclient.makeRequest_ = function(params) { - for (var request = new goog.Uri.QueryData(), $jscomp$iter$42 = $jscomp.makeIterator(Object.entries(params)), $jscomp$key$ = $jscomp$iter$42.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$42.next()) { - var $jscomp$destructuring$var47 = $jscomp.makeIterator($jscomp$key$.value), name = $jscomp$destructuring$var47.next().value, item = $jscomp$destructuring$var47.next().value; + for (var request = new goog.Uri.QueryData(), $jscomp$iter$42 = $jscomp.makeIterator(Object.entries(params)), $jscomp$key$294235699$98$ = $jscomp$iter$42.next(); !$jscomp$key$294235699$98$.done; $jscomp$key$294235699$98$ = $jscomp$iter$42.next()) { + var $jscomp$destructuring$var47 = $jscomp.makeIterator($jscomp$key$294235699$98$.value), name = $jscomp$destructuring$var47.next().value, item = $jscomp$destructuring$var47.next().value; request.set(name, item); } return request; @@ -19209,7 +19117,6 @@ module$contents$ee$apiclient_apiclient.AUTH_SCOPE_ = "https://www.googleapis.com module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_ = "https://www.googleapis.com/auth/earthengine.readonly"; module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_ = "https://www.googleapis.com/auth/cloud-platform"; module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_ = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; -module$contents$ee$apiclient_apiclient.AUTH_LIBRARY_URL_ = goog.string.Const.from("https://apis.google.com/js/client.js?onload=%{onload}"); module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_ = "https://www.googleapis.com/auth/devstorage.read_write"; module$contents$ee$apiclient_apiclient.cloudApiKey_ = null; module$contents$ee$apiclient_apiclient.initialized_ = !1; @@ -19228,6 +19135,8 @@ module$contents$ee$apiclient_apiclient.DEFAULT_API_BASE_URL_ = "https://eartheng module$contents$ee$apiclient_apiclient.DEFAULT_TILE_BASE_URL_ = "https://earthengine.googleapis.com"; module$contents$ee$apiclient_apiclient.AuthArgs = function() { }; +var module$contents$ee$apiclient_TokenClient = function() { +}; module$contents$ee$apiclient_apiclient.AuthResponse = function() { }; ee.apiclient.Call = module$contents$ee$apiclient_Call; @@ -19463,8 +19372,8 @@ ee.rpc_convert.algorithms = function(result) { algorithm.deprecated && (internalAlgorithm.deprecated = algorithm.deprecationReason); algorithm.sourceCodeUri && (internalAlgorithm.sourceCodeUri = algorithm.sourceCodeUri); return internalAlgorithm; - }, internalAlgorithms = {}, $jscomp$iter$43 = $jscomp.makeIterator(result.algorithms || []), $jscomp$key$algorithm = $jscomp$iter$43.next(); !$jscomp$key$algorithm.done; $jscomp$key$algorithm = $jscomp$iter$43.next()) { - var algorithm = $jscomp$key$algorithm.value, name = algorithm.name.replace(/^algorithms\//, ""); + }, internalAlgorithms = {}, $jscomp$iter$43 = $jscomp.makeIterator(result.algorithms || []), $jscomp$key$1418108943$48$algorithm = $jscomp$iter$43.next(); !$jscomp$key$1418108943$48$algorithm.done; $jscomp$key$1418108943$48$algorithm = $jscomp$iter$43.next()) { + var algorithm = $jscomp$key$1418108943$48$algorithm.value, name = algorithm.name.replace(/^algorithms\//, ""); internalAlgorithms[name] = convertAlgorithm(algorithm); } return internalAlgorithms; @@ -19613,8 +19522,8 @@ ee.rpc_convert.getListToListAssets = function(param) { param.bbox && param.region && console.warn("Multiple request parameters converted to region"); for (var allKeys = "id num starttime endtime bbox region".split(" "), $jscomp$iter$44 = $jscomp.makeIterator(Object.keys(param).filter(function(k) { return !allKeys.includes(k); - })), $jscomp$key$key = $jscomp$iter$44.next(); !$jscomp$key$key.done; $jscomp$key$key = $jscomp$iter$44.next()) { - console.warn("Unrecognized key " + $jscomp$key$key.value + " ignored"); + })), $jscomp$key$1418108943$49$key = $jscomp$iter$44.next(); !$jscomp$key$1418108943$49$key.done; $jscomp$key$1418108943$49$key = $jscomp$iter$44.next()) { + console.warn("Unrecognized key " + $jscomp$key$1418108943$49$key.value + " ignored"); } return ee.rpc_convert.processListImagesParams(assetsRequest); }; @@ -19837,8 +19746,8 @@ ee.rpc_convert.parseFilterParamsFromListImages_ = function(params) { })) { throw Error('Filter parameter "properties" must be an array of strings'); } - for (var $jscomp$iter$45 = $jscomp.makeIterator(params.properties), $jscomp$key$propertyQuery = $jscomp$iter$45.next(); !$jscomp$key$propertyQuery.done; $jscomp$key$propertyQuery = $jscomp$iter$45.next()) { - queryStrings.push($jscomp$key$propertyQuery.value.trim().replace(/^(properties\.)?/, "properties.")); + for (var $jscomp$iter$45 = $jscomp.makeIterator(params.properties), $jscomp$key$1418108943$50$propertyQuery = $jscomp$iter$45.next(); !$jscomp$key$1418108943$50$propertyQuery.done; $jscomp$key$1418108943$50$propertyQuery = $jscomp$iter$45.next()) { + queryStrings.push($jscomp$key$1418108943$50$propertyQuery.value.trim().replace(/^(properties\.)?/, "properties.")); } delete params.properties; } @@ -20174,8 +20083,8 @@ ee.Serializer.encodeCloudApiPretty = function(obj) { if (!goog.isObject(object)) { return object; } - for (var ret = Array.isArray(object) ? [] : {}, isNode = object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode), $jscomp$iter$46 = $jscomp.makeIterator(Object.entries(isNode ? object.Serializable$values : object)), $jscomp$key$ = $jscomp$iter$46.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$46.next()) { - var $jscomp$destructuring$var51 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var51.next().value, val = $jscomp$destructuring$var51.next().value; + for (var ret = Array.isArray(object) ? [] : {}, isNode = object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode), $jscomp$iter$46 = $jscomp.makeIterator(Object.entries(isNode ? object.Serializable$values : object)), $jscomp$key$1175707268$28$ = $jscomp$iter$46.next(); !$jscomp$key$1175707268$28$.done; $jscomp$key$1175707268$28$ = $jscomp$iter$46.next()) { + var $jscomp$destructuring$var51 = $jscomp.makeIterator($jscomp$key$1175707268$28$.value), key = $jscomp$destructuring$var51.next().value, val = $jscomp$destructuring$var51.next().value; isNode ? null !== val && (ret[key] = "functionDefinitionValue" === key && null != val.body ? {argumentNames:val.argumentNames, body:walkObject(values[val.body])} : "functionInvocationValue" === key && null != val.functionReference ? {arguments:module$contents$goog$object_map(val.arguments, walkObject), functionReference:walkObject(values[val.functionReference])} : "constantValue" === key ? val === module$exports$eeapiclient$domain_object.NULL_VALUE ? null : val : walkObject(val)) : ret[key] = walkObject(val); } @@ -20298,8 +20207,8 @@ ExpressionOptimizer.prototype.optimizeValue = function(value, depth) { return storeInSourceMap(value, optimized$jscomp$1); } if (null != value.dictionaryValue) { - for (var values = {}, constantValues = {}, $jscomp$iter$47 = $jscomp.makeIterator(Object.entries(value.dictionaryValue.values || {})), $jscomp$key$ = $jscomp$iter$47.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$47.next()) { - var $jscomp$destructuring$var53 = $jscomp.makeIterator($jscomp$key$.value), k = $jscomp$destructuring$var53.next().value, v = $jscomp$destructuring$var53.next().value; + for (var values = {}, constantValues = {}, $jscomp$iter$47 = $jscomp.makeIterator(Object.entries(value.dictionaryValue.values || {})), $jscomp$key$1175707268$29$ = $jscomp$iter$47.next(); !$jscomp$key$1175707268$29$.done; $jscomp$key$1175707268$29$ = $jscomp$iter$47.next()) { + var $jscomp$destructuring$var53 = $jscomp.makeIterator($jscomp$key$1175707268$29$.value), k = $jscomp$destructuring$var53.next().value, v = $jscomp$destructuring$var53.next().value; values[k] = this.optimizeValue(v, depth + 3); null !== constantValues && isConst(values[k]) ? constantValues[k] = serializeConst(values[k].constantValue) : constantValues = null; } @@ -20310,8 +20219,8 @@ ExpressionOptimizer.prototype.optimizeValue = function(value, depth) { return storeInSourceMap(value, optimized$jscomp$2); } if (null != value.functionInvocationValue) { - for (var inv = value.functionInvocationValue, args = {}, $jscomp$iter$48 = $jscomp.makeIterator(Object.keys(inv.arguments || {})), $jscomp$key$k = $jscomp$iter$48.next(); !$jscomp$key$k.done; $jscomp$key$k = $jscomp$iter$48.next()) { - var k$jscomp$0 = $jscomp$key$k.value; + for (var inv = value.functionInvocationValue, args = {}, $jscomp$iter$48 = $jscomp.makeIterator(Object.keys(inv.arguments || {})), $jscomp$key$1175707268$30$k = $jscomp$iter$48.next(); !$jscomp$key$1175707268$30$k.done; $jscomp$key$1175707268$30$k = $jscomp$iter$48.next()) { + var k$jscomp$0 = $jscomp$key$1175707268$30$k.value; args[k$jscomp$0] = this.optimizeValue(inv.arguments[k$jscomp$0], depth + 3); } var optimized$jscomp$3 = inv.functionName ? ee.rpc_node.functionByName(inv.functionName, args) : ee.rpc_node.functionByReference(this.optimizeReference(inv.functionReference || ""), args); @@ -20652,7 +20561,7 @@ ee.data.authenticate = function(clientId, success, opt_error, opt_extraScopes, o }; goog.exportSymbol("ee.data.authenticate", ee.data.authenticate); ee.data.authenticateViaPopup = function(opt_success, opt_error) { - goog.global.gapi.auth2.authorize({client_id:module$contents$ee$apiclient_apiclient.getAuthClientId(), immediate:!1, scope:module$contents$ee$apiclient_apiclient.getAuthScopes().join(" ")}, goog.partial(module$contents$ee$apiclient_apiclient.handleAuthResult_, opt_success, opt_error)); + goog.global.google.accounts.oauth2.initTokenClient({client_id:module$contents$ee$apiclient_apiclient.getAuthClientId(), callback:goog.partial(module$contents$ee$apiclient_apiclient.handleAuthResult_, opt_success, opt_error), scope:module$contents$ee$apiclient_apiclient.getAuthScopes().join(" ")}).requestAccessToken(); }; goog.exportSymbol("ee.data.authenticateViaPopup", ee.data.authenticateViaPopup); ee.data.authenticateViaPrivateKey = function(privateKey, opt_success, opt_error, opt_extraScopes, opt_suppressDefaultScopes) { @@ -21193,8 +21102,8 @@ ee.data.createAsset = function(value, opt_path, opt_force, opt_properties, opt_c value.gcsLocation && !value.cloudStorageLocation && (value.cloudStorageLocation = value.gcsLocation, delete value.gcsLocation); value.cloudStorageLocation && (value.cloudStorageLocation = new module$exports$eeapiclient$ee_api_client.CloudStorageLocation(value.cloudStorageLocation)); opt_properties && !value.properties && (value.properties = Object.assign({}, opt_properties)); - for (var $jscomp$iter$49 = $jscomp.makeIterator(["title", "description"]), $jscomp$key$prop = $jscomp$iter$49.next(); !$jscomp$key$prop.done; $jscomp$key$prop = $jscomp$iter$49.next()) { - var prop = $jscomp$key$prop.value; + for (var $jscomp$iter$49 = $jscomp.makeIterator(["title", "description"]), $jscomp$key$m358301524$123$prop = $jscomp$iter$49.next(); !$jscomp$key$m358301524$123$prop.done; $jscomp$key$m358301524$123$prop = $jscomp$iter$49.next()) { + var prop = $jscomp$key$m358301524$123$prop.value; if (value[prop]) { var $jscomp$compprop17 = {}; value.properties = Object.assign(($jscomp$compprop17[prop] = value[prop], $jscomp$compprop17), value.properties || {}); @@ -23466,8 +23375,8 @@ module$contents$ee$batch_Export.prefixImageFormatOptions_ = function(taskConfig, })) { throw Error("Parameter specified at least twice: once in config, and once in config format options."); } - for (var prefix = module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat], validOptionKeys = module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat], prefixedOptions = {}, $jscomp$iter$50 = $jscomp.makeIterator(Object.entries(formatOptions)), $jscomp$key$ = $jscomp$iter$50.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$50.next()) { - var $jscomp$destructuring$var58 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var58.next().value, value = $jscomp$destructuring$var58.next().value; + for (var prefix = module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat], validOptionKeys = module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat], prefixedOptions = {}, $jscomp$iter$50 = $jscomp.makeIterator(Object.entries(formatOptions)), $jscomp$key$m1704548930$35$ = $jscomp$iter$50.next(); !$jscomp$key$m1704548930$35$.done; $jscomp$key$m1704548930$35$ = $jscomp$iter$50.next()) { + var $jscomp$destructuring$var58 = $jscomp.makeIterator($jscomp$key$m1704548930$35$.value), key = $jscomp$destructuring$var58.next().value, value = $jscomp$destructuring$var58.next().value; if (!module$contents$goog$array_contains(validOptionKeys, key)) { var validKeysMsg = validOptionKeys.join(", "); throw Error('"' + key + '" is not a valid option, the image format "' + imageFormat + '""may have the following options: ' + (validKeysMsg + '".')); @@ -26526,28 +26435,28 @@ ee.data.Profiler.Format.prototype.toString = function() { ee.data.Profiler.Format.TEXT = new ee.data.Profiler.Format("text"); ee.data.Profiler.Format.JSON = new ee.data.Profiler.Format("json"); (function() { - var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction._apply ee.ApiFunction.lookup ee.ApiFunction._call ee.batch.Export.map.toCloudStorage ee.batch.Export.image.toAsset ee.batch.Export.table.toAsset ee.batch.Export.video.toCloudStorage ee.batch.Export.video.toDrive ee.batch.Export.classifier.toAsset ee.batch.Export.table.toDrive ee.batch.Export.image.toCloudStorage ee.batch.Export.table.toCloudStorage ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.table.toFeatureView ee.batch.Export.image.toDrive ee.batch.Export.table.toBigQuery ee.Collection.prototype.filterMetadata ee.Collection.prototype.filterBounds ee.Collection.prototype.filter ee.Collection.prototype.filterDate ee.Collection.prototype.map ee.Collection.prototype.iterate ee.Collection.prototype.limit ee.Collection.prototype.sort ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.serialize ee.data.computeValue ee.data.cancelTask ee.data.setDefaultWorkloadTag ee.data.getThumbId ee.data.resetWorkloadTag ee.data.startIngestion ee.data.getVideoThumbId ee.data.getTaskStatus ee.data.updateTask ee.data.updateAsset ee.data.startProcessing ee.data.getFilmstripThumbId ee.data.createFolder ee.data.getList ee.data.listAssets ee.data.setAssetAcl ee.data.makeThumbUrl ee.data.renameAsset ee.data.authenticateViaOauth ee.data.getTaskList ee.data.getMapId ee.data.setAssetProperties ee.data.getDownloadId ee.data.copyAsset ee.data.startTableIngestion ee.data.makeDownloadUrl ee.data.authenticate ee.data.getTaskListWithLimit ee.data.listImages ee.data.getTileUrl ee.data.cancelOperation ee.data.deleteAsset ee.data.getAssetRootQuota ee.data.listOperations ee.data.listBuckets ee.data.getTableDownloadId ee.data.getWorkloadTag ee.data.getAssetAcl ee.data.getAsset ee.data.makeTableDownloadUrl ee.data.getFeatureViewTilesKey ee.data.authenticateViaPopup ee.data.getAssetRoots ee.data.getInfo ee.data.getOperation ee.data.listFeatures ee.data.createAssetHome ee.data.newTaskId ee.data.setWorkloadTag ee.data.createAsset ee.data.authenticateViaPrivateKey ee.Date ee.Deserializer.fromCloudApiJSON ee.Deserializer.decode ee.Deserializer.fromJSON ee.Deserializer.decodeCloudApi ee.Dictionary ee.TILE_SIZE ee.initialize ee.call ee.reset ee.Algorithms ee.InitState ee.apply ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature.prototype.getInfo ee.Feature.prototype.getMapId ee.Feature.prototype.getMap ee.Feature ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getMap ee.FeatureCollection ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.getMapId ee.FeatureCollection.prototype.select ee.Filter.neq ee.Filter.gte ee.Filter.prototype.not ee.Filter.date ee.Filter.eq ee.Filter ee.Filter.bounds ee.Filter.metadata ee.Filter.and ee.Filter.gt ee.Filter.lte ee.Filter.lt ee.Filter.inList ee.Filter.or ee.Function.prototype.apply ee.Function.prototype.call ee.Geometry.MultiPolygon ee.Geometry ee.Geometry.prototype.serialize ee.Geometry.Point ee.Geometry.Polygon ee.Geometry.prototype.toGeoJSON ee.Geometry.MultiLineString ee.Geometry.BBox ee.Geometry.prototype.toGeoJSONString ee.Geometry.LineString ee.Geometry.LinearRing ee.Geometry.MultiPoint ee.Geometry.Rectangle ee.Image ee.Image.prototype.getInfo ee.Image.prototype.getMapId ee.Image.prototype.expression ee.Image.prototype.getMap ee.Image.rgb ee.Image.prototype.rename ee.Image.prototype.getDownloadURL ee.Image.prototype.getThumbId ee.Image.cat ee.Image.prototype.select ee.Image.prototype.clip ee.Image.prototype.getThumbURL ee.ImageCollection.prototype.first ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection.prototype.getMapId ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection.prototype.linkCollection ee.ImageCollection ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getMap ee.List ee.Number ee.Serializer.toReadableCloudApiJSON ee.Serializer.toReadableJSON ee.Serializer.encodeCloudApiPretty ee.Serializer.encode ee.Serializer.toCloudApiJSON ee.Serializer.encodeCloudApi ee.Serializer.toJSON ee.String ee.Terrain".split(" "), - orderedParamLists = [["name", "namedArgs"], ["name"], ["name", "var_args"], "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "), "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize".split(" "), ["collection", "opt_description", "opt_assetId", "opt_maxVertices"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), - "collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), ["classifier", "opt_description", "opt_assetId"], "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), - "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "), "collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking".split(" "), - "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), "collection opt_description opt_table opt_overwrite opt_append opt_selectors opt_maxVertices".split(" "), ["name", "operator", "value"], ["geometry"], ["filter"], ["start", "opt_end"], ["algorithm", "opt_dropNulls"], ["algorithm", "opt_first"], ["max", "opt_property", "opt_ascending"], - ["property", "opt_ascending"], ["func", "var_args"], ["callback"], ["opt_callback"], ["legacy"], ["obj", "opt_callback"], ["taskId", "opt_callback"], ["tag"], ["params", "opt_callback"], ["opt_resetDefault"], ["taskId", "request", "opt_callback"], ["params", "opt_callback"], ["taskId", "opt_callback"], ["taskId", "action", "opt_callback"], ["assetId", "asset", "updateFields", "opt_callback"], ["taskId", "params", "opt_callback"], ["params", "opt_callback"], ["path", "opt_force", "opt_callback"], - ["params", "opt_callback"], ["parent", "opt_params", "opt_callback"], ["assetId", "aclUpdate", "opt_callback"], ["id"], ["sourceId", "destinationId", "opt_callback"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), ["opt_callback"], ["params", "opt_callback"], ["assetId", "properties", "opt_callback"], ["params", "opt_callback"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], ["taskId", "request", "opt_callback"], ["id"], - ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["opt_limit", "opt_callback"], ["parent", "opt_params", "opt_callback"], ["id", "x", "y", "z"], ["operationName", "opt_callback"], ["assetId", "opt_callback"], ["rootId", "opt_callback"], ["opt_limit", "opt_callback"], ["project", "opt_callback"], ["params", "opt_callback"], [], ["assetId", "opt_callback"], ["id", "opt_callback"], ["id"], ["params", "opt_callback"], ["opt_success", "opt_error"], ["opt_callback"], - ["id", "opt_callback"], ["operationName", "opt_callback"], ["asset", "params", "opt_callback"], ["requestedId", "opt_callback"], ["opt_count", "opt_callback"], ["tag"], ["value", "opt_path", "opt_force", "opt_properties", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], [], "opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "), - ["func", "var_args"], [], [], [], ["func", "namedArgs"], ["var_args"], [], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["geometry", "opt_properties"], ["opt_format", "opt_selectors", "opt_filename", "opt_callback"], ["opt_visParams", "opt_callback"], ["args", "opt_column"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["propertySelectors", "opt_newProperties", "opt_retainGeometry"], ["name", "value"], ["name", "value"], [], ["start", "opt_end"], - ["name", "value"], ["opt_filter"], ["geometry", "opt_errorMargin"], ["name", "operator", "value"], ["var_args"], ["name", "value"], ["name", "value"], ["name", "value"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["var_args"], ["namedArgs"], ["var_args"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["legacy"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", - "opt_evenOdd"], [], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["west", "south", "east", "north"], [], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["opt_args"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["expression", "opt_map"], ["opt_visParams", "opt_callback"], ["r", "g", "b"], ["var_args"], ["params", "opt_callback"], ["params", - "opt_callback"], ["var_args"], ["var_args"], ["geometry"], ["params", "opt_callback"], [], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["opt_callback"], ["selectors", "opt_names"], ["imageCollection", "opt_linkedBands", "opt_linkedProperties", "opt_matchPropertyName"], ["args"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["list"], ["number"], ["obj"], ["obj"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["obj"], ["obj"], ["string"], []]; - [ee.ApiFunction._apply, ee.ApiFunction.lookup, ee.ApiFunction._call, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.classifier.toAsset, module$contents$ee$batch_Export.table.toDrive, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.table.toCloudStorage, - module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.table.toBigQuery, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.filterBounds, ee.Collection.prototype.filter, ee.Collection.prototype.filterDate, ee.Collection.prototype.map, ee.Collection.prototype.iterate, ee.Collection.prototype.limit, ee.Collection.prototype.sort, ee.ComputedObject.prototype.aside, - ee.ComputedObject.prototype.evaluate, ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.serialize, ee.data.computeValue, ee.data.cancelTask, ee.data.setDefaultWorkloadTag, ee.data.getThumbId, ee.data.resetWorkloadTag, ee.data.startIngestion, ee.data.getVideoThumbId, ee.data.getTaskStatus, ee.data.updateTask, ee.data.updateAsset, ee.data.startProcessing, ee.data.getFilmstripThumbId, ee.data.createFolder, ee.data.getList, ee.data.listAssets, ee.data.setAssetAcl, ee.data.makeThumbUrl, - ee.data.renameAsset, ee.data.authenticateViaOauth, ee.data.getTaskList, ee.data.getMapId, ee.data.setAssetProperties, ee.data.getDownloadId, ee.data.copyAsset, ee.data.startTableIngestion, ee.data.makeDownloadUrl, ee.data.authenticate, ee.data.getTaskListWithLimit, ee.data.listImages, ee.data.getTileUrl, ee.data.cancelOperation, ee.data.deleteAsset, ee.data.getAssetRootQuota, ee.data.listOperations, ee.data.listBuckets, ee.data.getTableDownloadId, ee.data.getWorkloadTag, ee.data.getAssetAcl, ee.data.getAsset, - ee.data.makeTableDownloadUrl, ee.data.getFeatureViewTilesKey, ee.data.authenticateViaPopup, ee.data.getAssetRoots, ee.data.getInfo, ee.data.getOperation, ee.data.listFeatures, ee.data.createAssetHome, ee.data.newTaskId, ee.data.setWorkloadTag, ee.data.createAsset, ee.data.authenticateViaPrivateKey, ee.Date, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.decode, ee.Deserializer.fromJSON, ee.Deserializer.decodeCloudApi, ee.Dictionary, ee.TILE_SIZE, ee.initialize, ee.call, ee.reset, ee.Algorithms, - ee.InitState, ee.apply, ee.Element.prototype.set, ee.Encodable.SourceFrame, ee.Feature.prototype.getInfo, ee.Feature.prototype.getMapId, ee.Feature.prototype.getMap, ee.Feature, ee.FeatureCollection.prototype.getDownloadURL, ee.FeatureCollection.prototype.getMap, ee.FeatureCollection, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection.prototype.getMapId, ee.FeatureCollection.prototype.select, ee.Filter.neq, ee.Filter.gte, ee.Filter.prototype.not, ee.Filter.date, ee.Filter.eq, ee.Filter, - ee.Filter.bounds, ee.Filter.metadata, ee.Filter.and, ee.Filter.gt, ee.Filter.lte, ee.Filter.lt, ee.Filter.inList, ee.Filter.or, ee.Function.prototype.apply, ee.Function.prototype.call, ee.Geometry.MultiPolygon, ee.Geometry, ee.Geometry.prototype.serialize, ee.Geometry.Point, ee.Geometry.Polygon, ee.Geometry.prototype.toGeoJSON, ee.Geometry.MultiLineString, ee.Geometry.BBox, ee.Geometry.prototype.toGeoJSONString, ee.Geometry.LineString, ee.Geometry.LinearRing, ee.Geometry.MultiPoint, ee.Geometry.Rectangle, - ee.Image, ee.Image.prototype.getInfo, ee.Image.prototype.getMapId, ee.Image.prototype.expression, ee.Image.prototype.getMap, ee.Image.rgb, ee.Image.prototype.rename, ee.Image.prototype.getDownloadURL, ee.Image.prototype.getThumbId, ee.Image.cat, ee.Image.prototype.select, ee.Image.prototype.clip, ee.Image.prototype.getThumbURL, ee.ImageCollection.prototype.first, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.ImageCollection.prototype.getMapId, ee.ImageCollection.prototype.getInfo, ee.ImageCollection.prototype.select, - ee.ImageCollection.prototype.linkCollection, ee.ImageCollection, ee.ImageCollection.prototype.getVideoThumbURL, ee.ImageCollection.prototype.getMap, ee.List, ee.Number, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.toReadableJSON, ee.Serializer.encodeCloudApiPretty, ee.Serializer.encode, ee.Serializer.toCloudApiJSON, ee.Serializer.encodeCloudApi, ee.Serializer.toJSON, ee.String, ee.Terrain].forEach(function(fn, i) { + var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction.lookup ee.ApiFunction._apply ee.ApiFunction._call ee.batch.Export.classifier.toAsset ee.batch.Export.table.toDrive ee.batch.Export.image.toCloudStorage ee.batch.Export.table.toCloudStorage ee.batch.Export.table.toFeatureView ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.image.toDrive ee.batch.Export.table.toBigQuery ee.batch.Export.map.toCloudStorage ee.batch.Export.table.toAsset ee.batch.Export.video.toCloudStorage ee.batch.Export.image.toAsset ee.batch.Export.video.toDrive ee.Collection.prototype.filter ee.Collection.prototype.map ee.Collection.prototype.iterate ee.Collection.prototype.filterBounds ee.Collection.prototype.filterDate ee.Collection.prototype.filterMetadata ee.Collection.prototype.sort ee.Collection.prototype.limit ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.data.startIngestion ee.data.getThumbId ee.data.getTaskStatus ee.data.updateTask ee.data.createFolder ee.data.getVideoThumbId ee.data.startProcessing ee.data.setAssetAcl ee.data.getList ee.data.renameAsset ee.data.getFilmstripThumbId ee.data.listAssets ee.data.setAssetProperties ee.data.makeThumbUrl ee.data.getTaskList ee.data.copyAsset ee.data.authenticateViaOauth ee.data.startTableIngestion ee.data.getMapId ee.data.getAssetRootQuota ee.data.deleteAsset ee.data.getDownloadId ee.data.listImages ee.data.getTaskListWithLimit ee.data.authenticate ee.data.makeDownloadUrl ee.data.listOperations ee.data.getTileUrl ee.data.getWorkloadTag ee.data.listBuckets ee.data.getAssetAcl ee.data.cancelOperation ee.data.getAsset ee.data.getTableDownloadId ee.data.makeTableDownloadUrl ee.data.getAssetRoots ee.data.setWorkloadTag ee.data.authenticateViaPopup ee.data.getInfo ee.data.createAssetHome ee.data.getFeatureViewTilesKey ee.data.getOperation ee.data.createAsset ee.data.newTaskId ee.data.setDefaultWorkloadTag ee.data.listFeatures ee.data.authenticateViaPrivateKey ee.data.resetWorkloadTag ee.data.cancelTask ee.data.updateAsset ee.data.computeValue ee.Date ee.Deserializer.decode ee.Deserializer.decodeCloudApi ee.Deserializer.fromCloudApiJSON ee.Deserializer.fromJSON ee.Dictionary ee.call ee.initialize ee.reset ee.Algorithms ee.apply ee.InitState ee.TILE_SIZE ee.Element.prototype.set ee.Encodable.SourceFrame ee.Feature ee.Feature.prototype.getInfo ee.Feature.prototype.getMapId ee.Feature.prototype.getMap ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.getMapId ee.FeatureCollection.prototype.select ee.FeatureCollection ee.FeatureCollection.prototype.getDownloadURL ee.Filter.and ee.Filter.gt ee.Filter.neq ee.Filter.lt ee.Filter.or ee.Filter.lte ee.Filter.prototype.not ee.Filter.gte ee.Filter ee.Filter.date ee.Filter.metadata ee.Filter.eq ee.Filter.bounds ee.Filter.inList ee.Function.prototype.call ee.Function.prototype.apply ee.Geometry ee.Geometry.Rectangle ee.Geometry.Polygon ee.Geometry.Point ee.Geometry.MultiLineString ee.Geometry.prototype.toGeoJSON ee.Geometry.LinearRing ee.Geometry.BBox ee.Geometry.MultiPoint ee.Geometry.prototype.toGeoJSONString ee.Geometry.LineString ee.Geometry.prototype.serialize ee.Geometry.MultiPolygon ee.Image.rgb ee.Image.prototype.getInfo ee.Image.prototype.getMapId ee.Image.prototype.expression ee.Image.prototype.rename ee.Image ee.Image.prototype.getMap ee.Image.prototype.getDownloadURL ee.Image.prototype.getThumbId ee.Image.cat ee.Image.prototype.clip ee.Image.prototype.select ee.Image.prototype.getThumbURL ee.ImageCollection.prototype.getMapId ee.ImageCollection.prototype.linkCollection ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.first ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection ee.ImageCollection.prototype.getFilmstripThumbURL ee.List ee.Number ee.Serializer.toJSON ee.Serializer.encodeCloudApi ee.Serializer.toReadableJSON ee.Serializer.toReadableCloudApiJSON ee.Serializer.encodeCloudApiPretty ee.Serializer.encode ee.Serializer.toCloudApiJSON ee.String ee.Terrain".split(" "), + orderedParamLists = [["name"], ["name", "namedArgs"], ["name", "var_args"], ["classifier", "opt_description", "opt_assetId"], "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), + "collection opt_description opt_assetId opt_maxFeaturesPerTile opt_thinningStrategy opt_thinningRanking opt_zOrderRanking".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "), "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), + "collection opt_description opt_table opt_overwrite opt_append opt_selectors opt_maxVertices".split(" "), "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "), ["collection", "opt_description", "opt_assetId", "opt_maxVertices"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), + "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), ["filter"], ["algorithm", "opt_dropNulls"], ["algorithm", "opt_first"], ["geometry"], ["start", "opt_end"], ["name", "operator", "value"], ["property", "opt_ascending"], + ["max", "opt_property", "opt_ascending"], ["legacy"], ["opt_callback"], ["func", "var_args"], ["callback"], ["taskId", "request", "opt_callback"], ["params", "opt_callback"], ["taskId", "opt_callback"], ["taskId", "action", "opt_callback"], ["path", "opt_force", "opt_callback"], ["params", "opt_callback"], ["taskId", "params", "opt_callback"], ["assetId", "aclUpdate", "opt_callback"], ["params", "opt_callback"], ["sourceId", "destinationId", "opt_callback"], ["params", "opt_callback"], ["parent", + "opt_params", "opt_callback"], ["assetId", "properties", "opt_callback"], ["id"], ["opt_callback"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), ["taskId", "request", "opt_callback"], ["params", "opt_callback"], ["rootId", "opt_callback"], ["assetId", "opt_callback"], ["params", "opt_callback"], ["parent", "opt_params", "opt_callback"], ["opt_limit", "opt_callback"], ["clientId", + "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["id"], ["opt_limit", "opt_callback"], ["id", "x", "y", "z"], [], ["project", "opt_callback"], ["assetId", "opt_callback"], ["operationName", "opt_callback"], ["id", "opt_callback"], ["params", "opt_callback"], ["id"], ["opt_callback"], ["tag"], ["opt_success", "opt_error"], ["id", "opt_callback"], ["requestedId", "opt_callback"], ["params", "opt_callback"], ["operationName", "opt_callback"], ["value", "opt_path", "opt_force", + "opt_properties", "opt_callback"], ["opt_count", "opt_callback"], ["tag"], ["asset", "params", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], ["opt_resetDefault"], ["taskId", "opt_callback"], ["assetId", "asset", "updateFields", "opt_callback"], ["obj", "opt_callback"], ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], ["func", "var_args"], "opt_baseurl opt_tileurl opt_successCallback opt_errorCallback opt_xsrfToken opt_project".split(" "), + [], [], ["func", "namedArgs"], [], [], ["var_args"], [], ["geometry", "opt_properties"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["opt_visParams", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["propertySelectors", "opt_newProperties", "opt_retainGeometry"], ["args", "opt_column"], ["opt_format", "opt_selectors", "opt_filename", "opt_callback"], ["var_args"], ["name", "value"], ["name", "value"], ["name", "value"], ["var_args"], + ["name", "value"], [], ["name", "value"], ["opt_filter"], ["start", "opt_end"], ["name", "operator", "value"], ["name", "value"], ["geometry", "opt_errorMargin"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["var_args"], ["namedArgs"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", + "opt_maxError"], [], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["west", "south", "east", "north"], ["coords", "opt_proj"], [], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["legacy"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["r", "g", "b"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["expression", "opt_map"], ["var_args"], ["opt_args"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], ["params", "opt_callback"], ["var_args"], + ["geometry"], ["var_args"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["imageCollection", "opt_linkedBands", "opt_linkedProperties", "opt_matchPropertyName"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], [], ["opt_callback"], ["selectors", "opt_names"], ["args"], ["params", "opt_callback"], ["list"], ["number"], ["obj"], ["obj"], ["obj"], ["obj"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["string"], []]; + [ee.ApiFunction.lookup, ee.ApiFunction._apply, ee.ApiFunction._call, module$contents$ee$batch_Export.classifier.toAsset, module$contents$ee$batch_Export.table.toDrive, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.table.toCloudStorage, module$contents$ee$batch_Export.table.toFeatureView, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.table.toBigQuery, module$contents$ee$batch_Export.map.toCloudStorage, + module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.video.toDrive, ee.Collection.prototype.filter, ee.Collection.prototype.map, ee.Collection.prototype.iterate, ee.Collection.prototype.filterBounds, ee.Collection.prototype.filterDate, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.sort, ee.Collection.prototype.limit, ee.ComputedObject.prototype.serialize, + ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.aside, ee.ComputedObject.prototype.evaluate, ee.data.startIngestion, ee.data.getThumbId, ee.data.getTaskStatus, ee.data.updateTask, ee.data.createFolder, ee.data.getVideoThumbId, ee.data.startProcessing, ee.data.setAssetAcl, ee.data.getList, ee.data.renameAsset, ee.data.getFilmstripThumbId, ee.data.listAssets, ee.data.setAssetProperties, ee.data.makeThumbUrl, ee.data.getTaskList, ee.data.copyAsset, ee.data.authenticateViaOauth, ee.data.startTableIngestion, + ee.data.getMapId, ee.data.getAssetRootQuota, ee.data.deleteAsset, ee.data.getDownloadId, ee.data.listImages, ee.data.getTaskListWithLimit, ee.data.authenticate, ee.data.makeDownloadUrl, ee.data.listOperations, ee.data.getTileUrl, ee.data.getWorkloadTag, ee.data.listBuckets, ee.data.getAssetAcl, ee.data.cancelOperation, ee.data.getAsset, ee.data.getTableDownloadId, ee.data.makeTableDownloadUrl, ee.data.getAssetRoots, ee.data.setWorkloadTag, ee.data.authenticateViaPopup, ee.data.getInfo, ee.data.createAssetHome, + ee.data.getFeatureViewTilesKey, ee.data.getOperation, ee.data.createAsset, ee.data.newTaskId, ee.data.setDefaultWorkloadTag, ee.data.listFeatures, ee.data.authenticateViaPrivateKey, ee.data.resetWorkloadTag, ee.data.cancelTask, ee.data.updateAsset, ee.data.computeValue, ee.Date, ee.Deserializer.decode, ee.Deserializer.decodeCloudApi, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.fromJSON, ee.Dictionary, ee.call, ee.initialize, ee.reset, ee.Algorithms, ee.apply, ee.InitState, ee.TILE_SIZE, ee.Element.prototype.set, + ee.Encodable.SourceFrame, ee.Feature, ee.Feature.prototype.getInfo, ee.Feature.prototype.getMapId, ee.Feature.prototype.getMap, ee.FeatureCollection.prototype.getMap, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection.prototype.getMapId, ee.FeatureCollection.prototype.select, ee.FeatureCollection, ee.FeatureCollection.prototype.getDownloadURL, ee.Filter.and, ee.Filter.gt, ee.Filter.neq, ee.Filter.lt, ee.Filter.or, ee.Filter.lte, ee.Filter.prototype.not, ee.Filter.gte, ee.Filter, ee.Filter.date, + ee.Filter.metadata, ee.Filter.eq, ee.Filter.bounds, ee.Filter.inList, ee.Function.prototype.call, ee.Function.prototype.apply, ee.Geometry, ee.Geometry.Rectangle, ee.Geometry.Polygon, ee.Geometry.Point, ee.Geometry.MultiLineString, ee.Geometry.prototype.toGeoJSON, ee.Geometry.LinearRing, ee.Geometry.BBox, ee.Geometry.MultiPoint, ee.Geometry.prototype.toGeoJSONString, ee.Geometry.LineString, ee.Geometry.prototype.serialize, ee.Geometry.MultiPolygon, ee.Image.rgb, ee.Image.prototype.getInfo, ee.Image.prototype.getMapId, + ee.Image.prototype.expression, ee.Image.prototype.rename, ee.Image, ee.Image.prototype.getMap, ee.Image.prototype.getDownloadURL, ee.Image.prototype.getThumbId, ee.Image.cat, ee.Image.prototype.clip, ee.Image.prototype.select, ee.Image.prototype.getThumbURL, ee.ImageCollection.prototype.getMapId, ee.ImageCollection.prototype.linkCollection, ee.ImageCollection.prototype.getVideoThumbURL, ee.ImageCollection.prototype.getMap, ee.ImageCollection.prototype.first, ee.ImageCollection.prototype.getInfo, + ee.ImageCollection.prototype.select, ee.ImageCollection, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.List, ee.Number, ee.Serializer.toJSON, ee.Serializer.encodeCloudApi, ee.Serializer.toReadableJSON, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.encodeCloudApiPretty, ee.Serializer.encode, ee.Serializer.toCloudApiJSON, ee.String, ee.Terrain].forEach(function(fn, i) { fn && (exportedFnInfo[fn.toString()] = {name:orderedFnNames[i], paramNames:orderedParamLists[i]}); }); goog.global.EXPORTED_FN_INFO = exportedFnInfo; diff --git a/javascript/package.json b/javascript/package.json index 7a98f10c9..a79b943f7 100644 --- a/javascript/package.json +++ b/javascript/package.json @@ -1,6 +1,6 @@ { "name": "@google/earthengine", - "version": "0.1.386", + "version": "0.1.388", "description": "JavaScript client for Google Earth Engine API.", "author": "Google LLC", "license": "Apache-2.0", diff --git a/javascript/src/apiclient.js b/javascript/src/apiclient.js index ec4cb269f..1a6fa47ba 100644 --- a/javascript/src/apiclient.js +++ b/javascript/src/apiclient.js @@ -4,7 +4,6 @@ goog.module('ee.apiclient'); goog.module.declareLegacyNamespace(); -const GoogConst = goog.require('goog.string.Const'); const Throttle = goog.require('goog.async.Throttle'); const Uri = goog.require('goog.Uri'); const XhrIo = goog.require('goog.net.XhrIo'); @@ -25,7 +24,7 @@ const {trustedResourceUrl} = goog.require('safevalues'); /** @namespace */ const apiclient = {}; -const API_CLIENT_VERSION = '0.1.386'; +const API_CLIENT_VERSION = '0.1.388'; exports.VERSION = apiVersion.VERSION; exports.API_CLIENT_VERSION = API_CLIENT_VERSION; @@ -533,7 +532,6 @@ apiclient.setAuthToken = function( } } else { apiclient.ensureAuthLibLoaded_(function() { - goog.global['gapi']['client']['setToken'](tokenObject); if (callback) { callback(); } @@ -560,7 +558,6 @@ apiclient.refreshAuthToken = function(success, error, onImmediateFailed) { // Set up auth options. const authArgs = { 'client_id': String(apiclient.authClientId_), - 'immediate': true, 'scope': apiclient.authScopes_.join(' '), 'plugin_name': 'earthengine', }; @@ -576,7 +573,6 @@ apiclient.refreshAuthToken = function(success, error, onImmediateFailed) { // Refresh the library auth token and handle error propagation. apiclient.ensureAuthLibLoaded_(function() { try { - goog.global['gapi']['client']['setToken'](result); apiclient.handleAuthResult_(success, error, result); } catch (e) { error(e.toString()); @@ -595,8 +591,8 @@ apiclient.refreshAuthToken = function(success, error, onImmediateFailed) { /** * Sets the current OAuth token refresher. By default, automatically set to - * gapi.auth.authorize() after the auth library loads. Set to null to disable - * token refreshing. + * Google Identity Services' callback triggered by `requestAccessToken()` after + * the auth library loads. Set to null to disable token refreshing. * * @param {?function(!apiclient.AuthArgs, function(!apiclient.AuthResponse))} * refresher A function that takes as input 1) auth arguments and @@ -1120,50 +1116,50 @@ apiclient.handleResponse_ = function( /** - * Ensures that the Google API Client Library for JavaScript is loaded. + * Ensures that the Google Identity Services (GIS) libraries are loaded. * @param {function()} callback The function to call when the library is ready. * @private */ apiclient.ensureAuthLibLoaded_ = function(callback) { const done = function() { - // Speed up auth request by using CORS instead of an iframe. - goog.global['gapi']['config']['update']('client/cors', true); if (!apiclient.authTokenRefresher_) { - apiclient.setAuthTokenRefresher(goog.global['gapi']['auth2']['authorize']); + apiclient.setAuthTokenRefresher(function(authArgs, refresherCallback) { + /** @type {!TokenClient} */ + const tokenClient = + goog.global['google']['accounts']['oauth2']['initTokenClient']({ + 'client_id': authArgs.client_id, + 'callback': refresherCallback, + 'scope': authArgs.scope, + }); + tokenClient.requestAccessToken(); + }); } callback(); }; - if (goog.isObject(goog.global['gapi']) && - goog.isObject(goog.global['gapi']['auth2']) && - typeof goog.global['gapi']['auth2']['authorize'] === 'function') { - done(); - } else { - // The library is not loaded; load it now. - let callbackName = Date.now().toString(36); - while (callbackName in goog.global) { - callbackName += '_'; - } - goog.global[callbackName] = function() { - delete goog.global[callbackName]; + const loadGis = function() { + if (goog.isObject(goog.global['default_gsi'])) { done(); - }; - jsloader.safeLoad( - trustedResourceUrl`https://apis.google.com/js/client.js?onload=${ - callbackName}`); - } + } else { + jsloader + .safeLoad(trustedResourceUrl`https://accounts.google.com/gsi/client`) + .addCallback(done); + } + }; + loadGis(); }; /** - * Handles the result of gapi.auth.authorize(), storing the auth token on - * success and setting up a refresh timeout. + * Handles the result of an AuthResponse, storing the auth token on success and + * setting up a refresh timeout. * * @param {function()|undefined} success The function to call if token refresh * succeeds. * @param {function(string)|undefined} error The function to call if auth fails, * passing the error message. - * @param {!apiclient.AuthResponse} result The result object produced by - * a token refresher such as gapi.auth.authorize(). + * @param {!apiclient.AuthResponse} result The result object produced by a token + * refresher such as Google Identity Services' callback triggered by + * `requestAccessToken()`. * @private */ apiclient.handleAuthResult_ = function(success, error, result) { @@ -1547,13 +1543,6 @@ apiclient.CLOUD_PLATFORM_SCOPE_ = apiclient.DEFAULT_AUTH_SCOPES_ = [apiclient.AUTH_SCOPE_, apiclient.CLOUD_PLATFORM_SCOPE_]; -/** - * The URL of the Google APIs Client Library. - * @private @const {!GoogConst} - */ -apiclient.AUTH_LIBRARY_URL_ = GoogConst.from( - 'https://apis.google.com/js/client.js?onload=%{onload}'); - /** * The OAuth scope for Cloud Storage. @@ -1676,7 +1665,8 @@ apiclient.AuthArgs = class { this.client_id; /** - * @export {boolean} + * @deprecated Immediate field is unused. + * @export {boolean|undefined} */ this.immediate; @@ -1687,6 +1677,19 @@ apiclient.AuthArgs = class { } }; +/** + * A token client to provide access tokens. For details, see + * https://developers.google.com/identity/oauth2/web/reference/js-reference#TokenClient. +* @record @struct + */ +class TokenClient { + constructor() { + /** + * @export {function():void} + */ + this.requestAccessToken; + } +} /** * The result of a token refresh. Passed by the token refresher to the callback diff --git a/javascript/src/data.js b/javascript/src/data.js index e0180cb70..b64110eb3 100644 --- a/javascript/src/data.js +++ b/javascript/src/data.js @@ -195,13 +195,14 @@ ee.data.authenticate = function( * @export */ ee.data.authenticateViaPopup = function(opt_success, opt_error) { - goog.global['gapi']['auth2']['authorize']( - { + const tokenClient = + goog.global['google']['accounts']['oauth2']['initTokenClient']({ 'client_id': ee.apiclient.getAuthClientId(), - 'immediate': false, - 'scope': ee.apiclient.getAuthScopes().join(' ') - }, - goog.partial(ee.apiclient.handleAuthResult, opt_success, opt_error)); + 'callback': + goog.partial(ee.apiclient.handleAuthResult, opt_success, opt_error), + 'scope': ee.apiclient.getAuthScopes().join(' '), + }); + tokenClient.requestAccessToken(); }; diff --git a/javascript/src/examples/Demos/TerrainVisualization.js b/javascript/src/examples/Demos/TerrainVisualization.js index 77bc6163a..7a9139a74 100644 --- a/javascript/src/examples/Demos/TerrainVisualization.js +++ b/javascript/src/examples/Demos/TerrainVisualization.js @@ -2,7 +2,7 @@ // a custom visualization of topography. // Load a global elevation image. -var elev = ee.Image('USGS/GMTED2010'); +var elev = ee.Image('USGS/GMTED2010').select('be75'); // Zoom to an area of interest. Map.setCenter(-121.069, 50.709, 6); @@ -44,4 +44,3 @@ var v = shade.divide(255); // Note the cast to byte in order to export the image correctly. var rgb = hs.addBands(v).hsvToRgb().multiply(255).byte(); Map.addLayer(rgb, {}, 'styled'); - diff --git a/python/ee/__init__.py b/python/ee/__init__.py index c3eade65d..0225d6667 100644 --- a/python/ee/__init__.py +++ b/python/ee/__init__.py @@ -1,6 +1,6 @@ """The EE Python library.""" -__version__ = '0.1.386' +__version__ = '0.1.388' # Using lowercase function naming to match the JavaScript names. # pylint: disable=g-bad-name @@ -27,8 +27,11 @@ from .blob import Blob from .collection import Collection from .computedobject import ComputedObject +from .confusionmatrix import ConfusionMatrix from .customfunction import CustomFunction +from .daterange import DateRange from .dictionary import Dictionary +from .ee_array import Array from .ee_date import Date from .ee_exception import EEException from .ee_list import List @@ -45,7 +48,10 @@ from .image import Image from .imagecollection import ImageCollection from .join import Join +from .model import Model from .pixeltype import PixelType +from .projection import Projection +from .reducer import Reducer from .serializer import Serializer from .terrain import Terrain @@ -159,9 +165,12 @@ def Initialize( # Initialize the dynamically loaded functions on the objects that want them. ApiFunction.initialize() + Array.initialize() Blob.initialize() Collection.initialize() + ConfusionMatrix.initialize() Date.initialize() + DateRange.initialize() Dictionary.initialize() Element.initialize() ErrorMargin.initialize() @@ -173,8 +182,11 @@ def Initialize( ImageCollection.initialize() Join.initialize() List.initialize() + Model.initialize() Number.initialize() PixelType.initialize() + Projection.initialize() + Reducer.initialize() String.initialize() Terrain.initialize() @@ -191,8 +203,11 @@ def Reset() -> None: ApiFunction.reset() Element.reset() # Must be before Collection. Collection.reset() # Must be before FeatureCollection and ImageCollection. + Array.reset() Blob.reset() + ConfusionMatrix.reset() Date.reset() + DateRange.reset() Dictionary.reset() ErrorMargin.reset() Feature.reset() @@ -203,8 +218,11 @@ def Reset() -> None: ImageCollection.reset() Join.reset() List.reset() + Model.reset() Number.reset() PixelType.reset() + Projection.reset() + Reducer.reset() String.reset() Terrain.reset() diff --git a/python/ee/blob.py b/python/ee/blob.py index 013282252..6fcbbe613 100644 --- a/python/ee/blob.py +++ b/python/ee/blob.py @@ -37,25 +37,25 @@ def __init__(self, url: Union[str, computedobject.ComputedObject]): """ self.initialize() - if isinstance(url, computedobject.ComputedObject): + args: Dict[str, Any] = {'url': url} + func = apifunction.ApiFunction(self.name()) + + if isinstance(url, str): + if not url.startswith('gs://'): + raise ValueError(f'{self.name()} url must start with "gs://": "{url}"') + + elif isinstance(url, computedobject.ComputedObject): if self.is_func_returning_same(url): # If it is a call that is already returning a Blob, just cast. super().__init__(url.func, url.args, url.varName) return - super().__init__(apifunction.ApiFunction(self.name()), {'url': url}) - return - - if not isinstance(url, str): + else: raise ValueError( f'{self.name()} url must be a string: {type(url)} -> "{url}"' ) - if not url.startswith('gs://'): - raise ValueError(f'{self.name()} url must start with "gs://": "{url}"') - args: Dict[str, Any] = {'url': url} - func = apifunction.ApiFunction(self.name()) - super().__init__(func, args) + super().__init__(func, func.promoteArgs(args)) @classmethod def initialize(cls) -> None: diff --git a/python/ee/confusionmatrix.py b/python/ee/confusionmatrix.py new file mode 100644 index 000000000..986c8723b --- /dev/null +++ b/python/ee/confusionmatrix.py @@ -0,0 +1,71 @@ +"""A wrapper for ConfusionMatrices.""" + +from typing import Any, Dict, List, Optional, Union + +from ee import apifunction +from ee import computedobject + + +class ConfusionMatrix(computedobject.ComputedObject): + """An object to represent an Earth Engine ConfusionMatrix. + + Examples: + # Construct a confusion matrix. Rows correspond to actual values, columns to + # predicted values. + matrix = ee.Array([[32, 0, 0, 0, 1, 0], + [ 0, 5, 0, 0, 1, 0], + [ 0, 0, 1, 3, 0, 0], + [ 0, 1, 4, 26, 8, 0], + [ 0, 0, 0, 7, 15, 0], + [ 0, 0, 0, 1, 0, 5]]) + ee.ConfusionMatrix(matrix) + """ + + _initialized: bool = False + + def __init__( + self, + array: Optional[computedobject.ComputedObject], + order: Optional[Union[List[Any], computedobject.ComputedObject]] = None, + ): + """Creates a ConfusionMatrix wrapper. + + Creates a confusion matrix. Axis 0 (the rows) of the matrix correspond to + the actual values, and Axis 1 (the columns) to the predicted values. + + Args: + array: A square, 2D array of integers, representing the confusion matrix. + order: The row and column size and order, for non-contiguous or non-zero + based matrices. + """ + self.initialize() + + if isinstance(array, computedobject.ComputedObject) and order is None: + if self.is_func_returning_same(array): + # If it is a call that already returns a ConfusionMatrix, just cast. + super().__init__(array.func, array.args, array.varName) + return + + args: Dict[str, Any] = {'array': array} + if order is not None: + args['order'] = order + + func = apifunction.ApiFunction(self.name()) + super().__init__(func, func.promoteArgs(args)) + + @classmethod + def initialize(cls) -> None: + """Imports API functions to this class.""" + if not cls._initialized: + apifunction.ApiFunction.importApi(cls, cls.name(), cls.name()) + cls._initialized = True + + @classmethod + def reset(cls) -> None: + """Removes imported API functions from this class.""" + apifunction.ApiFunction.clearApi(cls) + cls._initialized = False + + @staticmethod + def name() -> str: + return 'ConfusionMatrix' diff --git a/python/ee/daterange.py b/python/ee/daterange.py new file mode 100644 index 000000000..41b84ab6c --- /dev/null +++ b/python/ee/daterange.py @@ -0,0 +1,82 @@ +"""A wrapper for DateRanges.""" + +from typing import Any, Dict, Optional, Union + +from ee import apifunction +from ee import computedobject + + +class DateRange(computedobject.ComputedObject): + """An object to represent an Earth Engine DateRange. + + Examples: + ee.DateRange(1498287600000, 1498312800000) + ee.DateRange('2017-06-24', '2017-07-24') + ee.DateRange('2017-06-24', '2017-07-24', 'UTC') + ee.DateRange('2017-06-24T07:00:00', '2017-07-24T07:00:00', + 'America/Los_Angeles') + + now = ee.Date(datetime.datetime.utcnow()) + ee.DateRange(now.advance(-1, 'year'), now) + + ee.DateRange.unbounded() + """ + + _initialized: bool = False + + def __init__( + self, + start: Union[float, str, computedobject.ComputedObject], + end: Optional[Union[float, str, computedobject.ComputedObject]] = None, + # pylint: disable-next=invalid-name + timeZone: Optional[Union[str, computedobject.ComputedObject]] = None, + ): + """Creates a DateRange wrapper. + + When the start and end arguments are numbers, they are millisec (ms) from + 1970-01-01T00:00. + + Args: + start: Beginning of the DateRange (inclusive). + end: Optional ending of the DateRange (exclusive). Defaults to start + 1 + ms. + timeZone: If start and/or end are strings, the time zone in which to + interpret them. Defaults to UTC. + """ + self.initialize() + + if ( + isinstance(start, computedobject.ComputedObject) + and end is None + and timeZone is None + ): + if self.is_func_returning_same(start): + # If it is a call that is already returning a DateRange, just cast. + super().__init__(start.func, start.args, start.varName) + return + + args: Dict[str, Any] = {'start': start} + if end is not None: + args['end'] = end + if timeZone is not None: + args['timeZone'] = timeZone + + func = apifunction.ApiFunction(self.name()) + super().__init__(func, func.promoteArgs(args)) + + @classmethod + def initialize(cls) -> None: + """Imports API functions to this class.""" + if not cls._initialized: + apifunction.ApiFunction.importApi(cls, cls.name(), cls.name()) + cls._initialized = True + + @classmethod + def reset(cls) -> None: + """Removes imported API functions from this class.""" + apifunction.ApiFunction.clearApi(cls) + cls._initialized = False + + @staticmethod + def name() -> str: + return 'DateRange' diff --git a/python/ee/deserializer.py b/python/ee/deserializer.py index 28ab88070..927fe4d5d 100644 --- a/python/ee/deserializer.py +++ b/python/ee/deserializer.py @@ -104,8 +104,11 @@ def _decodeValue(json_obj, named_values): # pylint: disable=g-bad-name func = apifunction.ApiFunction.lookup(json_obj['functionName']) else: func = _decodeValue(json_obj['function'], named_values) - args = dict((key, _decodeValue(value, named_values)) - for (key, value) in json_obj['arguments'].items()) + if 'arguments' in json_obj: + args = dict((key, _decodeValue(value, named_values)) + for (key, value) in json_obj['arguments'].items()) + else: + args = {} return _invocation(func, args) elif type_name == 'Dictionary': return dict((key, _decodeValue(value, named_values)) @@ -215,7 +218,10 @@ def decode_function_invocation(invoked): func = lookup(invoked['functionReference'], 'function') else: func = apifunction.ApiFunction.lookup(invoked['functionName']) - args = {key: decode_node(x) for key, x in invoked['arguments'].items()} + if 'arguments' in invoked: + args = {key: decode_node(x) for key, x in invoked['arguments'].items()} + else: + args = {} return _invocation(func, args) return lookup(json_obj['result'], 'result value') diff --git a/python/ee/ee_array.py b/python/ee/ee_array.py new file mode 100644 index 000000000..9007d49f6 --- /dev/null +++ b/python/ee/ee_array.py @@ -0,0 +1,82 @@ +"""A wrapper for Arrays.""" + +from typing import Any, Dict, Optional, Union + +from ee import apifunction +from ee import computedobject + + +class Array(computedobject.ComputedObject): + """An object to represent an Earth Engine Array. + + Examples: + # Requires an explicit PixelType if no data. + ee.Array([], ee.PixelType.int8()); value: [] + ee.Array([[]], ee.PixelType.uint8()); value: [[]] + ee.Array([[], []], ee.PixelType.float()); value: [[], []] + # 1-D Arrays + ee.Array([0]); value: [0] + ee.Array([0, 1]); value: [0, 1] + # 2-D Arrays + ee.Array([[1]]); value: [[1]] + ee.Array([[0, 1], [2, 3]]); value: [[0,1],[2,3]] + # Arrays from ee.Number. + ee.Array([ee.Number(123).toUint8()]); value: [123] + # Lists are useful ways to construct larger Arrays. + ee.Array(ee.List.sequence(0, 10, 2)); value: [0, 2, 4, 6, 8, 10] + """ + + _initialized: bool = False + + def __init__( + self, + values: Optional[ + Union[Any, computedobject.ComputedObject] + ], + # pylint: disable-next=invalid-name + pixelType: Optional[Union[str, computedobject.ComputedObject]] = None, + ): + """Creates an Array wrapper. + + Returns an Array with the given coordinates. + + Args: + values: An existing array to cast, or a number/list of numbers/nested list + of numbers of any depth to create an array from. For nested lists, all + inner arrays at the same depth must have the same length, and numbers + may only be present at the deepest level. + pixelType: The type of each number in the values argument. If the pixel + type is not provided, it will be inferred from the numbers in 'values'. + If there aren't any numbers in 'values', this type must be provided. + """ + self.initialize() + + if isinstance(values, computedobject.ComputedObject) and pixelType is None: + if self.is_func_returning_same(values): + # If it is a call that is already returning an Array, just cast. + super().__init__(values.func, values.args, values.varName) + return + + args: Dict[str, Any] = {'values': values} + if pixelType is not None: + args['pixelType'] = pixelType + + func = apifunction.ApiFunction(self.name()) + super().__init__(func, func.promoteArgs(args)) + + @classmethod + def initialize(cls) -> None: + """Imports API functions to this class.""" + if not cls._initialized: + apifunction.ApiFunction.importApi(cls, cls.name(), cls.name()) + cls._initialized = True + + @classmethod + def reset(cls) -> None: + """Removes imported API functions from this class.""" + apifunction.ApiFunction.clearApi(cls) + cls._initialized = False + + @staticmethod + def name() -> str: + return 'Array' diff --git a/python/ee/errormargin.py b/python/ee/errormargin.py index 9c979998e..aa3408445 100644 --- a/python/ee/errormargin.py +++ b/python/ee/errormargin.py @@ -69,7 +69,7 @@ def __init__( args['unit'] = unit func = apifunction.ApiFunction(self.name()) - super().__init__(func, args) + super().__init__(func, func.promoteArgs(args)) @classmethod def initialize(cls) -> None: diff --git a/python/ee/function.py b/python/ee/function.py index 7e15fcd19..d71dfe198 100644 --- a/python/ee/function.py +++ b/python/ee/function.py @@ -1,6 +1,7 @@ """A base class for EE Functions.""" import textwrap +from typing import Any, Dict, Set from ee import computedobject from ee import ee_exception @@ -30,7 +31,7 @@ def _registerPromoter(promoter): """ Function._promoter = staticmethod(promoter) - def getSignature(self): + def getSignature(self) -> Dict[str, Any]: """Returns a description of the interface provided by this function. Returns: @@ -74,7 +75,7 @@ def apply(self, named_args): result = computedobject.ComputedObject(self, self.promoteArgs(named_args)) return Function._promoter(result, self.getReturnType()) - def promoteArgs(self, args): + def promoteArgs(self, args: Dict[str, Any]) -> Dict[str, Any]: """Promotes arguments to their types based on the function's signature. Verifies that all required arguments are provided and no unknown arguments @@ -94,8 +95,8 @@ def promoteArgs(self, args): arg_specs = signature['args'] # Promote all recognized args. - promoted_args = {} - known = set() + promoted_args: Dict[str, Any] = {} + known: Set[str] = set() for arg_spec in arg_specs: name = arg_spec['name'] if name in args: diff --git a/python/ee/join.py b/python/ee/join.py index 84b0c6c24..b9067002e 100644 --- a/python/ee/join.py +++ b/python/ee/join.py @@ -34,8 +34,9 @@ def __init__( """ self.initialize() - if self.is_func_returning_same(join): - # If it is a call that is already returning a Join, just cast. + if isinstance(join, computedobject.ComputedObject): + # There is no server-side constructor for ee.Join. Pass the object as-is + # to the server in case it is intended to be a Join cast. super().__init__(join.func, join.args, join.varName) return diff --git a/python/ee/model.py b/python/ee/model.py new file mode 100644 index 000000000..1c9952570 --- /dev/null +++ b/python/ee/model.py @@ -0,0 +1,57 @@ +"""A wrapper for Models.""" + +from ee import apifunction +from ee import computedobject + + +class Model(computedobject.ComputedObject): + """An object to represent an Earth Engine Model. + + Example: + model = ee.Model.fromVertexAi( + endpoint='endpoint-name', + inputTileSize=[8, 8], + outputBands={ + 'probability': {'type': ee.PixelType.float(), 'dimensions': 1} + }, + ) + + Please visit one of the following links for more info: + - https://developers.google.com/earth-engine/guides/machine-learning + - https://developers.google.com/earth-engine/guides/tensorflow-vertex + """ + + _initialized: bool = False + + def __init__(self, model: computedobject.ComputedObject): + """Creates a Model wrapper. + + Args: + model: A Model to cast. + """ + self.initialize() + + if isinstance(model, computedobject.ComputedObject): + # There is no server-side constructor for ee.Model. Pass the object as-is + # to the server in case it is intended to be a Model cast. + super().__init__(model.func, model.args, model.varName) + return + + raise TypeError('Model constructor can only cast to Model.') + + @classmethod + def initialize(cls) -> None: + """Imports API functions to this class.""" + if not cls._initialized: + apifunction.ApiFunction.importApi(cls, cls.name(), cls.name()) + cls._initialized = True + + @classmethod + def reset(cls) -> None: + """Removes imported API functions from this class.""" + apifunction.ApiFunction.clearApi(cls) + cls._initialized = False + + @staticmethod + def name() -> str: + return 'Model' diff --git a/python/ee/pixeltype.py b/python/ee/pixeltype.py index 737900e67..6319bcc13 100644 --- a/python/ee/pixeltype.py +++ b/python/ee/pixeltype.py @@ -77,7 +77,7 @@ def __init__( args['dimensions'] = dimensions func = apifunction.ApiFunction(self.name()) - super().__init__(func, args) + super().__init__(func, func.promoteArgs(args)) @classmethod def initialize(cls) -> None: diff --git a/python/ee/projection.py b/python/ee/projection.py new file mode 100644 index 000000000..867d1300c --- /dev/null +++ b/python/ee/projection.py @@ -0,0 +1,103 @@ +"""A wrapper for Projections.""" + +from typing import Any, Dict, Optional, Sequence, Union + +from ee import apifunction +from ee import computedobject + + +class Projection(computedobject.ComputedObject): + """An object to represent an Earth Engine Projection. + + Examples: + # Construct a variety of projections. + # crs: EPSG:4326, transform: identity + ee.Projection('EPSG:4326') + # crs: EPSG:4326, transform: projection.scale(2, 3) + ee.Projection('EPSG:4326', [2, 0, 0, 0, 3, 0]) + # crs: EPSG:4326, transform wkt: + ee.Projection( + 'EPSG:4326', + transformWkt=( + 'GEOGCS["WGS 84",' + ' DATUM["WGS_1984",' + ' SPHEROID["WGS 84",6378137,298.257223563,' + ' AUTHORITY["EPSG","7030"]],' + ' AUTHORITY["EPSG","6326"]],' + ' PRIMEM["Greenwich",0,' + ' AUTHORITY["EPSG","8901"]],' + ' UNIT["degree",0.0174532925199433,' + ' AUTHORITY["EPSG","9122"]],' + ' AXIS["Longitude",EAST],' + ' AXIS["Latitude",NORTH]]' + ), + ) + """ + + _initialized: bool = False + + def __init__( + self, + crs: Union[str, computedobject.ComputedObject], + transform: Optional[ + Union[Sequence[float], computedobject.ComputedObject] + ] = None, + # pylint: disable-next=invalid-name + transformWkt: Optional[Union[str, computedobject.ComputedObject]] = None, + ): + """Creates a Projection wrapper. + + Returns a Projection with the given base coordinate system and the given + transform between projected coordinates and the base. + + Args: + crs: The base coordinate reference system of this Projection, given as a + well-known authority code (e.g. 'EPSG:4326') or a WKT string. + transform: The transform between projected coordinates and the base + coordinate system, specified as a 2x3 affine transform matrix in + row-major order: [xScale, xShearing, xTranslation, yShearing, yScale, + yTranslation]. May not specify both this and 'transformWkt'. + transformWkt: The transform between projected coordinates and the base + coordinate system, specified as a WKT string. May not specify both this + and 'transform'. + """ + self.initialize() + + if ( + isinstance(crs, computedobject.ComputedObject) + and transform is None + and transformWkt is None + ): + # Handles cases where a user wants to manually cast a projection. Examples + # include: `ee.Projection(ee.Image(...).projection())` and + # `ee.Projection(ee.Projection(...))`. + if self.is_func_returning_same(crs): + # If it is a call that is already returning a Projection, just cast. + super().__init__(crs.func, crs.args, crs.varName) + return + + args: Dict[str, Any] = {'crs': crs} + if transform is not None: + args['transform'] = transform + if transformWkt is not None: + args['transformWkt'] = transformWkt + + func = apifunction.ApiFunction(self.name()) + super().__init__(func, func.promoteArgs(args)) + + @classmethod + def initialize(cls) -> None: + """Imports API functions to this class.""" + if not cls._initialized: + apifunction.ApiFunction.importApi(cls, cls.name(), cls.name()) + cls._initialized = True + + @classmethod + def reset(cls) -> None: + """Removes imported API functions from this class.""" + apifunction.ApiFunction.clearApi(cls) + cls._initialized = False + + @staticmethod + def name() -> str: + return 'Projection' diff --git a/python/ee/reducer.py b/python/ee/reducer.py new file mode 100644 index 000000000..5bf5c5b8e --- /dev/null +++ b/python/ee/reducer.py @@ -0,0 +1,58 @@ +"""A wrapper for Reducers.""" + +from ee import apifunction +from ee import computedobject + + +class Reducer(computedobject.ComputedObject): + """An object to represent an Earth Engine Reducer. + + Example: + fc = ee.FeatureCollection([ + ee.Feature(None, {'label': 1}), + ee.Feature(None, {'label': 2}), + ]) + reducer = ee.Reducer(ee.Reducer.toList()) + result = fc.reduceColumns(reducer, ['label']).get('list') + print(result.getInfo()) + """ + + _initialized: bool = False + + def __init__( + self, + reducer: computedobject.ComputedObject, + ): + """Creates a Reducer wrapper. + + Args: + reducer: A reducer to cast. + """ + self.initialize() + + if isinstance(reducer, computedobject.ComputedObject): + # There is no server-side constructor for ee.Reducer. Pass the object + # as-is to the server in case it is intended to be a Reducer cast. + super().__init__(reducer.func, reducer.args, reducer.varName) + return + + raise TypeError( + f'Reducer can only be used as a cast to Reducer. Found {type(reducer)}.' + ) + + @classmethod + def initialize(cls) -> None: + """Imports API functions to this class.""" + if not cls._initialized: + apifunction.ApiFunction.importApi(cls, cls.name(), cls.name()) + cls._initialized = True + + @classmethod + def reset(cls) -> None: + """Removes imported API functions from this class.""" + apifunction.ApiFunction.clearApi(cls) + cls._initialized = False + + @staticmethod + def name() -> str: + return 'Reducer' diff --git a/python/ee/tests/algorithms.json b/python/ee/tests/algorithms.json index c150869c6..f3865b52b 100644 --- a/python/ee/tests/algorithms.json +++ b/python/ee/tests/algorithms.json @@ -6074,7 +6074,7 @@ }] }, { "name": "algorithms/FeatureCollection.randomPoints", - "description": "Generates points that are uniformly random on the sphere, and within the given region.", + "description": "Generates points that are uniformly random in the given geometry. If the geometry is two-dimensional (polygon or multi-polygon) then the returned points are uniformly distributed on the given region of the sphere. If the geometry is one-dimensional (linestrings), the returned points are interpolated uniformly along the geometry\u0027s edges. If the geometry has dimension zero (points), the returned points are sampled uniformly from the input points. If a multi-geometry of mixed dimension is given, points are sampled from the component geometries with the highest dimension.", "returnType": "FeatureCollection", "arguments": [{ "argumentName": "region", diff --git a/python/ee/tests/blob_test.py b/python/ee/tests/blob_test.py index fb3e52c5a..b6777bba6 100644 --- a/python/ee/tests/blob_test.py +++ b/python/ee/tests/blob_test.py @@ -18,7 +18,7 @@ def test_blob(self): self.assertEqual(blob_func, blob.func) self.assertFalse(blob.isVariable()) - self.assertEqual({'url': url}, blob.args) + self.assertEqual({'url': ee.String(url)}, blob.args) result = json.loads(blob.serialize()) expect = { @@ -36,6 +36,9 @@ def test_blob(self): } self.assertEqual(expect, result) + result_cast = json.loads(ee.Blob(blob).serialize()) + self.assertEqual(expect, result_cast) + self.assertEqual({'value': 'fakeValue'}, blob.getInfo()) def test_computed_object(self): diff --git a/python/ee/tests/computedobject_test.py b/python/ee/tests/computedobject_test.py index 21f2dc9a1..2083367d3 100644 --- a/python/ee/tests/computedobject_test.py +++ b/python/ee/tests/computedobject_test.py @@ -14,7 +14,7 @@ class ComputedObjectTest(apitestcase.ApiTestCase): def test_metaclass_call_self_casting(self): number = ee.Number(1) - # This excercises the self-cast case of ComputedObjectMetaclass.__call__. + # This exercises the self-cast case of ComputedObjectMetaclass.__call__. result = ee.Number(number) self.assertIs(result, number) diff --git a/python/ee/tests/confusionmatrix_test.py b/python/ee/tests/confusionmatrix_test.py new file mode 100644 index 000000000..354cf806e --- /dev/null +++ b/python/ee/tests/confusionmatrix_test.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python3 +"""Tests for the ee.ConfusionMatrix module.""" + +import json + +import ee +from ee import apitestcase +import unittest + + +class ConfusionMatrixTest(apitestcase.ApiTestCase): + + def test_init(self): + array = ee.Array([[0, 0], [0, 0]]) + order = ee.List([2, 1]) + confusion_matrix = ee.ConfusionMatrix(array, order) + self.assertEqual({'value': 'fakeValue'}, confusion_matrix.getInfo()) + + func = ee.ApiFunction.lookup('ConfusionMatrix') + self.assertEqual(func, confusion_matrix.func) + self.assertFalse(confusion_matrix.isVariable()) + self.assertEqual({'array': array, 'order': order}, confusion_matrix.args) + + def test_init_order_literal(self): + array = ee.Array([[0, 0], [0, 0]]) + order = [2, 1] + confusion_matrix = ee.ConfusionMatrix(array, order) + self.assertEqual({'value': 'fakeValue'}, confusion_matrix.getInfo()) + + func = ee.ApiFunction.lookup('ConfusionMatrix') + self.assertEqual(func, confusion_matrix.func) + self.assertFalse(confusion_matrix.isVariable()) + self.assertEqual( + {'array': array, 'order': ee.List(order)}, confusion_matrix.args + ) + + def test_init_no_order(self): + array = ee.Array([[0, 0], [0, 0]]) + confusion_matrix = ee.ConfusionMatrix(array, None) + self.assertEqual({'value': 'fakeValue'}, confusion_matrix.getInfo()) + + func = ee.ApiFunction.lookup('ConfusionMatrix') + self.assertEqual(func, confusion_matrix.func) + self.assertFalse(confusion_matrix.isVariable()) + self.assertEqual({'array': array}, confusion_matrix.args) + + def test_cast(self): + array = ee.Array([[0, 0], [0, 0]]) + order = ee.List([2, 1]) + confusion_matrix = ee.ConfusionMatrix(array, order) + result = json.loads(ee.ConfusionMatrix(confusion_matrix).serialize()) + expect = { + 'result': '0', + 'values': { + '1': {'constantValue': [0, 0]}, + '0': { + 'functionInvocationValue': { + 'functionName': 'ConfusionMatrix', + 'arguments': { + 'array': { + 'functionInvocationValue': { + 'functionName': 'Array', + 'arguments': { + 'values': { + 'arrayValue': { + 'values': [ + {'valueReference': '1'}, + {'valueReference': '1'}, + ] + } + } + }, + } + }, + 'order': {'constantValue': [2, 1]}, + }, + } + }, + }, + } + self.assertEqual(expect, result) + + +if __name__ == '__main__': + unittest.main() diff --git a/python/ee/tests/daterange_test.py b/python/ee/tests/daterange_test.py new file mode 100644 index 000000000..30381d888 --- /dev/null +++ b/python/ee/tests/daterange_test.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python3 +"""Tests for the ee.DateRange module. + +DateRange is currently 100% dynamically generated. +""" + +import json + +import ee +from ee import apitestcase +import unittest + +START = 'start' +END = 'end' +TIME_ZONE = 'timeZone' +# Example time zone. +LOS_ANGELES = 'America/Los_Angeles' + +DATERANGE = 'DateRange' + + +class DateRangeTest(apitestcase.ApiTestCase): + + def test_init_all(self): + start = 1 + end = 123456 + daterange = ee.DateRange(start, end, LOS_ANGELES) + self.assertEqual({'value': 'fakeValue'}, daterange.getInfo()) + + daterange_func = ee.ApiFunction.lookup('DateRange') + self.assertEqual(daterange_func, daterange.func) + + self.assertFalse(daterange.isVariable()) + + self.assertEqual( + {START: start, END: end, TIME_ZONE: ee.String(LOS_ANGELES)}, + daterange.args, + ) + + result = json.loads(daterange.serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'arguments': { + 'end': {'constantValue': end}, + 'start': {'constantValue': start}, + 'timeZone': {'constantValue': LOS_ANGELES}, + }, + 'functionName': DATERANGE, + } + } + }, + } + self.assertEqual(expect, result) + + cast_result = json.loads(ee.DateRange(daterange).serialize()) + self.assertEqual(expect, cast_result) + + def test_init_only_start(self): + start = 3 + daterange = ee.DateRange(start) + result = json.loads(daterange.serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'arguments': { + 'start': {'constantValue': start}, + }, + 'functionName': DATERANGE, + } + } + }, + } + self.assertEqual(expect, result) + + def test_init_start_and_end_strings(self): + start = '2017-06-24' + end = '2017-06-24T07:00:00' + daterange = ee.DateRange(start, end) + result = json.loads(daterange.serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'arguments': { + 'end': {'constantValue': end}, + 'start': {'constantValue': start}, + }, + 'functionName': DATERANGE, + } + } + }, + } + self.assertEqual(expect, result) + + def test_init_ee_dates(self): + start = ee.Date('2017-06-24') + end = ee.Date('2017-06-24T07:00:00') + daterange = ee.DateRange(start, end) + result = json.loads(daterange.serialize()) + print(result) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'functionName': 'DateRange', + 'arguments': { + 'end': { + 'functionInvocationValue': { + 'functionName': 'Date', + 'arguments': { + 'value': { + 'constantValue': '2017-06-24T07:00:00' + } + }, + } + }, + 'start': { + 'functionInvocationValue': { + 'functionName': 'Date', + 'arguments': { + 'value': {'constantValue': '2017-06-24'} + }, + } + }, + }, + } + } + }, + } + self.assertEqual(expect, result) + + def test_no_args(self): + message = r"missing 1 required positional argument: 'start'" + with self.assertRaisesRegex(TypeError, message): + ee.DateRange() # pytype:disable=missing-parameter + + +if __name__ == '__main__': + unittest.main() diff --git a/python/ee/tests/ee_array_test.py b/python/ee/tests/ee_array_test.py new file mode 100644 index 000000000..c9d7665f7 --- /dev/null +++ b/python/ee/tests/ee_array_test.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python3 +"""Tests for the ee.Array module.""" + +import json + +import ee +from ee import apitestcase +import unittest + + +class EeArrayTest(apitestcase.ApiTestCase): + + def test_init(self): + array = ee.Array([1, 2]) + self.assertEqual({'value': 'fakeValue'}, array.getInfo()) + + array_func = ee.ApiFunction.lookup('Array') + self.assertEqual(array_func, array.func) + self.assertFalse(array.isVariable()) + self.assertEqual({'values': [1, 2]}, array.args) + + def test_init_pixel_type(self): + pixel_type = ee.PixelType.int8() + array = ee.Array([], pixelType=pixel_type) + self.assertEqual({'value': 'fakeValue'}, array.getInfo()) + + array_func = ee.ApiFunction.lookup('Array') + self.assertEqual(array_func, array.func) + self.assertFalse(array.isVariable()) + self.assertEqual({'values': [], 'pixelType': pixel_type}, array.args) + + def test_init_tuple(self): + array = ee.Array((2, 3, 4)) + self.assertEqual({'value': 'fakeValue'}, array.getInfo()) + + array_func = ee.ApiFunction.lookup('Array') + self.assertEqual(array_func, array.func) + self.assertFalse(array.isVariable()) + self.assertEqual({'values': (2, 3, 4)}, array.args) + + def test_serialize(self): + array = ee.Array([[1, 2], [3, 4]]) + result = json.loads(array.serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'functionName': 'Array', + 'arguments': { + 'values': {'constantValue': [[1, 2], [3, 4]]} + }, + } + } + }, + } + self.assertEqual(expect, result) + + def test_cast(self): + array = ee.Array([[1, 2], [3, 4]]) + result = json.loads(ee.Array(array).serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'functionName': 'Array', + 'arguments': { + 'values': {'constantValue': [[1, 2], [3, 4]]} + }, + } + } + }, + } + self.assertEqual(expect, result) + + +if __name__ == '__main__': + unittest.main() diff --git a/python/ee/tests/errormargin_test.py b/python/ee/tests/errormargin_test.py index bc04dd9ae..551ed48c0 100644 --- a/python/ee/tests/errormargin_test.py +++ b/python/ee/tests/errormargin_test.py @@ -26,7 +26,18 @@ def test_init(self): self.assertEqual(errormargin_func, errormargin.func) self.assertFalse(errormargin.isVariable()) - self.assertEqual({VALUE: value, UNIT: unit}, errormargin.args) + self.assertEqual(set([UNIT, VALUE]), set(errormargin.args)) + expected_unit = { + 'result': '0', + 'values': {'0': {'constantValue': 'projected'}}, + } + self.assertEqual( + expected_unit, json.loads(errormargin.args[UNIT].serialize()) + ) + expected_value = {'result': '0', 'values': {'0': {'constantValue': 2}}} + self.assertEqual( + expected_value, json.loads(errormargin.args[VALUE].serialize()) + ) result = json.loads(errormargin.serialize()) expect = { diff --git a/python/ee/tests/join_test.py b/python/ee/tests/join_test.py index c3ace11ac..035541ab4 100644 --- a/python/ee/tests/join_test.py +++ b/python/ee/tests/join_test.py @@ -1,8 +1,5 @@ #!/usr/bin/env python3 -"""Tests for the ee.Join module. - - -""" +"""Tests for the ee.Join module.""" import json @@ -85,11 +82,6 @@ def test_join_no_args(self): with self.assertRaisesRegex(TypeError, message): ee.Join() # pytype:disable=missing-parameter - def test_join_ee_string_arg(self): - message = 'Join can only be used as a cast' - with self.assertRaisesRegex(TypeError, message): - ee.Join(ee.String('bad argument')) - if __name__ == '__main__': unittest.main() diff --git a/python/ee/tests/model_test.py b/python/ee/tests/model_test.py new file mode 100644 index 000000000..fda42bb27 --- /dev/null +++ b/python/ee/tests/model_test.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +"""Tests for the ee.Model module.""" + +import json + +import ee +from ee import apitestcase +import unittest + +MODEL = 'Model' + + +class ModelTest(apitestcase.ApiTestCase): + + def test_serialize(self): + model = ee.Model.fromAiPlatformPredictor('some-project', 'some-model') + result = json.loads(model.serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'functionName': 'Model.fromAiPlatformPredictor', + 'arguments': { + 'projectId': {'constantValue': 'some-model'}, + 'projectName': {'constantValue': 'some-project'}, + }, + } + } + }, + } + self.assertEqual(expect, result) + + def test_cast(self): + model = ee.Model( + ee.Model.fromAiPlatformPredictor('some-project', 'some-model') + ) + result = json.loads(model.serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'functionName': 'Model.fromAiPlatformPredictor', + 'arguments': { + 'projectId': {'constantValue': 'some-model'}, + 'projectName': {'constantValue': 'some-project'}, + }, + } + } + }, + } + self.assertEqual(expect, result) + + +if __name__ == '__main__': + unittest.main() diff --git a/python/ee/tests/pixeltype_test.py b/python/ee/tests/pixeltype_test.py index 63a65c11f..e73352284 100644 --- a/python/ee/tests/pixeltype_test.py +++ b/python/ee/tests/pixeltype_test.py @@ -40,14 +40,25 @@ def test_int(self): self.assertFalse(pixeltype.isVariable()) self.assertEqual( - { - DIMENSIONS_KEY: dimensions, - MAX_VALUE_KEY: max_value, - MIN_VALUE_KEY: min_value, - PRECISION_KEY: precision, - }, - pixeltype.args, + set([DIMENSIONS_KEY, MAX_VALUE_KEY, MIN_VALUE_KEY, PRECISION_KEY]), + set(pixeltype.args), + ) + expected_dimensions = {'result': '0', 'values': {'0': {'constantValue': 2}}} + self.assertEqual( + expected_dimensions, + json.loads(pixeltype.args[DIMENSIONS_KEY].serialize()), + ) + expected_max_value = {'result': '0', 'values': {'0': {'constantValue': 1}}} + self.assertEqual( + expected_max_value, + json.loads(pixeltype.args[MAX_VALUE_KEY].serialize()), + ) + expected_min_value = {'result': '0', 'values': {'0': {'constantValue': 0}}} + self.assertEqual( + expected_min_value, + json.loads(pixeltype.args[MIN_VALUE_KEY].serialize()), ) + self.assertEqual(Type.INT, pixeltype.args[PRECISION_KEY]) result = json.loads(pixeltype.serialize()) expect = { diff --git a/python/ee/tests/projection_test.py b/python/ee/tests/projection_test.py new file mode 100644 index 000000000..3fbdff2c8 --- /dev/null +++ b/python/ee/tests/projection_test.py @@ -0,0 +1,120 @@ +#!/usr/bin/env python3 +"""Tests for the ee.Projection module.""" + +import json + +import ee +from ee import apitestcase +import unittest + +CRS = 'crs' +TRANSFORM = 'transform' +TRANSFORM_WKT = 'transformWkt' + +PROJECTION = 'Projection' + + +class ProjectionTest(apitestcase.ApiTestCase): + + def test_init(self): + crs = 'EPSG:4326' + transform = [1, 2, 3, 4, 5, 6] + + projection = ee.Projection(crs, transform=transform) + self.assertEqual({'value': 'fakeValue'}, projection.getInfo()) + + projection_func = ee.ApiFunction.lookup('Projection') + self.assertEqual(projection_func, projection.func) + self.assertFalse(projection.isVariable()) + self.assertEqual(set(['crs', 'transform']), set(projection.args)) + self.assertEqual('EPSG:4326', projection.args['crs']) + expected_transform = { + 'result': '0', + 'values': {'0': {'constantValue': [1, 2, 3, 4, 5, 6]}}, + } + self.assertEqual( + expected_transform, + json.loads(projection.args['transform'].serialize()), + ) + + def test_init_transform_wkt(self): + crs = 'EPSG:4326' + transform_wkt = ( + 'PARAM_MT["Affine",' + ' PARAMETER["num_row",3],' + ' PARAMETER["num_col",3],' + ' PARAMETER["elt_0_1",1],' + ' PARAMETER["elt_0_2",2],' + ' PARAMETER["elt_1_2",3]]' + ) + + projection = ee.Projection(crs, transformWkt=transform_wkt) + self.assertEqual({'value': 'fakeValue'}, projection.getInfo()) + + projection_func = ee.ApiFunction.lookup('Projection') + self.assertEqual(projection_func, projection.func) + self.assertEqual(set(['crs', 'transformWkt']), set(projection.args)) + self.assertEqual('EPSG:4326', projection.args['crs']) + expected_transform_wkt = { + 'result': '0', + 'values': { + '0': { + 'constantValue': ( + 'PARAM_MT["Affine", PARAMETER["num_row",3], ' + ' PARAMETER["num_col",3], PARAMETER["elt_0_1",1], ' + ' PARAMETER["elt_0_2",2], PARAMETER["elt_1_2",3]]' + ) + } + }, + } + self.assertEqual( + expected_transform_wkt, + json.loads(projection.args['transformWkt'].serialize()), + ) + projection_func = ee.ApiFunction.lookup('Projection') + self.assertEqual(projection_func, projection.func) + + def test_serialize(self): + crs = 'EPSG:32610' + transform = [1, 2, 3, 4, 5, 6] + + result = json.loads(ee.Projection(crs, transform=transform).serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'arguments': { + 'crs': {'constantValue': crs}, + 'transform': {'constantValue': transform}, + }, + 'functionName': PROJECTION, + } + } + }, + } + self.assertEqual(expect, result) + + def test_cast(self): + crs = 'EPSG:32610' + + projection = ee.Projection(ee.Projection(crs)) + result = json.loads(projection.serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'arguments': { + 'crs': {'constantValue': crs}, + }, + 'functionName': PROJECTION, + } + } + }, + } + self.assertEqual(expect, result) + + +if __name__ == '__main__': + unittest.main() diff --git a/python/ee/tests/reducer_test.py b/python/ee/tests/reducer_test.py new file mode 100644 index 000000000..2022f904c --- /dev/null +++ b/python/ee/tests/reducer_test.py @@ -0,0 +1,59 @@ +#!/usr/bin/env python3 +"""Tests for ee.Reducer module.""" + +import json + +import ee +from ee import apitestcase +import unittest + +TO_LIST = 'Reducer.toList' + + +class ReducerTest(apitestcase.ApiTestCase): + + def test_simple(self): + reducer = ee.Reducer.toList() + self.assertEqual({'value': 'fakeValue'}, reducer.getInfo()) + + reducer_func = ee.ApiFunction.lookup(TO_LIST) + self.assertEqual(reducer_func, reducer.func) + + self.assertFalse(reducer.isVariable()) + self.assertEqual( + {}, + reducer.args, + ) + + result = json.loads(reducer.serialize()) + expect = { + 'result': '0', + 'values': { + '0': { + 'functionInvocationValue': { + 'functionName': TO_LIST, + 'arguments': {}, + } + } + }, + } + self.assertEqual(expect, result) + + cast_result = json.loads(ee.Reducer(reducer).serialize()) + self.assertEqual(expect, cast_result) + + def test_no_args(self): + message = r"missing 1 required positional argument: 'reducer'" + with self.assertRaisesRegex(TypeError, message): + ee.Reducer() # pytype: disable=missing-parameter + + def test_bad_arg_literal(self): + message = ( + r"Reducer can only be used as a cast to Reducer. Found \." + ) + with self.assertRaisesRegex(TypeError, message): + ee.Reducer(1) # pytype: disable=wrong-arg-types + + +if __name__ == '__main__': + unittest.main() diff --git a/python/pyproject.toml b/python/pyproject.toml index 6d98a8fe3..4b5fc58a7 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "earthengine-api" -version = "0.1.386" +version = "0.1.388" description = "Earth Engine Python API" requires-python = ">=3.7" keywords = [