2019-08-09 14:30:04 -07:00

388 lines
195 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.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},da;
if("function"==typeof Object.setPrototypeOf)da=Object.setPrototypeOf;else{var ea;a:{var fa={Ee:!0},ha={};try{ha.__proto__=fa;ea=ha.Ee;break a}catch(a){}ea=!1}da=ea?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var ia=da,ja=function(a,b){a.prototype=ca(b.prototype);a.prototype.constructor=a;if(ia)ia(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.j=b.prototype},ka="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},la="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:
this,ma=function(a,b){if(b){var c=la;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&&ka(c,a,{configurable:!0,writable:!0,value:b})}};ma("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 na=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+""};ma("String.prototype.endsWith",function(a){return a?a:function(b,c){var d=na(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}});
ma("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=na(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}});ma("String.prototype.repeat",function(a){return a?a:function(b){var c=na(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 pa=function(){pa=function(){};la.Symbol||(la.Symbol=qa)},ra=function(a,b){this.ye=a;ka(this,"description",{configurable:!0,writable:!0,value:b})};ra.prototype.toString=function(){return this.ye};
var qa=function(){function a(c){if(this instanceof a)throw new TypeError("Symbol is not a constructor");return new ra("jscomp_symbol_"+(c||"")+"_"+b++,c)}var b=0;return a}(),ta=function(){pa();var a=la.Symbol.iterator;a||(a=la.Symbol.iterator=la.Symbol("Symbol.iterator"));"function"!=typeof Array.prototype[a]&&ka(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return sa(aa(this))}});ta=function(){}},sa=function(a){ta();a={next:a};a[la.Symbol.iterator]=function(){return this};return a},
ua=function(a,b){ta();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};ma("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});
ma("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}});ma("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==na(this,b,"includes").indexOf(b,c||0)}});
var va=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},wa="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)va(d,e)&&(a[e]=d[e])}return a};ma("Object.assign",function(a){return a||wa});
ma("WeakMap",function(a){function b(){}function c(k){var m=typeof k;return"object"===m&&null!==k||"function"===m}function d(k){if(!va(k,f)){var m=new b;ka(k,f,{value:m})}}function e(k){var m=Object[k];m&&(Object[k]=function(p){if(p instanceof b)return p;d(p);return m(p)})}if(function(){if(!a||!Object.seal)return!1;try{var k=Object.seal({}),m=Object.seal({}),p=new a([[k,2],[m,3]]);if(2!=p.get(k)||3!=p.get(m))return!1;p["delete"](k);p.set(m,4);return!p.has(k)&&4==p.get(m)}catch(Q){return!1}}())return a;
var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0,h=function(k){this.K=(g+=Math.random()+1).toString();if(k){k=n(k);for(var m;!(m=k.next()).done;)m=m.value,this.set(m[0],m[1])}};h.prototype.set=function(k,m){if(!c(k))throw Error("Invalid WeakMap key");d(k);if(!va(k,f))throw Error("WeakMap key fail: "+k);k[f][this.K]=m;return this};h.prototype.get=function(k){return c(k)&&va(k,f)?k[f][this.K]:void 0};h.prototype.has=function(k){return c(k)&&va(k,f)&&va(k[f],
this.K)};h.prototype["delete"]=function(k){return c(k)&&va(k,f)&&va(k[f],this.K)?delete k[f][this.K]:!1};return h});
ma("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(),p=m.next();if(p.done||p.value[0]!=h||"s"!=p.value[1])return!1;p=m.next();return p.done||4!=p.value[0].x||"t"!=p.value[1]||!m.next().done?!1:!0}catch(Q){return!1}}())return a;ta();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(),p;!(p=m.next()).done;)p=
p.value,h.call(k,p[1],p[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 p=h.nb[m];if(p&&va(h.nb,m))for(h=0;h<p.length;h++){var Q=p[h];if(k!==k&&Q.key!==Q.key||k===Q.key)return{id:m,list:p,index:h,J:Q}}return{id:m,list:p,index:-1,J:void 0}},e=function(h,k){var m=h.M;return sa(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});
ma("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;ta();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});ma("Array.prototype.values",function(a){return a?a:function(){return ua(this,function(b,c){return c})}});ma("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)va(b,d)&&c.push([d,b[d]]);return c}});ma("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)va(b,d)&&c.push(b[d]);return c}});
ma("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.Qe()})}this.va.push(g)};var d=la.setTimeout;b.prototype.vd=function(g){d(g,0)};b.prototype.Qe=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.He(m)}}}this.va=null};b.prototype.He=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(p){k||(k=!0,m.call(h,p))}}var h=this,k=!1;return{resolve:g(this.nf),reject:g(this.hd)}};e.prototype.nf=function(g){if(g===this)this.hd(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof e)this.pf(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.mf(g):this.Pd(g)}};e.prototype.mf=function(g){var h=void 0;try{h=g.then}catch(k){this.hd(k);return}"function"==typeof h?this.qf(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.Se()};e.prototype.Se=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.pf=function(g){var h=this.Ic();g.Ob(h.resolve,h.reject)};e.prototype.qf=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,oa){return"function"==typeof K?function(lc){try{m(K(lc))}catch(Ga){p(Ga)}}:oa}var m,p,Q=new e(function(K,oa){m=K;p=oa});this.Ob(k(g,m),k(h,p));return Q};e.prototype["catch"]=function(g){return this.then(void 0,g)};e.prototype.Ob=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),p=m.next();!p.done;p=m.next())c(p.value).Ob(h,k)})};e.all=function(g){var h=n(g),k=h.next();return k.done?c([]):new e(function(m,p){function Q(lc){return function(Ga){K[lc]=Ga;oa--;0==oa&&m(K)}}var K=[],oa=0;do K.push(void 0),oa++,c(k.value).Ob(Q(K.length-
1),p),k=h.next();while(!k.done)})};return e});ma("String.prototype.padStart",function(a){return a?a:function(b,c){var d=na(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 xa=xa||{},q=this||self,r=function(a){return void 0!==a},t=function(a){return"string"==typeof a},ya=function(a){return"boolean"==typeof a},u=function(a){return"number"==typeof a},za=/^[\w+/_-]+[=]{0,2}$/,Aa=null,Ba=function(a){a=a.split(".");for(var b=q,c=0;c<a.length;c++)if(b=b[a[c]],null==b)return null;return b},Ca=function(){},Da=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==
c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},Ea=function(a){return null!=a},v=function(a){return"array"==Da(a)},Fa=
function(a){var b=Da(a);return"array"==b||"object"==b&&"number"==typeof a.length},Ha=function(a){return w(a)&&"function"==typeof a.getFullYear},x=function(a){return"function"==Da(a)},w=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},Ia="closure_uid_"+(1E9*Math.random()>>>0),Ja=0,Ka=function(a,b,c){return a.call.apply(a.bind,arguments)},La=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")?Ka:La;return y.apply(null,arguments)},Ma=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)}},Na=Date.now||function(){return+new Date},z=function(a,b){a=a.split(".");var c=q;a[0]in c||"undefined"==typeof c.execScript||
c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&r(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.j=b.prototype;a.prototype=new c;a.prototype.constructor=a};var B=function(){this.fa=this.fa;this.dc=this.dc};B.prototype.fa=!1;B.prototype.ea=function(){this.fa||(this.fa=!0,this.i())};B.prototype.i=function(){if(this.dc)for(;this.dc.length;)this.dc.shift()()};var Oa=function(a){a&&"function"==typeof a.ea&&a.ea()};var C=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Ma=!1;this.oe=!0};C.prototype.stopPropagation=function(){this.Ma=!0};C.prototype.preventDefault=function(){this.defaultPrevented=!0;this.oe=!1};var Pa=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,Pa);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};A(Pa,Error);Pa.prototype.name="CustomError";var Qa;var Ra=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");Pa.call(this,c+a[d])};A(Ra,Pa);Ra.prototype.name="AssertionError";
var Sa=function(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var f=d}else a&&(e+=": "+a,f=b);throw new Ra(""+e,f||[]);},D=function(a,b,c){a||Sa("",null,b,Array.prototype.slice.call(arguments,2));return a},Ta=function(a,b){throw new Ra("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ua=function(a,b,c){u(a)||Sa("Expected number but got %s: %s.",[Da(a),a],b,Array.prototype.slice.call(arguments,2));return a},Va=function(a,b,c){t(a)||Sa("Expected string but got %s: %s.",[Da(a),
a],b,Array.prototype.slice.call(arguments,2))},Wa=function(a,b,c){x(a)||Sa("Expected function but got %s: %s.",[Da(a),a],b,Array.prototype.slice.call(arguments,2))},Xa=function(a,b,c){w(a)||Sa("Expected object but got %s: %s.",[Da(a),a],b,Array.prototype.slice.call(arguments,2));return a};var Ya=Array.prototype.indexOf?function(a,b){D(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},Za=Array.prototype.lastIndexOf?function(a,b){D(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},$a=Array.prototype.forEach?function(a,b,c){D(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)},ab=Array.prototype.filter?function(a,b){D(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},bb=Array.prototype.map?function(a,
b,c){D(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},cb=Array.prototype.some?function(a,b){D(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},db=Array.prototype.every?function(a,b,c){D(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},eb=function(a,b){var c=0;$a(a,function(d,e,f){b.call(void 0,d,e,f)&&++c},void 0);return c},gb=function(a){a:{var b=fb;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]},hb=function(a,b){return 0<=Ya(a,b)},ib=function(a){if(!v(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},kb=
function(a,b){b=Ya(a,b);var c;(c=0<=b)&&jb(a,b);return c},jb=function(a,b){D(null!=a.length);Array.prototype.splice.call(a,b,1)},lb=function(a){return Array.prototype.concat.apply([],arguments)},mb=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[]},nb=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(Fa(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)}},ob=function(a,b,c){D(null!=a.length);
return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},pb=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++];var f=e;f=w(f)?"o"+(f[Ia]||(f[Ia]=++Ja)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c},qb=function(a){var b=[];if(0>a-0)return[];for(var c=0;c<a;c+=1)b.push(c);return b},rb=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=ob(d,
e,e+8192);f=rb.apply(null,f);for(var g=0;g<f.length;g++)b.push(f[g])}else b.push(d)}return b};var sb=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},tb=/&/g,ub=/</g,vb=/>/g,wb=/"/g,xb=/'/g,yb=/\x00/g,zb=/[\x00&<>"']/,Ab=function(a,b){return a<b?-1:a>b?1:0};var Bb;a:{var Cb=q.navigator;if(Cb){var Db=Cb.userAgent;if(Db){Bb=Db;break a}}Bb=""}var Eb=function(a){return-1!=Bb.indexOf(a)};var Fb=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},Gb=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},Hb=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},Ib=function(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1},Jb=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},Kb=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},Lb=function(a,b){for(var c in a)if(a[c]==b)return!0;return!1},Nb=function(a){var b=
Mb,c;for(c in b)if(a.call(void 0,b[c],c,b))return c},Ob=function(a){for(var b in a)return!1;return!0},Pb=function(a,b){b in a&&delete a[b]},Qb=function(a){var b={},c;for(c in a)b[c]=a[c];return b},Rb=function(a){var b=Da(a);if("object"==b||"array"==b){if(x(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=Rb(a[c]);return b}return a},Sb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Tb=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<Sb.length;f++)c=Sb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var Ub=function(a,b){a:{try{var c=a&&a.ownerDocument,d=c&&(c.defaultView||c.parentWindow);d=d||q;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;Ta("Argument is not a %s (or a non-Element, non-Location mock); got: %s",
b,f)}};var Vb=function(a){return a};var Yb=function(a,b){this.nd=a===Wb&&b||"";this.Ce=Xb};Yb.prototype.Ia=!0;Yb.prototype.Ga=function(){return this.nd};Yb.prototype.toString=function(){return"Const{"+this.nd+"}"};var Zb=function(a){if(a instanceof Yb&&a.constructor===Yb&&a.Ce===Xb)return a.nd;Ta("expected object of type Const, got '"+a+"'");return"type_error:Const"},Xb={},Wb={},$b=new Yb(Wb,"");var ac=function(){this.dd=""};ac.prototype.Ia=!0;ac.prototype.Ga=function(){return this.dd.toString()};ac.prototype.toString=function(){return"SafeScript{"+this.dd+"}"};ac.prototype.qa=function(a){this.dd=a;return this};(new ac).qa("");var cc=function(){this.gc="";this.we=null;this.De=bc};cc.prototype.Ia=!0;cc.prototype.Ga=function(){return this.gc.toString()};cc.prototype.toString=function(){return"TrustedResourceUrl{"+this.gc+"}"};
var dc=function(a){if(a instanceof cc&&a.constructor===cc&&a.De===bc)return a.gc;Ta("expected object of type TrustedResourceUrl, got '"+a+"' of type "+Da(a));return"type_error:TrustedResourceUrl"},ic=function(a){var b=Zb(ec);if(!fc.test(b))throw Error("Invalid TrustedResourceUrl format: "+b);var c=b.replace(gc,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 Yb?Zb(d):encodeURIComponent(String(d))});return hc(c)},gc=/%{(\w+)}/g,fc=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,bc={},hc=function(a){var b=new cc;b.gc=a;return b};var kc=function(){this.fc="";this.Be=jc};kc.prototype.Ia=!0;kc.prototype.Ga=function(){return this.fc.toString()};kc.prototype.toString=function(){return"SafeUrl{"+this.fc+"}"};
var mc=function(a){if(a instanceof kc&&a.constructor===kc&&a.Be===jc)return a.fc;Ta("expected object of type SafeUrl, got '"+a+"' of type "+Da(a));return"type_error:SafeUrl"},nc=/^(?: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,pc=function(a){if(nc.test(a.type)){var b=r(q.URL)&&r(q.URL.createObjectURL)?q.URL:r(q.webkitURL)&&r(q.webkitURL.createObjectURL)?
q.webkitURL:r(q.createObjectURL)?q: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 oc(a)},jc={},oc=function(a){var b=new kc;b.fc=a;return b};oc("about:blank");var qc=function(){this.fd=""};qc.prototype.Ia=!0;qc.prototype.Ga=function(){return this.fd};qc.prototype.toString=function(){return"SafeStyle{"+this.fd+"}"};qc.prototype.qa=function(a){this.fd=a;return this};(new qc).qa("");var rc=function(){this.ed=""};rc.prototype.Ia=!0;rc.prototype.Ga=function(){return this.ed};rc.prototype.toString=function(){return"SafeStyleSheet{"+this.ed+"}"};rc.prototype.qa=function(a){this.ed=a;return this};(new rc).qa("");var tc=function(){this.ec="";this.Ae=sc};tc.prototype.Ia=!0;tc.prototype.Ga=function(){return this.ec.toString()};tc.prototype.toString=function(){return"SafeHtml{"+this.ec+"}"};var vc=function(){var a=uc;if(a instanceof tc&&a.constructor===tc&&a.Ae===sc)return a.ec;Ta("expected object of type SafeHtml, got '"+a+"' of type "+Da(a));return"type_error:SafeHtml"},sc={};tc.prototype.qa=function(a){this.ec=a;return this};(new tc).qa("<!DOCTYPE html>");var uc=(new tc).qa("");(new tc).qa("<br>");var wc=function(a){var b=hc(Zb($b));Ub(a,"HTMLIFrameElement");a.src=b.we?b.we:dc(b).toString()},xc=function(a,b){Ub(a,"HTMLScriptElement");a.src=dc(b);if(null===Aa)b:{b=q.document;if((b=b.querySelector&&b.querySelector("script[nonce]"))&&(b=b.nonce||b.getAttribute("nonce"))&&za.test(b)){Aa=b;break b}Aa=""}b=Aa;b&&a.setAttribute("nonce",b)};var yc=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")},zc=function(a){zb.test(a)&&(-1!=a.indexOf("&")&&(a=a.replace(tb,"&amp;")),-1!=a.indexOf("<")&&(a=a.replace(ub,"&lt;")),-1!=a.indexOf(">")&&(a=a.replace(vb,"&gt;")),-1!=a.indexOf('"')&&(a=a.replace(wb,"&quot;")),-1!=a.indexOf("'")&&(a=a.replace(xb,"&#39;")),-1!=a.indexOf("\x00")&&(a=a.replace(yb,"&#0;")));return a},Ac=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 Bc=function(a){Bc[" "](a);return a};Bc[" "]=Ca;var Dc=function(a,b){var c=Cc;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var Ec=Eb("Opera"),Fc=Eb("Trident")||Eb("MSIE"),Gc=Eb("Edge"),Hc=Eb("Gecko")&&!(-1!=Bb.toLowerCase().indexOf("webkit")&&!Eb("Edge"))&&!(Eb("Trident")||Eb("MSIE"))&&!Eb("Edge"),Ic=-1!=Bb.toLowerCase().indexOf("webkit")&&!Eb("Edge"),Jc=function(){var a=q.document;return a?a.documentMode:void 0},Kc;
a:{var Lc="",Mc=function(){var a=Bb;if(Hc)return/rv:([^\);]+)(\)|;)/.exec(a);if(Gc)return/Edge\/([\d\.]+)/.exec(a);if(Fc)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Ic)return/WebKit\/(\S+)/.exec(a);if(Ec)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Mc&&(Lc=Mc?Mc[1]:"");if(Fc){var Nc=Jc();if(null!=Nc&&Nc>parseFloat(Lc)){Kc=String(Nc);break a}}Kc=Lc}
var Oc=Kc,Cc={},Pc=function(a){return Dc(a,function(){for(var b=0,c=sb(String(Oc)).split("."),d=sb(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=Ab(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||Ab(0==g[2].length,0==h[2].length)||Ab(g[2],h[2]);g=g[3];h=h[3]}while(0==b)}return 0<=b})},Qc;
Qc=q.document&&Fc?Jc():void 0;var Rc=Object.freeze||function(a){return a};var Sc=!Fc||9<=Number(Qc),Tc=Fc&&!Pc("9"),Uc=function(){if(!q.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{q.addEventListener("test",Ca,b),q.removeEventListener("test",Ca,b)}catch(c){}return a}();var Vc=function(a,b){C.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(Vc,C);var Wc=Rc({2:"touch",3:"pen",4:"mouse"});
Vc.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(Hc){a:{try{Bc(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=Ic||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=Ic||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:Wc[a.pointerType]||"";this.state=a.state;this.$=a;a.defaultPrevented&&this.preventDefault()};Vc.prototype.stopPropagation=function(){Vc.j.stopPropagation.call(this);this.$.stopPropagation?this.$.stopPropagation():this.$.cancelBubble=!0};
Vc.prototype.preventDefault=function(){Vc.j.preventDefault.call(this);var a=this.$;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Tc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Xc="closure_listenable_"+(1E6*Math.random()|0),Yc=function(a){return!(!a||!a[Xc])},Zc=0;var $c=function(a,b,c,d,e){this.listener=a;this.hc=null;this.src=b;this.type=c;this.capture=!!d;this.pa=e;this.key=++Zc;this.eb=this.Nb=!1},ad=function(a){a.eb=!0;a.listener=null;a.hc=null;a.src=null;a.pa=null};var bd=function(a){this.src=a;this.H={};this.Jb=0};bd.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.H[f];a||(a=this.H[f]=[],this.Jb++);var g=cd(a,b,d,e);-1<g?(b=a[g],c||(b.Nb=!1)):(b=new $c(b,this.src,f,!!d,e),b.Nb=c,a.push(b));return b};bd.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.H))return!1;var e=this.H[a];b=cd(e,b,c,d);return-1<b?(ad(e[b]),jb(e,b),0==e.length&&(delete this.H[a],this.Jb--),!0):!1};
var dd=function(a,b){var c=b.type;c in a.H&&kb(a.H[c],b)&&(ad(b),0==a.H[c].length&&(delete a.H[c],a.Jb--))};bd.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,ad(d[e]);delete this.H[c];this.Jb--}};bd.prototype.rb=function(a,b,c,d){a=this.H[a.toString()];var e=-1;a&&(e=cd(a,b,c,d));return-1<e?a[e]:null};
bd.prototype.hasListener=function(a,b){var c=r(a),d=c?a.toString():"",e=r(b);return Ib(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 cd=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 ed="closure_lm_"+(1E6*Math.random()|0),fd={},gd=0,id=function(a,b,c,d,e){if(d&&d.once)return hd(a,b,c,d,e);if(v(b)){for(var f=0;f<b.length;f++)id(a,b[f],c,d,e);return null}c=jd(c);return Yc(a)?a.ha(b,c,w(d)?!!d.capture:!!d,e):kd(a,b,c,!1,d,e)},kd=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=w(e)?!!e.capture:!!e,h=ld(a);h||(a[ed]=h=new bd(a));c=h.add(b,c,d,g,f);if(c.hc)return c;d=md();c.hc=d;d.src=a;d.listener=c;if(a.addEventListener)Uc||(e=g),void 0===e&&(e=!1),a.addEventListener(b.toString(),
d,e);else if(a.attachEvent)a.attachEvent(nd(b.toString()),d);else if(a.addListener&&a.removeListener)D("change"===b,"MediaQueryList only has a change event"),a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");gd++;return c},md=function(){var a=od,b=Sc?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},hd=function(a,b,c,d,e){if(v(b)){for(var f=0;f<b.length;f++)hd(a,b[f],c,d,e);return null}c=jd(c);return Yc(a)?
a.Ab(b,c,w(d)?!!d.capture:!!d,e):kd(a,b,c,!0,d,e)},pd=function(a,b,c,d,e){if(v(b))for(var f=0;f<b.length;f++)pd(a,b[f],c,d,e);else d=w(d)?!!d.capture:!!d,c=jd(c),Yc(a)?a.sc(b,c,d,e):a&&(a=ld(a))&&(b=a.rb(b,c,d,e))&&qd(b)},qd=function(a){if(!u(a)&&a&&!a.eb){var b=a.src;if(Yc(b))dd(b.Z,a);else{var c=a.type,d=a.hc;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(nd(c),d):b.addListener&&b.removeListener&&b.removeListener(d);gd--;(c=ld(b))?(dd(c,a),0==c.Jb&&(c.src=
null,b[ed]=null)):ad(a)}}},nd=function(a){return a in fd?fd[a]:fd[a]="on"+a},sd=function(a,b,c,d){var e=!0;if(a=ld(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=rd(f,d),e=e&&!1!==f)}return e},rd=function(a,b){var c=a.listener,d=a.pa||a.src;a.Nb&&qd(a);return c.call(d,b)},od=function(a,b){if(a.eb)return!0;if(!Sc){var c=b||Ba("window.event");b=new Vc(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=sd(c[e],a,!0,b);d=d&&f}for(e=0;!b.Ma&&e<c.length;e++)b.currentTarget=c[e],f=sd(c[e],a,!1,b),d=d&&f}return d}return rd(a,new Vc(b,this))},ld=function(a){a=a[ed];return a instanceof bd?a:null},td="__closure_events_fn_"+(1E9*Math.random()>>>0),jd=function(a){D(a,"Listener can not be null.");if(x(a))return a;D(a.handleEvent,
"An object listener must have handleEvent method.");a[td]||(a[td]=function(b){return a.handleEvent(b)});return a[td]};var E=function(){B.call(this);this.Z=new bd(this);this.Fe=this;this.cd=null};A(E,B);E.prototype[Xc]=!0;l=E.prototype;l.addEventListener=function(a,b,c,d){id(this,a,b,c,d)};l.removeEventListener=function(a,b,c,d){pd(this,a,b,c,d)};
l.dispatchEvent=function(a){ud(this);var b=this.cd;if(b){var c=[];for(var d=1;b;b=b.cd)c.push(b),D(1E3>++d,"infinite loop")}b=this.Fe;d=a.type||a;if(t(a))a=new C(a,b);else if(a instanceof C)a.target=a.target||b;else{var e=a;a=new C(d,b);Tb(a,e)}e=!0;if(c)for(var f=c.length-1;!a.Ma&&0<=f;f--){var g=a.currentTarget=c[f];e=vd(g,d,!0,a)&&e}a.Ma||(g=a.currentTarget=b,e=vd(g,d,!0,a)&&e,a.Ma||(e=vd(g,d,!1,a)&&e));if(c)for(f=0;!a.Ma&&f<c.length;f++)g=a.currentTarget=c[f],e=vd(g,d,!1,a)&&e;return e};
l.i=function(){E.j.i.call(this);this.Z&&this.Z.Eb(void 0);this.cd=null};l.ha=function(a,b,c,d){ud(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 vd=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.Nb&&dd(a.Z,g);e=!1!==h.call(k,d)&&e}}return e&&0!=d.oe};
E.prototype.rb=function(a,b,c,d){return this.Z.rb(String(a),b,c,d)};E.prototype.hasListener=function(a,b){return this.Z.hasListener(r(a)?String(a):void 0,b)};var ud=function(a){D(a.Z,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var wd="StopIteration"in q?q.StopIteration:{message:"StopIteration",stack:""},xd=function(){};xd.prototype.next=function(){throw wd;};xd.prototype.Ra=function(){return this};
var yd=function(a){if(a instanceof xd)return a;if("function"==typeof a.Ra)return a.Ra(!1);if(Fa(a)){var b=0,c=new xd;c.next=function(){for(;;){if(b>=a.length)throw wd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},zd=function(a,b){if(Fa(a))try{$a(a,b,void 0)}catch(c){if(c!==wd)throw c;}else{a=yd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==wd)throw c;}}};var Ad=function(a,b){this.f={};this.l=[];this.Kb=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=Ad.prototype;l.o=function(){return this.m};l.A=function(){Bd(this);for(var a=[],b=0;b<this.l.length;b++)a.push(this.f[this.l[b]]);return a};l.ba=function(){Bd(this);return this.l.concat()};l.wa=function(a){return Cd(this.f,a)};
l.mb=function(a){for(var b=0;b<this.l.length;b++){var c=this.l[b];if(Cd(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||Dd;Bd(this);for(var c,d=0;c=this.l[d];d++)if(!b(this.get(c),a.get(c)))return!1;return!0};var Dd=function(a,b){return a===b};Ad.prototype.isEmpty=function(){return 0==this.m};Ad.prototype.clear=function(){this.f={};this.Kb=this.m=this.l.length=0};
Ad.prototype.remove=function(a){return Cd(this.f,a)?(delete this.f[a],this.m--,this.Kb++,this.l.length>2*this.m&&Bd(this),!0):!1};var Bd=function(a){if(a.m!=a.l.length){for(var b=0,c=0;b<a.l.length;){var d=a.l[b];Cd(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],Cd(e,d)||(a.l[c++]=d,e[d]=1),b++;a.l.length=c}};l=Ad.prototype;l.get=function(a,b){return Cd(this.f,a)?this.f[a]:b};
l.set=function(a,b){Cd(this.f,a)||(this.m++,this.l.push(a),this.Kb++);this.f[a]=b};l.addAll=function(a){if(a instanceof Ad)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 Ad(this)};
l.Ra=function(a){Bd(this);var b=0,c=this.Kb,d=this,e=new xd;e.next=function(){if(c!=d.Kb)throw Error("The map has changed since the iterator was created");if(b>=d.l.length)throw wd;var f=d.l[b++];return a?f:d.f[f]};return e};var Cd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Ed=function(a){if(a.o&&"function"==typeof a.o)a=a.o();else if(Fa(a)||t(a))a=a.length;else{var b=0,c;for(c in a)b++;a=b}return a},Fd=function(a){if(a.A&&"function"==typeof a.A)return a.A();if(t(a))return a.split("");if(Fa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Jb(a)},Gd=function(a){if(a.ba&&"function"==typeof a.ba)return a.ba();if(!a.A||"function"!=typeof a.A){if(Fa(a)||t(a)){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return Kb(a)}},Hd=function(a,b,
c){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,c);else if(Fa(a)||t(a))$a(a,b,c);else for(var d=Gd(a),e=Fd(a),f=e.length,g=0;g<f;g++)b.call(c,e[g],d&&d[g],a)},Id=function(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(Fa(a)||t(a))return db(a,b,void 0);for(var c=Gd(a),d=Fd(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 Jd=function(a){this.f=new Ad;a&&this.addAll(a)},Kd=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[Ia]||(a[Ia]=++Ja)):b.substr(0,1)+a};l=Jd.prototype;l.o=function(){return this.f.o()};l.add=function(a){this.f.set(Kd(a),a)};l.addAll=function(a){a=Fd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};l.Eb=function(a){a=Fd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};l.remove=function(a){return this.f.remove(Kd(a))};l.clear=function(){this.f.clear()};l.isEmpty=function(){return this.f.isEmpty()};
l.contains=function(a){return this.f.wa(Kd(a))};var Ld=function(a,b){var c=new Jd;b=Fd(b);for(var d=0;d<b.length;d++){var e=b[d];a.contains(e)&&c.add(e)}return c},Md=function(a,b){a=a.clone();a.Eb(b);return a};Jd.prototype.A=function(){return this.f.A()};Jd.prototype.clone=function(){return new Jd(this)};Jd.prototype.equals=function(a){return this.o()==Ed(a)&&Nd(this,a)};
var Nd=function(a,b){var c=Ed(b);if(a.o()>c)return!1;!(b instanceof Jd)&&5<c&&(b=new Jd(b));return Id(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):Fa(e)||t(e)?hb(e,d):Lb(e,d)})};Jd.prototype.Ra=function(){return this.f.Ra(!1)};var Od=function(a,b,c){E.call(this);this.bf=b;this.token=c;this.Ca=[];this.qd=new Jd;this.Aa=0;this.url=a};A(Od,E);z("ee.AbstractOverlay",Od);var Pd=function(a,b,c){var d=1<<c,e=b.x%d;0>e&&(e+=d);return[a.bf,c,e,b.y].join("/")};Od.prototype.Qc=function(){return this.Ca.length};var Qd=function(a){C.call(this,"tileevent");this.count=a};A(Qd,C);var Rd={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:{getCapabilities:{id:"earthengine.projects.getCapabilities",path:"v1alpha/{+parent}/capabilities",httpMethod:"GET",parameters:{parent:{location:"path",required:!0}}},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}}},search:{id:"earthengine.projects.assets.search",path:"v1alpha/{+project}/assets:search",httpMethod:"GET",parameters:{project:{location:"path",required:!0},query:{location:"query",required:!1},pageSize:{location:"query",required:!1},nextPageToken:{location:"query",required:!1},fieldMask:{location:"query",required:!1}}},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 Sd=function(){},Td=function(a){return{constantValue:a}},Ud=function(a){return{valueReference:a}},Vd=function(a,b){return{functionInvocationValue:{functionName:a,arguments:b}}},Wd=function(a,b){return{functionInvocationValue:{arguments:b,functionReference:a}}},Xd=function(a,b){return{functionDefinitionValue:{argumentNames:a,body:b}}},Yd=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}},Zd=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}},$d=function(a){if(!a)return"VERTICAL";a=a.toUpperCase();if("HORIZONTAL"!==a||"VERTICAL"!==a)throw Error('Orientation must be "horizontal" or "vertical"');return a},ae=function(a){if(!a)return[];if(t(a))return a.split(",");
if(v(a))return a;throw Error("Invalid band list "+a);},de=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=be(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=be(a,"min","max");0!==c.length&&(b.ranges=c);a=ce(a.gamma);
if(1<a.length)throw Error("Only one gamma value is supported");1===a.length&&(b.gamma={value:a[0]});return Ob(b)?null:b},ce=function(a){return a?a.split(",").map(Number):[]},be=function(a,b,c){var d=ce(a[b]),e=ce(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})},fe=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},ge=function(a){return(a=/^(projects\/[a-z][a-z0-9\-]{4,28}[a-z0-9])\/.+/.exec(a))?a[1]:"projects/earthengine-legacy"},F=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},he=function(a){switch(a){case "ImageCollection":return"IMAGE_COLLECTION";case "Folder":return"FOLDER";default:return a}},
ie=function(a){var b={};a.id&&(b.parent=F(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},ke=function(a){return(a.assets||[]).map(je)},me=function(a){return(a.images||[]).map(le)},ne=function(a){switch(a){case "ALGORITHM":return"Algorithm";case "FOLDER":return"Folder";case "IMAGE":return"Image";case "IMAGE_COLLECTION":return"ImageCollection";
case "TABLE":return"Table";default:return"Unknown"}},je=function(a){var b=oe(ne(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},pe=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},le=function(a){return oe("Image",
a.name)},oe=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},re=function(a){var b={};a.id&&(b.parent=F(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=qe(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},qe=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("],[")+"]]]}"},se=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},te=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}},ue=function(a){return"projects/earthengine-legacy/operations/"+a},ve=function(a){var b=/^.*operations\/(.*)$/.exec(a);return b?b[1]:a},we=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=ve(a.name),b.name=a.name);b.task_type=e.type||"UNKNOWN";b.output_url=e.destinationUris;b.source_url=e.scriptUri;return b},xe=function(a){var b={started:"OK"};
a.name&&(b.taskId=ve(a.name),b.name=a.name);a.error&&(b.note=a.error.message);return b},ye=function(a){return a.primaryPath?{uris:[a.primaryPath].concat(ba(a.additionalPaths||[]))}:a},Be=function(a){var b=Object.assign({},a);delete b.id;b.name=F(a.id);b.tilesets=(a.tilesets||[]).map(function(c){var d=(c.sources||[]).map(ye);return Object.assign({},c,{sources:d})});b.bands=(a.bands||[]).map(function(c){var d=ze(c.missingData);return Object.assign({},c,{missingData:d})});b.missingData=ze(a.missingData);
b.maskBands=rb((b.tilesets||[]).map(Ae));b.pyramidingPolicy=a.pyramidingPolicy||null;return b},Ae=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},Ce=function(a){var b=Object.assign({},a);delete b.id;b.name=F(a.id);b.sources=
(a.sources||[]).map(ye);return b},ze=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 De=function(){this.ma=-1};var Ee=function(){this.ma=-1;this.ma=64;this.F=Array(4);this.Ie=Array(this.ma);this.qc=this.kb=0;this.reset()};A(Ee,De);Ee.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 Fe=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};
Ee.prototype.update=function(a,b){r(b)||(b=a.length);for(var c=b-this.ma,d=this.Ie,e=this.kb,f=0;f<b;){if(0==e)for(;f<=c;)Fe(this,a,f),f+=this.ma;if(t(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.ma){Fe(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.ma){Fe(this,d);e=0;break}}this.kb=e;this.qc+=b};
Ee.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 He=function(a){return(new Ge(void 0)).D(a)},Ge=function(a){this.jc=a};Ge.prototype.D=function(a){var b=[];Ie(this,a,b);return b.join("")};
var Ie=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],Ie(a,a.jc?a.jc.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),Je(d,c),c.push(":"),Ie(a,a.jc?a.jc.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":Je(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);}}},Ke={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Le=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,Je=function(a,b){b.push('"',a.replace(Le,function(c){var d=Ke[c];d||(d="\\u"+(c.charCodeAt(0)|65536).toString(16).substr(1),
Ke[c]=d);return d}),'"')};var Me=function(a){this.ua="__ee_hash__";this.Zb=!1!==a;this.ia=[];this.U={};this.jb=[]};z("ee.Serializer",Me);var Ne=new Ge,Oe=new Ee,Qe=function(a,b){return Pe(new Me(r(b)?b:!0),a)};z("ee.Serializer.encode",Qe);var Re=function(a){return Ne.D(Qe(a))};z("ee.Serializer.toJSON",Re);var Te=function(a){return Se(Qe(a,!1))};z("ee.Serializer.toReadableJSON",Te);
var Se=function(a){return"JSON"in q?q.JSON.stringify(a,null," "):Ne.D(a)},Pe=function(a,b){b=a.Rb(b);a.Zb&&(b=w(b)&&"ValueRef"==b.type&&1==a.ia.length?a.ia[0][1]:{type:"CompoundValue",scope:a.ia,value:b},a.ia=[],$a(a.jb,y(function(c){delete c[this.ua]},a)),a.jb=[],a.U={});return b};
Me.prototype.Rb=function(a){if(!r(a))throw Error("Can't encode an undefined value.");var b=w(a)?a[this.ua]:null;if(this.Zb&&null!=b&&this.U[b])return{type:"ValueRef",value:this.U[b]};if(null===a||ya(a)||u(a)||t(a))return a;if(Ha(a))return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Sd){var c=a.encode(y(this.Rb,this));if(!(v(c)||w(c)&&"ArgumentRef"!=c.type))return c}else if(v(a))c=bb(a,function(e){return this.Rb(e)},this);else if(w(a)&&!x(a))c=Hb(a,
function(e){if(!x(e))return this.Rb(e)},this),Pb(c,this.ua),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.Zb){b=Ue(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 Ue=function(a){Oe.reset();Oe.update(Ne.D(a));return Oe.digest().toString()},We=function(a){return Ve(new Me(!0),a)};z("ee.Serializer.encodeCloudApi",We);
var Xe=function(a){a=Ve(new Me(!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",Xe);var Ye=function(a){return Se(Xe(a))};z("ee.Serializer.toReadableCloudApiJSON",Ye);
var Ve=function(a,b){try{var c=Ze(a,b);return $e(new af(c,a.ia,a.Zb))}finally{a.jb.forEach(function(d){return delete d[a.ua]}),a.jb=[],a.U={},a.ia=[]}},Ze=function(a,b){var c=function(e){var f=Ue(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||ya(b)||t(b)||u(b))return c(Td(b));if(Ha(b))return c(Vd("Date",{value:Td(Math.floor(b.getTime()))}));if(b instanceof Sd)return c(b.P(function(e){return Ze(a,
e)}));if(v(b))return c({arrayValue:{values:b.map(function(e){return Ud(Ze(a,e))})}});if(w(b)&&!x(b)){var d={};Object.keys(b).sort().forEach(function(e){d[e]=Ud(Ze(a,b[e]))});return c({dictionaryValue:{values:d}})}throw Error("Can't encode object: "+b);},af=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?bf(this):null;this.ie={};this.gd={};this.ef=0},$e=function(a){return{result:cf(a,a.pe),values:a.ie}},cf=function(a,b){if(b in a.gd)return a.gd[b];
var c=String(a.ef++);a.gd[b]=c;a.ie[c]=df(a,a.values[b]);return c},df=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]?df(a,c):ef(c)?c:Ud(cf(a,b.valueReference));if(null!=b.arrayValue){var d=b.arrayValue.values.map(function(h){return df(a,h)});return d.every(c)?Td(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]=df(a,g);null!==e&&c(d[f])?e[f]=d[f].constantValue:e=null}return null!==e?Td(e):{dictionaryValue:{values:d}}}if(null!=b.functionDefinitionValue)return c=b.functionDefinitionValue,Xd(c.argumentNames||[],cf(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]=df(a,c.arguments[b]);return c.functionName?Vd(c.functionName,d):Wd(cf(a,c.functionReference||""),d)}throw Error("Can't optimize value: "+b);},ef=function(a){var b=a.constantValue;return void 0!==b?null===b||u(b)||ya(b):null!=a.argumentReference},bf=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 jf=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b={expression:We(a.element),description:ff(a.description),fileExportOptions:null,assetExportOptions:null,grid:null,maxPixels:ff(a.maxPixels),requestId:ff(a.id)},c=gf(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":b.fileExportOptions=hf(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:F(a.assetId)},pyramidingPolicy:d,pyramidingPolicyOverrides:Ob(c)?null:c};break;default:throw Error('Export destination "'+c+'" unknown');}return b},nf=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:We(a.element),description:ff(a.description),fileExportOptions:null,assetExportOptions:null,selectors:b,maxErrorMeters:kf(a.maxErrorMeters),requestId:ff(a.id)};
var c=gf(a);switch(c){case "GOOGLE_CLOUD_STORAGE":case "DRIVE":var d={gcsDestination:null,driveDestination:null,fileFormat:Zd(a.fileFormat)};"GOOGLE_CLOUD_STORAGE"===c?d.gcsDestination=lf(a):d.driveDestination=mf(a);b.fileExportOptions=d;break;case "ASSET":b.assetExportOptions={earthEngineDestination:{name:F(a.assetId)}};break;default:throw Error('Export destination "'+c+'" unknown');}return b},pf=function(a){if(null==a.element)throw Error('"element" not found in params '+a);var b={expression:We(a.element),
description:ff(a.description),videoOptions:{framesPerSecond:kf(a.framesPerSecond),maxFrames:kf(a.maxFrames),maxPixelsPerFrame:ff(a.maxPixels)},fileExportOptions:null,requestId:ff(a.id)};b.fileExportOptions=of(a,gf(a));return b},rf=function(a){if(null==a.element)throw Error('"element" not found in params '+a);return{expression:We(a.element),description:ff(a.description),tileOptions:qf(a),tileExportOptions:hf(a,"GOOGLE_CLOUD_STORAGE"),requestId:ff(a.id)}},sf=function(a){if(null==a.element)throw Error('"element" not found in params '+
a);return{expression:We(a.element),description:ff(a.description),videoOptions:{framesPerSecond:kf(a.framesPerSecond),maxFrames:kf(a.maxFrames),maxPixelsPerFrame:null},tileOptions:qf(a),tileExportOptions:of(a,"GOOGLE_CLOUD_STORAGE"),requestId:ff(a.id)}};function ff(a){return null!=a?String(a):null}function kf(a){return null!=a?Number(a):null}
var gf=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},uf=function(a){var b={compress:!!a.tfrecordCompressed,maxSizeBytes:ff(a.tfrecordMaxFileSize),sequenceData:!!a.tfrecordSequenceData,collapseBands:!!a.tfrecordCollapseBands,maxMaskedRatio:kf(a.tfrecordMaskedThreshold),defaultValue:kf(a.tfrecordDefaultValue),tileDimensions:tf(a.tfrecordPatchDimensions),marginDimensions:tf(a.tfrecordKernelSize),
tensorDepths:null};a=a.tfrecordTensorDepths;if(null!=a)if(w(a)){var c={};Fb(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},hf=function(a,b){var c={gcsDestination:null,driveDestination:null,geoTiffOptions:null,tfRecordOptions:null,fileFormat:Yd(a.fileFormat)};"GEO_TIFF"===c.fileFormat?c.geoTiffOptions={cloudOptimized:!!a.tiffCloudOptimized,
skipEmptyFiles:!!a.tiffSkipEmptyFiles,tileDimensions:tf(a.tiffFileDimensions)}:"TF_RECORD_IMAGE"===c.fileFormat&&(c.tfRecordOptions=uf(a));"GOOGLE_CLOUD_STORAGE"===b?c.gcsDestination=lf(a):c.driveDestination=mf(a);return c},of=function(a,b){var c={gcsDestination:null,driveDestination:null,fileFormat:"MP4"};"GOOGLE_CLOUD_STORAGE"===b?c.gcsDestination=lf(a):c.driveDestination=mf(a);return c},qf=function(a){return{maxZoom:kf(a.maxZoom),scale:kf(a.scale),minZoom:kf(a.minZoom),skipEmptyTiles:!!a.skipEmptyTiles,
mapsApiKey:ff(a.mapsApiKey),tileDimensions:tf(a.tileDimensions)}},tf=function(a){if(null==a)return null;var b={height:0,width:0};t(a)&&(-1!==a.indexOf("x")?a=a.split("x").map(Number):-1!==a.indexOf(",")&&(a=a.split(",").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},lf=function(a){return{bucket:ff(a.outputBucket),filenamePrefix:ff(a.outputPrefix),bucketCorsUris:null,permissions:null}},mf=function(a){return{folder:ff(a.driveFolder),filenamePrefix:ff(a.driveFileNamePrefix)}};Object.freeze&&Object.freeze([]);var vf=function(a,b){this.Ze=100;this.Oe=a;this.lf=b;this.cc=0;this.M=null};vf.prototype.get=function(){if(0<this.cc){this.cc--;var a=this.M;this.M=a.next;a.next=null}else a=this.Oe();return a};vf.prototype.put=function(a){this.lf(a);this.cc<this.Ze&&(this.cc++,a.next=this.M,this.M=a)};var wf=function(a){q.setTimeout(function(){throw a;},0)},xf,yf=function(){var a=q.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!Eb("Presto")&&(a=function(){var e=document.createElement("IFRAME");e.style.display="none";wc(e);document.documentElement.appendChild(e);var f=e.contentWindow;e=f.document;e.open();e.write(vc());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&&!Eb("Trident")&&!Eb("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(r(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){q.setTimeout(e,0)}};var zf=function(){this.vc=this.Qa=null},Bf=new vf(function(){return new Af},function(a){a.reset()});zf.prototype.add=function(a,b){var c=Bf.get();c.set(a,b);this.vc?this.vc.next=c:(D(!this.Qa),this.Qa=c);this.vc=c};zf.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 Af=function(){this.next=this.scope=this.Oc=null};Af.prototype.set=function(a,b){this.Oc=a;this.scope=b;this.next=null};
Af.prototype.reset=function(){this.next=this.scope=this.Oc=null};var Gf=function(a,b){Cf||Df();Ef||(Cf(),Ef=!0);Ff.add(a,b)},Cf,Df=function(){if(q.Promise&&q.Promise.resolve){var a=q.Promise.resolve(void 0);Cf=function(){a.then(Hf)}}else Cf=function(){var b=Hf;!x(q.setImmediate)||q.Window&&q.Window.prototype&&!Eb("Edge")&&q.Window.prototype.setImmediate==q.setImmediate?(xf||(xf=yf()),xf(b)):q.setImmediate(b)}},Ef=!1,Ff=new zf,Hf=function(){for(var a;a=Ff.remove();){try{a.Oc.call(a.scope)}catch(b){wf(b)}Bf.put(a)}Ef=!1};var If=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var Lf=function(a){this.B=0;this.T=void 0;this.Ta=this.na=this.u=null;this.Vb=this.Lc=!1;if(a!=Ca)try{var b=this;a.call(void 0,function(c){Jf(b,2,c)},function(c){if(!(c instanceof Kf))try{if(c instanceof Error)throw c;throw Error("Promise rejected.");}catch(d){}Jf(b,3,c)})}catch(c){Jf(this,3,c)}},Mf=function(){this.next=this.context=this.ab=this.Ka=this.Da=null;this.Mb=!1};Mf.prototype.reset=function(){this.context=this.ab=this.Ka=this.Da=null;this.Mb=!1};
var Nf=new vf(function(){return new Mf},function(a){a.reset()}),Of=function(a,b,c){var d=Nf.get();d.Ka=a;d.ab=b;d.context=c;return d};Lf.prototype.then=function(a,b,c){null!=a&&Wa(a,"opt_onFulfilled should be a function.");null!=b&&Wa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return Pf(this,x(a)?a:null,x(b)?b:null,c)};Lf.prototype.$goog_Thenable=!0;
Lf.prototype.cancel=function(a){0==this.B&&Gf(function(){var b=new Kf(a);Qf(this,b)},this)};
var Qf=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.Mb||(d++,g.Da==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.B&&1==d?Qf(c,b):(f?(d=f,D(c.na),D(null!=d),d.next==c.Ta&&(c.Ta=d),d.next=d.next.next):Rf(c),Sf(c,e,3,b)))}a.u=null}else Jf(a,3,b)},Uf=function(a,b){a.na||2!=a.B&&3!=a.B||Tf(a);D(null!=b.Ka);a.Ta?a.Ta.next=b:a.na=b;a.Ta=b},Pf=function(a,b,c,d){var e=Of(null,null,null);e.Da=new Lf(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);!r(k)&&h instanceof Kf?g(h):f(k)}catch(m){g(m)}}:g});e.Da.u=a;Uf(a,e);return e.Da};Lf.prototype.uf=function(a){D(1==this.B);this.B=0;Jf(this,2,a)};Lf.prototype.vf=function(a){D(1==this.B);this.B=0;Jf(this,3,a)};
var Jf=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.uf,f=a.vf;if(d instanceof Lf){null!=e&&Wa(e,"opt_onFulfilled should be a function.");null!=f&&Wa(f,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");Uf(d,Of(e||Ca,f||null,a));var g=!0}else if(If(d))d.then(e,f,a),g=!0;else{if(w(d))try{var h=d.then;if(x(h)){Vf(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,Tf(a),3!=b||c instanceof Kf||Wf(a,c))}},Vf=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)}},Tf=function(a){a.Lc||(a.Lc=!0,Gf(a.Re,a))},Rf=function(a){var b=null;a.na&&(b=a.na,a.na=b.next,b.next=null);a.na||(a.Ta=null);null!=b&&D(null!=b.Ka);return b};Lf.prototype.Re=function(){for(var a;a=Rf(this);)Sf(this,a,this.B,this.T);this.Lc=!1};
var Sf=function(a,b,c,d){if(3==c&&b.ab&&!b.Mb)for(;a&&a.Vb;a=a.u)a.Vb=!1;if(b.Da)b.Da.u=null,Xf(b,c,d);else try{b.Mb?b.Ka.call(b.context):Xf(b,c,d)}catch(e){Yf.call(null,e)}Nf.put(b)},Xf=function(a,b,c){2==b?a.Ka.call(a.context,c):a.ab&&a.ab.call(a.context,c)},Wf=function(a,b){a.Vb=!0;Gf(function(){a.Vb&&Yf.call(null,b)})},Yf=wf,Kf=function(a){Pa.call(this,a)};A(Kf,Pa);Kf.prototype.name="cancel";var Zf=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:q.setTimeout(a,b||0)};var $f=function(a,b,c){B.call(this);this.$e=null!=c?y(a,c):a;this.We=b;this.Ke=y(this.gf,this);this.Bc=[]};A($f,B);l=$f.prototype;l.hb=!1;l.Db=0;l.Oa=null;l.Xa=function(a){this.Bc=arguments;this.Oa||this.Db?this.hb=!0:ag(this)};l.stop=function(){this.Oa&&(q.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,ag(this))};l.i=function(){$f.j.i.call(this);this.stop()};
l.gf=function(){this.Oa=null;this.hb&&!this.Db&&(this.hb=!1,ag(this))};var ag=function(a){a.Oa=Zf(a.Ke,a.We);a.$e.apply(null,a.Bc)};var bg=!Fc||9<=Number(Qc),cg=!Hc&&!Fc||Fc&&9<=Number(Qc)||Hc&&Pc("1.9.1");var eg=function(a,b){Fb(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:dg.hasOwnProperty(d)?a.setAttribute(dg[d],c):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,c):a[d]=c})},dg={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"},gg=function(a,b,c){return fg(document,arguments)},fg=function(a,b){var c=String(b[0]),d=b[1];if(!bg&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',zc(d.name),'"');if(d.type){c.push(' type="',zc(d.type),'"');var e={};Tb(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(" "):eg(c,d));2<b.length&&hg(a,c,b,2);return c},hg=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];!Fa(f)||w(f)&&0<f.nodeType?e(f):$a(ig(f)?mb(f):f,e)}},jg=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null},kg=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},lg=function(a){D(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},ig=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},mg=function(a){this.Qb=a||q.document||
document};l=mg.prototype;l.getElementsByTagName=function(a,b){return(b||this.Qb).getElementsByTagName(String(a))};l.Ne=function(a,b,c){return fg(this.Qb,arguments)};l.createElement=function(a){return this.Qb.createElement(String(a))};l.createTextNode=function(a){return this.Qb.createTextNode(String(a))};l.appendChild=function(a,b){D(null!=a&&null!=b,"goog.dom.appendChild expects non-null arguments");a.appendChild(b)};l.append=function(a,b){hg(lg(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=jg;
l.Rd=function(){return cg&&void 0!=(void 0).children?(void 0).children:ab((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 og=function(a){var b=ng;this.lc=[];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};og.prototype.cancel=function(a){if(this.Ya)this.T instanceof og&&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||pg(this,new qg(this))}};og.prototype.Dd=function(a,b){this.Cc=!1;rg(this,a,b)};
var rg=function(a,b,c){a.Ya=!0;a.T=c;a.ub=!b;sg(a)},ug=function(a){if(a.Ya){if(!a.ld)throw new tg(a);a.ld=!1}};og.prototype.callback=function(a){ug(this);vg(a);rg(this,!0,a)};var pg=function(a,b){ug(a);vg(b);rg(a,!1,b)},vg=function(a){D(!(a instanceof og),"An execution sequence may not be initiated with a blocking Deferred.")},wg=function(a,b,c){D(!a.xd,"Blocking Deferreds can not be re-used");a.lc.push([b,c,void 0]);a.Ya&&sg(a)};
og.prototype.then=function(a,b,c){var d,e,f=new Lf(function(g,h){d=g;e=h});wg(this,d,function(g){g instanceof qg?f.cancel():e(g)});return f.then(a,b,c)};og.prototype.$goog_Thenable=!0;
var xg=function(a){return cb(a.lc,function(b){return x(b[1])})},sg=function(a){if(a.rc&&a.Ya&&xg(a)){var b=a.rc,c=yg[b];c&&(q.clearTimeout(c.K),delete yg[b]);a.rc=0}a.u&&(a.u.Dc--,delete a.u);b=a.T;for(var d=c=!1;a.lc.length&&!a.Cc;){var e=a.lc.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);r(h)&&(a.ub=a.ub&&(h==b||h instanceof Error),a.T=b=h);if(If(b)||"function"===typeof q.Promise&&b instanceof q.Promise)d=!0,a.Cc=!0}catch(k){b=k,a.ub=!0,xg(a)||(c=!0)}}a.T=b;d&&(h=y(a.Dd,
a,!0),d=y(a.Dd,a,!1),b instanceof og?(wg(b,h,d),b.xd=!0):b.then(h,d));c&&(b=new zg(b),yg[b.K]=b,a.rc=b.K)},tg=function(){Pa.call(this)};A(tg,Pa);tg.prototype.message="Deferred has already fired";tg.prototype.name="AlreadyCalledError";var qg=function(){Pa.call(this)};A(qg,Pa);qg.prototype.message="Deferred was canceled";qg.prototype.name="CanceledError";var zg=function(a){this.K=q.setTimeout(y(this.tf,this),0);this.Sb=a};
zg.prototype.tf=function(){D(yg[this.K],"Cannot throw an error that is not scheduled.");delete yg[this.K];throw this.Sb;};var yg={};var Dg=function(a){var b={},c=b.document||document,d=dc(a).toString(),e=document.createElement("SCRIPT"),f={qe:e,Hb:void 0},g=new og(f),h=null,k=null!=b.timeout?b.timeout:5E3;0<k&&(h=window.setTimeout(function(){Ag(e,!0);pg(g,new Bg(1,"Timeout reached for loading script "+d))},k),f.Hb=h);e.onload=e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Ag(e,b.Cf||!1,h),g.callback(null))};e.onerror=function(){Ag(e,!0,h);pg(g,new Bg(0,"Error while loading script "+
d))};f=b.attributes||{};Tb(f,{type:"text/javascript",charset:"UTF-8"});eg(e,f);xc(e,a);Cg(c).appendChild(e)},Cg=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!=b.length?b[0]:a.documentElement},ng=function(){if(this&&this.qe){var a=this.qe;a&&"SCRIPT"==a.tagName&&Ag(a,!0,this.Hb)}},Ag=function(a,b,c){null!=c&&q.clearTimeout(c);a.onload=Ca;a.onerror=Ca;a.onreadystatechange=Ca;b&&window.setTimeout(function(){jg(a)},0)},Bg=function(a,b){var c="Jsloader error (code #"+a+")";
b&&(c+=": "+b);Pa.call(this,c);this.code=a};A(Bg,Pa);var Eg=function(a,b,c){this.reset(a,b,c,void 0,void 0)};Eg.prototype.Kd=null;var Fg=0;Eg.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Fg++;d||Na();this.yb=a;delete this.Kd};Eg.prototype.se=function(a){this.yb=a};var Gg=function(a){this.ce=a;this.Ud=this.Ec=this.yb=this.u=null},Hg=function(a,b){this.name=a;this.value=b};Hg.prototype.toString=function(){return this.name};var Ig=new Hg("SEVERE",1E3),Jg=new Hg("INFO",800),Kg=new Hg("CONFIG",700),Lg=new Hg("FINE",500);Gg.prototype.getName=function(){return this.ce};Gg.prototype.getParent=function(){return this.u};Gg.prototype.Rd=function(){this.Ec||(this.Ec={});return this.Ec};Gg.prototype.se=function(a){this.yb=a};
var Mg=function(a){if(a.yb)return a.yb;if(a.u)return Mg(a.u);Ta("Root logger has no level set.");return null};Gg.prototype.log=function(a,b,c){if(a.value>=Mg(this).value)for(x(b)&&(b=b()),a=new Eg(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()}};Gg.prototype.info=function(a,b){this.log(Jg,a,b)};
var Ng={},Og=null,Pg=function(a){Og||(Og=new Gg(""),Ng[""]=Og,Og.se(Kg));var b;if(!(b=Ng[a])){b=new Gg(a);var c=a.lastIndexOf("."),d=a.substr(c+1);c=Pg(a.substr(0,c));c.Rd()[d]=b;b.u=c;Ng[a]=b}return b};var Qg=function(a,b){a&&a.log(Lg,b,void 0)};var Rg=function(a){switch(a){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:return!0;default:return!1}};var Sg=function(){};Sg.prototype.Bd=null;Sg.prototype.tb=function(){var a;(a=this.Bd)||(a={},Tg(this)&&(a[0]=!0,a[1]=!0),a=this.Bd=a);return a};var Ug=function(a,b){this.xf=a;this.hf=b};A(Ug,Sg);Ug.prototype.Gc=function(){return this.xf()};Ug.prototype.tb=function(){return this.hf()};var Vg=function(){return Vg.Ld.Gc()};Vg.ze=!1;Vg.tb=function(){return Vg.Ld.tb()};Vg.Df=function(a,b){Vg.re(new Ug(D(a),D(b)))};Vg.re=function(a){Vg.Ld=a};var Wg=function(){};A(Wg,Sg);Wg.prototype.Gc=function(){var a=Tg(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Tg=function(a){if(Vg.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};Vg.re(new Wg);var Xg=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,Yg=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 G=function(a){E.call(this);this.headers=new Ad;this.xc=a||null;this.Y=!1;this.wc=this.a=null;this.xb=this.$d=this.$b="";this.Ja=this.Vc=this.Yb=this.Kc=!1;this.ib=0;this.oc=null;this.gb="";this.tc=this.jf=this.xe=!1};A(G,E);var Zg=G.prototype,$g=Pg("goog.net.XhrIo");Zg.N=$g;var ah=/^https?$/i,bh=["POST","PUT"],ch=[];G.prototype.Me=function(){this.ea();kb(ch,this)};
G.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.$b+"; newUri="+a);b=b?b.toUpperCase():"GET";this.$b=a;this.xb="";this.$d=b;this.Kc=!1;this.Y=!0;this.a=this.xc?this.xc.Gc():Vg();this.wc=this.xc?this.xc.tb():Vg.tb();this.a.onreadystatechange=y(this.he,this);this.jf&&"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{Qg(this.N,dh(this,"Opening Xhr")),
this.Vc=!0,this.a.open(b,String(a),!0),this.Vc=!1}catch(f){Qg(this.N,dh(this,"Error opening Xhr: "+f.message));this.Sb(5,f);return}a=c||"";var e=this.headers.clone();d&&Hd(d,function(f,g){e.set(g,f)});d=gb(e.ba());c=q.FormData&&a instanceof q.FormData;!hb(bh,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{eh(this),0<this.ib&&(this.tc=fh(this.a),Qg(this.N,dh(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.oc=Zf(this.Hb,this.ib,this)),Qg(this.N,dh(this,"Sending request")),this.Yb=!0,this.a.send(a),this.Yb=!1}catch(f){Qg(this.N,dh(this,"Send error: "+f.message)),this.Sb(5,f)}};
var fh=function(a){return Fc&&Pc(9)&&u(a.timeout)&&r(a.ontimeout)},fb=function(a){return"content-type"==a.toLowerCase()};G.prototype.Hb=function(){"undefined"!=typeof xa&&this.a&&(this.xb="Timed out after "+this.ib+"ms, aborting",Qg(this.N,dh(this,this.xb)),this.dispatchEvent("timeout"),this.abort(8))};G.prototype.Sb=function(a,b){this.Y=!1;this.a&&(this.Ja=!0,this.a.abort(),this.Ja=!1);this.xb=b;gh(this);hh(this)};var gh=function(a){a.Kc||(a.Kc=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
G.prototype.abort=function(){this.a&&this.Y&&(Qg(this.N,dh(this,"Aborting")),this.Y=!1,this.Ja=!0,this.a.abort(),this.Ja=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),hh(this))};G.prototype.i=function(){this.a&&(this.Y&&(this.Y=!1,this.Ja=!0,this.a.abort(),this.Ja=!1),hh(this,!0));G.j.i.call(this)};G.prototype.he=function(){this.fa||(this.Vc||this.Yb||this.Ja?ih(this):this.ff())};G.prototype.ff=function(){ih(this)};
var ih=function(a){if(a.Y&&"undefined"!=typeof xa)if(a.wc[1]&&4==a.xa()&&2==a.getStatus())Qg(a.N,dh(a,"Local request error detected and ignored"));else if(a.Yb&&4==a.xa())Zf(a.he,0,a);else if(a.dispatchEvent("readystatechange"),4==a.xa()){Qg(a.N,dh(a,"Request complete"));a.Y=!1;try{var b=a.getStatus(),c;if(!(c=Rg(b))){var d;if(d=0===b){var e=String(a.$b).match(Xg)[1]||null;if(!e&&q.self&&q.self.location){var f=q.self.location.protocol;e=f.substr(0,f.length-1)}d=!ah.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){Qg(a.N,"Can not get status: "+h.message),g=""}a.xb=g+" ["+a.getStatus()+"]";gh(a)}}finally{hh(a)}}};G.prototype.ge=function(a,b){D("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(jh(a,"progress"));this.dispatchEvent(jh(a,b?"downloadprogress":"uploadprogress"))};
var jh=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},hh=function(a,b){if(a.a){eh(a);var c=a.a,d=a.wc[0]?Ca:null;a.a=null;a.wc=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(a=a.N)&&a.log(Ig,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},eh=function(a){a.a&&a.tc&&(a.a.ontimeout=null);a.oc&&(q.clearTimeout(a.oc),a.oc=null)};G.prototype.Xd=function(){return!!this.a};
G.prototype.xa=function(){return this.a?this.a.readyState:0};G.prototype.getStatus=function(){try{return 2<this.xa()?this.a.status:-1}catch(a){return-1}};
var kh=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(Ig,"Response type "+a.gb+" is not supported on this browser",void 0);return null}catch(c){return Qg(a.N,"Can not get response: "+c.message),null}};
G.prototype.getResponseHeader=function(a){if(this.a&&4==this.xa())return a=this.a.getResponseHeader(a),null===a?void 0:a};G.prototype.getAllResponseHeaders=function(){return this.a&&4==this.xa()?this.a.getAllResponseHeaders()||"":""};
var lh=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=Ac(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 Hb(b,function(g){return g.join(", ")})},dh=function(a,b){return b+" ["+a.$d+" "+a.$b+" "+a.getStatus()+"]"};var mh=function(a,b){this.oa=this.Pa=this.za="";this.cb=null;this.Ea=this.ra="";this.V=this.Xe=!1;if(a instanceof mh){this.V=r(b)?b:a.V;nh(this,a.za);var c=a.Pa;oh(this);this.Pa=c;c=a.oa;oh(this);this.oa=c;ph(this,a.cb);this.setPath(a.getPath());qh(this,a.X.clone());a=a.Ea;oh(this);this.Ea=a}else a&&(c=String(a).match(Xg))?(this.V=!!b,nh(this,c[1]||"",!0),a=c[2]||"",oh(this),this.Pa=rh(a),a=c[3]||"",oh(this),this.oa=rh(a,!0),ph(this,c[4]),this.setPath(c[5]||"",!0),qh(this,c[6]||"",!0),a=c[7]||"",
oh(this),this.Ea=rh(a)):(this.V=!!b,this.X=new sh(null,this.V))};
mh.prototype.toString=function(){var a=[],b=this.za;b&&a.push(th(b,uh,!0),":");var c=this.oa;if(c||"file"==b)a.push("//"),(b=this.Pa)&&a.push(th(b,uh,!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(th(c,"/"==c.charAt(0)?vh:wh,!0));(c=this.X.toString())&&a.push("?",c);(c=this.Ea)&&a.push("#",th(c,xh));return a.join("")};
mh.prototype.resolve=function(a){var b=this.clone(),c=!!a.za;c?nh(b,a.za):c=!!a.Pa;if(c){var d=a.Pa;oh(b);b.Pa=d}else c=!!a.oa;c?(d=a.oa,oh(b),b.oa=d):c=null!=a.cb;d=a.getPath();if(c)ph(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?qh(b,a.X.clone()):c=!!a.Ea;c&&(a=a.Ea,oh(b),b.Ea=a);return b};mh.prototype.clone=function(){return new mh(this)};var nh=function(a,b,c){oh(a);a.za=c?rh(b,!0):b;a.za&&(a.za=a.za.replace(/:$/,""))},ph=function(a,b){oh(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.cb=b}else a.cb=null};
mh.prototype.getPath=function(){return this.ra};mh.prototype.setPath=function(a,b){oh(this);this.ra=b?rh(a,!0):a;return this};var qh=function(a,b,c){oh(a);b instanceof sh?(a.X=b,a.X.kd(a.V)):(c||(b=th(b,yh)),a.X=new sh(b,a.V))};mh.prototype.getQuery=function(){return this.X.toString()};mh.prototype.removeParameter=function(a){oh(this);this.X.remove(a);return this};var oh=function(a){if(a.Xe)throw Error("Tried to modify a read-only Uri");};mh.prototype.kd=function(a){this.V=a;this.X&&this.X.kd(a)};
var zh=function(a){return a instanceof mh?a.clone():new mh(a,void 0)},rh=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},th=function(a,b,c){return t(a)?(a=encodeURI(a).replace(b,Ah),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Ah=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},uh=/[#\/\?@]/g,wh=/[#\?:]/g,vh=/[#\?]/g,yh=/[#\?@]/g,xh=/#/g,sh=function(a,b){this.m=this.s=null;this.R=a||null;this.V=!!b},Bh=function(a){a.s||
(a.s=new Ad,a.m=0,a.R&&Yg(a.R,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};l=sh.prototype;l.o=function(){Bh(this);return this.m};l.add=function(a,b){Bh(this);this.R=null;a=Ch(this,a);var c=this.s.get(a);c||this.s.set(a,c=[]);c.push(b);this.m=Ua(this.m)+1;return this};l.remove=function(a){Bh(this);a=Ch(this,a);return this.s.wa(a)?(this.R=null,this.m=Ua(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(){Bh(this);return 0==this.m};l.wa=function(a){Bh(this);a=Ch(this,a);return this.s.wa(a)};l.mb=function(a){var b=this.A();return hb(b,a)};l.forEach=function(a,b){Bh(this);this.s.forEach(function(c,d){$a(c,function(e){a.call(b,e,d,this)},this)},this)};l.ba=function(){Bh(this);for(var a=this.s.A(),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.A=function(a){Bh(this);var b=[];if(t(a))this.wa(a)&&(b=lb(b,this.s.get(Ch(this,a))));else{a=this.s.A();for(var c=0;c<a.length;c++)b=lb(b,a[c])}return b};l.set=function(a,b){Bh(this);this.R=null;a=Ch(this,a);this.wa(a)&&(this.m=Ua(this.m)-this.s.get(a).length);this.s.set(a,[b]);this.m=Ua(this.m)+1;return this};l.get=function(a,b){if(!a)return b;a=this.A(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(Ch(this,a),mb(b)),this.m=Ua(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.A(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 sh;a.R=this.R;this.s&&(a.s=this.s.clone(),a.m=this.m);return a};var Ch=function(a,b){b=String(b);a.V&&(b=b.toLowerCase());return b};sh.prototype.kd=function(a){a&&!this.V&&(Bh(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};sh.prototype.extend=function(a){for(var b=0;b<arguments.length;b++)Hd(arguments[b],function(c,d){this.add(d,c)},this)};var Dh,Kh=function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];H&&(f=["https://www.googleapis.com/auth/earthengine","https://www.googleapis.com/auth/cloud-platform"]);d&&(nb(f,d),pb(f));Eh=a;Fh=f;null===a?Gh=null:Hh(function(){Ih(b,c,e||Ma(Jh,b,c))})};z("ee.data.authenticateViaOauth",Kh);var Lh=function(a,b,c,d,e){Kh(a,b,c,d,e)};z("ee.data.authenticate",Lh);var Jh=function(a,b){q.gapi.auth.authorize({client_id:Eh,immediate:!1,scope:Fh.join(" ")},Ma(Mh,a,b))};
z("ee.data.authenticateViaPopup",Jh);
var Oh=function(a,b,c,d){if("window"in q)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"];H&&(e=["https://www.googleapis.com/auth/earthengine","https://www.googleapis.com/auth/devstorage.read_write","https://www.googleapis.com/auth/cloud-platform"]);d&&(nb(e,d),pb(e));Eh=a.client_email;Fh=e;var f=new google.auth.JWT(a.client_email,
null,a.private_key,e,null);Nh=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})})};Ih(b,c)};z("ee.data.authenticateViaPrivateKey",Oh);var Ph=[],Rh=function(a){Qh=a};z("ee.data.setApiKey",Rh);Ph.push("setApiKey");var Sh=function(a){Dh=a};z("ee.data.setProject",Sh);Ph.push("setProject");Ph.push("getProject");
var Th=function(){return"projects/"+Dh},Uh=function(a){if(a&&!Ba("gapi"))throw Error('Cloud API requires <script src="https://apis.google.com/js/api.js">');H=a};z("ee.data.setCloudApiEnabled",Uh);Ph.push("setCloudApiEnabled");var Vh=function(){return H};z("ee.data.getCloudApiEnabled",Vh);Ph.push("getCloudApiEnabled");
var Wh=function(a,b,c,d,e,f,g){var h=["https://www.googleapis.com/auth/earthengine"];H&&(h=["https://www.googleapis.com/auth/earthengine","https://www.googleapis.com/auth/cloud-platform"]);e&&(nb(h,e),pb(h));Eh=a;Fh=h;var k={token_type:b,access_token:c,state:h.join(" "),expires_in:d};Mh(void 0,void 0,k);!1===g?f&&f():Hh(function(){q.gapi.auth.setToken(k);f&&f()})};z("ee.data.setAuthToken",Wh);
var Ih=function(a,b,c){Nh&&Eh&&Nh({client_id:String(Eh),immediate:!0,scope:Fh.join(" ")},function(d){if("immediate_failed"==d.error&&c)c();else if(H)try{Hh(function(){try{q.gapi.auth.setToken(d),Mh(a,b,d)}catch(e){b(e.toString())}})}catch(e){b(e.toString())}else Mh(a,b,d)})},Xh=function(a){Nh=a};z("ee.data.setAuthTokenRefresher",Xh);var $h=function(){Yh&&0<=Na()-Yh&&Zh();return Gh};z("ee.data.getAuthToken",$h);var Zh=function(){Yh=Gh=null};z("ee.data.clearAuthToken",Zh);var ai=function(){return Eh};
z("ee.data.getAuthClientId",ai);var bi=function(){return Fh};z("ee.data.getAuthScopes",bi);
var ii=function(a,b,c){null!=a?ci=a:di||(ci="https://earthengine.googleapis.com/api");null!=b?ei=b:di||(ei="https://earthengine.googleapis.com");r(c)&&(fi=c);!H||gi&&null==a||(gi=new Promise(function(d,e){gapi.load("client",{callback:function(){var f=Object.assign({},Rd,{rootUrl:ci.replace(/\/api$/,"")});gapi.client.init({apiKey:Qh,discoveryDocs:[f]}).then(function(){hi=!0;gapi.config.update("client/headers/request",["X-Earth-Engine-Computation-Profile","X-Goog-User-Project"]);gapi.config.update("client/headers/response",
["X-Earth-Engine-Computation-Profile"]);d()})},onerror:e})}),Dh=Dh||"earthengine-legacy");di=!0},I=function(a,b,c,d){ii();if(null==$h()&&c&&Nh&&Eh)return Ih(function(){I(a,b,c,d)}),null;var e=function(){var m=a(),p=ji(m);ki&&(p["X-Earth-Engine-Computation-Profile"]="1");Dh&&"earthengine-legacy"!==Dh&&(p["X-Goog-User-Project"]=Dh);return m},f=ki;if(c){var g=function(m){return li(m.status,function(p){if(null!=m&&null!=m.headers)return m.headers[p.toLowerCase()]},m.body,f,c,b||Vb)};gi.then(function(){mi(e,
d)(g,g)});return null}if(!hi)throw Error("Cloud API not ready");for(var h=0,k;;){k=ni(function(){e().then(function(){return null},function(){return null})});if(429!=k.status||5<h)break;++h}return li(k.status,function(m){try{return k.getResponseHeader(m)}catch(p){return null}},k.responseText,f,void 0,b||Vb)},ji=function(a){var b=function(d){return w(d)&&w(d.headers)},c=[];Object.values(a).filter(w).forEach(function(d){nb(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");},ni=function(a){if(XMLHttpRequest.prototype.yc)throw Error("Cannot initialize synchronous request mode");var b=function(){this.ka=new this.yc;XMLHttpRequest.Ye=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.Ye}finally{XMLHttpRequest=XMLHttpRequest.prototype.yc}},pi=function(a){oi=a};z("ee.data.setDeadline",pi);var ri=function(a){qi=a||Vb};z("ee.data.setParamAugmenter",ri);var ti=function(a){si=a||Vb};z("ee.data.setExpressionAugmenter",ti);var ui=function(){return ci};z("ee.data.getApiBaseUrl",ui);var vi=function(){return ei};z("ee.data.getTileBaseUrl",vi);var wi=function(){return fi};z("ee.data.getXsrfToken",wi);
var xi=function(a){if(H){var b={prettyPrint:!1,project:Th()};return I(function(){return gapi.client.earthengine.projects.algorithms.list(b)},fe,a)}var c=J("/algorithms",null,a,"GET");return a?null:c},zi=function(a,b){if(H){if(t(a.image))throw Error("Image as JSON string not supported.");if(r(a.version))throw Error("Image version specification not supported.");var c={name:null,expression:si(We(a.image)),fileFormat:Yd(a.format),bandIds:ae(a.bands),visualizationOptions:de(a)},d=Th(),e=["name"];return I(function(){return gapi.client.earthengine.projects.maps.create({parent:d,
Tb:e},c)},function(g){return yi(g.name,"","/v1alpha/{}/tiles",Qh?"?key="+Qh:"")},b)}a=Qb(a);t(a.image)||(a.image=a.image.D());var f=function(g){return yi(g.mapid,g.token,"/map/{}","?token={}")};return b?(J("/mapid",L(a),function(g,h){return b(g&&f(g),h)}),null):f(J("/mapid",L(a)))};z("ee.data.getMapId",zi);var Ai=function(a,b,c,d){return a.formatTileUrl(b,c,d)};z("ee.data.getTileUrl",Ai);
var yi=function(a,b,c,d){c=ei+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}}},Bi=function(a,b){a=Qb(a);return J("/value",L(a),b)};z("ee.data.getValue",Bi);
var Ci=function(a,b){if(H){var c=Th(),d=si(We(a));return I(function(){return gapi.client.earthengine.projects.value.compute({project:c},{expression:d})},function(e){return e.result},b)}a={json:Re(a)};return J("/value",L(a),b)},Di=function(a,b){if(H){if(t(a.image))throw Error("Image as JSON string not supported.");if(r(a.version))throw Error("Image version specification not supported.");if(r(a.region))throw Error('"region" not supported in call to ee.data.getThumbId. Use ee.Image.getThumbURL.');var c=
{name:null,expression:si(We(a.image)),fileFormat:Yd(a.format),bandIds:ae(a.bands),visualizationOptions:de(a),grid:null},d=Th(),e=["name"];return I(function(){return gapi.client.earthengine.projects.thumbnails.create({parent:d,Tb:e},c)},function(g){return{thumbid:g.name,token:""}},b)}a=Qb(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=L(a).add("getid","1");return J("/thumb",a,b)};
z("ee.data.getThumbId",Di);
var Ei=function(a,b){if(!H)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:si(We(a.imageCollection)),fileFormat:Yd(a.format),videoOptions:c,grid:null},e=Th(),f=["name"];return I(function(){return gapi.client.earthengine.projects.videoThumbnails.create({parent:e,Tb:f},d)},function(g){return{thumbid:g.name,token:""}},b)};
z("ee.data.getVideoThumbId",Ei);Ph.push("getVideoThumbId");var Fi=function(a,b){if(!H)throw Error("getFilmstripThumbId is only supported in Cloud API mode.");var c={name:null,expression:si(We(a.imageCollection)),fileFormat:Yd(a.format),orientation:$d(a.orientation),grid:null},d=Th(),e=["name"];return I(function(){return gapi.client.earthengine.projects.filmstripThumbnails.create({parent:d,Tb:e},c)},function(f){return{thumbid:f.name,token:""}},b)};z("ee.data.getFilmstripThumbId",Fi);Ph.push("getFilmstripThumbId");
var Gi=function(a){return H?ei+"/v1alpha/"+a.thumbid+":getPixels"+(Qh?"?key="+Qh:""):ei+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};z("ee.data.makeThumbUrl",Gi);var Hi=function(a,b){a=Qb(a);return J("/download",L(a),b)};z("ee.data.getDownloadId",Hi);var Ii=function(a){return ei+"/api/download?docid="+a.docid+"&token="+a.token};z("ee.data.makeDownloadUrl",Ii);var Ji=function(a,b){a=Qb(a);return J("/table",L(a),b)};z("ee.data.getTableDownloadId",Ji);
var Ki=function(a){return ei+"/api/table?docid="+a.docid+"&token="+a.token};z("ee.data.makeTableDownloadUrl",Ki);var Li=function(a,b,c){var d=ki;try{return ki=a,b.call(c)}finally{ki=d}};z("ee.data.withProfiling",Li);
var Mi=function(a,b){if(H){var c=function(e){return Math.floor(Math.random()*Math.pow(2,4*e)).toString(16).padStart(e,"0")};a=qb(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 J("/newtaskid",L(d),b)};z("ee.data.newTaskId",Mi);
var Pi=function(a,b){if(H){var c=function(e){return gapi.client.earthengine.projects.operations.get({name:ue(e)})};return I(function(){return Ni(a,c)},function(e){return 1===a.length?we(e):a.map(function(f){return we(e[f])})},b)}var d="/taskstatus?q="+Oi(a).join();return J(d,null,b,"GET")};z("ee.data.getTaskStatus",Pi);var Oi=function(a){if(t(a))return[a];if(v(a))return a;throw Error("Invalid value: expected a string or an array of strings.");},Ri=function(a){return Qi(void 0,a)};
z("ee.data.getTaskList",Ri);
var Qi=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);J("/tasklist",L(k),function(m,p){p?h(e,p):(nb(e.tasks,m.tasks),!m.next_page_token||a&&e.tasks.length>=a?h(e):d(h,m.next_page_token))},"GET")}if(H)return b?(Si(a,function(h,k){return b(h?{tasks:h.map(we)}:null,k)}),null):{tasks:Si(a).map(we)};var e={tasks:[]};if(b)return d(b),null;for(var f="";;){f=c(f);var g=J("/tasklist",L(f),void 0,"GET");
nb(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",Qi);
var Si=function(a,b){var c=[],d={name:Th(),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){nb(c,h.operations||[]);!h.nextPageToken||a&&c.length>=a?b&&b(a?c.slice(0,a):c):(d.pageToken=h.nextPageToken,I(e,g,f));return null};I(e,g,f);return b?null:a?c.slice(0,a):c};Ph.push("listOperations");
var Ti=function(a,b){var c=function(d){return gapi.client.earthengine.projects.operations.cancel({name:d})};I(function(){return Ni(a,c)},null,b)};z("ee.data.cancelOperation",Ti);Ph.push("cancelOperation");var Ui=function(a,b){var c=function(d){return gapi.client.earthengine.projects.operations.get({name:ue(d)})};return I(function(){return Ni(a,c)},null,b)};z("ee.data.getOperation",Ui);Ph.push("getOperation");
var Ni=function(a,b){a=Oi(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},Wi=function(a,b){return Vi(a,"CANCEL",b)};z("ee.data.cancelTask",Wi);var Vi=function(a,b,c){if(!Lb(Xi,b))throw Error("Invalid action: "+b);a=Oi(a);return H?(a=a.map(ue),Ti(a,c),null):J("/updatetask",L({id:a,action:b}),c,"POST")};z("ee.data.updateTask",Vi);
var $i=function(a,b,c){if(H){b.id=a;var d=b.type,e={project:Th()};a=null!=b.sourceUrl?{__source_url__:b.sourceUrl}:{};switch(d){case "EXPORT_IMAGE":b=Yi(b);var f=jf(b);f.expression=si(f.expression,a);a=function(){return gapi.client.earthengine.projects.image["export"](e,f)};break;case "EXPORT_FEATURES":var g=nf(b);g.expression=si(g.expression,a);a=function(){return gapi.client.earthengine.projects.table["export"](e,g)};break;case "EXPORT_VIDEO":b=Zi(b);var h=pf(b);h.expression=si(h.expression,a);
a=function(){return gapi.client.earthengine.projects.video["export"](e,h)};break;case "EXPORT_TILES":var k=rf(b);k.expression=si(k.expression,a);a=function(){return gapi.client.earthengine.projects.map["export"](e,k)};break;case "EXPORT_VIDEO_MAP":var m=sf(b);m.expression=si(m.expression,a);a=function(){return gapi.client.earthengine.projects.videoMap["export"](e,m)};break;default:throw Error("Unable to start processing for task of type "+d);}return I(a,function(p){return xe(p)},c)}b=Qb(b);null!=
b.element&&(b.json=b.element.D(),delete b.element);v(b.crs_transform)&&(b.crs_transform=b.crs_transform.toString());b.id=a;return J("/processingrequest",L(b),c)};z("ee.data.startProcessing",$i);var bj=function(a,b,c){if(H){b=Be(b);var d=function(e){return e?xe(e):null};return d(aj(a,b,c&&function(e,f){return c(d(e),f)}))}a={id:a,request:He(b)};return J("/ingestionrequest",L(a),c)};z("ee.data.startIngestion",bj);
var aj=function(a,b,c){var d={project:Th()},e={imageManifest:b,requestId:a,overwrite:null,description:null};return I(function(){return gapi.client.earthengine.projects.image["import"](d,e)},null,c,a?void 0:0)},cj=function(a,b,c){var d={project:Th()},e={tableManifest:b,requestId:a,overwrite:null,description:null};return I(function(){return gapi.client.earthengine.projects.table["import"](d,e)},null,c,a?void 0:0)},dj=function(a,b,c){if(H){b=Ce(b);var d=function(e){return e?xe(e):null};return d(cj(a,
b,c&&function(e,f){return c(d(e),f)}))}a={id:a,tableRequest:He(b)};return J("/ingestionrequest",L(a),c)};z("ee.data.startTableIngestion",dj);var ej=function(a,b){if(H){var c={name:F(a),prettyPrint:!1};return I(function(){return gapi.client.earthengine.projects.assets.get(c)},je,b)}return J("/info",(new sh).add("id",a),b)};z("ee.data.getAsset",ej);Ph.push("getAsset");z("ee.data.getInfo",ej);
var fj=function(a,b){if(H){if(Object.keys(a).every(function(e){return"id"===e||"num"===e})){var c=ie(a);return I(function(){return gapi.client.earthengine.projects.assets.listAssets(c)},ke,b)}var d=re(a);return I(function(){return gapi.client.earthengine.projects.assets.listImages({Tb:"assets(type,path)"},d)},me,b)}a=L(a);return J("/list",a,b)};z("ee.data.getList",fj);var gj=function(a,b){return I(function(){return gapi.client.earthengine.projects.listAssets(a)},null,b)};z("ee.data.listAssets",gj);
Ph.push("listAssets");var hj=function(a,b){return I(function(){return gapi.client.earthengine.projects.assets.listImages(a)},null,b)};z("ee.data.listImages",hj);Ph.push("listImages");var ij=function(a){var b={parent:Th(),pageSize:null,pageToken:null};return I(function(){return gapi.client.earthengine.projects.listAssets(b)},null,a)};z("ee.data.listBuckets",ij);Ph.push("listBuckets");
var jj=function(a){if(H){var b={parent:Th(),pageSize:null,pageToken:null};return I(function(){return gapi.client.earthengine.projects.listAssets(b)},ke,a)}return J("/buckets",null,a,"GET")};z("ee.data.getAssetRoots",jj);var kj=function(a,b){if(H){var c=ge(a);var d="projects/earthengine-legacy"===c?{parent:ge(a),assetId:a}:{parent:c};var e={type:"Folder"};I(function(){return gapi.client.earthengine.projects.assets.create(d,e)},null,b)}else a=L({id:a}),J("/createbucket",a,b)};
z("ee.data.createAssetHome",kj);
var lj=function(a,b,c,d,e){if(H){if(c)throw Error("Asset overwrite not supported.");if(t(a))throw Error("Asset cannot be specified as string.");b=a.name||b&&F(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=he(f.type);var g={parent:b.slice(0,c),assetId:b.slice(c+8)};return I(function(){return gapi.client.earthengine.projects.assets.create(g,f)},
null,e)}t(a)||(a=He(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;void 0!=d&&(a.properties=He(d));return J("/create",L(a),e)};z("ee.data.createAsset",lj);var mj=function(a,b,c){if(H){var d={parent:ge(a),type:"Folder",name:F(a)};return I(function(){return gapi.client.earthengine.projects.assets.create(d)},null,c)}return J("/createfolder",L({id:a,force:b||!1}),c)};z("ee.data.createFolder",mj);
var nj=function(a,b,c){if(H){var d={sourceName:F(a),destinationName:F(b)};I(function(){return gapi.client.earthengine.projects.assets.move(d)},null,c)}else J("/rename",L({sourceId:a,destinationId:b}),c)};z("ee.data.renameAsset",nj);var oj=function(a,b,c,d){if(H){var e={sourceName:F(a),destinationName:F(b),overwrite:null!=c?c:null,bandIds:null};I(function(){return gapi.client.earthengine.projects.assets.copy(e)},null,d)}else a={sourceId:a,destinationId:b},c&&(a.allowOverwrite=c),J("/copy",L(a),d)};
z("ee.data.copyAsset",oj);var pj=function(a,b){if(H){var c={name:F(a)};I(function(){return gapi.client.earthengine.projects.assets["delete"](c)},null,b)}else J("/delete",L({id:a}),b)};z("ee.data.deleteAsset",pj);var qj=function(a,b){if(H){var c={resource:F(a),prettyPrint:!1};return I(function(){return gapi.client.earthengine.projects.assets.getIamPolicy(c)},se,b)}return J("/getacl",L({id:a}),b,"GET")};z("ee.data.getAssetAcl",qj);
var rj=function(a,b,c,d){var e={name:F(a),asset:b,updateMask:{paths:c||[]}};I(function(){return gapi.client.earthengine.projects.assets.patch(e)},null,d)};z("ee.data.updateAsset",rj);var sj=function(a,b,c){if(H){var d={resource:F(a),policy:te(b),prettyPrint:!1};I(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:He(b)},J("/setacl",L(a),c)};z("ee.data.setAssetAcl",sj);
var tj=function(a,b,c){if(H){b=pe(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}));rj(a,b,d,c)}else a={id:a,properties:He(b)},J("/setproperties",L(a),c)};z("ee.data.setAssetProperties",tj);
var uj=function(a,b){if(H){var c={name:F(a),prettyPrint:!1};return I(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 J("/quota",L({id:a}),b,"GET")};z("ee.data.getAssetRootQuota",uj);
var Xi={yf:"CANCEL",Bf:"UPDATE"},J=function(a,b,c,d){ii();var e=ki,f={"Content-Type":"application/x-www-form-urlencoded"},g=$h();if(null!=g)f.Authorization=g;else if(c&&Nh&&Eh)return Ih(function(){Li(e,function(){J(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new sh;e&&b.add("profiling","1");null!=Qh&&b.add("key",Qh);b=qi(b,a);null!=fi&&(f["X-XSRF-Token"]=fi);var h=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(h)||(a+=-1!=a.indexOf("?")?"&":"?",a+=h,h=null);var k=ci+a;if(c)return vj.push(wj(k,c,g,
h,f)),xj.Xa(),null;for(var m=function(K,oa){this.setRequestHeader&&this.setRequestHeader(oa,K)},p,Q=0;;){p=Vg();p.open(g,k,!1);Fb(f,m,p);p.send(h);if(429!=p.status||5<Q)break;Q++}return li(p.status,function(K){try{return p.getResponseHeader(K)}catch(oa){return null}},p.responseText,e)},wj=function(a,b,c,d,e){var f=0,g={url:a,method:c,content:d,headers:e},h=ki;g.callback=function(k){k=k.target;if(429==k.getStatus()&&10>f)return f++,setTimeout(function(){vj.push(g);xj.Xa()},Math.min(12E4,1E3*Math.pow(2,
f))),null;var m=li,p=k.getStatus(),Q=y(k.getResponseHeader,k);try{var K=k.a?k.a.responseText:""}catch(oa){Qg(k.N,"Can not get responseText: "+oa.message),K=""}return m(p,Q,K,h,b)};return g},zj=function(){return new Promise(function(a){yj.push(a)})},mi=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(){zj().then(function(){a().then(e(f,g),g)});Aj.Xa()},Math.min(12E4,1E3*Math.pow(2,d))):f(h)}};return function(f,g){zj().then(function(){a().then(e(f,
g),g)});Aj.Xa()}},li=function(a,b,c,d,e,f){f=void 0===f?function(p){return p.data}:f;var g=d?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(p){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);},Hh=function(a){var b=function(){q.gapi.config.update("client/cors",!0);Nh||(Nh=q.gapi.auth.authorize);a()};if(w(q.gapi)&&w(q.gapi.auth)&&x(q.gapi.auth.authorize))b();else{for(var c=Na().toString(36);c in q;)c+="_";q[c]=function(){delete q[c];b()};Dg(ic({onload:c}))}},Mh=function(a,b,c){if(c.access_token){b=c.token_type+" "+c.access_token;if(c.expires_in||0===c.expires_in){c=900*c.expires_in;
var d=setTimeout(Ih,.9*c);void 0!==d.unref&&d.unref();Yh=Na()+c}Gh=b;a&&a()}else b&&b(c.error||"Unknown error.")},L=function(a){var b=new sh;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},vj=[],yj=[],xj=new $f(function(){var a=vj.shift();if(a){var b=a.url,c=a.callback,d=a.method,e=a.content;a=a.headers;var f=oi,g=new G;ch.push(g);c&&g.ha("complete",c);g.Ab("ready",g.Me);f&&(g.ib=Math.max(0,f));g.send(b,d,e,a)}0==
vj.length||xj.Xa()},350),Aj=new $f(function(){var a=yj.shift();x(a)&&a();0==yj.length||Aj.Xa()},350),ci=null,ei=null,fi=null,qi=Vb,si=Vb,Gh=null,Yh=null,Eh=null,Fh=[],Nh=null,ec=new Yb(Wb,"https://apis.google.com/js/client.js?onload=%{onload}"),Qh=null,H=!1,gi=null,hi=!1,di=!1,oi=0,ki=null;var M=function(a,b,c){if(!(this instanceof M))return Bj(M,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.h=a;this.args=b;this.w=c||null};A(M,Sd);z("ee.ComputedObject",M);M.prototype.evaluate=function(a){if(!a||!x(a))throw Error("evaluate() requires a callback function.");Ci(this,a)};M.prototype.evaluate=M.prototype.evaluate;
M.prototype.C=function(a){return Ci(this,a)};M.prototype.getInfo=M.prototype.C;M.prototype.encode=function(a){if(null===this.h&&null===this.args)return{type:"ArgumentRef",value:this.w};var b={},c;for(c in this.args)r(this.args[c])&&(b[c]=a(this.args[c]));b={type:"Invocation",arguments:b};a=a(this.h);b[t(a)?"functionName":"function"]=a;return b};
M.prototype.P=function(a){if(null===this.h&&null===this.args){if(null===this.w)throw Error("Internal error: function argument not initialized.");return{argumentReference:this.w}}var b={},c;for(c in this.args)r(this.args[c])&&(b[c]=Ud(a(this.args[c])));return t(this.h)?Vd(String(this.h),b):this.h.Jc(a,b)};M.prototype.D=function(){return Re(this)};M.prototype.serialize=M.prototype.D;M.prototype.toString=function(){return"ee."+this.name()+"("+Te(this)+")"};z("ee.ComputedObject.prototype.toString",M.prototype.toString);
M.prototype.name=function(){return"ComputedObject"};M.prototype.td=function(a,b){var c=mb(arguments);c[0]=this;a.apply(q,c);return this};M.prototype.aside=M.prototype.td;var Cj=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.h=b.h;a.args=b.args;a.w=b.w;return a},Bj=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Dj={},Ej=function(a){return a.prototype instanceof M?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Fj=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}},Gj=function(a){return u(a)||
a instanceof M&&"Number"==a.name()},Hj=function(a){return t(a)||a instanceof M&&"String"==a.name()},Ij=function(a){return w(a)&&!x(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1},Jj=function(a,b,c){c=void 0===c?!1:c;return 1===a.length&&Ij(a[0])&&(a=b.args,c&&(a=a.slice(1)),a.length)?!(1===a.length||a[1].optional)||"Dictionary"!==a[0].type:!1};var N=function(){if(!(this instanceof N))return new N};A(N,Sd);z("ee.Function",N);var Kj=Vb;N.prototype.call=function(a){return this.apply(Lj(this,Array.prototype.slice.call(arguments,0)))};N.prototype.call=N.prototype.call;N.prototype.apply=function(a){a=new M(this,Mj(this,a));return Kj(a,this.G().returns)};N.prototype.apply=N.prototype.apply;
var Nj=function(a,b,c){var d=r(b),e=a.G();if(Jj(c,e,d)){if(c=Qb(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=Lj(a,d?[b].concat(c):c);return a.apply(c)},Mj=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&&r(b[g]))d[g]=Kj(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},Lj=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};
N.prototype.toString=function(a,b){var c=this.G(),d=[];d.push(a||c.name);d.push("(");d.push(bb(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("")};N.prototype.D=function(){return Re(this)};var O=function(a,b){if(!r(b))return Oj(a);if(!(this instanceof O))return Bj(O,arguments);this.ja=Rb(b);this.ja.name=a};A(O,N);z("ee.ApiFunction",O);var P=function(a,b){return N.prototype.call.apply(Oj(a),Array.prototype.slice.call(arguments,1))};z("ee.ApiFunction._call",P);var Pj=function(a,b){return Oj(a).apply(b)};z("ee.ApiFunction._apply",Pj);O.prototype.encode=function(){return this.ja.name};O.prototype.Jc=function(a,b){return Vd(this.ja.name,b)};O.prototype.G=function(){return this.ja};
var Qj=null,Rj={},Tj=function(){Sj();return Hb(Qj,function(a){return a.G()})},Uj=function(){Sj();return Gb(Qj,function(a,b){return!Rj[b]})},Oj=function(a){var b=Vj(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};z("ee.ApiFunction.lookup",Oj);
var Vj=function(a){Sj();return Qj[a]||null},Sj=function(a,b){if(Qj)a&&a();else{var c=function(d,e){e?b&&b(Error(e)):(Qj=Hb(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 O(g,f)}),a&&a())};a?xi(c):c(xi())}},Wj=function(a,b,c,d){Sj();var e=d||"";Fb(Qj,function(f,g){var h=g.split(".");if(2==h.length&&h[0]==b){h=e+h[1];var k=f.G();Rj[g]=!0;var m=!1;k.args.length&&(g=k.args[0].type,m="Object"!=g&&Fj(g,c));
g=m?a.prototype:a;h in g&&!g[h].signature||(g[h]=function(p){return Nj(f,m?this:void 0,Array.prototype.slice.call(arguments,0))},g[h].toString=y(f.toString,f,h,m),g[h].signature=k)}})},Xj=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 R=function(a,b){var c=Yj(a),d=bb(c,function(k){return k.replace(/^opt_/,"")});a=(a=q.EXPORTED_FN_INFO?q.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 M);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 Jd(Kb(f));var h=new Jd(d);if(Ld(h,g).isEmpty())e[d[0]]=b[0];else{b=
Md(g,h);if(!b.isEmpty())throw Error("Unexpected arguments"+a+": "+b.A().join(", "));e=Qb(f)}}b=new Jd(Kb(e));c=Md(new Jd(ab(c,function(k){return 0!=k.lastIndexOf("opt_",0)})),b);if(!c.isEmpty())throw Error("Missing required arguments"+a+": "+c.A().join(", "));return e},Yj=function(a){var b=Zj,c=[];q.EXPORTED_FN_INFO?(a=q.EXPORTED_FN_INFO[a.toString()],w(a)||ak(),c=a.paramNames,v(c)||ak()):(a=a.toString().replace(bk,"").match(b),null===a&&ak(),c=(a[1].split(",")||[]).map(function(d){return d.replace(ck,
"")}));return c},ak=function(){throw Error("Failed to locate function parameters.");},bk=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,Zj=/^function[^\(]*\(([^\)]*)\)/m,ck=/=.*$/;var S=function(a,b,c){M.call(this,a,b,c);dk()};A(S,M);z("ee.Element",S);var ek=!1,dk=function(){ek||(Wj(S,"Element","Element"),ek=!0)};S.prototype.name=function(){return"Element"};
S.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=Ij(c))a:{b=Kb(c);var d=["properties"];if(Fa(b)&&Fa(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(Ij(c)){b=this;for(var g in c)d=c[g],b=P("Element.set",b,g,d)}else if(c instanceof M&&Vj("Element.setMulti"))b=P("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=P("Element.set",b,g,d)}return Cj(this,b)};S.prototype.set=S.prototype.set;var T=function(a,b,c,d){if(!(this instanceof T))return Bj(T,arguments);if(!("type"in a)){var e=R(T,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}fk();e=null!=b||null!=c||null!=d;if(a instanceof M&&!(a instanceof T&&a.ta)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");M.call(this,a.h,a.args,a.w)}else{a instanceof T&&(a=a.encode());if(!gk(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));M.call(this,
null,null);this.ta=a.type;this.Ed=null!=a.coordinates?Rb(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 Ge).D(a.crs));this.Za=c;!r(this.Za)&&"geodesic"in a&&(this.Za=!!a.geodesic);this.Wa=d;!r(this.Wa)&&"evenOdd"in a&&(this.Wa=!!a.evenOdd)}};A(T,M);z("ee.Geometry",T);
var hk=!1,fk=function(){hk||(Wj(T,"Geometry","Geometry"),hk=!0)},ik=function(a,b){if(!(this instanceof ik))return jk(ik,arguments);var c=kk(ik,"Point",1,arguments);if(!(c instanceof M)){var d=c.coordinates;if(!v(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}T.call(this,c)};A(ik,T);T.Point=ik;var lk=function(a,b){if(!(this instanceof lk))return jk(lk,arguments);T.call(this,kk(lk,"MultiPoint",2,arguments))};A(lk,T);T.MultiPoint=lk;
var mk=function(a,b,c,d){if(!(this instanceof mk))return jk(mk,arguments);var e=kk(mk,"Rectangle",2,arguments);if(!(e instanceof M)){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"}T.call(this,e)};A(mk,T);T.Rectangle=mk;
var nk=function(a,b,c,d){if(!(this instanceof nk))return jk(nk,arguments);T.call(this,kk(nk,"LineString",2,arguments))};A(nk,T);T.LineString=nk;var ok=function(a,b,c,d){if(!(this instanceof ok))return jk(ok,arguments);T.call(this,kk(ok,"LinearRing",2,arguments))};A(ok,T);T.LinearRing=ok;var pk=function(a,b,c,d){if(!(this instanceof pk))return jk(pk,arguments);T.call(this,kk(pk,"MultiLineString",3,arguments))};A(pk,T);T.MultiLineString=pk;
var qk=function(a,b,c,d,e){if(!(this instanceof qk))return jk(qk,arguments);T.call(this,kk(qk,"Polygon",3,arguments))};A(qk,T);T.Polygon=qk;var rk=function(a,b,c,d,e){if(!(this instanceof rk))return jk(rk,arguments);T.call(this,kk(rk,"MultiPolygon",4,arguments))};A(rk,T);T.MultiPolygon=rk;
T.prototype.encode=function(a){if(!this.ta){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return M.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};
T.prototype.Ib=function(){if(this.h)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return this.encode()};T.prototype.toGeoJSON=T.prototype.Ib;T.prototype.sd=function(){if(this.h)throw Error("Can't convert a computed Geometry to GeoJSON. Use evaluate() instead.");return(new Ge).D(this.Ib())};T.prototype.toGeoJSONString=T.prototype.sd;T.prototype.D=function(){return Re(this)};T.prototype.serialize=T.prototype.D;
T.prototype.toString=function(){return"ee.Geometry("+this.sd()+")"};
T.prototype.P=function(a){if(!this.ta){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return M.prototype.P.call(this,a)}var b={},c="";"GeometryCollection"===this.ta?(b.geometries=this.Qd.map(function(e){return new T(e)}),c="GeometryConstructors.MultiGeometry"):(b.coordinates=this.Ed,c="GeometryConstructors."+this.ta);null!=this.La&&(b.crs=t(this.La)?(new O("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 O(c)).apply(b).P(a)};
var gk=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(!gk(b[a]))return!1;return!0}a=a.coordinates;var c=sk(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)},sk=function(a){if(!v(a))return-1;if(v(a[0])){for(var b=sk(a[0]),c=1;c<a.length;c++)if(sk(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},kk=function(a,b,c,d){db(d,Gj)?a={coordinates:mb(d)}:(a=R(a,d),a.coordinates=a.coords,delete a.coords,a.crs=a.proj,delete a.proj,a=Gb(a,Ea));if(tk(a.coordinates)||null!=a.crs||null!=a.maxError)return(new O("GeometryConstructors."+b)).apply(a);a.type=b;d=a.coordinates;if(1>c||4<c)throw Error("Unexpected nesting level.");if(db(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(sk(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=hb(["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},tk=function(a){return v(a)?cb(a,tk):a instanceof M},jk=function(a,b){var c=function(){};c.prototype=a.prototype;
c=new c;a=a.apply(c,b);return void 0!==a?a:c};T.prototype.name=function(){return"Geometry"};var U=function(a){if(!(this instanceof U))return Bj(U,arguments);if(a instanceof U)return a;uk();if(v(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new U(a[0]);M.call(this,new O("Filter.and"),{filters:a})}else if(a instanceof M)M.call(this,a.h,a.args,a.w);else{if(r(a))throw Error("Invalid argument specified for ee.Filter(): "+a);M.call(this,null,null)}};A(U,M);z("ee.Filter",U);
var vk=!1,uk=function(){vk||(Wj(U,"Filter","Filter"),vk=!0)},wk={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};U.prototype.$a=function(){return P("Filter.not",this)};U.prototype.not=U.prototype.$a;var xk=function(a,b){var c=R(xk,arguments);return P("Filter.equals",c.name,c.value)};U.eq=xk;var yk=function(a,b){var c=R(yk,arguments);return xk(c.name,c.value).$a()};U.neq=yk;
var zk=function(a,b){var c=R(zk,arguments);return P("Filter.lessThan",c.name,c.value)};U.lt=zk;var Ak=function(a,b){var c=R(Ak,arguments);return zk(c.name,c.value).$a()};U.gte=Ak;var Bk=function(a,b){var c=R(Bk,arguments);return P("Filter.greaterThan",c.name,c.value)};U.gt=Bk;var Ck=function(a,b){var c=R(Ck,arguments);return Bk(c.name,c.value).$a()};U.lte=Ck;var Dk=function(a){return P("Filter.and",Array.prototype.slice.call(arguments))};U.and=Dk;var Ek=function(a){return P("Filter.or",Array.prototype.slice.call(arguments))};
U.or=Ek;var Fk=function(a,b){var c=R(Fk,arguments);c=P("DateRange",c.start,c.end);return Pj("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};U.date=Fk;var Gk=function(a,b,c,d){var e=R(Gk,arguments);return Pj("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};U.inList=Gk;var Hk=function(a,b){return Pj("Filter.intersects",{leftField:".all",rightValue:P("Feature",a),maxError:b})};U.bounds=Hk;
U.prototype.name=function(){return"Filter"};var Ik=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in wk))throw Error("Unknown filtering operator: "+b);a=P("Filter."+wk[b],a,c);return d?a.$a():a};U.metadata=Ik;var V=function(a,b,c){S.call(this,a,b,c);Jk()};A(V,S);z("ee.Collection",V);var Kk=!1,Jk=function(){Kk||(Wj(V,"Collection","Collection"),Wj(V,"AggregateFeatureCollection","Collection","aggregate_"),Kk=!0)};V.prototype.filter=function(a){a=R(V.prototype.filter,arguments).filter;if(!a)throw Error("Empty filters.");return Cj(this,P("Collection.filter",this,a))};V.prototype.filter=V.prototype.filter;
V.prototype.Nc=function(a,b,c){var d=R(V.prototype.Nc,arguments);return this.filter(Ik(d.name,d.operator,d.value))};V.prototype.filterMetadata=V.prototype.Nc;V.prototype.Md=function(a){return this.filter(Hk(a))};V.prototype.filterBounds=V.prototype.Md;V.prototype.Mc=function(a,b){var c=R(V.prototype.Mc,arguments);return this.filter(Fk(c.start,c.end))};V.prototype.filterDate=V.prototype.Mc;
V.prototype.limit=function(a,b,c){var d=R(V.prototype.limit,arguments);return Cj(this,P("Collection.limit",this,d.max,d.property,d.ascending))};V.prototype.limit=V.prototype.limit;V.prototype.sort=function(a,b){var c=R(V.prototype.sort,arguments);return Cj(this,P("Collection.limit",this,void 0,c.property,c.ascending))};V.prototype.sort=V.prototype.sort;V.prototype.name=function(){return"Collection"};V.prototype.elementType=function(){return S};
V.prototype.map=function(a,b){var c=this.elementType();return Cj(this,P("Collection.map",this,function(d){return a(new c(d))},b))};V.prototype.map=V.prototype.map;V.prototype.Yd=function(a,b){b=r(b)?b:null;var c=this.elementType();return P("Collection.iterate",this,function(d,e){return a(new c(d),e)},b)};V.prototype.iterate=V.prototype.Yd;var W=function(a,b){if(!(this instanceof W))return Bj(W,arguments);if(a instanceof W){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)");Lk();if(a instanceof T||null===a)S.call(this,new O("Feature"),{geometry:a,metadata:b||null});else if(a instanceof M)S.call(this,a.h,a.args,a.w);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=Qb(c);c["system:index"]=a.id}S.call(this,new O("Feature"),{geometry:new T(a.geometry),metadata:c})}else S.call(this,new O("Feature"),{geometry:new T(a),metadata:b||null})};A(W,S);z("ee.Feature",W);var Mk=!1,Lk=function(){Mk||(Wj(W,"Feature","Feature"),Mk=!0)};W.prototype.C=function(a){return W.j.C.call(this,a)};W.prototype.getInfo=W.prototype.C;
W.prototype.getMap=function(a,b){var c=R(W.prototype.getMap,arguments);return P("Collection",[this]).getMap(c.visParams,c.callback)};W.prototype.getMap=W.prototype.getMap;W.prototype.name=function(){return"Feature"};var Yi=function(a){var b={},c=Nk(a.element,a);c=Ok(c,a,b);b.element=c;return b},Zi=function(a){var b={},c=a.element.map(function(d){d=Nk(d,a);return Ok(d,a,b)});b.element=c;return b},Ok=function(a,b,c){var d={};Fb(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 "bbox":null!=d.geometry&&console.warn("Multiple request parameters converted to region.");
if(e instanceof mk)d.geometry=e;else{e=t(e)?JSON.parse(e):e;if(!v(e))throw Error("Invalid bbox type, must be of type Array");d.geometry=new mk(e)}break;case "region":null!=d.geometry&&console.warn("Multiple request parameters converted to region.");e=t(e)?JSON.parse(e):e;d.geometry=new T(e);break;case "scale":d.scale=Number(e);break;default:c[f]=e}});Ob(d)||(d.input=a,a=Pj("Image.clipToBoundsAndScale",d));return a},Nk=function(a,b){var c=b.crs||"",d=b.crsTransform||b.crs_transform;if(null!=d)a:{var e=
d;if(t(e))try{e=JSON.parse(e)}catch(f){}if(v(e)){if(6===e.length&&db(e,u)){d=e;break a}throw Error("Invalid argument, crs transform must be a list of 6 numbers.");}throw Error("Invalid argument, crs transform was not a string or array.");}if(!c&&!d)return a;if(d&&!c)throw Error('Must specify "crs" if "crsTransform" is specified.');d?(a=Pj("Image.reproject",{image:a,crs:c,crsTransform:d}),null!=b.dimensions&&null==b.scale&&null==b.region&&(e=b.dimensions,t(e)&&(e=e.split("x").map(Number)),2===e.length&&
(delete b.dimensions,c=(new O("Projection")).call(c,d),b.region=new mk([0,0,e[0],e[1]],c,!0)))):a=Pj("Image.setDefaultProjection",{image:a,crs:c,crsTransform:[1,0,0,0,-1,0]});return a},Qk=function(a,b){var c={};b=Pk(b,c);Ob(b)||(b.image=a,a=Pj("Image.visualize",b));c.image=a;return c},Pk=function(a,b){var c="bands gain bias min max gamma palette opacity forceRgbOutput".split(" "),d={};Fb(a,function(e,f){hb(c,f)?d[f]=e:b[f]=e});return d};var X=function(a){if(!(this instanceof X))return Bj(X,arguments);if(a instanceof X)return a;Rk();var b=arguments.length;if(0==b||1==b&&!r(a))S.call(this,new O("Image.mask"),{image:new X(0),mask:new X(0)});else if(1==b)if(Gj(a))S.call(this,new O("Image.constant"),{value:a});else if(Hj(a))S.call(this,new O("Image.load"),{id:a});else{if(v(a))return Sk(bb(a,function(d){return new X(d)}));if(a instanceof M)"Array"==a.name()?S.call(this,new O("Image.constant"),{value:a}):S.call(this,a.h,a.args,a.w);else throw Error("Unrecognized argument type to convert to an Image: "+
a);}else if(2==b){b=arguments[0];var c=arguments[1];if(Hj(b)&&Gj(c))S.call(this,new O("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};A(X,S);z("ee.Image",X);var Tk=!1,Rk=function(){Tk||(Wj(X,"Image","Image"),Wj(X,"Window","Image","focal_"),Tk=!0)};X.prototype.C=function(a){return X.j.C.call(this,a)};X.prototype.getInfo=X.prototype.C;
X.prototype.getMap=function(a,b){var c=this,d=R(X.prototype.getMap,arguments),e=Qk(this,d.visParams);if(d.callback){var f=d.callback;zi(e,function(g,h){g=g?Object.assign(g,{image:c}):void 0;f(g,h)})}else return d=zi(e),d.image=this,d};X.prototype.getMap=X.prototype.getMap;X.prototype.Fa=function(a,b){var c=R(X.prototype.Fa,arguments),d=c.params?Qb(c.params):{};d.image=this.D();if(c.callback){var e=c.callback;Hi(d,function(f,g){f?e(Ii(f)):e(null,g)})}else return Ii(Hi(d))};
X.prototype.getDownloadURL=X.prototype.Fa;X.prototype.Rc=function(a,b){var c=R(X.prototype.Rc,arguments);if(H){var d={};var e=Ok(this,c.params,d);d=Qk(e,d)}else if(d=Qk(this,c.params),d.region)if(d.region instanceof T&&(d.region=d.region.Ib()),v(d.region)||Ij(d.region))d.region=He(d.region);else if(!t(d.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(c.callback)Di(d,function(f,g){var h="";if(!r(g))try{h=Gi(f)}catch(k){g=String(k.message)}c.callback(h,g)});else return Gi(Di(d))};
X.prototype.getThumbURL=X.prototype.Rc;var Uk=function(a,b,c){var d=R(Uk,arguments);return Sk([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};X.rgb=Uk;var Vk=function(a){return Sk(Array.prototype.slice.call(arguments),null)};X.cat=Vk;var Sk=function(a,b){if(0==a.length)return P("Image.constant",[]);for(var c=new X(a[0]),d=1;d<a.length;d++)c=P("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
X.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||Hj(b[0])||Gj(b[0])){for(var d=0;d<b.length;d++)if(!(Hj(b[d])||Gj(b[d])||b[d]instanceof M))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return Pj("Image.select",c)};X.prototype.select=X.prototype.select;
X.prototype.expression=function(a,b){var c=R(X.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 X(f[g])}var h=P("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d);c=new N;c.encode=function(k){return h.encode(k)};c.Jc=function(k,m){return Wd(k(h),m)};c.G=function(){return{name:"",args:bb(d,function(k){return{name:k,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};
X.prototype.expression=X.prototype.expression;X.prototype.clip=function(a){try{a=new T(a)}catch(b){}return P("Image.clip",this,a)};X.prototype.clip=X.prototype.clip;X.prototype.me=function(a){var b=1!=arguments.length||Hj(arguments[0])?mb(arguments):arguments[0];return P("Image.rename",this,b)};X.prototype.rename=X.prototype.me;X.prototype.name=function(){return"Image"};var Wk=function(a){if(this instanceof Wk){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof Wk)return a}else return Bj(Wk,arguments);Xk();if(v(a))M.call(this,null,null),this.zb=a;else if(a instanceof M)M.call(this,a.h,a.args,a.w),this.zb=null;else throw Error("Invalid argument specified for ee.List(): "+a);};A(Wk,M);z("ee.List",Wk);var Yk=!1,Xk=function(){Yk||(Wj(Wk,"List","List"),Yk=!0)};
Wk.prototype.encode=function(a){return v(this.zb)?bb(this.zb,function(b){return a(b)}):Wk.j.encode.call(this,a)};Wk.prototype.P=function(a){return v(this.zb)?Ud(a(this.zb)):Wk.j.P.call(this,a)};Wk.prototype.name=function(){return"List"};var Y=function(a,b){if(!(this instanceof Y))return Bj(Y,arguments);if(a instanceof Y)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");Zk();a instanceof T&&(a=new W(a));a instanceof W&&(a=[a]);if(Hj(a)){var c={tableId:a};b&&(c.geometryColumn=b);V.call(this,new O("Collection.loadTable"),c)}else if(v(a))V.call(this,new O("Collection"),{features:bb(a,function(d){return new W(d)})});else if(a instanceof Wk)V.call(this,
new O("Collection"),{features:a});else if(a instanceof M)V.call(this,a.h,a.args,a.w);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};A(Y,V);z("ee.FeatureCollection",Y);var $k=!1,Zk=function(){$k||(Wj(Y,"FeatureCollection","FeatureCollection"),$k=!0)};Y.prototype.getMap=function(a,b){var c=R(Y.prototype.getMap,arguments),d=Pj("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.getMap(void 0,c.callback);else return d.getMap()};
Y.prototype.getMap=Y.prototype.getMap;Y.prototype.C=function(a){return Y.j.C.call(this,a)};Y.prototype.getInfo=Y.prototype.C;Y.prototype.Fa=function(a,b,c,d){var e=R(Y.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;Fa(g)&&(g=g.join(","));f.selectors=g}if(e.callback)Ji(f,function(h,k){h?e.callback(Ki(h)):e.callback(null,k)});else return Ki(Ji(f))};Y.prototype.getDownloadURL=Y.prototype.Fa;
Y.prototype.select=function(a,b,c){if(Hj(a)){var d=Array.prototype.slice.call(arguments);return this.map(function(f){return f.select(d)})}var e=R(Y.prototype.select,arguments);return this.map(function(f){return f.select(e)})};Y.prototype.select=Y.prototype.select;Y.prototype.name=function(){return"FeatureCollection"};Y.prototype.elementType=function(){return W};var Z=function(a){if(!(this instanceof Z))return Bj(Z,arguments);if(a instanceof Z)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");al();a instanceof X&&(a=[a]);if(Hj(a))V.call(this,new O("ImageCollection.load"),{id:a});else if(v(a))V.call(this,new O("ImageCollection.fromImages"),{images:bb(a,function(b){return new X(b)})});else if(a instanceof Wk)V.call(this,new O("ImageCollection.fromImages"),{images:a});else if(a instanceof
M)V.call(this,a.h,a.args,a.w);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};A(Z,V);z("ee.ImageCollection",Z);var bl=!1,al=function(){bl||(Wj(Z,"ImageCollection","ImageCollection"),Wj(Z,"reduce","ImageCollection"),bl=!0)};Z.prototype.Pc=function(a,b){var c=R(Z.prototype.Pc,arguments);return cl(this,c,["png","jpg","jpeg"],"filmstrip")};Z.prototype.getFilmstripThumbURL=Z.prototype.Pc;
Z.prototype.Sc=function(a,b){var c=R(Z.prototype.Sc,arguments);return cl(this,c,["gif"],"video")};Z.prototype.getVideoThumbURL=Z.prototype.Sc;
var cl=function(a,b,c,d){var e={};a=a.map(function(h){h=Nk(h,b.params);return Ok(h,b.params,e)});var f={},g=Pk(e,f);f.imageCollection=a.map(function(h){g.image=h;return Pj("Image.visualize",g)});null!=b.params.dimensions&&(f.dimensions=b.params.dimensions);if(f.format){if(!cb(c,function(h){return h.toLowerCase()==f.format.toLowerCase()}))throw Error("Invalid format specified.");}else f.format=c[0];c=Di;if(Vh&&H)switch(d){case "video":c=Ei;break;case "filmstrip":c=Fi}if(b.callback)c(f,function(h,k){var m=
"";if(!r(k))try{m=Gi(h)}catch(p){k=String(p.message)}b.callback(m,k)});else return Gi(c(f))};Z.prototype.getMap=function(a,b){var c=R(Z.prototype.getMap,arguments),d=P("ImageCollection.mosaic",this);if(c.callback)d.getMap(c.visParams,c.callback);else return d.getMap(c.visParams)};Z.prototype.getMap=Z.prototype.getMap;Z.prototype.C=function(a){return Z.j.C.call(this,a)};Z.prototype.getInfo=Z.prototype.C;
Z.prototype.select=function(a,b){var c=arguments;return this.map(function(d){return d.select.apply(d,c)})};Z.prototype.select=Z.prototype.select;Z.prototype.first=function(){return new X(P("Collection.first",this))};Z.prototype.first=Z.prototype.first;Z.prototype.name=function(){return"ImageCollection"};Z.prototype.elementType=function(){return X};var dl=function(a){this.Fc=a;this.id=null},fl=function(a){var b={element:el(a)};Object.assign(b,a);b=Gb(b,Ea);return new dl(b)};dl.prototype.start=function(a,b){var c=this;D(this.Fc,"Task config must be specified for tasks to be started.");if(a){var d=function(){Va(c.id);$i(c.id,c.Fc,function(e,f){f?b(f):a()})};this.id?d():Mi(1,function(e){(e=e&&e[0])?(c.id=e,d()):b("Failed to obtain task ID.")})}else this.id=this.id||Mi(1)[0],Va(this.id,"Failed to obtain task ID."),$i(this.id,this.Fc)};
dl.prototype.start=dl.prototype.start;var gl=function(a,b,c,d,e,f,g,h,k,m){var p=R(gl,arguments);p=hl(p,"ASSET","EXPORT_IMAGE");return fl(p)};z("ee.batch.Export.image.toAsset",gl);var il=function(a,b,c,d,e,f,g,h,k,m,p,Q,K,oa,lc){var Ga=R(il,arguments);Ga=hl(Ga,"GOOGLE_CLOUD_STORAGE","EXPORT_IMAGE");return fl(Ga)};z("ee.batch.Export.image.toCloudStorage",il);var jl=function(a,b,c,d,e,f,g,h,k,m,p,Q,K,oa,lc){var Ga=R(jl,arguments);Ga=hl(Ga,"DRIVE","EXPORT_IMAGE");return fl(Ga)};
z("ee.batch.Export.image.toDrive",jl);var kl=function(a,b,c,d,e,f,g,h,k,m,p,Q){var K=R(kl,arguments);K=hl(K,"GOOGLE_CLOUD_STORAGE","EXPORT_TILES");return fl(K)};z("ee.batch.Export.map.toCloudStorage",kl);var ll=function(a,b,c,d,e,f){var g=R(ll,arguments);g=hl(g,"GOOGLE_CLOUD_STORAGE","EXPORT_FEATURES");return fl(g)};z("ee.batch.Export.table.toCloudStorage",ll);var ml=function(a,b,c,d,e,f){var g=R(ml,arguments);g.type="EXPORT_FEATURES";g=hl(g,"DRIVE","EXPORT_FEATURES");return fl(g)};
z("ee.batch.Export.table.toDrive",ml);var nl=function(a,b,c){var d=R(nl,arguments);d=hl(d,"ASSET","EXPORT_FEATURES");return fl(d)};z("ee.batch.Export.table.toAsset",nl);var ol=function(a,b,c,d,e,f,g,h,k,m,p,Q){var K=R(ol,arguments);K=hl(K,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO");return fl(K)};z("ee.batch.Export.video.toCloudStorage",ol);var pl=function(a,b,c,d,e,f,g,h,k,m,p,Q){var K=R(pl,arguments);K=hl(K,"DRIVE","EXPORT_VIDEO");return fl(K)};z("ee.batch.Export.video.toDrive",pl);
var ql=function(a,b,c,d,e,f,g,h,k,m,p){var Q=R(ql,arguments);Q=hl(Q,"GOOGLE_CLOUD_STORAGE","EXPORT_VIDEO_MAP");return fl(Q)};z("ee.batch.Export.videoMap.toCloudStorage",ql);
var el=function(a){var b=function(d){return d in a},c=rl.find(b);D(1===eb(rl,b),'Expected a single "image" or "collection" key.');b=a[c];if(!(b instanceof X||b instanceof Y||b instanceof Z||b instanceof S))throw Error("Unknown element type provided: "+typeof b+". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection or ee.Element.");delete a[c];return b},hl=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=sl(e,a),delete e.formatOptions,Object.assign(e,a));e=tl(e,b);null!=e.crsTransform&&(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_TILES":e=
b=tl(e,b);break;case "EXPORT_FEATURES":v(e.selectors)&&(e.selectors=e.selectors.join());e=tl(e,b);break;case "EXPORT_VIDEO":e=ul(e);e=tl(e,b);null!=e.crsTransform&&(e.crs_transform=e.crsTransform,delete e.crsTransform);break;case "EXPORT_VIDEO_MAP":e=ul(e);e=tl(e,b);break;default:throw Error("Unknown export type: "+e.type);}if(d&&null!=e.region){d=e;b=e.region;if(b instanceof T)b=b.Ib();else if(t(b))try{b=Xa(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 nk(b)}catch(f){try{new qk(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=He(b);d.region=b}return e},tl=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=Da(a.folder);if(!hb(["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},vl={GEO_TIFF:["cloudOptimized","fileDimensions"],TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")},wl={GEO_TIFF:"tiff",TF_RECORD_IMAGE:"tfrecord"},
ul=function(a){a.videoOptions=a.framesPerSecond||5;a.maxFrames=a.maxFrames||1E3;a.maxPixels=a.maxPixels||1E8;a.fileFormat="MP4";return a},sl=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=wl[b];for(var d=vl[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(!hb(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},rl=["image","collection"];var xl=function(a){if(!(this instanceof xl))return Bj(xl,arguments);if(a instanceof xl)return a;yl();if(u(a))M.call(this,null,null),this.Bb=a;else if(a instanceof M)M.call(this,a.h,a.args,a.w),this.Bb=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};A(xl,M);z("ee.Number",xl);var zl=!1,yl=function(){zl||(Wj(xl,"Number","Number"),zl=!0)};xl.prototype.encode=function(a){return u(this.Bb)?this.Bb:xl.j.encode.call(this,a)};
xl.prototype.P=function(a){return u(this.Bb)?Ud(a(this.Bb)):xl.j.P.call(this,a)};xl.prototype.name=function(){return"Number"};var Al=function(a){if(!(this instanceof Al))return Bj(Al,arguments);if(a instanceof Al)return a;Bl();if(t(a))M.call(this,null,null),this.Gb=a;else if(a instanceof M)this.Gb=null,a.h&&"String"==a.h.G().returns?M.call(this,a.h,a.args,a.w):M.call(this,new O("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};A(Al,M);z("ee.String",Al);var Cl=!1,Bl=function(){Cl||(Wj(Al,"String","String"),Cl=!0)};
Al.prototype.encode=function(a){return t(this.Gb)?this.Gb:Al.j.encode.call(this,a)};Al.prototype.P=function(a){return t(this.Gb)?Ud(a(this.Gb)):Al.j.P.call(this,a)};Al.prototype.name=function(){return"String"};var Dl=function(a,b){if(!(this instanceof Dl))return Bj(Dl,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(El(g in Dj?Dj[g]:null,f.name))}if(!r(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.ja=Fl(a,c,b);this.yd=b.apply(null,c)};A(Dl,N);z("ee.CustomFunction",Dl);Dl.prototype.encode=function(a){return{type:"Function",argumentNames:bb(this.ja.args,function(b){return b.name}),body:a(this.yd)}};
Dl.prototype.P=function(a){return Xd(this.ja.args.map(function(b){return b.name}),a(this.yd))};Dl.prototype.Jc=function(a,b){return Wd(a(this),b)};Dl.prototype.G=function(){return this.ja};
var El=function(a,b){a=a||Object;if(!(a.prototype instanceof M))if(a&&a!=Object)if(a==String)a=Al;else if(a==Number)a=xl;else if(a==Array)a=q.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=M;var c=function(d){this.args=this.h=null;this.w=d};c.prototype=a.prototype;return new c(b)},Gl=function(a,b){b=bb(b,function(c){return{name:null,type:t(c)?c:Ej(c)}});b={name:"",returns:t("Object")?"Object":Ej("Object"),args:b};return new Dl(b,a)},Fl=function(a,b,
c){for(var d=[],e=0;e<b.length;e++)null===b[e].w&&d.push(e);if(0==d.length)return a;var f=function(k){var m=0;w(k)&&!x(k)&&("Function"==k.type&&m++,Fb(k,function(p){m+=f(p)}));return m};e=Qe(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].w=h;a.args[g].name=h}return a};var Hl=function(a,b){if(!(this instanceof Hl))return Bj(Hl,arguments);if(a instanceof Hl)return a;Il();var c=R(Hl,arguments);a=c.date;c=c.tz;var d=new O("Date"),e={},f=null;if(Hj(a)){if(e.value=a,c)if(Hj(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(Gj(a))e.value=a;else if(Ha(a))e.value=Math.floor(a.getTime());else if(a instanceof M)a.h&&"Date"==a.h.G().returns?(d=a.h,e=a.args,f=a.w):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
a);M.call(this,d,e,f)};A(Hl,M);z("ee.Date",Hl);var Jl=!1,Il=function(){Jl||(Wj(Hl,"Date","Date"),Jl=!0)};Hl.prototype.name=function(){return"Date"};z("ee.Deserializer",function(){});var Ll=function(a){return Kl(JSON.parse(a))};z("ee.Deserializer.fromJSON",Ll);var Kl=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]=Ml(f,b)}a=a.value}return Ml(a,b)};z("ee.Deserializer.decode",Kl);
var Ml=function(a,b){if(null===a||u(a)||ya(a)||t(a))return a;if(v(a))return bb(a,function(f){return Ml(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 El(Object,c);case "Date":c=a.value;if(!u(c))throw Error("Invalid date value: "+c);return new Hl(c/1E3);case "Bytes":return c=new Sd,c.encode=
function(){return a},c;case "Invocation":c="functionName"in a?Oj(a.functionName):Ml(a["function"],b);var d=Hb(a.arguments,function(f){return Ml(f,b)});if(c instanceof N)return c.apply(d);if(c instanceof M)return new M(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return Hb(a.value,function(f){return Ml(f,b)});case "Function":var e=Ml(a.body,b);c={name:"",args:bb(a.argumentNames,function(f){return{name:f,type:"Object",optional:!1}}),returns:"Object"};return new Dl(c,
function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new T(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var Nl=function(a){if(!(this instanceof Nl))return Bj(Nl,arguments);if(a instanceof Nl)return a;Ol();Ij(a)?(M.call(this,null,null),this.pb=a):(a instanceof M&&a.h&&"Dictionary"==a.h.G().returns?M.call(this,a.h,a.args,a.w):M.call(this,new O("Dictionary"),{input:a},null),this.pb=null)};A(Nl,M);z("ee.Dictionary",Nl);var Pl=!1,Ol=function(){Pl||(Wj(Nl,"Dictionary","Dictionary"),Pl=!0)};Nl.prototype.encode=function(a){return null===this.pb?Nl.j.encode.call(this,a):a(this.pb)};
Nl.prototype.P=function(a){return null===this.pb?Nl.j.P.call(this,a):Ud(a(this.pb))};Nl.prototype.name=function(){return"Dictionary"};var Ql={};z("ee.Terrain",Ql);Ql.Wc=!1;Ql.Ve=function(){Ql.Wc||(Wj(Ql,"Terrain","Terrain"),Ql.Wc=!0)};Ql.reset=function(){Xj(Ql);Ql.Wc=!1};var Wl=function(a,b,c,d,e){if("ready"!=Rl||a||b){var f=null!=c;if(d)if(f)Sl.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Rl&&f)Tl.push(c);else if(Rl="loading",ii(a,b,e),f)Tl.push(c),Sj(Ul,Vl);else try{Sj(),Ul()}catch(g){throw Vl(g),g;}}else c&&c()};z("ee.initialize",Wl);
var Zl=function(){Rl="not_ready";gi=fi=ei=ci=null;hi=!1;Ba("gapi")&&gapi.client&&delete gapi.client.earthengine;di=!1;Qj=null;Rj={};Xj(Hl);Jl=!1;Xj(Nl);Pl=!1;Xj(S);ek=!1;Xj(X);Tk=!1;Xj(W);Mk=!1;Xj(V);Kk=!1;Xj(Z);bl=!1;Xj(Y);$k=!1;Xj(U);vk=!1;Xj(T);hk=!1;Xj(Wk);Yk=!1;Xj(xl);zl=!1;Xj(Al);Cl=!1;Ql.reset();for(var a=q.ee,b=0;b<Xl.length;b++){var c=Xl[b];Xj(a[c]);delete a[c]}Xl=[];Dj=a;a=Yl;for(var d in a)delete a[d]};z("ee.reset",Zl);var $l={zf:"not_ready",LOADING:"loading",Af:"ready"};
z("ee.InitState",$l);z("ee.InitState.NOT_READY","not_ready");z("ee.InitState.LOADING","loading");z("ee.InitState.READY","ready");var Rl="not_ready",Tl=[],Sl=[];z("ee.TILE_SIZE",256);var Xl=[],Yl={};z("ee.Algorithms",Yl);var am=function(a,b){t(a)&&(a=new O(a));return N.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};z("ee.call",am);var bm=function(a,b){t(a)&&(a=new O(a));return a.apply(b)};z("ee.apply",bm);
var Ul=function(){if("loading"==Rl){try{Il();Ol();dk();Rk();Lk();Jk();al();Zk();uk();fk();Xk();yl();Bl();Ql.Ve();var a=Tj(),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=q.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=cm(g),Xl.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Rj[g]=!0):f[g].signature={});Dj=f;dm()}catch(h){Vl(h);return}Rl="ready";for(Sl=[];0<Tl.length;)Tl.shift()()}},Vl=function(a){if("loading"==
Rl)for(Rl="not_ready",Tl=[];0<Sl.length;)Sl.shift()(a)},dm=function(){var a=Uj();Kb(a).sort().forEach(function(b){var c=a[b],d=c.G();if(!d.hidden){b=b.split(".");var e=Yl;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=ob(b,1)}f=function(g){return Nj(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=y(c.toString,c);e[b[0]]=f}})},cm=function(a){var b=function(c){var d=q.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 Bj(d,e);d=Vj(a);var g=!(e[0]instanceof M),h=!1;d&&(f?g?h=!0:e[0].h&&e[0].h.G().returns==d.G().returns||(h=!0):h=!0);if(h)e=Jj(e,d.G())?e[0]:Lj(d,e),M.call(this,d,Mj(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];M.call(this,e.h,e.args,e.w)}};A(b,M);b.prototype.name=function(){return a};Wj(b,a,a);return b};
Kj=function(a,b){if(null===a)return null;if(r(a)){var c=q.ee;switch(b){case "Image":return new X(a);case "Feature":return a instanceof V?P("Feature",P("Collection.geometry",a)):new W(a);case "Element":if(a instanceof S)return a;if(a instanceof T)return new W(a);if(a instanceof M)return new S(a.h,a.args,a.w);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof Y?P("Collection.geometry",a):new T(a);case "FeatureCollection":case "Collection":return a instanceof V?a:new Y(a);
case "ImageCollection":return new Z(a);case "Filter":return new U(a);case "Algorithm":if(t(a))return new O(a);if(x(a)){b=a.length;c=[];for(var d=0;d<b;d++)c[d]="Object";return Gl(a,c)}if(a instanceof Sd)return a;throw Error("Argument is not a function: "+a);case "String":return Hj(a)||a instanceof Al||a instanceof M?new Al(a):a;case "Dictionary":return Ij(a)?a:new Nl(a);case "List":return new Wk(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new xl(a);default:if(b in
c){d=Vj(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 em=function(a,b,c){Od.call(this,a,b,c);this.tileSize=new google.maps.Size(256,256);this.Od=new Ad;this.Nd=new Ad};ja(em,Od);em.prototype.getTile=function(a,b){var c=Pd(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=gg("DIV");fm(this,b,a,c,d);gm(this);return d};
var fm=function(a,b,c,d,e){var f=Vg();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),kb(this.Ca,d),gm(this);else throw this.qd.add(d),Error("Unable to request floating point array buffers.");}},a);f.send()},gm=function(a){a.dispatchEvent(new Qd(a.Ca.length))};em.prototype.i=function(){this.Nd=this.Od=null;Od.prototype.i.call(this)};
z("ee.FloatTileOverlay",em);var hm=function(){this.nc=new Map};hm.prototype.clear=function(){this.nc.clear()};var im=function(a,b){a.nc.has(b)||a.nc.set(b,{throttleCount:0,errorCount:0,tileLatencies:[]});return a.nc.get(b)};var jm=function(a){B.call(this);this.Ha=a;this.l={}};A(jm,B);var km=[];jm.prototype.ha=function(a,b,c,d){v(b)||(b&&(km[0]=b.toString()),b=km);for(var e=0;e<b.length;e++){var f=id(a,b[e],c||this.handleEvent,d||!1,this.Ha||this);if(!f)break;this.l[f.key]=f}return this};jm.prototype.Ab=function(a,b,c,d){return lm(this,a,b,c,d)};var lm=function(a,b,c,d,e,f){if(v(c))for(var g=0;g<c.length;g++)lm(a,b,c[g],d,e,f);else{b=hd(b,c,d||a.handleEvent,e,f||a.Ha||a);if(!b)return a;a.l[b.key]=b}return a};
jm.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=jd(c),d=!!d,b=Yc(a)?a.rb(b,c,d,e):a?(a=ld(a))?a.rb(b,c,d,e):null:null,b&&(qd(b),delete this.l[b.key])};jm.prototype.Eb=function(){Fb(this.l,function(a,b){this.l.hasOwnProperty(b)&&qd(a)},this);this.l={}};jm.prototype.i=function(){jm.j.i.call(this);this.Eb()};
jm.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var nm=function(a,b){r(a.name)?(this.name=a.name,this.code=Mb[a.name]):(this.code=a=Ua(a.code),this.name=mm(a));Pa.call(this,yc("%s %s",this.name,b))};A(nm,Pa);var mm=function(a){var b=Nb(function(c){return a==c});if(!r(b))throw Error("Invalid code: "+a);return b},Mb={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 om=function(a,b){C.call(this,a.type,b);this.$=a};A(om,C);var pm=function(){E.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(pm,E);l=pm.prototype;l.abort=function(){try{this.I.abort()}catch(a){throw new nm(a,"aborting read");}};l.xa=function(){return this.I.readyState};l.getError=function(){return this.I.error&&new nm(this.I.error,"reading file")};
l.Va=function(a){this.dispatchEvent(new om(a,this))};l.i=function(){pm.j.i.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 qm=function(a,b){D(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 rm=function(a,b){E.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.mc=new hm;this.Ba=new Ad;this.Aa=0;this.pd=a;this.pa=new jm(this);this.projection=null;this.radius=0;this.alt=null};A(rm,E);z("ee.layers.AbstractOverlay",rm);
rm.prototype.Ac=function(a){return id(this,"tile-load",a)};rm.prototype.addTileCallback=rm.prototype.Ac;rm.prototype.jd=function(a){qd(a)};rm.prototype.removeTileCallback=rm.prototype.jd;l=rm.prototype;l.Qc=function(){return sm(this,"throttled")+sm(this,"loading")+sm(this,"new")};l.setOpacity=function(a){this.opacity=a;this.Ba.forEach(function(b){qm(b.O,this.opacity)},this)};l.getStats=function(){return this.mc};
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;qm(b.O,this.opacity);this.Ba.set(a,b);tm(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(),Oa(b))};
var tm=function(a,b){a.pa.ha(b,"status-changed",function(){switch(b.getStatus()){case "loaded":var c=b.af,d=(new Date).getTime();im(this.mc,b.zoom).tileLatencies.push(d-c);this.dispatchEvent(new um(this.Qc()));break;case "throttled":im(this.mc,b.zoom).throttleCount++;this.dispatchEvent(new vm(b.ca));break;case "failed":im(this.mc,b.zoom).errorCount++,this.dispatchEvent(new wm(b.ca,b.Pe))}})};
rm.prototype.i=function(){rm.j.i.call(this);this.Ba.forEach(Oa);this.Ba.clear();this.Ba=null;Oa(this.pa);this.pd=this.pa=null};var sm=function(a,b){return eb(a.Ba.A(),function(c){return c.getStatus()==b})},um=function(){C.call(this,"tile-load")};A(um,C);var vm=function(){C.call(this,"tile-throttle")};A(vm,C);var wm=function(a,b){C.call(this,"tile-fail");this.errorMessage=b};A(wm,C);
var xm=function(a,b,c,d){E.call(this);this.Ua=a;this.zoom=b;this.O=c.createElement("div");this.O.id=d;this.cf=5;this.ic=function(){};this.md="new";this.ne=0;this.Yc=!1};A(xm,E);
var zm=function(a){if(!a.Yc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");ym(a,"loading");a.af=(new Date).getTime();a.la=new G;a.la.gb="blob";a.la.ha("complete",function(){var b=kh(this.la),c=this.la.getStatus();429==c&&ym(this,"throttled");if(Rg(c)){var d={};Fb(lh(this.la),function(f,g){d[g.toLowerCase()]=f});this.rf=d;this.ue=b;this.qb()}else if(b){var e=new pm;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",Ma(Oa,a.la));a.ca&&a.ca.endsWith("&profiling=1")&&H&&(a.ca=a.ca.replace("&profiling=1",""),a.la.headers.set("X-Earth-Engine-Computation-Profile","1"));a.la.send(a.ca,"GET")};l=xm.prototype;l.qb=function(){this.ic(this);ym(this,"loaded")};l.lb=function(){Oa(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.cf?(this.Pe=b(a),ym(this,"failed")):(this.lb(),setTimeout(y(function(){this.fa||(this.Yc=!0,zm(this),this.Yc=!1)},this),1E3*Math.pow(2,this.ne++)))};l.abort=function(){this.lb();ym(this,"aborted")};l.getStatus=function(){return this.md};var ym=function(a,b){a.md=b;a.dispatchEvent("status-changed")},Am={aborted:!0,failed:!0,loaded:!0};
xm.prototype.i=function(){xm.j.i.call(this);this.lb();this.O.remove();this.ic=null};var Bm=function(){B.call(this)};A(Bm,B);var Cm=function(a,b){rm.call(this,a,b);this.Ad=new Ad;this.Jd=new Ad};ja(Cm,rm);Cm.prototype.Gd=function(a,b,c,d){var e=new Dm(a,b,c,d);this.pa.ha(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Ad.set(a,new Float32Array(e.Je)),this.Jd.set(a,e.O))});return e};Cm.prototype.i=function(){rm.prototype.i.call(this);this.Jd=this.Ad=null};z("ee.layers.BinaryOverlay",Cm);var Dm=function(a,b,c,d){xm.call(this,a,b,c,d)};ja(Dm,xm);
Dm.prototype.qb=function(){var a=new pm;a.ha("loadend",function(){this.Je=a.I.result;xm.prototype.qb.call(this)},void 0,this);a.readAsArrayBuffer(this.ue)};var Em=function(a){E.call(this);this.wb={};this.vb={};this.Ha=new jm(this);this.u=a};A(Em,E);var Fm=[Fc&&!Pc("11")?"readystatechange":"load","abort","error"],Gm=function(a,b,c){(c=t(c)?c:c.src)&&(a.wb[b]={src:c,Fd:r(void 0)?void 0:null})},Hm=function(a,b){delete a.wb[b];var c=a.vb[b];c&&(delete a.vb[b],a.Ha.sc(c,Fm,a.fe),Ob(a.vb)&&Ob(a.wb)&&a.dispatchEvent("complete"))};
Em.prototype.start=function(){var a=this.wb;$a(Kb(a),function(b){var c=a[b];if(c&&(delete a[b],!this.fa)){if(this.u){var d=this.u;d=(d?new mg(lg(d)):Qa||(Qa=new mg)).Ne("IMG")}else d=new Image;c.Fd&&(d.crossOrigin=c.Fd);this.Ha.ha(d,Fm,this.fe);this.vb[b]=d;d.id=b;d.src=c.src}},this)};
Em.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||Hm(this,b.id)}};Em.prototype.i=function(){delete this.wb;delete this.vb;Oa(this.Ha);Em.j.i.call(this)};var Im=function(a,b){rm.call(this,a,b)};ja(Im,rm);Im.prototype.Gd=function(a,b,c,d){return new Jm(a,b,c,d)};z("ee.layers.ImageOverlay",Im);var Jm=function(a,b,c,d){xm.call(this,a,b,c,d);this.ic=Km;this.Wd=this.L=this.Xb=null;this.Cb=""};ja(Jm,xm);
Jm.prototype.qb=function(){try{var a=pc(this.ue);this.Cb=mc(a).toString();var b="about:invalid#zClosurez"!==this.Cb?this.Cb:this.ca}catch(c){b=this.ca}this.L=new Em;Gm(this.L,this.O.id+"-image",b);this.Wd=hd(this.L,Lm,function(c){"load"==c.type?(this.Xb=c.target,xm.prototype.qb.call(this)):this.Fb()},void 0,this);this.L.start()};Jm.prototype.lb=function(){xm.prototype.lb.call(this);this.L&&(qd(this.Wd),Oa(this.L))};Jm.prototype.i=function(){xm.prototype.i.call(this);this.Cb&&URL.revokeObjectURL(this.Cb)};
var Km=function(a){a.O.appendChild(a.Xb)},Lm=["load","abort","error"];var Mm=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 Nm=function(a,b,c,d){B.call(this);this.zd=a;this.ra=b;this.od=d||"";this.bc=c};A(Nm,Bm);z("ee.layers.CloudStorageTileSource",Nm);Nm.prototype.ae=function(a){if(a.zoom<=this.bc)a.ca=this.Ub(a.Ua,a.zoom);else{var b=a.zoom-this.bc,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.Ub(c,a.zoom-b);a.ic=Ma(Om,this.bc)}var d=y(a.Fb,a);a.Fb=y(function(e){e&&(e.includes("The specified key does not exist.")||e.includes("AccessDenied"))?ym(a,"loaded"):d(e)},a);zm(a)};
Nm.prototype.Td=function(){return[this.zd,this.ra,this.bc,this.od].join("-")};Nm.prototype.Ub=function(a,b){a=Mm("https://storage.googleapis.com",this.zd,this.ra,String(b),String(a.x),String(a.y));this.od&&(a+=this.od);return a};
var Om=function(a,b){if(!b.Xb)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.Xb,c/a*(b.Ua.x%a),c/a*(b.Ua.y%a),c/a,c/a,0,0,c,c)};var Pm=function(){this.aa=[];this.da=[]};l=Pm.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 hb(this.aa,a)||hb(this.da,a)};
l.remove=function(a){var b=this.aa;var c=Za(b,a);0<=c?(jb(b,c),b=!0):b=!1;return b||kb(this.da,a)};l.A=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 Qm=function(a,b){B.call(this);this.be=a||0;this.ac=b||10;if(this.be>this.ac)throw Error("[goog.structs.Pool] Min can not be greater than max");this.ga=new Pm;this.ya=new Jd;this.delay=0;this.Zc=null;this.Lb()};A(Qm,B);Qm.prototype.sb=function(){var a=Na();if(!(null!=this.Zc&&a-this.Zc<this.delay)){for(var b;0<this.ga.o()&&(b=this.ga.ob(),!this.ad(b));)this.Lb();!b&&this.o()<this.ac&&(b=this.Hc());b&&(this.Zc=a,this.ya.add(b));return b}};
var Rm=function(a,b){return a.ya.remove(b)?(a.zc(b),!0):!1};l=Qm.prototype;l.zc=function(a){this.ya.remove(a);this.ad(a)&&this.o()<this.ac?this.ga.enqueue(a):this.Pb(a)};l.Lb=function(){for(var a=this.ga;this.o()<this.be;)a.enqueue(this.Hc());for(;this.o()>this.ac&&0<this.ga.o();)this.Pb(a.ob())};l.Hc=function(){return{}};l.Pb=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.Le?a.Le():!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.i=function(){Qm.j.i.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.Pb(a.ob());delete this.ga};var Sm=function(a,b){this.Zd=a;this.uc=b};Sm.prototype.getKey=function(){return this.Zd};Sm.prototype.clone=function(){return new Sm(this.Zd,this.uc)};var Tm=function(a){this.W=[];if(a)a:{if(a instanceof Tm){var b=a.ba();a=a.A();if(0>=this.o()){for(var c=this.W,d=0;d<b.length;d++)c.push(new Sm(b[d],a[d]));break a}}else b=Kb(a),a=Jb(a);for(d=0;d<b.length;d++)Um(this,b[d],a[d])}},Um=function(a,b,c){var d=a.W;d.push(new Sm(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=Tm.prototype;
l.remove=function(){var a=this.W,b=a.length,c=a[0];if(!(0>=b)){if(1==b)ib(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.A=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 cb(this.W,function(b){return b.uc==a})};l.wa=function(a){return cb(this.W,function(b){return b.getKey()==a})};l.clone=function(){return new Tm(this)};l.o=function(){return this.W.length};l.isEmpty=function(){return 0==this.W.length};l.clear=function(){ib(this.W)};var Vm=function(){Tm.call(this)};A(Vm,Tm);Vm.prototype.enqueue=function(a,b){Um(this,a,b)};Vm.prototype.ob=function(){return this.remove()};var Wm=function(a,b){this.Id=void 0;this.kc=new Vm;Qm.call(this,a,b)};A(Wm,Qm);l=Wm.prototype;l.sb=function(a,b){if(!a)return(a=Wm.j.sb.call(this))&&this.delay&&(this.Id=q.setTimeout(y(this.Wb,this),this.delay)),a;this.kc.enqueue(r(b)?b:100,a);this.Wb()};l.Wb=function(){for(var a=this.kc;0<a.o();){var b=this.sb();if(b)a.ob().apply(this,[b]);else break}};l.zc=function(a){Wm.j.zc.call(this,a);this.Wb()};l.Lb=function(){Wm.j.Lb.call(this);this.Wb()};
l.i=function(){Wm.j.i.call(this);q.clearTimeout(this.Id);this.kc.clear();this.kc=null};var Xm=function(a,b){B.call(this);this.$c=a;this.S=b||null};A(Xm,Bm);z("ee.layers.EarthEngineTileSource",Xm);Xm.prototype.ae=function(a,b){var c=id(a,"status-changed",function(){switch(a.getStatus()){case "loaded":var e=a.rf["x-earth-engine-computation-profile"];this.S&&e&&this.S.Ge(a.O.id,e);break;case "failed":case "aborted":this.S&&""!==a.O.id&&this.S.kf(a.O.id),qd(c)}},void 0,this);a.ca=this.Ub(a.Ua,a.zoom);var d=y(this.Tc,this,a);Ym().sb(d,b)};
Xm.prototype.Td=function(){return this.$c.mapid+"-"+this.$c.token};Xm.prototype.Tc=function(a,b){var c=Ym();if(a.fa||"aborted"==a.getStatus())Rm(c,b);else{var d=id(a,"status-changed",function(){a.md in Am&&(qd(d),Rm(c,b))});zm(a)}};Xm.prototype.Ub=function(a,b){a=this.$c.formatTileUrl(a.x,a.y,b);return this.S&&this.S.isEnabled()?a+"&profiling=1":a};var Ym=function(){Zm||(Zm=new Wm(0,4));return Zm},Zm=null;var an=function(){E.call(this);this.pc=new $m(0,60);this.fb=new Ad};A(an,E);z("ee.MapTileManager",an);an.Xc=void 0;an.Sd=function(){return an.Xc?an.Xc:an.Xc=new an};an.prototype.send=function(a,b,c,d,e){if(this.fb.get(a))throw Error("[ee.MapTileManager] ID in use");b=new bn(a,b,d,y(this.le,this),r(e)?e:1);this.fb.set(a,b);a=y(this.Tc,this,b);this.pc.sb(a,c);return b};an.prototype.abort=function(a){if(a=this.fb.get(a))a.Sa||(a.Sa=!0,a.$=new C("abort")),this.le(a)};
an.prototype.Tc=function(a,b){if(a.L||a.Sa)cn(this,b);else if(a.setToken(b),b.setActive(!0),b=new Em,a.L=b,!dn(a))throw Error("Cannot dispatch first request!");};an.prototype.le=function(a){this.fb.remove(a.getId());a.L&&(cn(this,a.getToken()),a.L.ea());a.Uc&&a.Uc(a.$,a.je)};var cn=function(a,b){b.setActive(!1);if(!Rm(a.pc,b))throw Error("Object not released");};an.prototype.i=function(){an.j.i.call(this);this.pc.ea();this.pc=null;var a=this.fb;$a(a.A(),function(b){b.ea()});a.clear();this.fb=null};
var bn=function(a,b,c,d,e){B.call(this);this.K=a;this.wf=b;this.df=r(e)?e:1;this.Uc=c;this.Na=d};A(bn,B);l=bn.prototype;l.wd=0;l.Sa=!1;l.L=null;l.ve=null;l.$=null;l.je=null;var en=["load","abort","error"];l=bn.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.wf};
l.Ue=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":dn(this)||(this.$=a,this.Na&&this.Na(this))}};l.i=function(){bn.j.i.call(this);delete this.Uc;delete this.Na};var dn=function(a){if(a.wd>a.df)return!1;a.wd++;Hm(a.L,a.K);setTimeout(y(a.sf,a),0);return!0};
bn.prototype.sf=function(){if(!this.Sa){var a=y(function(d){this.Sa||(Gm(this.L,this.K,d),hd(this.L,en,y(this.Ue,this)),this.L.start())},this),b=this.getUrl();if(zh(b).X.wa("profiling")){var c=new G;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=mc(pc(kh(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 fn=function(){B.call(this);this.Y=!1};A(fn,B);fn.prototype.setActive=function(a){this.Y=a};fn.prototype.Xd=function(){return this.Y};var $m=function(a,b){Wm.call(this,a,b)};A($m,Wm);$m.prototype.Hc=function(){return new fn};$m.prototype.Pb=function(a){a.ea()};$m.prototype.ad=function(a){return!a.fa&&!a.Xd()};var gn=function(a,b,c,d,e){Od.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 Jd;this.bd=1;this.S=e||null};ja(gn,Od);l=gn.prototype;l.Ac=function(a){return id(this,"tileevent",a)};l.jd=function(a){qd(a)};
l.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=Pd(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=gg("DIV",{id:b});var d=(new Date).getTime()/1E3;this.Ca.push(b);an.Sd().send(b,a,d,y(this.Te,this,c,b));gm(this);return c};l.Qc=function(){return this.Ca.length};
l.releaseTile=function(a){an.Sd().abort(a.id);this.rd.remove(r(a.firstElementChild)?a.firstElementChild:kg(a.firstChild));""!==a.id&&(this.qd.remove(a.id),this.S&&this.S.kf(a.id))};l.setOpacity=function(a){this.bd=a;var b=this.rd.Ra();zd(b,function(c){qm(c,a)})};
l.Te=function(a,b,c,d){"error"==c.type?(kb(this.Ca,b),this.qd.add(b),this.dispatchEvent(c)):(kb(this.Ca,b),c.target&&"load"==c.type&&(c=c.target,this.rd.add(c),1!=this.bd&&qm(c,this.bd),a.appendChild(c)),gm(this));this.S&&null!==d&&this.S.Ge(b,d)};z("ee.MapLayerOverlay",gn);gn.prototype.removeTileCallback=gn.prototype.jd;gn.prototype.addTileCallback=gn.prototype.Ac;gn.prototype.getTile=gn.prototype.getTile;gn.prototype.setOpacity=gn.prototype.setOpacity;gn.prototype.releaseTile=gn.prototype.releaseTile;var hn=function(a,b){if(!(this instanceof hn))return new hn(a,b);this.ra=a;this.ja=b};A(hn,N);z("ee.SavedFunction",hn);hn.prototype.encode=function(a){return P("LoadAlgorithmById",this.ra).encode(a)};hn.prototype.G=function(){return this.ja};(function(){var a={},b="ee.data.setAssetAcl ee.apply ee.Image.prototype.getInfo ee.batch.Export.video.toDrive ee.data.startTableIngestion ee.Filter.eq ee.batch.Export.table.toCloudStorage ee.Collection.prototype.filter ee.Geometry.LinearRing ee.data.getCloudApiEnabled ee.call ee.Image.prototype.expression ee.data.cancelTask ee.Image.prototype.rename ee.Serializer.toJSON ee.Number ee.Dictionary ee.data.getOperation ee.batch.Export.image.toCloudStorage ee.batch.Export.table.toDrive ee.data.getTileBaseUrl ee.ApiFunction._call ee.data.getTaskStatus ee.Filter.date ee.Serializer.toReadableCloudApiJSON ee.data.createAsset ee.initialize ee.ImageCollection.prototype.getMap ee.data.clearAuthToken ee.data.startProcessing ee.batch.Export.video.toCloudStorage ee.Filter.lte ee.Collection.prototype.iterate ee.data.setCloudApiEnabled ee.List ee.Filter.and ee.Serializer.encode ee.data.getTaskList ee.Filter.bounds ee.data.setDeadline ee.Terrain ee.data.authenticateViaOauth ee.data.copyAsset ee.batch.Export.map.toCloudStorage ee.Geometry.MultiLineString ee.InitState ee.Geometry ee.Serializer.toReadableJSON ee.data.startIngestion ee.data.updateAsset ee.data.setAuthToken ee.ImageCollection ee.FeatureCollection ee.Geometry.MultiPolygon ee.Filter.lt ee.data.getFilmstripThumbId ee.Geometry.Point ee.data.getTaskListWithLimit ee.batch.Export.table.toAsset ee.ComputedObject.prototype.getInfo ee.data.getXsrfToken ee.Filter.neq ee.Function.prototype.call ee.data.createAssetHome ee.Filter.metadata ee.Image.prototype.getMap ee.Filter.inList ee.data.getMapId ee.data.withProfiling ee.FeatureCollection.prototype.getDownloadURL ee.data.setAuthTokenRefresher ee.data.getValue ee.data.makeDownloadUrl ee.Element.prototype.set ee.data.getTileUrl ee.data.getDownloadId ee.data.renameAsset ee.batch.Export.image.toAsset ee.Feature ee.data.getAuthScopes ee.Serializer.encodeCloudApiPretty ee.Image.prototype.select ee.Geometry.Polygon ee.Geometry.LineString ee.batch.Export.videoMap.toCloudStorage ee.data.makeTableDownloadUrl ee.Image.prototype.getThumbURL ee.Geometry.prototype.toGeoJSONString ee.Geometry.prototype.toGeoJSON ee.Collection.prototype.map ee.Feature.prototype.getMap ee.ImageCollection.prototype.select ee.Image ee.FeatureCollection.prototype.select ee.ImageCollection.prototype.getFilmstripThumbURL ee.ComputedObject.prototype.evaluate ee.Collection.prototype.filterDate ee.data.getAssetRoots ee.batch.Export.image.toDrive ee.data.createFolder ee.Filter.prototype.not ee.Filter.gt ee.Geometry.prototype.serialize ee.ApiFunction._apply ee.Collection.prototype.filterMetadata ee.data.authenticateViaPopup ee.data.cancelOperation ee.ComputedObject.prototype.serialize ee.Deserializer.fromJSON ee.data.setAssetProperties ee.Image.prototype.clip ee.Filter ee.data.getApiBaseUrl ee.Collection.prototype.filterBounds ee.ApiFunction.lookup ee.data.setProject ee.data.setApiKey ee.data.getList ee.TILE_SIZE ee.data.getAsset ee.ImageCollection.prototype.first ee.data.getAuthToken ee.data.deleteAsset ee.Image.cat ee.FeatureCollection.prototype.getMap ee.Collection.prototype.limit ee.Image.prototype.getDownloadURL ee.ImageCollection.prototype.getVideoThumbURL ee.Filter.or ee.data.setParamAugmenter ee.Serializer.encodeCloudApi ee.data.authenticateViaPrivateKey ee.data.newTaskId ee.Date ee.Geometry.Rectangle ee.String ee.ImageCollection.prototype.getInfo ee.data.getInfo ee.data.getThumbId ee.data.listAssets ee.Feature.prototype.getInfo ee.Image.rgb ee.data.makeThumbUrl ee.reset ee.data.getTableDownloadId ee.Collection.prototype.sort ee.Algorithms ee.Deserializer.decode ee.data.listBuckets ee.data.getAssetRootQuota ee.data.getAuthClientId ee.data.setExpressionAugmenter ee.data.authenticate ee.ComputedObject.prototype.aside ee.Function.prototype.apply ee.Geometry.MultiPoint ee.data.listImages ee.data.getVideoThumbId ee.FeatureCollection.prototype.getInfo ee.data.getAssetAcl ee.data.updateTask ee.Filter.gte".split(" "),
c=[["assetId","aclUpdate","opt_callback"],["func","namedArgs"],["opt_callback"],"collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),["taskId","request","opt_callback"],["name","value"],"collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "),["filter"],["coords","opt_proj","opt_geodesic","opt_maxError"],[],["func","var_args"],["expression",
"opt_map"],["taskId","opt_callback"],["var_args"],["obj"],["number"],["opt_dict"],["operationName","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(" "),"collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "),[],["name","var_args"],["taskId","opt_callback"],["start","opt_end"],
["obj"],["value","opt_path","opt_force","opt_properties","opt_callback"],["opt_baseurl","opt_tileurl","opt_successCallback","opt_errorCallback","opt_xsrfToken"],["opt_visParams","opt_callback"],[],["taskId","params","opt_callback"],"collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "),["name","value"],["algorithm","opt_first"],["enable"],["list"],["var_args"],["obj","opt_isCompound"],
["opt_callback"],["geometry","opt_errorMargin"],["milliseconds"],[],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["sourceId","destinationId","opt_overwrite","opt_callback"],"image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey".split(" "),["coords","opt_proj","opt_geodesic","opt_maxError"],[],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["obj"],["taskId","request",
"opt_callback"],["assetId","asset","updateMask","opt_callback"],"clientId tokenType accessToken expiresIn opt_extraScopes opt_callback opt_updateAuthLibrary".split(" "),["args"],["args","opt_column"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["name","value"],["params","opt_callback"],["coords","opt_proj"],["opt_limit","opt_callback"],["collection","opt_description","opt_assetId"],["opt_callback"],[],["name","value"],["var_args"],["requestedId","opt_callback"],["name","operator",
"value"],["opt_visParams","opt_callback"],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["params","opt_callback"],["hook","body","opt_this"],["opt_format","opt_selectors","opt_filename","opt_callback"],["refresher"],["params","opt_callback"],["id"],["var_args"],["mapid","x","y","z"],["params","opt_callback"],["sourceId","destinationId","opt_callback"],"image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels".split(" "),
["geometry","opt_properties"],[],["obj"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["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(" "),["id"],["params","opt_callback"],[],[],["algorithm","opt_dropNulls"],["opt_visParams","opt_callback"],["selectors","opt_names"],["opt_args"],["propertySelectors",
"opt_newProperties","opt_retainGeometry"],["params","opt_callback"],["callback"],["start","opt_end"],["opt_callback"],"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(" "),["path","opt_force","opt_callback"],[],["name","value"],[],["name","namedArgs"],["name","operator","value"],["opt_success","opt_error"],["operationName","opt_callback"],
[],["json"],["assetId","properties","opt_callback"],["geometry"],["opt_filter"],[],["geometry"],["name"],["project"],["apiKey"],["params","opt_callback"],[],["id","opt_callback"],[],[],["assetId","opt_callback"],["var_args"],["opt_visParams","opt_callback"],["max","opt_property","opt_ascending"],["params","opt_callback"],["params","opt_callback"],["var_args"],["augmenter"],["obj"],["privateKey","opt_success","opt_error","opt_extraScopes"],["opt_count","opt_callback"],["date","opt_tz"],["coords","opt_proj",
"opt_geodesic","opt_evenOdd"],["string"],["opt_callback"],["id","opt_callback"],["params","opt_callback"],["body","opt_callback"],["opt_callback"],["r","g","b"],["id"],[],["params","opt_callback"],["property","opt_ascending"],[],["json"],["opt_callback"],["rootId","opt_callback"],[],["augmenter"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["func","var_args"],["namedArgs"],["coords","opt_proj"],["body","opt_callback"],["params","opt_callback"],["opt_callback"],["assetId",
"opt_callback"],["taskId","action","opt_callback"],["name","value"]];[sj,bm,X.prototype.C,pl,dj,xk,ll,V.prototype.filter,ok,Vh,am,X.prototype.expression,Wi,X.prototype.me,Re,xl,Nl,Ui,il,ml,vi,P,Pi,Fk,Ye,lj,Wl,Z.prototype.getMap,Zh,$i,ol,Ck,V.prototype.Yd,Uh,Wk,Dk,Qe,Ri,Hk,pi,Ql,Kh,oj,kl,pk,$l,T,Te,bj,rj,Wh,Z,Y,rk,zk,Fi,ik,Qi,nl,M.prototype.C,wi,yk,N.prototype.call,kj,Ik,X.prototype.getMap,Gk,zi,Li,Y.prototype.Fa,Xh,Bi,Ii,S.prototype.set,Ai,Hi,nj,gl,W,bi,Xe,X.prototype.select,qk,nk,ql,Ki,X.prototype.Rc,
T.prototype.sd,T.prototype.Ib,V.prototype.map,W.prototype.getMap,Z.prototype.select,X,Y.prototype.select,Z.prototype.Pc,M.prototype.evaluate,V.prototype.Mc,jj,jl,mj,U.prototype.$a,Bk,T.prototype.D,Pj,V.prototype.Nc,Jh,Ti,M.prototype.D,Ll,tj,X.prototype.clip,U,ui,V.prototype.Md,Oj,Sh,Rh,fj,256,ej,Z.prototype.first,$h,pj,Vk,Y.prototype.getMap,V.prototype.limit,X.prototype.Fa,Z.prototype.Sc,Ek,ri,We,Oh,Mi,Hl,mk,Al,Z.prototype.C,ej,Di,gj,W.prototype.C,Uk,Gi,Zl,Ji,V.prototype.sort,Yl,Kl,ij,uj,ai,ti,Lh,
M.prototype.td,N.prototype.apply,lk,hj,Ei,Y.prototype.C,qj,Vi,Ak].forEach(function(d,e){d&&(a[d.toString()]={name:b[e],paramNames:c[e]})});q.EXPORTED_FN_INFO=a})();}).call(this);