mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
380 lines
192 KiB
JavaScript
380 lines
192 KiB
JavaScript
(function(){var l,aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},n=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}},ba=function(a){if(!(a instanceof Array)){a=n(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a},ca="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},da="undefined"!=typeof window&&
|
|
window===this?this:"undefined"!=typeof global&&null!=global?global:this,ea=function(a,b){if(b){var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ca(c,a,{configurable:!0,writable:!0,value:b})}};ea("Array.prototype.find",function(a){return a?a:function(b,c){a:{var d=this;d instanceof String&&(d=String(d));for(var e=d.length,f=0;f<e;f++){var g=d[f];if(b.call(c,g,f,d)){b=g;break a}}b=void 0}return b}});
|
|
var fa=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};ea("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=fa(this,b,"endsWith");b+="";void 0===c&&(c=d.length);c=Math.max(0,Math.min(c|0,d.length));for(var e=b.length;0<e&&0<c;)if(d[--c]!=b[--e])return!1;return 0>=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&&c<e;)if(d[c++]!=b[g++])return!1;return g>=f}});ea("String.prototype.repeat",function(a){return a?a:function(b){var c=fa(this,null,"repeat");if(0>b||1342177279<b)throw new RangeError("Invalid count value");b|=0;for(var d="";b;)if(b&1&&(d+=c),b>>>=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(c<a.length){var e=c++;return{value:b(e,a[e]),done:!1}}d.next=function(){return{done:!0,value:void 0}};return d.next()}};d[Symbol.iterator]=function(){return d};return d};ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
|
|
ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var f=d[c];if(f===b||Object.is(f,b))return!0}return!1}});ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==fa(this,b,"includes").indexOf(b,c||0)}});
|
|
var na=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},oa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)na(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||oa});
|
|
ea("WeakMap",function(a){function b(){}function c(h){if(!na(h,e)){var k=new b;ca(h,e,{value:k})}}function d(h){var k=Object[h];k&&(Object[h]=function(m){if(m instanceof b)return m;c(m);return k(m)})}if(function(){if(!a||!Object.seal)return!1;try{var h=Object.seal({}),k=Object.seal({}),m=new a([[h,2],[k,3]]);if(2!=m.get(h)||3!=m.get(k))return!1;m["delete"](h);m.set(k,4);return!m.has(h)&&4==m.get(k)}catch(r){return!1}}())return a;var e="$jscomp_hidden_"+Math.random();d("freeze");d("preventExtensions");
|
|
d("seal");var f=0,g=function(h){this.K=(f+=Math.random()+1).toString();if(h){h=n(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}};g.prototype.set=function(h,k){c(h);if(!na(h,e))throw Error("WeakMap key fail: "+h);h[e][this.K]=k;return this};g.prototype.get=function(h){return na(h,e)?h[e][this.K]:void 0};g.prototype.has=function(h){return na(h,e)&&na(h[e],this.K)};g.prototype["delete"]=function(h){return na(h,e)&&na(h[e],this.K)?delete h[e][this.K]:!1};return g});
|
|
ea("Map",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var h=Object.seal({x:4}),k=new a(n([[h,"s"]]));if("s"!=k.get(h)||1!=k.size||k.get({x:4})||k.set({x:4},"t")!=k||2!=k.size)return!1;var m=k.entries(),r=m.next();if(r.done||r.value[0]!=h||"s"!=r.value[1])return!1;r=m.next();return r.done||4!=r.value[0].x||"t"!=r.value[1]||!m.next().done?!1:!0}catch(Q){return!1}}())return a;la();var b=new WeakMap,c=function(h){this.nb={};this.M=
|
|
f();this.size=0;if(h){h=n(h);for(var k;!(k=h.next()).done;)k=k.value,this.set(k[0],k[1])}};c.prototype.set=function(h,k){h=0===h?0:h;var m=d(this,h);m.list||(m.list=this.nb[m.id]=[]);m.J?m.J.value=k:(m.J={next:this.M,sa:this.M.sa,head:this.M,key:h,value:k},m.list.push(m.J),this.M.sa.next=m.J,this.M.sa=m.J,this.size++);return this};c.prototype["delete"]=function(h){h=d(this,h);return h.J&&h.list?(h.list.splice(h.index,1),h.list.length||delete this.nb[h.id],h.J.sa.next=h.J.next,h.J.next.sa=h.J.sa,h.J.head=
|
|
null,this.size--,!0):!1};c.prototype.clear=function(){this.nb={};this.M=this.M.sa=f();this.size=0};c.prototype.has=function(h){return!!d(this,h).J};c.prototype.get=function(h){return(h=d(this,h).J)&&h.value};c.prototype.entries=function(){return e(this,function(h){return[h.key,h.value]})};c.prototype.keys=function(){return e(this,function(h){return h.key})};c.prototype.values=function(){return e(this,function(h){return h.value})};c.prototype.forEach=function(h,k){for(var m=this.entries(),r;!(r=m.next()).done;)r=
|
|
r.value,h.call(k,r[1],r[0],this)};c.prototype[Symbol.iterator]=c.prototype.entries;var d=function(h,k){var m=k&&typeof k;"object"==m||"function"==m?b.has(k)?m=b.get(k):(m=""+ ++g,b.set(k,m)):m="p_"+k;var r=h.nb[m];if(r&&na(h.nb,m))for(h=0;h<r.length;h++){var Q=r[h];if(k!==k&&Q.key!==Q.key||k===Q.key)return{id:m,list:r,index:h,J:Q}}return{id:m,list:r,index:-1,J:void 0}},e=function(h,k){var m=h.M;return ka(function(){if(m){for(;m.head!=h.M;)m=m.sa;for(;m.next!=m.head;)return m=m.next,{done:!1,value:k(m)};
|
|
m=null}return{done:!0,value:void 0}})},f=function(){var h={};return h.sa=h.next=h.head=h},g=0;return c});
|
|
ea("Set",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new a(n([c]));if(!d.has(c)||1!=d.size||d.add(c)!=d||1!=d.size||d.add({x:4})!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||f.value[1]!=c)return!1;f=e.next();return f.done||f.value[0]==c||4!=f.value[0].x||f.value[1]!=f.value[0]?!1:e.next().done}catch(g){return!1}}())return a;la();var b=function(c){this.f=new Map;
|
|
if(c){c=n(c);for(var d;!(d=c.next()).done;)this.add(d.value)}this.size=this.f.size};b.prototype.add=function(c){c=0===c?0:c;this.f.set(c,c);this.size=this.f.size;return this};b.prototype["delete"]=function(c){c=this.f["delete"](c);this.size=this.f.size;return c};b.prototype.clear=function(){this.f.clear();this.size=0};b.prototype.has=function(c){return this.f.has(c)};b.prototype.entries=function(){return this.f.entries()};b.prototype.values=function(){return this.f.values()};b.prototype.keys=b.prototype.values;
|
|
b.prototype[Symbol.iterator]=b.prototype.values;b.prototype.forEach=function(c,d){var e=this;this.f.forEach(function(f){return c.call(d,f,f,e)})};return b});ea("Array.prototype.values",function(a){return a?a:function(){return ma(this,function(b,c){return c})}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)na(b,d)&&c.push([d,b[d]]);return c}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)na(b,d)&&c.push(b[d]);return c}});
|
|
ea("Promise",function(a){function b(){this.va=null}function c(g){return g instanceof e?g:new e(function(h){h(g)})}if(a)return a;b.prototype.ud=function(g){if(null==this.va){this.va=[];var h=this;this.vd(function(){h.Pe()})}this.va.push(g)};var d=da.setTimeout;b.prototype.vd=function(g){d(g,0)};b.prototype.Pe=function(){for(;this.va&&this.va.length;){var g=this.va;this.va=[];for(var h=0;h<g.length;++h){var k=g[h];g[h]=null;try{k()}catch(m){this.Ge(m)}}}this.va=null};b.prototype.Ge=function(g){this.vd(function(){throw g;
|
|
})};var e=function(g){this.B=0;this.T=void 0;this.bb=[];var h=this.Ic();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}};e.prototype.Ic=function(){function g(m){return function(r){k||(k=!0,m.call(h,r))}}var h=this,k=!1;return{resolve:g(this.mf),reject:g(this.hd)}};e.prototype.mf=function(g){if(g===this)this.hd(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof e)this.nf(g);else{a:switch(typeof g){case "object":var h=null!=g;break a;case "function":h=!0;break a;default:h=!1}h?
|
|
this.lf(g):this.Pd(g)}};e.prototype.lf=function(g){var h=void 0;try{h=g.then}catch(k){this.hd(k);return}"function"==typeof h?this.pf(h,g):this.Pd(g)};e.prototype.hd=function(g){this.te(2,g)};e.prototype.Pd=function(g){this.te(1,g)};e.prototype.te=function(g,h){if(0!=this.B)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.B);this.B=g;this.T=h;this.Re()};e.prototype.Re=function(){if(null!=this.bb){for(var g=0;g<this.bb.length;++g)f.ud(this.bb[g]);this.bb=null}};var f=
|
|
new b;e.prototype.nf=function(g){var h=this.Ic();g.Nb(h.resolve,h.reject)};e.prototype.pf=function(g,h){var k=this.Ic();try{g.call(h,k.resolve,k.reject)}catch(m){k.reject(m)}};e.prototype.then=function(g,h){function k(K,pa){return"function"==typeof K?function(kc){try{m(K(kc))}catch(Fa){r(Fa)}}:pa}var m,r,Q=new e(function(K,pa){m=K;r=pa});this.Nb(k(g,m),k(h,r));return Q};e.prototype["catch"]=function(g){return this.then(void 0,g)};e.prototype.Nb=function(g,h){function k(){switch(m.B){case 1:g(m.T);
|
|
break;case 2:h(m.T);break;default:throw Error("Unexpected state: "+m.B);}}var m=this;null==this.bb?f.ud(k):this.bb.push(k)};e.resolve=c;e.reject=function(g){return new e(function(h,k){k(g)})};e.race=function(g){return new e(function(h,k){for(var m=n(g),r=m.next();!r.done;r=m.next())c(r.value).Nb(h,k)})};e.all=function(g){var h=n(g),k=h.next();return k.done?c([]):new e(function(m,r){function Q(kc){return function(Fa){K[kc]=Fa;pa--;0==pa&&m(K)}}var K=[],pa=0;do K.push(void 0),pa++,c(k.value).Nb(Q(K.length-
|
|
1),r),k=h.next();while(!k.done)})};return e});ea("String.prototype.padStart",function(a){return a?a:function(b,c){var d=fa(this,null,"padStart");b-=d.length;c=void 0!==c?String(c):" ";return(0<b&&c?c.repeat(Math.ceil(b/c.length)).substring(0,b):"")+d}});
|
|
var qa=qa||{},p=this||self,q=function(a){return void 0!==a},t=function(a){return"string"==typeof a},ra=function(a){return"boolean"==typeof a},u=function(a){return"number"==typeof a},sa=/^[\w+/_-]+[=]{0,2}$/,ta=null,ua=function(a){a=a.split(".");for(var b=p,c=0;c<a.length;c++)if(b=b[a[c]],null==b)return null;return b},va=function(){},wa=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==
|
|
c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},xa=function(a){return null!=a},v=function(a){return"array"==wa(a)},ya=
|
|
function(a){var b=wa(a);return"array"==b||"object"==b&&"number"==typeof a.length},za=function(a){return w(a)&&"function"==typeof a.getFullYear},x=function(a){return"function"==wa(a)},w=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},Aa="closure_uid_"+(1E9*Math.random()>>>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(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);
|
|
Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},y=function(a,b,c){y=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Ca:Da;return y.apply(null,arguments)},Ea=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}},Ga=Date.now||function(){return+new Date},z=function(a,b){a=a.split(".");var c=p;a[0]in c||"undefined"==typeof c.execScript||
|
|
c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&q(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}},A=function(a,b){function c(){}c.prototype=b.prototype;a.h=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Bf=function(d,e,f){for(var g=Array(arguments.length-2),h=2;h<arguments.length;h++)g[h-2]=arguments[h];return b.prototype[e].apply(d,g)}};var B=function(){this.fa=this.fa;this.cc=this.cc};B.prototype.fa=!1;B.prototype.ea=function(){this.fa||(this.fa=!0,this.j())};B.prototype.j=function(){if(this.cc)for(;this.cc.length;)this.cc.shift()()};var Ha=function(a){a&&"function"==typeof a.ea&&a.ea()};var Ia=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Ma=!1;this.oe=!0};Ia.prototype.stopPropagation=function(){this.Ma=!0};Ia.prototype.preventDefault=function(){this.defaultPrevented=!0;this.oe=!1};var Ja=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,Ja);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};A(Ja,Error);Ja.prototype.name="CustomError";var Ka;var La=function(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");Ja.call(this,c+a[d])};A(La,Ja);La.prototype.name="AssertionError";
|
|
var Ma=function(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var f=d}else a&&(e+=": "+a,f=b);throw new La(""+e,f||[]);},C=function(a,b,c){a||Ma("",null,b,Array.prototype.slice.call(arguments,2));return a},Na=function(a,b){throw new La("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Oa=function(a,b,c){u(a)||Ma("Expected number but got %s: %s.",[wa(a),a],b,Array.prototype.slice.call(arguments,2));return a},Pa=function(a,b,c){t(a)||Ma("Expected string but got %s: %s.",[wa(a),
|
|
a],b,Array.prototype.slice.call(arguments,2))},Qa=function(a,b,c){x(a)||Ma("Expected function but got %s: %s.",[wa(a),a],b,Array.prototype.slice.call(arguments,2))},Ra=function(a,b,c){w(a)||Ma("Expected object but got %s: %s.",[wa(a),a],b,Array.prototype.slice.call(arguments,2));return a};var Sa=Array.prototype.indexOf?function(a,b){C(null!=a.length);return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(t(a))return t(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ta=Array.prototype.lastIndexOf?function(a,b){C(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,a.length-1)}:function(a,b){var c=a.length-1;0>c&&(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;f<d;f++)f in e&&b.call(c,e[f],f,a)},Va=Array.prototype.filter?function(a,b){C(null!=a.length);return Array.prototype.filter.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=[],e=0,f=t(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var h=f[g];b.call(void 0,h,g,a)&&(d[e++]=h)}return d},Wa=Array.prototype.map?function(a,
|
|
b,c){C(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=t(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},Xa=Array.prototype.some?function(a,b){C(null!=a.length);return Array.prototype.some.call(a,b,void 0)}:function(a,b){for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1},Ya=Array.prototype.every?function(a,b,c){C(null!=a.length);return Array.prototype.every.call(a,
|
|
b,c)}:function(a,b,c){for(var d=a.length,e=t(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0},Za=function(a,b){var c=0;Ua(a,function(d,e,f){b.call(void 0,d,e,f)&&++c},void 0);return c},ab=function(a){a:{var b=$a;for(var c=a.length,d=t(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null: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<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]},hb=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(ya(d)){var e=a.length||0,f=d.length||0;a.length=e+f;for(var g=0;g<f;g++)a[e+g]=d[g]}else a.push(d)}},ib=function(a,b,c){C(null!=a.length);
|
|
return 2>=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;d<a.length;){var e=a[d++];var f=e;f=w(f)?"o"+(f[Aa]||(f[Aa]=++Ba)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c},kb=function(a){var b=[];if(0>a-0)return[];for(var c=0;c<a;c+=1)b.push(c);return b},lb=function(a){for(var b=[],c=0;c<arguments.length;c++){var d=arguments[c];if(v(d))for(var e=0;e<d.length;e+=8192){var f=ib(d,
|
|
e,e+8192);f=lb.apply(null,f);for(var g=0;g<f.length;g++)b.push(f[g])}else b.push(d)}return b};var mb=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},nb=/&/g,ob=/</g,pb=/>/g,qb=/"/g,rb=/'/g,sb=/\x00/g,tb=/[\x00&<>"']/,ub=function(a,b){return a<b?-1:a>b?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<arguments.length;e++){d=
|
|
arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<Mb.length;f++)c=Mb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var Ob=function(a,b){a:{try{var c=a&&a.ownerDocument,d=c&&(c.defaultView||c.parentWindow);d=d||p;if(d.Element&&d.Location){var e=d;break a}}catch(g){}e=null}if(e&&"undefined"!=typeof e[b]&&(!a||!(a instanceof e[b])&&(a instanceof e.Location||a instanceof e.Element))){if(w(a))try{var f=a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a)}catch(g){f="<object could not be stringified>"}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("<!DOCTYPE html>");var oc=(new nc).qa("");(new nc).qa("<br>");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<c.length;)d+=c.shift()+e.shift();return d+c.join("%s")},tc=function(a){tb.test(a)&&(-1!=a.indexOf("&")&&(a=a.replace(nb,"&")),-1!=a.indexOf("<")&&(a=a.replace(ob,"<")),-1!=a.indexOf(">")&&(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=[];0<b&&a.length;)c.push(a.shift()),b--;a.length&&c.push(a.join(":"));return c};var vc=function(a){vc[" "](a);return a};vc[" "]=va;var xc=function(a,b){var c=wc;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var yc=yb("Opera"),zc=yb("Trident")||yb("MSIE"),Ac=yb("Edge"),Bc=yb("Gecko")&&!(-1!=vb.toLowerCase().indexOf("webkit")&&!yb("Edge"))&&!(yb("Trident")||yb("MSIE"))&&!yb("Edge"),Cc=-1!=vb.toLowerCase().indexOf("webkit")&&!yb("Edge"),Dc=function(){var a=p.document;return a?a.documentMode:void 0},Ec;
|
|
a:{var Fc="",Gc=function(){var a=vb;if(Bc)return/rv:([^\);]+)(\)|;)/.exec(a);if(Ac)return/Edge\/([\d\.]+)/.exec(a);if(zc)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Cc)return/WebKit\/(\S+)/.exec(a);if(yc)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Gc&&(Fc=Gc?Gc[1]:"");if(zc){var Hc=Dc();if(null!=Hc&&Hc>parseFloat(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<e;f++){var g=c[f]||"",h=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;b=ub(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||ub(0==g[2].length,0==h[2].length)||ub(g[2],h[2]);g=g[3];h=h[3]}while(0==b)}return 0<=b})},Kc;
|
|
Kc=p.document&&zc?Dc():void 0;var Lc=Object.freeze||function(a){return a};var Mc=!zc||9<=Number(Kc),Nc=zc&&!Jc("9"),Oc=function(){if(!p.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{p.addEventListener("test",va,b),p.removeEventListener("test",va,b)}catch(c){}return a}();var Pc=function(a,b){Ia.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.$=null;a&&this.init(a,b)};A(Pc,Ia);var Qc=Lc({2:"touch",3:"pen",4:"mouse"});
|
|
Pc.prototype.init=function(a,b){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(Bc){a:{try{vc(b.nodeName);var e=!0;break a}catch(f){}e=!1}e||(b=null)}}else"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=
|
|
d.screenY||0):(this.offsetX=Cc||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=Cc||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.pointerId=
|
|
a.pointerId||0;this.pointerType=t(a.pointerType)?a.pointerType:Qc[a.pointerType]||"";this.state=a.state;this.$=a;a.defaultPrevented&&this.preventDefault()};Pc.prototype.stopPropagation=function(){Pc.h.stopPropagation.call(this);this.$.stopPropagation?this.$.stopPropagation():this.$.cancelBubble=!0};
|
|
Pc.prototype.preventDefault=function(){Pc.h.preventDefault.call(this);var a=this.$;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Nc)try{if(a.ctrlKey||112<=a.keyCode&&123>=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);-1<g?(b=a[g],c||(b.Mb=!1)):(b=new Uc(b,this.src,f,!!d,e),b.Mb=c,a.push(b));return b};Wc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.H))return!1;var e=this.H[a];b=Xc(e,b,c,d);return-1<b?(Vc(e[b]),db(e,b),0==e.length&&(delete this.H[a],this.Ib--),!0):!1};
|
|
var Yc=function(a,b){var c=b.type;c in a.H&&eb(a.H[c],b)&&(Vc(b),0==a.H[c].length&&(delete a.H[c],a.Ib--))};Wc.prototype.Eb=function(a){a=a&&a.toString();var b=0,c;for(c in this.H)if(!a||c==a){for(var d=this.H[c],e=0;e<d.length;e++)++b,Vc(d[e]);delete this.H[c];this.Ib--}};Wc.prototype.rb=function(a,b,c,d){a=this.H[a.toString()];var e=-1;a&&(e=Xc(a,b,c,d));return-1<e?a[e]:null};
|
|
Wc.prototype.hasListener=function(a,b){var c=q(a),d=c?a.toString():"",e=q(b);return Cb(this.H,function(f){for(var g=0;g<f.length;++g)if(!(c&&f[g].type!=d||e&&f[g].capture!=b))return!0;return!1})};var Xc=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.eb&&f.listener==b&&f.capture==!!c&&f.pa==d)return e}return-1};var Zc="closure_lm_"+(1E6*Math.random()|0),$c={},ad=0,cd=function(a,b,c,d,e){if(d&&d.once)return bd(a,b,c,d,e);if(v(b)){for(var f=0;f<b.length;f++)cd(a,b[f],c,d,e);return null}c=dd(c);return Sc(a)?a.ha(b,c,w(d)?!!d.capture:!!d,e):ed(a,b,c,!1,d,e)},ed=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=w(e)?!!e.capture:!!e,h=fd(a);h||(a[Zc]=h=new Wc(a));c=h.add(b,c,d,g,f);if(c.gc)return c;d=gd();c.gc=d;d.src=a;d.listener=c;if(a.addEventListener)Oc||(e=g),void 0===e&&(e=!1),a.addEventListener(b.toString(),
|
|
d,e);else if(a.attachEvent)a.attachEvent(hd(b.toString()),d);else if(a.addListener&&a.removeListener)C("change"===b,"MediaQueryList only has a change event"),a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");ad++;return c},gd=function(){var a=id,b=Mc?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b},bd=function(a,b,c,d,e){if(v(b)){for(var f=0;f<b.length;f++)bd(a,b[f],c,d,e);return null}c=dd(c);return Sc(a)?
|
|
a.Ab(b,c,w(d)?!!d.capture:!!d,e):ed(a,b,c,!0,d,e)},jd=function(a,b,c,d,e){if(v(b))for(var f=0;f<b.length;f++)jd(a,b[f],c,d,e);else d=w(d)?!!d.capture:!!d,c=dd(c),Sc(a)?a.sc(b,c,d,e):a&&(a=fd(a))&&(b=a.rb(b,c,d,e))&&kd(b)},kd=function(a){if(!u(a)&&a&&!a.eb){var b=a.src;if(Sc(b))Yc(b.Z,a);else{var c=a.type,d=a.gc;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(hd(c),d):b.addListener&&b.removeListener&&b.removeListener(d);ad--;(c=fd(b))?(Yc(c,a),0==c.Ib&&(c.src=
|
|
null,b[Zc]=null)):Vc(a)}}},hd=function(a){return a in $c?$c[a]:$c[a]="on"+a},md=function(a,b,c,d){var e=!0;if(a=fd(a))if(b=a.H[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.eb&&(f=ld(f,d),e=e&&!1!==f)}return e},ld=function(a,b){var c=a.listener,d=a.pa||a.src;a.Mb&&kd(a);return c.call(d,b)},id=function(a,b){if(a.eb)return!0;if(!Mc){var c=b||ua("window.event");b=new Pc(c,this);var d=!0;if(!(0>c.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<c.length;e++)b.currentTarget=c[e],f=md(c[e],a,!1,b),d=d&&f}return d}return ld(a,new Pc(b,this))},fd=function(a){a=a[Zc];return a instanceof Wc?a:null},nd="__closure_events_fn_"+(1E9*Math.random()>>>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<c.length;f++)g=a.currentTarget=c[f],e=pd(g,d,!1,a)&&e;return e};
|
|
l.j=function(){D.h.j.call(this);this.Z&&this.Z.Eb(void 0);this.cd=null};l.ha=function(a,b,c,d){od(this);return this.Z.add(String(a),b,!1,c,d)};l.Ab=function(a,b,c,d){return this.Z.add(String(a),b,!0,c,d)};l.sc=function(a,b,c,d){this.Z.remove(String(a),b,c,d)};var pd=function(a,b,c,d){b=a.Z.H[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.eb&&g.capture==c){var h=g.listener,k=g.pa||g.src;g.Mb&&Yc(a.Z,g);e=!1!==h.call(k,d)&&e}}return e&&0!=d.oe};
|
|
D.prototype.rb=function(a,b,c,d){return this.Z.rb(String(a),b,c,d)};D.prototype.hasListener=function(a,b){return this.Z.hasListener(q(a)?String(a):void 0,b)};var od=function(a){C(a.Z,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var qd="StopIteration"in p?p.StopIteration:{message:"StopIteration",stack:""},rd=function(){};rd.prototype.next=function(){throw qd;};rd.prototype.Ra=function(){return this};
|
|
var sd=function(a){if(a instanceof rd)return a;if("function"==typeof a.Ra)return a.Ra(!1);if(ya(a)){var b=0,c=new rd;c.next=function(){for(;;){if(b>=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(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};l=ud.prototype;l.o=function(){return this.m};l.w=function(){vd(this);for(var a=[],b=0;b<this.l.length;b++)a.push(this.f[this.l[b]]);return a};l.ba=function(){vd(this);return this.l.concat()};l.wa=function(a){return wd(this.f,a)};
|
|
l.mb=function(a){for(var b=0;b<this.l.length;b++){var c=this.l[b];if(wd(this.f,c)&&this.f[c]==a)return!0}return!1};l.equals=function(a,b){if(this===a)return!0;if(this.m!=a.o())return!1;b=b||xd;vd(this);for(var c,d=0;c=this.l[d];d++)if(!b(this.get(c),a.get(c)))return!1;return!0};var xd=function(a,b){return a===b};ud.prototype.isEmpty=function(){return 0==this.m};ud.prototype.clear=function(){this.f={};this.Jb=this.m=this.l.length=0};
|
|
ud.prototype.remove=function(a){return wd(this.f,a)?(delete this.f[a],this.m--,this.Jb++,this.l.length>2*this.m&&vd(this),!0):!1};var vd=function(a){if(a.m!=a.l.length){for(var b=0,c=0;b<a.l.length;){var d=a.l[b];wd(a.f,d)&&(a.l[c++]=d);b++}a.l.length=c}if(a.m!=a.l.length){var e={};for(c=b=0;b<a.l.length;)d=a.l[b],wd(e,d)||(a.l[c++]=d,e[d]=1),b++;a.l.length=c}};l=ud.prototype;l.get=function(a,b){return wd(this.f,a)?this.f[a]:b};
|
|
l.set=function(a,b){wd(this.f,a)||(this.m++,this.l.push(a),this.Jb++);this.f[a]=b};l.addAll=function(a){if(a instanceof ud)for(var b=a.ba(),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};l.forEach=function(a,b){for(var c=this.ba(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};l.clone=function(){return new ud(this)};
|
|
l.Ra=function(a){vd(this);var b=0,c=this.Jb,d=this,e=new rd;e.next=function(){if(c!=d.Jb)throw Error("The map has changed since the iterator was created");if(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;d<c;d++)b.push(a[d]);return b}return Db(a)},Ad=function(a){if(a.ba&&"function"==typeof a.ba)return a.ba();if(!a.w||"function"!=typeof a.w){if(ya(a)||t(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return Eb(a)}},Bd=function(a,b,
|
|
c){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,c);else if(ya(a)||t(a))Ua(a,b,c);else for(var d=Ad(a),e=zd(a),f=e.length,g=0;g<f;g++)b.call(c,e[g],d&&d[g],a)},Cd=function(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(ya(a)||t(a))return Ya(a,b,void 0);for(var c=Ad(a),d=zd(a),e=d.length,f=0;f<e;f++)if(!b.call(void 0,d[f],c&&c[f],a))return!1;return!0};var Dd=function(a){this.f=new ud;a&&this.addAll(a)},Ed=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[Aa]||(a[Aa]=++Ba)):b.substr(0,1)+a};l=Dd.prototype;l.o=function(){return this.f.o()};l.add=function(a){this.f.set(Ed(a),a)};l.addAll=function(a){a=zd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};l.Eb=function(a){a=zd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};l.remove=function(a){return this.f.remove(Ed(a))};l.clear=function(){this.f.clear()};l.isEmpty=function(){return this.f.isEmpty()};
|
|
l.contains=function(a){return this.f.wa(Ed(a))};var Fd=function(a,b){var c=new Dd;b=zd(b);for(var d=0;d<b.length;d++){var e=b[d];a.contains(e)&&c.add(e)}return c},Gd=function(a,b){a=a.clone();a.Eb(b);return a};Dd.prototype.w=function(){return this.f.w()};Dd.prototype.clone=function(){return new Dd(this)};Dd.prototype.equals=function(a){return this.o()==yd(a)&&Hd(this,a)};
|
|
var Hd=function(a,b){var c=yd(b);if(a.o()>c)return!1;!(b instanceof Dd)&&5<c&&(b=new Dd(b));return Cd(a,function(d){var e=b;return e.contains&&"function"==typeof e.contains?e.contains(d):e.mb&&"function"==typeof e.mb?e.mb(d):ya(e)||t(e)?bb(e,d):Fb(e,d)})};Dd.prototype.Ra=function(){return this.f.Ra(!1)};var Id=function(a,b,c){D.call(this);this.af=b;this.token=c;this.Ca=[];this.qd=new Dd;this.Aa=0;this.url=a};A(Id,D);z("ee.AbstractOverlay",Id);var Jd=function(a,b,c){var d=1<<c,e=b.x%d;0>e&&(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(1<a.length)throw Error("Only one gamma value is supported");1===a.length&&(b.gamma={value:a[0]});return Ib(b)?null:b},Xd=function(a){return a?a.split(",").map(Number):[]},Wd=function(a,b,c){var d=Xd(a[b]),e=Xd(a[c]);if(0===d.length)return e.map(function(f){var g={};return g[b]=0,g[c]=f,g});if(0===e.length)return d.map(function(f){var g={};return g[b]=f,g[c]=1,g});if(d.length!==e.length)throw Error("Length of "+b+" and "+c+" must match.");return d.map(function(f,g){var h={};return h[b]=f,h[c]=e[g],
|
|
h})},Zd=function(a){var b=function(g){var h={};h.description=g.description||"";h.type=g.type||"";null!=g.argumentName&&(h.name=g.argumentName);void 0!==g.defaultValue&&(h["default"]=g.defaultValue);null!=g.optional&&(h.optional=g.optional);return h},c=function(g){var h={};h.args=(g.arguments||[]).map(b);h.description=g.description||"";h.returns=g.returnType||"";null!=g.hidden&&(h.hidden=g.hidden);g.deprecated&&(h.deprecated=g.deprecationReason);return h},d={};a=n(a.algorithms||[]);for(var e=a.next();!e.done;e=
|
|
a.next()){e=e.value;var f=e.name.replace(/^algorithms\//,"");d[f]=c(e)}return d},$d=function(a){return(a=/^(projects\/[a-z][a-z0-9\-]{4,28}[a-z0-9])\/.*/.exec(a))?a[1]:"projects/earthengine-legacy"},E=function(a){return/^projects\/[a-z][a-z0-9\-]{4,28}[a-z0-9]\/assets\/.*/.exec(a)?a:/^(users|projects)\/.*/.exec(a)?"projects/earthengine-legacy/assets/"+a:"projects/earthengine-public/assets/"+a},ae=function(a){switch(a){case "ImageCollection":return"IMAGE_COLLECTION";case "Folder":return"FOLDER";default:return a}},
|
|
be=function(a){var b={};a.id&&(b.parent=E(a.id));a.num&&(b.pageSize=a.num);var c=["id","num"];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 b},de=function(a){return(a.assets||[]).map(ce)},ge=function(a){return(a.images||[]).map(fe)},ce=function(a){var b=he(function(d){switch(d){case "IMAGE":return"Image";case "IMAGE_COLLECTION":return"ImageCollection";case "FOLDER":return"Folder";case "TABLE":return"Table";
|
|
default:return"Unknown"}}(a.type),a.name),c=Object.assign({},a.properties||{});a.sizeBytes&&(c["system:asset_size"]=Number(a.sizeBytes));a.startTime&&(c["system:time_start"]=Date.parse(a.startTime));a.endTime&&(c["system:time_end"]=Date.parse(a.endTime));a.geometry&&(c["system:footprint"]=a.geometry);t(a.title)&&(c["system:title"]=a.title);t(a.description)&&(c["system:description"]=a.description);a.updateTime&&(b.version=1E3*Date.parse(a.updateTime));b.properties=c;a.bands&&(b.bands=a.bands.map(function(d){var e=
|
|
{id:d.id,dimensions:[d.grid.dimensions.width,d.grid.dimensions.height],crs:d.grid.crsCode,crs_transform:[d.grid.affineTransform.scaleX||0,d.grid.affineTransform.shearX||0,d.grid.affineTransform.translateX||0,d.grid.affineTransform.shearY||0,d.grid.affineTransform.scaleY||0,d.grid.affineTransform.translateY||0]};if(d.dataType){var f={type:"PixelType"};f.precision=(d.dataType.precision||"").toLowerCase();d.dataType.range&&(f.min=d.dataType.range.min||0,f.max=d.dataType.range.max);e.data_type=f}return e}));
|
|
return b},ie=function(a){var b={},c=Object.assign({},a),d;a=function(e){d=c[e];delete c[e];return d};a("system:asset_size")&&(b.sizeBytes=String(d));a("system:time_start")&&(b.startTime=(new Date(Number(d))).toISOString());a("system:time_end")&&(b.endTime=(new Date(Number(d))).toISOString());a("system:footprint")&&(b.geometry=d);t(a("system:title"))&&(b.title=d);t(a("system:description"))&&(b.description=d);b.properties=c;return b},fe=function(a){return he("Image",a.name)},he=function(a,b){var c=
|
|
{};c.type=a;null!=b&&(a=b.split("/"),c.id="projects"===a[0]&&"assets"===a[2]?a.slice(3).join("/"):b);return c},ke=function(a){var b={};a.id&&(b.parent=E(a.id));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=je(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 b},je=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("],[")+"]]]}"},le=function(a){var b={};(a.bindings||[]).forEach(function(f){b[f.role]=f.members});var c=new Set,d=function(f){var g=f.replace(/^group:|^user:/,"");f.startsWith("group:")&&c.add(g);return g};
|
|
a=b["roles/viewer"]||[];var e=a.filter(function(f){return"allUsers"!==f});d={owners:(b["roles/owner"]||[]).map(d),writers:(b["roles/editor"]||[]).map(d),readers:e.map(d)};0<c.size&&(d.groups=c);a.length!=e.length&&(d.all_users_can_read=!0);return d},me=function(a){var b=function(d){return(a[d]||[]).map(function(e){return(a.groups&&a.groups.has(e)?"group:":"user:")+e})},c=a.all_users_can_read?["allUsers"]:[];return{bindings:[{role:"roles/owner",members:b("owners")},{role:"roles/viewer",members:b("readers").concat(c)},
|
|
{role:"roles/editor",members:b("writers")}].filter(function(d){return d.members.length}),etag:null}},ne=function(a){return"projects/earthengine-legacy/operations/"+a},oe=function(a){var b={},c=function(f,g){null!=g&&(b[f]=Date.parse(g))},d=function(f){switch(f){case "PENDING":return"READY";case "RUNNING":return"RUNNING";case "CANCELLING":return"CANCEL_REQUESTED";case "SUCCEEDED":return"COMPLETED";case "CANCELLED":return"CANCELLED";case "FAILED":return"FAILED";default:return"UNKNOWN"}},e=a.metadata;
|
|
null!=e.description&&(b.description=e.description);null!=e.state&&(b.state=d(e.state));c("creation_timestamp_ms",e.createTime);c("update_timestamp_ms",e.updateTime);c("start_timestamp_ms",e.startTime);a.done&&null!=a.error&&(b.error_message=a.error.message);null!=a.name&&(b.id=a.name.replace(/^operations\//,""));b.task_type=e.type||"UNKNOWN";b.output_url=e.destinationUris;b.source_url=e.scriptUri;return b},pe=function(a){var b={started:"OK"};a.name&&(b.taskId=a.name.replace(/^operations\//,""));a.error&&
|
|
(b.note=a.error.message);return b},qe=function(a){return a.primaryPath?{uris:[a.primaryPath].concat(ba(a.additionalPaths||[]))}:a},te=function(a){var b=Object.assign({},a);delete b.id;b.name=E(a.id);b.tilesets=(a.tilesets||[]).map(function(c){var d=(c.sources||[]).map(qe);return Object.assign({},c,{sources:d})});b.bands=(a.bands||[]).map(function(c){var d=re(c.missingData);return Object.assign({},c,{missingData:d})});b.missingData=re(a.missingData);b.maskBands=lb((b.tilesets||[]).map(se));b.pyramidingPolicy=
|
|
a.pyramidingPolicy||null;return b},se=function(a){var b=[];if(!v(a.fileBands))return b;var c=function(d){var e=[];null!=d&&v(d.bandId)&&(e=d.bandId.map(function(f){return f||""}));return{tilesetId:a.id||"",bandIds:e}};a.fileBands.forEach(function(d){d.maskForAllBands?b.push(c(null)):null!=d.maskForBands&&b.push(c(d.maskForBands))});delete a.fileBands;return b},ue=function(a){var b=Object.assign({},a);delete b.id;b.name=E(a.id);b.sources=(a.sources||[]).map(qe);return b},re=function(a){if(null==a)return null;
|
|
var b={values:[]};null!=a.value&&u(a.value)&&b.values.push(a.value);v(a.values)&&a.values.map(function(c){u(c)&&b.values.push(c)});return 0==b.values.length?null:b};var ve=function(){this.ma=-1};var we=function(){this.ma=-1;this.ma=64;this.F=Array(4);this.He=Array(this.ma);this.qc=this.kb=0;this.reset()};A(we,ve);we.prototype.reset=function(){this.F[0]=1732584193;this.F[1]=4023233417;this.F[2]=2562383102;this.F[3]=271733878;this.qc=this.kb=0};
|
|
var xe=function(a,b,c){c||(c=0);var d=Array(16);if(t(b))for(var e=0;16>e;++e)d[e]=b.charCodeAt(c++)|b.charCodeAt(c++)<<8|b.charCodeAt(c++)<<16|b.charCodeAt(c++)<<24;else for(e=0;16>e;++e)d[e]=b[c++]|b[c++]<<8|b[c++]<<16|b[c++]<<24;b=a.F[0];c=a.F[1];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;f<b;){if(0==e)for(;f<=c;)xe(this,a,f),f+=this.ma;if(t(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.ma){xe(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.ma){xe(this,d);e=0;break}}this.kb=e;this.qc+=b};
|
|
we.prototype.digest=function(){var a=Array((56>this.kb?this.ma:2*this.ma)-this.kb);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;var c=8*this.qc;for(b=a.length-8;b<a.length;++b)a[b]=c&255,c/=256;this.update(a);a=Array(16);for(b=c=0;4>b;++b)for(var d=0;32>d;d+=8)a[c++]=this.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<b;f++)c.push(e),e=d[f],Ae(a,a.ic?a.ic.call(d,String(f),e):e,c),e=",";c.push("]");return}if(b instanceof String||b instanceof Number||b instanceof Boolean)b=b.valueOf();else{c.push("{");f="";for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(e=b[d],"function"!=typeof e&&(c.push(f),Be(d,c),c.push(":"),Ae(a,a.ic?a.ic.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":Be(b,
|
|
c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "function":c.push("null");break;default:throw Error("Unknown type: "+typeof b);}}},Ce={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},De=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Be=function(a,b){b.push('"',a.replace(De,function(c){var d=Ce[c];d||(d="\\u"+(c.charCodeAt(0)|65536).toString(16).substr(1),
|
|
Ce[c]=d);return d}),'"')};var Ee=function(a){this.ua="__ee_hash__";this.Yb=!1!==a;this.ia=[];this.U={};this.jb=[]};z("ee.Serializer",Ee);var Fe=new ye,Ge=new we,Ie=function(a,b){return He(new Ee(q(b)?b:!0),a)};z("ee.Serializer.encode",Ie);var Je=function(a){return Fe.D(Ie(a))};z("ee.Serializer.toJSON",Je);var Le=function(a){return Ke(Ie(a,!1))};z("ee.Serializer.toReadableJSON",Le);
|
|
var Ke=function(a){return"JSON"in p?p.JSON.stringify(a,null," "):Fe.D(a)},He=function(a,b){b=a.Qb(b);a.Yb&&(b=w(b)&&"ValueRef"==b.type&&1==a.ia.length?a.ia[0][1]:{type:"CompoundValue",scope:a.ia,value:b},a.ia=[],Ua(a.jb,y(function(c){delete c[this.ua]},a)),a.jb=[],a.U={});return b};
|
|
Ee.prototype.Qb=function(a){if(!q(a))throw Error("Can't encode an undefined value.");var b=w(a)?a[this.ua]:null;if(this.Yb&&null!=b&&this.U[b])return{type:"ValueRef",value:this.U[b]};if(null===a||ra(a)||u(a)||t(a))return a;if(za(a))return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Md){var c=a.encode(y(this.Qb,this));if(!(v(c)||w(c)&&"ArgumentRef"!=c.type))return c}else if(v(a))c=Wa(a,function(e){return this.Qb(e)},this);else if(w(a)&&!x(a))c=Bb(a,
|
|
function(e){if(!x(e))return this.Qb(e)},this),Jb(c,this.ua),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Yb){b=Me(c);if(this.U[b])var d=this.U[b];else d=String(this.ia.length),this.ia.push([d,c]),this.U[b]=d;a[this.ua]=b;this.jb.push(a);return{type:"ValueRef",value:d}}return c};var Me=function(a){Ge.reset();Ge.update(Fe.D(a));return Ge.digest().toString()},Oe=function(a){return Ne(new Ee(!0),a)};z("ee.Serializer.encodeCloudApi",Oe);
|
|
var Pe=function(a){a=Ne(new Ee(!1),a);var b=a.values,c=function(d){if(!w(d))return d;var e=v(d)?[]:{};d=n(Object.entries(d));for(var f=d.next();!f.done;f=d.next()){var g=n(f.value);f=g.next().value;g=g.next().value;e[f]="functionDefinitionValue"===f&&null!=g.body?{argumentNames:g.argumentNames,body:c(b[g.body])}:"functionInvocationValue"===f&&null!=g.functionReference?{arguments:g.arguments.map(c),functionReference:c(b[g.functionReference])}:"constantValue"===f?g:c(g)}return e};return c(b[a.result])};
|
|
z("ee.Serializer.encodeCloudApiPretty",Pe);var Qe=function(a){return Ke(Pe(a))};z("ee.Serializer.toReadableCloudApiJSON",Qe);
|
|
var Ne=function(a,b){try{var c=Re(a,b);return Se(new Te(c,a.ia,a.Yb))}finally{a.jb.forEach(function(d){return delete d[a.ua]}),a.jb=[],a.U={},a.ia=[]}},Re=function(a,b){var c=function(e){var f=Me(e);if(a.U[f])return a.U[f];var g=String(a.ia.length);a.ia.push([g,e]);a.U[f]=g;w(b)&&(b[a.ua]=f,a.jb.push(b));return g};if(w(b)&&a.U[b[a.ua]])return a.U[b[a.ua]];if(null===b||ra(b)||t(b)||u(b))return c(Nd(b));if(za(b))return c(Pd("Date",{value:Nd(Math.floor(b.getTime()))}));if(b instanceof Md)return c(b.P(function(e){return Re(a,
|
|
e)}));if(v(b))return c({arrayValue:{values:b.map(function(e){return Od(Re(a,e))})}});if(w(b)&&!x(b)){var d={};Object.keys(b).sort().forEach(function(e){d[e]=Od(Re(a,b[e]))});return c({dictionaryValue:{values:d}})}throw Error("Can't encode object: "+b);},Te=function(a,b,c){var d=this;this.pe=a;this.values={};b.forEach(function(e){return d.values[e[0]]=e[1]});this.ke=c?Ue(this):null;this.ie={};this.gd={};this.df=0},Se=function(a){return{result:Ve(a,a.pe),values:a.ie}},Ve=function(a,b){if(b in a.gd)return a.gd[b];
|
|
var c=String(a.df++);a.gd[b]=c;a.ie[c]=We(a,a.values[b]);return c},We=function(a,b){var c=function(h){return void 0!==h.constantValue};if(c(b)||null!=b.integerValue||null!=b.bytesValue||null!=b.argumentReference)return b;if(null!=b.valueReference)return c=a.values[b.valueReference],null===a.ke||1===a.ke[b.valueReference]?We(a,c):Xe(c)?c:Od(Ve(a,b.valueReference));if(null!=b.arrayValue){var d=b.arrayValue.values.map(function(h){return We(a,h)});return d.every(c)?Nd(d.map(function(h){return h.constantValue})):
|
|
{arrayValue:{values:d}}}if(null!=b.dictionaryValue){d={};var e={};b=n(Object.entries(b.dictionaryValue.values||{}));for(var f=b.next();!f.done;f=b.next()){var g=n(f.value);f=g.next().value;g=g.next().value;d[f]=We(a,g);null!==e&&c(d[f])?e[f]=d[f].constantValue:e=null}return null!==e?Nd(e):{dictionaryValue:{values:d}}}if(null!=b.functionDefinitionValue)return c=b.functionDefinitionValue,Rd(c.argumentNames||[],Ve(a,c.body||""));if(null!=b.functionInvocationValue){c=b.functionInvocationValue;d={};e=
|
|
n(Object.keys(c.arguments||{}));for(b=e.next();!b.done;b=e.next())b=b.value,d[b]=We(a,c.arguments[b]);return c.functionName?Pd(c.functionName,d):Qd(Ve(a,c.functionReference||""),d)}throw Error("Can't optimize value: "+b);},Xe=function(a){var b=a.constantValue;return void 0!==b?null===b||u(b)||ra(b):null!=a.argumentReference},Ue=function(a){var b={},c=function(e){b[e]?b[e]++:(b[e]=1,d(a.values[e]))},d=function(e){null!=e.arrayValue?e.arrayValue.values.forEach(d):null!=e.dictionaryValue?Object.values(e.dictionaryValue.values).forEach(d):
|
|
null!=e.functionDefinitionValue?c(e.functionDefinitionValue.body):null!=e.functionInvocationValue?(e=e.functionInvocationValue,null!=e.functionReference&&c(e.functionReference),Object.values(e.arguments).forEach(d)):null!=e.valueReference&&c(e.valueReference)};c(a.pe);return b};var af=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b={expression:Oe(a.element),description:Ye(a.description),fileExportOptions:null,assetExportOptions:null,grid:null,maxPixels:Ye(a.maxPixels),requestId:Ye(a.id)},c=Ze(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":b.fileExportOptions=$e(a,c);break;case "ASSET":c=a.pyramidingPolicy||{};try{c=JSON.parse(c)}catch(e){}var d="PYRAMIDING_POLICY_UNSPECIFIED";t(c)?(d=c,c={}):c[".default"]&&(d=c[".default"],delete c[".default"]);
|
|
b.assetExportOptions={earthEngineDestination:{name:E(a.assetId)},pyramidingPolicy:d,pyramidingPolicyOverrides:Ib(c)?null:c};break;default:throw Error('Export destination "'+c+'" unknown');}return b},ef=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b=a.selectors||null;null!=b&&t(b)&&(b=b.split(","));b={expression:Oe(a.element),description:Ye(a.description),fileExportOptions:null,assetExportOptions:null,selectors:b,maxErrorMeters:bf(a.maxErrorMeters),requestId:Ye(a.id)};
|
|
var c=Ze(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":var d={gcsDestination:null,driveDestination:null,fileFormat:Td(a.fileFormat)};"GOOGLE_CLOUD_STORAGE"===c?d.gcsDestination=cf(a):d.driveDestination=df(a);b.fileExportOptions=d;break;case "ASSET":b.assetExportOptions={earthEngineDestination:{name:E(a.assetId)}};break;default:throw Error('Export destination "'+c+'" unknown');}return b},hf=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b={expression:Oe(a.element),
|
|
description:Ye(a.description),videoOptions:ff(a),fileExportOptions:null,requestId:Ye(a.id)};b.fileExportOptions=gf(a,Ze(a));return b},kf=function(a){if(null==a.element)throw Error('"element" not found in params '+a);return{expression:Oe(a.element),description:Ye(a.description),tileOptions:jf(a),tileExportOptions:$e(a,"GOOGLE_CLOUD_STORAGE"),requestId:Ye(a.id)}},lf=function(a){if(null==a.element)throw Error('"element" not found in params '+a);return{expression:Oe(a.element),description:Ye(a.description),
|
|
videoOptions:ff(a),tileOptions:jf(a),tileExportOptions:gf(a,"GOOGLE_CLOUD_STORAGE"),requestId:Ye(a.id)}};function Ye(a){return null!=a?String(a):null}function bf(a){return null!=a?Number(a):null}
|
|
var Ze=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");return b},nf=function(a){var b={compress:!!a.tfrecordCompressed,maxSizeBytes:Ye(a.tfrecordMaxFileSize),sequenceData:!!a.tfrecordSequenceData,collapseBands:!!a.tfrecordCollapseBands,maxMaskedRatio:bf(a.tfrecordMaskedThreshold),defaultValue:bf(a.tfrecordDefaultValue),tileDimensions:mf(a.tfrecordFileDimensions),marginDimensions:mf(a.tfrecordKernelSize),
|
|
tensorDepths:null};a=a.tfrecordTensorDepths;if(null!=a)if(w(a)){var c={};zb(a,function(d,e){if(!t(e)||!u(d))throw Error('"tensorDepths" option must be an object of type Object<string, number>');c[e]=d});b.tensorDepths=c}else throw Error('"tensorDepths" option needs to have the form Object<string, number>.');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<this.bc){this.bc--;var a=this.M;this.M=a.next;a.next=null}else a=this.Ne();return a};of.prototype.put=function(a){this.kf(a);this.bc<this.Ye&&(this.bc++,a.next=this.M,this.M=a)};var pf=function(a){p.setTimeout(function(){throw a;},0)},qf,rf=function(){var a=p.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!yb("Presto")&&(a=function(){var e=document.createElement("IFRAME");e.style.display="none";qc(e);document.documentElement.appendChild(e);var f=e.contentWindow;e=f.document;e.open();e.write(pc());e.close();var g="callImmediate"+Math.random(),h="file:"==f.location.protocol?"*":f.location.protocol+"//"+f.location.host;
|
|
e=y(function(k){if(("*"==h||k.origin==h)&&k.data==g)this.port1.onmessage()},this);f.addEventListener("message",e,!1);this.port1={};this.port2={postMessage:function(){f.postMessage(g,h)}}});if("undefined"!==typeof a&&!yb("Trident")&&!yb("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(q(c.next)){c=c.next;var e=c.Cd;c.Cd=null;e()}};return function(e){d.next={Cd:e};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?
|
|
function(e){var f=document.createElement("SCRIPT");f.onreadystatechange=function(){f.onreadystatechange=null;f.parentNode.removeChild(f);f=null;e();e=null};document.documentElement.appendChild(f)}:function(e){p.setTimeout(e,0)}};var sf=function(){this.vc=this.Qa=null},uf=new of(function(){return new tf},function(a){a.reset()});sf.prototype.add=function(a,b){var c=uf.get();c.set(a,b);this.vc?this.vc.next=c:(C(!this.Qa),this.Qa=c);this.vc=c};sf.prototype.remove=function(){var a=null;this.Qa&&(a=this.Qa,this.Qa=this.Qa.next,this.Qa||(this.vc=null),a.next=null);return a};var tf=function(){this.next=this.scope=this.Oc=null};tf.prototype.set=function(a,b){this.Oc=a;this.scope=b;this.next=null};
|
|
tf.prototype.reset=function(){this.next=this.scope=this.Oc=null};var zf=function(a,b){vf||wf();xf||(vf(),xf=!0);yf.add(a,b)},vf,wf=function(){if(p.Promise&&p.Promise.resolve){var a=p.Promise.resolve(void 0);vf=function(){a.then(Af)}}else vf=function(){var b=Af;!x(p.setImmediate)||p.Window&&p.Window.prototype&&!yb("Edge")&&p.Window.prototype.setImmediate==p.setImmediate?(qf||(qf=rf()),qf(b)):p.setImmediate(b)}},xf=!1,yf=new sf,Af=function(){for(var a;a=yf.remove();){try{a.Oc.call(a.scope)}catch(b){pf(b)}uf.put(a)}xf=!1};var Bf=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var Ef=function(a){this.B=0;this.T=void 0;this.Ta=this.na=this.u=null;this.Ub=this.Lc=!1;if(a!=va)try{var b=this;a.call(void 0,function(c){Cf(b,2,c)},function(c){if(!(c instanceof Df))try{if(c instanceof Error)throw c;throw Error("Promise rejected.");}catch(d){}Cf(b,3,c)})}catch(c){Cf(this,3,c)}},Ff=function(){this.next=this.context=this.ab=this.Ka=this.Da=null;this.Lb=!1};Ff.prototype.reset=function(){this.context=this.ab=this.Ka=this.Da=null;this.Lb=!1};
|
|
var Gf=new of(function(){return new Ff},function(a){a.reset()}),Hf=function(a,b,c){var d=Gf.get();d.Ka=a;d.ab=b;d.context=c;return d};Ef.prototype.then=function(a,b,c){null!=a&&Qa(a,"opt_onFulfilled should be a function.");null!=b&&Qa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return If(this,x(a)?a:null,x(b)?b:null,c)};Ef.prototype.$goog_Thenable=!0;
|
|
Ef.prototype.cancel=function(a){0==this.B&&zf(function(){var b=new Df(a);Jf(this,b)},this)};
|
|
var Jf=function(a,b){if(0==a.B)if(a.u){var c=a.u;if(c.na){for(var d=0,e=null,f=null,g=c.na;g&&(g.Lb||(d++,g.Da==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.B&&1==d?Jf(c,b):(f?(d=f,C(c.na),C(null!=d),d.next==c.Ta&&(c.Ta=d),d.next=d.next.next):Kf(c),Lf(c,e,3,b)))}a.u=null}else Cf(a,3,b)},Nf=function(a,b){a.na||2!=a.B&&3!=a.B||Mf(a);C(null!=b.Ka);a.Ta?a.Ta.next=b:a.na=b;a.Ta=b},If=function(a,b,c,d){var e=Hf(null,null,null);e.Da=new Ef(function(f,g){e.Ka=b?function(h){try{var k=b.call(d,h);f(k)}catch(m){g(m)}}:
|
|
f;e.ab=c?function(h){try{var k=c.call(d,h);!q(k)&&h instanceof Df?g(h):f(k)}catch(m){g(m)}}:g});e.Da.u=a;Nf(a,e);return e.Da};Ef.prototype.tf=function(a){C(1==this.B);this.B=0;Cf(this,2,a)};Ef.prototype.uf=function(a){C(1==this.B);this.B=0;Cf(this,3,a)};
|
|
var Cf=function(a,b,c){if(0==a.B){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.B=1;a:{var d=c,e=a.tf,f=a.uf;if(d instanceof Ef){null!=e&&Qa(e,"opt_onFulfilled should be a function.");null!=f&&Qa(f,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");Nf(d,Hf(e||va,f||null,a));var g=!0}else if(Bf(d))d.then(e,f,a),g=!0;else{if(w(d))try{var h=d.then;if(x(h)){Of(d,h,e,f,a);g=!0;break a}}catch(k){f.call(a,k);g=!0;break a}g=!1}}g||
|
|
(a.T=c,a.B=b,a.u=null,Mf(a),3!=b||c instanceof Df||Pf(a,c))}},Of=function(a,b,c,d,e){var f=!1,g=function(k){f||(f=!0,c.call(e,k))},h=function(k){f||(f=!0,d.call(e,k))};try{b.call(a,g,h)}catch(k){h(k)}},Mf=function(a){a.Lc||(a.Lc=!0,zf(a.Qe,a))},Kf=function(a){var b=null;a.na&&(b=a.na,a.na=b.next,b.next=null);a.na||(a.Ta=null);null!=b&&C(null!=b.Ka);return b};Ef.prototype.Qe=function(){for(var a;a=Kf(this);)Lf(this,a,this.B,this.T);this.Lc=!1};
|
|
var Lf=function(a,b,c,d){if(3==c&&b.ab&&!b.Lb)for(;a&&a.Ub;a=a.u)a.Ub=!1;if(b.Da)b.Da.u=null,Qf(b,c,d);else try{b.Lb?b.Ka.call(b.context):Qf(b,c,d)}catch(e){Rf.call(null,e)}Gf.put(b)},Qf=function(a,b,c){2==b?a.Ka.call(a.context,c):a.ab&&a.ab.call(a.context,c)},Pf=function(a,b){a.Ub=!0;zf(function(){a.Ub&&Rf.call(null,b)})},Rf=pf,Df=function(a){Ja.call(this,a)};A(Df,Ja);Df.prototype.name="cancel";var Sf=function(a,b,c){if(x(a))c&&(a=y(a,c));else if(a&&"function"==typeof a.handleEvent)a=y(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:p.setTimeout(a,b||0)};var Tf=function(a,b,c){B.call(this);this.Ze=null!=c?y(a,c):a;this.Ve=b;this.Je=y(this.ff,this);this.Bc=[]};A(Tf,B);l=Tf.prototype;l.hb=!1;l.Db=0;l.Oa=null;l.Xa=function(a){this.Bc=arguments;this.Oa||this.Db?this.hb=!0:Uf(this)};l.stop=function(){this.Oa&&(p.clearTimeout(this.Oa),this.Oa=null,this.hb=!1,this.Bc=[])};l.pause=function(){this.Db++};l.resume=function(){this.Db--;this.Db||!this.hb||this.Oa||(this.hb=!1,Uf(this))};l.j=function(){Tf.h.j.call(this);this.stop()};
|
|
l.ff=function(){this.Oa=null;this.hb&&!this.Db&&(this.hb=!1,Uf(this))};var Uf=function(a){a.Oa=Sf(a.Je,a.Ve);a.Ze.apply(null,a.Bc)};var Vf=!zc||9<=Number(Kc),Wf=!Bc&&!zc||zc&&9<=Number(Kc)||Bc&&Jc("1.9.1");var Yf=function(a,b){zb(b,function(c,d){c&&"object"==typeof c&&c.Ia&&(c=c.Ga());"style"==d?a.style.cssText=c:"class"==d?a.className=c:"for"==d?a.htmlFor=c:Xf.hasOwnProperty(d)?a.setAttribute(Xf[d],c):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,c):a[d]=c})},Xf={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",
|
|
width:"width"},$f=function(a,b,c){return Zf(document,arguments)},Zf=function(a,b){var c=String(b[0]),d=b[1];if(!Vf&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',tc(d.name),'"');if(d.type){c.push(' type="',tc(d.type),'"');var e={};Nb(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(t(d)?c.className=d:v(d)?c.className=d.join(" "):Yf(c,d));2<b.length&&ag(a,c,b,2);return c},ag=function(a,b,c,d){function e(g){g&&b.appendChild(t(g)?a.createTextNode(g):g)}for(;d<c.length;d++){var f=
|
|
c[d];!ya(f)||w(f)&&0<f.nodeType?e(f):Ua(bg(f)?gb(f):f,e)}},cg=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null},dg=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},eg=function(a){C(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},bg=function(a){if(a&&"number"==typeof a.length){if(w(a))return"function"==typeof a.item||"string"==typeof a.item;if(x(a))return"function"==typeof a.item}return!1},fg=function(a){this.Pb=a||p.document||
|
|
document};l=fg.prototype;l.getElementsByTagName=function(a,b){return(b||this.Pb).getElementsByTagName(String(a))};l.Me=function(a,b,c){return Zf(this.Pb,arguments)};l.createElement=function(a){return this.Pb.createElement(String(a))};l.createTextNode=function(a){return this.Pb.createTextNode(String(a))};l.appendChild=function(a,b){C(null!=a&&null!=b,"goog.dom.appendChild expects non-null arguments");a.appendChild(b)};l.append=function(a,b){ag(eg(a),a,arguments,1)};
|
|
l.canHaveChildren=function(a){if(1!=a.nodeType)return!1;switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};l.removeNode=cg;
|
|
l.Rd=function(){return Wf&&void 0!=(void 0).children?(void 0).children:Va((void 0).childNodes,function(a){return 1==a.nodeType})};l.contains=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};/*
|
|
Portions of this code are from MochiKit, received by
|
|
The Closure Authors under the MIT license. All other code is Copyright
|
|
2005-2009 The Closure Authors. All Rights Reserved.
|
|
*/
|
|
var hg=function(a){var b=gg;this.kc=[];this.de=b;this.Hd=a||null;this.ub=this.Ya=!1;this.T=void 0;this.ld=this.xd=this.Cc=!1;this.rc=0;this.u=null;this.Dc=0};hg.prototype.cancel=function(a){if(this.Ya)this.T instanceof hg&&this.T.cancel();else{if(this.u){var b=this.u;delete this.u;a?b.cancel(a):(b.Dc--,0>=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<k&&(h=window.setTimeout(function(){tg(e,!0);ig(g,new ug(1,"Timeout reached for loading script "+d))},k),f.Hb=h);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(tg(e,b.Cf||!1,h),g.callback(null))};e.onerror=function(){tg(e,!0,h);ig(g,new ug(0,"Error while loading script "+
|
|
d))};f=b.attributes||{};Nb(f,{type:"text/javascript",charset:"UTF-8"});Yf(e,f);rc(e,a);vg(c).appendChild(e)},vg=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!=b.length?b[0]:a.documentElement},gg=function(){if(this&&this.qe){var a=this.qe;a&&"SCRIPT"==a.tagName&&tg(a,!0,this.Hb)}},tg=function(a,b,c){null!=c&&p.clearTimeout(c);a.onload=va;a.onerror=va;a.onreadystatechange=va;b&&window.setTimeout(function(){cg(a)},0)},ug=function(a,b){var c="Jsloader error (code #"+a+")";
|
|
b&&(c+=": "+b);Ja.call(this,c);this.code=a};A(ug,Ja);var xg=function(a,b,c){this.reset(a,b,c,void 0,void 0)};xg.prototype.Kd=null;var yg=0;xg.prototype.reset=function(a,b,c,d,e){"number"==typeof e||yg++;d||Ga();this.yb=a;delete this.Kd};xg.prototype.se=function(a){this.yb=a};var zg=function(a){this.ce=a;this.Ud=this.Ec=this.yb=this.u=null},Ag=function(a,b){this.name=a;this.value=b};Ag.prototype.toString=function(){return this.name};var Bg=new Ag("SEVERE",1E3),Cg=new Ag("INFO",800),Dg=new Ag("CONFIG",700),Eg=new Ag("FINE",500);zg.prototype.getName=function(){return this.ce};zg.prototype.getParent=function(){return this.u};zg.prototype.Rd=function(){this.Ec||(this.Ec={});return this.Ec};zg.prototype.se=function(a){this.yb=a};
|
|
var Fg=function(a){if(a.yb)return a.yb;if(a.u)return Fg(a.u);Na("Root logger has no level set.");return null};zg.prototype.log=function(a,b,c){if(a.value>=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;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.Vd=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Vd};Og.re(new Pg);var Qg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,Rg=function(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e=null;if(0<=d){var f=a[c].substring(0,d);e=a[c].substring(d+1)}else f=a[c];b(f,e?decodeURIComponent(e.replace(/\+/g," ")):"")}}};var F=function(a){D.call(this);this.headers=new ud;this.xc=a||null;this.Y=!1;this.wc=this.a=null;this.xb=this.$d=this.Zb="";this.Ja=this.Vc=this.Xb=this.Kc=!1;this.ib=0;this.nc=null;this.gb="";this.tc=this.hf=this.xe=!1};A(F,D);var Sg=F.prototype,Tg=Ig("goog.net.XhrIo");Sg.N=Tg;var Ug=/^https?$/i,Vg=["POST","PUT"],Wg=[];F.prototype.Le=function(){this.ea();eb(Wg,this)};
|
|
F.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Zb+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Zb=a;this.xb="";this.$d=b;this.Kc=!1;this.Y=!0;this.a=this.xc?this.xc.Gc():Og();this.wc=this.xc?this.xc.tb():Og.tb();this.a.onreadystatechange=y(this.he,this);this.hf&&"onprogress"in this.a&&(this.a.onprogress=y(function(f){this.ge(f,!0)},this),this.a.upload&&(this.a.upload.onprogress=y(this.ge,this)));try{Jg(this.N,Xg(this,"Opening Xhr")),
|
|
this.Vc=!0,this.a.open(b,String(a),!0),this.Vc=!1}catch(f){Jg(this.N,Xg(this,"Error opening Xhr: "+f.message));this.Rb(5,f);return}a=c||"";var e=this.headers.clone();d&&Bd(d,function(f,g){e.set(g,f)});d=ab(e.ba());c=p.FormData&&a instanceof p.FormData;!bb(Vg,b)||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(f,g){this.a.setRequestHeader(g,f)},this);this.gb&&(this.a.responseType=this.gb);"withCredentials"in this.a&&this.a.withCredentials!==this.xe&&
|
|
(this.a.withCredentials=this.xe);try{Yg(this),0<this.ib&&(this.tc=Zg(this.a),Jg(this.N,Xg(this,"Will abort after "+this.ib+"ms if incomplete, xhr2 "+this.tc)),this.tc?(this.a.timeout=this.ib,this.a.ontimeout=y(this.Hb,this)):this.nc=Sf(this.Hb,this.ib,this)),Jg(this.N,Xg(this,"Sending request")),this.Xb=!0,this.a.send(a),this.Xb=!1}catch(f){Jg(this.N,Xg(this,"Send error: "+f.message)),this.Rb(5,f)}};
|
|
var Zg=function(a){return zc&&Jc(9)&&u(a.timeout)&&q(a.ontimeout)},$a=function(a){return"content-type"==a.toLowerCase()};F.prototype.Hb=function(){"undefined"!=typeof qa&&this.a&&(this.xb="Timed out after "+this.ib+"ms, aborting",Jg(this.N,Xg(this,this.xb)),this.dispatchEvent("timeout"),this.abort(8))};F.prototype.Rb=function(a,b){this.Y=!1;this.a&&(this.Ja=!0,this.a.abort(),this.Ja=!1);this.xb=b;$g(this);ah(this)};var $g=function(a){a.Kc||(a.Kc=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
F.prototype.abort=function(){this.a&&this.Y&&(Jg(this.N,Xg(this,"Aborting")),this.Y=!1,this.Ja=!0,this.a.abort(),this.Ja=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ah(this))};F.prototype.j=function(){this.a&&(this.Y&&(this.Y=!1,this.Ja=!0,this.a.abort(),this.Ja=!1),ah(this,!0));F.h.j.call(this)};F.prototype.he=function(){this.fa||(this.Vc||this.Xb||this.Ja?bh(this):this.ef())};F.prototype.ef=function(){bh(this)};
|
|
var bh=function(a){if(a.Y&&"undefined"!=typeof qa)if(a.wc[1]&&4==a.xa()&&2==a.getStatus())Jg(a.N,Xg(a,"Local request error detected and ignored"));else if(a.Xb&&4==a.xa())Sf(a.he,0,a);else if(a.dispatchEvent("readystatechange"),4==a.xa()){Jg(a.N,Xg(a,"Request complete"));a.Y=!1;try{var b=a.getStatus(),c;if(!(c=Kg(b))){var d;if(d=0===b){var e=String(a.Zb).match(Qg)[1]||null;if(!e&&p.self&&p.self.location){var f=p.self.location.protocol;e=f.substr(0,f.length-1)}d=!Ug.test(e?e.toLowerCase():"")}c=d}if(c)a.dispatchEvent("complete"),
|
|
a.dispatchEvent("success");else{try{var g=2<a.xa()?a.a.statusText:""}catch(h){Jg(a.N,"Can not get status: "+h.message),g=""}a.xb=g+" ["+a.getStatus()+"]";$g(a)}}finally{ah(a)}}};F.prototype.ge=function(a,b){C("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(ch(a,"progress"));this.dispatchEvent(ch(a,b?"downloadprogress":"uploadprogress"))};
|
|
var ch=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},ah=function(a,b){if(a.a){Yg(a);var c=a.a,d=a.wc[0]?va:null;a.a=null;a.wc=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(a=a.N)&&a.log(Bg,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},Yg=function(a){a.a&&a.tc&&(a.a.ontimeout=null);a.nc&&(p.clearTimeout(a.nc),a.nc=null)};F.prototype.Xd=function(){return!!this.a};
|
|
F.prototype.xa=function(){return this.a?this.a.readyState:0};F.prototype.getStatus=function(){try{return 2<this.xa()?this.a.status:-1}catch(a){return-1}};
|
|
var dh=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.gb){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.N;b&&b.log(Bg,"Response type "+a.gb+" is not supported on this browser",void 0);return null}catch(c){return Jg(a.N,"Can not get response: "+c.message),null}};
|
|
F.prototype.getResponseHeader=function(a){if(this.a&&4==this.xa())return a=this.a.getResponseHeader(a),null===a?void 0:a};F.prototype.getAllResponseHeaders=function(){return this.a&&4==this.xa()?this.a.getAllResponseHeaders()||"":""};
|
|
var eh=function(a){var b={};a=a.getAllResponseHeaders().split("\r\n");for(var c=0;c<a.length;c++)if(!/^[\s\xa0]*$/.test(a[c])){var d=uc(a[c]),e=d[0];d=d[1];if(t(d)){d=d.trim();var f=b[e]||[];b[e]=f;f.push(d)}}return Bb(b,function(g){return g.join(", ")})},Xg=function(a,b){return b+" ["+a.$d+" "+a.Zb+" "+a.getStatus()+"]"};var fh=function(a,b){this.oa=this.Pa=this.za="";this.cb=null;this.Ea=this.ra="";this.V=this.We=!1;if(a instanceof fh){this.V=q(b)?b:a.V;gh(this,a.za);var c=a.Pa;hh(this);this.Pa=c;c=a.oa;hh(this);this.oa=c;ih(this,a.cb);this.setPath(a.getPath());jh(this,a.X.clone());a=a.Ea;hh(this);this.Ea=a}else a&&(c=String(a).match(Qg))?(this.V=!!b,gh(this,c[1]||"",!0),a=c[2]||"",hh(this),this.Pa=kh(a),a=c[3]||"",hh(this),this.oa=kh(a,!0),ih(this,c[4]),this.setPath(c[5]||"",!0),jh(this,c[6]||"",!0),a=c[7]||"",
|
|
hh(this),this.Ea=kh(a)):(this.V=!!b,this.X=new lh(null,this.V))};
|
|
fh.prototype.toString=function(){var a=[],b=this.za;b&&a.push(mh(b,nh,!0),":");var c=this.oa;if(c||"file"==b)a.push("//"),(b=this.Pa)&&a.push(mh(b,nh,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.cb,null!=c&&a.push(":",String(c));if(c=this.getPath())this.oa&&"/"!=c.charAt(0)&&a.push("/"),a.push(mh(c,"/"==c.charAt(0)?oh:ph,!0));(c=this.X.toString())&&a.push("?",c);(c=this.Ea)&&a.push("#",mh(c,qh));return a.join("")};
|
|
fh.prototype.resolve=function(a){var b=this.clone(),c=!!a.za;c?gh(b,a.za):c=!!a.Pa;if(c){var d=a.Pa;hh(b);b.Pa=d}else c=!!a.oa;c?(d=a.oa,hh(b),b.oa=d):c=null!=a.cb;d=a.getPath();if(c)ih(b,a.cb);else if(c=!!a.ra){if("/"!=d.charAt(0))if(this.oa&&!this.ra)d="/"+d;else{var e=b.getPath().lastIndexOf("/");-1!=e&&(d=b.getPath().substr(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){d=0==e.lastIndexOf("/",0);e=e.split("/");for(var f=[],g=0;g<e.length;){var h=e[g++];
|
|
"."==h?d&&g==e.length&&f.push(""):".."==h?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(h),d=!0)}d=f.join("/")}else d=e}c?b.setPath(d):c=""!==a.X.toString();c?jh(b,a.X.clone()):c=!!a.Ea;c&&(a=a.Ea,hh(b),b.Ea=a);return b};fh.prototype.clone=function(){return new fh(this)};var gh=function(a,b,c){hh(a);a.za=c?kh(b,!0):b;a.za&&(a.za=a.za.replace(/:$/,""))},ih=function(a,b){hh(a);if(b){b=Number(b);if(isNaN(b)||0>b)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<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};
|
|
l.w=function(a){uh(this);var b=[];if(t(a))this.wa(a)&&(b=fb(b,this.s.get(vh(this,a))));else{a=this.s.w();for(var c=0;c<a.length;c++)b=fb(b,a[c])}return b};l.set=function(a,b){uh(this);this.R=null;a=vh(this,a);this.wa(a)&&(this.m=Oa(this.m)-this.s.get(a).length);this.s.set(a,[b]);this.m=Oa(this.m)+1;return this};l.get=function(a,b){if(!a)return b;a=this.w(a);return 0<a.length?String(a[0]):b};
|
|
l.setValues=function(a,b){this.remove(a);0<b.length&&(this.R=null,this.s.set(vh(this,a),gb(b)),this.m=Oa(this.m)+b.length)};l.toString=function(){if(this.R)return this.R;if(!this.s)return"";for(var a=[],b=this.s.ba(),c=0;c<b.length;c++){var d=b[c],e=encodeURIComponent(String(d));d=this.w(d);for(var f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}}return this.R=a.join("&")};
|
|
l.clone=function(){var a=new lh;a.R=this.R;this.s&&(a.s=this.s.clone(),a.m=this.m);return a};var vh=function(a,b){b=String(b);a.V&&(b=b.toLowerCase());return b};lh.prototype.kd=function(a){a&&!this.V&&(uh(this),this.R=null,this.s.forEach(function(b,c){var d=c.toLowerCase();c!=d&&(this.remove(c),this.setValues(d,b))},this));this.V=a};lh.prototype.extend=function(a){for(var b=0;b<arguments.length;b++)Bd(arguments[b],function(c,d){this.add(d,c)},this)};var wh,Dh=function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(hb(f,d),jb(f));xh=a;yh=f;null===a?zh=null:Ah(function(){Bh(b,c,e||Ea(Ch,b,c))})};z("ee.data.authenticateViaOauth",Dh);var Eh=function(a,b,c,d,e){Dh(a,b,c,d,e)};z("ee.data.authenticate",Eh);var Ch=function(a,b){p.gapi.auth.authorize({client_id:xh,immediate:!1,scope:yh.join(" ")},Ea(Fh,a,b))};z("ee.data.authenticateViaPopup",Ch);
|
|
var Hh=function(a,b,c,d){if("window"in p)throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead.");var e=["https://www.googleapis.com/auth/earthengine","https://www.googleapis.com/auth/devstorage.read_write"];d&&(hb(e,d),jb(e));xh=a.client_email;yh=e;var f=new googleapis.auth.JWT(a.client_email,null,a.private_key,e,null);Gh=function(g,h){f.authorize(function(k,m){k?h({error:k}):h({access_token:m.access_token,token_type:m.token_type,expires_in:(m.expiry_date-
|
|
Date.now())/1E3})})};Bh(b,c)};z("ee.data.authenticateViaPrivateKey",Hh);var Ih=[],Kh=function(a){Jh=a};z("ee.data.setApiKey",Kh);Ih.push("setApiKey");var Lh=function(a){wh=a};z("ee.data.setProject",Lh);Ih.push("setProject");Ih.push("getProject");var Mh=function(){return"projects/"+wh},Nh=function(a){if(a&&!ua("gapi"))throw Error('Cloud API requires <script src="https://apis.google.com/js/api.js">');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||5<h)break;++h}return ei(k.status,function(m){try{return k.getResponseHeader(m)}catch(r){return null}},k.responseText,f,void 0,b||Pb)},di=function(a){var b=function(d){return w(d)&&w(d.headers)},c=[];Object.values(a).filter(w).forEach(function(d){hb(c,Object.values(d).filter(b))});if(1===c.length)return c[0].headers;console.error("NO HEADERS:",a);throw Error("Incompatible GAPI version: cannot find headers");
|
|
},gi=function(a){if(XMLHttpRequest.prototype.yc)throw Error("Cannot initialize synchronous request mode");var b=function(){this.ka=new this.yc;XMLHttpRequest.Xe=this.ka};b.prototype.open=function(c,d,e,f,g){this.ka.open(c,d,!1,f,g)};b.prototype.send=function(c){this.ka.send(c)};b.prototype.abort=function(){this.ka.abort()};b.prototype.overrideMimeType=function(c){this.ka.overrideMimeType(c)};b.prototype.setRequestHeader=function(c,d){this.ka.setRequestHeader(c,d)};b.prototype.getResponseHeader=function(c){return this.ka.getResponseHeader(c)};
|
|
b.prototype.getAllResponseHeaders=function(){return this.ka.getAllResponseHeaders()};"onabort onerror onload onloadstart onloadend onprogress onreadystatechange readyState responseText responseType responseXML status statusText upload withCredentials DONE UNSENT HEADERS_RECEIVED LOADING OPENED".split(" ").forEach(function(c){return Object.defineProperty(b.prototype,c,{get:function(){return this.ka[c]},set:function(d){this.ka[c]=d}})});b.prototype.yc=XMLHttpRequest;XMLHttpRequest=b;try{return a(),
|
|
XMLHttpRequest.Xe}finally{XMLHttpRequest=XMLHttpRequest.prototype.yc}},ii=function(a){hi=a};z("ee.data.setDeadline",ii);var ki=function(a){ji=a||Pb};z("ee.data.setParamAugmenter",ki);var mi=function(a){li=a||Pb};z("ee.data.setExpressionAugmenter",mi);var ni=function(){return Wh};z("ee.data.getApiBaseUrl",ni);var oi=function(){return Yh};z("ee.data.getTileBaseUrl",oi);var pi=function(){return Zh};z("ee.data.getXsrfToken",pi);
|
|
var qi=function(a){if(G){var b={prettyPrint:!1,project:Mh()};return H(function(){return gapi.client.earthengine.projects.algorithms.list(b)},Zd,a)}var c=I("/algorithms",null,a,"GET");return a?null:c},si=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.");var c={name:null,expression:li(Oe(a.image)),fileFormat:Sd(a.format),bandIds:Vd(a.bands),visualizationOptions:Yd(a)},d=Mh(),e=["name"];return H(function(){return gapi.client.earthengine.projects.maps.create({parent:d,
|
|
Sb:e},c)},function(g){return ri(g.name,"","/v1alpha/{}/tiles",Jh?"?key="+Jh:"")},b)}a=Kb(a);t(a.image)||(a.image=a.image.D());var f=function(g){return ri(g.mapid,g.token,"/map/{}","?token={}")};return b?(I("/mapid",J(a),function(g,h){return b(g&&f(g),h)}),null):f(I("/mapid",J(a)))};z("ee.data.getMapId",si);var ti=function(a,b,c,d){return a.formatTileUrl(b,c,d)};z("ee.data.getTileUrl",ti);
|
|
var ri=function(a,b,c,d){c=Yh+c.replace("{}",a);d=d.replace("{}",b);return{mapid:a,token:b,formatTileUrl:function(e,f,g){var h=Math.pow(2,g);e%=h;0>e&&(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||5<Q)break;Q++}return ei(r.status,function(K){try{return r.getResponseHeader(K)}catch(pa){return null}},r.responseText,e)},oj=function(a,b,c,d,e){var f=0,g={url:a,method:c,content:d,headers:e},h=ci;g.callback=function(k){k=k.target;if(429==k.getStatus()&&10>f)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++<c?setTimeout(function(){rj().then(function(){a().then(e(f,g),g)});sj.Xa()},Math.min(12E4,1E3*Math.pow(2,d))):f(h)}};return function(f,g){rj().then(function(){a().then(e(f,
|
|
g),g)});sj.Xa()}},ei=function(a,b,c,d,e,f){f=void 0===f?function(r){return r.data}:f;var g=b("X-Earth-Engine-Computation-Profile");g&&d&&d(g);b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==b||"text/json"==b)try{var h=JSON.parse(c);var k=f(h)}catch(r){var m="Invalid JSON: "+c}else m="Response was unexpectedly not JSON, but "+b;if(w(h))"error"in h&&"message"in h.error?m=h.error.message:void 0===k&&(m="Malformed response: "+c);else if(0===a)m="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";
|
|
else if(200>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<c.length;f++){var g=c[f].name;if(g in b&&q(b[g]))d[g]=Cj(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+g+") missing to function: "+a);e[g]=!0}c=[];for(var h in b)e[h]||c.push(h);if(0<c.length)throw Error("Unrecognized arguments ("+
|
|
c+") to function: "+a);return d},Dj=function(a,b){var c=a.G().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);a={};for(var d=0;d<b.length;d++)a[c[d].name]=b[d];return a};
|
|
M.prototype.toString=function(a,b){var c=this.G(),d=[];d.push(a||c.name);d.push("(");d.push(Wa(c.args.slice(b?1:0),function(f){return f.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length)for(d.push("\nArgs:\n"),a=0;a<c.args.length;a++){b&&0==a?d.push(" this:"):d.push("\n ");var e=c.args[a];d.push(e.name);d.push(" (");d.push(e.type);e.optional&&d.push(", optional");d.push("): ");e.description?d.push(e.description):
|
|
d.push("Undocumented.")}return d.join("")};M.prototype.D=function(){return Je(this)};var N=function(a,b){if(!q(b))return Gj(a);if(!(this instanceof N))return tj(N,arguments);this.ja=Lb(b);this.ja.name=a};A(N,M);z("ee.ApiFunction",N);var O=function(a,b){return M.prototype.call.apply(Gj(a),Array.prototype.slice.call(arguments,1))};z("ee.ApiFunction._call",O);var Hj=function(a,b){return Gj(a).apply(b)};z("ee.ApiFunction._apply",Hj);N.prototype.encode=function(){return this.ja.name};N.prototype.Jc=function(a,b){return Pd(this.ja.name,b)};N.prototype.G=function(){return this.ja};
|
|
var Ij=null,Jj={},Lj=function(){Kj();return Bb(Ij,function(a){return a.G()})},Mj=function(){Kj();return Ab(Ij,function(a,b){return!Jj[b]})},Gj=function(a){var b=Nj(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};z("ee.ApiFunction.lookup",Gj);
|
|
var Nj=function(a){Kj();return Ij[a]||null},Kj=function(a,b){if(Ij)a&&a();else{var c=function(d,e){e?b&&b(Error(e)):(Ij=Bb(d,function(f,g){f.returns=f.returns.replace(/<.*>/,"");for(var h=0;h<f.args.length;h++)f.args[h].type=f.args[h].type.replace(/<.*>/,"");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(1<b.length||!g){if(b.length>d.length)throw Error("Received too many arguments"+a+". Expected at most "+d.length+" but got "+b.length+".");for(f=0;f<b.length;f++)e[d[f]]=b[f]}else{g=new Dd(Eb(f));var h=new Dd(d);if(Fd(h,g).isEmpty())e[d[0]]=b[0];else{b=
|
|
Gd(g,h);if(!b.isEmpty())throw Error("Unexpected arguments"+a+": "+b.w().join(", "));e=Kb(f)}}b=new Dd(Eb(e));c=Gd(new Dd(Va(c,function(k){return 0!=k.lastIndexOf("opt_",0)})),b);if(!c.isEmpty())throw Error("Missing required arguments"+a+": "+c.w().join(", "));return e},Qj=function(a){var b=Rj,c=[];p.EXPORTED_FN_INFO?(a=p.EXPORTED_FN_INFO[a.toString()],w(a)||Sj(),c=a.paramNames,v(c)||Sj()):(a=a.toString().replace(Tj,"").match(b),null===a&&Sj(),c=(a[1].split(",")||[]).map(function(d){return d.replace(Uj,
|
|
"")}));return c},Sj=function(){throw Error("Failed to locate function parameters.");},Tj=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,Rj=/^function[^\(]*\(([^\)]*)\)/m,Uj=/=.*$/;var R=function(a,b,c){L.call(this,a,b,c);Vj()};A(R,L);z("ee.Element",R);var Wj=!1,Vj=function(){Wj||(Oj(R,"Element","Element"),Wj=!0)};R.prototype.name=function(){return"Element"};
|
|
R.prototype.set=function(a){var b;if(1>=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;f<e;f++)if(b[f]!==d[f]){b=!1;break a}b=!0}else b=!1}b&&w(c.properties)&&(c=c.properties);if(Aj(c)){b=this;for(var g in c)d=c[g],b=O("Element.set",b,g,d)}else if(c instanceof L&&Nj("Element.setMulti"))b=O("Element.setMulti",this,c);else throw Error("When Element.set() is passed one argument, it must be a dictionary.");}else{if(0!=
|
|
arguments.length%2)throw Error("When Element.set() is passed multiple arguments, there must be an even number of them.");b=this;for(c=0;c<arguments.length;c+=2)g=arguments[c],d=arguments[c+1],b=O("Element.set",b,g,d)}return uj(this,b)};R.prototype.set=R.prototype.set;var S=function(a,b,c,d){if(!(this instanceof S))return tj(S,arguments);if(!("type"in a)){var e=P(S,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}Xj();e=null!=b||null!=c||null!=d;if(a instanceof L&&!(a instanceof S&&a.ta)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");L.call(this,a.i,a.args,a.A)}else{a instanceof S&&(a=a.encode());if(!Yj(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));L.call(this,
|
|
null,null);this.ta=a.type;this.Ed=null!=a.coordinates?Lb(a.coordinates):null;this.Qd=a.geometries||null;if(null!=b)this.La=b;else if("crs"in a)if(w(a.crs)&&"name"==a.crs.type&&w(a.crs.properties)&&t(a.crs.properties.name))this.La=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new ye).D(a.crs));this.Za=c;!q(this.Za)&&"geodesic"in a&&(this.Za=!!a.geodesic);this.Wa=d;!q(this.Wa)&&"evenOdd"in a&&(this.Wa=!!a.evenOdd)}};A(S,L);z("ee.Geometry",S);
|
|
var Zj=!1,Xj=function(){Zj||(Oj(S,"Geometry","Geometry"),Zj=!0)},ak=function(a,b){if(!(this instanceof ak))return bk(ak,arguments);var c=ck(ak,"Point",1,arguments);if(!(c instanceof L)){var d=c.coordinates;if(!v(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}S.call(this,c)};A(ak,S);S.Point=ak;var dk=function(a,b){if(!(this instanceof dk))return bk(dk,arguments);S.call(this,ck(dk,"MultiPoint",2,arguments))};A(dk,S);S.MultiPoint=dk;
|
|
var ek=function(a,b,c,d){if(!(this instanceof ek))return bk(ek,arguments);var e=ck(ek,"Rectangle",2,arguments);if(!(e instanceof L)){var f=e.coordinates;if(2!=f.length)throw Error("The Geometry.Rectangle constructor requires 2 points or 4 coordinates.");var g=f[0][0],h=f[0][1],k=f[1][0];f=f[1][1];e.coordinates=[[[g,f],[g,h],[k,h],[k,f]]];e.type="Polygon"}S.call(this,e)};A(ek,S);S.Rectangle=ek;
|
|
var fk=function(a,b,c,d){if(!(this instanceof fk))return bk(fk,arguments);S.call(this,ck(fk,"LineString",2,arguments))};A(fk,S);S.LineString=fk;var gk=function(a,b,c,d){if(!(this instanceof gk))return bk(gk,arguments);S.call(this,ck(gk,"LinearRing",2,arguments))};A(gk,S);S.LinearRing=gk;var hk=function(a,b,c,d){if(!(this instanceof hk))return bk(hk,arguments);S.call(this,ck(hk,"MultiLineString",3,arguments))};A(hk,S);S.MultiLineString=hk;
|
|
var ik=function(a,b,c,d,e){if(!(this instanceof ik))return bk(ik,arguments);S.call(this,ck(ik,"Polygon",3,arguments))};A(ik,S);S.Polygon=ik;var jk=function(a,b,c,d,e){if(!(this instanceof jk))return bk(jk,arguments);S.call(this,ck(jk,"MultiPolygon",4,arguments))};A(jk,S);S.MultiPolygon=jk;
|
|
S.prototype.encode=function(a){if(!this.ta){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return L.prototype.encode.call(this,a)}a={type:this.ta};"GeometryCollection"==this.ta?a.geometries=this.Qd:a.coordinates=this.Ed;null!=this.La&&(a.crs={type:"name",properties:{name:this.La}});null!=this.Za&&(a.geodesic=this.Za);null!=this.Wa&&(a.evenOdd=this.Wa);return a};
|
|
S.prototype.oc=function(){if(this.i)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};S.prototype.toGeoJSON=S.prototype.oc;S.prototype.sd=function(){if(this.i)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new ye).D(this.oc())};S.prototype.toGeoJSONString=S.prototype.sd;S.prototype.D=function(){return Je(this)};S.prototype.serialize=S.prototype.D;
|
|
S.prototype.toString=function(){return"ee.Geometry("+this.sd()+")"};
|
|
S.prototype.P=function(a){if(!this.ta){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return L.prototype.P.call(this,a)}var b={},c="";"GeometryCollection"===this.ta?(b.geometries=this.Qd.map(function(e){return new S(e)}),c="GeometryConstructors.MultiGeometry"):(b.coordinates=this.Ed,c="GeometryConstructors."+this.ta);null!=this.La&&(b.crs=t(this.La)?(new N("Projection")).call(this.La):this.La);var d="Point"!==this.ta&&"MultiPoint"!==this.ta;null!=this.Za&&
|
|
d&&(b.geodesic=this.Za);null!=this.Wa&&(b.evenOdd=this.Wa);return(new N(c)).apply(b).P(a)};
|
|
var Yj=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!v(b))return!1;for(a=0;a<b.length;a++)if(!Yj(b[a]))return!1;return!0}a=a.coordinates;var c=kk(a);return"Point"==b&&1==c||"MultiPoint"==b&&(2==c||0==a.length)||"LineString"==b&&2==c||"LinearRing"==b&&2==c||"MultiLineString"==b&&(3==c||0==a.length)||"Polygon"==b&&3==c||"MultiPolygon"==b&&(4==c||0==a.length)},kk=function(a){if(!v(a))return-1;if(v(a[0])){for(var b=kk(a[0]),c=1;c<a.length;c++)if(kk(a[c])!=b)return-1;return b+
|
|
1}for(c=0;c<a.length;c++)if(!u(a[c]))return-1;return 0==a.length%2?1:-1},ck=function(a,b,c,d){Ya(d,yj)?a={coordinates:gb(d)}:(a=P(a,d),a.coordinates=a.coords,delete a.coords,a.crs=a.proj,delete a.proj,a=Ab(a,xa));if(lk(a.coordinates)||null!=a.crs||null!=a.maxError)return(new N("GeometryConstructors."+b)).apply(a);a.type=b;d=a.coordinates;if(1>c||4<c)throw Error("Unexpected nesting level.");if(Ya(d,u)&&u(d[0])&&2!=d.length){if(0!=d.length%2)throw Error("Invalid number of coordinates: "+d.length);for(var e=
|
|
[],f=0;f<d.length;f+=2)e.push([d[f],d[f+1]]);d=e}e=d;for(f=0;v(e);)e=e[0],f++;for(;f<c;)d=[d],f++;if(kk(d)!=c)throw Error("Invalid geometry");for(e=d;v(e)&&1==e.length;)e=e[0];c=v(e)&&0==e.length?[]:d;a.coordinates=c;(b=bb(["Polygon","Rectangle","MultiPolygon"],b))&&null==a.evenOdd&&(a.evenOdd=!0);if(b&&!1===a.geodesic&&!1===a.evenOdd)throw Error("Planar interiors must be even/odd.");return a},lk=function(a){return v(a)?Xa(a,lk):a instanceof L},bk=function(a,b){var c=function(){};c.prototype=a.prototype;
|
|
c=new c;a=a.apply(c,b);return void 0!==a?a:c};S.prototype.name=function(){return"Geometry"};var T=function(a){if(!(this instanceof T))return tj(T,arguments);if(a instanceof T)return a;mk();if(v(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new T(a[0]);L.call(this,new N("Filter.and"),{filters:a})}else if(a instanceof L)L.call(this,a.i,a.args,a.A);else{if(q(a))throw Error("Invalid argument specified for ee.Filter(): "+a);L.call(this,null,null)}};A(T,L);z("ee.Filter",T);
|
|
var nk=!1,mk=function(){nk||(Oj(T,"Filter","Filter"),nk=!0)},ok={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};T.prototype.$a=function(){return O("Filter.not",this)};T.prototype.not=T.prototype.$a;var pk=function(a,b){var c=P(pk,arguments);return O("Filter.equals",c.name,c.value)};T.eq=pk;var qk=function(a,b){var c=P(qk,arguments);return pk(c.name,c.value).$a()};T.neq=qk;
|
|
var rk=function(a,b){var c=P(rk,arguments);return O("Filter.lessThan",c.name,c.value)};T.lt=rk;var sk=function(a,b){var c=P(sk,arguments);return rk(c.name,c.value).$a()};T.gte=sk;var tk=function(a,b){var c=P(tk,arguments);return O("Filter.greaterThan",c.name,c.value)};T.gt=tk;var uk=function(a,b){var c=P(uk,arguments);return tk(c.name,c.value).$a()};T.lte=uk;var vk=function(a){return O("Filter.and",Array.prototype.slice.call(arguments))};T.and=vk;var wk=function(a){return O("Filter.or",Array.prototype.slice.call(arguments))};
|
|
T.or=wk;var xk=function(a,b){var c=P(xk,arguments);c=O("DateRange",c.start,c.end);return Hj("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};T.date=xk;var yk=function(a,b,c,d){var e=P(yk,arguments);return Hj("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};T.inList=yk;var zk=function(a,b){return Hj("Filter.intersects",{leftField:".all",rightValue:O("Feature",a),maxError:b})};T.bounds=zk;
|
|
T.prototype.name=function(){return"Filter"};var Ak=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in ok))throw Error("Unknown filtering operator: "+b);a=O("Filter."+ok[b],a,c);return d?a.$a():a};T.metadata=Ak;var U=function(a,b,c){R.call(this,a,b,c);Bk()};A(U,R);z("ee.Collection",U);var Ck=!1,Bk=function(){Ck||(Oj(U,"Collection","Collection"),Oj(U,"AggregateFeatureCollection","Collection","aggregate_"),Ck=!0)};U.prototype.filter=function(a){a=P(U.prototype.filter,arguments).filter;if(!a)throw Error("Empty filters.");return uj(this,O("Collection.filter",this,a))};U.prototype.filter=U.prototype.filter;
|
|
U.prototype.Nc=function(a,b,c){var d=P(U.prototype.Nc,arguments);return this.filter(Ak(d.name,d.operator,d.value))};U.prototype.filterMetadata=U.prototype.Nc;U.prototype.Md=function(a){return this.filter(zk(a))};U.prototype.filterBounds=U.prototype.Md;U.prototype.Mc=function(a,b){var c=P(U.prototype.Mc,arguments);return this.filter(xk(c.start,c.end))};U.prototype.filterDate=U.prototype.Mc;
|
|
U.prototype.limit=function(a,b,c){var d=P(U.prototype.limit,arguments);return uj(this,O("Collection.limit",this,d.max,d.property,d.ascending))};U.prototype.limit=U.prototype.limit;U.prototype.sort=function(a,b){var c=P(U.prototype.sort,arguments);return uj(this,O("Collection.limit",this,void 0,c.property,c.ascending))};U.prototype.sort=U.prototype.sort;U.prototype.name=function(){return"Collection"};U.prototype.elementType=function(){return R};
|
|
U.prototype.map=function(a,b){var c=this.elementType();return uj(this,O("Collection.map",this,function(d){return a(new c(d))},b))};U.prototype.map=U.prototype.map;U.prototype.Yd=function(a,b){b=q(b)?b:null;var c=this.elementType();return O("Collection.iterate",this,function(d,e){return a(new c(d),e)},b)};U.prototype.iterate=U.prototype.Yd;var V=function(a,b){if(!(this instanceof V))return tj(V,arguments);if(a instanceof V){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");Dk();if(a instanceof S||null===a)R.call(this,new N("Feature"),{geometry:a,metadata:b||null});else if(a instanceof L)R.call(this,a.i,a.args,a.A);else if("Feature"==a.type){var c=a.properties||{};if("id"in a){if("system:index"in
|
|
c)throw Error('Can\'t specify both "id" and "system:index".');c=Kb(c);c["system:index"]=a.id}R.call(this,new N("Feature"),{geometry:new S(a.geometry),metadata:c})}else R.call(this,new N("Feature"),{geometry:new S(a),metadata:b||null})};A(V,R);z("ee.Feature",V);var Ek=!1,Dk=function(){Ek||(Oj(V,"Feature","Feature"),Ek=!0)};V.prototype.C=function(a){return V.h.C.call(this,a)};V.prototype.getInfo=V.prototype.C;
|
|
V.prototype.getMap=function(a,b){var c=P(V.prototype.getMap,arguments);return O("Collection",[this]).getMap(c.visParams,c.callback)};V.prototype.getMap=V.prototype.getMap;V.prototype.name=function(){return"Feature"};var Ri=function(a){var b={},c=Fk(a.element,a);c=Gk(c,a,b);b.element=c;return b},Gk=function(a,b,c){var d={};zb(b,function(e,f){switch(f){case "dimensions":f=t(e)?e.split("x").map(Number):v(e)?e:u(e)?[e]:[];if(1===f.length)d.maxDimension=f[0];else if(2===f.length)d.width=f[0],d.height=f[1];else throw Error("Invalid dimensions "+e);break;case "region":e=t(e)?JSON.parse(e):e;d.geometry=new S(e);break;case "scale":d.scale=Number(e);break;default:c[f]=e}});Ib(d)||(d.input=a,a=Hj("Image.clipToBoundsAndScale",
|
|
d));return a},Fk=function(a,b){var c=b.crs||"",d=b.crsTransform||b.crs_transform||"";if(!c&&!d)return a;if(d&&!c)throw Error('Must specify "crs" if "crsTransform" is specified.');d?(a=Hj("Image.reproject",{image:a,crs:c,Df:d}),null!=b.dimensions&&null==b.scale&&null==b.region&&(c=b.dimensions,delete b.dimensions,t(c)&&(c=c.split("x").map(Number)),d=Hj("Image.projection",{image:a}),2===c.length&&(b.region=new ek([0,0,c[0],c[1]],d,!0)))):a=Hj("Image.setDefaultProjection",{image:a,crs:c,crsTransform:[1,
|
|
0,0,0,-1,0]});return a},Ik=function(a,b){var c={};b=Hk(b,c);Ib(b)||(b.image=a,a=Hj("Image.visualize",b));c.image=a;return c},Hk=function(a,b){var c="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),d={};zb(a,function(e,f){bb(c,f)?d[f]=e:b[f]=e});return d};var W=function(a){if(!(this instanceof W))return tj(W,arguments);if(a instanceof W)return a;Jk();var b=arguments.length;if(0==b||1==b&&!q(a))R.call(this,new N("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(yj(a))R.call(this,new N("Image.constant"),{value:a});else if(zj(a))R.call(this,new N("Image.load"),{id:a});else{if(v(a))return Kk(Wa(a,function(d){return new W(d)}));if(a instanceof L)"Array"==a.name()?R.call(this,new N("Image.constant"),{value:a}):R.call(this,a.i,a.args,a.A);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){b=arguments[0];var c=arguments[1];if(zj(b)&&yj(c))R.call(this,new N("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)");};A(W,R);z("ee.Image",W);var Lk=!1,Jk=function(){Lk||(Oj(W,"Image","Image"),Oj(W,"Window","Image","focal_"),Lk=!0)};W.prototype.C=function(a){return W.h.C.call(this,a)};W.prototype.getInfo=W.prototype.C;
|
|
W.prototype.getMap=function(a,b){var c=this,d=P(W.prototype.getMap,arguments),e=Ik(this,d.visParams);if(d.callback){var f=d.callback;si(e,function(g,h){g=g?Object.assign(g,{image:c}):void 0;f(g,h)})}else return d=si(e),d.image=this,d};W.prototype.getMap=W.prototype.getMap;W.prototype.Fa=function(a,b){var c=P(W.prototype.Fa,arguments),d=c.params?Kb(c.params):{};d.image=this.D();if(c.callback){var e=c.callback;Ai(d,function(f,g){f?e(Bi(f)):e(null,g)})}else return Bi(Ai(d))};
|
|
W.prototype.getDownloadURL=W.prototype.Fa;W.prototype.Rc=function(a,b){var c=P(W.prototype.Rc,arguments);if(G){var d={};var e=Gk(this,c.params,d);d=Ik(e,d)}else if(d=Ik(this,c.params),d.region)if(v(d.region)||Aj(d.region))d.region=ze(d.region);else if(!t(d.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(c.callback)wi(d,function(f,g){var h="";if(!q(g))try{h=zi(f)}catch(k){g=String(k.message)}c.callback(h,g)});else return zi(wi(d))};W.prototype.getThumbURL=W.prototype.Rc;
|
|
var Mk=function(a,b,c){var d=P(Mk,arguments);return Kk([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};W.rgb=Mk;var Nk=function(a){return Kk(Array.prototype.slice.call(arguments),null)};W.cat=Nk;var Kk=function(a,b){if(0==a.length)return O("Image.constant",[]);for(var c=new W(a[0]),d=1;d<a.length;d++)c=O("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
W.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||zj(b[0])||yj(b[0])){for(var d=0;d<b.length;d++)if(!(zj(b[d])||yj(b[d])||b[d]instanceof L))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return Hj("Image.select",c)};W.prototype.select=W.prototype.select;
|
|
W.prototype.expression=function(a,b){var c=P(W.prototype.expression,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var f=c.map,g;for(g in f)d.push(g),e[g]=new W(f[g])}var h=O("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d);c=new M;c.encode=function(k){return h.encode(k)};c.Jc=function(k,m){return Qd(k(h),m)};c.G=function(){return{name:"",args:Wa(d,function(k){return{name:k,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};
|
|
W.prototype.expression=W.prototype.expression;W.prototype.clip=function(a){try{a=new S(a)}catch(b){}return O("Image.clip",this,a)};W.prototype.clip=W.prototype.clip;W.prototype.me=function(a){var b=1!=arguments.length||zj(arguments[0])?gb(arguments):arguments[0];return O("Image.rename",this,b)};W.prototype.rename=W.prototype.me;W.prototype.name=function(){return"Image"};var Ok=function(a){if(this instanceof Ok){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof Ok)return a}else return tj(Ok,arguments);Pk();if(v(a))L.call(this,null,null),this.zb=a;else if(a instanceof L)L.call(this,a.i,a.args,a.A),this.zb=null;else throw Error("Invalid argument specified for ee.List(): "+a);};A(Ok,L);z("ee.List",Ok);var Qk=!1,Pk=function(){Qk||(Oj(Ok,"List","List"),Qk=!0)};
|
|
Ok.prototype.encode=function(a){return v(this.zb)?Wa(this.zb,function(b){return a(b)}):Ok.h.encode.call(this,a)};Ok.prototype.P=function(a){return v(this.zb)?Od(a(this.zb)):Ok.h.P.call(this,a)};Ok.prototype.name=function(){return"List"};var X=function(a,b){if(!(this instanceof X))return tj(X,arguments);if(a instanceof X)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");Rk();a instanceof S&&(a=new V(a));a instanceof V&&(a=[a]);if(zj(a)){var c={tableId:a};b&&(c.geometryColumn=b);U.call(this,new N("Collection.loadTable"),c)}else if(v(a))U.call(this,new N("Collection"),{features:Wa(a,function(d){return new V(d)})});else if(a instanceof Ok)U.call(this,
|
|
new N("Collection"),{features:a});else if(a instanceof L)U.call(this,a.i,a.args,a.A);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};A(X,U);z("ee.FeatureCollection",X);var Sk=!1,Rk=function(){Sk||(Oj(X,"FeatureCollection","FeatureCollection"),Sk=!0)};X.prototype.getMap=function(a,b){var c=P(X.prototype.getMap,arguments),d=Hj("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.getMap(void 0,c.callback);else return d.getMap()};
|
|
X.prototype.getMap=X.prototype.getMap;X.prototype.C=function(a){return X.h.C.call(this,a)};X.prototype.getInfo=X.prototype.C;X.prototype.Fa=function(a,b,c,d){var e=P(X.prototype.Fa,arguments),f={};f.table=this.D();e.format&&(f.format=e.format.toUpperCase());e.filename&&(f.filename=e.filename);if(e.selectors){var g=e.selectors;ya(g)&&(g=g.join(","));f.selectors=g}if(e.callback)Ci(f,function(h,k){h?e.callback(Di(h)):e.callback(null,k)});else return Di(Ci(f))};X.prototype.getDownloadURL=X.prototype.Fa;
|
|
X.prototype.select=function(a,b,c){if(zj(a)){var d=Array.prototype.slice.call(arguments);return this.map(function(f){return f.select(d)})}var e=P(X.prototype.select,arguments);return this.map(function(f){return f.select(e)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"FeatureCollection"};X.prototype.elementType=function(){return V};var Y=function(a){if(!(this instanceof Y))return tj(Y,arguments);if(a instanceof Y)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Tk();a instanceof W&&(a=[a]);if(zj(a))U.call(this,new N("ImageCollection.load"),{id:a});else if(v(a))U.call(this,new N("ImageCollection.fromImages"),{images:Wa(a,function(b){return new W(b)})});else if(a instanceof Ok)U.call(this,new N("ImageCollection.fromImages"),{images:a});else if(a instanceof
|
|
L)U.call(this,a.i,a.args,a.A);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};A(Y,U);z("ee.ImageCollection",Y);var Uk=!1,Tk=function(){Uk||(Oj(Y,"ImageCollection","ImageCollection"),Oj(Y,"reduce","ImageCollection"),Uk=!0)};Y.prototype.Pc=function(a,b){var c=P(Y.prototype.Pc,arguments);return Vk(this,c,["png","jpg","jpeg"],"filmstrip")};Y.prototype.getFilmstripThumbURL=Y.prototype.Pc;
|
|
Y.prototype.Sc=function(a,b){var c=P(Y.prototype.Sc,arguments);return Vk(this,c,["gif"],"video")};Y.prototype.getVideoThumbURL=Y.prototype.Sc;
|
|
var Vk=function(a,b,c,d){var e={};a=a.map(function(h){h=Fk(h,b.params);return Gk(h,b.params,e)});var f={},g=Hk(e,f);f.imageCollection=a.map(function(h){g.image=h;return Hj("Image.visualize",g)});null!=b.params.dimensions&&(f.dimensions=b.params.dimensions);if(f.format){if(!Xa(c,function(h){return h.toLowerCase()==f.format.toLowerCase()}))throw Error("Invalid format specified.");}else f.format=c[0];c=wi;if(Oh&&G)switch(d){case "video":c=xi;break;case "filmstrip":c=yi}if(b.callback)c(f,function(h,k){var m=
|
|
"";if(!q(k))try{m=zi(h)}catch(r){k=String(r.message)}b.callback(m,k)});else return zi(c(f))};Y.prototype.getMap=function(a,b){var c=P(Y.prototype.getMap,arguments),d=O("ImageCollection.mosaic",this);if(c.callback)d.getMap(c.visParams,c.callback);else return d.getMap(c.visParams)};Y.prototype.getMap=Y.prototype.getMap;Y.prototype.C=function(a){return Y.h.C.call(this,a)};Y.prototype.getInfo=Y.prototype.C;
|
|
Y.prototype.select=function(a,b){var c=arguments;return this.map(function(d){return d.select.apply(d,c)})};Y.prototype.select=Y.prototype.select;Y.prototype.first=function(){return new W(O("Collection.first",this))};Y.prototype.first=Y.prototype.first;Y.prototype.name=function(){return"ImageCollection"};Y.prototype.elementType=function(){return W};var Wk=function(a){this.Fc=a;this.id=null},Yk=function(a){var b={element:Xk(a)};Object.assign(b,a);b=Ab(b,xa);return new Wk(b)};Wk.prototype.start=function(a,b){var c=this;C(this.Fc,"Task config must be specified for tasks to be started.");if(a){var d=function(){Pa(c.id);Si(c.id,c.Fc,function(e,f){f?b(f):a()})};this.id?d():Fi(1,function(e){(e=e&&e[0])?(c.id=e,d()):b("Failed to obtain task ID.")})}else this.id=this.id||Fi(1)[0],Pa(this.id,"Failed to obtain task ID."),Si(this.id,this.Fc)};
|
|
Wk.prototype.start=Wk.prototype.start;var Zk=function(a,b,c,d,e,f,g,h,k,m){var r=P(Zk,arguments);r=$k(r,"ASSET","EXPORT_IMAGE");return Yk(r)};z("ee.batch.Export.image.toAsset",Zk);var al=function(a,b,c,d,e,f,g,h,k,m,r,Q,K,pa,kc){var Fa=P(al,arguments);Fa=$k(Fa,"GOOGLE_CLOUD_STORAGE","EXPORT_IMAGE");return Yk(Fa)};z("ee.batch.Export.image.toCloudStorage",al);var bl=function(a,b,c,d,e,f,g,h,k,m,r,Q,K,pa,kc){var Fa=P(bl,arguments);Fa=$k(Fa,"DRIVE","EXPORT_IMAGE");return Yk(Fa)};
|
|
z("ee.batch.Export.image.toDrive",bl);var cl=function(a,b,c,d,e,f,g,h,k,m,r,Q){var K=P(cl,arguments);K=$k(K,"GOOGLE_CLOUD_STORAGE","EXPORT_TILES");return Yk(K)};z("ee.batch.Export.map.toCloudStorage",cl);var dl=function(a,b,c,d,e,f){var g=P(dl,arguments);g=$k(g,"GOOGLE_CLOUD_STORAGE","EXPORT_FEATURES");return Yk(g)};z("ee.batch.Export.table.toCloudStorage",dl);var el=function(a,b,c,d,e,f){var g=P(el,arguments);g.type="EXPORT_FEATURES";g=$k(g,"DRIVE","EXPORT_FEATURES");return Yk(g)};
|
|
z("ee.batch.Export.table.toDrive",el);var fl=function(a,b,c){var d=P(fl,arguments);d=$k(d,"ASSET","EXPORT_FEATURES");return Yk(d)};z("ee.batch.Export.table.toAsset",fl);var gl=function(a,b,c,d,e,f,g,h,k,m,r,Q){var K=P(gl,arguments);K=$k(K,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO");return Yk(K)};z("ee.batch.Export.video.toCloudStorage",gl);var hl=function(a,b,c,d,e,f,g,h,k,m,r,Q){var K=P(hl,arguments);K=$k(K,"DRIVE","EXPORT_VIDEO");return Yk(K)};z("ee.batch.Export.video.toDrive",hl);
|
|
var il=function(a,b,c,d,e,f,g,h,k,m,r){var Q=P(il,arguments);Q=$k(Q,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO_MAP");return Yk(Q)};z("ee.batch.Export.videoMap.toCloudStorage",il);
|
|
var Xk=function(a){var b=function(d){return d in a},c=jl.find(b);C(1===Za(jl,b),'Expected a single "image" or "collection" key.');b=a[c];if(!(b instanceof W||b instanceof X||b instanceof Y||b instanceof R))throw Error("Unknown element type provided: "+typeof b+". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection or ee.Element.");delete a[c];return b},$k=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'.");}null!=e.formatOptions&&(a=kl(e,a),delete e.formatOptions,Object.assign(e,a));e=ll(e,b);null!=e.crsTransform&&(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_TILES":e=
|
|
b=ll(e,b);break;case "EXPORT_FEATURES":v(e.selectors)&&(e.selectors=e.selectors.join());e=ll(e,b);break;case "EXPORT_VIDEO":e=ml(e);e=ll(e,b);null!=e.crsTransform&&(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_VIDEO_MAP":e=ml(e);e=ll(e,b);break;default:throw Error("Unknown export type: "+e.type);}if(d&&null!=e.region){d=e;b=e.region;if(b instanceof S)b=b.oc();else if(t(b))try{b=Ra(JSON.parse(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.");
|
|
}if(!(w(b)&&"type"in b))try{new fk(b)}catch(f){try{new ik(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.");}}b=ze(b);d.region=b}return e},ll=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;default:b=wa(a.folder);if(!bb(["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},nl={GEO_TIFF:["cloudOptimized","fileDimensions"],TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")},ol={GEO_TIFF:"tiff",TF_RECORD_IMAGE:"tfrecord"},
|
|
ml=function(a){a.videoOptions=a.framesPerSecond||5;a.maxFrames=a.maxFrames||1E3;a.maxPixels=a.maxPixels||1E8;a.fileFormat="MP4";return a},kl=function(a,b){var c=a.formatOptions;if(null==c)return{};if(Object.keys(a).some(function(k){return null!==c&&k in c}))throw Error("Parameter specified at least twice: once in config, and once in config format options.");a=ol[b];for(var d=nl[b],e={},f=n(Object.entries(c)),g=f.next();!g.done;g=f.next()){var h=n(g.value);g=h.next().value;h=h.next().value;if(!bb(d,
|
|
g))throw Error('"'+g+'" is not a valid option, the image format "'+b+'"'+('"may have the following options: '+d.join(", ")+'".'));g=a+g[0].toUpperCase()+g.substring(1);v(h)?e[g]=h.join():e[g]=h}return e},jl=["image","collection"];var pl=function(a){if(!(this instanceof pl))return tj(pl,arguments);if(a instanceof pl)return a;ql();if(u(a))L.call(this,null,null),this.Bb=a;else if(a instanceof L)L.call(this,a.i,a.args,a.A),this.Bb=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};A(pl,L);z("ee.Number",pl);var rl=!1,ql=function(){rl||(Oj(pl,"Number","Number"),rl=!0)};pl.prototype.encode=function(a){return u(this.Bb)?this.Bb:pl.h.encode.call(this,a)};
|
|
pl.prototype.P=function(a){return u(this.Bb)?Od(a(this.Bb)):pl.h.P.call(this,a)};pl.prototype.name=function(){return"Number"};var sl=function(a){if(!(this instanceof sl))return tj(sl,arguments);if(a instanceof sl)return a;tl();if(t(a))L.call(this,null,null),this.Gb=a;else if(a instanceof L)this.Gb=null,a.i&&"String"==a.i.G().returns?L.call(this,a.i,a.args,a.A):L.call(this,new N("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};A(sl,L);z("ee.String",sl);var ul=!1,tl=function(){ul||(Oj(sl,"String","String"),ul=!0)};
|
|
sl.prototype.encode=function(a){return t(this.Gb)?this.Gb:sl.h.encode.call(this,a)};sl.prototype.P=function(a){return t(this.Gb)?Od(a(this.Gb)):sl.h.P.call(this,a)};sl.prototype.name=function(){return"String"};var vl=function(a,b){if(!(this instanceof vl))return tj(vl,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(wl(g in vj?vj[g]:null,f.name))}if(!q(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.ja=xl(a,c,b);this.yd=b.apply(null,c)};A(vl,M);z("ee.CustomFunction",vl);vl.prototype.encode=function(a){return{type:"Function",argumentNames:Wa(this.ja.args,function(b){return b.name}),body:a(this.yd)}};
|
|
vl.prototype.P=function(a){return Rd(this.ja.args.map(function(b){return b.name}),a(this.yd))};vl.prototype.Jc=function(a,b){return Qd(a(this),b)};vl.prototype.G=function(){return this.ja};
|
|
var wl=function(a,b){a=a||Object;if(!(a.prototype instanceof L))if(a&&a!=Object)if(a==String)a=sl;else if(a==Number)a=pl;else if(a==Array)a=p.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=L;var c=function(d){this.args=this.i=null;this.A=d};c.prototype=a.prototype;return new c(b)},yl=function(a,b){b=Wa(b,function(c){return{name:null,type:t(c)?c:wj(c)}});b={name:"",returns:t("Object")?"Object":wj("Object"),args:b};return new vl(b,a)},xl=function(a,b,
|
|
c){for(var d=[],e=0;e<b.length;e++)null===b[e].A&&d.push(e);if(0==d.length)return a;var f=function(k){var m=0;w(k)&&!x(k)&&("Function"==k.type&&m++,zb(k,function(r){m+=f(r)}));return m};e=Ie(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],h=c+e;b[g].A=h;a.args[g].name=h}return a};var zl=function(a,b){if(!(this instanceof zl))return tj(zl,arguments);if(a instanceof zl)return a;Al();var c=P(zl,arguments);a=c.date;c=c.tz;var d=new N("Date"),e={},f=null;if(zj(a)){if(e.value=a,c)if(zj(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(yj(a))e.value=a;else if(za(a))e.value=Math.floor(a.getTime());else if(a instanceof L)a.i&&"Date"==a.i.G().returns?(d=a.i,e=a.args,f=a.A):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);L.call(this,d,e,f)};A(zl,L);z("ee.Date",zl);var Bl=!1,Al=function(){Bl||(Oj(zl,"Date","Date"),Bl=!0)};zl.prototype.name=function(){return"Date"};z("ee.Deserializer",function(){});var Dl=function(a){return Cl(JSON.parse(a))};z("ee.Deserializer.fromJSON",Dl);var Cl=function(a){var b={};if(w(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],f=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=El(f,b)}a=a.value}return El(a,b)};z("ee.Deserializer.decode",Cl);
|
|
var El=function(a,b){if(null===a||u(a)||ra(a)||t(a))return a;if(v(a))return Wa(a,function(f){return El(f,b)});if(!w(a)||x(a))throw Error("Cannot decode object: "+a);var c=a.type;switch(c){case "ValueRef":if(a.value in b)return b[a.value];throw Error("Unknown ValueRef: "+a);case "ArgumentRef":c=a.value;if(!t(c))throw Error("Invalid variable name: "+c);return wl(Object,c);case "Date":c=a.value;if(!u(c))throw Error("Invalid date value: "+c);return new zl(c/1E3);case "Bytes":return c=new Md,c.encode=
|
|
function(){return a},c;case "Invocation":c="functionName"in a?Gj(a.functionName):El(a["function"],b);var d=Bb(a.arguments,function(f){return El(f,b)});if(c instanceof M)return c.apply(d);if(c instanceof L)return new L(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return Bb(a.value,function(f){return El(f,b)});case "Function":var e=El(a.body,b);c={name:"",args:Wa(a.argumentNames,function(f){return{name:f,type:"Object",optional:!1}}),returns:"Object"};return new vl(c,
|
|
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new S(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var Fl=function(a){if(!(this instanceof Fl))return tj(Fl,arguments);if(a instanceof Fl)return a;Gl();Aj(a)?(L.call(this,null,null),this.pb=a):(a instanceof L&&a.i&&"Dictionary"==a.i.G().returns?L.call(this,a.i,a.args,a.A):L.call(this,new N("Dictionary"),{input:a},null),this.pb=null)};A(Fl,L);z("ee.Dictionary",Fl);var Hl=!1,Gl=function(){Hl||(Oj(Fl,"Dictionary","Dictionary"),Hl=!0)};Fl.prototype.encode=function(a){return null===this.pb?Fl.h.encode.call(this,a):a(this.pb)};
|
|
Fl.prototype.P=function(a){return null===this.pb?Fl.h.P.call(this,a):Od(a(this.pb))};Fl.prototype.name=function(){return"Dictionary"};var Il={};z("ee.Terrain",Il);Il.Wc=!1;Il.Ue=function(){Il.Wc||(Oj(Il,"Terrain","Terrain"),Il.Wc=!0)};Il.reset=function(){Pj(Il);Il.Wc=!1};var Ol=function(a,b,c,d,e){if("ready"!=Jl||a||b){var f=null!=c;if(d)if(f)Kl.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Jl&&f)Ll.push(c);else if(Jl="loading",bi(a,b,e),f)Ll.push(c),Kj(Ml,Nl);else try{Kj(),Ml()}catch(g){throw Nl(g),g;}}else c&&c()};z("ee.initialize",Ol);
|
|
var Rl=function(){Jl="not_ready";$h=Zh=Yh=Wh=null;ai=!1;ua("gapi")&&gapi.client&&delete gapi.client.earthengine;Xh=!1;Ij=null;Jj={};Pj(zl);Bl=!1;Pj(Fl);Hl=!1;Pj(R);Wj=!1;Pj(W);Lk=!1;Pj(V);Ek=!1;Pj(U);Ck=!1;Pj(Y);Uk=!1;Pj(X);Sk=!1;Pj(T);nk=!1;Pj(S);Zj=!1;Pj(Ok);Qk=!1;Pj(pl);rl=!1;Pj(sl);ul=!1;Il.reset();for(var a=p.ee,b=0;b<Pl.length;b++){var c=Pl[b];Pj(a[c]);delete a[c]}Pl=[];vj=a;a=Ql;for(var d in a)delete a[d]};z("ee.reset",Rl);var Sl={yf:"not_ready",LOADING:"loading",zf:"ready"};
|
|
z("ee.InitState",Sl);z("ee.InitState.NOT_READY","not_ready");z("ee.InitState.LOADING","loading");z("ee.InitState.READY","ready");var Jl="not_ready",Ll=[],Kl=[];z("ee.TILE_SIZE",256);var Pl=[],Ql={};z("ee.Algorithms",Ql);var Tl=function(a,b){t(a)&&(a=new N(a));return M.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};z("ee.call",Tl);var Ul=function(a,b){t(a)&&(a=new N(a));return a.apply(b)};z("ee.apply",Ul);
|
|
var Ml=function(){if("loading"==Jl){try{Al();Gl();Vj();Jk();Dk();Bk();Tk();Rk();mk();Xj();Pk();ql();tl();Il.Ue();var a=Lj(),b={},c={},d;for(d in a){b[-1!=d.indexOf(".")?d.slice(0,d.indexOf(".")):d]=!0;var e=a[d].returns.replace(/<.*>/,"");c[e]=!0}var f=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=[];0<Ll.length;)Ll.shift()()}},Nl=function(a){if("loading"==
|
|
Jl)for(Jl="not_ready",Ll=[];0<Kl.length;)Kl.shift()(a)},Wl=function(){var a=Mj();Eb(a).sort().forEach(function(b){var c=a[b],d=c.G();if(!d.hidden){b=b.split(".");var e=Ql;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=ib(b,1)}f=function(g){return Fj(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=y(c.toString,c);e[b[0]]=f}})},Vl=function(a){var b=function(c){var d=p.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof
|
|
d)return e[0];if(!(this instanceof d))return tj(d,e);d=Nj(a);var g=!(e[0]instanceof L),h=!1;d&&(f?g?h=!0:e[0].i&&e[0].i.G().returns==d.G().returns||(h=!0):h=!0);if(h)e=Bj(e,d.G())?e[0]:Dj(d,e),L.call(this,d,Ej(d,e));else{if(!f)throw Error("Too many arguments for ee."+a+"(): "+e);if(g)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];L.call(this,e.i,e.args,e.A)}};A(b,L);b.prototype.name=function(){return a};Oj(b,a,a);return b};
|
|
Cj=function(a,b){if(null===a)return null;if(q(a)){var c=p.ee;switch(b){case "Image":return new W(a);case "Feature":return a instanceof U?O("Feature",O("Collection.geometry",a)):new V(a);case "Element":if(a instanceof R)return a;if(a instanceof S)return new V(a);if(a instanceof L)return new R(a.i,a.args,a.A);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof X?O("Collection.geometry",a):new S(a);case "FeatureCollection":case "Collection":return a instanceof U?a:new X(a);
|
|
case "ImageCollection":return new Y(a);case "Filter":return new T(a);case "Algorithm":if(t(a))return new N(a);if(x(a)){b=a.length;c=[];for(var d=0;d<b;d++)c[d]="Object";return yl(a,c)}if(a instanceof Md)return a;throw Error("Argument is not a function: "+a);case "String":return zj(a)||a instanceof sl||a instanceof L?new sl(a):a;case "Dictionary":return Aj(a)?a:new Fl(a);case "List":return new Ok(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new pl(a);default:if(b in
|
|
c){d=Nj(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if(t(a)){if(a in c[b])return c[b][a].call();throw Error("Unknown algorithm: "+b+"."+a);}return new c[b](a)}return a}}};var Xl=function(a,b,c){Id.call(this,a,b,c);this.tileSize=new google.maps.Size(256,256);this.Od=new ud;this.Nd=new ud};A(Xl,Id);z("ee.FloatTileOverlay",Xl);Xl.prototype.getTile=function(a,b){var c=Jd(this,a,b);b=[this.url,c].join("/")+"?token="+this.token;c=[c,this.Aa,this.token].join("/");this.Ca.push(c);this.Aa+=1;var d=$f("DIV");Yl(this,b,a,c,d);Zl(this);return d};
|
|
var Yl=function(a,b,c,d,e){var f=Og();f.open("GET",b,!0);f.responseType="arraybuffer";f.onreadystatechange=y(function(){if(f.readyState===XMLHttpRequest.DONE&&200===f.status){var g=f.response;if(g)g=new Float32Array(g),this.Od.set(c,g),this.Nd.set(c,e),eb(this.Ca,d),Zl(this);else throw this.qd.add(d),Error("Unable to request floating point array buffers.");}},a);f.send()},Zl=function(a){a.dispatchEvent(new Kd(a.Ca.length))};Xl.prototype.j=function(){this.Nd=this.Od=null;Xl.h.j.call(this)};var $l=function(){this.mc=new Map};$l.prototype.clear=function(){this.mc.clear()};var am=function(a,b){a.mc.has(b)||a.mc.set(b,{throttleCount:0,errorCount:0,tileLatencies:[]});return a.mc.get(b)};var bm=function(a){B.call(this);this.Ha=a;this.l={}};A(bm,B);var cm=[];bm.prototype.ha=function(a,b,c,d){v(b)||(b&&(cm[0]=b.toString()),b=cm);for(var e=0;e<b.length;e++){var f=cd(a,b[e],c||this.handleEvent,d||!1,this.Ha||this);if(!f)break;this.l[f.key]=f}return this};bm.prototype.Ab=function(a,b,c,d){return dm(this,a,b,c,d)};var dm=function(a,b,c,d,e,f){if(v(c))for(var g=0;g<c.length;g++)dm(a,b,c[g],d,e,f);else{b=bd(b,c,d||a.handleEvent,e,f||a.Ha||a);if(!b)return a;a.l[b.key]=b}return a};
|
|
bm.prototype.sc=function(a,b,c,d,e){if(v(b))for(var f=0;f<b.length;f++)this.sc(a,b[f],c,d,e);else c=c||this.handleEvent,d=w(d)?!!d.capture:!!d,e=e||this.Ha||this,c=dd(c),d=!!d,b=Sc(a)?a.rb(b,c,d,e):a?(a=fd(a))?a.rb(b,c,d,e):null:null,b&&(kd(b),delete this.l[b.key])};bm.prototype.Eb=function(){zb(this.l,function(a,b){this.l.hasOwnProperty(b)&&kd(a)},this);this.l={}};bm.prototype.j=function(){bm.h.j.call(this);this.Eb()};
|
|
bm.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var fm=function(a,b){q(a.name)?(this.name=a.name,this.code=Gb[a.name]):(this.code=a=Oa(a.code),this.name=em(a));Ja.call(this,sc("%s %s",this.name,b))};A(fm,Ja);var em=function(a){var b=Hb(function(c){return a==c});if(!q(b))throw Error("Invalid code: "+a);return b},Gb={AbortError:3,EncodingError:5,InvalidModificationError:9,InvalidStateError:7,NotFoundError:1,NotReadableError:4,NoModificationAllowedError:6,PathExistsError:12,QuotaExceededError:10,SecurityError:2,SyntaxError:8,TypeMismatchError:11};var gm=function(a,b){Ia.call(this,a.type,b);this.$=a};A(gm,Ia);var hm=function(){D.call(this);this.I=new FileReader;this.I.onloadstart=y(this.Va,this);this.I.onprogress=y(this.Va,this);this.I.onload=y(this.Va,this);this.I.onabort=y(this.Va,this);this.I.onerror=y(this.Va,this);this.I.onloadend=y(this.Va,this)};A(hm,D);l=hm.prototype;l.abort=function(){try{this.I.abort()}catch(a){throw new fm(a,"aborting read");}};l.xa=function(){return this.I.readyState};l.getError=function(){return this.I.error&&new fm(this.I.error,"reading file")};
|
|
l.Va=function(a){this.dispatchEvent(new gm(a,this))};l.j=function(){hm.h.j.call(this);delete this.I};l.readAsBinaryString=function(a){this.I.readAsBinaryString(a)};l.readAsArrayBuffer=function(a){this.I.readAsArrayBuffer(a)};l.readAsText=function(a,b){this.I.readAsText(a,b)};var im=function(a,b){C(a);a=a.style;"opacity"in a?a.opacity=b:"MozOpacity"in a?a.MozOpacity=b:"filter"in a&&(a.filter=""===b?"":"alpha(opacity="+100*Number(b)+")")};var jm=function(a,b){D.call(this);b=b||{};this.minZoom=b.minZoom||0;this.maxZoom=b.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=b.tileSize||new google.maps.Size(256,256);this.name=b.name;this.opacity="opacity"in b?b.opacity:1;this.lc=new $l;this.Ba=new ud;this.Aa=0;this.pd=a;this.pa=new bm(this);this.alt=this.radius=this.projection=void 0};A(jm,D);z("ee.layers.AbstractOverlay",jm);
|
|
jm.prototype.Ac=function(a){return cd(this,"tile-load",a)};jm.prototype.addTileCallback=jm.prototype.Ac;jm.prototype.jd=function(a){kd(a)};jm.prototype.removeTileCallback=jm.prototype.jd;l=jm.prototype;l.Qc=function(){return km(this,"throttled")+km(this,"loading")+km(this,"new")};l.setOpacity=function(a){this.opacity=a;this.Ba.forEach(function(b){im(b.O,this.opacity)},this)};l.getStats=function(){return this.lc};
|
|
l.getTile=function(a,b,c){var d=1<<b;if(b<this.minZoom||0>a.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;c<arguments.length;c++){var d=arguments[c];if(0==d.lastIndexOf("/",0))b=d;else{var e;(e=""==b)||(e=b.length-1,e=0<=e&&b.indexOf("/",e)==e);b=e?b+d:b+("/"+d)}}return b};var Fm=function(a,b,c,d){B.call(this);this.zd=a;this.ra=b;this.od=d||"";this.ac=c};A(Fm,tm);z("ee.layers.CloudStorageTileSource",Fm);Fm.prototype.ae=function(a){if(a.zoom<=this.ac)a.ca=this.Tb(a.Ua,a.zoom);else{var b=a.zoom-this.ac,c=Math.pow(2,b);c=new google.maps.Point(Math.floor(a.Ua.x/c),Math.floor(a.Ua.y/c));a.ca=this.Tb(c,a.zoom-b);a.hc=Ea(Gm,this.ac)}var d=y(a.Fb,a);a.Fb=y(function(e){e&&(e.includes("The specified key does not exist.")||e.includes("AccessDenied"))?qm(a,"loaded"):d(e)},a);rm(a)};
|
|
Fm.prototype.Td=function(){return[this.zd,this.ra,this.ac,this.od].join("-")};Fm.prototype.Tb=function(a,b){a=Em("https://storage.googleapis.com",this.zd,this.ra,String(b),String(a.x),String(a.y));this.od&&(a+=this.od);return a};
|
|
var Gm=function(a,b){if(!b.Wb)throw Error("Tile must have an image element to be rendered.");a=Math.pow(2,b.zoom-a);var c=b.tileSize.width,d=b.O.ownerDocument.createElement("canvas");d.setAttribute("width",c);d.setAttribute("height",c);b.O.appendChild(d);d=d.getContext("2d");d.imageSmoothingEnabled=!1;d.mozImageSmoothingEnabled=!1;d.webkitImageSmoothingEnabled=!1;d.drawImage(b.Wb,c/a*(b.Ua.x%a),c/a*(b.Ua.y%a),c/a,c/a,0,0,c,c)};var Hm=function(){this.aa=[];this.da=[]};l=Hm.prototype;l.enqueue=function(a){this.da.push(a)};l.ob=function(){0==this.aa.length&&(this.aa=this.da,this.aa.reverse(),this.da=[]);return this.aa.pop()};l.o=function(){return this.aa.length+this.da.length};l.isEmpty=function(){return 0==this.aa.length&&0==this.da.length};l.clear=function(){this.aa=[];this.da=[]};l.contains=function(a){return bb(this.aa,a)||bb(this.da,a)};
|
|
l.remove=function(a){var b=this.aa;var c=Ta(b,a);0<=c?(db(b,c),b=!0):b=!1;return b||eb(this.da,a)};l.w=function(){for(var a=[],b=this.aa.length-1;0<=b;--b)a.push(this.aa[b]);var c=this.da.length;for(b=0;b<c;++b)a.push(this.da[b]);return a};var Im=function(a,b){B.call(this);this.be=a||0;this.$b=b||10;if(this.be>this.$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.Zc<this.delay)){for(var b;0<this.ga.o()&&(b=this.ga.ob(),!this.ad(b));)this.Kb();!b&&this.o()<this.$b&&(b=this.Hc());b&&(this.Zc=a,this.ya.add(b));return b}};
|
|
var Jm=function(a,b){return a.ya.remove(b)?(a.zc(b),!0):!1};l=Im.prototype;l.zc=function(a){this.ya.remove(a);this.ad(a)&&this.o()<this.$b?this.ga.enqueue(a):this.Ob(a)};l.Kb=function(){for(var a=this.ga;this.o()<this.be;)a.enqueue(this.Hc());for(;this.o()>this.$b&&0<this.ga.o();)this.Ob(a.ob())};l.Hc=function(){return{}};l.Ob=function(a){if("function"==typeof a.ea)a.ea();else for(var b in a)a[b]=null};l.ad=function(a){return"function"==typeof a.Ke?a.Ke():!0};
|
|
l.contains=function(a){return this.ga.contains(a)||this.ya.contains(a)};l.o=function(){return this.ga.o()+this.ya.o()};l.isEmpty=function(){return this.ga.isEmpty()&&this.ya.isEmpty()};l.j=function(){Im.h.j.call(this);if(0<this.ya.o())throw Error("[goog.structs.Pool] Objects not released");delete this.ya;for(var a=this.ga;!a.isEmpty();)this.Ob(a.ob());delete this.ga};var Km=function(a,b){this.Zd=a;this.uc=b};Km.prototype.getKey=function(){return this.Zd};Km.prototype.clone=function(){return new Km(this.Zd,this.uc)};var Lm=function(a){this.W=[];if(a)a:{if(a instanceof Lm){var b=a.ba();a=a.w();if(0>=this.o()){for(var c=this.W,d=0;d<b.length;d++)c.push(new Km(b[d],a[d]));break a}}else b=Eb(a),a=Db(a);for(d=0;d<b.length;d++)Mm(this,b[d],a[d])}},Mm=function(a,b,c){var d=a.W;d.push(new Km(b,c));b=d.length-1;a=a.W;for(c=a[b];0<b;)if(d=b-1>>1,a[d].getKey()>c.getKey())a[b]=a[d],b=d;else break;a[b]=c};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<d>>1;){var f=2*a+1,g=2*a+2;f=g<d&&b[g].getKey()<b[f].getKey()?g:f;if(b[f].getKey()>e.getKey())break;b[a]=b[f];a=f}b[a]=e}return c.uc}};l.w=function(){for(var a=this.W,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].uc);return b};l.ba=function(){for(var a=this.W,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
l.mb=function(a){return Xa(this.W,function(b){return b.uc==a})};l.wa=function(a){return Xa(this.W,function(b){return b.getKey()==a})};l.clone=function(){return new Lm(this)};l.o=function(){return this.W.length};l.isEmpty=function(){return 0==this.W.length};l.clear=function(){cb(this.W)};var Nm=function(){Lm.call(this)};A(Nm,Lm);Nm.prototype.enqueue=function(a,b){Mm(this,a,b)};Nm.prototype.ob=function(){return this.remove()};var Om=function(a,b){this.Id=void 0;this.jc=new Nm;Im.call(this,a,b)};A(Om,Im);l=Om.prototype;l.sb=function(a,b){if(!a)return(a=Om.h.sb.call(this))&&this.delay&&(this.Id=p.setTimeout(y(this.Vb,this),this.delay)),a;this.jc.enqueue(q(b)?b:100,a);this.Vb()};l.Vb=function(){for(var a=this.jc;0<a.o();){var b=this.sb();if(b)a.ob().apply(this,[b]);else break}};l.zc=function(a){Om.h.zc.call(this,a);this.Vb()};l.Kb=function(){Om.h.Kb.call(this);this.Vb()};
|
|
l.j=function(){Om.h.j.call(this);p.clearTimeout(this.Id);this.jc.clear();this.jc=null};var Pm=function(a,b){B.call(this);this.$c=a;this.S=b||null};A(Pm,tm);z("ee.layers.EarthEngineTileSource",Pm);Pm.prototype.ae=function(a,b){var c=cd(a,"status-changed",function(){switch(a.getStatus()){case "loaded":var e=a.qf["x-earth-engine-computation-profile"];this.S&&e&&this.S.Fe(a.O.id,e);break;case "failed":case "aborted":this.S&&""!==a.O.id&&this.S.jf(a.O.id),kd(c)}},void 0,this);a.ca=this.Tb(a.Ua,a.zoom);var d=y(this.Tc,this,a);Qm().sb(d,b)};
|
|
Pm.prototype.Td=function(){return this.$c.mapid+"-"+this.$c.token};Pm.prototype.Tc=function(a,b){var c=Qm();if(a.fa||"aborted"==a.getStatus())Jm(c,b);else{var d=cd(a,"status-changed",function(){a.md in sm&&(kd(d),Jm(c,b))});rm(a)}};Pm.prototype.Tb=function(a,b){a=this.$c.formatTileUrl(a.x,a.y,b);return this.S&&this.S.isEnabled()?a+"&profiling=1":a};var Qm=function(){Rm||(Rm=new Om(0,4));return Rm},Rm=null;var Tm=function(){D.call(this);this.pc=new Sm(0,60);this.fb=new ud};A(Tm,D);z("ee.MapTileManager",Tm);Tm.Xc=void 0;Tm.Sd=function(){return Tm.Xc?Tm.Xc:Tm.Xc=new Tm};Tm.prototype.send=function(a,b,c,d,e){if(this.fb.get(a))throw Error("[ee.MapTileManager] ID in use");b=new Um(a,b,d,y(this.le,this),q(e)?e:1);this.fb.set(a,b);a=y(this.Tc,this,b);this.pc.sb(a,c);return b};Tm.prototype.abort=function(a){if(a=this.fb.get(a))a.Sa||(a.Sa=!0,a.$=new Ia("abort")),this.le(a)};
|
|
Tm.prototype.Tc=function(a,b){if(a.L||a.Sa)Vm(this,b);else if(a.setToken(b),b.setActive(!0),b=new wm,a.L=b,!Wm(a))throw Error("Cannot dispatch first request!");};Tm.prototype.le=function(a){this.fb.remove(a.getId());a.L&&(Vm(this,a.getToken()),a.L.ea());a.Uc&&a.Uc(a.$,a.je)};var Vm=function(a,b){b.setActive(!1);if(!Jm(a.pc,b))throw Error("Object not released");};Tm.prototype.j=function(){Tm.h.j.call(this);this.pc.ea();this.pc=null;var a=this.fb;Ua(a.w(),function(b){b.ea()});a.clear();this.fb=null};
|
|
var Um=function(a,b,c,d,e){B.call(this);this.K=a;this.vf=b;this.cf=q(e)?e:1;this.Uc=c;this.Na=d};A(Um,B);l=Um.prototype;l.wd=0;l.Sa=!1;l.L=null;l.ve=null;l.$=null;l.je=null;var Xm=["load","abort","error"];l=Um.prototype;l.getToken=function(){return this.ve};l.setToken=function(a){this.ve=a};l.getId=function(){return this.K};l.getUrl=function(){return this.vf};
|
|
l.Te=function(a){if(this.Sa)this.Na&&this.Na(this);else switch(a.type){case "load":this.$=a;this.Na&&this.Na(this);break;case "error":case "abort":Wm(this)||(this.$=a,this.Na&&this.Na(this))}};l.j=function(){Um.h.j.call(this);delete this.Uc;delete this.Na};var Wm=function(a){if(a.wd>a.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(b<this.minZoom||0>a.y||a.y>=1<<b)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;b=Jd(this,a,b);a=[this.url,b].join("/")+"?token="+this.token;this.S&&this.S.isEnabled()&&(a+="&profiling=1");b=[b,this.Aa,this.token].join("/");this.Aa+=1;c=$f("DIV",{id:b});var d=(new Date).getTime()/1E3;this.Ca.push(b);Tm.Sd().send(b,a,d,y(this.Se,this,c,b));Zl(this);return c};Z.prototype.Qc=function(){return this.Ca.length};
|
|
Z.prototype.releaseTile=function(a){Tm.Sd().abort(a.id);this.rd.remove(q(a.firstElementChild)?a.firstElementChild:dg(a.firstChild));""!==a.id&&(this.qd.remove(a.id),this.S&&this.S.jf(a.id))};Z.prototype.setOpacity=function(a){this.bd=a;var b=this.rd.Ra();td(b,function(c){im(c,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
|
|
Z.prototype.Se=function(a,b,c,d){"error"==c.type?(eb(this.Ca,b),this.qd.add(b),this.dispatchEvent(c)):(eb(this.Ca,b),c.target&&"load"==c.type&&(c=c.target,this.rd.add(c),1!=this.bd&&im(c,this.bd),a.appendChild(c)),Zl(this));this.S&&null!==d&&this.S.Fe(b,d)};var Zm=function(a,b){if(!(this instanceof Zm))return new Zm(a,b);this.ra=a;this.ja=b};A(Zm,M);z("ee.SavedFunction",Zm);Zm.prototype.encode=function(a){return O("LoadAlgorithmById",this.ra).encode(a)};Zm.prototype.G=function(){return this.ja};(function(){var a={},b="ee.data.getAssetAcl ee.Serializer.toReadableCloudApiJSON ee.String ee.data.setApiKey ee.batch.Export.image.toAsset ee.Geometry.prototype.toGeoJSON ee.Deserializer.fromJSON ee.data.listImages ee.data.getInfo ee.Geometry.Rectangle ee.data.startIngestion ee.ComputedObject.prototype.getInfo ee.Number ee.ImageCollection ee.ImageCollection.prototype.getMap ee.data.setParamAugmenter ee.data.clearAuthToken ee.Serializer.toJSON ee.InitState ee.batch.Export.table.toCloudStorage ee.data.authenticateViaOauth ee.batch.Export.video.toCloudStorage ee.Image.prototype.rename ee.FeatureCollection.prototype.getInfo ee.ImageCollection.prototype.getVideoThumbURL ee.Image.cat ee.data.startTableIngestion ee.data.makeDownloadUrl ee.data.getAuthToken ee.data.copyAsset ee.Serializer.toReadableJSON ee.data.cancelTask ee.FeatureCollection.prototype.getMap ee.data.getTileUrl ee.data.authenticateViaPopup ee.FeatureCollection.prototype.select ee.data.getValue ee.ImageCollection.prototype.getFilmstripThumbURL ee.Image.prototype.getInfo ee.data.setDeadline ee.data.getAssetRootQuota ee.Image.prototype.expression ee.Collection.prototype.iterate ee.batch.Export.table.toAsset ee.Filter.gte ee.TILE_SIZE ee.data.getCloudApiEnabled ee.call ee.data.setAuthToken ee.data.getVideoThumbId ee.data.setProject ee.data.setAuthTokenRefresher ee.Function.prototype.apply ee.Filter.lte ee.ImageCollection.prototype.first ee.data.cancelOperation ee.ImageCollection.prototype.getInfo ee.data.withProfiling ee.batch.Export.image.toDrive ee.ApiFunction.lookup ee.data.getFilmstripThumbId ee.Terrain ee.Geometry.MultiLineString ee.data.authenticate ee.data.listBuckets ee.Geometry.prototype.serialize ee.data.updateTask ee.FeatureCollection.prototype.getDownloadURL ee.batch.Export.image.toCloudStorage ee.Geometry.prototype.toGeoJSONString ee.data.getAuthClientId ee.data.setCloudApiEnabled ee.Image.prototype.getThumbURL ee.Image.prototype.getDownloadURL ee.ComputedObject.prototype.aside ee.data.updateAsset ee.initialize ee.Collection.prototype.sort ee.Serializer.encodeCloudApi ee.data.getThumbId ee.reset ee.Geometry.MultiPolygon ee.Function.prototype.call ee.data.newTaskId ee.apply ee.Collection.prototype.filterBounds ee.data.getXsrfToken ee.Serializer.encode ee.Collection.prototype.filterDate ee.Filter.prototype.not ee.ApiFunction._call ee.Image.prototype.getMap ee.Serializer.encodeCloudApiPretty ee.batch.Export.map.toCloudStorage ee.data.createAssetHome ee.Element.prototype.set ee.data.startProcessing ee.Geometry ee.data.createFolder ee.Collection.prototype.filter ee.data.deleteAsset ee.Filter.bounds ee.data.getTaskList ee.Filter.eq ee.data.setExpressionAugmenter ee.data.setAssetProperties ee.Geometry.Point ee.Collection.prototype.limit ee.ComputedObject.prototype.serialize ee.Collection.prototype.filterMetadata ee.data.getDownloadId ee.data.makeTableDownloadUrl ee.Feature.prototype.getInfo ee.data.getAssetRoots ee.ComputedObject.prototype.evaluate ee.data.getTableDownloadId ee.data.authenticateViaPrivateKey ee.List ee.data.getAuthScopes ee.data.getMapId ee.Filter.metadata ee.Filter.inList ee.data.getTaskListWithLimit ee.Deserializer.decode ee.Feature.prototype.getMap ee.Filter.and ee.Filter.gt ee.Algorithms ee.Image.prototype.clip ee.Filter.or ee.data.listAssets ee.data.getOperation ee.Collection.prototype.map ee.Feature ee.data.getTaskStatus ee.data.createAsset ee.Filter ee.Filter.neq ee.ApiFunction._apply ee.Image.prototype.select ee.Geometry.LinearRing ee.batch.Export.videoMap.toCloudStorage ee.Dictionary ee.Filter.date ee.data.setAssetAcl ee.Date ee.batch.Export.video.toDrive ee.Filter.lt ee.data.getAsset ee.Geometry.Polygon ee.Geometry.MultiPoint ee.batch.Export.table.toDrive ee.data.makeThumbUrl ee.data.getApiBaseUrl ee.Image ee.Geometry.LineString ee.FeatureCollection ee.Image.rgb ee.data.renameAsset ee.data.getList ee.data.getTileBaseUrl ee.ImageCollection.prototype.select".split(" "),
|
|
c=[["assetId","opt_callback"],["obj"],["string"],["apiKey"],"image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels".split(" "),[],["json"],["body","opt_callback"],["id","opt_callback"],["coords","opt_proj","opt_geodesic","opt_evenOdd"],["taskId","request","opt_callback"],["opt_callback"],["number"],["args"],["opt_visParams","opt_callback"],["augmenter"],[],["obj"],[],"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "),
|
|
["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),["var_args"],["opt_callback"],["params","opt_callback"],["var_args"],["taskId","request","opt_callback"],["id"],[],["sourceId","destinationId","opt_overwrite","opt_callback"],["obj"],["taskId","opt_callback"],["opt_visParams","opt_callback"],["mapid",
|
|
"x","y","z"],["opt_success","opt_error"],["propertySelectors","opt_newProperties","opt_retainGeometry"],["params","opt_callback"],["params","opt_callback"],["opt_callback"],["milliseconds"],["rootId","opt_callback"],["expression","opt_map"],["algorithm","opt_first"],["collection","opt_description","opt_assetId"],["name","value"],[],[],["func","var_args"],"clientId tokenType accessToken expiresIn opt_extraScopes opt_callback opt_updateAuthLibrary".split(" "),["params","opt_callback"],["project"],["refresher"],
|
|
["namedArgs"],["name","value"],[],["operationName","opt_callback"],["opt_callback"],["hook","body","opt_this"],"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(" "),["name"],["params","opt_callback"],[],["coords","opt_proj","opt_geodesic","opt_maxError"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],
|
|
["opt_callback"],[],["taskId","action","opt_callback"],["opt_format","opt_selectors","opt_filename","opt_callback"],"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(" "),[],[],["enable"],["params","opt_callback"],["params","opt_callback"],["func","var_args"],["assetId","asset","updateMask","opt_callback"],["opt_baseurl","opt_tileurl",
|
|
"opt_successCallback","opt_errorCallback","opt_xsrfToken"],["property","opt_ascending"],["obj"],["params","opt_callback"],[],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["var_args"],["opt_count","opt_callback"],["func","namedArgs"],["geometry"],[],["obj","opt_isCompound"],["start","opt_end"],[],["name","var_args"],["opt_visParams","opt_callback"],["obj"],"image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey".split(" "),
|
|
["requestedId","opt_callback"],["var_args"],["taskId","params","opt_callback"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["path","opt_force","opt_callback"],["filter"],["assetId","opt_callback"],["geometry","opt_errorMargin"],["opt_callback"],["name","value"],["augmenter"],["assetId","properties","opt_callback"],["coords","opt_proj"],["max","opt_property","opt_ascending"],[],["name","operator","value"],["params","opt_callback"],["id"],["opt_callback"],["opt_callback"],["callback"],["params",
|
|
"opt_callback"],["privateKey","opt_success","opt_error","opt_extraScopes"],["list"],[],["params","opt_callback"],["name","operator","value"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["opt_limit","opt_callback"],["json"],["opt_visParams","opt_callback"],["var_args"],["name","value"],[],["geometry"],["var_args"],["body","opt_callback"],["operationName","opt_callback"],["algorithm","opt_dropNulls"],["geometry","opt_properties"],["taskId","opt_callback"],["value","opt_path",
|
|
"opt_force","opt_properties","opt_callback"],["opt_filter"],["name","value"],["name","namedArgs"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError"],"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles".split(" "),["opt_dict"],["start","opt_end"],["assetId","aclUpdate","opt_callback"],["date","opt_tz"],"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),
|
|
["name","value"],["id","opt_callback"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["coords","opt_proj"],"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "),["id"],[],["opt_args"],["coords","opt_proj","opt_geodesic","opt_maxError"],["args","opt_column"],["r","g","b"],["sourceId","destinationId","opt_callback"],["params","opt_callback"],[],["selectors","opt_names"]];[ij,Qe,sl,Kh,Zk,S.prototype.oc,Dl,$i,Xi,ek,Ui,L.prototype.C,pl,Y,
|
|
Y.prototype.getMap,ki,Sh,Je,Sl,dl,Dh,gl,W.prototype.me,X.prototype.C,Y.prototype.Sc,Nk,Wi,Bi,Th,gj,Le,Pi,X.prototype.getMap,ti,Ch,X.prototype.select,ui,Y.prototype.Pc,W.prototype.C,ii,mj,W.prototype.expression,U.prototype.Yd,fl,sk,256,Oh,Tl,Ph,xi,Lh,Qh,M.prototype.apply,uk,Y.prototype.first,Mi,Y.prototype.C,Ei,bl,Gj,yi,Il,hk,Eh,aj,S.prototype.D,Oi,X.prototype.Fa,al,S.prototype.sd,Uh,Nh,W.prototype.Rc,W.prototype.Fa,L.prototype.td,jj,Ol,U.prototype.sort,Oe,wi,Rl,jk,M.prototype.call,Fi,Ul,U.prototype.Md,
|
|
pi,Ie,U.prototype.Mc,T.prototype.$a,O,W.prototype.getMap,Pe,cl,cj,R.prototype.set,Si,S,ej,U.prototype.filter,hj,zk,Ki,pk,mi,lj,ak,U.prototype.limit,L.prototype.D,U.prototype.Nc,Ai,Di,V.prototype.C,bj,L.prototype.evaluate,Ci,Hh,Ok,Vh,si,Ak,yk,Ji,Cl,V.prototype.getMap,vk,tk,Ql,W.prototype.clip,wk,Zi,Ni,U.prototype.map,V,Ii,dj,T,qk,Hj,W.prototype.select,gk,il,Fl,xk,kj,zl,hl,rk,Xi,ik,dk,el,zi,ni,W,fk,X,Mk,fj,Yi,oi,Y.prototype.select].forEach(function(d,e){d&&(a[d.toString()]={name:b[e],paramNames:c[e]})});
|
|
p.EXPORTED_FN_INFO=a})();}).call(this);
|