mirror of
https://github.com/google/earthengine-api.git
synced 2025-12-08 19:26:12 +00:00
155 lines
80 KiB
JavaScript
155 lines
80 KiB
JavaScript
(function() {var h,aa=aa||{},k=this,l=function(a){return void 0!==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},n=function(a){return"array"==ca(a)},da=function(a){var b=ca(a);return"array"==b||"object"==b&&"number"==typeof a.length},p=function(a){return"string"==typeof a},ea=function(a){return"number"==typeof a},q=function(a){return"function"==ca(a)},r=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},fa="closure_uid_"+
|
|
(1E9*Math.random()>>>0),ga=0,ia=function(a,b,c){return a.call.apply(a.bind,arguments)},ja=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)}},t=function(a,b,c){t=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?ia:ja;return t.apply(null,arguments)},
|
|
ka=Date.now||function(){return+new Date},u=function(a,b){var c=a.split("."),d=k;c[0]in d||!d.execScript||d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&l(b)?d[e]=b:d=d[e]?d[e]:d[e]={}},v=function(a,b){function c(){}c.prototype=b.prototype;a.p=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.sc=function(a,c,g){for(var f=Array(arguments.length-2),m=2;m<arguments.length;m++)f[m-2]=arguments[m];return b.prototype[c].apply(a,f)}};
|
|
Function.prototype.bind=Function.prototype.bind||function(a,b){if(1<arguments.length){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,a);return t.apply(null,c)}return t(this,a)};var la=function(a,b){for(var c in a)b.call(void 0,a[c],c,a)},na=function(a){var b=ma,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},oa=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},qa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},ra=function(a,b){b in a&&delete a[b]},w=function(a){var b={},c;for(c in a)b[c]=a[c];return b},sa=function(a){var b=ca(a);if("object"==b||"array"==b){if(a.clone)return a.clone();
|
|
var b="array"==b?[]:{},c;for(c in a)b[c]=sa(a[c]);return b}return a},ta="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),ua=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 g=0;g<ta.length;g++)c=ta[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},va=function(a){var b=arguments.length;if(1==b&&n(arguments[0]))return va.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=
|
|
!0;return c};var x=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,x);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))};v(x,Error);x.prototype.name="CustomError";var wa=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")},xa=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},ya=function(a,b){return a<b?-1:a>b?1:0};var za=function(a,b){b.unshift(a);x.call(this,wa.apply(null,b));b.shift()};v(za,x);za.prototype.name="AssertionError";
|
|
var Aa=function(a,b,c,d){var e="Assertion failed";if(c)var e=e+(": "+c),g=d;else a&&(e+=": "+a,g=b);throw new za(""+e,g||[]);},y=function(a,b,c){a||Aa("",null,b,Array.prototype.slice.call(arguments,2));return a},Ba=function(a,b){throw new za("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Ca=function(a,b,c){q(a)||Aa("Expected function but got %s: %s.",[ca(a),a],b,Array.prototype.slice.call(arguments,2))};var z=Array.prototype,Da=z.indexOf?function(a,b,c){y(null!=a.length);return z.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(p(a))return p(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},Ea=z.forEach?function(a,b,c){y(null!=a.length);z.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},Fa=z.map?function(a,b,c){y(null!=a.length);return z.map.call(a,b,c)}:
|
|
function(a,b,c){for(var d=a.length,e=Array(d),g=p(a)?a.split(""):a,f=0;f<d;f++)f in g&&(e[f]=b.call(c,g[f],f,a));return e},Ga=z.some?function(a,b,c){y(null!=a.length);return z.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return!0;return!1},Ia=function(a){var b;a:{b=Ha;for(var c=a.length,d=p(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:p(a)?a.charAt(b):a[b]},Ja=function(a,b){var c=
|
|
Da(a,b),d;if(d=0<=c)y(null!=a.length),z.splice.call(a,c,1);return d},Ka=function(a){return z.concat.apply(z,arguments)},La=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(da(d)){var e=a.length||0,g=d.length||0;a.length=e+g;for(var f=0;f<g;f++)a[e+f]=d[f]}else a.push(d)}},Ma=function(a,b,c){y(null!=a.length);return 2>=arguments.length?z.slice.call(a,b):z.slice.call(a,b,c)},Na=function(a){for(var b={},c=0,d=0;d<a.length;){var e=a[d++],g=r(e)?"o"+(e[fa]||(e[fa]=++ga)):(typeof e).charAt(0)+
|
|
e;Object.prototype.hasOwnProperty.call(b,g)||(b[g]=!0,a[c++]=e)}a.length=c};var Oa=function(a){a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);},Pa=function(a){return eval("("+a+")")},Qa=function(a){this.qa=a};Qa.prototype.h=function(a){var b=[];Sa(this,a,b);return b.join("")};
|
|
var Sa=function(a,b,c){switch(typeof b){case "string":Ta(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(n(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],Sa(a,a.qa?a.qa.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),Ta(g,
|
|
c),c.push(":"),Sa(a,a.qa?a.qa.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}},Ua={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Va=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,Ta=function(a,b){b.push('"',a.replace(Va,function(a){if(a in Ua)return Ua[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return Ua[a]=
|
|
e+b.toString(16)}),'"')};va("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));var A;a:{var Wa=k.navigator;if(Wa){var Xa=Wa.userAgent;if(Xa){A=Xa;break a}}A=""};var Ya=function(){return-1!=A.indexOf("Edge")||-1!=A.indexOf("Trident")||-1!=A.indexOf("MSIE")};var Za=function(){return-1!=A.indexOf("Edge")};var $a=-1!=A.indexOf("Opera")||-1!=A.indexOf("OPR"),B=Ya(),ab=-1!=A.indexOf("Gecko")&&!(-1!=A.toLowerCase().indexOf("webkit")&&!Za())&&!(-1!=A.indexOf("Trident")||-1!=A.indexOf("MSIE"))&&!Za(),bb=-1!=A.toLowerCase().indexOf("webkit")&&!Za(),cb=function(){var a=A;if(ab)return/rv\:([^\);]+)(\)|;)/.exec(a);if(B&&Za())return/Edge\/([\d\.]+)/.exec(a);if(B)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(bb)return/WebKit\/(\S+)/.exec(a)},db=function(){var a=k.document;return a?a.documentMode:void 0},
|
|
eb=function(){if($a&&k.opera){var a=k.opera.version;return q(a)?a():a}var a="",b=cb();b&&(a=b?b[1]:"");return B&&!Za()&&(b=db(),b>parseFloat(a))?String(b):a}(),fb={},C=function(a){var b;if(!(b=fb[a])){b=0;for(var c=xa(String(eb)).split("."),d=xa(String(a)).split("."),e=Math.max(c.length,d.length),g=0;0==b&&g<e;g++){var f=c[g]||"",m=d[g]||"",K=RegExp("(\\d*)(\\D*)","g"),ha=RegExp("(\\d*)(\\D*)","g");do{var U=K.exec(f)||["","",""],Ra=ha.exec(m)||["","",""];if(0==U[0].length&&0==Ra[0].length)break;b=
|
|
ya(0==U[1].length?0:parseInt(U[1],10),0==Ra[1].length?0:parseInt(Ra[1],10))||ya(0==U[2].length,0==Ra[2].length)||ya(U[2],Ra[2])}while(0==b)}b=fb[a]=0<=b}return b},gb=k.document,hb=db(),ib=!gb||!B||!hb&&Za()?void 0:hb||("CSS1Compat"==gb.compatMode?parseInt(eb,10):5);!ab&&!B||B&&B&&(Za()||9<=ib)||ab&&C("1.9.1");B&&C("9");var kb=function(a,b){la(b,function(b,d){"style"==d?a.style.cssText=b:"class"==d?a.className=b:"for"==d?a.htmlFor=b:d in jb?a.setAttribute(jb[d],b):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,b):a[d]=b})},jb={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};var lb=function(a,b,c){this.Wb=c;this.Db=a;this.ic=b;this.na=0;this.ka=null};lb.prototype.get=function(){var a;0<this.na?(this.na--,a=this.ka,this.ka=a.next,a.next=null):a=this.Db();return a};lb.prototype.put=function(a){this.ic(a);this.na<this.Wb&&(this.na++,a.next=this.ka,this.ka=a)};var mb=function(a){k.setTimeout(function(){throw a;},0)},nb,ob=function(){var a=k.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&-1==A.indexOf("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=t(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&&!Ya()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(l(c.next)){c=c.next;var a=c.Za;c.Za=null;a()}};return function(a){d.next={Za: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 pb=function(){this.ya=this.H=null},rb=new lb(function(){return new qb},function(a){a.reset()},100);pb.prototype.add=function(a,b){var c=rb.get();c.set(a,b);this.ya?this.ya.next=c:(y(!this.H),this.H=c);this.ya=c};pb.prototype.remove=function(){var a=null;this.H&&(a=this.H,this.H=this.H.next,this.H||(this.ya=null),a.next=null);return a};var qb=function(){this.next=this.scope=this.Ja=null};qb.prototype.set=function(a,b){this.Ja=a;this.scope=b;this.next=null};
|
|
qb.prototype.reset=function(){this.next=this.scope=this.Ja=null};var wb=function(a,b){sb||tb();ub||(sb(),ub=!0);vb.add(a,b)},sb,tb=function(){if(k.Promise&&k.Promise.resolve){var a=k.Promise.resolve();sb=function(){a.then(xb)}}else sb=function(){var a=xb;!q(k.setImmediate)||k.Window&&k.Window.prototype&&k.Window.prototype.setImmediate==k.setImmediate?(nb||(nb=ob()),nb(a)):k.setImmediate(a)}},ub=!1,vb=new pb;[].push(function(){ub=!1;vb=new pb});var xb=function(){for(var a=null;a=vb.remove();){try{a.Ja.call(a.scope)}catch(b){mb(b)}rb.put(a)}ub=!1};var yb=function(a){a.prototype.then=a.prototype.then;a.prototype.$goog_Thenable=!0},zb=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var Db=function(a,b){this.l=0;this.w=void 0;this.I=this.u=this.e=null;this.ia=this.Ia=!1;if(a==Ab)Bb(this,2,b);else try{var c=this;a.call(b,function(a){Bb(c,2,a)},function(a){if(!(a instanceof Cb))try{if(a instanceof Error)throw a;throw Error("Promise rejected.");}catch(b){}Bb(c,3,a)})}catch(d){Bb(this,3,d)}},Eb=function(){this.next=this.context=this.aa=this.L=this.D=null;this.Ba=!1};Eb.prototype.reset=function(){this.context=this.aa=this.L=this.D=null;this.Ba=!1};
|
|
var Fb=new lb(function(){return new Eb},function(a){a.reset()},100),Gb=function(a,b,c){var d=Fb.get();d.L=a;d.aa=b;d.context=c;return d},Ab=function(){};Db.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 Hb(this,q(a)?a:null,q(b)?b:null,c)};yb(Db);
|
|
Db.prototype.cancel=function(a){0==this.l&&wb(function(){var b=new Cb(a);Ib(this,b)},this)};
|
|
var Ib=function(a,b){if(0==a.l)if(a.e){var c=a.e;if(c.u){for(var d=0,e=null,g=null,f=c.u;f&&(f.Ba||(d++,f.D==a&&(e=f),!(e&&1<d)));f=f.next)e||(g=f);e&&(0==c.l&&1==d?Ib(c,b):(g?(d=g,y(c.u),y(null!=d),d.next==c.I&&(c.I=d),d.next=d.next.next):Jb(c),Kb(c,e,3,b)))}a.e=null}else Bb(a,3,b)},Mb=function(a,b){a.u||2!=a.l&&3!=a.l||Lb(a);y(null!=b.L);a.I?a.I.next=b:a.u=b;a.I=b},Hb=function(a,b,c,d){var e=Gb(null,null,null);e.D=new Db(function(a,f){e.L=b?function(c){try{var e=b.call(d,c);a(e)}catch(ha){f(ha)}}:
|
|
a;e.aa=c?function(b){try{var e=c.call(d,b);!l(e)&&b instanceof Cb?f(b):a(e)}catch(ha){f(ha)}}:f});e.D.e=a;Mb(a,e);return e.D};Db.prototype.sb=function(a){y(1==this.l);this.l=0;Bb(this,2,a)};Db.prototype.tb=function(a){y(1==this.l);this.l=0;Bb(this,3,a)};
|
|
var Bb=function(a,b,c){if(0==a.l){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{if(zb(c)){a.l=1;b=c;c=a.sb;var d=a.tb;b instanceof Db?(null!=c&&Ca(c,"opt_onFulfilled should be a function."),null!=d&&Ca(d,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?"),Mb(b,Gb(c||ba,d||null,a))):b.then(c,d,a);return}if(r(c))try{if(d=c.then,q(d)){Nb(a,c,d);return}}catch(e){b=3,c=e}}a.w=c;a.l=b;a.e=null;Lb(a);3!=b||c instanceof Cb||
|
|
Ob(a,c)}},Nb=function(a,b,c){a.l=1;var d=!1,e=function(b){d||(d=!0,a.sb(b))},g=function(b){d||(d=!0,a.tb(b))};try{c.call(b,e,g)}catch(f){g(f)}},Lb=function(a){a.Ia||(a.Ia=!0,wb(a.Ib,a))},Jb=function(a){var b=null;a.u&&(b=a.u,a.u=b.next,b.next=null);a.u||(a.I=null);null!=b&&y(null!=b.L);return b};Db.prototype.Ib=function(){for(var a=null;a=Jb(this);)Kb(this,a,this.l,this.w);this.Ia=!1};
|
|
var Kb=function(a,b,c,d){b.D&&(b.D.e=null);if(2==c)b.L.call(b.context,d);else if(null!=b.aa){if(!b.Ba)for(;a&&a.ia;a=a.e)a.ia=!1;b.aa.call(b.context,d)}Fb.put(b)},Ob=function(a,b){a.ia=!0;wb(function(){a.ia&&Pb.call(null,b)})},Pb=mb,Cb=function(a){x.call(this,a)};v(Cb,x);Cb.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 Qb=function(a,b){this.ra=[];this.jb=a;this.ab=b||null;this.X=this.K=!1;this.w=void 0;this.Ua=this.Xa=this.Ca=!1;this.va=0;this.e=null;this.Da=0};Qb.prototype.cancel=function(a){if(this.K)this.w instanceof Qb&&this.w.cancel();else{if(this.e){var b=this.e;delete this.e;a?b.cancel(a):(b.Da--,0>=b.Da&&b.cancel())}this.jb?this.jb.call(this.ab,this):this.Ua=!0;this.K||Rb(this,new Sb)}};Qb.prototype.$a=function(a,b){this.Ca=!1;Tb(this,a,b)};
|
|
var Tb=function(a,b,c){a.K=!0;a.w=c;a.X=!b;Ub(a)},Wb=function(a){if(a.K){if(!a.Ua)throw new Vb;a.Ua=!1}},Rb=function(a,b){Wb(a);Xb(b);Tb(a,!1,b)},Xb=function(a){y(!(a instanceof Qb),"An execution sequence may not be initiated with a blocking Deferred.")},Yb=function(a,b,c){y(!a.Xa,"Blocking Deferreds can not be re-used");a.ra.push([b,c,void 0]);a.K&&Ub(a)};
|
|
Qb.prototype.then=function(a,b,c){var d,e,g=new Db(function(a,b){d=a;e=b});Yb(this,d,function(a){a instanceof Sb?g.cancel():e(a)});return g.then(a,b,c)};yb(Qb);
|
|
var Zb=function(a){return Ga(a.ra,function(a){return q(a[1])})},Ub=function(a){if(a.va&&a.K&&Zb(a)){var b=a.va,c=$b[b];c&&(k.clearTimeout(c.Y),delete $b[b]);a.va=0}a.e&&(a.e.Da--,delete a.e);for(var b=a.w,d=c=!1;a.ra.length&&!a.Ca;){var e=a.ra.shift(),g=e[0],f=e[1],e=e[2];if(g=a.X?f:g)try{var m=g.call(e||a.ab,b);l(m)&&(a.X=a.X&&(m==b||m instanceof Error),a.w=b=m);zb(b)&&(d=!0,a.Ca=!0)}catch(K){b=K,a.X=!0,Zb(a)||(c=!0)}}a.w=b;d&&(m=t(a.$a,a,!0),d=t(a.$a,a,!1),b instanceof Qb?(Yb(b,m,d),b.Xa=!0):b.then(m,
|
|
d));c&&(b=new ac(b),$b[b.Y]=b,a.va=b.Y)},Vb=function(){x.call(this)};v(Vb,x);Vb.prototype.message="Deferred has already fired";Vb.prototype.name="AlreadyCalledError";var Sb=function(){x.call(this)};v(Sb,x);Sb.prototype.message="Deferred was canceled";Sb.prototype.name="CanceledError";var ac=function(a){this.Y=k.setTimeout(t(this.kc,this),0);this.ha=a};ac.prototype.kc=function(){y($b[this.Y],"Cannot throw an error that is not scheduled.");delete $b[this.Y];throw this.ha;};var $b={};var fc=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={nb:d,ba:void 0},g=new Qb(bc,e),f=null,m=null!=b.timeout?b.timeout:5E3;0<m&&(f=window.setTimeout(function(){cc(d,!0);Rb(g,new dc(1,"Timeout reached for loading script "+a))},m),e.ba=f);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(cc(d,b.tc||!1,f),Wb(g),Xb(null),Tb(g,!0,null))};d.onerror=function(){cc(d,!0,f);Rb(g,new dc(0,"Error while loading script "+
|
|
a))};kb(d,{type:"text/javascript",charset:"UTF-8",src:a});ec(c).appendChild(d)},ec=function(a){var b=a.getElementsByTagName("HEAD");return b&&0!=b.length?b[0]:a.documentElement},bc=function(){if(this&&this.nb){var a=this.nb;a&&"SCRIPT"==a.tagName&&cc(a,!0,this.ba)}},cc=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)},dc=function(a,b){var c="Jsloader error (code #"+a+")";b&&
|
|
(c+=": "+b);x.call(this,c);this.code=a};v(dc,x);var gc=function(){this.U=this.U;this.oa=this.oa};gc.prototype.U=!1;gc.prototype.Fb=function(){this.U||(this.U=!0,this.T())};gc.prototype.T=function(){if(this.oa)for(;this.oa.length;)this.oa.shift()()};var hc=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.M=!1;this.mb=!0};hc.prototype.preventDefault=function(){this.defaultPrevented=!0;this.mb=!1};var ic=function(a){ic[" "](a);return a};ic[" "]=ba;var jc=!B||B&&(Za()||9<=ib),kc=B&&!C("9");!bb||C("528");ab&&C("1.9b")||B&&C("8")||$a&&C("9.5")||bb&&C("528");ab&&!C("8")||B&&C("9");var lc=function(a,b){hc.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.bb=this.state=null;if(a){var c=this.type=a.type;this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(ab){var e;a:{try{ic(d.nodeName);e=!0;break a}catch(g){}e=!1}e||(d=null)}}else"mouseover"==
|
|
c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.offsetX=bb||void 0!==a.offsetX?a.offsetX:a.layerX;this.offsetY=bb||void 0!==a.offsetY?a.offsetY:a.layerY;this.clientX=void 0!==a.clientX?a.clientX:a.pageX;this.clientY=void 0!==a.clientY?a.clientY:a.pageY;this.screenX=a.screenX||0;this.screenY=a.screenY||0;this.button=a.button;this.keyCode=a.keyCode||0;this.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.bb=a;a.defaultPrevented&&this.preventDefault()}};v(lc,hc);lc.prototype.preventDefault=function(){lc.p.preventDefault.call(this);var a=this.bb;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,kc)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var mc="closure_listenable_"+(1E6*Math.random()|0),nc=0;var oc=function(a,b,c,d,e){this.G=a;this.pa=null;this.src=b;this.type=c;this.fa=!!d;this.ja=e;this.key=++nc;this.N=this.ea=!1},pc=function(a){a.N=!0;a.G=null;a.pa=null;a.src=null;a.ja=null};var qc=function(a){this.src=a;this.k={};this.ca=0};qc.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.k[g];a||(a=this.k[g]=[],this.ca++);var f=rc(a,b,d,e);-1<f?(b=a[f],c||(b.ea=!1)):(b=new oc(b,this.src,g,!!d,e),b.ea=c,a.push(b));return b};qc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.k))return!1;var e=this.k[a];b=rc(e,b,c,d);return-1<b?(pc(e[b]),y(null!=e.length),z.splice.call(e,b,1),0==e.length&&(delete this.k[a],this.ca--),!0):!1};
|
|
var sc=function(a,b){var c=b.type;c in a.k&&Ja(a.k[c],b)&&(pc(b),0==a.k[c].length&&(delete a.k[c],a.ca--))};qc.prototype.hc=function(){var a=0,b;for(b in this.k){for(var c=this.k[b],d=0;d<c.length;d++)++a,pc(c[d]);delete this.k[b];this.ca--}};qc.prototype.Ma=function(a,b,c,d){a=this.k[a.toString()];var e=-1;a&&(e=rc(a,b,c,d));return-1<e?a[e]:null};var rc=function(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.N&&g.G==b&&g.fa==!!c&&g.ja==d)return e}return-1};var tc="closure_lm_"+(1E6*Math.random()|0),uc={},vc=0,wc=function(a,b,c,d,e){if(n(b))for(var g=0;g<b.length;g++)wc(a,b[g],c,d,e);else if(c=xc(c),a&&a[mc])a.ib(b,c,d,e);else{if(!b)throw Error("Invalid event type");var g=!!d,f=yc(a);f||(a[tc]=f=new qc(a));c=f.add(b,c,!1,d,e);c.pa||(d=zc(),c.pa=d,d.src=a,d.G=c,a.addEventListener?a.addEventListener(b.toString(),d,g):a.attachEvent(Ac(b.toString()),d),vc++)}},zc=function(){var a=Bc,b=jc?function(c){return a.call(b.src,b.G,c)}:function(c){c=a.call(b.src,
|
|
b.G,c);if(!c)return c};return b},Cc=function(a,b,c,d,e){if(n(b))for(var g=0;g<b.length;g++)Cc(a,b[g],c,d,e);else c=xc(c),a&&a[mc]?a.lc(b,c,d,e):a&&(a=yc(a))&&(b=a.Ma(b,c,!!d,e))&&Dc(b)},Dc=function(a){if(!ea(a)&&a&&!a.N){var b=a.src;if(b&&b[mc])sc(b.r,a);else{var c=a.type,d=a.pa;b.removeEventListener?b.removeEventListener(c,d,a.fa):b.detachEvent&&b.detachEvent(Ac(c),d);vc--;(c=yc(b))?(sc(c,a),0==c.ca&&(c.src=null,b[tc]=null)):pc(a)}}},Ac=function(a){return a in uc?uc[a]:uc[a]="on"+a},Fc=function(a,
|
|
b,c,d){var e=!0;if(a=yc(a))if(b=a.k[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var g=b[a];g&&g.fa==c&&!g.N&&(g=Ec(g,d),e=e&&!1!==g)}return e},Ec=function(a,b){var c=a.G,d=a.ja||a.src;a.ea&&Dc(a);return c.call(d,b)},Bc=function(a,b){if(a.N)return!0;if(!jc){var c;if(!(c=b))a:{c=["window","event"];for(var d=k,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new lc(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){a:{var g=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(f){g=
|
|
!0}if(g||void 0==e.returnValue)e.returnValue=!0}e=[];for(g=c.currentTarget;g;g=g.parentNode)e.push(g);for(var g=a.type,m=e.length-1;!c.M&&0<=m;m--){c.currentTarget=e[m];var K=Fc(e[m],g,!0,c),d=d&&K}for(m=0;!c.M&&m<e.length;m++)c.currentTarget=e[m],K=Fc(e[m],g,!1,c),d=d&&K}return d}return Ec(a,new lc(b,this))},yc=function(a){a=a[tc];return a instanceof qc?a:null},Gc="__closure_events_fn_"+(1E9*Math.random()>>>0),xc=function(a){y(a,"Listener can not be null.");if(q(a))return a;y(a.handleEvent,"An object listener must have handleEvent method.");
|
|
a[Gc]||(a[Gc]=function(b){return a.handleEvent(b)});return a[Gc]};var Hc=function(){gc.call(this);this.r=new qc(this);this.wb=this;this.Sa=null};v(Hc,gc);Hc.prototype[mc]=!0;h=Hc.prototype;h.addEventListener=function(a,b,c,d){wc(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){Cc(this,a,b,c,d)};
|
|
h.dispatchEvent=function(a){Ic(this);var b,c=this.Sa;if(c){b=[];for(var d=1;c;c=c.Sa)b.push(c),y(1E3>++d,"infinite loop")}c=this.wb;d=a.type||a;if(p(a))a=new hc(a,c);else if(a instanceof hc)a.target=a.target||c;else{var e=a;a=new hc(d,c);ua(a,e)}var e=!0,g;if(b)for(var f=b.length-1;!a.M&&0<=f;f--)g=a.currentTarget=b[f],e=Jc(g,d,!0,a)&&e;a.M||(g=a.currentTarget=c,e=Jc(g,d,!0,a)&&e,a.M||(e=Jc(g,d,!1,a)&&e));if(b)for(f=0;!a.M&&f<b.length;f++)g=a.currentTarget=b[f],e=Jc(g,d,!1,a)&&e;return e};
|
|
h.T=function(){Hc.p.T.call(this);this.r&&this.r.hc();this.Sa=null};h.ib=function(a,b,c,d){Ic(this);this.r.add(String(a),b,!1,c,d)};h.Xb=function(a){this.r.add("ready",a,!0,void 0,void 0)};h.lc=function(a,b,c,d){this.r.remove(String(a),b,c,d)};var Jc=function(a,b,c,d){b=a.r.k[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,g=0;g<b.length;++g){var f=b[g];if(f&&!f.N&&f.fa==c){var m=f.G,K=f.ja||f.src;f.ea&&sc(a.r,f);e=!1!==m.call(K,d)&&e}}return e&&0!=d.mb};
|
|
Hc.prototype.Ma=function(a,b,c,d){return this.r.Ma(String(a),b,c,d)};var Ic=function(a){y(a.r,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var Kc="StopIteration"in k?k.StopIteration:Error("StopIteration"),Lc=function(){};Lc.prototype.next=function(){throw Kc;};Lc.prototype.vb=function(){return this};var Mc=function(a,b){this.s={};this.i=[];this.xa=this.j=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.xb(a)};Mc.prototype.v=function(){Nc(this);for(var a=[],b=0;b<this.i.length;b++)a.push(this.s[this.i[b]]);return a};Mc.prototype.B=function(){Nc(this);return this.i.concat()};Mc.prototype.S=function(a){return Oc(this.s,a)};
|
|
Mc.prototype.remove=function(a){return Oc(this.s,a)?(delete this.s[a],this.j--,this.xa++,this.i.length>2*this.j&&Nc(this),!0):!1};var Nc=function(a){if(a.j!=a.i.length){for(var b=0,c=0;b<a.i.length;){var d=a.i[b];Oc(a.s,d)&&(a.i[c++]=d);b++}a.i.length=c}if(a.j!=a.i.length){for(var e={},c=b=0;b<a.i.length;)d=a.i[b],Oc(e,d)||(a.i[c++]=d,e[d]=1),b++;a.i.length=c}};h=Mc.prototype;h.get=function(a,b){return Oc(this.s,a)?this.s[a]:b};
|
|
h.set=function(a,b){Oc(this.s,a)||(this.j++,this.i.push(a),this.xa++);this.s[a]=b};h.xb=function(a){var b;a instanceof Mc?(b=a.B(),a=a.v()):(b=qa(a),a=pa(a));for(var c=0;c<b.length;c++)this.set(b[c],a[c])};h.forEach=function(a,b){for(var c=this.B(),d=0;d<c.length;d++){var e=c[d],g=this.get(e);a.call(b,g,e,this)}};h.clone=function(){return new Mc(this)};
|
|
h.vb=function(a){Nc(this);var b=0,c=this.i,d=this.s,e=this.xa,g=this,f=new Lc;f.next=function(){for(;;){if(e!=g.xa)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw Kc;var f=c[b++];return a?f:d[f]}};return f};var Oc=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Pc=function(a){if("function"==typeof a.v)return a.v();if(p(a))return a.split("");if(da(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return pa(a)},Qc=function(a,b){if("function"==typeof a.forEach)a.forEach(b,void 0);else if(da(a)||p(a))Ea(a,b,void 0);else{var c;if("function"==typeof a.B)c=a.B();else if("function"!=typeof a.v)if(da(a)||p(a)){c=[];for(var d=a.length,e=0;e<d;e++)c.push(e)}else c=qa(a);else c=void 0;for(var d=Pc(a),e=d.length,g=0;g<e;g++)b.call(void 0,d[g],c&&c[g],
|
|
a)}};var Rc=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Rc.prototype.cb=null;var Sc=0;Rc.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Sc++;d||ka();this.$=a;this.$b=b;delete this.cb};Rc.prototype.pb=function(a){this.$=a};var Tc=function(a){this.ac=a;this.fb=this.Ea=this.$=this.e=null},Uc=function(a,b){this.name=a;this.value=b};Uc.prototype.toString=function(){return this.name};var Vc=new Uc("SEVERE",1E3),Wc=new Uc("CONFIG",700),Xc=new Uc("FINE",500);Tc.prototype.getParent=function(){return this.e};Tc.prototype.Ob=function(){this.Ea||(this.Ea={});return this.Ea};Tc.prototype.pb=function(a){this.$=a};var Yc=function(a){if(a.$)return a.$;if(a.e)return Yc(a.e);Ba("Root logger has no level set.");return null};
|
|
Tc.prototype.log=function(a,b,c){if(a.value>=Yc(this).value)for(q(b)&&(b=b()),a=new Rc(a,String(b),this.ac),c&&(a.cb=c),c="log:"+a.$b,k.console&&(k.console.timeStamp?k.console.timeStamp(c):k.console.markTimeline&&k.console.markTimeline(c)),k.msWriteProfilerMark&&k.msWriteProfilerMark(c),c=this;c;){b=c;var d=a;if(b.fb)for(var e=0,g=void 0;g=b.fb[e];e++)g(d);c=c.getParent()}};
|
|
var Zc={},$c=null,ad=function(a){$c||($c=new Tc(""),Zc[""]=$c,$c.pb(Wc));var b;if(!(b=Zc[a])){b=new Tc(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=ad(a.substr(0,c));c.Ob()[d]=b;b.e=c;Zc[a]=b}return b};var bd=function(a,b){a&&a.log(Xc,b,void 0)};var cd=function(a,b,c){if(q(a))c&&(a=t(a,c));else if(a&&"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:k.setTimeout(a,b||0)};var dd=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/,fd=function(a){if(ed){ed=!1;var b=k.location;if(b){var c=b.href;if(c&&(c=(c=fd(c)[3]||null)?decodeURI(c):c)&&c!=b.hostname)throw ed=!0,Error();}}return a.match(dd)},ed=bb,gd=function(a,b){for(var c=a.split("&"),d=0;d<c.length;d++){var e=c[d].indexOf("="),g=null,f=null;0<=e?(g=c[d].substring(0,e),f=c[d].substring(e+1)):g=c[d];b(g,f?decodeURIComponent(f.replace(/\+/g," ")):"")}};var hd=function(){};hd.prototype.Ya=null;hd.prototype.W=function(){var a;(a=this.Ya)||(a={},id(this)&&(a[0]=!0,a[1]=!0),a=this.Ya=a);return a};var jd=function(a,b){this.nc=a;this.gc=b};v(jd,hd);jd.prototype.Fa=function(){return this.nc()};jd.prototype.W=function(){return this.gc()};var D=function(){return D.eb.Fa()};D.ub=!1;D.W=function(){return D.eb.W()};D.uc=function(a,b){D.ob(new jd(y(a),y(b)))};D.ob=function(a){D.eb=a};var kd=function(){};v(kd,hd);kd.prototype.Fa=function(){var a=id(this);return a?new ActiveXObject(a):new XMLHttpRequest};
|
|
var id=function(a){if(D.ub)return"";if(!a.gb&&"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.gb=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.gb};D.ob(new kd);var E=function(a){Hc.call(this);this.headers=new Mc;this.Aa=a||null;this.A=!1;this.za=this.a=null;this.Z=this.hb=this.ma="";this.F=this.Na=this.la=this.Ha=!1;this.Q=0;this.sa=null;this.lb="";this.wa=this.mc=!1};v(E,Hc);var ld=E.prototype,md=ad("goog.net.XhrIo");ld.o=md;var nd=/^https?$/i,od=["POST","PUT"],pd=[],rd=function(a,b,c,d,e){var g=qd,f=new E;pd.push(f);b&&f.ib("complete",b);f.Xb(f.Bb);g&&(f.Q=Math.max(0,g));f.send(a,c,d,e)};E.prototype.Bb=function(){this.Fb();Ja(pd,this)};
|
|
E.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.ma+"; newUri="+a);b=b?b.toUpperCase():"GET";this.ma=a;this.Z="";this.hb=b;this.Ha=!1;this.A=!0;this.a=this.Aa?this.Aa.Fa():D();this.za=this.Aa?this.Aa.W():D.W();this.a.onreadystatechange=t(this.kb,this);try{bd(this.o,sd(this,"Opening Xhr")),this.Na=!0,this.a.open(b,String(a),!0),this.Na=!1}catch(e){bd(this.o,sd(this,"Error opening Xhr: "+e.message));this.ha(5,e);return}a=c||"";var g=
|
|
this.headers.clone();d&&Qc(d,function(a,b){g.set(b,a)});d=Ia(g.B());c=k.FormData&&a instanceof k.FormData;!(0<=Da(od,b))||d||c||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");g.forEach(function(a,b){this.a.setRequestHeader(b,a)},this);this.lb&&(this.a.responseType=this.lb);"withCredentials"in this.a&&(this.a.withCredentials=this.mc);try{td(this),0<this.Q&&(this.wa=ud(this.a),bd(this.o,sd(this,"Will abort after "+this.Q+"ms if incomplete, xhr2 "+this.wa)),this.wa?(this.a.timeout=
|
|
this.Q,this.a.ontimeout=t(this.ba,this)):this.sa=cd(this.ba,this.Q,this)),bd(this.o,sd(this,"Sending request")),this.la=!0,this.a.send(a),this.la=!1}catch(f){bd(this.o,sd(this,"Send error: "+f.message)),this.ha(5,f)}};var ud=function(a){return B&&C(9)&&ea(a.timeout)&&l(a.ontimeout)},Ha=function(a){return"content-type"==a.toLowerCase()};
|
|
E.prototype.ba=function(){"undefined"!=typeof aa&&this.a&&(this.Z="Timed out after "+this.Q+"ms, aborting",bd(this.o,sd(this,this.Z)),this.dispatchEvent("timeout"),this.abort(8))};E.prototype.ha=function(a,b){this.A=!1;this.a&&(this.F=!0,this.a.abort(),this.F=!1);this.Z=b;vd(this);wd(this)};var vd=function(a){a.Ha||(a.Ha=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
|
|
E.prototype.abort=function(){this.a&&this.A&&(bd(this.o,sd(this,"Aborting")),this.A=!1,this.F=!0,this.a.abort(),this.F=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),wd(this))};E.prototype.T=function(){this.a&&(this.A&&(this.A=!1,this.F=!0,this.a.abort(),this.F=!1),wd(this,!0));E.p.T.call(this)};E.prototype.kb=function(){this.U||(this.Na||this.la||this.F?xd(this):this.fc())};E.prototype.fc=function(){xd(this)};
|
|
var xd=function(a){if(a.A&&"undefined"!=typeof aa)if(a.za[1]&&4==yd(a)&&2==a.getStatus())bd(a.o,sd(a,"Local request error detected and ignored"));else if(a.la&&4==yd(a))cd(a.kb,0,a);else if(a.dispatchEvent("readystatechange"),4==yd(a)){bd(a.o,sd(a,"Request complete"));a.A=!1;try{var b=a.getStatus(),c;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var g=fd(String(a.ma))[1]||null;if(!g&&self.location)var f=self.location.protocol,
|
|
g=f.substr(0,f.length-1);e=!nd.test(g?g.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var m;try{m=2<yd(a)?a.a.statusText:""}catch(K){bd(a.o,"Can not get status: "+K.message),m=""}a.Z=m+" ["+a.getStatus()+"]";vd(a)}}finally{wd(a)}}},wd=function(a,b){if(a.a){td(a);var c=a.a,d=a.za[0]?ba:null;a.a=null;a.za=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.o)&&c.log(Vc,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},
|
|
td=function(a){a.a&&a.wa&&(a.a.ontimeout=null);ea(a.sa)&&(k.clearTimeout(a.sa),a.sa=null)},yd=function(a){return a.a?a.a.readyState:0};E.prototype.getStatus=function(){try{return 2<yd(this)?this.a.status:-1}catch(a){return-1}};E.prototype.getResponseHeader=function(a){return this.a&&4==yd(this)?this.a.getResponseHeader(a):void 0};var sd=function(a,b){return b+" ["+a.hb+" "+a.ma+" "+a.getStatus()+"]"};var zd=function(a,b,c){this.j=this.d=null;this.q=a||null;this.Sb=!!c},Ad=function(a){a.d||(a.d=new Mc,a.j=0,a.q&&gd(a.q,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=zd.prototype;h.add=function(a,b){Ad(this);this.q=null;a=Bd(this,a);var c=this.d.get(a);c||this.d.set(a,c=[]);c.push(b);this.j++;return this};h.remove=function(a){Ad(this);a=Bd(this,a);return this.d.S(a)?(this.q=null,this.j-=this.d.get(a).length,this.d.remove(a)):!1};h.S=function(a){Ad(this);a=Bd(this,a);return this.d.S(a)};
|
|
h.B=function(){Ad(this);for(var a=this.d.v(),b=this.d.B(),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};h.v=function(a){Ad(this);var b=[];if(p(a))this.S(a)&&(b=Ka(b,this.d.get(Bd(this,a))));else{a=this.d.v();for(var c=0;c<a.length;c++)b=Ka(b,a[c])}return b};h.set=function(a,b){Ad(this);this.q=null;a=Bd(this,a);this.S(a)&&(this.j-=this.d.get(a).length);this.d.set(a,[b]);this.j++;return this};
|
|
h.get=function(a,b){var c=a?this.v(a):[];return 0<c.length?String(c[0]):b};h.toString=function(){if(this.q)return this.q;if(!this.d)return"";for(var a=[],b=this.d.B(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.v(d),g=0;g<d.length;g++){var f=e;""!==d[g]&&(f+="="+encodeURIComponent(String(d[g])));a.push(f)}return this.q=a.join("&")};h.clone=function(){var a=new zd;a.q=this.q;this.d&&(a.d=this.d.clone(),a.j=this.j);return a};
|
|
var Bd=function(a,b){var c=String(b);a.Sb&&(c=c.toLowerCase());return c};var Cd=null,Dd=null,Ed=null,Fd=null,Gd=null,Hd=[],Id=!1,qd=0,Jd={oc:"CANCEL",rc:"UPDATE"},Kd=function(a,b,c){null!=a?Cd=a:Id||(Cd="/api");null!=b?Dd=b:Id||(Dd="https://earthengine.googleapis.com");l(c)&&(Ed=c);Id=!0};
|
|
u("ee.data.authenticate",function(a,b,c,d){var e=["https://www.googleapis.com/auth/earthengine.readonly"];d&&(La(e,d),Na(e));Gd=a;Hd=e;if(r(k.gapi)&&r(k.gapi.auth)&&q(k.gapi.auth.authorize))Ld(b,c);else{for(var g=ka().toString(36);g in k;)g+="_";k[g]=function(){delete k[g];Ld(b,c)};fc("https://apis.google.com/js/client.js?onload="+g)}});u("ee.data.setDeadline",function(a){qd=a});u("ee.data.getApiBaseUrl",function(){return Cd});u("ee.data.getTileBaseUrl",function(){return Dd});
|
|
u("ee.data.getXsrfToken",function(){return Ed});u("ee.data.getInfo",function(a,b){k.console&&k.console.error&&k.console.error("ee.data.getInfo is DEPRECATED. Use ee.data.getValue() instead.");return F("/info",(new zd).add("id",a),b)});u("ee.data.getList",function(a,b){var c=G(a);return F("/list",c,b)});var Md=function(a,b){a=w(a);return F("/mapid",G(a),b)};u("ee.data.getMapId",Md);
|
|
u("ee.data.getTileUrl",function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[Dd,"map",a.mapid,d,b,c].join("/")+"?token="+a.token});var Nd=function(a,b){a=w(a);return F("/value",G(a),b)};u("ee.data.getValue",Nd);var Od=function(a,b){a=w(a);n(a.size)&&(a.size=a.size.join("x"));var c=G(a).add("getid","1");return F("/thumb",c,b)};u("ee.data.getThumbId",Od);var Pd=function(a){return Dd+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};u("ee.data.makeThumbUrl",Pd);
|
|
var Qd=function(a,b){a=w(a);return F("/download",G(a),b)};u("ee.data.getDownloadId",Qd);var Rd=function(a){return Dd+"/api/download?docid="+a.docid+"&token="+a.token};u("ee.data.makeDownloadUrl",Rd);var Sd=function(a,b){a=w(a);return F("/table",G(a),b)};u("ee.data.getTableDownloadId",Sd);var Td=function(a){return Dd+"/api/table?docid="+a.docid+"&token="+a.token};u("ee.data.makeTableDownloadUrl",Td);
|
|
u("ee.data.createAsset",function(a,b,c,d){a={value:a};void 0!==b&&(a.id=b);a.force=c||!1;return F("/create",G(a),d)});u("ee.data.createFolder",function(a,b,c){return F("/createfolder",G({id:a,force:b||!1}),c)});u("ee.data.newTaskId",function(a,b){var c={};ea(a)&&(c.count=a);return F("/newtaskid",G(c),b)});u("ee.data.getTaskStatus",function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");return F("/taskstatus?q="+a.join(),null,b,"GET")});
|
|
u("ee.data.getTaskList",function(a){return F("/tasklist",null,a,"GET")});u("ee.data.cancelTask",function(a,b){return Ud(a,"CANCEL",b)});var Ud=function(a,b,c){if(p(a))a=[a];else if(!n(a))throw Error("Invalid taskId: expected a string or an array of strings.");var d;a:{for(d in Jd)if(Jd[d]==b){d=!0;break a}d=!1}if(!d)throw Error("Invalid action: "+b);return F("/updatetask",G({id:a,action:b}),c,"POST")};u("ee.data.updateTask",Ud);
|
|
u("ee.data.prepareValue",function(a,b,c){b=w(b);b.tid=a;return F("/prepare",G(b),c)});u("ee.data.startProcessing",function(a,b,c){b=w(b);b.id=a;return F("/processingrequest",G(b),c)});u("ee.data.startIngestion",function(a,b,c){a={id:a,request:(new Qa(void 0)).h(b)};return F("/ingestionrequest",G(a),c)});
|
|
var F=function(a,b,c,d){Kd();d=d||"POST";var e={"Content-Type":"application/x-www-form-urlencoded"};null!=Fd&&(e.Authorization=Fd);null!=Ed&&("GET"==d?(a+=-1!=a.indexOf("?")?"&":"?",a+="xsrfToken="+Ed):(b||(b=new zd),b.add("xsrfToken",Ed)));var g=function(a,b,c,d){var e,g,f;if("application/json"===b.split(";")[0]||"text/json"===b.split(";")[0])try{e=Pa(c),g=e.data}catch(m){f="Invalid JSON: "+c}else f="Response was unexpectedly not JSON, but "+b;r(e)?"error"in e&&"message"in e.error?f=e.error.message:
|
|
"data"in e||(f="Malformed response: "+c):300<=a&&(f="Server returned HTTP code: "+a);if(d)return d(g,f),null;if(!f)return g;throw Error(f);};a=Cd+a;b=b?b.toString():"";if(c)return rd(a,function(a){a=a.target;var b=a.getStatus(),d=a.getResponseHeader("Content-Type"),e;try{e=a.a?a.a.responseText:""}catch(f){bd(a.o,"Can not get responseText: "+f.message),e=""}return g(b,d,e,c)},d,b,e),null;var f=D();f.open(d,a,!1);la(e,function(a,b){f.setRequestHeader(b,a)});f.send(b);var m;try{m=f.getResponseHeader("Content-Type")}catch(K){m=
|
|
"application/json"}return g(f.status,m,f.responseText,null)},Ld=function(a,b){var c={client_id:Gd,immediate:!0,scope:Hd.join(" ")},d=function(c){c.access_token?(Fd=c.token_type+" "+c.access_token,setTimeout(Ld,1E3*c.expires_in/2),a&&a()):b&&b(c.error||"Unknown error.")},e=k.gapi.auth.authorize;e(c,function(a){"immediate_failed"==a.error?(c.immediate=!1,e(c,d)):d(a)})},G=function(a){var b=new zd,c;for(c in a)b.set(c,a[c]);return b};var Vd=function(){};var Wd=function(){this.t=-1};var Xd=function(){this.t=-1;this.t=64;this.g=Array(4);this.zb=Array(this.t);this.ta=this.R=0;this.reset()};v(Xd,Wd);Xd.prototype.reset=function(){this.g[0]=1732584193;this.g[1]=4023233417;this.g[2]=2562383102;this.g[3]=271733878;this.ta=this.R=0};
|
|
var Yd=function(a,b,c){c||(c=0);var d=Array(16);if(p(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.g[0];c=a.g[1];var e=a.g[2],g=a.g[3],f=0,f=b+(g^c&(e^g))+d[0]+3614090360&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[1]+3905402710&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[2]+606105819&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&
|
|
(g^b))+d[3]+3250441966&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[4]+4118548399&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[5]+1200080426&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[6]+2821735955&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[7]+4249261313&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[8]+1770035416&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[9]+2336552879&4294967295;g=b+(f<<12&4294967295|f>>>20);f=
|
|
e+(c^g&(b^c))+d[10]+4294925233&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[11]+2304563134&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(g^c&(e^g))+d[12]+1804603682&4294967295;b=c+(f<<7&4294967295|f>>>25);f=g+(e^b&(c^e))+d[13]+4254626195&4294967295;g=b+(f<<12&4294967295|f>>>20);f=e+(c^g&(b^c))+d[14]+2792965006&4294967295;e=g+(f<<17&4294967295|f>>>15);f=c+(b^e&(g^b))+d[15]+1236535329&4294967295;c=e+(f<<22&4294967295|f>>>10);f=b+(e^g&(c^e))+d[1]+4129170786&4294967295;b=c+(f<<5&4294967295|
|
|
f>>>27);f=g+(c^e&(b^c))+d[6]+3225465664&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[11]+643717713&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[0]+3921069994&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(e^g&(c^e))+d[5]+3593408605&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[10]+38016083&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[15]+3634488961&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[4]+3889429448&4294967295;c=e+(f<<20&4294967295|
|
|
f>>>12);f=b+(e^g&(c^e))+d[9]+568446438&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[14]+3275163606&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[3]+4107603335&4294967295;e=g+(f<<14&4294967295|f>>>18);f=c+(g^b&(e^g))+d[8]+1163531501&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(e^g&(c^e))+d[13]+2850285829&4294967295;b=c+(f<<5&4294967295|f>>>27);f=g+(c^e&(b^c))+d[2]+4243563512&4294967295;g=b+(f<<9&4294967295|f>>>23);f=e+(b^c&(g^b))+d[7]+1735328473&4294967295;e=g+(f<<14&4294967295|
|
|
f>>>18);f=c+(g^b&(e^g))+d[12]+2368359562&4294967295;c=e+(f<<20&4294967295|f>>>12);f=b+(c^e^g)+d[5]+4294588738&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[8]+2272392833&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[11]+1839030562&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[14]+4259657740&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[1]+2763975236&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[4]+1272893353&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^
|
|
b^c)+d[7]+4139469664&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[10]+3200236656&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[13]+681279174&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[0]+3936430074&4294967295;g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[3]+3572445317&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[6]+76029189&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(c^e^g)+d[9]+3654602809&4294967295;b=c+(f<<4&4294967295|f>>>28);f=g+(b^c^e)+d[12]+3873151461&4294967295;
|
|
g=b+(f<<11&4294967295|f>>>21);f=e+(g^b^c)+d[15]+530742520&4294967295;e=g+(f<<16&4294967295|f>>>16);f=c+(e^g^b)+d[2]+3299628645&4294967295;c=e+(f<<23&4294967295|f>>>9);f=b+(e^(c|~g))+d[0]+4096336452&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[7]+1126891415&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[14]+2878612391&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[5]+4237533241&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[12]+1700485571&4294967295;b=c+
|
|
(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[3]+2399980690&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[10]+4293915773&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[1]+2240044497&4294967295;c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[8]+1873313359&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[15]+4264355552&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[6]+2734768916&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[13]+1309151649&4294967295;
|
|
c=e+(f<<21&4294967295|f>>>11);f=b+(e^(c|~g))+d[4]+4149444226&4294967295;b=c+(f<<6&4294967295|f>>>26);f=g+(c^(b|~e))+d[11]+3174756917&4294967295;g=b+(f<<10&4294967295|f>>>22);f=e+(b^(g|~c))+d[2]+718787259&4294967295;e=g+(f<<15&4294967295|f>>>17);f=c+(g^(e|~b))+d[9]+3951481745&4294967295;a.g[0]=a.g[0]+b&4294967295;a.g[1]=a.g[1]+(e+(f<<21&4294967295|f>>>11))&4294967295;a.g[2]=a.g[2]+e&4294967295;a.g[3]=a.g[3]+g&4294967295};
|
|
Xd.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-this.t,d=this.zb,e=this.R,g=0;g<b;){if(0==e)for(;g<=c;)Yd(this,a,g),g+=this.t;if(p(a))for(;g<b;){if(d[e++]=a.charCodeAt(g++),e==this.t){Yd(this,d);e=0;break}}else for(;g<b;)if(d[e++]=a[g++],e==this.t){Yd(this,d);e=0;break}}this.R=e;this.ta+=b};
|
|
var $d=function(){var a=Zd,b=Array((56>a.R?a.t:2*a.t)-a.R);b[0]=128;for(var c=1;c<b.length-8;++c)b[c]=0;for(var d=8*a.ta,c=b.length-8;c<b.length;++c)b[c]=d&255,d/=256;a.update(b);b=Array(16);for(c=d=0;4>c;++c)for(var e=0;32>e;e+=8)b[d++]=a.g[c]>>>e&255;return b};var ae=function(a){this.da="__ee_hash__";this.Pa=!1!==a;this.O=[];this.J={};this.Wa=[]};u("ee.Serializer",ae);var be=new Qa,Zd=new Xd,de=function(a,b){return ce(new ae(l(b)?b:!0),a)};u("ee.Serializer.encode",de);var fe=function(a){return be.h(de(a))};u("ee.Serializer.toJSON",fe);var ge=function(a){a=ce(new ae(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):be.h(a)};u("ee.Serializer.toReadableJSON",ge);
|
|
var ce=function(a,b){var c=a.ga(b);a.Pa&&(c=r(c)&&"ValueRef"==c.type&&1==a.O.length?a.O[0][1]:{type:"CompoundValue",scope:a.O,value:c},a.O=[],Ea(a.Wa,t(function(a){delete a[this.da]},a)),a.Wa=[],a.J={});return c};
|
|
ae.prototype.ga=function(a){if(!l(a))throw Error("Can't encode an undefined value.");var b,c=r(a)?a[this.da]:null;if(this.Pa&&null!=c&&this.J[c])return{type:"ValueRef",value:this.J[c]};if(null===a||"boolean"==typeof a||ea(a)||p(a))return a;if(r(a)&&"function"==typeof a.getFullYear)return{type:"Invocation",functionName:"Date",arguments:{value:Math.floor(a.getTime())}};if(a instanceof Vd){if(b=a.encode(t(this.ga,this)),!(n(b)||r(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Fa(a,function(a){return this.ga(a)},
|
|
this);else if(r(a)&&!q(a))b=oa(a,function(a){if(!q(a))return this.ga(a)},this),ra(b,this.da),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.Pa){Zd.reset();Zd.update(be.h(b));var c=$d().toString(),d;this.J[c]?d=this.J[c]:(d=String(this.O.length),this.O.push([d,b]),this.J[c]=d);a[this.da]=c;this.Wa.push(a);return{type:"ValueRef",value:d}}return b};var H=function(a,b,c){if(!(this instanceof H))return I(H,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.b=a;this.c=b;this.f=c||null};v(H,Vd);u("ee.ComputedObject",H);H.prototype.m=function(a){return Nd({json:this.h()},a)};u("ee.ComputedObject.prototype.getInfo",H.prototype.m);
|
|
H.prototype.encode=function(a){if(null===this.b&&null===this.c)return{type:"ArgumentRef",value:this.f};var b={},c;for(c in this.c)l(this.c[c])&&(b[c]=a(this.c[c]));b={type:"Invocation",arguments:b};a=a(this.b);b[p(a)?"functionName":"function"]=a;return b};H.prototype.h=function(){return fe(this)};u("ee.ComputedObject.prototype.serialize",H.prototype.h);H.prototype.toString=function(){return"ee."+this.name()+"("+ge(this)+")"};u("ee.ComputedObject.prototype.toString",H.prototype.toString);
|
|
H.prototype.name=function(){return"ComputedObject"};var he=function(a,b){if(b instanceof a.constructor)return b;var c=function(){};c.prototype=a.constructor.prototype;c=new c;c.b=b.b;c.c=b.c;c.f=b.f;return c},I=function(a,b){function c(){return a.apply(this,b)}c.prototype=a.prototype;return new c};var ie={},je=function(a){return a.prototype instanceof H?a.prototype.name.call(null):a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"},ke=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}},le=function(a){return ea(a)||
|
|
a instanceof H&&"Number"==a.name()},me=function(a){return p(a)||a instanceof H&&"String"==a.name()},ne=function(a){return r(a)&&!q(a)?(a=Object.getPrototypeOf(a),null!==a&&null===Object.getPrototypeOf(a)):!1};var J=function(){if(!(this instanceof J))return new J};v(J,Vd);u("ee.Function",J);var oe=function(a){return a};J.prototype.call=function(a){return this.apply(pe(this,Array.prototype.slice.call(arguments,0)))};u("ee.Function.prototype.call",J.prototype.call);J.prototype.apply=function(a){a=new H(this,qe(this,a));return oe(a,this.n().returns)};u("ee.Function.prototype.apply",J.prototype.apply);
|
|
var re=function(a,b,c){var d=l(b),e=a.n(),g=!1;if(1==c.length&&ne(c[0])){var f=e.args;d&&(f=f.slice(1));f.length&&(g=!((1==f.length||f[1].optional)&&"Dictionary"==f[0].type))}if(g){if(c=w(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=pe(a,d?[b].concat(c):c);return a.apply(c)},qe=function(a,b){for(var c=a.n().args,d={},e={},g=0;g<c.length;g++){var f=c[g].name;if(f in b&&l(b[f]))d[f]=oe(b[f],c[g].type);else if(!c[g].optional)throw Error("Required argument ("+
|
|
f+") missing to function: "+a);e[f]=!0}var c=[],m;for(m in b)e[m]||c.push(m);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+a);return d},pe=function(a,b){var c=a.n().args;if(c.length<b.length)throw Error("Too many ("+b.length+") arguments to function: "+a);for(var d={},e=0;e<b.length;e++)d[c[e].name]=b[e];return d};
|
|
J.prototype.toString=function(a,b){var c=this.n(),d=[];d.push(a||c.name);d.push("(");d.push(Fa(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){d.push("\nArgs:\n");for(var e=0;e<c.args.length;e++){b&&0==e?d.push(" this:"):d.push("\n ");var g=c.args[e];d.push(g.name);d.push(" (");d.push(g.type);g.optional&&d.push(", optional");d.push("): ");g.description?d.push(g.description):
|
|
d.push("Undocumented.")}}return d.join("")};J.prototype.h=function(){return fe(this)};var L=function(a,b){if(!l(b))return se(a);if(!(this instanceof L))return I(L,arguments);this.P=sa(b);this.P.name=a};v(L,J);u("ee.ApiFunction",L);var M=function(a,b){return J.prototype.call.apply(se(a),Array.prototype.slice.call(arguments,1))};u("ee.ApiFunction._call",M);var te=function(a,b){return se(a).apply(b)};u("ee.ApiFunction._apply",te);L.prototype.encode=function(){return this.P.name};L.prototype.n=function(){return this.P};
|
|
var ma=null,ue={},we=function(){ve();return oa(ma,function(a){return a.n()})},xe=function(){ve();return na(function(a,b){return!ue[b]})},se=function(a){var b=ye(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};u("ee.ApiFunction.lookup",se);
|
|
var ye=function(a){ve();return ma[a]||null},ve=function(a,b){if(ma)a&&a();else{var c=function(c,e){e?b&&b(Error(e)):(ma=oa(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?F("/algorithms",null,c,"GET"):c(F("/algorithms",null,void 0,"GET"))}},N=function(a,b,c,d){ve();var e=d||"";la(ma,function(d,f){var m=f.split(".");if(2==m.length&&m[0]==b){var m=e+m[1],K=d.n();ue[f]=!0;var ha=!1;
|
|
if(K.args.length)var U=K.args[0].type,ha="Object"!=U&&ke(U,c);U=ha?a.prototype:a;m in U||(U[m]=function(a){return re(d,ha?this:void 0,Array.prototype.slice.call(arguments,0))},U[m].toString=t(d.toString,d,m,ha),U[m].signature=K)}})},O=function(a){var b=function(a){for(var b in a)q(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var P=function(a,b,c){H.call(this,a,b,c);ze()};v(P,H);u("ee.Element",P);var Ae=!1,ze=function(){Ae||(N(P,"Element","Element"),Ae=!0)};P.prototype.name=function(){return"Element"};
|
|
P.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=ne(c))a:{b=qa(c);var d=["properties"];if(da(b)&&da(d)&&b.length==d.length){for(var e=b.length,g=0;g<e;g++)if(b[g]!==d[g]){b=!1;break a}b=!0}else b=!1}b&&r(c.properties)&&(c=c.properties);if(ne(c)){b=this;for(var f in c)d=c[f],b=M("Element.set",b,f,d)}else if(c instanceof H&&ye("Element.setMulti"))b=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.");b=this;for(c=0;c<arguments.length;c+=2)f=arguments[c],d=arguments[c+1],b=M("Element.set",b,f,d)}return he(this,b)};u("ee.Element.prototype.set",P.prototype.set);var Q=function(a){if(!(this instanceof Q))return I(Q,arguments);if(a instanceof Q)return a;Be();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new Q(a[0]);H.call(this,new L("Filter.and"),{filters:a});this.V=a}else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.V=[a];else{if(l(a))throw Error("Invalid argument specified for ee.Filter(): "+a);H.call(this,null,null);this.V=[]}};v(Q,H);u("ee.Filter",Q);
|
|
var Ce=!1,Be=function(){Ce||(N(Q,"Filter","Filter"),Ce=!0)},De={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};Q.prototype.length=function(){return this.V.length};Q.prototype.length=Q.prototype.length;var R=function(a,b){var c=a.V.slice(0);b instanceof Q?La(c,b.V):b instanceof Array?La(c,b):c.push(b);return new Q(c)};Q.prototype.C=function(){return M("Filter.not",this)};Q.prototype.not=Q.prototype.C;
|
|
var Ee=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in De))throw Error("Unknown filtering operator: "+b);a=M("Filter."+De[b],a,c);return d?a.C():a};Q.metadata=Ee;var Fe=function(a,b){return M("Filter.equals",a,b)};Q.eq=Fe;var Ge=function(a,b){return Fe(a,b).C()};Q.neq=Ge;var He=function(a,b){return M("Filter.lessThan",a,b)};Q.lt=He;var Ie=function(a,b){return He(a,b).C()};Q.gte=Ie;var Je=function(a,b){return M("Filter.greaterThan",a,b)};
|
|
Q.gt=Je;var Ke=function(a,b){return Je(a,b).C()};Q.lte=Ke;var Le=function(a,b){return M("Filter.stringContains",a,b)};Q.contains=Le;var Me=function(a,b){return Le(a,b).C()};Q.not_contains=Me;var Ne=function(a,b){return M("Filter.stringStartsWith",a,b)};Q.starts_with=Ne;var Oe=function(a,b){return Ne(a,b).C()};Q.not_starts_with=Oe;var Pe=function(a,b){return M("Filter.stringEndsWith",a,b)};Q.ends_with=Pe;var Qe=function(a,b){return Pe(a,b).C()};Q.not_ends_with=Qe;
|
|
var Re=function(a){return M("Filter.and",Array.prototype.slice.call(arguments))};Q.and=Re;Q.or=function(a){return M("Filter.or",Array.prototype.slice.call(arguments))};var Se=function(a,b){var c=M("DateRange",a,b);return te("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=Se;var Te=function(a,b,c,d){return te("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};Q.inList=Te;
|
|
var Ue=function(a,b){return te("Filter.intersects",{leftField:".all",rightValue:M("Feature",a),maxError:b})};Q.bounds=Ue;Q.prototype.Hb=function(a){return R(this,Fe.apply(null,[].slice.call(arguments)))};Q.prototype.eq=Q.prototype.Hb;Q.prototype.bc=function(a){return R(this,Ge.apply(null,[].slice.call(arguments)))};Q.prototype.neq=Q.prototype.bc;Q.prototype.Yb=function(a){return R(this,He.apply(null,[].slice.call(arguments)))};Q.prototype.lt=Q.prototype.Yb;
|
|
Q.prototype.Rb=function(a){return R(this,Ie.apply(null,[].slice.call(arguments)))};Q.prototype.gte=Q.prototype.Rb;Q.prototype.Qb=function(a){return R(this,Je.apply(null,[].slice.call(arguments)))};Q.prototype.gt=Q.prototype.Qb;Q.prototype.Zb=function(a){return R(this,Ke.apply(null,[].slice.call(arguments)))};Q.prototype.lte=Q.prototype.Zb;Q.prototype.contains=function(a){return R(this,Le.apply(null,[].slice.call(arguments)))};Q.prototype.contains=Q.prototype.contains;
|
|
Q.prototype.cc=function(a){return R(this,Me.apply(null,[].slice.call(arguments)))};Q.prototype.not_contains=Q.prototype.cc;Q.prototype.jc=function(a){return R(this,Ne.apply(null,[].slice.call(arguments)))};Q.prototype.starts_with=Q.prototype.jc;Q.prototype.ec=function(a){return R(this,Oe.apply(null,[].slice.call(arguments)))};Q.prototype.not_starts_with=Q.prototype.ec;Q.prototype.Gb=function(a){return R(this,Pe.apply(null,[].slice.call(arguments)))};Q.prototype.ends_with=Q.prototype.Gb;
|
|
Q.prototype.dc=function(a){return R(this,Qe.apply(null,[].slice.call(arguments)))};Q.prototype.not_ends_with=Q.prototype.dc;Q.prototype.yb=function(a){return R(this,Re.apply(null,[].slice.call(arguments)))};Q.prototype.and=Q.prototype.yb;Q.prototype.Eb=function(a){return R(this,Se.apply(null,[].slice.call(arguments)))};Q.prototype.date=Q.prototype.Eb;Q.prototype.Tb=function(a){return R(this,Te.apply(null,[].slice.call(arguments)))};Q.prototype.inList=Q.prototype.Tb;
|
|
Q.prototype.bounds=function(a){return R(this,Ue.apply(null,[].slice.call(arguments)))};Q.prototype.bounds=Q.prototype.bounds;Q.prototype.name=function(){return"Filter"};var S=function(a,b,c){P.call(this,a,b,c);Ve()};v(S,P);u("ee.Collection",S);var We=!1,Ve=function(){We||(N(S,"Collection","Collection"),N(S,"AggregateFeatureCollection","Collection","aggregate_"),We=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return he(this,M("Collection.filter",this,a))};u("ee.Collection.prototype.filter",S.prototype.filter);S.prototype.Mb=function(a,b,c){return this.filter(Ee(a,b,c))};u("ee.Collection.prototype.filterMetadata",S.prototype.Mb);
|
|
S.prototype.Kb=function(a){return this.filter(Ue(a))};u("ee.Collection.prototype.filterBounds",S.prototype.Kb);S.prototype.Lb=function(a,b){return this.filter(Se(a,b))};u("ee.Collection.prototype.filterDate",S.prototype.Lb);S.prototype.limit=function(a,b,c){return he(this,M("Collection.limit",this,a,b,c))};u("ee.Collection.prototype.limit",S.prototype.limit);S.prototype.sort=function(a,b){return he(this,M("Collection.limit",this,void 0,a,b))};u("ee.Collection.prototype.sort",S.prototype.sort);
|
|
S.prototype.name=function(){return"Collection"};S.prototype.elementType=function(){return P};S.prototype.map=function(a){var b=this.elementType();return he(this,M("Collection.map",this,function(c){return a(new b(c))}))};u("ee.Collection.prototype.map",S.prototype.map);S.prototype.Vb=function(a,b){var c=l(b)?b:null,d=this.elementType();return M("Collection.iterate",this,function(b,c){return a(new d(b),c)},c)};u("ee.Collection.prototype.iterate",S.prototype.Vb);var Xe=function(a){if(!(this instanceof Xe))return I(Xe,arguments);if(a instanceof Xe)return a;Ye();if(ea(a))H.call(this,null,null),this.Ra=a;else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.Ra=null;else throw Error("Invalid argument specified for ee.Number(): "+a);};v(Xe,H);u("ee.Number",Xe);var Ze=!1,Ye=function(){Ze||(N(Xe,"Number","Number"),Ze=!0)};Xe.prototype.encode=function(a){return ea(this.Ra)?this.Ra:Xe.p.encode.call(this,a)};Xe.prototype.name=function(){return"Number"};var T=function(a){if(!(this instanceof T))return I(T,arguments);if(a instanceof T)return a;$e();if(p(a))H.call(this,null,null),this.Va=a;else if(a instanceof H)this.Va=null,a.b&&"String"==a.b.n().returns?H.call(this,a.b,a.c,a.f):H.call(this,new L("String"),{input:a},null);else throw Error("Invalid argument specified for ee.String(): "+a);};v(T,H);u("ee.String",T);var af=!1,$e=function(){af||(N(T,"String","String"),af=!0)};
|
|
T.prototype.encode=function(a){return p(this.Va)?this.Va:T.p.encode.call(this,a)};T.prototype.name=function(){return"String"};var bf=function(a,b){if(!(this instanceof bf))return I(bf,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var g=d[e],f=g.type;c.push(cf(f in ie?ie[f]:null,g.name))}if(!l(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.P=df(a,c,b);this.Ab=b.apply(null,c)};v(bf,J);u("ee.CustomFunction",bf);bf.prototype.encode=function(a){return{type:"Function",argumentNames:Fa(this.P.args,function(a){return a.name}),body:a(this.Ab)}};bf.prototype.n=function(){return this.P};
|
|
var cf=function(a,b){a=a||Object;if(!(a.prototype instanceof H))if(a&&a!=Object)if(a==String)a=T;else if(a==Number)a=Xe;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=H;var c=function(){};c.prototype=a.prototype;c=new c;c.b=null;c.c=null;c.f=b;return c},ef=function(a,b){var c=Fa(b,function(a){return{name:null,type:p(a)?a:je(a)}}),c={name:"",returns:p("Object")?"Object":je("Object"),args:c};return new bf(c,a)},df=function(a,b,c){for(var d=
|
|
[],e=0;e<b.length;e++)null===b[e].f&&d.push(e);if(0==d.length)return a;var g=function(a){var b=0;r(a)&&!q(a)&&("Function"==a.type&&b++,la(a,function(a){b+=g(a)}));return b},e=de(c.apply(null,b));c="_MAPPING_VAR_"+g(e)+"_";for(e=0;e<d.length;e++){var f=d[e],m=c+e;b[f].f=m;a.args[f].name=m}return a};var ff=function(a,b){if(!(this instanceof ff))return I(ff,arguments);if(a instanceof ff)return a;gf();var c=new L("Date"),d={},e=null;if(me(a)){if(d.value=a,b)if(me(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(le(a))d.value=a;else if(r(a)&&"function"==typeof a.getFullYear)d.value=Math.floor(a.getTime());else if(a instanceof H)a.b&&"Date"==a.b.n().returns?(c=a.b,d=a.c,e=a.f):d.value=a;else throw Error("Invalid argument specified for ee.Date(): "+
|
|
a);H.call(this,c,d,e)};v(ff,H);u("ee.Date",ff);var hf=!1,gf=function(){hf||(N(ff,"Date","Date"),hf=!0)};ff.prototype.name=function(){return"Date"};var V=function(a,b,c){if(!(this instanceof V))return I(V,arguments);jf();var d=null!=b||null!=c;if(a instanceof H&&!(a instanceof V&&a.ua)){if(d)throw Error("Setting the CRS or geodesic on a computed Geometry is not suported. Use Geometry.transform().");H.call(this,a.b,a.c,a.f)}else{a instanceof V&&(a=a.encode());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!kf(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));
|
|
H.call(this,null,null);this.ua=a.type;this.Cb=a.coordinates||null;this.Nb=a.geometries||null;if(null!=b)this.Ta=b;else if("crs"in a)if(r(a.crs)&&"name"==a.crs.type&&r(a.crs.properties)&&p(a.crs.properties.name))this.Ta=a.crs.properties.name;else throw Error("Invalid CRS declaration in GeoJSON: "+(new Qa).h(a.crs));this.Ka=c;!l(c)&&"geodesic"in a&&(this.Ka=Boolean(a.geodesic))}};v(V,H);u("ee.Geometry",V);
|
|
var lf=!1,jf=function(){lf||(N(V,"Geometry","Geometry"),lf=!0)},mf=function(a,b){if(!(this instanceof mf))return nf(mf,arguments);if(2<arguments.length)throw Error("The Geometry.Point constructor takes at most 2 arguments ("+arguments.length+" given)");if(1==arguments.length&&n(arguments[0])&&2==arguments[0].length){var c=arguments[0];a=c[0];b=c[1]}V.call(this,{type:"Point",coordinates:[a,b]})};v(mf,V);V.Point=mf;
|
|
var of=function(a){if(!(this instanceof of))return nf(of,arguments);V.call(this,{type:"MultiPoint",coordinates:pf(a,2,arguments)})};v(of,V);V.MultiPoint=of;var qf=function(a,b,c,d){if(!(this instanceof qf))return I(qf,arguments);if(4<arguments.length)throw Error("The Geometry.Rectangle constructor takes at most 4 arguments ("+arguments.length+" given)");if(n(a)){var e=a;a=e[0];b=e[1];c=e[2];d=e[3]}V.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};v(qf,V);V.Rectangle=qf;
|
|
var rf=function(a){if(!(this instanceof rf))return nf(rf,arguments);V.call(this,{type:"LineString",coordinates:pf(a,2,arguments)})};v(rf,V);V.LineString=rf;var sf=function(a){if(!(this instanceof sf))return nf(sf,arguments);V.call(this,{type:"LinearRing",coordinates:pf(a,2,arguments)})};v(sf,V);V.LinearRing=sf;var tf=function(a){if(!(this instanceof tf))return nf(tf,arguments);V.call(this,{type:"MultiLineString",coordinates:pf(a,3,arguments)})};v(tf,V);V.MultiLineString=tf;
|
|
var uf=function(a){if(!(this instanceof uf))return nf(uf,arguments);V.call(this,{type:"Polygon",coordinates:pf(a,3,arguments)})};v(uf,V);V.Polygon=uf;var vf=function(a){if(!(this instanceof vf))return nf(vf,arguments);V.call(this,{type:"MultiPolygon",coordinates:pf(a,4,arguments)})};v(vf,V);V.MultiPolygon=vf;
|
|
V.prototype.encode=function(a){if(!this.ua){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return H.prototype.encode.call(this,a)}a={type:this.ua};"GeometryCollection"==this.ua?a.geometries=this.Nb:a.coordinates=this.Cb;null!=this.Ta&&(a.crs={type:"name",properties:{name:this.Ta}});null!=this.Ka&&(a.geodesic=this.Ka);return a};V.prototype.qb=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};
|
|
V.prototype.toGeoJSON=V.prototype.qb;V.prototype.rb=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new Qa).h(this.qb())};V.prototype.toGeoJSONString=V.prototype.rb;V.prototype.h=function(){return fe(this)};V.prototype.serialize=V.prototype.h;V.prototype.toString=function(){return"ee.Geometry("+this.rb()+")"};
|
|
var kf=function(a){var b=a.type;if("GeometryCollection"==b){b=a.geometries;if(!n(b))return!1;for(a=0;a<b.length;a++)if(!kf(b[a]))return!1;return!0}a=wf(a.coordinates);return"Point"==b&&1==a||"MultiPoint"==b&&2==a||"LineString"==b&&2==a||"LinearRing"==b&&2==a||"MultiLineString"==b&&3==a||"Polygon"==b&&3==a||"MultiPolygon"==b&&4==a},wf=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=wf(a[0]),c=1;c<a.length;c++)if(wf(a[c])!=b)return-1;return b+1}for(c=0;c<a.length;c++)if(!ea(a[c]))return-1;return 0==
|
|
a.length%2?1:-1},pf=function(a,b,c){if(2>b||4<b)throw Error("Unexpected nesting level.");if(!n(a)&&c&&(a=Array.prototype.slice.call(c),"number"==typeof a[0])){if(0!=a.length%2)throw Error("Invalid number of coordinates: "+a.length);c=[];for(var d=0;d<a.length;d+=2)c.push([a[d],a[d+1]]);a=c}c=a;for(d=0;n(c);)c=c[0],d++;for(;d<b;)a=[a],d++;if(wf(a)!=b)throw Error("Invalid geometry");return a},nf=function(a,b){var c=function(){};c.prototype=a.prototype;var c=new c,d=a.apply(c,b);return void 0!==d?d:
|
|
c};V.prototype.name=function(){return"Geometry"};u("ee.Deserializer",function(){});u("ee.Deserializer.fromJSON",function(a){return xf(Oa(a))});var xf=function(a){var b={};if(r(a)&&"CompoundValue"==a.type){for(var c=a.scope,d=0;d<c.length;d++){var e=c[d][0],g=c[d][1];if(e in b)throw Error('Duplicate scope key "'+e+'" in scope #'+d+".");b[e]=yf(g,b)}a=a.value}return yf(a,b)};u("ee.Deserializer.decode",xf);
|
|
var yf=function(a,b){if(null===a||ea(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Fa(a,function(a){return yf(a,b)});if(!r(a)||q(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(!p(c))throw Error("Invalid variable name: "+c);return cf(Object,c);case "Date":c=a.value;if(!ea(c))throw Error("Invalid date value: "+c);return new ff(c/1E3);case "Bytes":return c=
|
|
new Vd,c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?se(a.functionName):yf(a["function"],b),d=oa(a.arguments,function(a){return yf(a,b)});if(c instanceof J)return c.apply(d);if(c instanceof H)return new H(c,d);throw Error("Invalid function value: "+a["function"]);case "Dictionary":return oa(a.value,function(a){return yf(a,b)});case "Function":var e=yf(a.body,b),c={name:"",args:Fa(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};
|
|
return new bf(c,function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new V(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var zf=function(a){if(!(this instanceof zf))return I(zf,arguments);if(a instanceof zf)return a;Af();if(ne(a))H.call(this,null,null),this.Ga=a;else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.Ga=null;else throw Error("Invalid argument specified for ee.Dictionary(): "+a);};v(zf,H);u("ee.Dictionary",zf);var Bf=!1,Af=function(){Bf||(N(zf,"Dictionary","Dictionary"),Bf=!0)};zf.prototype.encode=function(a){return null===this.Ga?zf.p.encode.call(this,a):a(this.Ga)};zf.prototype.name=function(){return"Dictionary"};var W=function(a,b){if(!(this instanceof W))return I(W,arguments);if(a instanceof W){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");Cf();if(a instanceof V||null===a)P.call(this,new L("Feature"),{geometry:a,metadata:b||null});else if(a instanceof H)P.call(this,a.b,a.c,a.f);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=w(c);c["system:index"]=a.id}P.call(this,new L("Feature"),{geometry:new V(a.geometry),metadata:c})}else P.call(this,new L("Feature"),{geometry:new V(a),metadata:b||null})};v(W,P);u("ee.Feature",W);var Df=!1,Cf=function(){Df||(N(W,"Feature","Feature"),Df=!0)};W.prototype.m=function(a){return W.p.m.call(this,a)};W.prototype.getInfo=W.prototype.m;W.prototype.getMap=function(a,b){return M("Collection",[this]).getMap(a,b)};
|
|
W.prototype.getMap=W.prototype.getMap;W.Point=function(a,b){return mf.apply(null,arguments)};W.MultiPoint=function(a){return of.apply(null,arguments)};W.Rectangle=function(a,b,c,d){return new qf(a,b,c,d)};W.LineString=function(a){return rf.apply(null,arguments)};W.LinearRing=function(a){return sf.apply(null,arguments)};W.MultiLine=function(a){return tf.apply(null,arguments)};W.Polygon=function(a){return uf.apply(null,arguments)};W.MultiPolygon=function(a){return vf.apply(null,arguments)};
|
|
W.prototype.name=function(){return"Feature"};var Ef=function(a){if(!(this instanceof Ef))return I(Ef,arguments);if(a instanceof Ef)return a;Ff();if(n(a))H.call(this,null,null),this.Qa=a;else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.Qa=null;else throw Error("Invalid argument specified for ee.List(): "+a);};v(Ef,H);u("ee.List",Ef);var Gf=!1,Ff=function(){Gf||(N(Ef,"List","List"),Gf=!0)};Ef.prototype.encode=function(a){return n(this.Qa)?Fa(this.Qa,function(b){return a(b)}):Ef.p.encode.call(this,a)};Ef.prototype.name=function(){return"List"};var X=function(a,b){if(!(this instanceof X))return I(X,arguments);if(a instanceof X)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");Hf();a instanceof V&&(a=new W(a));a instanceof W&&(a=[a]);if(le(a)||me(a)){var c={tableId:a};b&&(c.geometryColumn=b);S.call(this,new L("Collection.loadTable"),c)}else if(n(a))S.call(this,new L("Collection"),{features:Fa(a,function(a){return new W(a)})});else if(a instanceof Ef)S.call(this,
|
|
new L("Collection"),{features:a});else if(a instanceof H)S.call(this,a.b,a.c,a.f);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};v(X,S);u("ee.FeatureCollection",X);var If=!1,Hf=function(){If||(N(X,"FeatureCollection","FeatureCollection"),If=!0)};X.prototype.getMap=function(a,b){var c=te("Collection.draw",{collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(null,b);else return c.getMap()};X.prototype.getMap=X.prototype.getMap;
|
|
X.prototype.m=function(a){return X.p.m.call(this,a)};X.prototype.getInfo=X.prototype.m;X.prototype.La=function(a,b,c,d){var e={};e.table=this.h();a&&(e.format=a.toUpperCase());c&&(e.filename=c);b&&(e.selectors=b);if(d)Sd(e,function(a,b){a?d(Td(a)):d(null,b)});else return Td(Sd(e))};X.prototype.getDownloadURL=X.prototype.La;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"FeatureCollection"};
|
|
X.prototype.elementType=function(){return W};var Y=function(a){if(!(this instanceof Y))return I(Y,arguments);if(a instanceof Y)return a;Jf();var b=arguments.length;if(0==b||1==b&&!l(a))P.call(this,new L("Image.mask"),{image:new Y(0),mask:new Y(0)});else if(1==b)if(le(a))P.call(this,new L("Image.constant"),{value:a});else if(me(a))P.call(this,new L("Image.load"),{id:a});else{if(n(a))return Kf(Fa(a,function(a){return new Y(a)}));if(a instanceof H)"Array"==a.name()?P.call(this,new L("Image.constant"),{value:a}):P.call(this,a.b,a.c,a.f);else throw Error("Unrecognized argument type to convert to an Image: "+
|
|
a);}else if(2==b){var b=arguments[0],c=arguments[1];if(me(b)&&le(c))P.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)");};v(Y,P);u("ee.Image",Y);var Lf=!1,Jf=function(){Lf||(N(Y,"Image","Image"),N(Y,"Window","Image","focal_"),Lf=!0)};Y.prototype.m=function(a){return Y.p.m.call(this,a)};Y.prototype.getInfo=Y.prototype.m;
|
|
Y.prototype.getMap=function(a,b){var c=a?w(a):{};c.image=this.h();if(b)Md(c,t(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=Md(c),c.image=this,c};Y.prototype.getMap=Y.prototype.getMap;Y.prototype.La=function(a,b){var c=a?w(a):{};c.image=this.h();if(b)Qd(c,function(a,c){a?b(Rd(a)):b(null,c)});else return Rd(Qd(c))};Y.prototype.getDownloadURL=Y.prototype.La;
|
|
Y.prototype.Pb=function(a,b){var c=a?w(a):{};c.image=this.h();if(c.region)if(n(c.region)||ne(c.region))c.region=(new Qa(void 0)).h(c.region);else if(!p(c.region))throw Error("The region parameter must be an array or a GeoJSON object.");if(b)Od(c,function(a){b(Pd(a))});else return Pd(Od(c))};Y.prototype.getThumbURL=Y.prototype.Pb;Y.rgb=function(a,b,c){return Kf([a,b,c],["vis-red","vis-green","vis-blue"])};Y.cat=function(a){return Kf(Array.prototype.slice.call(arguments),null)};
|
|
var Kf=function(a,b){if(0==a.length)throw Error("Can't combine 0 images.");for(var c=new Y(a[0]),d=1;d<a.length;d++)c=M("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};
|
|
Y.prototype.select=function(a){var b=Array.prototype.slice.call(arguments),c={input:this,bandSelectors:b[0]||[]};if(2<b.length||me(b[0])||le(b[0])){for(var d=0;d<b.length;d++)if(!(me(b[d])||le(b[d])||b[d]instanceof H))throw Error("Illegal argument to select(): "+b[d]);c.bandSelectors=b}else b[1]&&(c.newNames=b[1]);return te("Image.select",c)};Y.prototype.select=Y.prototype.select;
|
|
Y.prototype.Jb=function(a,b){var c=["DEFAULT_EXPRESSION_IMAGE"],d={DEFAULT_EXPRESSION_IMAGE:this};if(b)for(var e in b)c.push(e),d[e]=new Y(b[e]);var g=M("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE",c);e=new J;e.encode=function(a){return g.encode(a)};e.n=function(){return{name:"",args:Fa(c,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return e.apply(d)};Y.prototype.expression=Y.prototype.Jb;
|
|
Y.prototype.clip=function(a){try{a=new V(a)}catch(b){}return M("Image.clip",this,a)};Y.prototype.clip=Y.prototype.clip;Y.prototype.name=function(){return"Image"};var Z=function(a){if(!(this instanceof Z))return I(Z,arguments);if(a instanceof Z)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");Mf();a instanceof Y&&(a=[a]);if(me(a))S.call(this,new L("ImageCollection.load"),{id:a});else if(n(a))S.call(this,new L("ImageCollection.fromImages"),{images:Fa(a,function(a){return new Y(a)})});else if(a instanceof H)S.call(this,a.b,a.c,a.f);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
|
|
a);};v(Z,S);u("ee.ImageCollection",Z);var Nf=!1,Mf=function(){Nf||(N(Z,"ImageCollection","ImageCollection"),N(Z,"reduce","ImageCollection"),Nf=!0)};Z.prototype.getMap=function(a,b){var c=M("ImageCollection.mosaic",this);if(b)c.getMap(a,b);else return c.getMap(a)};Z.prototype.getMap=Z.prototype.getMap;Z.prototype.m=function(a){return Z.p.m.call(this,a)};Z.prototype.getInfo=Z.prototype.m;Z.prototype.select=function(a,b){var c=arguments;return this.map(function(a){return a.select.apply(a,c)})};
|
|
Z.prototype.select=Z.prototype.select;Z.prototype.name=function(){return"ImageCollection"};Z.prototype.elementType=function(){return Y};var Of={};u("ee.Terrain",Of);Of.Oa=!1;Of.Ub=function(){Of.Oa||(N(Of,"Terrain","Terrain"),Of.Oa=!0)};Of.reset=function(){O(Of);Of.Oa=!1};u("ee.initialize",function(a,b,c,d,e){if("ready"!=Pf||a||b){var g=null!=c;if(d)if(g)Qf.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Pf&&g)Rf.push(c);else if(Pf="loading",Kd(a,b,e),g)Rf.push(c),ve(Sf,Tf);else try{ve(),Sf()}catch(f){throw Tf(f),f;}}else c&&c()});
|
|
u("ee.reset",function(){Pf="not_ready";Gd=Ed=Dd=Cd=null;Hd=[];Fd=null;Id=!1;ma=null;ue={};O(ff);hf=!1;O(zf);Bf=!1;O(P);Ae=!1;O(Y);Lf=!1;O(W);Df=!1;O(S);We=!1;O(Z);Nf=!1;O(X);If=!1;O(Q);Ce=!1;O(V);lf=!1;O(Ef);Gf=!1;O(Xe);Ze=!1;O(T);af=!1;Of.reset();for(var a=k.ee,b=0;b<Uf.length;b++){var c=Uf[b];O(a[c]);delete a[c]}Uf=[];ie=a;var a=Vf,d;for(d in a)delete a[d]});u("ee.InitState",{pc:"not_ready",LOADING:"loading",qc:"ready"});u("ee.InitState.NOT_READY","not_ready");u("ee.InitState.LOADING","loading");
|
|
u("ee.InitState.READY","ready");var Pf="not_ready",Rf=[],Qf=[];u("ee.TILE_SIZE",256);var Uf=[],Vf={};u("ee.Algorithms",Vf);u("ee.call",function(a,b){p(a)&&(a=new L(a));return J.prototype.call.apply(a,Array.prototype.slice.call(arguments,1))});u("ee.apply",function(a,b){p(a)&&(a=new L(a));return a.apply(b)});
|
|
var Sf=function(){if("loading"==Pf){try{gf();Af();ze();Jf();Cf();Ve();Mf();Hf();Be();jf();Ff();Ye();$e();Of.Ub();var a=we(),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 g=k.ee,f;for(f in b)f in c&&!(f in g)&&(g[f]=Wf(f),Uf.push(f),a[f]?(g[f].signature=a[f],g[f].signature.isConstructor=!0,ue[f]=!0):g[f].signature={});ie=g;Xf()}catch(m){Tf(m);return}Pf="ready";for(Qf=[];0<Rf.length;)Rf.shift()()}},Tf=function(a){if("loading"==
|
|
Pf)for(Pf="not_ready",Rf=[];0<Qf.length;)Qf.shift()(a)},Xf=function(){var a=xe();qa(a).sort().forEach(function(b){var c=a[b],d=c.n();if(!d.hidden){b=b.split(".");var e=Vf;for(e.signature={};1<b.length;){var g=b[0];g in e||(e[g]={signature:{}});e=e[g];b=Ma(b,1)}g=function(a){return re(c,void 0,Array.prototype.slice.call(arguments,0))};g.signature=d;g.toString=t(c.toString,c);e[b[0]]=g}})},Wf=function(a){var b=function(b){var d=k.ee[a],e=Array.prototype.slice.call(arguments),g=1==e.length;if(g&&e[0]instanceof
|
|
d)return e[0];if(!(this instanceof d))return I(d,e);var d=ye(a),f=!(e[0]instanceof H),m=!1;d&&(g?f?m=!0:e[0].b!=d&&(m=!0):m=!0);if(m)H.call(this,d,qe(d,pe(d,e)));else{if(!g)throw Error("Too many arguments for ee."+a+"(): "+e);if(f)throw Error("Invalid argument for ee."+a+"(): "+e+". Must be a ComputedObject.");e=e[0];H.call(this,e.b,e.c,e.f)}};v(b,H);b.prototype.name=function(){return a};N(b,a,a);return b},oe=function(a,b){if(null===a)return null;if(l(a)){var c=k.ee;switch(b){case "Image":return new Y(a);
|
|
case "Feature":return a instanceof S?M("Feature",M("Collection.geometry",a)):new W(a);case "Element":if(a instanceof P)return a;if(a instanceof V)return new W(a);if(a instanceof H)return new P(a.b,a.c,a.f);throw Error("Cannot convert "+a+" to Element.");case "Geometry":return a instanceof X?M("Collection.geometry",a):new V(a);case "FeatureCollection":case "Collection":return a instanceof S?a:new X(a);case "ImageCollection":return new Z(a);case "Filter":return new Q(a);case "Algorithm":if(p(a))return new L(a);
|
|
if(q(a)){for(var c=a.length,d=[],e=0;e<c;e++)d[e]="Object";return ef(a,d)}if(a instanceof Vd)return a;throw Error("Argument is not a function: "+a);case "String":return me(a)||a instanceof T||a instanceof H?new T(a):a;case "Dictionary":return ne(a)?a:new zf(a);case "List":return new Ef(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new Xe(a);default:if(b in c){d=ye(b);if(a instanceof c[b])return a;if(d)return new c[b](a);if(p(a)){if(a in c[b])return c[b][a].call();
|
|
throw Error("Unknown algorithm: "+b+"."+a);}return new c[b](a)}return a}}};B&&C("11");})();
|
|
//@ sourceMappingURL=ee_api_js.sourcemap
|