Max Shawabkeh 2403df3657 v0.1.51.
2015-04-22 16:36:30 -07:00

159 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,ha=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")?ha: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.rc=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,"")},y=function(a,b){return-1!=a.indexOf(b)},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||[]);},z=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 A=Array.prototype,Da=A.indexOf?function(a,b,c){z(null!=a.length);return A.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=A.forEach?function(a,b,c){z(null!=a.length);A.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=A.map?function(a,b,c){z(null!=a.length);return A.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=A.some?function(a,b,c){z(null!=a.length);return A.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)z(null!=a.length),A.splice.call(a,c,1);return d},Ka=function(a){return A.concat.apply(A,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){z(null!=a.length);return 2>=arguments.length?A.slice.call(a,b):A.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+")")},Ra=function(a){return(new Qa(void 0)).i(a)},Qa=function(a){this.ra=a};
Qa.prototype.i=function(a){var b=[];Ta(this,a,b);return b.join("")};
var Ta=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],Ta(a,a.ra?a.ra.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),Ua(d,c),c.push(":"),Ta(a,a.ra?a.ra.call(b,d,e):e,c),g=","));c.push("}");return}}switch(typeof b){case "string":Ua(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);}}},Va={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},Wa=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,Ua=function(a,b){b.push('"',a.replace(Wa,function(a){var b=Va[a];b||(b="\\u"+(a.charCodeAt(0)|65536).toString(16).substr(1),Va[a]=b);return b}),
'"')};va("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));var B;a:{var Xa=k.navigator;if(Xa){var Ya=Xa.userAgent;if(Ya){B=Ya;break a}}B=""};var Za=function(){return y(B,"Edge")||y(B,"Trident")||y(B,"MSIE")};var $a=function(){return y(B,"Edge")};var ab=y(B,"Opera")||y(B,"OPR"),C=Za(),bb=y(B,"Gecko")&&!(y(B.toLowerCase(),"webkit")&&!$a())&&!(y(B,"Trident")||y(B,"MSIE"))&&!$a(),cb=y(B.toLowerCase(),"webkit")&&!$a(),db=function(){var a=B;if(bb)return/rv\:([^\);]+)(\)|;)/.exec(a);if(C&&$a())return/Edge\/([\d\.]+)/.exec(a);if(C)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(cb)return/WebKit\/(\S+)/.exec(a)},eb=function(){var a=k.document;return a?a.documentMode:void 0},fb=function(){if(ab&&k.opera){var a=k.opera.version;return q(a)?a():a}var a=
"",b=db();b&&(a=b?b[1]:"");return C&&!$a()&&(b=eb(),b>parseFloat(a))?String(b):a}(),gb={},hb=function(a){var b;if(!(b=gb[a])){b=0;for(var c=xa(String(fb)).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"),ia=RegExp("(\\d*)(\\D*)","g");do{var W=K.exec(f)||["","",""],Sa=ia.exec(m)||["","",""];if(0==W[0].length&&0==Sa[0].length)break;b=ya(0==W[1].length?0:parseInt(W[1],10),0==Sa[1].length?0:parseInt(Sa[1],10))||
ya(0==W[2].length,0==Sa[2].length)||ya(W[2],Sa[2])}while(0==b)}b=gb[a]=0<=b}return b},ib=k.document,jb=eb(),kb=!ib||!C||!jb&&$a()?void 0:jb||("CSS1Compat"==ib.compatMode?parseInt(fb,10):5);!bb&&!C||C&&C&&($a()||9<=kb)||bb&&hb("1.9.1");C&&hb("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.Vb=c;this.Cb=a;this.hc=b;this.oa=0;this.la=null};nb.prototype.get=function(){var a;0<this.oa?(this.oa--,a=this.la,this.la=a.next,a.next=null):a=this.Cb();return a};nb.prototype.put=function(a){this.hc(a);this.oa<this.Vb&&(this.oa++,a.next=this.la,this.la=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&&!y(B,"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&&!Za()){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 rb=function(){this.za=this.I=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.za?this.za.next=c:(z(!this.I),this.I=c);this.za=c};rb.prototype.remove=function(){var a=null;this.I&&(a=this.I,this.I=this.I.next,this.I||(this.za=null),a.next=null);return a};var sb=function(){this.next=this.scope=this.Ja=null};sb.prototype.set=function(a,b){this.Ja=a;this.scope=b;this.next=null};
sb.prototype.reset=function(){this.next=this.scope=this.Ja=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.Ja.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.l=0;this.w=void 0;this.J=this.u=this.e=null;this.ja=this.Ia=!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.M=this.H=this.D=null;this.ea=!1};Gb.prototype.reset=function(){this.context=this.M=this.H=this.D=null;this.ea=!1};
var Hb=new nb(function(){return new Gb},function(a){a.reset()},100),Ib=function(a,b,c){var d=Hb.get();d.H=a;d.M=b;d.context=c;return d},Cb=function(){};Fb.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 Jb(this,q(a)?a:null,q(b)?b:null,c)};Ab(Fb);Fb.prototype.cancel=function(a){0==this.l&&yb(function(){var b=new Eb(a);Kb(this,b)},this)};
var Kb=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.ea||(d++,f.D==a&&(e=f),!(e&&1<d)));f=f.next)e||(g=f);e&&(0==c.l&&1==d?Kb(c,b):(g?(d=g,z(c.u),z(null!=d),d.next==c.J&&(c.J=d),d.next=d.next.next):Lb(c),Mb(c,e,3,b)))}a.e=null}else Db(a,3,b)},Ob=function(a,b){a.u||2!=a.l&&3!=a.l||Nb(a);z(null!=b.H);a.J?a.J.next=b:a.u=b;a.J=b},Jb=function(a,b,c,d){var e=Ib(null,null,null);e.D=new Fb(function(a,f){e.H=b?function(c){try{var e=b.call(d,c);a(e)}catch(ia){f(ia)}}:
a;e.M=c?function(b){try{var e=c.call(d,b);!l(e)&&b instanceof Eb?f(b):a(e)}catch(ia){f(ia)}}:f});e.D.e=a;Ob(a,e);return e.D};Fb.prototype.sb=function(a){z(1==this.l);this.l=0;Db(this,2,a)};Fb.prototype.tb=function(a){z(1==this.l);this.l=0;Db(this,3,a)};
var Db=function(a,b,c){if(0==a.l){if(a==c)b=3,c=new TypeError("Promise cannot resolve to itself");else{if(Bb(c)){a.l=1;b=c;c=a.sb;var d=a.tb;b instanceof Fb?(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?"),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.w=c;a.l=b;a.e=null;Nb(a);3!=b||c instanceof Eb||
Qb(a,c)}},Pb=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)}},Nb=function(a){a.Ia||(a.Ia=!0,yb(a.Hb,a))},Lb=function(a){var b=null;a.u&&(b=a.u,a.u=b.next,b.next=null);a.u||(a.J=null);null!=b&&z(null!=b.H);return b};Fb.prototype.Hb=function(){for(var a=null;a=Lb(this);)Mb(this,a,this.l,this.w);this.Ia=!1};
var Mb=function(a,b,c,d){if(3==c&&b.M&&!b.ea)for(;a&&a.ja;a=a.e)a.ja=!1;if(b.D)b.D.e=null,Rb(b,c,d);else try{b.ea?b.H.call(b.context):Rb(b,c,d)}catch(e){Sb.call(null,e)}Hb.put(b)},Rb=function(a,b,c){2==b?a.H.call(a.context,c):a.M&&a.M.call(a.context,c)},Qb=function(a,b){a.ja=!0;yb(function(){a.ja&&Sb.call(null,b)})},Sb=ob,Eb=function(a){x.call(this,a)};v(Eb,x);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.sa=[];this.jb=a;this.ab=b||null;this.Y=this.L=!1;this.w=void 0;this.Ua=this.Xa=this.Ca=!1;this.wa=0;this.e=null;this.Da=0};Tb.prototype.cancel=function(a){if(this.L)this.w instanceof Tb&&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.L||Ub(this,new Vb)}};Tb.prototype.$a=function(a,b){this.Ca=!1;Wb(this,a,b)};
var Wb=function(a,b,c){a.L=!0;a.w=c;a.Y=!b;Xb(a)},Zb=function(a){if(a.L){if(!a.Ua)throw new Yb;a.Ua=!1}},Ub=function(a,b){Zb(a);$b(b);Wb(a,!1,b)},$b=function(a){z(!(a instanceof Tb),"An execution sequence may not be initiated with a blocking Deferred.")},ac=function(a,b,c){z(!a.Xa,"Blocking Deferreds can not be re-used");a.sa.push([b,c,void 0]);a.L&&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 Ga(a.sa,function(a){return q(a[1])})},Xb=function(a){if(a.wa&&a.L&&bc(a)){var b=a.wa,c=cc[b];c&&(k.clearTimeout(c.Z),delete cc[b]);a.wa=0}a.e&&(a.e.Da--,delete a.e);for(var b=a.w,d=c=!1;a.sa.length&&!a.Ca;){var e=a.sa.shift(),g=e[0],f=e[1],e=e[2];if(g=a.Y?f:g)try{var m=g.call(e||a.ab,b);l(m)&&(a.Y=a.Y&&(m==b||m instanceof Error),a.w=b=m);if(Bb(b)||"function"===typeof k.Promise&&b instanceof k.Promise)d=!0,a.Ca=!0}catch(K){b=K,a.Y=!0,bc(a)||(c=!0)}}a.w=b;d&&(m=t(a.$a,a,!0),
d=t(a.$a,a,!1),b instanceof Tb?(ac(b,m,d),b.Xa=!0):b.then(m,d));c&&(b=new dc(b),cc[b.Z]=b,a.wa=b.Z)},Yb=function(){x.call(this)};v(Yb,x);Yb.prototype.message="Deferred has already fired";Yb.prototype.name="AlreadyCalledError";var Vb=function(){x.call(this)};v(Vb,x);Vb.prototype.message="Deferred was canceled";Vb.prototype.name="CanceledError";var dc=function(a){this.Z=k.setTimeout(t(this.jc,this),0);this.ia=a};
dc.prototype.jc=function(){z(cc[this.Z],"Cannot throw an error that is not scheduled.");delete cc[this.Z];throw this.ia;};var cc={};var ic=function(a){var b={},c=b.document||document,d=document.createElement("SCRIPT"),e={nb:d,ba: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.ba=f);d.onload=d.onreadystatechange=function(){d.readyState&&"loaded"!=d.readyState&&"complete"!=d.readyState||(fc(d,b.sc||!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.nb){var a=this.nb;a&&"SCRIPT"==a.tagName&&fc(a,!0,this.ba)}},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);x.call(this,c);this.code=a};v(gc,x);var jc=function(){this.V=this.V;this.pa=this.pa};jc.prototype.V=!1;jc.prototype.Eb=function(){this.V||(this.V=!0,this.U())};jc.prototype.U=function(){if(this.pa)for(;this.pa.length;)this.pa.shift()()};var kc=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.N=!1;this.mb=!0};kc.prototype.preventDefault=function(){this.defaultPrevented=!0;this.mb=!1};var lc=function(a){lc[" "](a);return a};lc[" "]=ba;var mc=!C||C&&($a()||9<=kb),nc=C&&!hb("9");!cb||hb("528");bb&&hb("1.9b")||C&&hb("8")||ab&&hb("9.5")||cb&&hb("528");bb&&!hb("8")||C&&hb("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.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(bb){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=cb||void 0!==a.offsetX?a.offsetX:a.layerX;this.offsetY=cb||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(oc,kc);oc.prototype.preventDefault=function(){oc.p.preventDefault.call(this);var a=this.bb;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.G=a;this.qa=null;this.src=b;this.type=c;this.ga=!!d;this.ka=e;this.key=++qc;this.O=this.fa=!1},sc=function(a){a.O=!0;a.G=null;a.qa=null;a.src=null;a.ka=null};var tc=function(a){this.src=a;this.k={};this.ca=0};tc.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=uc(a,b,d,e);-1<f?(b=a[f],c||(b.fa=!1)):(b=new rc(b,this.src,g,!!d,e),b.fa=c,a.push(b));return b};tc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.k))return!1;var e=this.k[a];b=uc(e,b,c,d);return-1<b?(sc(e[b]),z(null!=e.length),A.splice.call(e,b,1),0==e.length&&(delete this.k[a],this.ca--),!0):!1};
var vc=function(a,b){var c=b.type;c in a.k&&Ja(a.k[c],b)&&(sc(b),0==a.k[c].length&&(delete a.k[c],a.ca--))};tc.prototype.gc=function(){var a=0,b;for(b in this.k){for(var c=this.k[b],d=0;d<c.length;d++)++a,sc(c[d]);delete this.k[b];this.ca--}};tc.prototype.Ma=function(a,b,c,d){a=this.k[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.O&&g.G==b&&g.ga==!!c&&g.ka==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.ib(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.qa||(d=Cc(),c.qa=d,d.src=a,d.G=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.G,c)}:function(c){c=a.call(b.src,
b.G,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.kc(b,c,d,e):a&&(a=Bc(a))&&(b=a.Ma(b,c,!!d,e))&&Gc(b)},Gc=function(a){if(!ea(a)&&a&&!a.O){var b=a.src;if(b&&b[pc])vc(b.r,a);else{var c=a.type,d=a.qa;b.removeEventListener?b.removeEventListener(c,d,a.ga):b.detachEvent&&b.detachEvent(Dc(c),d);yc--;(c=Bc(b))?(vc(c,a),0==c.ca&&(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.k[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var g=b[a];g&&g.ga==c&&!g.O&&(g=Hc(g,d),e=e&&!1!==g)}return e},Hc=function(a,b){var c=a.G,d=a.ka||a.src;a.fa&&Gc(a);return c.call(d,b)},Ec=function(a,b){if(a.O)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.N&&0<=m;m--){c.currentTarget=e[m];var K=Ic(e[m],g,!0,c),d=d&&K}for(m=0;!c.N&&m<e.length;m++)c.currentTarget=e[m],K=Ic(e[m],g,!1,c),d=d&&K}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){z(a,"Listener can not be null.");if(q(a))return a;z(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.r=new tc(this);this.wb=this;this.Sa=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.Sa;if(c){b=[];for(var d=1;c;c=c.Sa)b.push(c),z(1E3>++d,"infinite loop")}c=this.wb;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);ua(a,e)}var e=!0,g;if(b)for(var f=b.length-1;!a.N&&0<=f;f--)g=a.currentTarget=b[f],e=Mc(g,d,!0,a)&&e;a.N||(g=a.currentTarget=c,e=Mc(g,d,!0,a)&&e,a.N||(e=Mc(g,d,!1,a)&&e));if(b)for(f=0;!a.N&&f<b.length;f++)g=a.currentTarget=b[f],e=Mc(g,d,!1,a)&&e;return e};
h.U=function(){Kc.p.U.call(this);this.r&&this.r.gc();this.Sa=null};h.ib=function(a,b,c,d){Lc(this);this.r.add(String(a),b,!1,c,d)};h.Wb=function(a){this.r.add("ready",a,!0,void 0,void 0)};h.kc=function(a,b,c,d){this.r.remove(String(a),b,c,d)};var Mc=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.O&&f.ga==c){var m=f.G,K=f.ka||f.src;f.fa&&vc(a.r,f);e=!1!==m.call(K,d)&&e}}return e&&0!=d.mb};
Kc.prototype.Ma=function(a,b,c,d){return this.r.Ma(String(a),b,c,d)};var Lc=function(a){z(a.r,"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.vb=function(){return this};var Pc=function(a,b){this.s={};this.h=[];this.ya=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.addAll(a)};Pc.prototype.v=function(){Qc(this);for(var a=[],b=0;b<this.h.length;b++)a.push(this.s[this.h[b]]);return a};Pc.prototype.B=function(){Qc(this);return this.h.concat()};Pc.prototype.T=function(a){return Rc(this.s,a)};
Pc.prototype.remove=function(a){return Rc(this.s,a)?(delete this.s[a],this.j--,this.ya++,this.h.length>2*this.j&&Qc(this),!0):!1};var Qc=function(a){if(a.j!=a.h.length){for(var b=0,c=0;b<a.h.length;){var d=a.h[b];Rc(a.s,d)&&(a.h[c++]=d);b++}a.h.length=c}if(a.j!=a.h.length){for(var e={},c=b=0;b<a.h.length;)d=a.h[b],Rc(e,d)||(a.h[c++]=d,e[d]=1),b++;a.h.length=c}};h=Pc.prototype;h.get=function(a,b){return Rc(this.s,a)?this.s[a]:b};
h.set=function(a,b){Rc(this.s,a)||(this.j++,this.h.push(a),this.ya++);this.s[a]=b};h.addAll=function(a){var b;a instanceof Pc?(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 Pc(this)};
h.vb=function(a){Qc(this);var b=0,c=this.ya,d=this,e=new Oc;e.next=function(){if(c!=d.ya)throw Error("The map has changed since the iterator was created");if(b>=d.h.length)throw Nc;var e=d.h[b++];return a?e:d.s[e]};return e};var Rc=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var Sc=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)},Tc=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=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.cb=null;var Vc=0;Uc.prototype.reset=function(a,b,c,d,e){"number"==typeof e||Vc++;d||ka();this.aa=a;this.Zb=b;delete this.cb};Uc.prototype.pb=function(a){this.aa=a};var Wc=function(a){this.$b=a;this.fb=this.Ea=this.aa=this.e=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.e};Wc.prototype.Nb=function(){this.Ea||(this.Ea={});return this.Ea};Wc.prototype.pb=function(a){this.aa=a};var ad=function(a){if(a.aa)return a.aa;if(a.e)return ad(a.e);Ba("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.$b),c&&(a.cb=c),c="log:"+a.Zb,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 bd={},cd=null,dd=function(a){cd||(cd=new Wc(""),bd[""]=cd,cd.pb(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.Nb()[d]=b;b.e=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=cb,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.Ya=null;kd.prototype.X=function(){var a;(a=this.Ya)||(a={},ld(this)&&(a[0]=!0,a[1]=!0),a=this.Ya=a);return a};var md=function(a,b){this.mc=a;this.fc=b};v(md,kd);md.prototype.Fa=function(){return this.mc()};md.prototype.X=function(){return this.fc()};var D=function(){return D.eb.Fa()};D.ub=!1;D.X=function(){return D.eb.X()};D.tc=function(a,b){D.ob(new md(z(a),z(b)))};D.ob=function(a){D.eb=a};var nd=function(){};v(nd,kd);nd.prototype.Fa=function(){var a=ld(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var ld=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 nd);var E=function(a){Kc.call(this);this.headers=new Pc;this.Ba=a||null;this.A=!1;this.Aa=this.a=null;this.$=this.hb=this.na="";this.F=this.Na=this.ma=this.Ha=!1;this.R=0;this.ta=null;this.lb="";this.xa=this.lc=!1};v(E,Kc);var od=E.prototype,pd=dd("goog.net.XhrIo");od.o=pd;var qd=/^https?$/i,rd=["POST","PUT"],sd=[],ud=function(a,b,c,d,e){var g=td,f=new E;sd.push(f);b&&f.ib("complete",b);f.Wb(f.Ab);g&&(f.R=Math.max(0,g));f.send(a,c,d,e)};E.prototype.Ab=function(){this.Eb();Ja(sd,this)};
E.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.na+"; newUri="+a);b=b?b.toUpperCase():"GET";this.na=a;this.$="";this.hb=b;this.Ha=!1;this.A=!0;this.a=this.Ba?this.Ba.Fa():D();this.Aa=this.Ba?this.Ba.X():D.X();this.a.onreadystatechange=t(this.kb,this);try{ed(this.o,vd(this,"Opening Xhr")),this.Na=!0,this.a.open(b,String(a),!0),this.Na=!1}catch(e){ed(this.o,vd(this,"Error opening Xhr: "+e.message));this.ia(5,e);return}a=c||"";var g=
this.headers.clone();d&&Tc(d,function(a,b){g.set(b,a)});d=Ia(g.B());c=k.FormData&&a instanceof k.FormData;!(0<=Da(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.lb&&(this.a.responseType=this.lb);"withCredentials"in this.a&&(this.a.withCredentials=this.lc);try{wd(this),0<this.R&&(this.xa=xd(this.a),ed(this.o,vd(this,"Will abort after "+this.R+"ms if incomplete, xhr2 "+this.xa)),this.xa?(this.a.timeout=
this.R,this.a.ontimeout=t(this.ba,this)):this.ta=fd(this.ba,this.R,this)),ed(this.o,vd(this,"Sending request")),this.ma=!0,this.a.send(a),this.ma=!1}catch(f){ed(this.o,vd(this,"Send error: "+f.message)),this.ia(5,f)}};var xd=function(a){return C&&hb(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.$="Timed out after "+this.R+"ms, aborting",ed(this.o,vd(this,this.$)),this.dispatchEvent("timeout"),this.abort(8))};E.prototype.ia=function(a,b){this.A=!1;this.a&&(this.F=!0,this.a.abort(),this.F=!1);this.$=b;yd(this);zd(this)};var yd=function(a){a.Ha||(a.Ha=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
E.prototype.abort=function(){this.a&&this.A&&(ed(this.o,vd(this,"Aborting")),this.A=!1,this.F=!0,this.a.abort(),this.F=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),zd(this))};E.prototype.U=function(){this.a&&(this.A&&(this.A=!1,this.F=!0,this.a.abort(),this.F=!1),zd(this,!0));E.p.U.call(this)};E.prototype.kb=function(){this.V||(this.Na||this.ma||this.F?Ad(this):this.ec())};E.prototype.ec=function(){Ad(this)};
var Ad=function(a){if(a.A&&"undefined"!=typeof aa)if(a.Aa[1]&&4==Bd(a)&&2==a.getStatus())ed(a.o,vd(a,"Local request error detected and ignored"));else if(a.ma&&4==Bd(a))fd(a.kb,0,a);else if(a.dispatchEvent("readystatechange"),4==Bd(a)){ed(a.o,vd(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=id(String(a.na))[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(K){ed(a.o,"Can not get status: "+K.message),m=""}a.$=m+" ["+a.getStatus()+"]";yd(a)}}finally{zd(a)}}},zd=function(a,b){if(a.a){wd(a);var c=a.a,d=a.Aa[0]?ba:null;a.a=null;a.Aa=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.o)&&c.log(Yc,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},
wd=function(a){a.a&&a.xa&&(a.a.ontimeout=null);ea(a.ta)&&(k.clearTimeout(a.ta),a.ta=null)},Bd=function(a){return a.a?a.a.readyState:0};E.prototype.getStatus=function(){try{return 2<Bd(this)?this.a.status:-1}catch(a){return-1}};E.prototype.getResponseHeader=function(a){return this.a&&4==Bd(this)?this.a.getResponseHeader(a):void 0};var vd=function(a,b){return b+" ["+a.hb+" "+a.na+" "+a.getStatus()+"]"};var Cd=function(a,b,c){this.j=this.d=null;this.q=a||null;this.Rb=!!c},Dd=function(a){a.d||(a.d=new Pc,a.j=0,a.q&&jd(a.q,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};h=Cd.prototype;h.add=function(a,b){Dd(this);this.q=null;a=Ed(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){Dd(this);a=Ed(this,a);return this.d.T(a)?(this.q=null,this.j-=this.d.get(a).length,this.d.remove(a)):!1};h.T=function(a){Dd(this);a=Ed(this,a);return this.d.T(a)};
h.B=function(){Dd(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){Dd(this);var b=[];if(p(a))this.T(a)&&(b=Ka(b,this.d.get(Ed(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){Dd(this);this.q=null;a=Ed(this,a);this.T(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 Cd;a.q=this.q;this.d&&(a.d=this.d.clone(),a.j=this.j);return a};
var Ed=function(a,b){var c=String(b);a.Rb&&(c=c.toLowerCase());return c};var Fd=null,Gd=null,Hd=null,Id=null,Jd=null,Kd=[],Ld=!1,td=0,Md={nc:"CANCEL",qc:"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&&(La(e,d),Na(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){k.console&&k.console.error&&k.console.error("ee.data.getInfo is DEPRECATED. Use ee.data.getValue() instead.");return F("/info",(new Cd).add("id",a),b)});u("ee.data.getList",function(a,b){var c=G(a);return F("/list",c,b)});var Pd=function(a,b){a=w(a);return F("/mapid",G(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=w(a);return F("/value",G(a),b)};u("ee.data.getValue",Qd);var Rd=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",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=w(a);return F("/download",G(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=w(a);return F("/table",G(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 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 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 F("/updatetask",G({id:a,action:b}),c,"POST")};u("ee.data.updateTask",Xd);
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:Ra(b)};return F("/ingestionrequest",G(a),c)});u("ee.data.getAssetRoots",function(a){return F("/buckets",null,a,"GET")});u("ee.data.getAssetAcl",function(a,b){return F("/getacl",G({id:a}),b,"GET")});
u("ee.data.setAssetAcl",function(a,b,c){a={id:a,value:Ra(b)};F("/setacl",G(a),c)});
var F=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&&("GET"==d?(a+=y(a,"?")?"&":"?",a+="xsrfToken="+Hd):(b||(b=new Cd),b.add("xsrfToken",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=Pa(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+=y(a,"?")?"&":"?",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.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)},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)})},G=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.t=-1};var $d=function(){this.t=-1;this.t=64;this.g=Array(4);this.yb=Array(this.t);this.ua=this.S=0;this.reset()};v($d,Zd);$d.prototype.reset=function(){this.g[0]=1732584193;this.g[1]=4023233417;this.g[2]=2562383102;this.g[3]=271733878;this.ua=this.S=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.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};
$d.prototype.update=function(a,b){l(b)||(b=a.length);for(var c=b-this.t,d=this.yb,e=this.S,g=0;g<b;){if(0==e)for(;g<=c;)ae(this,a,g),g+=this.t;if(p(a))for(;g<b;){if(d[e++]=a.charCodeAt(g++),e==this.t){ae(this,d);e=0;break}}else for(;g<b;)if(d[e++]=a[g++],e==this.t){ae(this,d);e=0;break}}this.S=e;this.ua+=b};
var ce=function(){var a=be,b=Array((56>a.S?a.t:2*a.t)-a.S);b[0]=128;for(var c=1;c<b.length-8;++c)b[c]=0;for(var d=8*a.ua,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 de=function(a){this.da="__ee_hash__";this.Pa=!1!==a;this.P=[];this.K={};this.Wa=[]};u("ee.Serializer",de);var fe=new Qa,be=new $d,he=function(a,b){return ge(new de(l(b)?b:!0),a)};u("ee.Serializer.encode",he);var ie=function(a){return fe.i(he(a))};u("ee.Serializer.toJSON",ie);var je=function(a){a=ge(new de(!1),a);return"JSON"in k?k.JSON.stringify(a,null," "):fe.i(a)};u("ee.Serializer.toReadableJSON",je);
var ge=function(a,b){var c=a.ha(b);a.Pa&&(c=r(c)&&"ValueRef"==c.type&&1==a.P.length?a.P[0][1]:{type:"CompoundValue",scope:a.P,value:c},a.P=[],Ea(a.Wa,t(function(a){delete a[this.da]},a)),a.Wa=[],a.K={});return c};
de.prototype.ha=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.K[c])return{type:"ValueRef",value:this.K[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.ha,this)),!(n(b)||r(b)&&"ArgumentRef"!=b.type))return b}else if(n(a))b=Fa(a,function(a){return this.ha(a)},
this);else if(r(a)&&!q(a))b=oa(a,function(a){if(!q(a))return this.ha(a)},this),ra(b,this.da),b={type:"Dictionary",value:b};else throw Error("Can't encode object: "+a);if(this.Pa){be.reset();be.update(fe.i(b));var c=ce().toString(),d;this.K[c]?d=this.K[c]:(d=String(this.P.length),this.P.push([d,b]),this.K[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,Yd);u("ee.ComputedObject",H);H.prototype.m=function(a){return Qd({json:this.i()},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.i=function(){return ie(this)};u("ee.ComputedObject.prototype.serialize",H.prototype.i);H.prototype.toString=function(){return"ee."+this.name()+"("+je(this)+")"};u("ee.ComputedObject.prototype.toString",H.prototype.toString);
H.prototype.name=function(){return"ComputedObject"};var ke=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 le={},me=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"},ne=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}},oe=function(a){return ea(a)||
a instanceof H&&"Number"==a.name()},pe=function(a){return p(a)||a instanceof H&&"String"==a.name()},qe=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,Yd);u("ee.Function",J);var re=function(a){return a};J.prototype.call=function(a){return this.apply(se(this,Array.prototype.slice.call(arguments,0)))};u("ee.Function.prototype.call",J.prototype.call);J.prototype.apply=function(a){a=new H(this,te(this,a));return re(a,this.n().returns)};u("ee.Function.prototype.apply",J.prototype.apply);
var ue=function(a,b,c){var d=l(b),e=a.n(),g=!1;if(1==c.length&&qe(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=se(a,d?[b].concat(c):c);return a.apply(c)},te=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]=re(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},se=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.i=function(){return ie(this)};var L=function(a,b){if(!l(b))return ve(a);if(!(this instanceof L))return I(L,arguments);this.Q=sa(b);this.Q.name=a};v(L,J);u("ee.ApiFunction",L);var M=function(a,b){return J.prototype.call.apply(ve(a),Array.prototype.slice.call(arguments,1))};u("ee.ApiFunction._call",M);var we=function(a,b){return ve(a).apply(b)};u("ee.ApiFunction._apply",we);L.prototype.encode=function(){return this.Q.name};L.prototype.n=function(){return this.Q};
var ma=null,xe={},ze=function(){ye();return oa(ma,function(a){return a.n()})},Ae=function(){ye();return na(function(a,b){return!xe[b]})},ve=function(a){var b=Be(a);if(!b)throw Error("Unknown built-in function name: "+a);return b};u("ee.ApiFunction.lookup",ve);
var Be=function(a){ye();return ma[a]||null},ye=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){ye();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();xe[f]=!0;var ia=!1;
if(K.args.length)var W=K.args[0].type,ia="Object"!=W&&ne(W,c);W=ia?a.prototype:a;m in W||(W[m]=function(a){return ue(d,ia?this:void 0,Array.prototype.slice.call(arguments,0))},W[m].toString=t(d.toString,d,m,ia),W[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);Ce()};v(P,H);u("ee.Element",P);var De=!1,Ce=function(){De||(N(P,"Element","Element"),De=!0)};P.prototype.name=function(){return"Element"};
P.prototype.set=function(a){var b;if(1>=arguments.length){var c=arguments[0];if(b=qe(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(qe(c)){b=this;for(var f in c)d=c[f],b=M("Element.set",b,f,d)}else if(c instanceof H&&Be("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 ke(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;Ee();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.W=a}else if(a instanceof H)H.call(this,a.b,a.c,a.f),this.W=[a];else{if(l(a))throw Error("Invalid argument specified for ee.Filter(): "+a);H.call(this,null,null);this.W=[]}};v(Q,H);u("ee.Filter",Q);
var Fe=!1,Ee=function(){Fe||(N(Q,"Filter","Filter"),Fe=!0)},Ge={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};Q.prototype.length=function(){return this.W.length};Q.prototype.length=Q.prototype.length;var R=function(a,b){var c=a.W.slice(0);b instanceof Q?La(c,b.W):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 He=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in Ge))throw Error("Unknown filtering operator: "+b);a=M("Filter."+Ge[b],a,c);return d?a.C():a};Q.metadata=He;var Ie=function(a,b){return M("Filter.equals",a,b)};Q.eq=Ie;var Je=function(a,b){return Ie(a,b).C()};Q.neq=Je;var Ke=function(a,b){return M("Filter.lessThan",a,b)};Q.lt=Ke;var Le=function(a,b){return Ke(a,b).C()};Q.gte=Le;var Me=function(a,b){return M("Filter.greaterThan",a,b)};
Q.gt=Me;var Ne=function(a,b){return Me(a,b).C()};Q.lte=Ne;var Oe=function(a,b){return M("Filter.stringContains",a,b)};Q.contains=Oe;var Pe=function(a,b){return Oe(a,b).C()};Q.not_contains=Pe;var Qe=function(a,b){return M("Filter.stringStartsWith",a,b)};Q.starts_with=Qe;var Re=function(a,b){return Qe(a,b).C()};Q.not_starts_with=Re;var Se=function(a,b){return M("Filter.stringEndsWith",a,b)};Q.ends_with=Se;var Te=function(a,b){return Se(a,b).C()};Q.not_ends_with=Te;
var Ue=function(a){return M("Filter.and",Array.prototype.slice.call(arguments))};Q.and=Ue;Q.or=function(a){return M("Filter.or",Array.prototype.slice.call(arguments))};var Ve=function(a,b){var c=M("DateRange",a,b);return we("Filter.dateRangeContains",{leftValue:c,rightField:"system:time_start"})};Q.date=Ve;var We=function(a,b,c,d){return we("Filter.listContains",{leftField:c,rightValue:d,rightField:a,leftValue:b})};Q.inList=We;
var Xe=function(a,b){return we("Filter.intersects",{leftField:".all",rightValue:M("Feature",a),maxError:b})};Q.bounds=Xe;Q.prototype.Gb=function(a){return R(this,Ie.apply(null,[].slice.call(arguments)))};Q.prototype.eq=Q.prototype.Gb;Q.prototype.ac=function(a){return R(this,Je.apply(null,[].slice.call(arguments)))};Q.prototype.neq=Q.prototype.ac;Q.prototype.Xb=function(a){return R(this,Ke.apply(null,[].slice.call(arguments)))};Q.prototype.lt=Q.prototype.Xb;
Q.prototype.Qb=function(a){return R(this,Le.apply(null,[].slice.call(arguments)))};Q.prototype.gte=Q.prototype.Qb;Q.prototype.Pb=function(a){return R(this,Me.apply(null,[].slice.call(arguments)))};Q.prototype.gt=Q.prototype.Pb;Q.prototype.Yb=function(a){return R(this,Ne.apply(null,[].slice.call(arguments)))};Q.prototype.lte=Q.prototype.Yb;Q.prototype.contains=function(a){return R(this,Oe.apply(null,[].slice.call(arguments)))};Q.prototype.contains=Q.prototype.contains;
Q.prototype.bc=function(a){return R(this,Pe.apply(null,[].slice.call(arguments)))};Q.prototype.not_contains=Q.prototype.bc;Q.prototype.ic=function(a){return R(this,Qe.apply(null,[].slice.call(arguments)))};Q.prototype.starts_with=Q.prototype.ic;Q.prototype.dc=function(a){return R(this,Re.apply(null,[].slice.call(arguments)))};Q.prototype.not_starts_with=Q.prototype.dc;Q.prototype.Fb=function(a){return R(this,Se.apply(null,[].slice.call(arguments)))};Q.prototype.ends_with=Q.prototype.Fb;
Q.prototype.cc=function(a){return R(this,Te.apply(null,[].slice.call(arguments)))};Q.prototype.not_ends_with=Q.prototype.cc;Q.prototype.xb=function(a){return R(this,Ue.apply(null,[].slice.call(arguments)))};Q.prototype.and=Q.prototype.xb;Q.prototype.Db=function(a){return R(this,Ve.apply(null,[].slice.call(arguments)))};Q.prototype.date=Q.prototype.Db;Q.prototype.Sb=function(a){return R(this,We.apply(null,[].slice.call(arguments)))};Q.prototype.inList=Q.prototype.Sb;
Q.prototype.bounds=function(a){return R(this,Xe.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);Ye()};v(S,P);u("ee.Collection",S);var Ze=!1,Ye=function(){Ze||(N(S,"Collection","Collection"),N(S,"AggregateFeatureCollection","Collection","aggregate_"),Ze=!0)};S.prototype.filter=function(a){if(!a)throw Error("Empty filters.");return ke(this,M("Collection.filter",this,a))};u("ee.Collection.prototype.filter",S.prototype.filter);S.prototype.Lb=function(a,b,c){return this.filter(He(a,b,c))};u("ee.Collection.prototype.filterMetadata",S.prototype.Lb);
S.prototype.Jb=function(a){return this.filter(Xe(a))};u("ee.Collection.prototype.filterBounds",S.prototype.Jb);S.prototype.Kb=function(a,b){return this.filter(Ve(a,b))};u("ee.Collection.prototype.filterDate",S.prototype.Kb);S.prototype.limit=function(a,b,c){return ke(this,M("Collection.limit",this,a,b,c))};u("ee.Collection.prototype.limit",S.prototype.limit);S.prototype.sort=function(a,b){return ke(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 ke(this,M("Collection.map",this,function(c){return a(new b(c))}))};u("ee.Collection.prototype.map",S.prototype.map);S.prototype.Ub=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.Ub);var $e=function(a){if(!(this instanceof $e))return I($e,arguments);if(a instanceof $e)return a;af();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($e,H);u("ee.Number",$e);var bf=!1,af=function(){bf||(N($e,"Number","Number"),bf=!0)};$e.prototype.encode=function(a){return ea(this.Ra)?this.Ra:$e.p.encode.call(this,a)};$e.prototype.name=function(){return"Number"};var T=function(a){if(!(this instanceof T))return I(T,arguments);if(a instanceof T)return a;cf();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 df=!1,cf=function(){df||(N(T,"String","String"),df=!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 ef=function(a,b){if(!(this instanceof ef))return I(ef,arguments);for(var c=[],d=a.args,e=0;e<d.length;e++){var g=d[e],f=g.type;c.push(ff(f in le?le[f]:null,g.name))}if(!l(b.apply(null,c)))throw Error("User-defined methods must return a value.");this.Q=gf(a,c,b);this.zb=b.apply(null,c)};v(ef,J);u("ee.CustomFunction",ef);ef.prototype.encode=function(a){return{type:"Function",argumentNames:Fa(this.Q.args,function(a){return a.name}),body:a(this.zb)}};ef.prototype.n=function(){return this.Q};
var ff=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=$e;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},hf=function(a,b){var c=Fa(b,function(a){return{name:null,type:p(a)?a:me(a)}}),c={name:"",returns:p("Object")?"Object":me("Object"),args:c};return new ef(c,a)},gf=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=he(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 jf=function(a,b){if(!(this instanceof jf))return I(jf,arguments);if(a instanceof jf)return a;kf();var c=new L("Date"),d={},e=null;if(pe(a)){if(d.value=a,b)if(pe(b))d.timeZone=b;else throw Error("Invalid argument specified for ee.Date(..., opt_tz): "+b);}else if(oe(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(jf,H);u("ee.Date",jf);var lf=!1,kf=function(){lf||(N(jf,"Date","Date"),lf=!0)};jf.prototype.name=function(){return"Date"};var U=function(a,b,c){if(!(this instanceof U))return I(U,arguments);mf();var d=null!=b||null!=c;if(a instanceof H&&!(a instanceof U&&a.va)){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 U&&(a=a.encode());if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!nf(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));
H.call(this,null,null);this.va=a.type;this.Bb=a.coordinates||null;this.Mb=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).i(a.crs));this.Ka=c;!l(c)&&"geodesic"in a&&(this.Ka=Boolean(a.geodesic))}};v(U,H);u("ee.Geometry",U);
var of=!1,mf=function(){of||(N(U,"Geometry","Geometry"),of=!0)},pf=function(a,b){if(!(this instanceof pf))return qf(pf,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]}U.call(this,{type:"Point",coordinates:[a,b]})};v(pf,U);U.Point=pf;
var rf=function(a){if(!(this instanceof rf))return qf(rf,arguments);U.call(this,{type:"MultiPoint",coordinates:sf(a,2,arguments)})};v(rf,U);U.MultiPoint=rf;var tf=function(a,b,c,d){if(!(this instanceof tf))return I(tf,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]}U.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};v(tf,U);U.Rectangle=tf;
var uf=function(a){if(!(this instanceof uf))return qf(uf,arguments);U.call(this,{type:"LineString",coordinates:sf(a,2,arguments)})};v(uf,U);U.LineString=uf;var vf=function(a){if(!(this instanceof vf))return qf(vf,arguments);U.call(this,{type:"LinearRing",coordinates:sf(a,2,arguments)})};v(vf,U);U.LinearRing=vf;var wf=function(a){if(!(this instanceof wf))return qf(wf,arguments);U.call(this,{type:"MultiLineString",coordinates:sf(a,3,arguments)})};v(wf,U);U.MultiLineString=wf;
var xf=function(a){if(!(this instanceof xf))return qf(xf,arguments);U.call(this,{type:"Polygon",coordinates:sf(a,3,arguments)})};v(xf,U);U.Polygon=xf;var yf=function(a){if(!(this instanceof yf))return qf(yf,arguments);U.call(this,{type:"MultiPolygon",coordinates:sf(a,4,arguments)})};v(yf,U);U.MultiPolygon=yf;
U.prototype.encode=function(a){if(!this.va){if(!a)throw Error("Must specify an encode function when encoding a computed geometry.");return H.prototype.encode.call(this,a)}a={type:this.va};"GeometryCollection"==this.va?a.geometries=this.Mb:a.coordinates=this.Bb;null!=this.Ta&&(a.crs={type:"name",properties:{name:this.Ta}});null!=this.Ka&&(a.geodesic=this.Ka);return a};U.prototype.qb=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return this.encode()};
U.prototype.toGeoJSON=U.prototype.qb;U.prototype.rb=function(){if(this.b)throw Error("Can't convert a computed Geometry to GeoJSON. Use getInfo() instead.");return(new Qa).i(this.qb())};U.prototype.toGeoJSONString=U.prototype.rb;U.prototype.i=function(){return ie(this)};U.prototype.serialize=U.prototype.i;U.prototype.toString=function(){return"ee.Geometry("+this.rb()+")"};
var nf=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(!nf(b[a]))return!1;return!0}a=a.coordinates;var c=zf(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)},zf=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=zf(a[0]),c=1;c<a.length;c++)if(zf(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},sf=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(zf(a)!=b)throw Error("Invalid geometry");1==a.length&&0==a[0].length&&(a=[]);return a},qf=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};U.prototype.name=function(){return"Geometry"};u("ee.Deserializer",function(){});u("ee.Deserializer.fromJSON",function(a){return Af(Oa(a))});var Af=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]=Bf(g,b)}a=a.value}return Bf(a,b)};u("ee.Deserializer.decode",Af);
var Bf=function(a,b){if(null===a||ea(a)||"boolean"==typeof a||p(a))return a;if(n(a))return Fa(a,function(a){return Bf(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 ff(Object,c);case "Date":c=a.value;if(!ea(c))throw Error("Invalid date value: "+c);return new jf(c/1E3);case "Bytes":return c=
new Yd,c.encode=function(){return a},c;case "Invocation":var c="functionName"in a?ve(a.functionName):Bf(a["function"],b),d=oa(a.arguments,function(a){return Bf(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 Bf(a,b)});case "Function":var e=Bf(a.body,b),c={name:"",args:Fa(a.argumentNames,function(a){return{name:a,type:"Object",optional:!1}}),returns:"Object"};
return new ef(c,function(){return e});case "Point":case "MultiPoint":case "LineString":case "MultiLineString":case "Polygon":case "MultiPolygon":case "LinearRing":case "GeometryCollection":return new U(a);case "CompoundValue":throw Error("Nested CompoundValues are disallowed.");default:throw Error("Unknown encoded object type: "+c);}};var Cf=function(a){if(!(this instanceof Cf))return I(Cf,arguments);if(a instanceof Cf)return a;Df();if(qe(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(Cf,H);u("ee.Dictionary",Cf);var Ef=!1,Df=function(){Ef||(N(Cf,"Dictionary","Dictionary"),Ef=!0)};Cf.prototype.encode=function(a){return null===this.Ga?Cf.p.encode.call(this,a):a(this.Ga)};Cf.prototype.name=function(){return"Dictionary"};var V=function(a,b){if(!(this instanceof V))return I(V,arguments);if(a instanceof V){if(b)throw Error("Can't create Feature out of a Feature and properties.");return a}if(2<arguments.length)throw Error("The Feature constructor takes at most 2 arguments ("+arguments.length+" given)");Ff();if(a instanceof U||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 U(a.geometry),metadata:c})}else P.call(this,new L("Feature"),{geometry:new U(a),metadata:b||null})};v(V,P);u("ee.Feature",V);var Gf=!1,Ff=function(){Gf||(N(V,"Feature","Feature"),Gf=!0)};V.prototype.m=function(a){return V.p.m.call(this,a)};V.prototype.getInfo=V.prototype.m;V.prototype.getMap=function(a,b){return M("Collection",[this]).getMap(a,b)};
V.prototype.getMap=V.prototype.getMap;V.Point=function(a,b){return pf.apply(null,arguments)};V.MultiPoint=function(a){return rf.apply(null,arguments)};V.Rectangle=function(a,b,c,d){return new tf(a,b,c,d)};V.LineString=function(a){return uf.apply(null,arguments)};V.LinearRing=function(a){return vf.apply(null,arguments)};V.MultiLine=function(a){return wf.apply(null,arguments)};V.Polygon=function(a){return xf.apply(null,arguments)};V.MultiPolygon=function(a){return yf.apply(null,arguments)};
V.prototype.name=function(){return"Feature"};var Hf=function(a){if(this instanceof Hf){if(1<arguments.length)throw Error("ee.List() only accepts 1 argument.");if(a instanceof Hf)return a}else return I(Hf,arguments);If();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(Hf,H);u("ee.List",Hf);var Jf=!1,If=function(){Jf||(N(Hf,"List","List"),Jf=!0)};
Hf.prototype.encode=function(a){return n(this.Qa)?Fa(this.Qa,function(b){return a(b)}):Hf.p.encode.call(this,a)};Hf.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)");Kf();a instanceof U&&(a=new V(a));a instanceof V&&(a=[a]);if(oe(a)||pe(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 V(a)})});else if(a instanceof Hf)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 Lf=!1,Kf=function(){Lf||(N(X,"FeatureCollection","FeatureCollection"),Lf=!0)};X.prototype.getMap=function(a,b){var c=we("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.i();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.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 V};var Y=function(a){if(!(this instanceof Y))return I(Y,arguments);if(a instanceof Y)return a;Mf();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(oe(a))P.call(this,new L("Image.constant"),{value:a});else if(pe(a))P.call(this,new L("Image.load"),{id:a});else{if(n(a))return Nf(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(pe(b)&&oe(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 Of=!1,Mf=function(){Of||(N(Y,"Image","Image"),N(Y,"Window","Image","focal_"),Of=!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.i();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.La=function(a,b){var c=a?w(a):{};c.image=this.i();if(b)Td(c,function(a,c){a?b(Ud(a)):b(null,c)});else return Ud(Td(c))};Y.prototype.getDownloadURL=Y.prototype.La;
Y.prototype.Ob=function(a,b){var c=a?w(a):{};c.image=this.i();if(c.region)if(n(c.region)||qe(c.region))c.region=Ra(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.Ob;Y.rgb=function(a,b,c){return Nf([a,b,c],["vis-red","vis-green","vis-blue"])};
Y.cat=function(a){return Nf(Array.prototype.slice.call(arguments),null)};var Nf=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||pe(b[0])||oe(b[0])){for(var d=0;d<b.length;d++)if(!(pe(b[d])||oe(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 we("Image.select",c)};Y.prototype.select=Y.prototype.select;
Y.prototype.Ib=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.Ib;
Y.prototype.clip=function(a){try{a=new U(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)");Pf();a instanceof Y&&(a=[a]);if(pe(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 Qf=!1,Pf=function(){Qf||(N(Z,"ImageCollection","ImageCollection"),N(Z,"reduce","ImageCollection"),Qf=!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 Rf={};u("ee.Terrain",Rf);Rf.Oa=!1;Rf.Tb=function(){Rf.Oa||(N(Rf,"Terrain","Terrain"),Rf.Oa=!0)};Rf.reset=function(){O(Rf);Rf.Oa=!1};u("ee.initialize",function(a,b,c,d,e){if("ready"!=Sf||a||b){var g=null!=c;if(d)if(g)Tf.push(d);else throw Error("Can't pass an error callback without a success callback.");if("loading"==Sf&&g)Uf.push(c);else if(Sf="loading",Nd(a,b,e),g)Uf.push(c),ye(Vf,Wf);else try{ye(),Vf()}catch(f){throw Wf(f),f;}}else c&&c()});
u("ee.reset",function(){Sf="not_ready";Jd=Hd=Gd=Fd=null;Kd=[];Id=null;Ld=!1;ma=null;xe={};O(jf);lf=!1;O(Cf);Ef=!1;O(P);De=!1;O(Y);Of=!1;O(V);Gf=!1;O(S);Ze=!1;O(Z);Qf=!1;O(X);Lf=!1;O(Q);Fe=!1;O(U);of=!1;O(Hf);Jf=!1;O($e);bf=!1;O(T);df=!1;Rf.reset();for(var a=k.ee,b=0;b<Xf.length;b++){var c=Xf[b];O(a[c]);delete a[c]}Xf=[];le=a;var a=Yf,d;for(d in a)delete a[d]});u("ee.InitState",{oc:"not_ready",LOADING:"loading",pc:"ready"});u("ee.InitState.NOT_READY","not_ready");u("ee.InitState.LOADING","loading");
u("ee.InitState.READY","ready");var Sf="not_ready",Uf=[],Tf=[];u("ee.TILE_SIZE",256);var Xf=[],Yf={};u("ee.Algorithms",Yf);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 Vf=function(){if("loading"==Sf){try{kf();Df();Ce();Mf();Ff();Ye();Pf();Kf();Ee();mf();If();af();cf();Rf.Tb();var a=ze(),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]=Zf(f),Xf.push(f),a[f]?(g[f].signature=a[f],g[f].signature.isConstructor=!0,xe[f]=!0):g[f].signature={});le=g;$f()}catch(m){Wf(m);return}Sf="ready";for(Tf=[];0<Uf.length;)Uf.shift()()}},Wf=function(a){if("loading"==
Sf)for(Sf="not_ready",Uf=[];0<Tf.length;)Tf.shift()(a)},$f=function(){var a=Ae();qa(a).sort().forEach(function(b){var c=a[b],d=c.n();if(!d.hidden){b=b.split(".");var e=Yf;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 ue(c,void 0,Array.prototype.slice.call(arguments,0))};g.signature=d;g.toString=t(c.toString,c);e[b[0]]=g}})},Zf=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=Be(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,te(d,se(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},re=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 V(a);case "Element":if(a instanceof P)return a;if(a instanceof U)return new V(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 U(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 hf(a,d)}if(a instanceof Yd)return a;throw Error("Argument is not a function: "+a);case "String":return pe(a)||a instanceof T||a instanceof H?new T(a):a;case "Dictionary":return qe(a)?a:new Cf(a);case "List":return new Hf(a);case "Number":case "Float":case "Long":case "Integer":case "Short":case "Byte":return new $e(a);default:if(b in c){d=Be(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}}};C&&hb("11");})();
//@ sourceMappingURL=ee_api_js.sourcemap