Michael DeWitt c2058efa47 v0.1.55
2015-06-01 11:24:29 -07:00

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