(function(){var l,aa=function(a){var b=0;return function(){return b=e}}); ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=fa(this,b,"startsWith");b+="";var e=d.length,f=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var g=0;g=f}});ea("String.prototype.repeat",function(a){return a?a:function(b){var c=fa(this,null,"repeat");if(0>b||1342177279>>=1)c+=c;return d}}); var ha=function(){ha=function(){};da.Symbol||(da.Symbol=ia)},ja=function(a,b){this.ye=a;ca(this,"description",{configurable:!0,writable:!0,value:b})};ja.prototype.toString=function(){return this.ye}; var ia=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new ja("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}(),la=function(){ha();var a=da.Symbol.iterator;a||(a=da.Symbol.iterator=da.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&ca(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ka(aa(this))}});la=function(){}},ka=function(a){la();a={next:a};a[da.Symbol.iterator]=function(){return this};return a}, ma=function(a,b){la();a instanceof String&&(a+="");var c=0,d={next:function(){if(cc&&(c=Math.max(c+e,0));c>>0),Ba=0,Ca=function(a,b,c){return a.call.apply(a.bind,arguments)},Da=function(a,b,c){if(!a)throw Error();if(2c&&(c=Math.max(0,a.length+c));if(t(a))return t(b)&&1==b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1},Ua=Array.prototype.forEach?function(a,b,c){C(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=t(a)?a.split(""):a,f=0;fb?null:t(a)?a.charAt(b):a[b]},bb=function(a,b){return 0<=Sa(a,b)},cb=function(a){if(!v(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},eb= function(a,b){b=Sa(a,b);var c;(c=0<=b)&&db(a,b);return c},db=function(a,b){C(null!=a.length);Array.prototype.splice.call(a,b,1)},fb=function(a){return Array.prototype.concat.apply([],arguments)},gb=function(a){var b=a.length;if(0=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},jb=function(a){for(var b={},c=0,d=0;da-0)return[];for(var c=0;c/g,qb=/"/g,rb=/'/g,sb=/\x00/g,tb=/[\x00&<>"']/,ub=function(a,b){return ab?1:0};var vb;a:{var wb=p.navigator;if(wb){var xb=wb.userAgent;if(xb){vb=xb;break a}}vb=""}var yb=function(a){return-1!=vb.indexOf(a)};var zb=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},Ab=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},Bb=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},Cb=function(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1},Db=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},Eb=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},Fb=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1},Hb=function(a){var b= Gb,c;for(c in b)if(a.call(void 0,b[c],c,b))return c},Ib=function(a){for(var b in a)return!1;return!0},Jb=function(a,b){b in a&&delete a[b]},Kb=function(a){var b={},c;for(c in a)b[c]=a[c];return b},Lb=function(a){var b=wa(a);if("object"==b||"array"==b){if(x(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=Lb(a[c]);return b}return a},Mb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Nb=function(a,b){for(var c,d,e=1;e"}else f=void 0===a?"undefined":null===a?"null":typeof a;Na("Argument is not a %s (or a non-Element, non-Location mock); got: %s", b,f)}};var Pb=function(a){return a};var Sb=function(a,b){this.nd=a===Qb&&b||"";this.Ce=Rb};Sb.prototype.Ia=!0;Sb.prototype.Ga=function(){return this.nd};Sb.prototype.toString=function(){return"Const{"+this.nd+"}"};var Tb=function(a){if(a instanceof Sb&&a.constructor===Sb&&a.Ce===Rb)return a.nd;Na("expected object of type Const, got '"+a+"'");return"type_error:Const"},Rb={},Qb={},Ub=new Sb(Qb,"");var Vb=function(){this.dd=""};Vb.prototype.Ia=!0;Vb.prototype.Ga=function(){return this.dd.toString()};Vb.prototype.toString=function(){return"SafeScript{"+this.dd+"}"};Vb.prototype.qa=function(a){this.dd=a;return this};(new Vb).qa("");var Xb=function(){this.fc="";this.we=null;this.De=Wb};Xb.prototype.Ia=!0;Xb.prototype.Ga=function(){return this.fc.toString()};Xb.prototype.toString=function(){return"TrustedResourceUrl{"+this.fc+"}"}; var Yb=function(a){if(a instanceof Xb&&a.constructor===Xb&&a.De===Wb)return a.fc;Na("expected object of type TrustedResourceUrl, got '"+a+"' of type "+wa(a));return"type_error:TrustedResourceUrl"},cc=function(a){var b=Tb(Zb);if(!$b.test(b))throw Error("Invalid TrustedResourceUrl format: "+b);var c=b.replace(ac,function(d,e){if(!Object.prototype.hasOwnProperty.call(a,e))throw Error('Found marker, "'+e+'", in format string, "'+b+'", but no valid label mapping found in args: '+JSON.stringify(a));d=a[e]; return d instanceof Sb?Tb(d):encodeURIComponent(String(d))});return bc(c)},ac=/%{(\w+)}/g,$b=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Wb={},bc=function(a){var b=new Xb;b.fc=a;return b};var ec=function(){this.ec="";this.Be=dc};ec.prototype.Ia=!0;ec.prototype.Ga=function(){return this.ec.toString()};ec.prototype.toString=function(){return"SafeUrl{"+this.ec+"}"}; var fc=function(a){if(a instanceof ec&&a.constructor===ec&&a.Be===dc)return a.ec;Na("expected object of type SafeUrl, got '"+a+"' of type "+wa(a));return"type_error:SafeUrl"},gc=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-wav|wav|webm)|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime))(?:;\w+=(?:\w+|"[\w;=]+"))*$/i,ic=function(a){if(gc.test(a.type)){var b=q(p.URL)&&q(p.URL.createObjectURL)?p.URL:q(p.webkitURL)&&q(p.webkitURL.createObjectURL)? p.webkitURL:q(p.createObjectURL)?p:null;if(null==b)throw Error("This browser doesn't seem to support blob URLs");a=b.createObjectURL(a)}else a="about:invalid#zClosurez";return hc(a)},dc={},hc=function(a){var b=new ec;b.ec=a;return b};hc("about:blank");var jc=function(){this.fd=""};jc.prototype.Ia=!0;jc.prototype.Ga=function(){return this.fd};jc.prototype.toString=function(){return"SafeStyle{"+this.fd+"}"};jc.prototype.qa=function(a){this.fd=a;return this};(new jc).qa("");var lc=function(){this.ed=""};lc.prototype.Ia=!0;lc.prototype.Ga=function(){return this.ed};lc.prototype.toString=function(){return"SafeStyleSheet{"+this.ed+"}"};lc.prototype.qa=function(a){this.ed=a;return this};(new lc).qa("");var nc=function(){this.dc="";this.Ae=mc};nc.prototype.Ia=!0;nc.prototype.Ga=function(){return this.dc.toString()};nc.prototype.toString=function(){return"SafeHtml{"+this.dc+"}"};var pc=function(){var a=oc;if(a instanceof nc&&a.constructor===nc&&a.Ae===mc)return a.dc;Na("expected object of type SafeHtml, got '"+a+"' of type "+wa(a));return"type_error:SafeHtml"},mc={};nc.prototype.qa=function(a){this.dc=a;return this};(new nc).qa("");var oc=(new nc).qa("");(new nc).qa("
");var qc=function(a){var b=bc(Tb(Ub));Ob(a,"HTMLIFrameElement");a.src=b.we?b.we:Yb(b).toString()},rc=function(a,b){Ob(a,"HTMLScriptElement");a.src=Yb(b);if(null===ta)b:{b=p.document;if((b=b.querySelector&&b.querySelector("script[nonce]"))&&(b=b.nonce||b.getAttribute("nonce"))&&sa.test(b)){ta=b;break b}ta=""}b=ta;b&&a.setAttribute("nonce",b)};var sc=function(a,b){for(var c=a.split("%s"),d="",e=Array.prototype.slice.call(arguments,1);e.length&&1")&&(a=a.replace(pb,">")),-1!=a.indexOf('"')&&(a=a.replace(qb,""")),-1!=a.indexOf("'")&&(a=a.replace(rb,"'")),-1!=a.indexOf("\x00")&&(a=a.replace(sb,"�")));return a},uc=function(a){var b=1;a= a.split(":");for(var c=[];0parseFloat(Fc)){Ec=String(Hc);break a}}Ec=Fc} var Ic=Ec,wc={},Jc=function(a){return xc(a,function(){for(var b=0,c=mb(String(Ic)).split("."),d=mb(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var Rc="closure_listenable_"+(1E6*Math.random()|0),Sc=function(a){return!(!a||!a[Rc])},Tc=0;var Uc=function(a,b,c,d,e){this.listener=a;this.gc=null;this.src=b;this.type=c;this.capture=!!d;this.pa=e;this.key=++Tc;this.eb=this.Mb=!1},Vc=function(a){a.eb=!0;a.listener=null;a.gc=null;a.src=null;a.pa=null};var Wc=function(a){this.src=a;this.H={};this.Ib=0};Wc.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.H[f];a||(a=this.H[f]=[],this.Ib++);var g=Xc(a,b,d,e);-1c.keyCode||void 0!=c.returnValue)){a:{var e=!1;if(0==c.keyCode)try{c.keyCode= -1;break a}catch(g){e=!0}if(e||void 0==c.returnValue)c.returnValue=!0}c=[];for(e=b.currentTarget;e;e=e.parentNode)c.push(e);a=a.type;for(e=c.length-1;!b.Ma&&0<=e;e--){b.currentTarget=c[e];var f=md(c[e],a,!0,b);d=d&&f}for(e=0;!b.Ma&&e>>0),dd=function(a){C(a,"Listener can not be null.");if(x(a))return a;C(a.handleEvent, "An object listener must have handleEvent method.");a[nd]||(a[nd]=function(b){return a.handleEvent(b)});return a[nd]};var D=function(){B.call(this);this.Z=new Wc(this);this.Ee=this;this.cd=null};A(D,B);D.prototype[Rc]=!0;l=D.prototype;l.addEventListener=function(a,b,c,d){cd(this,a,b,c,d)};l.removeEventListener=function(a,b,c,d){jd(this,a,b,c,d)}; l.dispatchEvent=function(a){od(this);var b=this.cd;if(b){var c=[];for(var d=1;b;b=b.cd)c.push(b),C(1E3>++d,"infinite loop")}b=this.Ee;d=a.type||a;if(t(a))a=new Ia(a,b);else if(a instanceof Ia)a.target=a.target||b;else{var e=a;a=new Ia(d,b);Nb(a,e)}e=!0;if(c)for(var f=c.length-1;!a.Ma&&0<=f;f--){var g=a.currentTarget=c[f];e=pd(g,d,!0,a)&&e}a.Ma||(g=a.currentTarget=b,e=pd(g,d,!0,a)&&e,a.Ma||(e=pd(g,d,!1,a)&&e));if(c)for(f=0;!a.Ma&&f=a.length)throw qd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},td=function(a,b){if(ya(a))try{Ua(a,b,void 0)}catch(c){if(c!==qd)throw c;}else{a=sd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==qd)throw c;}}};var ud=function(a,b){this.f={};this.l=[];this.Jb=this.m=0;var c=arguments.length;if(12*this.m&&vd(this),!0):!1};var vd=function(a){if(a.m!=a.l.length){for(var b=0,c=0;b=d.l.length)throw qd;var f=d.l[b++];return a?f:d.f[f]};return e};var wd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var yd=function(a){if(a.o&&"function"==typeof a.o)a=a.o();else if(ya(a)||t(a))a=a.length;else{var b=0,c;for(c in a)b++;a=b}return a},zd=function(a){if(a.w&&"function"==typeof a.w)return a.w();if(t(a))return a.split("");if(ya(a)){for(var b=[],c=a.length,d=0;dc)return!1;!(b instanceof Dd)&&5e&&(e+=d);return[a.af,c,e,b.y].join("/")};Id.prototype.Qc=function(){return this.Ca.length};var Kd=function(a){Ia.call(this,"tileevent");this.count=a};A(Kd,Ia);var Ld={kind:"discovery#restDescription",name:"earthengine",version:"v1alpha",rootUrl:"https://earthengine.googleapis.com/",servicePath:"",batchPath:"batch",id:"earthengine:v1alpha",parameters:{"$.xgafv":{location:"query",required:!1},access_token:{location:"query",required:!1},alt:{location:"query",required:!1},callback:{location:"query",required:!1},fields:{location:"query",required:!1},key:{location:"query",required:!1},oauth_token:{location:"query",required:!1},prettyPrint:{location:"query",required:!1}, quotaUser:{location:"query",required:!1},uploadType:{location:"query",required:!1},upload_protocol:{location:"query",required:!1}},resources:{projects:{methods:{listAssets:{id:"earthengine.projects.listAssets",path:"v1alpha/{+parent}:listAssets",httpMethod:"GET",parameters:{parent:{location:"path",required:!0},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1}}}},resources:{algorithms:{methods:{list:{id:"earthengine.projects.algorithms.list",path:"v1alpha/{+project}/algorithms", httpMethod:"GET",parameters:{project:{location:"path",required:!0}}}}},assets:{methods:{copy:{id:"earthengine.projects.assets.copy",path:"v1alpha/{+sourceName}:copy",httpMethod:"POST",request:{$ref:"CopyAssetRequest"},parameters:{sourceName:{location:"path",required:!0}}},create:{id:"earthengine.projects.assets.create",path:"v1alpha/{+parent}/assets",httpMethod:"POST",request:{$ref:"EarthEngineAsset"},parameters:{parent:{location:"path",required:!0},assetId:{location:"query",required:!1},overwrite:{location:"query", required:!1}}},"delete":{id:"earthengine.projects.assets.delete",path:"v1alpha/{+name}",httpMethod:"DELETE",parameters:{name:{location:"path",required:!0}}},get:{id:"earthengine.projects.assets.get",path:"v1alpha/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}},getIamPolicy:{id:"earthengine.projects.assets.getIamPolicy",path:"v1alpha/{+resource}:getIamPolicy",httpMethod:"POST",request:{$ref:"GetIamPolicyRequest"},parameters:{resource:{location:"path",required:!0}}},getPixels:{id:"earthengine.projects.assets.getPixels", path:"v1alpha/{+name}:getPixels",httpMethod:"POST",request:{$ref:"GetPixelsRequest"},parameters:{name:{location:"path",required:!0}}},listAssets:{id:"earthengine.projects.assets.listAssets",path:"v1alpha/{+parent}:listAssets",httpMethod:"GET",parameters:{parent:{location:"path",required:!0},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1}}},listFeatures:{id:"earthengine.projects.assets.listFeatures",path:"v1alpha/{+parent}:listFeatures",httpMethod:"GET",parameters:{parent:{location:"path", required:!0},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},region:{location:"query",required:!1},filter:{location:"query",required:!1}}},listImages:{id:"earthengine.projects.assets.listImages",path:"v1alpha/{+parent}:listImages",httpMethod:"GET",parameters:{parent:{location:"path",required:!0},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1},startTime:{location:"query",required:!1},endTime:{location:"query",required:!1},region:{location:"query", required:!1},filter:{location:"query",required:!1},view:{location:"query",required:!1}}},move:{id:"earthengine.projects.assets.move",path:"v1alpha/{+sourceName}:move",httpMethod:"POST",request:{$ref:"MoveAssetRequest"},parameters:{sourceName:{location:"path",required:!0}}},patch:{id:"earthengine.projects.assets.patch",path:"v1alpha/{+name}",httpMethod:"PATCH",request:{$ref:"UpdateAssetRequest"},parameters:{name:{location:"path",required:!0}}},setIamPolicy:{id:"earthengine.projects.assets.setIamPolicy", path:"v1alpha/{+resource}:setIamPolicy",httpMethod:"POST",request:{$ref:"SetIamPolicyRequest"},parameters:{resource:{location:"path",required:!0}}},testIamPermissions:{id:"earthengine.projects.assets.testIamPermissions",path:"v1alpha/{+resource}:testIamPermissions",httpMethod:"POST",request:{$ref:"TestIamPermissionsRequest"},parameters:{resource:{location:"path",required:!0}}}}},filmstripThumbnails:{methods:{create:{id:"earthengine.projects.filmstripThumbnails.create",path:"v1alpha/{+parent}/filmstripThumbnails", httpMethod:"POST",request:{$ref:"FilmstripThumbnail"},parameters:{parent:{location:"path",required:!0}}},getPixels:{id:"earthengine.projects.filmstripThumbnails.getPixels",path:"v1alpha/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}},image:{methods:{computePixels:{id:"earthengine.projects.image.computePixels",path:"v1alpha/{+project}/image:computePixels",httpMethod:"POST",request:{$ref:"ComputePixelsRequest"},parameters:{project:{location:"path",required:!0}}}, "export":{id:"earthengine.projects.image.export",path:"v1alpha/{+project}/image:export",httpMethod:"POST",request:{$ref:"ExportImageRequest"},parameters:{project:{location:"path",required:!0}}},"import":{id:"earthengine.projects.image.import",path:"v1alpha/{+project}/image:import",httpMethod:"POST",request:{$ref:"ImportImageRequest"},parameters:{project:{location:"path",required:!0}}}}},imageCollection:{methods:{computeImages:{id:"earthengine.projects.imageCollection.computeImages",path:"v1alpha/{+project}/imageCollection:computeImages", httpMethod:"POST",request:{$ref:"ComputeImagesRequest"},parameters:{project:{location:"path",required:!0}}}}},map:{methods:{"export":{id:"earthengine.projects.map.export",path:"v1alpha/{+project}/map:export",httpMethod:"POST",request:{$ref:"ExportMapRequest"},parameters:{project:{location:"path",required:!0}}}}},maps:{methods:{create:{id:"earthengine.projects.maps.create",path:"v1alpha/{+parent}/maps",httpMethod:"POST",request:{$ref:"EarthEngineMap"},parameters:{parent:{location:"path",required:!0}}}}, resources:{tiles:{methods:{get:{id:"earthengine.projects.maps.tiles.get",path:"v1alpha/{+parent}/tiles/{zoom}/{x}/{y}",httpMethod:"GET",parameters:{parent:{location:"path",required:!0},zoom:{location:"path",required:!0},x:{location:"path",required:!0},y:{location:"path",required:!0}}}}}}},operations:{methods:{cancel:{id:"earthengine.projects.operations.cancel",path:"v1alpha/{+name}:cancel",httpMethod:"POST",request:{$ref:"CancelOperationRequest"},parameters:{name:{location:"path",required:!0}}},"delete":{id:"earthengine.projects.operations.delete", path:"v1alpha/{+name}",httpMethod:"DELETE",parameters:{name:{location:"path",required:!0}}},get:{id:"earthengine.projects.operations.get",path:"v1alpha/{+name}",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}},list:{id:"earthengine.projects.operations.list",path:"v1alpha/{+name}/operations",httpMethod:"GET",parameters:{name:{location:"path",required:!0},filter:{location:"query",required:!1},pageSize:{location:"query",required:!1},pageToken:{location:"query",required:!1}}},wait:{id:"earthengine.projects.operations.wait", path:"v1alpha/{+name}:wait",httpMethod:"POST",request:{$ref:"WaitOperationRequest"},parameters:{name:{location:"path",required:!0}}}}},table:{methods:{computeFeatures:{id:"earthengine.projects.table.computeFeatures",path:"v1alpha/{+project}/table:computeFeatures",httpMethod:"POST",request:{$ref:"ComputeFeaturesRequest"},parameters:{project:{location:"path",required:!0}}},"export":{id:"earthengine.projects.table.export",path:"v1alpha/{+project}/table:export",httpMethod:"POST",request:{$ref:"ExportTableRequest"}, parameters:{project:{location:"path",required:!0}}},"import":{id:"earthengine.projects.table.import",path:"v1alpha/{+project}/table:import",httpMethod:"POST",request:{$ref:"ImportTableRequest"},parameters:{project:{location:"path",required:!0}}}}},thumbnails:{methods:{create:{id:"earthengine.projects.thumbnails.create",path:"v1alpha/{+parent}/thumbnails",httpMethod:"POST",request:{$ref:"Thumbnail"},parameters:{parent:{location:"path",required:!0}}},getPixels:{id:"earthengine.projects.thumbnails.getPixels", path:"v1alpha/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}},value:{methods:{compute:{id:"earthengine.projects.value.compute",path:"v1alpha/{+project}/value:compute",httpMethod:"POST",request:{$ref:"ComputeValueRequest"},parameters:{project:{location:"path",required:!0}}}}},video:{methods:{"export":{id:"earthengine.projects.video.export",path:"v1alpha/{+project}/video:export",httpMethod:"POST",request:{$ref:"ExportVideoRequest"},parameters:{project:{location:"path", required:!0}}}}},videoMap:{methods:{"export":{id:"earthengine.projects.videoMap.export",path:"v1alpha/{+project}/videoMap:export",httpMethod:"POST",request:{$ref:"ExportVideoMapRequest"},parameters:{project:{location:"path",required:!0}}}}},videoThumbnails:{methods:{create:{id:"earthengine.projects.videoThumbnails.create",path:"v1alpha/{+parent}/videoThumbnails",httpMethod:"POST",request:{$ref:"VideoThumbnail"},parameters:{parent:{location:"path",required:!0}}},getPixels:{id:"earthengine.projects.videoThumbnails.getPixels", path:"v1alpha/{+name}:getPixels",httpMethod:"GET",parameters:{name:{location:"path",required:!0}}}}}}}},methods:{}};var Md=function(){},Nd=function(a){return{constantValue:a}},Od=function(a){return{valueReference:a}},Pd=function(a,b){return{functionInvocationValue:{functionName:a,arguments:b}}},Qd=function(a,b){return{functionInvocationValue:{arguments:b,functionReference:a}}},Rd=function(a,b){return{functionDefinitionValue:{argumentNames:a,body:b}}},Sd=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";default:return a}},Td=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}},Ud=function(a){if(!a)return"VERTICAL";a=a.toUpperCase();if("HORIZONTAL"!==a||"VERTICAL"!==a)throw Error('Orientation must be "horizontal" or "vertical"');return a},Vd=function(a){if(!a)return[];if(t(a))return a.split(","); if(v(a))return a;throw Error("Invalid band list "+a);},Yd=function(a){var b={};if("palette"in a){var c=a.palette;b.paletteColors=t(c)?c.split(","):c}c=[];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 d=b.paletteColors?b.paletteColors.length-1:255;c=Wd(a,"bias","gain").map(function(e){var f=-e.bias/e.gain;return{min:f,max:d/e.gain+f}})}else if("min"in a||"max"in a)c=Wd(a,"min","max");0!==c.length&&(b.ranges=c);a=Xd(a.gamma); if(1e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.F[0];c=a.F[1];e=a.F[2];var f=a.F[3];var g=b+(f^c&(e^f))+d[0]+3614090360&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[1]+3905402710&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[2]+606105819&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e& (f^b))+d[3]+3250441966&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[4]+4118548399&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[5]+1200080426&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[6]+2821735955&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[7]+4249261313&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[8]+1770035416&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[9]+2336552879&4294967295;f=b+(g<<12&4294967295|g>>>20);g= e+(c^f&(b^c))+d[10]+4294925233&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[11]+2304563134&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(f^c&(e^f))+d[12]+1804603682&4294967295;b=c+(g<<7&4294967295|g>>>25);g=f+(e^b&(c^e))+d[13]+4254626195&4294967295;f=b+(g<<12&4294967295|g>>>20);g=e+(c^f&(b^c))+d[14]+2792965006&4294967295;e=f+(g<<17&4294967295|g>>>15);g=c+(b^e&(f^b))+d[15]+1236535329&4294967295;c=e+(g<<22&4294967295|g>>>10);g=b+(e^f&(c^e))+d[1]+4129170786&4294967295;b=c+(g<<5&4294967295| g>>>27);g=f+(c^e&(b^c))+d[6]+3225465664&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[11]+643717713&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[0]+3921069994&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[5]+3593408605&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[10]+38016083&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[15]+3634488961&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[4]+3889429448&4294967295;c=e+(g<<20&4294967295| g>>>12);g=b+(e^f&(c^e))+d[9]+568446438&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[14]+3275163606&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[3]+4107603335&4294967295;e=f+(g<<14&4294967295|g>>>18);g=c+(f^b&(e^f))+d[8]+1163531501&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(e^f&(c^e))+d[13]+2850285829&4294967295;b=c+(g<<5&4294967295|g>>>27);g=f+(c^e&(b^c))+d[2]+4243563512&4294967295;f=b+(g<<9&4294967295|g>>>23);g=e+(b^c&(f^b))+d[7]+1735328473&4294967295;e=f+(g<<14&4294967295| g>>>18);g=c+(f^b&(e^f))+d[12]+2368359562&4294967295;c=e+(g<<20&4294967295|g>>>12);g=b+(c^e^f)+d[5]+4294588738&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[8]+2272392833&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[11]+1839030562&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[14]+4259657740&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[1]+2763975236&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[4]+1272893353&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^ b^c)+d[7]+4139469664&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[10]+3200236656&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[13]+681279174&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[0]+3936430074&4294967295;f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[3]+3572445317&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[6]+76029189&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(c^e^f)+d[9]+3654602809&4294967295;b=c+(g<<4&4294967295|g>>>28);g=f+(b^c^e)+d[12]+3873151461&4294967295; f=b+(g<<11&4294967295|g>>>21);g=e+(f^b^c)+d[15]+530742520&4294967295;e=f+(g<<16&4294967295|g>>>16);g=c+(e^f^b)+d[2]+3299628645&4294967295;c=e+(g<<23&4294967295|g>>>9);g=b+(e^(c|~f))+d[0]+4096336452&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[7]+1126891415&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[14]+2878612391&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[5]+4237533241&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[12]+1700485571&4294967295;b=c+ (g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[3]+2399980690&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[10]+4293915773&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[1]+2240044497&4294967295;c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[8]+1873313359&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[15]+4264355552&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[6]+2734768916&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[13]+1309151649&4294967295; c=e+(g<<21&4294967295|g>>>11);g=b+(e^(c|~f))+d[4]+4149444226&4294967295;b=c+(g<<6&4294967295|g>>>26);g=f+(c^(b|~e))+d[11]+3174756917&4294967295;f=b+(g<<10&4294967295|g>>>22);g=e+(b^(f|~c))+d[2]+718787259&4294967295;e=f+(g<<15&4294967295|g>>>17);g=c+(f^(e|~b))+d[9]+3951481745&4294967295;a.F[0]=a.F[0]+b&4294967295;a.F[1]=a.F[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.F[2]=a.F[2]+e&4294967295;a.F[3]=a.F[3]+f&4294967295}; we.prototype.update=function(a,b){q(b)||(b=a.length);for(var c=b-this.ma,d=this.He,e=this.kb,f=0;fthis.kb?this.ma:2*this.ma)-this.kb);a[0]=128;for(var b=1;bb;++b)for(var d=0;32>d;d+=8)a[c++]=this.F[b]>>>d&255;return a};var ze=function(a){return(new ye(void 0)).D(a)},ye=function(a){this.ic=a};ye.prototype.D=function(a){var b=[];Ae(this,a,b);return b.join("")}; var Ae=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(v(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f');c[e]=d});b.tensorDepths=c}else throw Error('"tensorDepths" option needs to have the form Object.');return b},$e=function(a,b){var c={gcsDestination:null,driveDestination:null,geoTiffOptions:null,tfRecordOptions:null,fileFormat:Sd(a.fileFormat)};"GEO_TIFF"===c.fileFormat?c.geoTiffOptions={cloudOptimized:!!a.tiffCloudOptimized, skipEmptyFiles:!!a.tiffSkipEmptyFiles,tileDimensions:mf(a.tiffFileDimensions)}:"TF_RECORD_IMAGE"===c.fileFormat&&(c.tfRecordOptions=nf(a));"GOOGLE_CLOUD_STORAGE"===b?c.gcsDestination=cf(a):c.driveDestination=df(a);return c},gf=function(a,b){var c={gcsDestination:null,driveDestination:null,fileFormat:"MP4"};"GOOGLE_CLOUD_STORAGE"===b?c.gcsDestination=cf(a):c.driveDestination=df(a);return c},ff=function(a){return{framesPerSecond:bf(a.framesPerSecond),maxFrames:bf(a.maxFrames),maxPixelsPerFrame:Ye(a.maxPixels)}}, jf=function(a){return{maxZoom:bf(a.maxZoom),scale:bf(a.scale),minZoom:bf(a.minZoom),skipEmptyTiles:!!a.skipEmptyTiles,mapsApiKey:Ye(a.mapsApiKey),tileDimensions:mf(a.tileDimensions)}},mf=function(a){if(null==a)return null;var b={height:0,width:0};t(a)&&(a=a.split("x").map(Number));if(v(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(w(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);return b},cf=function(a){return{bucket:Ye(a.outputBucket),filenamePrefix:Ye(a.outputPrefix),bucketCorsUris:null,permissions:null}},df=function(a){return{folder:Ye(a.driveFolder),filenamePrefix:Ye(a.driveFileNamePrefix)}};Object.freeze&&Object.freeze([]);var of=function(a,b){this.Ye=100;this.Ne=a;this.kf=b;this.bc=0;this.M=null};of.prototype.get=function(){if(0");c=c.join("")}c=a.createElement(c);d&&(t(d)?c.className=d:v(d)?c.className=d.join(" "):Yf(c,d));2=b.Dc&&b.cancel())}this.de?this.de.call(this.Hd,this):this.ld=!0;this.Ya||ig(this,new jg(this))}};hg.prototype.Dd=function(a,b){this.Cc=!1;kg(this,a,b)}; var kg=function(a,b,c){a.Ya=!0;a.T=c;a.ub=!b;lg(a)},ng=function(a){if(a.Ya){if(!a.ld)throw new mg(a);a.ld=!1}};hg.prototype.callback=function(a){ng(this);og(a);kg(this,!0,a)};var ig=function(a,b){ng(a);og(b);kg(a,!1,b)},og=function(a){C(!(a instanceof hg),"An execution sequence may not be initiated with a blocking Deferred.")},pg=function(a,b,c){C(!a.xd,"Blocking Deferreds can not be re-used");a.kc.push([b,c,void 0]);a.Ya&&lg(a)}; hg.prototype.then=function(a,b,c){var d,e,f=new Ef(function(g,h){d=g;e=h});pg(this,d,function(g){g instanceof jg?f.cancel():e(g)});return f.then(a,b,c)};hg.prototype.$goog_Thenable=!0; var qg=function(a){return Xa(a.kc,function(b){return x(b[1])})},lg=function(a){if(a.rc&&a.Ya&&qg(a)){var b=a.rc,c=rg[b];c&&(p.clearTimeout(c.K),delete rg[b]);a.rc=0}a.u&&(a.u.Dc--,delete a.u);b=a.T;for(var d=c=!1;a.kc.length&&!a.Cc;){var e=a.kc.shift(),f=e[0],g=e[1];e=e[2];if(f=a.ub?g:f)try{var h=f.call(e||a.Hd,b);q(h)&&(a.ub=a.ub&&(h==b||h instanceof Error),a.T=b=h);if(Bf(b)||"function"===typeof p.Promise&&b instanceof p.Promise)d=!0,a.Cc=!0}catch(k){b=k,a.ub=!0,qg(a)||(c=!0)}}a.T=b;d&&(h=y(a.Dd, a,!0),d=y(a.Dd,a,!1),b instanceof hg?(pg(b,h,d),b.xd=!0):b.then(h,d));c&&(b=new sg(b),rg[b.K]=b,a.rc=b.K)},mg=function(){Ja.call(this)};A(mg,Ja);mg.prototype.message="Deferred has already fired";mg.prototype.name="AlreadyCalledError";var jg=function(){Ja.call(this)};A(jg,Ja);jg.prototype.message="Deferred was canceled";jg.prototype.name="CanceledError";var sg=function(a){this.K=p.setTimeout(y(this.sf,this),0);this.Rb=a}; sg.prototype.sf=function(){C(rg[this.K],"Cannot throw an error that is not scheduled.");delete rg[this.K];throw this.Rb;};var rg={};var wg=function(a){var b={},c=b.document||document,d=Yb(a).toString(),e=document.createElement("SCRIPT"),f={qe:e,Hb:void 0},g=new hg(f),h=null,k=null!=b.timeout?b.timeout:5E3;0=Fg(this).value)for(x(b)&&(b=b()),a=new xg(a,String(b),this.ce),c&&(a.Kd=c),c=this;c;){var d=c,e=a;if(d.Ud)for(var f=0;b=d.Ud[f];f++)b(e);c=c.getParent()}};zg.prototype.info=function(a,b){this.log(Cg,a,b)}; var Gg={},Hg=null,Ig=function(a){Hg||(Hg=new zg(""),Gg[""]=Hg,Hg.se(Dg));var b;if(!(b=Gg[a])){b=new zg(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=Ig(a.substr(0,c));c.Rd()[d]=b;b.u=c;Gg[a]=b}return b};var Jg=function(a,b){a&&a.log(Eg,b,void 0)};var Kg=function(a){switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:return!0;default:return!1}};var Lg=function(){};Lg.prototype.Bd=null;Lg.prototype.tb=function(){var a;(a=this.Bd)||(a={},Mg(this)&&(a[0]=!0,a[1]=!0),a=this.Bd=a);return a};var Ng=function(a,b){this.wf=a;this.gf=b};A(Ng,Lg);Ng.prototype.Gc=function(){return this.wf()};Ng.prototype.tb=function(){return this.gf()};var Og=function(){return Og.Ld.Gc()};Og.ze=!1;Og.tb=function(){return Og.Ld.tb()};Og.Ef=function(a,b){Og.re(new Ng(C(a),C(b)))};Og.re=function(a){Og.Ld=a};var Pg=function(){};A(Pg,Lg);Pg.prototype.Gc=function(){var a=Mg(this);return a?new ActiveXObject(a):new XMLHttpRequest}; var Mg=function(a){if(Og.ze)return"";if(!a.Vd&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;cb)throw Error("Bad port number "+b);a.cb=b}else a.cb=null}; fh.prototype.getPath=function(){return this.ra};fh.prototype.setPath=function(a,b){hh(this);this.ra=b?kh(a,!0):a;return this};var jh=function(a,b,c){hh(a);b instanceof lh?(a.X=b,a.X.kd(a.V)):(c||(b=mh(b,rh)),a.X=new lh(b,a.V))};fh.prototype.getQuery=function(){return this.X.toString()};fh.prototype.removeParameter=function(a){hh(this);this.X.remove(a);return this};var hh=function(a){if(a.We)throw Error("Tried to modify a read-only Uri");};fh.prototype.kd=function(a){this.V=a;this.X&&this.X.kd(a)}; var sh=function(a){return a instanceof fh?a.clone():new fh(a,void 0)},kh=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},mh=function(a,b,c){return t(a)?(a=encodeURI(a).replace(b,th),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},th=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},nh=/[#\/\?@]/g,ph=/[#\?:]/g,oh=/[#\?]/g,rh=/[#\?@]/g,qh=/#/g,lh=function(a,b){this.m=this.s=null;this.R=a||null;this.V=!!b},uh=function(a){a.s|| (a.s=new ud,a.m=0,a.R&&Rg(a.R,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};l=lh.prototype;l.o=function(){uh(this);return this.m};l.add=function(a,b){uh(this);this.R=null;a=vh(this,a);var c=this.s.get(a);c||this.s.set(a,c=[]);c.push(b);this.m=Oa(this.m)+1;return this};l.remove=function(a){uh(this);a=vh(this,a);return this.s.wa(a)?(this.R=null,this.m=Oa(this.m)-this.s.get(a).length,this.s.remove(a)):!1};l.clear=function(){this.s=this.R=null;this.m=0}; l.isEmpty=function(){uh(this);return 0==this.m};l.wa=function(a){uh(this);a=vh(this,a);return this.s.wa(a)};l.mb=function(a){var b=this.w();return bb(b,a)};l.forEach=function(a,b){uh(this);this.s.forEach(function(c,d){Ua(c,function(e){a.call(b,e,d,this)},this)},this)};l.ba=function(){uh(this);for(var a=this.s.w(),b=this.s.ba(),c=[],d=0;d');G=a};z("ee.data.setCloudApiEnabled",Nh);Ih.push("setCloudApiEnabled");var Oh=function(){return G}; z("ee.data.getCloudApiEnabled",Oh);Ih.push("getCloudApiEnabled");var Ph=function(a,b,c,d,e,f,g){var h=["https://www.googleapis.com/auth/earthengine"];e&&(hb(h,e),jb(h));xh=a;yh=h;var k={token_type:b,access_token:c,state:h.join(" "),expires_in:d};Fh(void 0,void 0,k);!1===g?f&&f():Ah(function(){p.gapi.auth.setToken(k);f&&f()})};z("ee.data.setAuthToken",Ph); var Bh=function(a,b,c){Gh&&xh&&Gh({client_id:String(xh),immediate:!0,scope:yh.join(" ")},function(d){if("immediate_failed"==d.error&&c)c();else if(G)try{Ah(function(){try{p.gapi.auth.setToken(d),Fh(a,b,d)}catch(e){b(e.toString())}})}catch(e){b(e.toString())}else Fh(a,b,d)})},Qh=function(a){Gh=a};z("ee.data.setAuthTokenRefresher",Qh);var Th=function(){Rh&&0<=Ga()-Rh&&Sh();return zh};z("ee.data.getAuthToken",Th);var Sh=function(){Rh=zh=null};z("ee.data.clearAuthToken",Sh);var Uh=function(){return xh}; z("ee.data.getAuthClientId",Uh);var Vh=function(){return yh};z("ee.data.getAuthScopes",Vh); var bi=function(a,b,c){null!=a?Wh=a:Xh||(Wh="https://earthengine.googleapis.com/api");null!=b?Yh=b:Xh||(Yh="https://earthengine.googleapis.com");q(c)&&(Zh=c);!G||$h&&null==a||($h=new Promise(function(d,e){gapi.load("client",{callback:function(){var f=Object.assign({},Ld,{rootUrl:Wh.replace(/\/api$/,"")});gapi.client.init({apiKey:Jh,discoveryDocs:[f]}).then(function(){ai=!0;gapi.config.update("client/headers/request",["X-Earth-Engine-Computation-Profiling"]);gapi.config.update("client/headers/response", ["X-Earth-Engine-Computation-Profile"]);d()})},onerror:e})}),wh=wh||"earthengine-legacy");Xh=!0},H=function(a,b,c,d){bi();if(null==Th()&&c&&Gh&&xh)return Bh(function(){H(a,b,c,d)}),null;var e=ci?function(){var m=a();di(m)["X-Earth-Engine-Computation-Profiling"]="1";return m}:a,f=ci;if(c){var g=function(m){return ei(m.status,function(r){if(null!=m&&null!=m.headers)return m.headers[r.toLowerCase()]},m.body,f,c,b||Pb)};$h.then(function(){fi(e,d)(g,g)});return null}if(!ai)throw Error("Cloud API not ready"); for(var h=0,k;;){k=gi(function(){e().then(function(){return null},function(){return null})});if(429!=k.status||5e&&(e+=h);return[c,g,e,f].join("/")+d}}},ui=function(a,b){a=Kb(a);return I("/value",J(a),b)};z("ee.data.getValue",ui); var vi=function(a,b){if(G){var c=Mh(),d=li(Oe(a));return H(function(){return gapi.client.earthengine.projects.value.compute({project:c},{expression:d})},function(e){return e.result},b)}a={json:Je(a)};return I("/value",J(a),b)},wi=function(a,b){if(G){if(t(a.image))throw Error("Image as JSON string not supported.");if(q(a.version))throw Error("Image version specification not supported.");if(q(a.region))throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');var c= {name:null,expression:li(Oe(a.image)),fileFormat:Sd(a.format),bandIds:Vd(a.bands),visualizationOptions:Yd(a),grid:null},d=Mh(),e=["name"];return H(function(){return gapi.client.earthengine.projects.thumbnails.create({parent:d,Sb:e},c)},function(g){return{thumbid:g.name,token:""}},b)}a=Kb(a);v(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));var f=a.image||a.imageCollection;t(f)||(f=f.D());a.image=f;delete a.imageCollection;a=J(a).add("getid","1");return I("/thumb",a,b)}; z("ee.data.getThumbId",wi); var xi=function(a,b){if(!G)throw Error("getVideoThumbId is only supported in Cloud API mode.");var c={framesPerSecond:a.framesPerSecond||null,maxFrames:a.maxFrames||null,maxPixelsPerFrame:a.maxPixelsPerFrame||null},d={name:null,expression:li(Oe(a.imageCollection)),fileFormat:Sd(a.format),videoOptions:c,grid:null},e=Mh(),f=["name"];return H(function(){return gapi.client.earthengine.projects.videoThumbnails.create({parent:e,Sb:f},d)},function(g){return{thumbid:g.name,token:""}},b)}; z("ee.data.getVideoThumbId",xi);Ih.push("getVideoThumbId");var yi=function(a,b){if(!G)throw Error("getFilmstripThumbId is only supported in Cloud API mode.");var c={name:null,expression:li(Oe(a.imageCollection)),fileFormat:Sd(a.format),orientation:Ud(a.orientation),grid:null},d=Mh(),e=["name"];return H(function(){return gapi.client.earthengine.projects.filmstripThumbnails.create({parent:d,Sb:e},c)},function(f){return{thumbid:f.name,token:""}},b)};z("ee.data.getFilmstripThumbId",yi);Ih.push("getFilmstripThumbId"); var zi=function(a){return G?Yh+"/v1alpha/"+a.thumbid+":getPixels"+(Jh?"?key="+Jh:""):Yh+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};z("ee.data.makeThumbUrl",zi);var Ai=function(a,b){a=Kb(a);return I("/download",J(a),b)};z("ee.data.getDownloadId",Ai);var Bi=function(a){return Yh+"/api/download?docid="+a.docid+"&token="+a.token};z("ee.data.makeDownloadUrl",Bi);var Ci=function(a,b){a=Kb(a);return I("/table",J(a),b)};z("ee.data.getTableDownloadId",Ci); var Di=function(a){return Yh+"/api/table?docid="+a.docid+"&token="+a.token};z("ee.data.makeTableDownloadUrl",Di);var Ei=function(a,b,c){var d=ci;try{return ci=a,b.call(c)}finally{ci=d}};z("ee.data.withProfiling",Ei); var Fi=function(a,b){if(G){var c=function(e){return Math.floor(Math.random()*Math.pow(2,4*e)).toString(16).padStart(e,"0")};a=kb(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}var d={};u(a)&&(d.count=a);return I("/newtaskid",J(d),b)};z("ee.data.newTaskId",Fi); var Ii=function(a,b){if(G){var c=function(e){return gapi.client.earthengine.projects.operations.get({name:ne(e)})};return H(function(){return Gi(a,c)},function(e){return 1===a.length?oe(e):a.map(function(f){return oe(e[f])})},b)}var d="/taskstatus?q="+Hi(a).join();return I(d,null,b,"GET")};z("ee.data.getTaskStatus",Ii);var Hi=function(a){if(t(a))return[a];if(v(a))return a;throw Error("Invalid value: expected a string or an array of strings.");},Ki=function(a){return Ji(void 0,a)}; z("ee.data.getTaskList",Ki); var Ji=function(a,b){function c(h){var k={pagesize:500};a&&(k.pagesize=Math.min(k.pagesize,a-e.tasks.length));h&&(k.pagetoken=h);return k}function d(h,k){k=c(k);I("/tasklist",J(k),function(m,r){r?h(e,r):(hb(e.tasks,m.tasks),!m.next_page_token||a&&e.tasks.length>=a?h(e):d(h,m.next_page_token))},"GET")}if(G)return b?(Li(a,function(h,k){return b(h?{tasks:h.map(oe)}:null,k)}),null):{tasks:Li(a).map(oe)};var e={tasks:[]};if(b)return d(b),null;for(var f="";;){f=c(f);var g=I("/tasklist",J(f),void 0,"GET"); hb(e.tasks,g.tasks);f=g.next_page_token;if(!g.next_page_token||a&&e.tasks.length>=a)break}return e};z("ee.data.getTaskListWithLimit",Ji); var Li=function(a,b){var c=[],d={name:Mh(),pageSize:500,filter:null,pageToken:null},e=function(){return gapi.client.earthengine.projects.operations.list(d)},f=b?function(){return 0}:void 0,g=function(h){hb(c,h.operations||[]);!h.nextPageToken||a&&c.length>=a?b&&b(a?c.slice(0,a):c):(d.pageToken=h.nextPageToken,H(e,g,f));return null};H(e,g,f);return b?null:a?c.slice(0,a):c};Ih.push("listOperations"); var Mi=function(a,b){var c=function(d){return gapi.client.earthengine.projects.operations.cancel({name:d})};H(function(){return Gi(a,c)},null,b)};z("ee.data.cancelOperation",Mi);Ih.push("cancelOperation");var Ni=function(a,b){var c=function(d){return gapi.client.earthengine.projects.operations.get({name:ne(d)})};return H(function(){return Gi(a,c)},null,b)};z("ee.data.getOperation",Ni);Ih.push("getOperation"); var Gi=function(a,b){a=Hi(a);if(1===a.length)return b(a[0]);var c=gapi.client.newBatch();a.forEach(function(d){c.add(b(d),{id:d})});return c},Pi=function(a,b){return Oi(a,"CANCEL",b)};z("ee.data.cancelTask",Pi);var Oi=function(a,b,c){if(!Fb(Qi,b))throw Error("Invalid action: "+b);a=Hi(a);return G?(a=a.map(ne),Mi(a,c),null):I("/updatetask",J({id:a,action:b}),c,"POST")};z("ee.data.updateTask",Oi); var Si=function(a,b,c){if(G){b.id=a;var d=b.type,e={project:Mh()};a=null!=b.sourceUrl?{__source_url__:b.sourceUrl}:{};switch(d){case "EXPORT_IMAGE":b=Ri(b);var f=af(b);f.expression=li(f.expression,a);b=function(){return gapi.client.earthengine.projects.image["export"](e,f)};break;case "EXPORT_FEATURES":var g=ef(b);g.expression=li(g.expression,a);b=function(){return gapi.client.earthengine.projects.table["export"](e,g)};break;case "EXPORT_VIDEO":var h=hf(b);h.expression=li(h.expression,a);b=function(){return gapi.client.earthengine.projects.video["export"](e, h)};break;case "EXPORT_TILES":var k=kf(b);k.expression=li(k.expression,a);b=function(){return gapi.client.earthengine.projects.map["export"](e,k)};break;case "EXPORT_VIDEO_MAP":var m=lf(b);m.expression=li(m.expression,a);b=function(){return gapi.client.earthengine.projects.videoMap["export"](e,m)};break;default:throw Error("Unable to start processing for task of type "+d);}return H(b,function(r){return pe(r)},c)}b=Kb(b);null!=b.element&&(b.json=b.element.D(),delete b.element);b.id=a;return I("/processingrequest", J(b),c)};z("ee.data.startProcessing",Si);var Ui=function(a,b,c){if(G){b=te(b);var d=function(e){return e?pe(e):null};return d(Ti(a,b,c&&function(e,f){return c(d(e),f)}))}a={id:a,request:ze(b)};return I("/ingestionrequest",J(a),c)};z("ee.data.startIngestion",Ui); var Ti=function(a,b,c){var d={project:Mh()},e={imageManifest:b,requestId:a,overwrite:null,description:null};return H(function(){return gapi.client.earthengine.projects.image["import"](d,e)},null,c,a?void 0:0)},Vi=function(a,b,c){var d={project:Mh()},e={tableManifest:b,requestId:a,overwrite:null,description:null};return H(function(){return gapi.client.earthengine.projects.table["import"](d,e)},null,c,a?void 0:0)},Wi=function(a,b,c){if(G){b=ue(b);var d=function(e){return e?pe(e):null};return d(Vi(a, b,c&&function(e,f){return c(d(e),f)}))}a={id:a,tableRequest:ze(b)};return I("/ingestionrequest",J(a),c)};z("ee.data.startTableIngestion",Wi);var Xi=function(a,b){if(G){var c={name:E(a),prettyPrint:!1};return H(function(){return gapi.client.earthengine.projects.assets.get(c)},ce,b)}return I("/info",(new lh).add("id",a),b)};z("ee.data.getAsset",Xi);Ih.push("getAsset");z("ee.data.getInfo",Xi); var Yi=function(a,b){if(G){if(Object.keys(a).every(function(e){return"id"===e||"num"===e})){var c=be(a);return H(function(){return gapi.client.earthengine.projects.assets.listAssets(c)},de,b)}var d=ke(a);return H(function(){return gapi.client.earthengine.projects.assets.listImages({Sb:"assets(type,path)"},d)},ge,b)}a=J(a);return I("/list",a,b)};z("ee.data.getList",Yi);var Zi=function(a,b){return H(function(){return gapi.client.earthengine.projects.listAssets(a)},null,b)};z("ee.data.listAssets",Zi); Ih.push("listAssets");var $i=function(a,b){return H(function(){return gapi.client.earthengine.projects.assets.listImages(a)},null,b)};z("ee.data.listImages",$i);Ih.push("listImages");var aj=function(a){var b={parent:Mh(),pageSize:null,pageToken:null};return H(function(){return gapi.client.earthengine.projects.listAssets(b)},null,a)};z("ee.data.listBuckets",aj);Ih.push("listBuckets"); var bj=function(a){if(G){var b={parent:Mh(),pageSize:null,pageToken:null};return H(function(){return gapi.client.earthengine.projects.listAssets(b)},de,a)}return I("/buckets",null,a,"GET")};z("ee.data.getAssetRoots",bj);var cj=function(a,b){if(G){var c={parent:$d(a),type:"Folder",name:E(a)};H(function(){return gapi.client.earthengine.projects.assets.create(c)},null,b)}else a=J({id:a}),I("/createbucket",a,b)};z("ee.data.createAssetHome",cj); var dj=function(a,b,c,d,e){if(G){if(c)throw Error("Asset overwrite not supported.");if(t(a))throw Error("Asset cannot be specified as string.");b=a.name||b&&E(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/.");var f=Object.assign({},a);delete f.name;d&&!f.properties&&(f.properties=d);f.type=ae(f.type);var g={parent:b.slice(0,c),assetId:b.slice(c+8)};return H(function(){return gapi.client.earthengine.projects.assets.create(g, f)},null,e)}t(a)||(a=ze(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;void 0!=d&&(a.properties=ze(d));return I("/create",J(a),e)};z("ee.data.createAsset",dj);var ej=function(a,b,c){if(G){var d={parent:$d(a),type:"Folder",name:E(a)};return H(function(){return gapi.client.earthengine.projects.assets.create(d)},null,c)}return I("/createfolder",J({id:a,force:b||!1}),c)};z("ee.data.createFolder",ej); var fj=function(a,b,c){if(G){var d={sourceName:E(a),destinationName:E(b),sourcePath:null,destinationPath:null};H(function(){return gapi.client.earthengine.projects.assets.move(d)},null,c)}else I("/rename",J({sourceId:a,destinationId:b}),c)};z("ee.data.renameAsset",fj); var gj=function(a,b,c,d){if(G){var e={sourceName:E(a),destinationName:E(b),overwrite:null!=c?c:null,bandIds:null};H(function(){return gapi.client.earthengine.projects.assets.copy(e)},null,d)}else a={sourceId:a,destinationId:b},c&&(a.allowOverwrite=c),I("/copy",J(a),d)};z("ee.data.copyAsset",gj);var hj=function(a,b){if(G){var c={name:E(a)};H(function(){return gapi.client.earthengine.projects.assets["delete"](c)},null,b)}else I("/delete",J({id:a}),b)};z("ee.data.deleteAsset",hj); var ij=function(a,b){if(G){var c={resource:E(a),prettyPrint:!1};return H(function(){return gapi.client.earthengine.projects.assets.getIamPolicy(c)},le,b)}return I("/getacl",J({id:a}),b,"GET")};z("ee.data.getAssetAcl",ij);var jj=function(a,b,c,d){var e={name:E(a),asset:b,updateMask:{paths:c||[]}};H(function(){return gapi.client.earthengine.projects.assets.patch(e)},null,d)};z("ee.data.updateAsset",jj); var kj=function(a,b,c){if(G){var d={resource:E(a),policy:me(b),prettyPrint:!1};H(function(){return gapi.client.earthengine.projects.assets.setIamPolicy(d)},null,c)}else b={readers:b.readers,writers:b.writers,all_users_can_read:b.all_users_can_read},a={id:a,value:ze(b)},I("/setacl",J(a),c)};z("ee.data.setAssetAcl",kj); var lj=function(a,b,c){if(G){b=ie(b);var d=Object.keys(b).filter(function(e){return"properties"!==e}).map(function(e){return e.replace(/([A-Z])/g,function(f,g){return"_"+g.toLowerCase()})}).concat(Object.keys(b.properties||{}).map(function(e){return"properties."+e}));jj(a,b,d,c)}else a={id:a,properties:ze(b)},I("/setproperties",J(a),c)};z("ee.data.setAssetProperties",lj); var mj=function(a,b){if(G){var c={name:E(a),prettyPrint:!1};return H(function(){return gapi.client.earthengine.projects.assets.get(c)},function(d){if(!d.quota)throw Error(a+" is not a root folder.");var e=function(f){return Number(d.quota[f]||0)};return{asset_count:{usage:e("assetCount"),limit:e("maxAssetCount")},asset_size:{usage:e("sizeBytes"),limit:e("maxSizeBytes")}}},b)}return I("/quota",J({id:a}),b,"GET")};z("ee.data.getAssetRootQuota",mj); var Qi={xf:"CANCEL",Af:"UPDATE"},I=function(a,b,c,d){bi();var e=ci,f={"Content-Type":"application/x-www-form-urlencoded"},g=Th();if(null!=g)f.Authorization=g;else if(c&&Gh&&xh)return Bh(function(){Ei(e,function(){I(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new lh;e&&b.add("profiling","1");null!=Jh&&b.add("key",Jh);b=ji(b,a);null!=Zh&&(f["X-XSRF-Token"]=Zh);var h=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(h)||(a+=-1!=a.indexOf("?")?"&":"?",a+=h,h=null);var k=Wh+a;if(c)return nj.push(oj(k,c,g, h,f)),pj.Xa(),null;for(var m=function(K,pa){this.setRequestHeader&&this.setRequestHeader(pa,K)},r,Q=0;;){r=Og();r.open(g,k,!1);zb(f,m,r);r.send(h);if(429!=r.status||5f)return f++,setTimeout(function(){nj.push(g);pj.Xa()},Math.min(12E4,1E3*Math.pow(2, f))),null;var m=ei,r=k.getStatus(),Q=y(k.getResponseHeader,k);try{var K=k.a?k.a.responseText:""}catch(pa){Jg(k.N,"Can not get responseText: "+pa.message),K=""}return m(r,Q,K,h,b)};return g},rj=function(){return new Promise(function(a){qj.push(a)})},fi=function(a,b){var c=u(b)?b:10,d=0,e=function(f,g){return function(h){429===h.status&&d++a||300<=a)m="Server returned HTTP code: "+a;if(e)return e(k,m),null;if(!m)return k;throw Error(m);},Ah=function(a){var b=function(){p.gapi.config.update("client/cors",!0);Gh||(Gh=p.gapi.auth.authorize);a()};if(w(p.gapi)&&w(p.gapi.auth)&&x(p.gapi.auth.authorize))b();else{for(var c=Ga().toString(36);c in p;)c+="_";p[c]=function(){delete p[c];b()};wg(cc({onload:c}))}},Fh=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, setTimeout(Bh,.9*c),Rh=Ga()+c;zh=b;a&&a()}else b&&b(c.error||"Unknown error.")},J=function(a){var b=new lh;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},nj=[],qj=[],pj=new Tf(function(){var a=nj.shift();if(a){var b=a.url,c=a.callback,d=a.method,e=a.content;a=a.headers;var f=hi,g=new F;Wg.push(g);c&&g.ha("complete",c);g.Ab("ready",g.Le);f&&(g.ib=Math.max(0,f));g.send(b,d,e,a)}0==nj.length||pj.Xa()},350),sj=new Tf(function(){var a= qj.shift();x(a)&&a();0==qj.length||sj.Xa()},350),Wh=null,Yh=null,Zh=null,ji=Pb,li=Pb,zh=null,Rh=null,xh=null,yh=[],Gh=null,Zb=new Sb(Qb,"https://apis.google.com/js/client.js?onload=%{onload}"),Jh=null,G=!1,$h=null,ai=!1,Xh=!1,hi=0,ci=null;var L=function(a,b,c){if(!(this instanceof L))return tj(L,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.A=c||null};A(L,Md);z("ee.ComputedObject",L);L.prototype.evaluate=function(a){if(!a||!x(a))throw Error("evaluate() requires a callback function.");vi(this,a)};L.prototype.evaluate=L.prototype.evaluate; L.prototype.C=function(a){return vi(this,a)};L.prototype.getInfo=L.prototype.C;L.prototype.encode=function(a){if(null===this.i&&null===this.args)return{type:"ArgumentRef",value:this.A};var b={},c;for(c in this.args)q(this.args[c])&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.i);b[t(a)?"functionName":"function"]=a;return b}; L.prototype.P=function(a){if(null===this.i&&null===this.args)return{argumentReference:this.A||"uninitializedVar"};var b={},c;for(c in this.args)q(this.args[c])&&(b[c]=Od(a(this.args[c])));return t(this.i)?Pd(String(this.i),b):this.i.Jc(a,b)};L.prototype.D=function(){return Je(this)};L.prototype.serialize=L.prototype.D;L.prototype.toString=function(){return"ee."+this.name()+"("+Le(this)+")"};z("ee.ComputedObject.prototype.toString",L.prototype.toString);L.prototype.name=function(){return"ComputedObject"}; L.prototype.td=function(a,b){var c=gb(arguments);c[0]=this;a.apply(p,c);return this};L.prototype.aside=L.prototype.td;var uj=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.A=b.A;return a},tj=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var vj={},wj=function(a){return a.prototype instanceof L?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},xj=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}},yj=function(a){return u(a)|| a instanceof L&&"Number"==a.name()},zj=function(a){return t(a)||a instanceof L&&"String"==a.name()},Aj=function(a){return w(a)&&!x(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1},Bj=function(a,b,c){c=void 0===c?!1:c;return 1===a.length&&Aj(a[0])&&(a=b.args,c&&(a=a.slice(1)),a.length)?!(1===a.length||a[1].optional)||"Dictionary"!==a[0].type:!1};var M=function(){if(!(this instanceof M))return new M};A(M,Md);z("ee.Function",M);var Cj=Pb;M.prototype.call=function(a){return this.apply(Dj(this,Array.prototype.slice.call(arguments,0)))};M.prototype.call=M.prototype.call;M.prototype.apply=function(a){a=new L(this,Ej(this,a));return Cj(a,this.G().returns)};M.prototype.apply=M.prototype.apply; var Fj=function(a,b,c){var d=q(b),e=a.G();if(Bj(c,e,d)){if(c=Kb(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=Dj(a,d?[b].concat(c):c);return a.apply(c)},Ej=function(a,b){for(var c=a.G().args,d={},e={},f=0;f/,"");for(var h=0;h/,"");return new N(g,f)}),a&&a())};a?qi(c):c(qi())}},Oj=function(a,b,c,d){Kj();var e=d||"";zb(Ij,function(f,g){var h=g.split(".");if(2==h.length&&h[0]==b){h=e+h[1];var k=f.G();Jj[g]=!0;var m=!1;k.args.length&&(g=k.args[0].type,m="Object"!=g&&xj(g,c)); g=m?a.prototype:a;h in g&&!g[h].signature||(g[h]=function(r){return Fj(f,m?this:void 0,Array.prototype.slice.call(arguments,0))},g[h].toString=y(f.toString,f,h,m),g[h].signature=k)}})},Pj=function(a){var b=function(c){for(var d in c)x(c[d])&&c[d].signature&&delete c[d]};b(a);b(a.prototype||{})};var P=function(a,b){var c=Qj(a),d=Wa(c,function(k){return k.replace(/^opt_/,"")});a=(a=p.EXPORTED_FN_INFO?p.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},f=b[0],g=w(f)&&!x(f)&&!v(f)&&!(f instanceof L);if(1d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(f=0;f=arguments.length){var c=arguments[0];if(b=Aj(c))a:{b=Eb(c);var d=["properties"];if(ya(b)&&ya(d)&&b.length==d.length){for(var e=b.length,f=0;fc||4/,"");c[e]=!0}var f=p.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=Vl(g),Pl.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Jj[g]=!0):f[g].signature={});vj=f;Wl()}catch(h){Nl(h);return}Jl="ready";for(Kl=[];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.Aa++].join("-"),this.pd.Td()].join("-");b=this.Gd(d,b,c,a);b.tileSize=this.tileSize;im(b.O,this.opacity);this.Ba.set(a,b);lm(this,b);this.pd.ae(b,(new Date).getTime()/1E3);return b.O};l.releaseTile=function(a){var b=this.Ba.get(a.id);this.Ba.remove(a.id);b&&(b.abort(),Ha(b))}; var lm=function(a,b){a.pa.ha(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var c=b.$e,d=(new Date).getTime();am(this.lc,b.zoom).tileLatencies.push(d-c);this.dispatchEvent(new mm(this.Qc()));break;case "throttled":am(this.lc,b.zoom).throttleCount++;this.dispatchEvent(new nm(b.ca));break;case "failed":am(this.lc,b.zoom).errorCount++,this.dispatchEvent(new om(b.ca,b.Oe))}})}; jm.prototype.j=function(){jm.h.j.call(this);this.Ba.forEach(Ha);this.Ba.clear();this.Ba=null;Ha(this.pa);this.pd=this.pa=null};var km=function(a,b){return Za(a.Ba.w(),function(c){return c.getStatus()==b})},mm=function(){Ia.call(this,"tile-load")};A(mm,Ia);var nm=function(){Ia.call(this,"tile-throttle")};A(nm,Ia);var om=function(a,b){Ia.call(this,"tile-fail");this.errorMessage=b};A(om,Ia); var pm=function(a,b,c,d){D.call(this);this.Ua=a;this.zoom=b;this.O=c.createElement("div");this.O.id=d;this.bf=5;this.hc=function(){};this.md="new";this.ne=0;this.Yc=!1};A(pm,D); var rm=function(a){if(!a.Yc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");qm(a,"loading");a.$e=(new Date).getTime();a.la=new F;a.la.gb="blob";a.la.ha("complete",function(){var b=dh(this.la),c=this.la.getStatus();429==c&&qm(this,"throttled");if(Kg(c)){var d={};zb(eh(this.la),function(f,g){d[g.toLowerCase()]=f});this.qf=d;this.ue=b;this.qb()}else if(b){var e=new hm;e.ha("loadend",function(){this.Fb(e.I.result)},void 0,this);e.readAsText(b)}else this.Fb("Failed to load tile.")}, !1,a);a.la.Ab("ready",Ea(Ha,a.la));a.ca&&a.ca.endsWith("&profiling=1")&&G&&(a.ca=a.ca.replace("&profiling=1",""),a.la.headers.set("X-Earth-Engine-Computation-Profiling","1"));a.la.send(a.ca,"GET")};l=pm.prototype;l.qb=function(){this.hc(this);qm(this,"loaded")};l.lb=function(){Ha(this.la)}; l.Fb=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.ne>=this.bf?(this.Oe=b(a),qm(this,"failed")):(this.lb(),setTimeout(y(function(){this.fa||(this.Yc=!0,rm(this),this.Yc=!1)},this),1E3*Math.pow(2,this.ne++)))};l.abort=function(){this.lb();qm(this,"aborted")};l.getStatus=function(){return this.md};var qm=function(a,b){a.md=b;a.dispatchEvent("status-changed")},sm={aborted:!0,failed:!0,loaded:!0}; pm.prototype.j=function(){pm.h.j.call(this);this.lb();this.O.remove();this.hc=null};var tm=function(){B.call(this)};A(tm,B);var um=function(a,b){jm.call(this,a,b);this.Ad=new ud;this.Jd=new ud};A(um,jm);z("ee.layers.BinaryOverlay",um);um.prototype.Gd=function(a,b,c,d){var e=new vm(a,b,c,d);this.pa.ha(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Ad.set(a,new Float32Array(e.Ie)),this.Jd.set(a,e.O))});return e};um.prototype.j=function(){um.h.j.call(this);this.Jd=this.Ad=null};var vm=function(a,b,c,d){pm.call(this,a,b,c,d)};A(vm,pm); vm.prototype.qb=function(){var a=new hm;a.ha("loadend",function(){this.Ie=a.I.result;pm.prototype.qb.call(this)},void 0,this);a.readAsArrayBuffer(this.ue)};var wm=function(a){D.call(this);this.wb={};this.vb={};this.Ha=new bm(this);this.u=a};A(wm,D);var xm=[zc&&!Jc("11")?"readystatechange":"load","abort","error"],ym=function(a,b,c){(c=t(c)?c:c.src)&&(a.wb[b]={src:c,Fd:q(void 0)?void 0:null})},zm=function(a,b){delete a.wb[b];var c=a.vb[b];c&&(delete a.vb[b],a.Ha.sc(c,xm,a.fe),Ib(a.vb)&&Ib(a.wb)&&a.dispatchEvent("complete"))}; wm.prototype.start=function(){var a=this.wb;Ua(Eb(a),function(b){var c=a[b];if(c&&(delete a[b],!this.fa)){if(this.u){var d=this.u;d=(d?new fg(eg(d)):Ka||(Ka=new fg)).Me("IMG")}else d=new Image;c.Fd&&(d.crossOrigin=c.Fd);this.Ha.ha(d,xm,this.fe);this.vb[b]=d;d.id=b;d.src=c.src}},this)}; wm.prototype.fe=function(a){var b=a.currentTarget;if(b){if("readystatechange"==a.type)if("complete"==b.readyState)a.type="load";else return;"undefined"==typeof b.naturalWidth&&("load"==a.type?(b.naturalWidth=b.width,b.naturalHeight=b.height):(b.naturalWidth=0,b.naturalHeight=0));this.dispatchEvent({type:a.type,target:b});this.fa||zm(this,b.id)}};wm.prototype.j=function(){delete this.wb;delete this.vb;Ha(this.Ha);wm.h.j.call(this)};var Am=function(a,b){jm.call(this,a,b)};A(Am,jm);z("ee.layers.ImageOverlay",Am);Am.prototype.Gd=function(a,b,c,d){return new Bm(a,b,c,d)};var Bm=function(a,b,c,d){pm.call(this,a,b,c,d);this.hc=Cm;this.Wd=this.L=this.Wb=null;this.Cb=""};A(Bm,pm); Bm.prototype.qb=function(){try{var a=ic(this.ue);this.Cb=fc(a).toString();var b="about:invalid#zClosurez"!==this.Cb?this.Cb:this.ca}catch(c){b=this.ca}this.L=new wm;ym(this.L,this.O.id+"-image",b);this.Wd=bd(this.L,Dm,function(c){"load"==c.type?(this.Wb=c.target,pm.prototype.qb.call(this)):this.Fb()},void 0,this);this.L.start()};Bm.prototype.lb=function(){Bm.h.lb.call(this);this.L&&(kd(this.Wd),Ha(this.L))};Bm.prototype.j=function(){Bm.h.j.call(this);this.Cb&&URL.revokeObjectURL(this.Cb)}; var Dm=["load","abort","error"],Cm=function(a){a.O.appendChild(a.Wb)};var Em=function(a){for(var b=arguments[0],c=1;cthis.$b)throw Error("[goog.structs.Pool] Min can not be greater than max");this.ga=new Hm;this.ya=new Dd;this.delay=0;this.Zc=null;this.Kb()};A(Im,B);Im.prototype.sb=function(){var a=Ga();if(!(null!=this.Zc&&a-this.Zcthis.$b&&0=this.o()){for(var c=this.W,d=0;d>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};l=Lm.prototype; l.remove=function(){var a=this.W,b=a.length,c=a[0];if(!(0>=b)){if(1==b)cb(a);else{a[0]=a.pop();a=0;b=this.W;for(var d=b.length,e=b[a];a>1;){var f=2*a+1,g=2*a+2;f=ge.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.uc}};l.w=function(){for(var a=this.W,b=[],c=a.length,d=0;da.cf)return!1;a.wd++;zm(a.L,a.K);setTimeout(y(a.rf,a),0);return!0}; Um.prototype.rf=function(){if(!this.Sa){var a=y(function(d){this.Sa||(ym(this.L,this.K,d),bd(this.L,Xm,y(this.Te,this)),this.L.start())},this),b=this.getUrl();if(sh(b).X.wa("profiling")){var c=new F;c.gb="blob";c.ha("complete",y(function(){this.je=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=fc(ic(dh(c))).toString();var e="about:invalid#zClosurez"!==d}catch(f){}a(e?d:b)},this));c.Ab("ready",y(c.ea,c));c.send(b,"GET")}else a(b)}}; var Ym=function(){B.call(this);this.Y=!1};A(Ym,B);Ym.prototype.setActive=function(a){this.Y=a};Ym.prototype.Xd=function(){return this.Y};var Sm=function(a,b){Om.call(this,a,b)};A(Sm,Om);Sm.prototype.Hc=function(){return new Ym};Sm.prototype.Ob=function(a){a.ea()};Sm.prototype.ad=function(a){return!a.fa&&!a.Xd()};var Z=function(a,b,c,d,e){Id.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.rd=new Dd;this.bd=1;this.S=e||null};A(Z,Id);z("ee.MapLayerOverlay",Z);Z.prototype.Ac=function(a){return cd(this,"tileevent",a)};Z.prototype.addTileCallback=Z.prototype.Ac;Z.prototype.jd=function(a){kd(a)}; Z.prototype.removeTileCallback=Z.prototype.jd;Z.prototype.getTile=function(a,b,c){if(ba.y||a.y>=1<