mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
223 lines
119 KiB
JavaScript
223 lines
119 KiB
JavaScript
(function(){var h,aa=aa||{},k=this,m=function(a){return void 0!==a},n=function(a){return"string"==typeof a},p=function(a){return"number"==typeof a},ba=function(){},ca=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";
|
|
if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},da=function(a){return null!=a},q=function(a){return"array"==ca(a)},ea=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},r=function(a){return"function"==ca(a)},t=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==
|
|
b},fa="closure_uid_"+(1E9*Math.random()>>>0),ga=0,ha=function(a,b,c){return a.call.apply(a.bind,arguments)},ia=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},u=function(a,b,c){u=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ha:ia;return u.apply(null,
|
|
arguments)},ja=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},ka=Date.now||function(){return+new Date},v=function(a,b){a=a.split(".");var c=k;a[0]in c||!c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&m(b)?c[d]=b:c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}},x=function(a,b){function c(){}c.prototype=b.prototype;a.j=b.prototype;a.prototype=new c;a.prototype.constructor=
|
|
a;a.Ge=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var y=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,y);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};x(y,Error);y.prototype.name="CustomError";var la;var ma=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")},na=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},wa=function(a){if(!pa.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(qa,"&"));-1!=a.indexOf("<")&&(a=a.replace(ra,"<"));-1!=a.indexOf(">")&&(a=a.replace(sa,">"));-1!=a.indexOf('"')&&(a=a.replace(ta,"""));-1!=a.indexOf("'")&&
|
|
(a=a.replace(ua,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(va,"�"));return a},qa=/&/g,ra=/</g,sa=/>/g,ta=/"/g,ua=/'/g,va=/\x00/g,pa=/[\x00&<>"']/,xa=function(a,b){return a<b?-1:a>b?1:0};var ya=function(a,b){b.unshift(a);y.call(this,ma.apply(null,b));b.shift()};x(ya,y);ya.prototype.name="AssertionError";
|
|
var za=function(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var f=d}else a&&(e+=": "+a,f=b);throw new ya(""+e,f||[]);},z=function(a,b,c){a||za("",null,b,Array.prototype.slice.call(arguments,2));return a},Aa=function(a,b){throw new ya("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ba=function(a,b,c){p(a)||za("Expected number but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2));return a},Ca=function(a,b,c){r(a)||za("Expected function but got %s: %s.",[ca(a),
|
|
a],b,Array.prototype.slice.call(arguments,2))},Da=function(a,b,c){t(a)||za("Expected object but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))},Ea=function(a,b,c){q(a)||za("Expected array but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var Fa=Array.prototype.indexOf?function(a,b,c){z(null!=a.length);return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ga=Array.prototype.lastIndexOf?function(a,b,c){z(null!=a.length);return Array.prototype.lastIndexOf.call(a,b,null==c?a.length-1:c)}:function(a,b,c){c=null==c?a.length-1:c;0>c&&(c=Math.max(0,a.length+c));if(n(a))return n(b)&&1==
|
|
b.length?a.lastIndexOf(b,c):-1;for(;0<=c;c--)if(c in a&&a[c]===b)return c;return-1},Ia=Array.prototype.forEach?function(a,b,c){z(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)f in e&&b.call(c,e[f],f,a)},Ja=Array.prototype.filter?function(a,b,c){z(null!=a.length);return Array.prototype.filter.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=[],f=0,g=n(a)?a.split(""):a,l=0;l<d;l++)if(l in g){var w=g[l];b.call(c,w,l,a)&&(e[f++]=
|
|
w)}return e},Ka=Array.prototype.map?function(a,b,c){z(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=n(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e},La=Array.prototype.some?function(a,b,c){z(null!=a.length);return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&b.call(c,e[f],f,a))return!0;return!1},Ma=Array.prototype.every?function(a,b,c){z(null!=a.length);
|
|
return Array.prototype.every.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=n(a)?a.split(""):a,f=0;f<d;f++)if(f in e&&!b.call(c,e[f],f,a))return!1;return!0},Na=function(a,b){var c=0;Ia(a,function(a,e,f){b.call(void 0,a,e,f)&&++c},void 0);return c},Pa=function(a){a:{var b=Oa;for(var c=a.length,d=n(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:n(a)?a.charAt(b):a[b]},Qa=function(a){if(!q(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0},Sa=
|
|
function(a,b){b=Fa(a,b);var c;(c=0<=b)&&Ra(a,b);return c},Ra=function(a,b){z(null!=a.length);Array.prototype.splice.call(a,b,1)},Ta=function(a){return Array.prototype.concat.apply([],arguments)},Ua=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[]},Va=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(ea(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)}},Wa=function(a,b,c){z(null!=a.length);
|
|
return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)},Xa=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++];var f=e;f=t(f)?"o"+(f[fa]||(f[fa]=++ga)):(typeof f).charAt(0)+f;Object.prototype.hasOwnProperty.call(b,f)||(b[f]=!0,a[c++]=e)}a.length=c};var A=function(){this.U=this.U;this.Fb=this.Fb};A.prototype.U=!1;A.prototype.T=function(){this.U||(this.U=!0,this.c())};A.prototype.c=function(){if(this.Fb)for(;this.Fb.length;)this.Fb.shift()()};var Ya=function(a){a&&"function"==typeof a.T&&a.T()};var B=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Ja=!1;this.Id=!0};B.prototype.preventDefault=function(){this.defaultPrevented=!0;this.Id=!1};var Za;a:{var $a=k.navigator;if($a){var ab=$a.userAgent;if(ab){Za=ab;break a}}Za=""}var C=function(a){return-1!=Za.indexOf(a)};var bb=function(a,b,c){for(var d in a)b.call(c,a[d],d,a)},cb=function(a,b){var c={},d;for(d in a)b.call(void 0,a[d],d,a)&&(c[d]=a[d]);return c},db=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},eb=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},fb=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},hb=function(a){var b=gb,c;for(c in b)if(a.call(void 0,b[c],c,b))return c},ib=function(a){for(var b in a)return!1;return!0},jb=function(a,b){b in a&&delete a[b]},
|
|
kb=function(a){var b={},c;for(c in a)b[c]=a[c];return b},lb=function(a){var b=ca(a);if("object"==b||"array"==b){if(r(a.clone))return a.clone();var b="array"==b?[]:{},c;for(c in a)b[c]=lb(a[c]);return b}return a},mb="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),nb=function(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<mb.length;f++)c=mb[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};var ob=function(a){ob[" "](a);return a};ob[" "]=ba;var qb=function(a,b){var c=pb;return Object.prototype.hasOwnProperty.call(c,a)?c[a]:c[a]=b(a)};var rb=C("Opera"),sb=C("Trident")||C("MSIE"),tb=C("Edge"),ub=C("Gecko")&&!(-1!=Za.toLowerCase().indexOf("webkit")&&!C("Edge"))&&!(C("Trident")||C("MSIE"))&&!C("Edge"),vb=-1!=Za.toLowerCase().indexOf("webkit")&&!C("Edge"),wb=function(){var a=k.document;return a?a.documentMode:void 0},xb;
|
|
a:{var yb="",zb=function(){var a=Za;if(ub)return/rv\:([^\);]+)(\)|;)/.exec(a);if(tb)return/Edge\/([\d\.]+)/.exec(a);if(sb)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(vb)return/WebKit\/(\S+)/.exec(a);if(rb)return/(?:Version)[ \/]?(\S+)/.exec(a)}();zb&&(yb=zb?zb[1]:"");if(sb){var Ab=wb();if(null!=Ab&&Ab>parseFloat(yb)){xb=String(Ab);break a}}xb=yb}
|
|
var Bb=xb,pb={},Cb=function(a){return qb(a,function(){for(var b=0,c=na(String(Bb)).split("."),d=na(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",l=d[f]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];l=/(\d*)(\D*)(.*)/.exec(l)||["","","",""];if(0==g[0].length&&0==l[0].length)break;b=xa(0==g[1].length?0:parseInt(g[1],10),0==l[1].length?0:parseInt(l[1],10))||xa(0==g[2].length,0==l[2].length)||xa(g[2],l[2]);g=g[3];l=l[3]}while(0==b)}return 0<=b})},Db;var Eb=k.document;
|
|
Db=Eb&&sb?wb()||("CSS1Compat"==Eb.compatMode?parseInt(Bb,10):5):void 0;var Fb=!sb||9<=Number(Db),Gb=sb&&!Cb("9");!vb||Cb("528");ub&&Cb("1.9b")||sb&&Cb("8")||rb&&Cb("9.5")||vb&&Cb("528");ub&&!Cb("8")||sb&&Cb("9");var Hb=function(a,b){B.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.ia=this.state=null;if(a){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;if(b=a.relatedTarget){if(ub){a:{try{ob(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;null===d?(this.offsetX=vb||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=vb||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.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.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.state=a.state;this.ia=a;a.defaultPrevented&&this.preventDefault()}};x(Hb,B);
|
|
Hb.prototype.preventDefault=function(){Hb.j.preventDefault.call(this);var a=this.ia;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Gb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Ib="closure_listenable_"+(1E6*Math.random()|0),Jb=function(a){return!(!a||!a[Ib])},Kb=0;var Lb=function(a,b,c,d,e){this.listener=a;this.Hb=null;this.src=b;this.type=c;this.capture=!!d;this.ba=e;this.key=++Kb;this.Ka=this.mb=!1},Mb=function(a){a.Ka=!0;a.listener=null;a.Hb=null;a.src=null;a.ba=null};var Nb=function(a){this.src=a;this.D={};this.hb=0};Nb.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.D[f];a||(a=this.D[f]=[],this.hb++);var g=Ob(a,b,d,e);-1<g?(b=a[g],c||(b.mb=!1)):(b=new Lb(b,this.src,f,!!d,e),b.mb=c,a.push(b));return b};Nb.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.D))return!1;var e=this.D[a];b=Ob(e,b,c,d);return-1<b?(Mb(e[b]),Ra(e,b),0==e.length&&(delete this.D[a],this.hb--),!0):!1};
|
|
var Pb=function(a,b){var c=b.type;c in a.D&&Sa(a.D[c],b)&&(Mb(b),0==a.D[c].length&&(delete a.D[c],a.hb--))};Nb.prototype.cb=function(a){a=a&&a.toString();var b=0,c;for(c in this.D)if(!a||c==a){for(var d=this.D[c],e=0;e<d.length;e++)++b,Mb(d[e]);delete this.D[c];this.hb--}return b};Nb.prototype.Ua=function(a,b,c,d){a=this.D[a.toString()];var e=-1;a&&(e=Ob(a,b,c,d));return-1<e?a[e]:null};var Ob=function(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.Ka&&f.listener==b&&f.capture==!!c&&f.ba==d)return e}return-1};var Qb="closure_lm_"+(1E6*Math.random()|0),Rb={},Sb=0,Tb=function(a,b,c,d,e){if(q(b)){for(var f=0;f<b.length;f++)Tb(a,b[f],c,d,e);return null}c=Ub(c);return Jb(a)?a.Y(b,c,d,e):Vb(a,b,c,!1,d,e)},Vb=function(a,b,c,d,e,f){if(!b)throw Error("Invalid event type");var g=!!e,l=Wb(a);l||(a[Qb]=l=new Nb(a));c=l.add(b,c,d,e,f);if(c.Hb)return c;d=Xb();c.Hb=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,g);else if(a.attachEvent)a.attachEvent(Yb(b.toString()),d);else throw Error("addEventListener and attachEvent are unavailable.");
|
|
Sb++;return c},Xb=function(){var a=Zb,b=Fb?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},$b=function(a,b,c,d,e){if(q(b)){for(var f=0;f<b.length;f++)$b(a,b[f],c,d,e);return null}c=Ub(c);return Jb(a)?a.bb(b,c,d,e):Vb(a,b,c,!0,d,e)},ac=function(a,b,c,d,e){if(q(b))for(var f=0;f<b.length;f++)ac(a,b[f],c,d,e);else c=Ub(c),Jb(a)?a.Ub(b,c,d,e):a&&(a=Wb(a))&&(b=a.Ua(b,c,!!d,e))&&bc(b)},bc=function(a){if(!p(a)&&a&&!a.Ka){var b=a.src;if(Jb(b))Pb(b.V,
|
|
a);else{var c=a.type,d=a.Hb;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent&&b.detachEvent(Yb(c),d);Sb--;(c=Wb(b))?(Pb(c,a),0==c.hb&&(c.src=null,b[Qb]=null)):Mb(a)}}},Yb=function(a){return a in Rb?Rb[a]:Rb[a]="on"+a},dc=function(a,b,c,d){var e=!0;if(a=Wb(a))if(b=a.D[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.capture==c&&!f.Ka&&(f=cc(f,d),e=e&&!1!==f)}return e},cc=function(a,b){var c=a.listener,d=a.ba||a.src;a.mb&&bc(a);return c.call(d,b)},Zb=function(a,
|
|
b){if(a.Ka)return!0;if(!Fb){if(!b)a:{b=["window","event"];for(var c=k,d;d=b.shift();)if(null!=c[d])c=c[d];else{b=null;break a}b=c}d=b;b=new Hb(d,this);c=!0;if(!(0>d.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);for(var e=a.type,f=d.length-1;!b.Ja&&0<=f;f--)b.currentTarget=d[f],a=dc(d[f],e,!0,b),c=c&&a;for(f=0;!b.Ja&&f<d.length;f++)b.currentTarget=
|
|
d[f],a=dc(d[f],e,!1,b),c=c&&a}return c}return cc(a,new Hb(b,this))},Wb=function(a){a=a[Qb];return a instanceof Nb?a:null},ec="__closure_events_fn_"+(1E9*Math.random()>>>0),Ub=function(a){z(a,"Listener can not be null.");if(r(a))return a;z(a.handleEvent,"An object listener must have handleEvent method.");a[ec]||(a[ec]=function(b){return a.handleEvent(b)});return a[ec]};var fc=function(a){A.call(this);this.ta=a;this.i={}};x(fc,A);var gc=[];fc.prototype.Y=function(a,b,c,d){q(b)||(b&&(gc[0]=b.toString()),b=gc);for(var e=0;e<b.length;e++){var f=Tb(a,b[e],c||this.handleEvent,d||!1,this.ta||this);if(!f)break;this.i[f.key]=f}return this};fc.prototype.bb=function(a,b,c,d){return hc(this,a,b,c,d)};var hc=function(a,b,c,d,e,f){if(q(c))for(var g=0;g<c.length;g++)hc(a,b,c[g],d,e,f);else{b=$b(b,c,d||a.handleEvent,e,f||a.ta||a);if(!b)return a;a.i[b.key]=b}return a};
|
|
fc.prototype.Ub=function(a,b,c,d,e){if(q(b))for(var f=0;f<b.length;f++)this.Ub(a,b[f],c,d,e);else c=c||this.handleEvent,e=e||this.ta||this,c=Ub(c),d=!!d,b=Jb(a)?a.Ua(b,c,d,e):a?(a=Wb(a))?a.Ua(b,c,d,e):null:null,b&&(bc(b),delete this.i[b.key]);return this};fc.prototype.cb=function(){bb(this.i,function(a,b){this.i.hasOwnProperty(b)&&bc(a)},this);this.i={}};fc.prototype.c=function(){fc.j.c.call(this);this.cb()};
|
|
fc.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var D=function(){A.call(this);this.V=new Nb(this);this.Qd=this;this.Ec=null};x(D,A);D.prototype[Ib]=!0;h=D.prototype;h.addEventListener=function(a,b,c,d){Tb(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){ac(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){ic(this);var b=this.Ec;if(b){var c=[];for(var d=1;b;b=b.Ec)c.push(b),z(1E3>++d,"infinite loop")}b=this.Qd;d=a.type||a;if(n(a))a=new B(a,b);else if(a instanceof B)a.target=a.target||b;else{var e=a;a=new B(d,b);nb(a,e)}var e=!0;if(c)for(var f=c.length-1;!a.Ja&&0<=f;f--){var g=a.currentTarget=c[f];e=jc(g,d,!0,a)&&e}a.Ja||(g=a.currentTarget=b,e=jc(g,d,!0,a)&&e,a.Ja||(e=jc(g,d,!1,a)&&e));if(c)for(f=0;!a.Ja&&f<c.length;f++)g=a.currentTarget=c[f],e=jc(g,d,!1,a)&&e;return e};
|
|
h.c=function(){D.j.c.call(this);this.V&&this.V.cb(void 0);this.Ec=null};h.Y=function(a,b,c,d){ic(this);return this.V.add(String(a),b,!1,c,d)};h.bb=function(a,b,c,d){return this.V.add(String(a),b,!0,c,d)};h.Ub=function(a,b,c,d){return this.V.remove(String(a),b,c,d)};var jc=function(a,b,c,d){b=a.V.D[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.Ka&&g.capture==c){var l=g.listener,w=g.ba||g.src;g.mb&&Pb(a.V,g);e=!1!==l.call(w,d)&&e}}return e&&0!=d.Id};
|
|
D.prototype.Ua=function(a,b,c,d){return this.V.Ua(String(a),b,c,d)};var ic=function(a){z(a.V,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var kc=function(a,b,c){this.je=c;this.$d=a;this.ve=b;this.Eb=0;this.wb=null};kc.prototype.get=function(){if(0<this.Eb){this.Eb--;var a=this.wb;this.wb=a.next;a.next=null}else a=this.$d();return a};kc.prototype.put=function(a){this.ve(a);this.Eb<this.je&&(this.Eb++,a.next=this.wb,this.wb=a)};var lc=function(a){return a};var mc=function(a){k.setTimeout(function(){throw a;},0)},nc,oc=function(){var a=k.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!C("Presto")&&(a=function(){var a=document.createElement("IFRAME");a.style.display="none";a.src="";document.documentElement.appendChild(a);var b=a.contentWindow,a=b.document;a.open();a.write("");a.close();var c="callImmediate"+Math.random(),d="file:"==b.location.protocol?"*":b.location.protocol+"//"+b.location.host,
|
|
a=u(function(a){if(("*"==d||a.origin==d)&&a.data==c)this.port1.onmessage()},this);b.addEventListener("message",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if("undefined"!==typeof a&&!C("Trident")&&!C("MSIE")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(m(c.next)){c=c.next;var a=c.$c;c.$c=null;a()}};return function(a){d.next={$c:a};d=d.next;b.port2.postMessage(0)}}return"undefined"!==typeof document&&"onreadystatechange"in document.createElement("SCRIPT")?
|
|
function(a){var b=document.createElement("SCRIPT");b.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){k.setTimeout(a,0)}};var pc=function(){this.Wb=this.ya=null},rc=new kc(function(){return new qc},function(a){a.reset()},100);pc.prototype.add=function(a,b){var c=rc.get();c.set(a,b);this.Wb?this.Wb.next=c:(z(!this.ya),this.ya=c);this.Wb=c};pc.prototype.remove=function(){var a=null;this.ya&&(a=this.ya,this.ya=this.ya.next,this.ya||(this.Wb=null),a.next=null);return a};var qc=function(){this.next=this.scope=this.pc=null};qc.prototype.set=function(a,b){this.pc=a;this.scope=b;this.next=null};
|
|
qc.prototype.reset=function(){this.next=this.scope=this.pc=null};var wc=function(a,b){sc||tc();uc||(sc(),uc=!0);vc.add(a,b)},sc,tc=function(){if(-1!=String(k.Promise).indexOf("[native code]")){var a=k.Promise.resolve(void 0);sc=function(){a.then(xc)}}else sc=function(){var a=xc;!r(k.setImmediate)||k.Window&&k.Window.prototype&&!C("Edge")&&k.Window.prototype.setImmediate==k.setImmediate?(nc||(nc=oc()),nc(a)):k.setImmediate(a)}},uc=!1,vc=new pc,xc=function(){for(var a;a=vc.remove();){try{a.pc.call(a.scope)}catch(b){mc(b)}rc.put(a)}uc=!1};var zc=function(a,b){m(a.name)?(this.name=a.name,this.code=gb[a.name]):(this.code=Ba(a.code),this.name=yc(a.code));y.call(this,ma("%s %s",this.name,b))};x(zc,y);var yc=function(a){var b=hb(function(b){return a==b});if(!m(b))throw Error("Invalid code: "+a);return b},gb={AbortError:3,EncodingError:5,InvalidModificationError:9,InvalidStateError:7,NotFoundError:1,NotReadableError:4,NoModificationAllowedError:6,PathExistsError:12,QuotaExceededError:10,SecurityError:2,SyntaxError:8,TypeMismatchError:11};var Ac=function(a,b){B.call(this,a.type,b);this.ia=a};x(Ac,B);var Bc=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},Cc=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var Fc=function(a,b){this.L=0;this.ea=void 0;this.Ba=this.$=this.m=null;this.ub=this.kc=!1;if(a!=ba)try{var c=this;a.call(b,function(a){Dc(c,2,a)},function(a){if(!(a instanceof Ec))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(e){}Dc(c,3,a)})}catch(d){Dc(this,3,d)}},Gc=function(){this.next=this.context=this.Ha=this.va=this.qa=null;this.lb=!1};Gc.prototype.reset=function(){this.context=this.Ha=this.va=this.qa=null;this.lb=!1};
|
|
var Hc=new kc(function(){return new Gc},function(a){a.reset()},100),Ic=function(a,b,c){var d=Hc.get();d.va=a;d.Ha=b;d.context=c;return d};Fc.prototype.then=function(a,b,c){null!=a&&Ca(a,"opt_onFulfilled should be a function.");null!=b&&Ca(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return Jc(this,r(a)?a:null,r(b)?b:null,c)};Bc(Fc);Fc.prototype.cancel=function(a){0==this.L&&wc(function(){var b=new Ec(a);Kc(this,b)},this)};
|
|
var Kc=function(a,b){if(0==a.L)if(a.m){var c=a.m;if(c.$){for(var d=0,e=null,f=null,g=c.$;g&&(g.lb||(d++,g.qa==a&&(e=g),!(e&&1<d)));g=g.next)e||(f=g);e&&(0==c.L&&1==d?Kc(c,b):(f?(d=f,z(c.$),z(null!=d),d.next==c.Ba&&(c.Ba=d),d.next=d.next.next):Lc(c),Mc(c,e,3,b)))}a.m=null}else Dc(a,3,b)},Oc=function(a,b){a.$||2!=a.L&&3!=a.L||Nc(a);z(null!=b.va);a.Ba?a.Ba.next=b:a.$=b;a.Ba=b},Jc=function(a,b,c,d){var e=Ic(null,null,null);e.qa=new Fc(function(a,g){e.va=b?function(c){try{var e=b.call(d,c);a(e)}catch(oa){g(oa)}}:
|
|
a;e.Ha=c?function(b){try{var e=c.call(d,b);!m(e)&&b instanceof Ec?g(b):a(e)}catch(oa){g(oa)}}:g});e.qa.m=a;Oc(a,e);return e.qa};Fc.prototype.ze=function(a){z(1==this.L);this.L=0;Dc(this,2,a)};Fc.prototype.Ae=function(a){z(1==this.L);this.L=0;Dc(this,3,a)};
|
|
var Dc=function(a,b,c){if(0==a.L){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.L=1;a:{var d=c,e=a.ze,f=a.Ae;if(d instanceof Fc){null!=e&&Ca(e,"opt_onFulfilled should be a function.");null!=f&&Ca(f,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");Oc(d,Ic(e||ba,f||null,a));var g=!0}else if(Cc(d))d.then(e,f,a),g=!0;else{if(t(d))try{var l=d.then;if(r(l)){Pc(d,l,e,f,a);g=!0;break a}}catch(w){f.call(a,w);g=!0;break a}g=!1}}g||
|
|
(a.ea=c,a.L=b,a.m=null,Nc(a),3!=b||c instanceof Ec||Qc(a,c))}},Pc=function(a,b,c,d,e){var f=!1,g=function(a){f||(f=!0,c.call(e,a))},l=function(a){f||(f=!0,d.call(e,a))};try{b.call(a,g,l)}catch(w){l(w)}},Nc=function(a){a.kc||(a.kc=!0,wc(a.ae,a))},Lc=function(a){var b=null;a.$&&(b=a.$,a.$=b.next,b.next=null);a.$||(a.Ba=null);null!=b&&z(null!=b.va);return b};Fc.prototype.ae=function(){for(var a;a=Lc(this);)Mc(this,a,this.L,this.ea);this.kc=!1};
|
|
var Mc=function(a,b,c,d){if(3==c&&b.Ha&&!b.lb)for(;a&&a.ub;a=a.m)a.ub=!1;if(b.qa)b.qa.m=null,Rc(b,c,d);else try{b.lb?b.va.call(b.context):Rc(b,c,d)}catch(e){Sc.call(null,e)}Hc.put(b)},Rc=function(a,b,c){2==b?a.va.call(a.context,c):a.Ha&&a.Ha.call(a.context,c)},Qc=function(a,b){a.ub=!0;wc(function(){a.ub&&Sc.call(null,b)})},Sc=mc,Ec=function(a){y.call(this,a)};x(Ec,y);Ec.prototype.name="cancel";/*
|
|
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 Tc=function(a,b){this.Lb=[];this.zd=a;this.dd=b||null;this.Xa=this.Fa=!1;this.ea=void 0;this.Ic=this.Wc=this.bc=!1;this.Tb=0;this.m=null;this.cc=0};Tc.prototype.cancel=function(a){if(this.Fa)this.ea instanceof Tc&&this.ea.cancel();else{if(this.m){var b=this.m;delete this.m;a?b.cancel(a):(b.cc--,0>=b.cc&&b.cancel())}this.zd?this.zd.call(this.dd,this):this.Ic=!0;this.Fa||Uc(this,new Vc)}};Tc.prototype.ad=function(a,b){this.bc=!1;Wc(this,a,b)};
|
|
var Wc=function(a,b,c){a.Fa=!0;a.ea=c;a.Xa=!b;Xc(a)},Zc=function(a){if(a.Fa){if(!a.Ic)throw new Yc;a.Ic=!1}};Tc.prototype.dc=function(a){Zc(this);$c(a);Wc(this,!0,a)};var Uc=function(a,b){Zc(a);$c(b);Wc(a,!1,b)},$c=function(a){z(!(a instanceof Tc),"An execution sequence may not be initiated with a blocking Deferred.")},ad=function(a,b,c){z(!a.Wc,"Blocking Deferreds can not be re-used");a.Lb.push([b,c,void 0]);a.Fa&&Xc(a)};
|
|
Tc.prototype.then=function(a,b,c){var d,e,f=new Fc(function(a,b){d=a;e=b});ad(this,d,function(a){a instanceof Vc?f.cancel():e(a)});return f.then(a,b,c)};Bc(Tc);
|
|
var bd=function(a){return La(a.Lb,function(a){return r(a[1])})},Xc=function(a){if(a.Tb&&a.Fa&&bd(a)){var b=a.Tb,c=cd[b];c&&(k.clearTimeout(c.ca),delete cd[b]);a.Tb=0}a.m&&(a.m.cc--,delete a.m);for(var b=a.ea,d=c=!1;a.Lb.length&&!a.bc;){var e=a.Lb.shift(),f=e[0],g=e[1],e=e[2];if(f=a.Xa?g:f)try{var l=f.call(e||a.dd,b);m(l)&&(a.Xa=a.Xa&&(l==b||l instanceof Error),a.ea=b=l);if(Cc(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.bc=!0}catch(w){b=w,a.Xa=!0,bd(a)||(c=!0)}}a.ea=b;d&&(l=u(a.ad,
|
|
a,!0),d=u(a.ad,a,!1),b instanceof Tc?(ad(b,l,d),b.Wc=!0):b.then(l,d));c&&(b=new dd(b),cd[b.ca]=b,a.Tb=b.ca)},Yc=function(){y.call(this)};x(Yc,y);Yc.prototype.message="Deferred has already fired";Yc.prototype.name="AlreadyCalledError";var Vc=function(){y.call(this)};x(Vc,y);Vc.prototype.message="Deferred was canceled";Vc.prototype.name="CanceledError";var dd=function(a){this.ca=k.setTimeout(u(this.ye,this),0);this.qb=a};
|
|
dd.prototype.ye=function(){z(cd[this.ca],"Cannot throw an error that is not scheduled.");delete cd[this.ca];throw this.qb;};var cd={};var ed=function(){D.call(this);this.K=new FileReader;this.K.onloadstart=u(this.Da,this);this.K.onprogress=u(this.Da,this);this.K.onload=u(this.Da,this);this.K.onabort=u(this.Da,this);this.K.onerror=u(this.Da,this);this.K.onloadend=u(this.Da,this)};x(ed,D);h=ed.prototype;h.abort=function(){try{this.K.abort()}catch(a){throw new zc(a,"aborting read");}};h.ja=function(){return this.K.readyState};h.Da=function(a){this.dispatchEvent(new Ac(a,this))};h.c=function(){ed.j.c.call(this);delete this.K};
|
|
h.readAsArrayBuffer=function(a){this.K.readAsArrayBuffer(a)};h.readAsText=function(a,b){this.K.readAsText(a,b)};var fd=function(a,b,c,d,e){this.reset(a,b,c,d,e)};fd.prototype.gd=null;var gd=0;fd.prototype.reset=function(a,b,c,d,e){"number"==typeof e||gd++;d||ka();this.ab=a;this.oe=b;delete this.gd};fd.prototype.Ld=function(a){this.ab=a};var hd=function(a){this.pe=a;this.pd=this.ec=this.ab=this.m=null},id=function(a,b){this.name=a;this.value=b};id.prototype.toString=function(){return this.name};var jd=new id("SEVERE",1E3),kd=new id("CONFIG",700),ld=new id("FINE",500);hd.prototype.getParent=function(){return this.m};hd.prototype.md=function(){this.ec||(this.ec={});return this.ec};hd.prototype.Ld=function(a){this.ab=a};var md=function(a){if(a.ab)return a.ab;if(a.m)return md(a.m);Aa("Root logger has no level set.");return null};
|
|
hd.prototype.log=function(a,b,c){if(a.value>=md(this).value)for(r(b)&&(b=b()),a=new fd(a,String(b),this.pe),c&&(a.gd=c),c="log:"+a.oe,k.console&&(k.console.timeStamp?k.console.timeStamp(c):k.console.markTimeline&&k.console.markTimeline(c)),k.msWriteProfilerMark&&k.msWriteProfilerMark(c),c=this;c;){var d=c,e=a;if(d.pd)for(var f=0;b=d.pd[f];f++)b(e);c=c.getParent()}};
|
|
var nd={},od=null,pd=function(a){od||(od=new hd(""),nd[""]=od,od.Ld(kd));var b;if(!(b=nd[a])){b=new hd(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=pd(a.substr(0,c));c.md()[d]=b;b.m=c;nd[a]=b}return b};var qd="StopIteration"in k?k.StopIteration:{message:"StopIteration",stack:""},rd=function(){};rd.prototype.next=function(){throw qd;};rd.prototype.za=function(){return this};
|
|
var sd=function(a){if(a instanceof rd)return a;if("function"==typeof a.za)return a.za(!1);if(ea(a)){var b=0,c=new rd;c.next=function(){for(;;){if(b>=a.length)throw qd;if(b in a)return a[b++];b++}};return c}throw Error("Not implemented");},td=function(a,b){if(ea(a))try{Ia(a,b,void 0)}catch(c){if(c!==qd)throw c;}else{a=sd(a);try{for(;;)b.call(void 0,a.next(),void 0,a)}catch(c){if(c!==qd)throw c;}}};var ud=function(a){return/^\s*$/.test(a)?!1:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,""))},vd=function(a){a=String(a);if(ud(a))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},xd=function(a){return(new wd(void 0)).v(a)},wd=function(a){this.Jb=a};
|
|
wd.prototype.v=function(a){var b=[];yd(this,a,b);return b.join("")};
|
|
var yd=function(a,b,c){if(null==b)c.push("null");else{if("object"==typeof b){if(q(b)){var d=b;b=d.length;c.push("[");for(var e="",f=0;f<b;f++)c.push(e),e=d[f],yd(a,a.Jb?a.Jb.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),zd(d,c),c.push(":"),yd(a,a.Jb?a.Jb.call(b,d,e):e,c),f=","));c.push("}");return}}switch(typeof b){case "string":zd(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);}}},Ad={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Bd=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,zd=function(a,b){b.push('"',a.replace(Bd,function(a){var b=Ad[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),
|
|
Ad[a]=b);return b}),'"')};var Cd=function(a,b){a&&a.log(ld,b,void 0)};var Dd=function(){};Dd.prototype.Zc=null;Dd.prototype.Wa=function(){var a;(a=this.Zc)||(a={},Ed(this)&&(a[0]=!0,a[1]=!0),a=this.Zc=a);return a};var Fd=function(a,b){this.Be=a;this.se=b};x(Fd,Dd);Fd.prototype.fc=function(){return this.Be()};Fd.prototype.Wa=function(){return this.se()};var E=function(){return E.hd.fc()};E.Od=!1;E.Wa=function(){return E.hd.Wa()};E.Ie=function(a,b){E.Kd(new Fd(z(a),z(b)))};E.Kd=function(a){E.hd=a};var Gd=function(){};x(Gd,Dd);Gd.prototype.fc=function(){var a=Ed(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var Ed=function(a){if(E.Od)return"";if(!a.qd&&"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.qd=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.qd};E.Kd(new Gd);var Hd=function(a,b){this.u={};this.i=[];this.ib=this.h=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)};h=Hd.prototype;h.B=function(){return this.h};h.s=function(){Id(this);for(var a=[],b=0;b<this.i.length;b++)a.push(this.u[this.i[b]]);return a};h.P=function(){Id(this);return this.i.concat()};h.ha=function(a){return Jd(this.u,a)};h.isEmpty=function(){return 0==this.h};
|
|
h.clear=function(){this.u={};this.ib=this.h=this.i.length=0};h.remove=function(a){return Jd(this.u,a)?(delete this.u[a],this.h--,this.ib++,this.i.length>2*this.h&&Id(this),!0):!1};var Id=function(a){var b,c;if(a.h!=a.i.length){for(b=c=0;c<a.i.length;){var d=a.i[c];Jd(a.u,d)&&(a.i[b++]=d);c++}a.i.length=b}if(a.h!=a.i.length){var e={};for(b=c=0;c<a.i.length;)d=a.i[c],Jd(e,d)||(a.i[b++]=d,e[d]=1),c++;a.i.length=b}};h=Hd.prototype;h.get=function(a,b){return Jd(this.u,a)?this.u[a]:b};
|
|
h.set=function(a,b){Jd(this.u,a)||(this.h++,this.i.push(a),this.ib++);this.u[a]=b};h.addAll=function(a){if(a instanceof Hd){var b=a.P();a=a.s()}else b=fb(a),a=eb(a);for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.P(),d=0;d<c.length;d++){var e=c[d],f=this.get(e);a.call(b,f,e,this)}};h.clone=function(){return new Hd(this)};
|
|
h.za=function(a){Id(this);var b=0,c=this.ib,d=this,e=new rd;e.next=function(){if(c!=d.ib)throw Error("The map has changed since the iterator was created");if(b>=d.i.length)throw qd;var e=d.i[b++];return a?e:d.u[e]};return e};var Jd=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Kd=function(a){if(a.s&&"function"==typeof a.s)return a.s();if(n(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return eb(a)},Ld=function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(ea(a)||n(a))Ia(a,b,void 0);else{if(a.P&&"function"==typeof a.P)var c=a.P();else if(a.s&&"function"==typeof a.s)c=void 0;else if(ea(a)||n(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=fb(a);for(var d=Kd(a),e=d.length,f=0;f<e;f++)b.call(void 0,
|
|
d[f],c&&c[f],a)}};var Md=function(a,b,c){if(r(a))c&&(a=u(a,c));else if(a&&"function"==typeof a.handleEvent)a=u(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:k.setTimeout(a,b||0)};var Nd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/,Od=function(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e=null;if(0<=d){var f=a[c].substring(0,d);e=a[c].substring(d+1)}else f=a[c];b(f,e?decodeURIComponent(e.replace(/\+/g," ")):"")}}};var F=function(a){D.call(this);this.headers=new Hd;this.Yb=a||null;this.N=!1;this.Xb=this.a=null;this.$a=this.vd=this.Ab="";this.ua=this.uc=this.yb=this.jc=!1;this.Oa=0;this.Ob=null;this.Ma="";this.Vb=this.te=this.Nd=!1};x(F,D);var Pd=F.prototype,Qd=pd("goog.net.XhrIo");Pd.G=Qd;var Rd=/^https?$/i,Sd=["POST","PUT"],Td=[];F.prototype.Xd=function(){this.T();Sa(Td,this)};
|
|
F.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.Ab+"; newUri="+a);b=b?b.toUpperCase():"GET";this.Ab=a;this.$a="";this.vd=b;this.jc=!1;this.N=!0;this.a=this.Yb?this.Yb.fc():E();this.Xb=this.Yb?this.Yb.Wa():E.Wa();this.a.onreadystatechange=u(this.Cd,this);this.te&&"onprogress"in this.a&&(this.a.onprogress=u(function(a){this.Bd(a,!0)},this),this.a.upload&&(this.a.upload.onprogress=u(this.Bd,this)));try{Cd(this.G,Ud(this,"Opening Xhr")),
|
|
this.uc=!0,this.a.open(b,String(a),!0),this.uc=!1}catch(f){Cd(this.G,Ud(this,"Error opening Xhr: "+f.message));this.qb(5,f);return}a=c||"";var e=this.headers.clone();d&&Ld(d,function(a,b){e.set(b,a)});d=Pa(e.P());c=k.FormData&&a instanceof k.FormData;!(0<=Fa(Sd,b))||d||c||e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");e.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.Ma&&(this.a.responseType=this.Ma);"withCredentials"in this.a&&this.a.withCredentials!==this.Nd&&
|
|
(this.a.withCredentials=this.Nd);try{Vd(this),0<this.Oa&&(this.Vb=Wd(this.a),Cd(this.G,Ud(this,"Will abort after "+this.Oa+"ms if incomplete, xhr2 "+this.Vb)),this.Vb?(this.a.timeout=this.Oa,this.a.ontimeout=u(this.fb,this)):this.Ob=Md(this.fb,this.Oa,this)),Cd(this.G,Ud(this,"Sending request")),this.yb=!0,this.a.send(a),this.yb=!1}catch(f){Cd(this.G,Ud(this,"Send error: "+f.message)),this.qb(5,f)}};
|
|
var Wd=function(a){return sb&&Cb(9)&&p(a.timeout)&&m(a.ontimeout)},Oa=function(a){return"content-type"==a.toLowerCase()};F.prototype.fb=function(){"undefined"!=typeof aa&&this.a&&(this.$a="Timed out after "+this.Oa+"ms, aborting",Cd(this.G,Ud(this,this.$a)),this.dispatchEvent("timeout"),this.abort(8))};F.prototype.qb=function(a,b){this.N=!1;this.a&&(this.ua=!0,this.a.abort(),this.ua=!1);this.$a=b;Xd(this);Yd(this)};var Xd=function(a){a.jc||(a.jc=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
F.prototype.abort=function(){this.a&&this.N&&(Cd(this.G,Ud(this,"Aborting")),this.N=!1,this.ua=!0,this.a.abort(),this.ua=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Yd(this))};F.prototype.c=function(){this.a&&(this.N&&(this.N=!1,this.ua=!0,this.a.abort(),this.ua=!1),Yd(this,!0));F.j.c.call(this)};F.prototype.Cd=function(){this.U||(this.uc||this.yb||this.ua?Zd(this):this.qe())};F.prototype.qe=function(){Zd(this)};
|
|
var Zd=function(a){if(a.N&&"undefined"!=typeof aa)if(a.Xb[1]&&4==a.ja()&&2==a.getStatus())Cd(a.G,Ud(a,"Local request error detected and ignored"));else if(a.yb&&4==a.ja())Md(a.Cd,0,a);else if(a.dispatchEvent("readystatechange"),4==a.ja()){Cd(a.G,Ud(a,"Request complete"));a.N=!1;try{var b=a.getStatus();a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var f=String(a.Ab).match(Nd)[1]||null;if(!f&&k.self&&k.self.location)var g=
|
|
k.self.location.protocol,f=g.substr(0,g.length-1);e=!Rd.test(f?f.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{try{var l=2<a.ja()?a.a.statusText:""}catch(w){Cd(a.G,"Can not get status: "+w.message),l=""}a.$a=l+" ["+a.getStatus()+"]";Xd(a)}}finally{Yd(a)}}};
|
|
F.prototype.Bd=function(a,b){z("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent($d(a,"progress"));this.dispatchEvent($d(a,b?"downloadprogress":"uploadprogress"))};
|
|
var $d=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},Yd=function(a,b){if(a.a){Vd(a);var c=a.a,d=a.Xb[0]?ba:null;a.a=null;a.Xb=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(a=a.G)&&a.log(jd,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},Vd=function(a){a.a&&a.Vb&&(a.a.ontimeout=null);p(a.Ob)&&(k.clearTimeout(a.Ob),a.Ob=null)};F.prototype.sd=function(){return!!this.a};
|
|
F.prototype.ja=function(){return this.a?this.a.readyState:0};F.prototype.getStatus=function(){try{return 2<this.ja()?this.a.status:-1}catch(a){return-1}};
|
|
var ae=function(a){try{if(!a.a)return null;if("response"in a.a)return a.a.response;switch(a.Ma){case "":case "text":return a.a.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in a.a)return a.a.mozResponseArrayBuffer}var b=a.G;b&&b.log(jd,"Response type "+a.Ma+" is not supported on this browser",void 0);return null}catch(c){return Cd(a.G,"Can not get response: "+c.message),null}};
|
|
F.prototype.getResponseHeader=function(a){if(this.a&&4==this.ja())return a=this.a.getResponseHeader(a),null===a?void 0:a};F.prototype.getAllResponseHeaders=function(){return this.a&&4==this.ja()?this.a.getAllResponseHeaders():""};
|
|
var be=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=2;for(var e=a[c].split(": "),f=[];0<d&&e.length;)f.push(e.shift()),d--;e.length&&f.push(e.join(": "));d=f;b[d[0]]=b[d[0]]?b[d[0]]+(", "+d[1]):d[1]}return b},Ud=function(a,b){return b+" ["+a.vd+" "+a.Ab+" "+a.getStatus()+"]"};var ce=!sb||9<=Number(Db),de=!ub&&!sb||sb&&9<=Number(Db)||ub&&Cb("1.9.1");sb&&Cb("9");var ge=function(){this.Gb="";this.Pd=fe};ge.prototype.fe=!0;ge.prototype.toString=function(){return"TrustedResourceUrl{"+this.Gb+"}"};var fe={};var ie=function(a,b){bb(b,function(b,d){b&&b.fe&&(b=b.Gb);"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:he.hasOwnProperty(d)?a.setAttribute(he[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},he={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"},
|
|
ke=function(a,b,c){return je(document,arguments)},je=function(a,b){var c=String(b[0]),d=b[1];if(!ce&&d&&(d.name||d.type)){c=["<",c];d.name&&c.push(' name="',wa(d.name),'"');if(d.type){c.push(' type="',wa(d.type),'"');var e={};nb(e,d);delete e.type;d=e}c.push(">");c=c.join("")}c=a.createElement(c);d&&(n(d)?c.className=d:q(d)?c.className=d.join(" "):ie(c,d));2<b.length&&le(a,c,b);return c},le=function(a,b,c){function d(c){c&&b.appendChild(n(c)?a.createTextNode(c):c)}for(var e=2;e<c.length;e++){var f=
|
|
c[e];!ea(f)||t(f)&&0<f.nodeType?d(f):Ia(me(f)?Ua(f):f,d)}},ne=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},oe=function(a){z(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},me=function(a){if(a&&"number"==typeof a.length){if(t(a))return"function"==typeof a.item||"string"==typeof a.item;if(r(a))return"function"==typeof a.item}return!1},pe=function(a){this.ob=a||k.document||document};h=pe.prototype;
|
|
h.getElementsByTagName=function(a,b){return(b||this.ob).getElementsByTagName(String(a))};h.Zd=function(a,b,c){return je(this.ob,arguments)};h.createElement=function(a){return this.ob.createElement(String(a))};h.createTextNode=function(a){return this.ob.createTextNode(String(a))};h.appendChild=function(a,b){a.appendChild(b)};h.md=function(a){return de&&void 0!=a.children?a.children:Ja(a.childNodes,function(a){return 1==a.nodeType})};
|
|
h.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};var qe=function(a,b){z(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 re=function(a,b){D.call(this);b=b||{};this.minZoom=b.minZoom||0;this.maxZoom=b.maxZoom||20;if(!window.google||!window.google.maps)throw Error("Google Maps API hasn't been initialized.");this.tileSize=b.tileSize||new google.maps.Size(256,256);this.zb="isPng"in b?b.zb:!0;this.name=b.name;this.opacity="opacity"in b?b.opacity:1;this.oa=new Hd;this.na=0;this.Mc=a;this.ba=new fc(this);this.alt=this.radius=this.projection=void 0};x(re,D);v("ee.layers.AbstractOverlay",re);
|
|
re.prototype.$b=function(a){return Tb(this,"tile-load",a)};re.prototype.addTileCallback=re.prototype.$b;re.prototype.Gc=function(a){bc(a)};re.prototype.removeTileCallback=re.prototype.Gc;h=re.prototype;h.qc=function(){return se(this,"throttled")+se(this,"loading")+se(this,"new")};h.setOpacity=function(a){this.opacity=a;this.oa.forEach(function(a){qe(a.H,this.opacity)},this)};
|
|
h.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.na].join("-"),this.Mc.od()].join("-");var f=this.cd(d,b,c,a);f.tileSize=this.tileSize;qe(f.H,this.opacity);this.oa.set(a,f);this.ba.Y(f,"status-changed",function(){switch(f.getStatus()){case "loaded":this.dispatchEvent(new te(this.qc()));break;case "throttled":this.dispatchEvent(new ue);break;case "failed":this.dispatchEvent(new ve)}});
|
|
this.Mc.wd(f,(new Date).getTime()/1E3);return f.H};h.releaseTile=function(a){var b=this.oa.get(a.id);this.oa.remove(a.id);b&&(b.abort(),Ya(b))};h.c=function(){re.j.c.call(this);this.oa.forEach(Ya);this.oa.clear();this.oa=null;Ya(this.ba);this.Mc=this.ba=null};var se=function(a,b){return Na(a.oa.s(),function(a){return a.getStatus()==b})},te=function(){B.call(this,"tile-load")};x(te,B);var ue=function(){B.call(this,"tile-throttle")};x(ue,B);var ve=function(){B.call(this,"tile-fail")};x(ve,B);
|
|
var we=function(a,b,c,d){D.call(this);this.Ca=a;this.zoom=b;this.H=c.createElement("div");this.H.id=d;this.me=5;this.Ib=function(){};this.Jc="new";this.Hd=0;this.yc=!1};x(we,D);
|
|
var ye=function(a){if(!a.yc&&"loading"==a.getStatus())throw Error("startLoad() can only be invoked once. Use retryLoad() after the first attempt.");xe(a,"loading");a.fa=new F;a.fa.Ma="blob";a.fa.Y("complete",function(){var a=ae(this.fa),c=this.fa.getStatus();429==c&&xe(this,"throttled");if(200<=c&&300>c)this.we=be(this.fa),this.Md=a,this.Ta();else if(a){var d=new ed;d.Y("loadend",function(){this.eb(d.K.result)},void 0,this);d.readAsText(a)}else this.eb("Failed to load tile.")},!1,a);a.fa.bb("ready",
|
|
ja(Ya,a.fa));a.fa.send(a.Nb,"GET")};h=we.prototype;h.Ta=function(){this.Ib(this);xe(this,"loaded")};h.Ra=function(){Ya(this.fa)};h.eb=function(a){if(this.Hd>=this.me){try{JSON.parse(a)}catch(b){}xe(this,"failed")}else this.Ra(),setTimeout(u(function(){this.U||(this.yc=!0,ye(this),this.yc=!1)},this),1E3*Math.pow(2,this.Hd++))};h.abort=function(){this.Ra();xe(this,"aborted")};h.getStatus=function(){return this.Jc};
|
|
var xe=function(a,b){a.Jc=b;a.dispatchEvent("status-changed")},ze={aborted:!0,failed:!0,loaded:!0};we.prototype.c=function(){we.j.c.call(this);this.Ra();this.H.remove();this.Ib=null};var Ae=function(){A.call(this)};x(Ae,A);var Be=function(a,b){re.call(this,a,b);this.Yc=new Hd;this.fd=new Hd};x(Be,re);v("ee.layers.BinaryOverlay",Be);Be.prototype.cd=function(a,b,c,d){var e=new Ce(a,b,c,d);this.ba.Y(e,"status-changed",function(){"loaded"==e.getStatus()&&(this.Yc.set(a,new Float32Array(e.Ud)),this.fd.set(a,e.H))});return e};Be.prototype.c=function(){Be.j.c.call(this);this.fd=this.Yc=null};var Ce=function(a,b,c,d){we.call(this,a,b,c,d)};x(Ce,we);
|
|
Ce.prototype.Ta=function(){var a=new ed;a.Y("loadend",function(){this.Ud=a.K.result;we.prototype.Ta.call(this)},void 0,this);a.readAsArrayBuffer(this.Md)};var De=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 Ee=function(a,b,c,d){A.call(this);this.Xc=a;this.da=b;this.Lc=d||"";this.Cb=c};x(Ee,Ae);v("ee.layers.CloudStorageTileSource",Ee);Ee.prototype.wd=function(a){if(a.zoom<=this.Cb)a.Nb=this.tb(a.Ca,a.zoom);else{var b=a.zoom-this.Cb,c=Math.pow(2,b),c=new google.maps.Point(Math.floor(a.Ca.x/c),Math.floor(a.Ca.y/c));a.Nb=this.tb(c,a.zoom-b);a.Ib=ja(Fe,this.Cb)}var d=u(a.eb,a);a.eb=u(function(b){b&&-1!=b.indexOf("The specified key does not exist.")?xe(a,"loaded"):d(b)},a);ye(a)};
|
|
Ee.prototype.od=function(){return[this.Xc,this.da,this.Cb,this.Lc].join("-")};Ee.prototype.tb=function(a,b){a=De("https://storage.googleapis.com",this.Xc,this.da,String(b),String(a.x),String(a.y));this.Lc&&(a+=this.Lc);return a};
|
|
var Fe=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.H.ownerDocument.createElement("canvas");d.setAttribute("width",c);d.setAttribute("height",c);b.H.appendChild(d);d=d.getContext("2d");d.imageSmoothingEnabled=!1;d.mozImageSmoothingEnabled=!1;d.webkitImageSmoothingEnabled=!1;d.drawImage(b.xb,c/a*(b.Ca.x%a),c/a*(b.Ca.y%a),c/a,c/a,0,0,c,c)};var Ge=function(a,b,c){A.call(this);this.ke=null!=c?u(a,c):a;this.he=b;this.Vd=u(this.re,this);this.ac=[]};x(Ge,A);h=Ge.prototype;h.Mb=!1;h.Dd=0;h.Pa=null;h.oc=function(a){this.ac=arguments;this.Pa||this.Dd?this.Mb=!0:He(this)};h.stop=function(){this.Pa&&(k.clearTimeout(this.Pa),this.Pa=null,this.Mb=!1,this.ac=[])};h.c=function(){Ge.j.c.call(this);this.stop()};h.re=function(){this.Pa=null;this.Mb&&!this.Dd&&(this.Mb=!1,He(this))};var He=function(a){a.Pa=Md(a.Vd,a.he);a.ke.apply(null,a.ac)};var Je=function(a){var b=new ge;b.Gb=a;Ie(b)},Ie=function(a){var b={},c=b.document||document;if(a instanceof ge&&a.constructor===ge&&a.Pd===fe)var d=a.Gb;else Aa("expected object of type TrustedResourceUrl, got '"+a+"' of type "+ca(a)),d="type_error:TrustedResourceUrl";var e=document.createElement("SCRIPT");a={Jd:e,fb:void 0};var f=new Tc(Ke,a),g=null,l=null!=b.timeout?b.timeout:5E3;0<l&&(g=window.setTimeout(function(){Le(e,!0);Uc(f,new Me(1,"Timeout reached for loading script "+d))},l),a.fb=g);e.onload=
|
|
e.onreadystatechange=function(){e.readyState&&"loaded"!=e.readyState&&"complete"!=e.readyState||(Le(e,b.He||!1,g),f.dc(null))};e.onerror=function(){Le(e,!0,g);Uc(f,new Me(0,"Error while loading script "+d))};a=b.attributes||{};nb(a,{type:"text/javascript",charset:"UTF-8",src:d});ie(e,a);Ne(c).appendChild(e)},Ne=function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!=b.length?b[0]:a.documentElement},Ke=function(){if(this&&this.Jd){var a=this.Jd;a&&"SCRIPT"==a.tagName&&Le(a,!0,this.fb)}},
|
|
Le=function(a,b,c){null!=c&&k.clearTimeout(c);a.onload=ba;a.onerror=ba;a.onreadystatechange=ba;b&&window.setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},0)},Me=function(a,b){var c="Jsloader error (code #"+a+")";b&&(c+=": "+b);y.call(this,c);this.code=a};x(Me,y);var Oe=function(a,b){this.aa=this.xa=this.la="";this.Ia=null;this.ra=this.da="";this.M=this.ie=!1;if(a instanceof Oe){this.M=m(b)?b:a.M;Pe(this,a.la);var c=a.xa;Qe(this);this.xa=c;c=a.aa;Qe(this);this.aa=c;Re(this,a.Ia);this.setPath(a.getPath());Se(this,a.Z.clone());a=a.ra;Qe(this);this.ra=a}else a&&(c=String(a).match(Nd))?(this.M=!!b,Pe(this,c[1]||"",!0),a=c[2]||"",Qe(this),this.xa=Te(a),a=c[3]||"",Qe(this),this.aa=Te(a,!0),Re(this,c[4]),this.setPath(c[5]||"",!0),Se(this,c[6]||"",!0),a=c[7]||"",
|
|
Qe(this),this.ra=Te(a)):(this.M=!!b,this.Z=new Ue(null,0,this.M))};
|
|
Oe.prototype.toString=function(){var a=[],b=this.la;b&&a.push(Ve(b,We,!0),":");var c=this.aa;if(c||"file"==b)a.push("//"),(b=this.xa)&&a.push(Ve(b,We,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.Ia,null!=c&&a.push(":",String(c));if(c=this.getPath())this.aa&&"/"!=c.charAt(0)&&a.push("/"),a.push(Ve(c,"/"==c.charAt(0)?Xe:Ye,!0));(c=this.Z.toString())&&a.push("?",c);(c=this.ra)&&a.push("#",Ve(c,Ze));return a.join("")};
|
|
Oe.prototype.resolve=function(a){var b=this.clone(),c=!!a.la;c?Pe(b,a.la):c=!!a.xa;if(c){var d=a.xa;Qe(b);b.xa=d}else c=!!a.aa;c?(d=a.aa,Qe(b),b.aa=d):c=null!=a.Ia;d=a.getPath();if(c)Re(b,a.Ia);else if(c=!!a.da){if("/"!=d.charAt(0))if(this.aa&&!this.da)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("/.")){for(var d=0==e.lastIndexOf("/",0),e=e.split("/"),f=[],g=0;g<e.length;){var l=e[g++];
|
|
"."==l?d&&g==e.length&&f.push(""):".."==l?((1<f.length||1==f.length&&""!=f[0])&&f.pop(),d&&g==e.length&&f.push("")):(f.push(l),d=!0)}d=f.join("/")}else d=e}c?b.setPath(d):c=""!==a.Z.toString();c?Se(b,a.Z.clone()):c=!!a.ra;c&&(a=a.ra,Qe(b),b.ra=a);return b};Oe.prototype.clone=function(){return new Oe(this)};var Pe=function(a,b,c){Qe(a);a.la=c?Te(b,!0):b;a.la&&(a.la=a.la.replace(/:$/,""))},Re=function(a,b){Qe(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.Ia=b}else a.Ia=null};
|
|
Oe.prototype.getPath=function(){return this.da};Oe.prototype.setPath=function(a,b){Qe(this);this.da=b?Te(a,!0):a;return this};var Se=function(a,b,c){Qe(a);b instanceof Ue?(a.Z=b,a.Z.Hc(a.M)):(c||(b=Ve(b,$e)),a.Z=new Ue(b,0,a.M))},Qe=function(a){if(a.ie)throw Error("Tried to modify a read-only Uri");};Oe.prototype.Hc=function(a){this.M=a;this.Z&&this.Z.Hc(a);return this};
|
|
var af=function(a){return a instanceof Oe?a.clone():new Oe(a,void 0)},Te=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Ve=function(a,b,c){return n(a)?(a=encodeURI(a).replace(b,bf),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},bf=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},We=/[#\/\?@]/g,Ye=/[\#\?:]/g,Xe=/[\#\?]/g,$e=/[\#\?@]/g,Ze=/#/g,Ue=function(a,b,c){this.h=this.l=null;this.I=a||null;this.M=!!c},cf=function(a){a.l||
|
|
(a.l=new Hd,a.h=0,a.I&&Od(a.I,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=Ue.prototype;h.B=function(){cf(this);return this.h};h.add=function(a,b){cf(this);this.I=null;a=df(this,a);var c=this.l.get(a);c||this.l.set(a,c=[]);c.push(b);this.h=Ba(this.h)+1;return this};h.remove=function(a){cf(this);a=df(this,a);return this.l.ha(a)?(this.I=null,this.h=Ba(this.h)-this.l.get(a).length,this.l.remove(a)):!1};h.clear=function(){this.l=this.I=null;this.h=0};
|
|
h.isEmpty=function(){cf(this);return 0==this.h};h.ha=function(a){cf(this);a=df(this,a);return this.l.ha(a)};h.forEach=function(a,b){cf(this);this.l.forEach(function(c,d){Ia(c,function(c){a.call(b,c,d,this)},this)},this)};h.P=function(){cf(this);for(var a=this.l.s(),b=this.l.P(),c=[],d=0;d<b.length;d++)for(var e=a[d],f=0;f<e.length;f++)c.push(b[d]);return c};h.s=function(a){cf(this);var b=[];if(n(a))this.ha(a)&&(b=Ta(b,this.l.get(df(this,a))));else{a=this.l.s();for(var c=0;c<a.length;c++)b=Ta(b,a[c])}return b};
|
|
h.set=function(a,b){cf(this);this.I=null;a=df(this,a);this.ha(a)&&(this.h=Ba(this.h)-this.l.get(a).length);this.l.set(a,[b]);this.h=Ba(this.h)+1;return this};h.get=function(a,b){a=a?this.s(a):[];return 0<a.length?String(a[0]):b};h.setValues=function(a,b){this.remove(a);0<b.length&&(this.I=null,this.l.set(df(this,a),Ua(b)),this.h=Ba(this.h)+b.length)};
|
|
h.toString=function(){if(this.I)return this.I;if(!this.l)return"";for(var a=[],b=this.l.P(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.s(d),f=0;f<d.length;f++){var g=e;""!==d[f]&&(g+="="+encodeURIComponent(String(d[f])));a.push(g)}return this.I=a.join("&")};h.clone=function(){var a=new Ue;a.I=this.I;this.l&&(a.l=this.l.clone(),a.h=this.h);return a};var df=function(a,b){b=String(b);a.M&&(b=b.toLowerCase());return b};
|
|
Ue.prototype.Hc=function(a){a&&!this.M&&(cf(this),this.I=null,this.l.forEach(function(a,c){var b=c.toLowerCase();c!=b&&(this.remove(c),this.setValues(b,a))},this));this.M=a};var lf=function(a,b,c,d,e){var f=["https://www.googleapis.com/auth/earthengine"];d&&(Va(f,d),Xa(f));ef=a;ff=f;null===a?gf=null:hf(function(){jf(b,c,e||ja(kf,b,c))})};v("ee.data.authenticate",lf);var kf=function(a,b){k.gapi.auth.authorize({client_id:ef,immediate:!1,scope:ff.join(" ")},ja(mf,a,b))};v("ee.data.authenticateViaPopup",kf);
|
|
var nf=function(a,b,c,d,e,f,g){var l=["https://www.googleapis.com/auth/earthengine"];e&&(Va(l,e),Xa(l));ef=a;ff=l;var w={token_type:b,access_token:c,state:l.join(" "),expires_in:d};mf(void 0,void 0,w);!1===g?f&&f():hf(function(){k.gapi.auth.setToken(w);f&&f()})};v("ee.data.setAuthToken",nf);var jf=function(a,b,c){of&&ef&&of({client_id:String(ef),immediate:!0,scope:ff.join(" ")},function(d){"immediate_failed"==d.error&&c?c():mf(a,b,d)})},pf=function(a){of=a};v("ee.data.setAuthTokenRefresher",pf);
|
|
var sf=function(){qf&&0<=ka()-qf&&rf();return gf};v("ee.data.getAuthToken",sf);var rf=function(){qf=gf=null};v("ee.data.clearAuthToken",rf);var tf=function(){return ef};v("ee.data.getAuthClientId",tf);var uf=function(){return ff};v("ee.data.getAuthScopes",uf);var zf=function(a,b,c){null!=a?vf=a:wf||(vf="https://earthengine.googleapis.com/api");null!=b?xf=b:wf||(xf="https://earthengine.googleapis.com");m(c)&&(yf=c);wf=!0},Bf=function(a){Af=a};v("ee.data.setDeadline",Bf);
|
|
v("ee.data.setParamAugmenter",function(a){Cf=a||lc});var Df=function(){return vf};v("ee.data.getApiBaseUrl",Df);var Ef=function(){return xf};v("ee.data.getTileBaseUrl",Ef);var Ff=function(){return yf};v("ee.data.getXsrfToken",Ff);var Gf=function(a,b){a=kb(a);return G("/mapid",H(a),b)};v("ee.data.getMapId",Gf);var Hf=function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[xf,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};v("ee.data.getTileUrl",Hf);
|
|
var If=function(a,b){a=kb(a);return G("/value",H(a),b)};v("ee.data.getValue",If);var Jf=function(a,b){a=kb(a);q(a.dimensions)&&(a.dimensions=a.dimensions.join("x"));a=H(a).add("getid","1");return G("/thumb",a,b)};v("ee.data.getThumbId",Jf);var Kf=function(a){return xf+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};v("ee.data.makeThumbUrl",Kf);var Lf=function(a,b){a=kb(a);return G("/download",H(a),b)};v("ee.data.getDownloadId",Lf);
|
|
var Mf=function(a){return xf+"/api/download?docid="+a.docid+"&token="+a.token};v("ee.data.makeDownloadUrl",Mf);var Nf=function(a,b){a=kb(a);return G("/table",H(a),b)};v("ee.data.getTableDownloadId",Nf);var Of=function(a){return xf+"/api/table?docid="+a.docid+"&token="+a.token};v("ee.data.makeTableDownloadUrl",Of);var Qf=function(a,b,c){var d=Pf;try{return Pf=a,b.call(c)}finally{Pf=d}};v("ee.data.withProfiling",Qf);
|
|
v("ee.data.newTaskId",function(a,b){var c={};p(a)&&(c.count=a);return G("/newtaskid",H(c),b)});v("ee.data.getTaskStatus",function(a,b){if(n(a))a=[a];else if(!q(a))throw Error("Invalid taskId: expected a string or an array of strings.");return G("/taskstatus?q="+a.join(),null,b,"GET")});v("ee.data.getTaskList",function(a){return G("/tasklist",null,a,"GET")});v("ee.data.cancelTask",function(a,b){return Rf(a,"CANCEL",b)});
|
|
var Rf=function(a,b,c){if(n(a))a=[a];else if(!q(a))throw Error("Invalid taskId: expected a string or an array of strings.");a:{var d=Sf;for(var e in d)if(d[e]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return G("/updatetask",H({id:a,action:b}),c,"POST")};v("ee.data.updateTask",Rf);v("ee.data.startProcessing",function(a,b,c){b=kb(b);b.id=a;return G("/processingrequest",H(b),c)});v("ee.data.startIngestion",function(a,b,c){a={id:a,request:xd(b)};return G("/ingestionrequest",H(a),c)});
|
|
v("ee.data.startTableIngestion",function(a,b,c){a={id:a,tableRequest:xd(b)};return G("/ingestionrequest",H(a),c)});var Tf=function(a,b){return G("/info",(new Ue).add("id",a),b)};v("ee.data.getInfo",Tf);var Uf=function(a,b){a=H(a);return G("/list",a,b)};v("ee.data.getList",Uf);v("ee.data.getAssetRoots",function(a){return G("/buckets",null,a,"GET")});v("ee.data.createAssetHome",function(a,b){a=H({id:a});G("/createbucket",a,b)});
|
|
v("ee.data.createAsset",function(a,b,c,d){n(a)||(a=xd(a));a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return G("/create",H(a),d)});v("ee.data.createFolder",function(a,b,c){return G("/createfolder",H({id:a,force:b||!1}),c)});v("ee.data.renameAsset",function(a,b,c){G("/rename",H({sourceId:a,destinationId:b}),c)});v("ee.data.copyAsset",function(a,b,c){G("/copy",H({sourceId:a,destinationId:b}),c)});v("ee.data.deleteAsset",function(a,b){G("/delete",H({id:a}),b)});
|
|
v("ee.data.getAssetAcl",function(a,b){return G("/getacl",H({id:a}),b,"GET")});v("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:xd(b)};G("/setacl",H(a),c)});v("ee.data.setAssetProperties",function(a,b,c){a={id:a,properties:xd(b)};G("/setproperties",H(a),c)});v("ee.data.getAssetRootQuota",function(a,b){return G("/quota",H({id:a}),b,"GET")});
|
|
var Sf={Ce:"CANCEL",Fe:"UPDATE"},G=function(a,b,c,d){zf();var e=Pf,f={"Content-Type":"application/x-www-form-urlencoded"},g=sf();if(null!=g)f.Authorization=g;else if(c&&of&&ef)return jf(function(){Qf(e,function(){G(a,b,c,d)})}),null;g=d||"POST";b=b?b.clone():new Ue;e&&b.add("profiling","1");b=Cf(b,a);null!=yf&&(f["X-XSRF-Token"]=yf);var l=b?b.toString():"";"GET"!=g||/^[\s\xa0]*$/.test(l)||(a+=-1!=a.indexOf("?")?"&":"?",a+=l,l=null);var w=vf+a;if(c)return f=Vf(w,c,g,l,f),Wf.push(f),Xf.oc(),null;for(var oa=
|
|
function(a,b){this.setRequestHeader&&this.setRequestHeader(b,a)},Ha,ug=0;;){Ha=E();Ha.open(g,w,!1);bb(f,oa,Ha);Ha.send(l);if(429!=Ha.status||5<ug)break;ug++}return Yf(Ha.status,function(a){try{return Ha.getResponseHeader(a)}catch(Ti){return null}},Ha.responseText,e)},Vf=function(a,b,c,d,e){var f=0,g={url:a,method:c,content:d,headers:e},l=Pf;g.dc=function(a){a=a.target;if(429==a.getStatus()&&10>f)return f++,setTimeout(function(){Wf.push(g);Xf.oc()},Math.min(12E4,1E3*Math.pow(2,f))),null;var c=a.getStatus(),
|
|
d=u(a.getResponseHeader,a);try{var e=a.a?a.a.responseText:""}catch(Ci){Cd(a.G,"Can not get responseText: "+Ci.message),e=""}return Yf(c,d,e,l,b)};return g},Yf=function(a,b,c,d,e){var f=b("X-Earth-Engine-Computation-Profile");f&&d&&d(f);b=(b=b("Content-Type"))?b.replace(/;.*/,""):"application/json";if("application/json"==b||"text/json"==b)try{var g=JSON.parse(c);var l=g.data}catch(oa){var w="Invalid JSON: "+c}else w="Response was unexpectedly not JSON, but "+b;if(t(g))"error"in g&&"message"in g.error?
|
|
w=g.error.message:"data"in g||(w="Malformed response: "+c);else if(0===a)w="Failed to contact Earth Engine servers. Please check your connection, firewall, or browser extension settings.";else if(200>a||300<=a)w="Server returned HTTP code: "+a;if(e)return e(l,w),null;if(!w)return l;throw Error(w);},hf=function(a){var b=function(){k.gapi.config.update("client/cors",!0);of||(of=k.gapi.auth.authorize);a()};if(t(k.gapi)&&t(k.gapi.auth)&&r(k.gapi.auth.authorize))b();else{for(var c=ka().toString(36);c in
|
|
k;)c+="_";k[c]=function(){delete k[c];b()};Je("https://apis.google.com/js/client.js?onload="+c)}},mf=function(a,b,c){c.access_token?(b=c.token_type+" "+c.access_token,isFinite(c.expires_in)&&(c=900*c.expires_in,setTimeout(jf,.9*c),qf=ka()+c),gf=b,a&&a()):b&&b(c.error||"Unknown error.")},H=function(a){var b=new Ue,c;for(c in a)b.set(c,a[c]);return b},Wf=[],Xf=new Ge(function(){var a=Wf.shift();if(a){var b=a.url,c=a.dc,d=a.method,e=a.content,a=a.headers,f=Af,g=new F;Td.push(g);c&&g.Y("complete",c);
|
|
g.bb("ready",g.Xd);f&&(g.Oa=Math.max(0,f));g.send(b,d,e,a)}0==Wf.length||Xf.oc()},350),vf=null,xf=null,yf=null,Cf=lc,gf=null,qf=null,ef=null,ff=[],of=null,wf=!1,Af=0,Pf=null;var Zf=function(a,b){this.ud=a;this.Sc=b};Zf.prototype.getKey=function(){return this.ud};Zf.prototype.clone=function(){return new Zf(this.ud,this.Sc)};var $f=function(a){this.R=[];if(a)a:{if(a instanceof $f){var b=a.P();a=a.s();if(0>=this.B()){for(var c=this.R,d=0;d<b.length;d++)c.push(new Zf(b[d],a[d]));break a}}else b=fb(a),a=eb(a);for(d=0;d<b.length;d++)ag(this,b[d],a[d])}},ag=function(a,b,c){var d=a.R;d.push(new Zf(b,c));b=d.length-1;a=a.R;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};h=$f.prototype;
|
|
h.remove=function(){var a=this.R,b=a.length,c=a[0];if(!(0>=b)){if(1==b)Qa(a);else{a[0]=a.pop();for(var a=0,b=this.R,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.Sc}};h.s=function(){for(var a=this.R,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].Sc);return b};h.P=function(){for(var a=this.R,b=[],c=a.length,d=0;d<c;d++)b.push(a[d].getKey());return b};
|
|
h.ha=function(a){return La(this.R,function(b){return b.getKey()==a})};h.clone=function(){return new $f(this)};h.B=function(){return this.R.length};h.isEmpty=function(){return 0==this.R.length};h.clear=function(){Qa(this.R)};var bg=function(){this.O=[];this.S=[]};h=bg.prototype;h.enqueue=function(a){this.S.push(a)};h.Sa=function(){0==this.O.length&&(this.O=this.S,this.O.reverse(),this.S=[]);return this.O.pop()};h.B=function(){return this.O.length+this.S.length};h.isEmpty=function(){return 0==this.O.length&&0==this.S.length};h.clear=function(){this.O=[];this.S=[]};h.contains=function(a){return 0<=Fa(this.O,a)||0<=Fa(this.S,a)};
|
|
h.remove=function(a){var b=this.O;var c=Ga(b,a);0<=c?(Ra(b,c),b=!0):b=!1;return b||Sa(this.S,a)};h.s=function(){for(var a=[],b=this.O.length-1;0<=b;--b)a.push(this.O[b]);for(var c=this.S.length,b=0;b<c;++b)a.push(this.S[b]);return a};var cg=function(a){this.u=new Hd;a&&this.addAll(a)},dg=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+(a[fa]||(a[fa]=++ga)):b.substr(0,1)+a};h=cg.prototype;h.B=function(){return this.u.B()};h.add=function(a){this.u.set(dg(a),a)};h.addAll=function(a){a=Kd(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c])};h.cb=function(a){a=Kd(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c])};h.remove=function(a){return this.u.remove(dg(a))};h.clear=function(){this.u.clear()};h.isEmpty=function(){return this.u.isEmpty()};
|
|
h.contains=function(a){return this.u.ha(dg(a))};var eg=function(a,b){var c=new cg;b=Kd(b);for(var d=0;d<b.length;d++){var e=b[d];a.contains(e)&&c.add(e)}return c},fg=function(a,b){a=a.clone();a.cb(b);return a};cg.prototype.s=function(){return this.u.s()};cg.prototype.clone=function(){return new cg(this)};cg.prototype.za=function(){return this.u.za(!1)};var gg=function(a,b){A.call(this);this.yd=a||0;this.Bb=b||10;if(this.yd>this.Bb)throw Error("[goog.structs.Pool] Min can not be greater than max");this.W=new bg;this.ka=new cg;this.hc=0;this.zc=null;this.kb()};x(gg,A);gg.prototype.Va=function(){var a=ka();if(!(null!=this.zc&&a-this.zc<this.hc)){for(var b;0<this.W.B()&&(b=this.W.Sa(),!this.Cc(b));)this.kb();!b&&this.B()<this.Bb&&(b=this.gc());b&&(this.zc=a,this.ka.add(b));return b}};var hg=function(a,b){return a.ka.remove(b)?(a.Zb(b),!0):!1};h=gg.prototype;
|
|
h.Zb=function(a){this.ka.remove(a);this.Cc(a)&&this.B()<this.Bb?this.W.enqueue(a):this.nb(a)};h.kb=function(){for(var a=this.W;this.B()<this.yd;)a.enqueue(this.gc());for(;this.B()>this.Bb&&0<this.W.B();)this.nb(a.Sa())};h.gc=function(){return{}};h.nb=function(a){if("function"==typeof a.T)a.T();else for(var b in a)a[b]=null};h.Cc=function(a){return"function"==typeof a.Wd?a.Wd():!0};h.contains=function(a){return this.W.contains(a)||this.ka.contains(a)};h.B=function(){return this.W.B()+this.ka.B()};
|
|
h.isEmpty=function(){return this.W.isEmpty()&&this.ka.isEmpty()};h.c=function(){gg.j.c.call(this);if(0<this.ka.B())throw Error("[goog.structs.Pool] Objects not released");delete this.ka;for(var a=this.W;!a.isEmpty();)this.nb(a.Sa());delete this.W};var ig=function(){$f.call(this)};x(ig,$f);ig.prototype.enqueue=function(a,b){ag(this,a,b)};ig.prototype.Sa=function(){return this.remove()};var jg=function(a,b){this.ed=void 0;this.Kb=new ig;gg.call(this,a,b)};x(jg,gg);h=jg.prototype;h.Va=function(a,b){if(!a)return(a=jg.j.Va.call(this))&&this.hc&&(this.ed=k.setTimeout(u(this.vb,this),this.hc)),a;this.Kb.enqueue(m(b)?b:100,a);this.vb()};h.vb=function(){for(var a=this.Kb;0<a.B();){var b=this.Va();if(b)a.Sa().apply(this,[b]);else break}};h.Zb=function(a){jg.j.Zb.call(this,a);this.vb()};h.kb=function(){jg.j.kb.call(this);this.vb()};
|
|
h.c=function(){jg.j.c.call(this);k.clearTimeout(this.ed);this.Kb.clear();this.Kb=null};var kg=function(a,b,c,d){A.call(this);this.Rc=a;this.xd=b;this.gb=c;this.J=d||null};x(kg,Ae);v("ee.layers.EarthEngineTileSource",kg);kg.prototype.wd=function(a,b){var c=Tb(a,"status-changed",function(){switch(a.getStatus()){case "loaded":var b=a.we["x-earth-engine-computation-profile"];this.J&&b&&this.J.Rd(a.H.id,b);break;case "failed":case "aborted":this.J&&""!==a.H.id&&this.J.ue(a.H.id),bc(c)}},void 0,this);a.Nb=this.tb(a.Ca,a.zoom);var d=u(this.sc,this,a);lg().Va(d,b)};
|
|
kg.prototype.od=function(){return[this.xd,this.gb].join("-")};kg.prototype.sc=function(a,b){var c=lg();if(a.U||"aborted"==a.getStatus())hg(c,b);else{var d=Tb(a,"status-changed",function(){a.Jc in ze&&(bc(d),hg(c,b))});ye(a)}};kg.prototype.tb=function(a,b){a=[this.Rc,this.xd,b,a.x,a.y].join("/");a+="?token="+this.gb;this.J&&this.J.isEnabled()&&(a+="&profiling=1");return a};var lg=function(){mg||(mg=new jg(0,4));return mg},mg=null;var ng=function(a){D.call(this);this.Za={};this.Ya={};this.ta=new fc(this);this.m=a};x(ng,D);var og=[sb&&!Cb("11")?"readystatechange":"load","abort","error"],pg=function(a,b,c){(c=n(c)?c:c.src)&&(a.Za[b]={src:c,bd:m(void 0)?void 0:null})},qg=function(a,b){delete a.Za[b];var c=a.Ya[b];c&&(delete a.Ya[b],a.ta.Ub(c,og,a.Ad),ib(a.Ya)&&ib(a.Za)&&a.dispatchEvent("complete"))};
|
|
ng.prototype.start=function(){var a=this.Za;Ia(fb(a),function(b){var c=a[b];if(c&&(delete a[b],!this.U)){if(this.m){var d=this.m;d=(d?new pe(oe(d)):la||(la=new pe)).Zd("IMG")}else d=new Image;c.bd&&(d.crossOrigin=c.bd);this.ta.Y(d,og,this.Ad);this.Ya[b]=d;d.id=b;d.src=c.src}},this)};
|
|
ng.prototype.Ad=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.U||qg(this,b.id)}};ng.prototype.c=function(){delete this.Za;delete this.Ya;Ya(this.ta);ng.j.c.call(this)};var rg=function(a,b){re.call(this,a,b)};x(rg,re);v("ee.layers.ImageOverlay",rg);rg.prototype.cd=function(a,b,c,d){return new sg(a,b,c,d)};var sg=function(a,b,c,d){we.call(this,a,b,c,d);this.Ib=tg;this.rd=this.C=this.xb=null;this.Db=""};x(sg,we);
|
|
sg.prototype.Ta=function(){try{var a=this.Db=URL.createObjectURL(this.Md)}catch(b){a=this.Nb}this.C=new ng;pg(this.C,this.H.id+"-image",a);this.rd=$b(this.C,vg,function(a){"load"==a.type?(this.xb=a.target,we.prototype.Ta.call(this)):this.eb()},void 0,this);this.C.start()};sg.prototype.Ra=function(){sg.j.Ra.call(this);this.C&&(bc(this.rd),Ya(this.C))};sg.prototype.c=function(){sg.j.c.call(this);this.Db&&URL.revokeObjectURL(this.Db)};var vg=["load","abort","error"],tg=function(a){a.H.appendChild(a.xb)};var wg=function(a,b,c){D.call(this);this.le=b;this.Pb=c;this.pa=[];this.Nc=new cg;this.na=0;this.url=a};x(wg,D);v("ee.AbstractOverlay",wg);var xg=function(a,b,c){var d=1<<c,e=b.x%d;0>e&&(e+=d);return[a.le,c,e,b.y].join("/")};wg.prototype.qc=function(){return this.pa.length};var yg=function(a){B.call(this,"tileevent");this.count=a};x(yg,B);var zg=function(){};var Ag=function(){this.ga=-1};var Bg=function(){this.ga=64;this.A=Array(4);this.Sd=Array(this.ga);this.Rb=this.Qa=0;this.reset()};x(Bg,Ag);Bg.prototype.reset=function(){this.A[0]=1732584193;this.A[1]=4023233417;this.A[2]=2562383102;this.A[3]=271733878;this.Rb=this.Qa=0};
|
|
var Cg=function(a,b,c){c||(c=0);var d=Array(16);if(n(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.A[0];c=a.A[1];var e=a.A[2],f=a.A[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.A[0]=a.A[0]+b&4294967295;a.A[1]=a.A[1]+(e+(g<<21&4294967295|g>>>11))&4294967295;a.A[2]=a.A[2]+e&4294967295;a.A[3]=a.A[3]+f&4294967295};
|
|
Bg.prototype.update=function(a,b){m(b)||(b=a.length);for(var c=b-this.ga,d=this.Sd,e=this.Qa,f=0;f<b;){if(0==e)for(;f<=c;)Cg(this,a,f),f+=this.ga;if(n(a))for(;f<b;){if(d[e++]=a.charCodeAt(f++),e==this.ga){Cg(this,d);e=0;break}}else for(;f<b;)if(d[e++]=a[f++],e==this.ga){Cg(this,d);e=0;break}}this.Qa=e;this.Rb+=b};
|
|
Bg.prototype.digest=function(){var a=Array((56>this.Qa?this.ga:2*this.ga)-this.Qa);a[0]=128;for(var b=1;b<a.length-8;++b)a[b]=0;for(var c=8*this.Rb,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.A[b]>>>d&255;return a};var Dg=function(a){this.jb="__ee_hash__";this.xc=!1!==a;this.Na=[];this.Ea={};this.Tc=[]};v("ee.Serializer",Dg);var Eg=new wd,Fg=new Bg,Hg=function(a,b){return Gg(new Dg(m(b)?b:!0),a)};v("ee.Serializer.encode",Hg);var Ig=function(a){return Eg.v(Hg(a))};v("ee.Serializer.toJSON",Ig);var Jg=function(a){a=Gg(new Dg(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):Eg.v(a)};v("ee.Serializer.toReadableJSON",Jg);
|
|
var Gg=function(a,b){b=a.pb(b);a.xc&&(b=t(b)&&"ValueRef"==b.type&&1==a.Na.length?a.Na[0][1]:{type:"CompoundValue",scope:a.Na,value:b},a.Na=[],Ia(a.Tc,u(function(a){delete a[this.jb]},a)),a.Tc=[],a.Ea={});return b};
|
|
Dg.prototype.pb=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b=t(a)?a[this.jb]:null;if(this.xc&&null!=b&&this.Ea[b])return{type:"ValueRef",value:this.Ea[b]};if(null===a||"boolean"==typeof a||p(a)||n(a))return a;if(t(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof zg){var c=a.encode(u(this.pb,this));if(!(q(c)||t(c)&&"ArgumentRef"!=c.type))return c}else if(q(a))c=Ka(a,function(a){return this.pb(a)},
|
|
this);else if(t(a)&&!r(a))c=db(a,function(a){if(!r(a))return this.pb(a)},this),jb(c,this.jb),c={type:"Dictionary",value:c};else throw Error("Can't encode object: "+a);if(this.xc){Fg.reset();Fg.update(Eg.v(c));var b=Fg.digest().toString();if(this.Ea[b])var d=this.Ea[b];else d=String(this.Na.length),this.Na.push([d,c]),this.Ea[b]=d;a[this.jb]=b;this.Tc.push(a);return{type:"ValueRef",value:d}}return c};var I=function(a,b,c){if(!(this instanceof I))return J(I,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.f=a;this.o=b;this.w=c||null};x(I,zg);v("ee.ComputedObject",I);I.prototype.evaluate=function(a){if(!a||!r(a))throw Error("evaluate() requires a callback function.");If({json:this.v()},a)};I.prototype.evaluate=I.prototype.evaluate;
|
|
I.prototype.X=function(a){return If({json:this.v()},a)};I.prototype.getInfo=I.prototype.X;I.prototype.encode=function(a){if(null===this.f&&null===this.o)return{type:"ArgumentRef",value:this.w};var b={},c;for(c in this.o)m(this.o[c])&&(b[c]=a(this.o[c]));b={type:"Invocation",arguments:b};a=a(this.f);b[n(a)?"functionName":"function"]=a;return b};I.prototype.v=function(){return Ig(this)};I.prototype.serialize=I.prototype.v;I.prototype.toString=function(){return"ee."+this.name()+"("+Jg(this)+")"};
|
|
v("ee.ComputedObject.prototype.toString",I.prototype.toString);I.prototype.name=function(){return"ComputedObject"};I.prototype.Uc=function(a,b){var c=Ua(arguments);c[0]=this;a.apply(k,c);return this};I.prototype.aside=I.prototype.Uc;var Kg=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;a=new c;a.f=b.f;a.o=b.o;a.w=b.w;return a},J=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var Lg={},Mg=function(a){return a.prototype instanceof I?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},Ng=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}},Og=function(a){return p(a)||
|
|
a instanceof I&&"Number"==a.name()},Pg=function(a){return n(a)||a instanceof I&&"String"==a.name()},Qg=function(a){return t(a)&&!r(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var K=function(){if(!(this instanceof K))return new K};x(K,zg);v("ee.Function",K);var Rg=lc;K.prototype.call=function(a){return this.apply(Sg(this,Array.prototype.slice.call(arguments,0)))};K.prototype.call=K.prototype.call;K.prototype.apply=function(a){a=new I(this,Tg(this,a));return Rg(a,this.F().returns)};K.prototype.apply=K.prototype.apply;
|
|
var Ug=function(a,b,c){var d=m(b),e=a.F(),f=!1;if(1==c.length&&Qg(c[0])){var g=e.args;d&&(g=g.slice(1));g.length&&(f=!((1==g.length||g[1].optional)&&"Dictionary"==g[0].type))}if(f){if(c=kb(c[0]),d){d=e.args[0].name;if(d in c)throw Error("Named args for "+e.name+" can't contain keyword "+d);c[d]=b}}else c=Sg(a,d?[b].concat(c):c);return a.apply(c)},Tg=function(a,b){for(var c=a.F().args,d={},e={},f=0;f<c.length;f++){var g=c[f].name;if(g in b&&m(b[g]))d[g]=Rg(b[g],c[f].type);else if(!c[f].optional)throw Error("Required argument ("+
|
|
g+") missing to function: "+a);e[g]=!0}var c=[],l;for(l in b)e[l]||c.push(l);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},Sg=function(a,b){var c=a.F().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};
|
|
K.prototype.toString=function(a,b){var c=this.F(),d=[];d.push(a||c.name);d.push("(");d.push(Ka(c.args.slice(b?1:0),function(a){return a.name}).join(", "));d.push(")\n");d.push("\n");c.description?d.push(c.description):d.push("Undocumented.");d.push("\n");if(c.args.length)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("")};K.prototype.v=function(){return Ig(this)};var L=function(a,b){if(!m(b))return Vg(a);if(!(this instanceof L))return J(L,arguments);this.ma=lb(b);this.ma.name=a};x(L,K);v("ee.ApiFunction",L);var M=function(a,b){return K.prototype.call.apply(Vg(a),Array.prototype.slice.call(arguments,1))};v("ee.ApiFunction._call",M);var Wg=function(a,b){return Vg(a).apply(b)};v("ee.ApiFunction._apply",Wg);L.prototype.encode=function(){return this.ma.name};L.prototype.F=function(){return this.ma};
|
|
var Xg=null,Yg={},$g=function(){Zg();return db(Xg,function(a){return a.F()})},ah=function(){Zg();return cb(Xg,function(a,b){return!Yg[b]})},Vg=function(a){var b=bh(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};v("ee.ApiFunction.lookup",Vg);
|
|
var bh=function(a){Zg();return Xg[a]||null},Zg=function(a,b){if(Xg)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(Xg=db(c,function(a,b){a.returns=a.returns.replace(/<.*>/,"");for(var c=0;c<a.args.length;c++)a.args[c].type=a.args[c].type.replace(/<.*>/,"");return new L(b,a)}),a&&a())};a?G("/algorithms",null,c,"GET"):c(G("/algorithms",null,void 0,"GET"))}},N=function(a,b,c,d){Zg();var e=d||"";bb(Xg,function(d,g){var f=g.split(".");if(2==f.length&&f[0]==b){var f=e+f[1],w=d.F();Yg[g]=!0;var oa=!1;
|
|
w.args.length&&(g=w.args[0].type,oa="Object"!=g&&Ng(g,c));g=oa?a.prototype:a;f in g&&!g[f].signature||(g[f]=function(a){return Ug(d,oa?this:void 0,Array.prototype.slice.call(arguments,0))},g[f].toString=u(d.toString,d,f,oa),g[f].signature=w)}})},O=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var P=function(a,b){var c=ch(a),d=Ka(c,function(a){return a.replace(/^opt_/,"")});a=(a=k.EXPORTED_FN_INFO?k.EXPORTED_FN_INFO[a.toString()].name.split(".").pop()+"()":null)?" to function "+a:"";var e={},f=b[0],g=t(f)&&!r(f)&&!q(f)&&!(f instanceof I);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{var g=new cg(fb(f)),l=new cg(d);if(eg(l,g).isEmpty())e[d[0]]=b[0];else{b=
|
|
fg(g,l);if(!b.isEmpty())throw Error("Unexpected arguments"+a+": "+b.s().join(", "));e=kb(f)}}b=new cg(fb(e));c=fg(new cg(Ja(c,function(a){return 0!=a.lastIndexOf("opt_",0)})),b);if(!c.isEmpty())throw Error("Missing required arguments"+a+": "+c.s().join(", "));return e},ch=function(a){k.EXPORTED_FN_INFO?(a=k.EXPORTED_FN_INFO[a.toString()],Da(a),a=a.paramNames,Ea(a)):a=a.toString().replace(dh,"").match(eh)[1].split(",")||[];return a},dh=/((\/\/.*$)|(\/\*[\s\S]*?\*\/)|(\s))/mg,eh=/^function\s*[^\(]*\(\s*([^\)]*)\)/m;var Q=function(a,b,c){I.call(this,a,b,c);fh()};x(Q,I);v("ee.Element",Q);var gh=!1,fh=function(){gh||(N(Q,"Element","Element"),gh=!0)};Q.prototype.name=function(){return"Element"};
|
|
Q.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=Qg(c))a:{b=fb(c);var d=["properties"];if(ea(b)&&ea(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&&t(c.properties)&&(c=c.properties);if(Qg(c))for(g in d=this,c)b=c[g],d=M("Element.set",d,g,b);else if(c instanceof I&&bh("Element.setMulti"))d=M("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.");d=this;for(c=0;c<arguments.length;c+=2){var g=arguments[c];b=arguments[c+1];d=M("Element.set",d,g,b)}}return Kg(this,d)};Q.prototype.set=Q.prototype.set;var R=function(a){if(!(this instanceof R))return J(R,arguments);if(a instanceof R)return a;hh();if(q(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new R(a[0]);I.call(this,new L("Filter.and"),{filters:a})}else if(a instanceof I)I.call(this,a.f,a.o,a.w);else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);I.call(this,null,null)}};x(R,I);v("ee.Filter",R);
|
|
var ih=!1,hh=function(){ih||(N(R,"Filter","Filter"),ih=!0)},jh={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};R.prototype.Ga=function(){return M("Filter.not",this)};R.prototype.not=R.prototype.Ga;var kh=function(a,b){var c=P(kh,arguments);return M("Filter.equals",c.name,c.value)};R.eq=kh;var lh=function(a,b){var c=P(lh,arguments);return kh(c.name,c.value).Ga()};R.neq=lh;
|
|
var mh=function(a,b){var c=P(mh,arguments);return M("Filter.lessThan",c.name,c.value)};R.lt=mh;var nh=function(a,b){var c=P(nh,arguments);return mh(c.name,c.value).Ga()};R.gte=nh;var oh=function(a,b){var c=P(oh,arguments);return M("Filter.greaterThan",c.name,c.value)};R.gt=oh;var ph=function(a,b){var c=P(ph,arguments);return oh(c.name,c.value).Ga()};R.lte=ph;var qh=function(a){return M("Filter.and",Array.prototype.slice.call(arguments))};R.and=qh;var rh=function(a){return M("Filter.or",Array.prototype.slice.call(arguments))};
|
|
R.or=rh;var sh=function(a,b){var c=P(sh,arguments),c=M("DateRange",c.start,c.end);return Wg("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};R.date=sh;var th=function(a,b,c,d){var e=P(th,arguments);return Wg("Filter.listContains",{leftField:e.rightField,rightValue:e.leftValue,rightField:e.leftField,leftValue:e.rightValue})};R.inList=th;var uh=function(a,b){return Wg("Filter.intersects",{leftField:".all",rightValue:M("Feature",a),maxError:b})};R.bounds=uh;
|
|
R.prototype.name=function(){return"Filter"};var vh=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in jh))throw Error("Unknown filtering operator: "+b);a=M("Filter."+jh[b],a,c);return d?a.Ga():a};R.metadata=vh;var S=function(a,b,c){Q.call(this,a,b,c);wh()};x(S,Q);v("ee.Collection",S);var xh=!1,wh=function(){xh||(N(S,"Collection","Collection"),N(S,"AggregateFeatureCollection","Collection","aggregate_"),xh=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return Kg(this,M("Collection.filter",this,a))};S.prototype.filter=S.prototype.filter;S.prototype.nc=function(a,b,c){var d=P(S.prototype.nc,arguments);return this.filter(vh(d.name,d.operator,d.value))};S.prototype.filterMetadata=S.prototype.nc;
|
|
S.prototype.jd=function(a){return this.filter(uh(a))};S.prototype.filterBounds=S.prototype.jd;S.prototype.mc=function(a,b){var c=P(S.prototype.mc,arguments);return this.filter(sh(c.start,c.end))};S.prototype.filterDate=S.prototype.mc;S.prototype.limit=function(a,b,c){var d=P(S.prototype.limit,arguments);return Kg(this,M("Collection.limit",this,d.max,d.property,d.ascending))};S.prototype.limit=S.prototype.limit;
|
|
S.prototype.sort=function(a,b){var c=P(S.prototype.sort,arguments);return Kg(this,M("Collection.limit",this,void 0,c.property,c.ascending))};S.prototype.sort=S.prototype.sort;S.prototype.name=function(){return"Collection"};S.prototype.elementType=function(){return Q};S.prototype.map=function(a,b){var c=this.elementType();return Kg(this,M("Collection.map",this,function(b){return a(new c(b))},b))};S.prototype.map=S.prototype.map;
|
|
S.prototype.td=function(a,b){b=m(b)?b:null;var c=this.elementType();return M("Collection.iterate",this,function(b,e){return a(new c(b),e)},b)};S.prototype.iterate=S.prototype.td;var yh=function(a){if(!(this instanceof yh))return J(yh,arguments);if(a instanceof yh)return a;zh();if(p(a))I.call(this,null,null),this.Bc=a;else if(a instanceof I)I.call(this,a.f,a.o,a.w),this.Bc=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};x(yh,I);v("ee.Number",yh);var Ah=!1,zh=function(){Ah||(N(yh,"Number","Number"),Ah=!0)};yh.prototype.encode=function(a){return p(this.Bc)?this.Bc:yh.j.encode.call(this,a)};yh.prototype.name=function(){return"Number"};var Bh=function(a){if(!(this instanceof Bh))return J(Bh,arguments);if(a instanceof Bh)return a;Ch();if(n(a))I.call(this,null,null),this.Kc=a;else if(a instanceof I)this.Kc=null,a.f&&"String"==a.f.F().returns?I.call(this,a.f,a.o,a.w):I.call(this,new L("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};x(Bh,I);v("ee.String",Bh);var Dh=!1,Ch=function(){Dh||(N(Bh,"String","String"),Dh=!0)};
|
|
Bh.prototype.encode=function(a){return n(this.Kc)?this.Kc:Bh.j.encode.call(this,a)};Bh.prototype.name=function(){return"String"};var Eh=function(a,b){if(!(this instanceof Eh))return J(Eh,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var f=d[e],g=f.type;c.push(Fh(g in Lg?Lg[g]:null,f.name))}if(!m(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.ma=Gh(a,c,b);this.Td=b.apply(null,c)};x(Eh,K);v("ee.CustomFunction",Eh);Eh.prototype.encode=function(a){return{type:"Function",argumentNames:Ka(this.ma.args,function(a){return a.name}),body:a(this.Td)}};Eh.prototype.F=function(){return this.ma};
|
|
var Fh=function(a,b){a=a||Object;if(!(a.prototype instanceof I))if(a&&a!=Object)if(a==String)a=Bh;else if(a==Number)a=yh;else if(a==Array)a=k.ee.List;else throw Error("Variables must be of an EE type, e.g. ee.Image or ee.Number.");else a=I;var c=function(){};c.prototype=a.prototype;a=new c;a.f=null;a.o=null;a.w=b;return a},Hh=function(a,b){b=Ka(b,function(a){return{name:null,type:n(a)?a:Mg(a)}});b={name:"",returns:n("Object")?"Object":Mg("Object"),args:b};return new Eh(b,a)},Gh=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(a){var b=0;t(a)&&!r(a)&&("Function"==a.type&&b++,bb(a,function(a){b+=f(a)}));return b},e=Hg(c.apply(null,b));c="_MAPPING_VAR_"+f(e)+"_";for(e=0;e<d.length;e++){var g=d[e],l=c+e;b[g].w=l;a.args[g].name=l}return a};var Ih=function(a,b){if(!(this instanceof Ih))return J(Ih,arguments);if(a instanceof Ih)return a;Jh();var c=P(Ih,arguments);a=c.date;var c=c.tz,d=new L("Date"),e={},f=null;if(Pg(a)){if(e.value=a,c)if(Pg(c))e.timeZone=c;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+c);}else if(Og(a))e.value=a;else if(t(a)&&"function"==typeof a.getFullYear)e.value=Math.floor(a.getTime());else if(a instanceof I)a.f&&"Date"==a.f.F().returns?(d=a.f,e=a.o,f=a.w):e.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);I.call(this,d,e,f)};x(Ih,I);v("ee.Date",Ih);var Kh=!1,Jh=function(){Kh||(N(Ih,"Date","Date"),Kh=!0)};Ih.prototype.name=function(){return"Date"};var T=function(a,b,c,d){if(!(this instanceof T))return J(T,arguments);if(!("type"in a)){var e=P(T,arguments);a=e.geoJson;b=e.proj;c=e.geodesic;d=e.evenOdd}Lh();e=null!=b||null!=c||null!=d;if(a instanceof I&&!(a instanceof T&&a.Sb)){if(e)throw Error("Setting the CRS, geodesic, or evenOdd flag on a computed Geometry is not supported. Use Geometry.transform().");I.call(this,a.f,a.o,a.w)}else{a instanceof T&&(a=a.encode());if(!Mh(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));I.call(this,
|
|
null,null);this.Sb=a.type;this.Yd=null!=a.coordinates?lb(a.coordinates):null;this.be=a.geometries||null;if(null!=b)this.Fc=b;else if("crs"in a)if(t(a.crs)&&"name"==a.crs.type&&t(a.crs.properties)&&n(a.crs.properties.name))this.Fc=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new wd).v(a.crs));this.sb=c;!m(this.sb)&&"geodesic"in a&&(this.sb=!!a.geodesic);this.rb=d;!m(this.rb)&&"evenOdd"in a&&(this.rb=!!a.evenOdd)}};x(T,I);v("ee.Geometry",T);
|
|
var Nh=!1,Lh=function(){Nh||(N(T,"Geometry","Geometry"),Nh=!0)},Oh=function(a,b){if(!(this instanceof Oh))return Ph(Oh,arguments);var c=Qh(Oh,"Point",1,arguments);if(!(c instanceof I)){var d=c.coordinates;if(!q(d)||2!=d.length)throw Error("The Geometry.Point constructor requires 2 coordinates.");}T.call(this,c)};x(Oh,T);T.Point=Oh;var Rh=function(a,b){if(!(this instanceof Rh))return Ph(Rh,arguments);T.call(this,Qh(Rh,"MultiPoint",2,arguments))};x(Rh,T);T.MultiPoint=Rh;
|
|
var Sh=function(a,b,c,d){if(!(this instanceof Sh))return Ph(Sh,arguments);var e=Qh(Sh,"Rectangle",2,arguments);if(!(e instanceof I)){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],l=f[0][1],w=f[1][0],f=f[1][1];e.coordinates=[[[g,f],[g,l],[w,l],[w,f]]];e.type="Polygon"}T.call(this,e)};x(Sh,T);T.Rectangle=Sh;
|
|
var Th=function(a,b,c,d){if(!(this instanceof Th))return Ph(Th,arguments);T.call(this,Qh(Th,"LineString",2,arguments))};x(Th,T);T.LineString=Th;var Uh=function(a,b,c,d){if(!(this instanceof Uh))return Ph(Uh,arguments);T.call(this,Qh(Uh,"LinearRing",2,arguments))};x(Uh,T);T.LinearRing=Uh;var Vh=function(a,b,c,d){if(!(this instanceof Vh))return Ph(Vh,arguments);T.call(this,Qh(Vh,"MultiLineString",3,arguments))};x(Vh,T);T.MultiLineString=Vh;
|
|
var Wh=function(a,b,c,d,e){if(!(this instanceof Wh))return Ph(Wh,arguments);T.call(this,Qh(Wh,"Polygon",3,arguments))};x(Wh,T);T.Polygon=Wh;var Xh=function(a,b,c,d,e){if(!(this instanceof Xh))return Ph(Xh,arguments);T.call(this,Qh(Xh,"MultiPolygon",4,arguments))};x(Xh,T);T.MultiPolygon=Xh;
|
|
T.prototype.encode=function(a){if(!this.Sb){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return I.prototype.encode.call(this,a)}a={type:this.Sb};"GeometryCollection"==this.Sb?a.geometries=this.be:a.coordinates=this.Yd;null!=this.Fc&&(a.crs={type:"name",properties:{name:this.Fc}});null!=this.sb&&(a.geodesic=this.sb);null!=this.rb&&(a.evenOdd=this.rb);return a};
|
|
T.prototype.Pc=function(){if(this.f)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};T.prototype.toGeoJSON=T.prototype.Pc;T.prototype.Qc=function(){if(this.f)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new wd).v(this.Pc())};T.prototype.toGeoJSONString=T.prototype.Qc;T.prototype.v=function(){return Ig(this)};T.prototype.serialize=T.prototype.v;
|
|
T.prototype.toString=function(){return"ee.Geometry("+this.Qc()+")"};
|
|
var Mh=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!q(b))return!1;for(a=0;a<b.length;a++)if(!Mh(b[a]))return!1;return!0}a=a.coordinates;var c=Yh(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)},Yh=function(a){if(!q(a))return-1;if(q(a[0])){for(var b=Yh(a[0]),c=1;c<a.length;c++)if(Yh(a[c])!=b)return-1;return b+
|
|
1}for(c=0;c<a.length;c++)if(!p(a[c]))return-1;return 0==a.length%2?1:-1},Qh=function(a,b,c,d){Ma(d,Og)?a={coordinates:Ua(d)}:(a=P(a,d),a.coordinates=a.coords,delete a.coords,a.crs=a.proj,delete a.proj,a=cb(a,da));if(Zh(a.coordinates)||null!=a.crs||null!=a.maxError)return(new L("GeometryConstructors."+b)).apply(a);a.type=b;d=a.coordinates;if(1>c||4<c)throw Error("Unexpected nesting level.");if(Ma(d,p)&&p(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;q(e);)e=e[0],f++;for(;f<c;)d=[d],f++;if(Yh(d)!=c)throw Error("Invalid geometry");for(e=d;q(e)&&1==e.length;)e=e[0];c=q(e)&&0==e.length?[]:d;a.coordinates=c;(b=0<=Fa(["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},Zh=function(a){return q(a)?La(a,Zh):a instanceof I},Ph=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"};v("ee.Deserializer",function(){});var ai=function(a){return $h(vd(a))};v("ee.Deserializer.fromJSON",ai);var $h=function(a){var b={};if(t(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]=bi(f,b)}a=a.value}return bi(a,b)};v("ee.Deserializer.decode",$h);
|
|
var bi=function(a,b){if(null===a||p(a)||"boolean"==typeof a||n(a))return a;if(q(a))return Ka(a,function(a){return bi(a,b)});if(!t(a)||r(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(!n(c))throw Error("Invalid variable name: "+c);return Fh(Object,c);case "Date":c=a.value;if(!p(c))throw Error("Invalid date value: "+c);return new Ih(c/1E3);case "Bytes":return c=new zg,
|
|
c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?Vg(a.functionName):bi(a["function"],b),d=db(a.arguments,function(a){return bi(a,b)});if(c instanceof K)return c.apply(d);if(c instanceof I)return new I(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return db(a.value,function(a){return bi(a,b)});case "Function":var e=bi(a.body,b),c={name:"",args:Ka(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};return new Eh(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 ci=function(a){if(!(this instanceof ci))return J(ci,arguments);if(a instanceof ci)return a;di();Qg(a)?(I.call(this,null,null),this.ic=a):(a instanceof I&&a.f&&"Dictionary"==a.f.F().returns?I.call(this,a.f,a.o,a.w):I.call(this,new L("Dictionary"),{input:a},null),this.ic=null)};x(ci,I);v("ee.Dictionary",ci);var ei=!1,di=function(){ei||(N(ci,"Dictionary","Dictionary"),ei=!0)};ci.prototype.encode=function(a){return null===this.ic?ci.j.encode.call(this,a):a(this.ic)};ci.prototype.name=function(){return"Dictionary"};var U=function(a,b){if(!(this instanceof U))return J(U,arguments);if(a instanceof U){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)");fi();if(a instanceof T||null===a)Q.call(this,new L("Feature"),{geometry:a,metadata:b||null});else if(a instanceof I)Q.call(this,a.f,a.o,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=kb(c);c["system:index"]=a.id}Q.call(this,new L("Feature"),{geometry:new T(a.geometry),metadata:c})}else Q.call(this,new L("Feature"),{geometry:new T(a),metadata:b||null})};x(U,Q);v("ee.Feature",U);var gi=!1,fi=function(){gi||(N(U,"Feature","Feature"),gi=!0)};U.prototype.getInfo=U.prototype.X;U.prototype.getMap=function(a,b){var c=P(U.prototype.getMap,arguments);return M("Collection",[this]).getMap(c.visParams,c.callback)};
|
|
U.prototype.getMap=U.prototype.getMap;U.prototype.name=function(){return"Feature"};var hi=function(a){if(this instanceof hi){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof hi)return a}else return J(hi,arguments);ii();if(q(a))I.call(this,null,null),this.Ac=a;else if(a instanceof I)I.call(this,a.f,a.o,a.w),this.Ac=null;else throw Error("Invalid argument specified for ee.List(): "+a);};x(hi,I);v("ee.List",hi);var ji=!1,ii=function(){ji||(N(hi,"List","List"),ji=!0)};
|
|
hi.prototype.encode=function(a){return q(this.Ac)?Ka(this.Ac,function(b){return a(b)}):hi.j.encode.call(this,a)};hi.prototype.name=function(){return"List"};var V=function(a,b){if(!(this instanceof V))return J(V,arguments);if(a instanceof V)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");ki();a instanceof T&&(a=new U(a));a instanceof U&&(a=[a]);if(Og(a)||Pg(a)){var c={tableId:a};b&&(c.geometryColumn=b);S.call(this,new L("Collection.loadTable"),c)}else if(q(a))S.call(this,new L("Collection"),{features:Ka(a,function(a){return new U(a)})});else if(a instanceof hi)S.call(this,
|
|
new L("Collection"),{features:a});else if(a instanceof I)S.call(this,a.f,a.o,a.w);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};x(V,S);v("ee.FeatureCollection",V);var li=!1,ki=function(){li||(N(V,"FeatureCollection","FeatureCollection"),li=!0)};V.prototype.getMap=function(a,b){var c=P(V.prototype.getMap,arguments),d=Wg("Collection.draw",{collection:this,color:(c.visParams||{}).color||"000000"});if(c.callback)d.getMap(null,c.callback);else return d.getMap()};
|
|
V.prototype.getMap=V.prototype.getMap;V.prototype.getInfo=V.prototype.X;V.prototype.sa=function(a,b,c,d){var e=P(V.prototype.sa,arguments),f={};f.table=this.v();e.format&&(f.format=e.format.toUpperCase());e.filename&&(f.filename=e.filename);if(e.selectors){var g=e.selectors;ea(g)&&(g=g.join(","));f.selectors=g}if(e.callback)Nf(f,function(a,b){a?e.callback(Of(a)):e.callback(null,b)});else return Of(Nf(f))};V.prototype.getDownloadURL=V.prototype.sa;
|
|
V.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};V.prototype.select=V.prototype.select;V.prototype.name=function(){return"FeatureCollection"};V.prototype.elementType=function(){return U};var W=function(a){if(!(this instanceof W))return J(W,arguments);if(a instanceof W)return a;mi();var b=arguments.length;if(0==b||1==b&&!m(a))Q.call(this,new L("Image.mask"),{image:new W(0),mask:new W(0)});else if(1==b)if(Og(a))Q.call(this,new L("Image.constant"),{value:a});else if(Pg(a))Q.call(this,new L("Image.load"),{id:a});else{if(q(a))return ni(Ka(a,function(a){return new W(a)}));if(a instanceof I)"Array"==a.name()?Q.call(this,new L("Image.constant"),{value:a}):Q.call(this,a.f,a.o,a.w);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(Pg(b)&&Og(c))Q.call(this,new L("Image.load"),{id:b,version:c});else throw Error("Unrecognized argument types to convert to an Image: "+arguments);}else throw Error("The Image constructor takes at most 2 arguments ("+b+" given)");};x(W,Q);v("ee.Image",W);var oi=!1,mi=function(){oi||(N(W,"Image","Image"),N(W,"Window","Image","focal_"),oi=!0)};W.prototype.getInfo=W.prototype.X;
|
|
W.prototype.getMap=function(a,b){var c=P(W.prototype.getMap,arguments),d=c.visParams?kb(c.visParams):{};d.image=this.v();if(c.callback)Gf(d,u(function(a,b){a&&(a.image=this);c.callback(a,b)},this));else return d=Gf(d),d.image=this,d};W.prototype.getMap=W.prototype.getMap;W.prototype.sa=function(a,b){var c=P(W.prototype.sa,arguments),d=c.params?kb(c.params):{};d.image=this.v();if(c.callback){var e=c.callback;Lf(d,function(a,b){a?e(Mf(a)):e(null,b)})}else return Mf(Lf(d))};
|
|
W.prototype.getDownloadURL=W.prototype.sa;W.prototype.rc=function(a,b){var c=P(W.prototype.rc,arguments),d=c.params?kb(c.params):{};d.image=this.v();if(d.region)if(q(d.region)||Qg(d.region))d.region=xd(d.region);else if(!n(d.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(c.callback)Jf(d,function(a,b){var d="";if(!m(b))try{d=Kf(a)}catch(l){b=String(l.message)}c.callback(d,b)});else return Kf(Jf(d))};W.prototype.getThumbURL=W.prototype.rc;
|
|
var pi=function(a,b,c){var d=P(pi,arguments);return ni([d.r,d.g,d.b],["vis-red","vis-green","vis-blue"])};W.rgb=pi;var qi=function(a){return ni(Array.prototype.slice.call(arguments),null)};W.cat=qi;var ni=function(a,b){if(0==a.length)return M("Image.constant",[]);for(var c=new W(a[0]),d=1;d<a.length;d++)c=M("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
W.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||Pg(b[0])||Og(b[0])){for(var d=0;d<b.length;d++)if(!(Pg(b[d])||Og(b[d])||b[d]instanceof I))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return Wg("Image.select",c)};W.prototype.select=W.prototype.select;
|
|
W.prototype.lc=function(a,b){var c=P(W.prototype.lc,arguments),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(c.map){var f=c.map,g;for(g in f)d.push(g),e[g]=new W(f[g])}var l=M("Image.parseExpression",c.expression,"DEFAULT_EXPRESSION_IMAGE",d),c=new K;c.encode=function(a){return l.encode(a)};c.F=function(){return{name:"",args:Ka(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return c.apply(e)};W.prototype.expression=W.prototype.lc;
|
|
W.prototype.clip=function(a){try{a=new T(a)}catch(b){}return M("Image.clip",this,a)};W.prototype.clip=W.prototype.clip;W.prototype.Gd=function(a){var b=1!=arguments.length||Pg(arguments[0])?Ua(arguments):arguments[0];return M("Image.rename",this,b)};W.prototype.rename=W.prototype.Gd;W.prototype.name=function(){return"Image"};var X=function(a){if(!(this instanceof X))return J(X,arguments);if(a instanceof X)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");ri();a instanceof W&&(a=[a]);if(Pg(a))S.call(this,new L("ImageCollection.load"),{id:a});else if(q(a))S.call(this,new L("ImageCollection.fromImages"),{images:Ka(a,function(a){return new W(a)})});else if(a instanceof hi)S.call(this,new L("ImageCollection.fromImages"),{images:a});else if(a instanceof
|
|
I)S.call(this,a.f,a.o,a.w);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+a);};x(X,S);v("ee.ImageCollection",X);var si=!1,ri=function(){si||(N(X,"ImageCollection","ImageCollection"),N(X,"reduce","ImageCollection"),si=!0)};X.prototype.getMap=function(a,b){var c=P(X.prototype.getMap,arguments),d=M("ImageCollection.mosaic",this);if(c.callback)d.getMap(c.visParams,c.callback);else return d.getMap(c.visParams)};X.prototype.getMap=X.prototype.getMap;
|
|
X.prototype.getInfo=X.prototype.X;X.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};X.prototype.select=X.prototype.select;X.prototype.name=function(){return"ImageCollection"};X.prototype.elementType=function(){return W};var ti={};v("ee.Terrain",ti);ti.vc=!1;ti.ge=function(){ti.vc||(N(ti,"Terrain","Terrain"),ti.vc=!0)};ti.reset=function(){O(ti);ti.vc=!1};var zi=function(a,b,c,d,e){if("ready"!=ui||a||b){var f=null!=c;if(d)if(f)vi.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==ui&&f)wi.push(c);else if(ui="loading",zf(a,b,e),f)wi.push(c),Zg(xi,yi);else try{Zg(),xi()}catch(g){throw yi(g),g;}}else c&&c()};v("ee.initialize",zi);
|
|
var Di=function(){ui="not_ready";yf=xf=vf=null;wf=!1;Xg=null;Yg={};O(Ih);Kh=!1;O(ci);ei=!1;O(Q);gh=!1;O(W);oi=!1;O(U);gi=!1;O(S);xh=!1;O(X);si=!1;O(V);li=!1;O(R);ih=!1;O(T);Nh=!1;O(hi);ji=!1;O(yh);Ah=!1;O(Bh);Dh=!1;ti.reset();for(var a=k.ee,b=0;b<Ai.length;b++){var c=Ai[b];O(a[c]);delete a[c]}Ai=[];Lg=a;var a=Bi,d;for(d in a)delete a[d]};v("ee.reset",Di);var Ei={De:"not_ready",LOADING:"loading",Ee:"ready"};v("ee.InitState",Ei);v("ee.InitState.NOT_READY","not_ready");v("ee.InitState.LOADING","loading");
|
|
v("ee.InitState.READY","ready");var ui="not_ready",wi=[],vi=[];v("ee.TILE_SIZE",256);var Ai=[],Bi={};v("ee.Algorithms",Bi);var Fi=function(a,b){n(a)&&(a=new L(a));return K.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))};v("ee.call",Fi);var Gi=function(a,b){n(a)&&(a=new L(a));return a.apply(b)};v("ee.apply",Gi);
|
|
var xi=function(){if("loading"==ui){try{Jh();di();fh();mi();fi();wh();ri();ki();hh();Lh();ii();zh();Ch();ti.ge();var a=$g(),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=k.ee,g;for(g in b)g in c&&!(g in f)&&(f[g]=Hi(g),Ai.push(g),a[g]?(f[g].signature=a[g],f[g].signature.isConstructor=!0,Yg[g]=!0):f[g].signature={});Lg=f;Ii()}catch(l){yi(l);return}ui="ready";for(vi=[];0<wi.length;)wi.shift()()}},yi=function(a){if("loading"==
|
|
ui)for(ui="not_ready",wi=[];0<vi.length;)vi.shift()(a)},Ii=function(){var a=ah();fb(a).sort().forEach(function(b){var c=a[b],d=c.F();if(!d.hidden){b=b.split(".");var e=Bi;for(e.signature={};1<b.length;){var f=b[0];f in e||(e[f]={signature:{}});e=e[f];b=Wa(b,1)}f=function(a){return Ug(c,void 0,Array.prototype.slice.call(arguments,0))};f.signature=d;f.toString=u(c.toString,c);e[b[0]]=f}})},Hi=function(a){var b=function(b){var c=k.ee[a],e=Array.prototype.slice.call(arguments),f=1==e.length;if(f&&e[0]instanceof
|
|
c)return e[0];if(!(this instanceof c))return J(c,e);var c=bh(a),g=!(e[0]instanceof I),l=!1;c&&(f?g?l=!0:e[0].f!=c&&(l=!0):l=!0);if(l)I.call(this,c,Tg(c,Sg(c,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];I.call(this,e.f,e.o,e.w)}};x(b,I);b.prototype.name=function(){return a};N(b,a,a);return b},Rg=function(a,b){if(null===a)return null;if(m(a)){var c=k.ee;switch(b){case "Image":return new W(a);
|
|
case "Feature":return a instanceof S?M("Feature",M("Collection.geometry",a)):new U(a);case "Element":if(a instanceof Q)return a;if(a instanceof T)return new U(a);if(a instanceof I)return new Q(a.f,a.o,a.w);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof V?M("Collection.geometry",a):new T(a);case "FeatureCollection":case "Collection":return a instanceof S?a:new V(a);case "ImageCollection":return new X(a);case "Filter":return new R(a);case "Algorithm":if(n(a))return new L(a);
|
|
if(r(a)){b=a.length;for(var c=[],d=0;d<b;d++)c[d]="Object";return Hh(a,c)}if(a instanceof zg)return a;throw Error("Argument is not a function: "+a);case "String":return Pg(a)||a instanceof Bh||a instanceof I?new Bh(a):a;case "Dictionary":return Qg(a)?a:new ci(a);case "List":return new hi(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new yh(a);default:if(b in c){d=bh(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if(n(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 Ji=function(a,b,c){wg.call(this,a,b,c);this.tileSize=new google.maps.Size(256,256);this.ld=new Hd;this.kd=new Hd};x(Ji,wg);v("ee.FloatTileOverlay",Ji);Ji.prototype.getTile=function(a,b){var c=xg(this,a,b);b=[this.url,c].join("/")+"?token="+this.Pb;c=[c,this.na,this.Pb].join("/");this.pa.push(c);this.na+=1;var d=ke("DIV");Ki(this,b,a,c,d);Li(this);return d};
|
|
var Ki=function(a,b,c,d,e){var f=E();f.open("GET",b,!0);f.responseType="arraybuffer";f.onreadystatechange=u(function(){if(f.readyState===XMLHttpRequest.DONE&&200===f.status){var a=f.response;if(a)a=new Float32Array(a),this.ld.set(c,a),this.kd.set(c,e),Sa(this.pa,d),Li(this);else throw this.Nc.add(d),Error("Unable to request floating point array buffers.");}},a);f.send()},Li=function(a){a.dispatchEvent(new yg(a.pa.length))};Ji.prototype.c=function(){this.kd=this.ld=null;Ji.j.c.call(this)};var Y=function(){D.call(this);this.Qb=new Mi(0,60);this.La=new Hd};x(Y,D);v("ee.MapTileManager",Y);Y.wc=void 0;Y.nd=function(){return Y.wc?Y.wc:Y.wc=new Y};Y.prototype.send=function(a,b,c,d,e){if(this.La.get(a))throw Error("[ee.MapTileManager] ID in use");b=new Ni(a,b,d,u(this.Fd,this),m(e)?e:1);this.La.set(a,b);a=u(this.sc,this,b);this.Qb.Va(a,c);return b};Y.prototype.abort=function(a){if(a=this.La.get(a))a.Aa||(a.Aa=!0,a.ia=new B("abort")),this.Fd(a)};
|
|
Y.prototype.sc=function(a,b){if(a.C||a.Aa)Oi(this,b);else if(a.gb=b,b.setActive(!0),b=new ng,a.C=b,!Pi(a))throw Error("Cannot dispatch first request!");};Y.prototype.Fd=function(a){this.La.remove(a.getId());a.C&&(Oi(this,a.gb),a.C.T());a.tc&&a.tc(a.ia,a.Ed)};var Oi=function(a,b){b.setActive(!1);if(!hg(a.Qb,b))throw Error("Object not released");};Y.prototype.c=function(){Y.j.c.call(this);this.Qb.T();this.Qb=null;var a=this.La;Ia(a.s(),function(a){a.T()});a.clear();this.La=null};
|
|
var Ni=function(a,b,c,d,e){A.call(this);this.ca=a;this.Rc=b;this.ne=m(e)?e:1;this.tc=c;this.wa=d};x(Ni,A);h=Ni.prototype;h.Vc=0;h.Aa=!1;h.C=null;h.gb=null;h.ia=null;h.Ed=null;var Qi=["load","abort","error"];Ni.prototype.getId=function(){return this.ca};Ni.prototype.getUrl=function(){return this.Rc};Ni.prototype.de=function(a){if(this.Aa)this.wa&&this.wa(this);else switch(a.type){case "load":this.ia=a;this.wa&&this.wa(this);break;case "error":case "abort":Pi(this)||(this.ia=a,this.wa&&this.wa(this))}};
|
|
Ni.prototype.c=function(){Ni.j.c.call(this);delete this.tc;delete this.wa};var Pi=function(a){if(a.Vc>a.ne)return!1;a.Vc++;qg(a.C,a.ca);setTimeout(u(a.xe,a),0);return!0};
|
|
Ni.prototype.xe=function(){if(!this.Aa){var a=u(function(a){this.Aa||(pg(this.C,this.ca,a),$b(this.C,Qi,u(this.de,this)),this.C.start())},this),b=this.getUrl();if(af(b).Z.ha("profiling")){var c=new F;c.Ma="blob";c.Y("complete",u(function(){this.Ed=c.getResponseHeader("X-Earth-Engine-Computation-Profile")||null;if(200<=c.getStatus()&&300>c.getStatus())try{var d=URL.createObjectURL(ae(c))}catch(e){}a(d||b)},this));c.bb("ready",u(c.T,c));c.send(b,"GET")}else a(b)}};var Ri=function(){this.N=!1};
|
|
x(Ri,A);Ri.prototype.setActive=function(a){this.N=a};Ri.prototype.sd=function(){return this.N};var Mi=function(a,b){jg.call(this,a,b)};x(Mi,jg);Mi.prototype.gc=function(){return new Ri};Mi.prototype.nb=function(a){a.T()};Mi.prototype.Cc=function(a){return!a.U&&!a.sd()};var Z=function(a,b,c,d,e){wg.call(this,a,b,c);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.zb=m(d.zb)?d.zb:!0;this.name=d.name;this.Oc=new cg;this.Dc=1;this.J=e||null};x(Z,wg);v("ee.MapLayerOverlay",Z);Z.prototype.$b=function(a){return Tb(this,"tileevent",a)};Z.prototype.addTileCallback=Z.prototype.$b;Z.prototype.Gc=function(a){bc(a)};
|
|
Z.prototype.removeTileCallback=Z.prototype.Gc;Z.prototype.getTile=function(a,b,c){if(b<this.minZoom||0>a.y||a.y>=1<<b)return a=c.createElement("IMG"),a.style.width="0px",a.style.height="0px",a;b=xg(this,a,b);a=[this.url,b].join("/")+"?token="+this.Pb;this.J&&this.J.isEnabled()&&(a+="&profiling=1");b=[b,this.na,this.Pb].join("/");this.na+=1;c=ke("DIV",{id:b});var d=(new Date).getTime()/1E3;this.pa.push(b);Y.nd().send(b,a,d,u(this.ce,this,c,b));Li(this);return c};Z.prototype.qc=function(){return this.pa.length};
|
|
Z.prototype.releaseTile=function(a){Y.nd().abort(a.id);this.Oc.remove(m(a.firstElementChild)?a.firstElementChild:ne(a.firstChild));""!==a.id&&(this.Nc.remove(a.id),this.J&&this.J.ue(a.id))};Z.prototype.setOpacity=function(a){this.Dc=a;var b=this.Oc.za();td(b,function(b){qe(b,a)})};Z.prototype.getTile=Z.prototype.getTile;Z.prototype.setOpacity=Z.prototype.setOpacity;Z.prototype.releaseTile=Z.prototype.releaseTile;
|
|
Z.prototype.ce=function(a,b,c,d){"error"==c.type?(Sa(this.pa,b),this.Nc.add(b),this.dispatchEvent(c)):(Sa(this.pa,b),c.target&&"load"==c.type&&(c=c.target,this.Oc.add(c),1!=this.Dc&&qe(c,this.Dc),a.appendChild(c)),Li(this));this.J&&null!==d&&this.J.Rd(b,d)};var Si=function(a,b){if(!(this instanceof Si))return new Si(a,b);this.da=a;this.ma=b};x(Si,K);v("ee.SavedFunction",Si);Si.prototype.encode=function(a){return M("LoadAlgorithmById",this.da).encode(a)};Si.prototype.F=function(){return this.ma};(function(){var a={},b="ee.Collection.prototype.filterBounds ee.ComputedObject.prototype.evaluate ee.Filter.neq ee.Geometry.prototype.toGeoJSON ee.Filter.inList ee.Filter.lte ee.data.getMapId ee.data.getThumbId ee.Geometry.prototype.toGeoJSONString ee.Filter.eq ee.Filter.bounds ee.data.authenticate ee.Image ee.Dictionary ee.ImageCollection.prototype.getMap ee.data.clearAuthToken ee.data.authenticateViaPopup ee.Collection.prototype.map ee.apply ee.Image.prototype.rename ee.ImageCollection ee.data.makeThumbUrl ee.Feature.prototype.getInfo ee.Filter.lt ee.Feature.prototype.getMap ee.data.getValue ee.data.getAuthToken ee.ComputedObject.prototype.aside ee.Serializer.toReadableJSON ee.Collection.prototype.sort ee.data.getApiBaseUrl ee.Collection.prototype.filterDate ee.ApiFunction._call ee.data.getTileUrl ee.ApiFunction._apply ee.Filter.or ee.Filter.date ee.Filter.gt ee.data.getTableDownloadId ee.Deserializer.decode ee.data.setAuthToken ee.Image.prototype.getMap ee.Filter.gte ee.Image.cat ee.Feature ee.Image.prototype.getThumbURL ee.Serializer.toJSON ee.Filter.prototype.not ee.data.makeDownloadUrl ee.data.setAuthTokenRefresher ee.Image.prototype.getInfo ee.FeatureCollection.prototype.select ee.data.getDownloadId ee.Geometry.LineString ee.FeatureCollection ee.data.getAuthClientId ee.initialize ee.data.getList ee.Collection.prototype.iterate ee.Geometry.MultiPoint ee.Element.prototype.set ee.Geometry.LinearRing ee.data.getTileBaseUrl ee.Image.prototype.clip ee.call ee.Number ee.InitState ee.Date ee.List ee.Geometry.prototype.serialize ee.Filter ee.Geometry ee.Geometry.MultiPolygon ee.Geometry.Rectangle ee.String ee.Geometry.Polygon ee.FeatureCollection.prototype.getInfo ee.Image.prototype.select ee.ApiFunction.lookup ee.data.getXsrfToken ee.Image.prototype.getDownloadURL ee.Function.prototype.apply ee.ImageCollection.prototype.getInfo ee.Image.rgb ee.Serializer.encode ee.FeatureCollection.prototype.getMap ee.Collection.prototype.filterMetadata ee.Algorithms ee.ComputedObject.prototype.getInfo ee.Collection.prototype.filter ee.Image.prototype.expression ee.Filter.metadata ee.FeatureCollection.prototype.getDownloadURL ee.data.getAuthScopes ee.data.setDeadline ee.Terrain ee.ComputedObject.prototype.serialize ee.data.getInfo ee.reset ee.data.makeTableDownloadUrl ee.Geometry.MultiLineString ee.Collection.prototype.limit ee.TILE_SIZE ee.Geometry.Point ee.Function.prototype.call ee.Filter.and ee.Deserializer.fromJSON ee.ImageCollection.prototype.select".split(" "),
|
|
c=[["geometry"],["callback"],["name","value"],[],["opt_leftField","opt_rightValue","opt_rightField","opt_leftValue"],["name","value"],["params","opt_callback"],["params","opt_callback"],[],["name","value"],["geometry","opt_errorMargin"],["clientId","success","opt_error","opt_extraScopes","opt_onImmediateFailed"],["opt_args"],["opt_dict"],["opt_visParams","opt_callback"],[],["opt_success","opt_error"],["algorithm","opt_dropNulls"],["func","namedArgs"],["var_args"],["args"],["id"],["opt_callback"],
|
|
["name","value"],["opt_visParams","opt_callback"],["params","opt_callback"],[],["func","var_args"],["obj"],["property","opt_ascending"],[],["start","opt_end"],["name","var_args"],["mapid","x","y","z"],["name","namedArgs"],["var_args"],["start","opt_end"],["name","value"],["params","opt_callback"],["json"],"clientId tokenType accessToken expiresIn opt_extraScopes opt_callback opt_updateAuthLibrary".split(" "),["opt_visParams","opt_callback"],["name","value"],["var_args"],["geometry","opt_properties"],
|
|
["params","opt_callback"],["obj"],[],["id"],["refresher"],["opt_callback"],["selectors","opt_names"],["params","opt_callback"],["coords","opt_proj","opt_geodesic","opt_maxError"],["args","opt_column"],[],["opt_baseurl","opt_tileurl","opt_successCallback","opt_errorCallback","opt_xsrfToken"],["params","opt_callback"],["algorithm","opt_first"],["coords","opt_proj"],["var_args"],["coords","opt_proj","opt_geodesic","opt_maxError"],[],["geometry"],["func","var_args"],["number"],[],["date","opt_tz"],["list"],
|
|
[],["opt_filter"],["geoJson","opt_proj","opt_geodesic","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["coords","opt_proj","opt_geodesic","opt_evenOdd"],["string"],["coords","opt_proj","opt_geodesic","opt_maxError","opt_evenOdd"],["opt_callback"],["var_args"],["name"],[],["params","opt_callback"],["namedArgs"],["opt_callback"],["r","g","b"],["obj","opt_isCompound"],["opt_visParams","opt_callback"],["name","operator","value"],[],["opt_callback"],["newFilter"],["expression",
|
|
"opt_map"],["name","operator","value"],["opt_format","opt_selectors","opt_filename","opt_callback"],[],["milliseconds"],[],[],["id","opt_callback"],[],["id"],["coords","opt_proj","opt_geodesic","opt_maxError"],["max","opt_property","opt_ascending"],[],["coords","opt_proj"],["var_args"],["var_args"],["json"],["selectors","opt_names"]];[S.prototype.jd,I.prototype.evaluate,lh,T.prototype.Pc,th,ph,Gf,Jf,T.prototype.Qc,kh,uh,lf,W,ci,X.prototype.getMap,rf,kf,S.prototype.map,Gi,W.prototype.Gd,X,Kf,U.prototype.X,
|
|
mh,U.prototype.getMap,If,sf,I.prototype.Uc,Jg,S.prototype.sort,Df,S.prototype.mc,M,Hf,Wg,rh,sh,oh,Nf,$h,nf,W.prototype.getMap,nh,qi,U,W.prototype.rc,Ig,R.prototype.Ga,Mf,pf,W.prototype.X,V.prototype.select,Lf,Th,V,tf,zi,Uf,S.prototype.td,Rh,Q.prototype.set,Uh,Ef,W.prototype.clip,Fi,yh,Ei,Ih,hi,T.prototype.v,R,T,Xh,Sh,Bh,Wh,V.prototype.X,W.prototype.select,Vg,Ff,W.prototype.sa,K.prototype.apply,X.prototype.X,pi,Hg,V.prototype.getMap,S.prototype.nc,Bi,I.prototype.X,S.prototype.filter,W.prototype.lc,
|
|
vh,V.prototype.sa,uf,Bf,ti,I.prototype.v,Tf,Di,Of,Vh,S.prototype.limit,256,Oh,K.prototype.call,qh,ai,X.prototype.select].forEach(function(d,e){d&&(a[d.toString()]={name:b[e],paramNames:c[e]})});k.EXPORTED_FN_INFO=a})();}).call(this);
|