2013-08-15 18:08:49 -07:00

93 lines
50 KiB
JavaScript

(function() {var f,aa=aa||{},k=this,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},m=function(a){return void 0!==a},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},q=function(a){return"number"==typeof a},r=function(a){return"function"==ca(a)},ea=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},ga=function(a){"removeAttribute"in
a&&a.removeAttribute(fa);try{delete a[fa]}catch(b){}},fa="closure_uid_"+(1E9*Math.random()>>>0),ha=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)}},s=function(a,b,c){s=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?
ia:ja;return s.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||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b},v=function(a,b){function c(){}c.prototype=b.prototype;a.R=b.prototype;a.prototype=new c;a.prototype.constructor=a};
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 s.apply(null,c)}return s(this,a)};var la=function(a,b){for(var c in a)b.call(void 0,a[c],c,a)},ma=function(a){var b=w,c={},d;for(d in b)a.call(void 0,b[d],d,b)&&(c[d]=b[d]);return c},na=function(a,b,c){var d={},e;for(e in a)d[e]=b.call(c,a[e],e,a);return d},oa=function(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b},pa=function(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b},qa=function(a){var b=ca(a);if("object"==b||"array"==b){if(a.F)return a.F();var b="array"==b?[]:{},c;for(c in a)b[c]=qa(a[c]);return b}return a},ra="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),
sa=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<ra.length;g++)c=ra[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},ta=function(a){var b=arguments.length;if(1==b&&n(arguments[0]))return ta.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c};var ua=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);},va=function(a){this.aa=a};va.prototype.e=function(a){var b=[];wa(this,a,b);return b.join("")};
var wa=function(a,b,c){switch(typeof b){case "string":xa(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?b:"null");break;case "boolean":c.push(b);break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(n(b)){var d=b.length;c.push("[");for(var e="",g=0;g<d;g++)c.push(e),e=b[g],wa(a,a.aa?a.aa.call(b,String(g),e):e,c),e=",";c.push("]");break}c.push("{");d="";for(g in b)Object.prototype.hasOwnProperty.call(b,g)&&(e=b[g],"function"!=typeof e&&(c.push(d),xa(g,
c),c.push(":"),wa(a,a.aa?a.aa.call(b,g,e):e,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b);}},ya={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},za=/\uffff/.test("\uffff")?/[\\\"\x00-\x1f\x7f-\uffff]/g:/[\\\"\x00-\x1f\x7f-\xff]/g,xa=function(a,b){b.push('"',a.replace(za,function(a){if(a in ya)return ya[a];var b=a.charCodeAt(0),e="\\u";16>b?e+="000":256>b?e+="00":4096>b&&(e+="0");return ya[a]=
e+b.toString(16)}),'"')};var Aa=function(a){Error.captureStackTrace?Error.captureStackTrace(this,Aa):this.stack=Error().stack||"";a&&(this.message=String(a))};v(Aa,Error);Aa.prototype.name="CustomError";var Ba=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")},Ha=function(a){if(!Ca.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Da,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ea,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Fa,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Ga,"&quot;"));return a},Da=/&/g,Ea=/</g,Fa=/>/g,Ga=/\"/g,Ca=/[&<>\"]/;var Ia=function(a,b){b.unshift(a);Aa.call(this,Ba.apply(null,b));b.shift()};v(Ia,Aa);Ia.prototype.name="AssertionError";var x=function(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),e="Assertion failed";if(b)var e=e+(": "+b),g=d;throw new Ia(""+e,g||[]);}},Ja=function(a,b){throw new Ia("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));};var y=Array.prototype,Ka=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},La=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)},z=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,h=0;h<d;h++)h in g&&(e[h]=b.call(c,g[h],h,a));return e},Na=function(a){var b;t:{b=Ma;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 t}b=-1}return 0>b?null:p(a)?a.charAt(b):a[b]},Oa=function(a,b){var c=Ka(a,b),d;if(d=0<=c)x(null!=a.length),y.splice.call(a,c,1);return d},Pa=function(a){return y.concat.apply(y,arguments)},Qa=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],e;
if(n(d)||(e=da(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(e)for(var g=a.length,h=d.length,l=0;l<h;l++)a[g+l]=d[l];else a.push(d)}},Ra=function(a,b,c){x(null!=a.length);return 2>=arguments.length?y.slice.call(a,b):y.slice.call(a,b,c)};var Sa=function(){};Sa.prototype.oa=!1;Sa.prototype.Wa=function(){this.oa||(this.oa=!0,this.B())};Sa.prototype.B=function(){if(this.Ya)for(;this.Ya.length;)this.Ya.shift()()};var Ta=function(a,b){this.type=a;this.currentTarget=this.target=b};Ta.prototype.B=function(){};Ta.prototype.Wa=function(){};Ta.prototype.Z=!1;Ta.prototype.ab=!0;var Ua,Va,Wa,Xa,Ya=function(){return k.navigator?k.navigator.userAgent:null};Xa=Wa=Va=Ua=!1;var Za;if(Za=Ya()){var $a=k.navigator;Ua=0==Za.lastIndexOf("Opera",0);Va=!Ua&&(-1!=Za.indexOf("MSIE")||-1!=Za.indexOf("Trident"));Wa=!Ua&&-1!=Za.indexOf("WebKit");Xa=!Ua&&!Wa&&!Va&&"Gecko"==$a.product}var ab=Ua,bb=Va,cb=Xa,db=Wa,eb;
t:{var fb="",gb;if(ab&&k.opera)var hb=k.opera.version,fb="function"==typeof hb?hb():hb;else if(cb?gb=/rv\:([^\);]+)(\)|;)/:bb?gb=/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/:db&&(gb=/WebKit\/(\S+)/),gb)var ib=gb.exec(Ya()),fb=ib?ib[1]:"";if(bb){var jb,kb=k.document;jb=kb?kb.documentMode:void 0;if(jb>parseFloat(fb)){eb=String(jb);break t}}eb=fb}
var lb=eb,mb={},A=function(a){var b;if(!(b=mb[a])){b=0;for(var c=String(lb).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),e=Math.max(c.length,d.length),g=0;0==b&&g<e;g++){var h=c[g]||"",l=d[g]||"",F=RegExp("(\\d*)(\\D*)","g"),B=RegExp("(\\d*)(\\D*)","g");do{var t=F.exec(h)||["","",""],I=B.exec(l)||["","",""];if(0==t[0].length&&0==I[0].length)break;b=((0==t[1].length?0:parseInt(t[1],10))<(0==I[1].length?0:parseInt(I[1],10))?-1:(0==t[1].length?
0:parseInt(t[1],10))>(0==I[1].length?0:parseInt(I[1],10))?1:0)||((0==t[2].length)<(0==I[2].length)?-1:(0==t[2].length)>(0==I[2].length)?1:0)||(t[2]<I[2]?-1:t[2]>I[2]?1:0)}while(0==b)}b=mb[a]=0<=b}return b};bb&&A("9");!db||A("528");cb&&A("1.9b")||bb&&A("8")||ab&&A("9.5")||db&&A("528");cb&&!A("8")||bb&&A("9");var nb="closure_listenable_"+(1E6*Math.random()|0),ob=0;var pb=function(a,b,c,d,e){this.ha=a;this.kb=null;this.src=b;this.type=c;this.capture=!!d;this.ga=e;this.key=++ob;this.ia=this.ja=!1},qb=function(a){a.ia=!0;a.ha=null;a.kb=null;a.src=null;a.ga=null};var rb=function(a){this.src=a;this.k={};this.ea=0};rb.prototype.add=function(a,b,c,d,e){var g=this.k[a];g||(g=this.k[a]=[],this.ea++);var h;t:{for(h=0;h<g.length;++h){var l=g[h];if(!l.ia&&l.ha==b&&l.capture==!!d&&l.ga==e)break t}h=-1}-1<h?(a=g[h],c||(a.ja=!1)):(a=new pb(b,this.src,a,!!d,e),a.ja=c,g.push(a));return a};var C=function(){this.v=new rb(this);this.mb=this};v(C,Sa);C.prototype[nb]=!0;C.prototype.la=null;
C.prototype.dispatchEvent=function(a){sb(this);var b,c=this.la;if(c){b=[];for(var d=1;c;c=c.la)b.push(c),x(1E3>++d,"infinite loop")}c=this.mb;d=a.type||a;if(p(a))a=new Ta(a,c);else if(a instanceof Ta)a.target=a.target||c;else{var e=a;a=new Ta(d,c);sa(a,e)}var e=!0,g;if(b)for(var h=b.length-1;!a.Z&&0<=h;h--)g=a.currentTarget=b[h],e=tb(g,d,!0,a)&&e;a.Z||(g=a.currentTarget=c,e=tb(g,d,!0,a)&&e,a.Z||(e=tb(g,d,!1,a)&&e));if(b)for(h=0;!a.Z&&h<b.length;h++)g=a.currentTarget=b[h],e=tb(g,d,!1,a)&&e;return e};
C.prototype.B=function(){C.R.B.call(this);if(this.v){var a=this.v,b=0,c;for(c in a.k){for(var d=a.k[c],e=0;e<d.length;e++)++b,qb(d[e]);delete a.k[c];a.ea--}}this.la=null};
var tb=function(a,b,c,d){b=a.v.k[b];if(!b)return!0;var e=b.length;if(0<e){for(var g=Array(e),h=0;h<e;h++)g[h]=b[h];b=g}else b=[];e=!0;for(g=0;g<b.length;++g){var l=b[g];if(l&&!l.ia&&l.capture==c){var h=l.ha,F=l.ga||l.src;if(l.ja){var B=a.v,t=l.type;t in B.k&&Oa(B.k[t],l)&&(qb(l),0==B.k[t].length&&(delete B.k[t],B.ea--))}e=!1!==h.call(F,d)&&e}}return e&&!1!=d.ab},sb=function(a){x(a.v,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var ub="StopIteration"in k?k.StopIteration:Error("StopIteration"),vb=function(){};vb.prototype.next=function(){throw ub;};vb.prototype.Ab=function(){return this};var D=function(a,b){this.q={};this.d=[];this.fa=this.h=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else if(a){a instanceof D?(c=a.t(),d=a.m()):(c=pa(a),d=oa(a));for(var e=0;e<c.length;e++)this.set(c[e],d[e])}};D.prototype.m=function(){wb(this);for(var a=[],b=0;b<this.d.length;b++)a.push(this.q[this.d[b]]);return a};D.prototype.t=function(){wb(this);return this.d.concat()};
D.prototype.T=function(a){return Object.prototype.hasOwnProperty.call(this.q,a)};var wb=function(a){if(a.h!=a.d.length){for(var b=0,c=0;b<a.d.length;){var d=a.d[b];Object.prototype.hasOwnProperty.call(a.q,d)&&(a.d[c++]=d);b++}a.d.length=c}if(a.h!=a.d.length){for(var e={},c=b=0;b<a.d.length;)d=a.d[b],Object.prototype.hasOwnProperty.call(e,d)||(a.d[c++]=d,e[d]=1),b++;a.d.length=c}};D.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.q,a)?this.q[a]:b};
D.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.q,a)||(this.h++,this.d.push(a),this.fa++);this.q[a]=b};D.prototype.F=function(){return new D(this)};D.prototype.Ab=function(a){wb(this);var b=0,c=this.d,d=this.q,e=this.fa,g=this,h=new vb;h.next=function(){for(;;){if(e!=g.fa)throw Error("The map has changed since the iterator was created");if(b>=c.length)throw ub;var h=c[b++];return a?h:d[h]}};return h};var xb=function(a){if("function"==typeof a.m)return a.m();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 oa(a)},yb=function(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(da(a)||p(a))La(a,b,c);else{var d;if("function"==typeof a.t)d=a.t();else if("function"!=typeof a.m)if(da(a)||p(a)){d=[];for(var e=a.length,g=0;g<e;g++)d.push(g)}else d=pa(a);else d=void 0;for(var e=xb(a),g=e.length,h=0;h<g;h++)b.call(c,e[h],d&&d[h],a)}};var Ab=function(a){return zb(a||arguments.callee.caller,[])},zb=function(a,b){var c=[];if(0<=Ka(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(Bb(a)+"(");for(var d=a.arguments,e=0;e<d.length;e++){0<e&&c.push(", ");var g;g=d[e];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=Bb(g))?g:"[fn]";break;default:g=typeof g}40<g.length&&(g=g.substr(0,40)+"...");
c.push(g)}b.push(a);c.push(")\n");try{c.push(zb(a.caller,b))}catch(h){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")},Bb=function(a){if(Cb[a])return Cb[a];a=String(a);if(!Cb[a]){var b=/function ([^\(]+)/.exec(a);Cb[a]=b?b[1]:"[Anonymous]"}return Cb[a]},Cb={};var Db=function(a,b,c,d,e){this.reset(a,b,c,d,e)};Db.prototype.pb=0;Db.prototype.Ha=null;Db.prototype.Ga=null;var Eb=0;Db.prototype.reset=function(a,b,c,d,e){this.pb="number"==typeof e?e:Eb++;d||ka();this.K=a;this.gb=b;delete this.Ha;delete this.Ga};Db.prototype.Sa=function(a){this.K=a};var E=function(a){this.tb=a};E.prototype.Y=null;E.prototype.K=null;E.prototype.sa=null;E.prototype.Ta=null;var Fb=function(a,b){this.name=a;this.value=b};Fb.prototype.toString=function(){return this.name};var Gb=new Fb("SEVERE",1E3),Hb=new Fb("WARNING",900),Ib=new Fb("CONFIG",700),Jb=new Fb("FINE",500);E.prototype.getParent=function(){return this.Y};E.prototype.Sa=function(a){this.K=a};var Kb=function(a){if(a.K)return a.K;if(a.Y)return Kb(a.Y);Ja("Root logger has no level set.");return null};
E.prototype.log=function(a,b,c){if(a.value>=Kb(this).value)for(a=this.ub(a,b,c),b="log:"+a.gb,k.console&&(k.console.timeStamp?k.console.timeStamp(b):k.console.markTimeline&&k.console.markTimeline(b)),k.msWriteProfilerMark&&k.msWriteProfilerMark(b),b=this;b;){c=b;var d=a;if(c.Ta)for(var e=0,g=void 0;g=c.Ta[e];e++)g(d);b=b.getParent()}};
E.prototype.ub=function(a,b,c){var d=new Db(a,String(b),this.tb);if(c){d.Ha=c;var e;var g=arguments.callee.caller;try{var h;var l;i:{for(var F=["window","location","href"],B=k,t;t=F.shift();)if(null!=B[t])B=B[t];else{l=null;break i}l=B}if(p(c))h={message:c,name:"Unknown error",lineNumber:"Not available",fileName:l,stack:"Not available"};else{var I,T,F=!1;try{I=c.lineNumber||c.Zb||"Not available"}catch(vd){I="Not available",F=!0}try{T=c.fileName||c.filename||c.sourceURL||k.$googDebugFname||l}catch(wd){T=
"Not available",F=!0}h=!F&&c.lineNumber&&c.fileName&&c.stack&&c.message&&c.name?c:{message:c.message||"Not available",name:c.name||"UnknownError",lineNumber:I,fileName:T,stack:c.stack||"Not available"}}e="Message: "+Ha(h.message)+'\nUrl: <a href="view-source:'+h.fileName+'" target="_new">'+h.fileName+"</a>\nLine: "+h.lineNumber+"\n\nBrowser stack:\n"+Ha(h.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Ha(Ab(g)+"-> ")}catch(kd){e="Exception trying to expose exception! You win, we lose. "+kd}d.Ga=e}return d};
var Lb={},Mb=null,Nb=function(a){Mb||(Mb=new E(""),Lb[""]=Mb,Mb.Sa(Ib));var b;if(!(b=Lb[a])){b=new E(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Nb(a.substr(0,c));c.sa||(c.sa={});c.sa[d]=b;b.Y=c;Lb[a]=b}return b};var G=function(a,b){a&&a.log(Jb,b,void 0)};var Ob=function(a,b,c){if(r(a))c&&(a=s(a,c));else if(a&&"function"==typeof a.handleEvent)a=s(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<b?-1:k.setTimeout(a,b||0)};var Pb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),Qb=db,Rb=function(a,b){if(Qb){Qb=!1;var c=k.location;if(c){var d=c.href;if(d&&(d=(d=Rb(3,d))&&decodeURIComponent(d))&&d!=c.hostname)throw Qb=!0,Error();}}return b.match(Pb)[a]||null};var Sb=function(){};Sb.prototype.Va=null;Sb.prototype.H=function(){var a;(a=this.Va)||(a={},Tb(this)&&(a[0]=!0,a[1]=!0),a=this.Va=a);return a};var Ub=function(a,b){this.yb=a;this.xb=b};v(Ub,Sb);Ub.prototype.da=function(){return this.yb()};Ub.prototype.H=function(){return this.xb()};var H=function(){return H.Ra.da()};H.wb=!1;H.H=function(){return H.Ra.H()};H.hc=function(a,b){H.Za(new Ub(a,b))};H.Za=function(a){H.Ra=a};var Vb=function(){};v(Vb,Sb);Vb.prototype.da=function(){var a=Tb(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var Tb=function(a){if(H.wb)return"";if(!a.Ua&&"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.Ua=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.Ua};H.Za(new Vb);var J=function(a){C.call(this);this.headers=new D;this.Q=a||null;this.p=!1;this.M=this.a=null;this.G=this.va=this.N="";this.u=this.ba=this.L=this.ca=!1;this.A=0;this.O=null;this.wa="";this.P=this.ua=!1};v(J,C);var Wb=J.prototype,Xb=Nb("goog.net.XhrIo");Wb.f=Xb;var Yb=/^https?$/i,Zb=["POST","PUT"],$b=[],ac=function(a,b,c,d,e,g,h){var l=new J;$b.push(l);b&&(sb(l),l.v.add("complete",b,!1,void 0,void 0));l.v.add("ready",l.lb,!0,void 0,void 0);g&&(l.A=Math.max(0,g));h&&(l.ua=h);l.send(a,c,d,e)};
J.prototype.lb=function(){this.Wa();Oa($b,this)};
J.prototype.send=function(a,b,c,d){if(this.a)throw Error("[goog.net.XhrIo] Object is active with another request="+this.N+"; newUri="+a);b=b?b.toUpperCase():"GET";this.N=a;this.G="";this.va=b;this.ca=!1;this.p=!0;this.a=this.Q?this.Q.da():H();this.M=this.Q?this.Q.H():H.H();this.a.onreadystatechange=s(this.xa,this);try{G(this.f,K(this,"Opening Xhr")),this.ba=!0,this.a.open(b,a,!0),this.ba=!1}catch(e){G(this.f,K(this,"Error opening Xhr: "+e.message));bc(this,e);return}a=c||"";var g=this.headers.F();
d&&yb(d,function(a,b){g.set(b,a)});d=Na(g.t());c=k.FormData&&a instanceof k.FormData;!(0<=Ka(Zb,b))||(d||c)||g.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");yb(g,function(a,b){this.a.setRequestHeader(b,a)},this);this.wa&&(this.a.responseType=this.wa);"withCredentials"in this.a&&(this.a.withCredentials=this.ua);try{cc(this),0<this.A&&(this.P=bb&&A(9)&&q(this.a.timeout)&&m(this.a.ontimeout),G(this.f,K(this,"Will abort after "+this.A+"ms if incomplete, xhr2 "+this.P)),this.P?
(this.a.timeout=this.A,this.a.ontimeout=s(this.ya,this)):this.O=Ob(this.ya,this.A,this)),G(this.f,K(this,"Sending request")),this.L=!0,this.a.send(a),this.L=!1}catch(h){G(this.f,K(this,"Send error: "+h.message)),bc(this,h)}};var Ma=function(a){return"content-type"==a.toLowerCase()};J.prototype.ya=function(){"undefined"!=typeof aa&&this.a&&(this.G="Timed out after "+this.A+"ms, aborting",G(this.f,K(this,this.G)),this.dispatchEvent("timeout"),this.abort(8))};
var bc=function(a,b){a.p=!1;a.a&&(a.u=!0,a.a.abort(),a.u=!1);a.G=b;dc(a);ec(a)},dc=function(a){a.ca||(a.ca=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};J.prototype.abort=function(){this.a&&this.p&&(G(this.f,K(this,"Aborting")),this.p=!1,this.u=!0,this.a.abort(),this.u=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),ec(this))};J.prototype.B=function(){this.a&&(this.p&&(this.p=!1,this.u=!0,this.a.abort(),this.u=!1),ec(this,!0));J.R.B.call(this)};
J.prototype.xa=function(){this.oa||(this.ba||this.L||this.u?fc(this):this.hb())};J.prototype.hb=function(){fc(this)};
var fc=function(a){if(a.p&&"undefined"!=typeof aa)if(a.M[1]&&4==gc(a)&&2==hc(a))G(a.f,K(a,"Local request error detected and ignored"));else if(a.L&&4==gc(a))Ob(a.xa,0,a);else if(a.dispatchEvent("readystatechange"),4==gc(a)){G(a.f,K(a,"Request complete"));a.p=!1;try{var b=hc(a),c,d;t:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=!0;break t;default:d=!1}if(!(c=d)){var e;if(e=0===b){var g=Rb(1,String(a.N));if(!g&&self.location)var h=self.location.protocol,g=h.substr(0,h.length-
1);e=!Yb.test(g?g.toLowerCase():"")}c=e}if(c)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var l;try{l=2<gc(a)?a.a.statusText:""}catch(F){G(a.f,"Can not get status: "+F.message),l=""}a.G=l+" ["+hc(a)+"]";dc(a)}}finally{ec(a)}}},ec=function(a,b){if(a.a){cc(a);var c=a.a,d=a.M[0]?ba:null;a.a=null;a.M=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){(c=a.f)&&c.log(Gb,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}},cc=function(a){a.a&&a.P&&(a.a.ontimeout=
null);q(a.O)&&(k.clearTimeout(a.O),a.O=null)},gc=function(a){return a.a?a.a.readyState:0},hc=function(a){try{return 2<gc(a)?a.a.status:-1}catch(b){return(a=a.f)&&a.log(Hb,"Can not get status: "+b.message,void 0),-1}};J.prototype.Da=function(){try{return this.a?this.a.responseText:""}catch(a){return G(this.f,"Can not get responseText: "+a.message),""}};var K=function(a,b){return b+" ["+a.va+" "+a.N+" "+hc(a)+"]"};var ic=function(a,b,c){this.n=a||null;this.rb=!!c},kc=function(a){if(!a.c&&(a.c=new D,a.h=0,a.n))for(var b=a.n.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),e=null,g=null;0<=d?(e=b[c].substring(0,d),g=b[c].substring(d+1)):e=b[c];e=decodeURIComponent(e.replace(/\+/g," "));e=jc(a,e);a.add(e,g?decodeURIComponent(g.replace(/\+/g," ")):"")}};f=ic.prototype;f.c=null;f.h=null;f.add=function(a,b){kc(this);this.n=null;a=jc(this,a);var c=this.c.get(a);c||this.c.set(a,c=[]);c.push(b);this.h++;return this};
f.T=function(a){kc(this);a=jc(this,a);return this.c.T(a)};f.t=function(){kc(this);for(var a=this.c.m(),b=this.c.t(),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};f.m=function(a){kc(this);var b=[];if(p(a))this.T(a)&&(b=Pa(b,this.c.get(jc(this,a))));else{a=this.c.m();for(var c=0;c<a.length;c++)b=Pa(b,a[c])}return b};f.set=function(a,b){kc(this);this.n=null;a=jc(this,a);this.T(a)&&(this.h-=this.c.get(a).length);this.c.set(a,[b]);this.h++;return this};
f.get=function(a,b){var c=a?this.m(a):[];return 0<c.length?String(c[0]):b};f.toString=function(){if(this.n)return this.n;if(!this.c)return"";for(var a=[],b=this.c.t(),c=0;c<b.length;c++)for(var d=b[c],e=encodeURIComponent(String(d)),d=this.m(d),g=0;g<d.length;g++){var h=e;""!==d[g]&&(h+="="+encodeURIComponent(String(d[g])));a.push(h)}return this.n=a.join("&")};f.F=function(){var a=new ic;a.n=this.n;this.c&&(a.c=this.c.F(),a.h=this.h);return a};
var jc=function(a,b){var c=String(b);a.rb&&(c=c.toLowerCase());return c};var L={data:{}};L.data.U=null;L.data.D=null;L.data.X=!1;L.data.Oa=0;L.data.ib="/api";L.data.jb="https://earthengine.googleapis.com";L.data.W=function(a,b){null!=a?L.data.U=a:L.data.X||(L.data.U=L.data.ib);null!=b?L.data.D=b:L.data.X||(L.data.D=L.data.jb);L.data.X=!0};L.data.reset=function(){L.data.U=null;L.data.D=null;L.data.X=!1};L.data.gc=function(a){L.data.Oa=a};L.data.s=function(a,b){return L.data.i("/info",(new ic).add("id",a),b)};
L.data.Lb=function(a,b){var c=L.data.r(a);return L.data.i("/list",c,b)};L.data.ra=function(a,b){a.json_format="v2";return L.data.i("/mapid",L.data.r(a),b)};L.data.dc=function(a,b,c,d){var e=Math.pow(2,d);b%=e;0>b&&(b+=e);return[L.data.D,"map",a.mapid,d,b,c].join("/")+"?token="+a.token};L.data.Pa=function(a,b){a.json_format="v2";return L.data.i("/value",L.data.r(a),b)};
L.data.Ka=function(a,b){a.json_format="v2";n(a.size)&&(a.size=a.size.join("x"));var c=L.data.r(a).add("getid","1");return L.data.i("/thumb",c,b)};L.data.Ma=function(a){return L.data.D+"/api/thumb?thumbid="+a.thumbid+"&token="+a.token};L.data.Ja=function(a,b){a.json_format="v2";return L.data.i("/download",L.data.r(a),b)};L.data.La=function(a){return L.data.D+"/api/download?docid="+a.docid+"&token="+a.token};L.data.Xa=function(a){return L.data.i("/algorithms",null,a,"GET")};
L.data.bc=function(a,b,c){a={value:a,json_format:"v2"};void 0!==b&&(a.id=b);return L.data.i("/create",L.data.r(a),c)};L.data.ec=function(a,b){var c={};q(a)&&(c.count=a);return L.data.i("/newtaskid",L.data.r(c),b)};L.data.cc=function(a,b){if(p(a))a=[a];else if(!n(a))throw Error("Invalid task_id: expected a string or an array of strings.");return L.data.i("/taskstatus?q="+a.join(),null,b,"GET")};L.data.fc=function(a,b,c){b.tid=a;return L.data.i("/prepare",L.data.r(b),c)};
L.data.i=function(a,b,c,d){function e(a,b){var c=!1;try{var d=ua(a),e=d.data}catch(g){c=!0}var T=void 0;c||!("data"in d||"error"in d)?T="Malformed response: "+a:"error"in d&&(T=d.error.message);if(b)b(e,T);else{if(!T)return e;throw Error(T);}}L.data.W();d=d||"POST";a=L.data.U+a;b=b?b.toString():"";if(c)ac(a,function(a){return e(a.target.Da(),c)},d,b,{"Content-Type":"application/x-www-form-urlencoded"},L.data.Oa);else{var g=H();g.open(d,a,!1);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
g.send(b);return e(g.responseText,null)}};L.data.r=function(a){var b=new ic,c;for(c in a)b.set(c,a[c]);return b};
L.data.ic=function(a){var b=a||{};ac=function(a,c,g,h){var l=new function(){};l.target={};l.target.Da=function(){return a in b?p(b[a])?b[a]:b[a](a,c,g,h):'{"error": {}}'};setTimeout(s(c,l,l),0)};var c=function(){};c.prototype.open=function(a,b){this.url=b;this.method=a};c.prototype.setRequestHeader=function(){};c.prototype.send=function(a){this.responseText=this.url in b?p(b[this.url])?b[this.url]:b[this.url](this.url,this.method,a):(new va(void 0)).e({data:{url:this.url,method:this.method,data:a}})};
H=function(){return new c}};u("ee.data",L.data);L.data.getInfo=L.data.s;L.data.getList=L.data.Lb;L.data.getMapId=L.data.ra;L.data.getValue=L.data.Pa;L.data.getThumbId=L.data.Ka;L.data.makeThumbUrl=L.data.Ma;L.data.getDownloadId=L.data.Ja;L.data.makeDownloadUrl=L.data.La;var lc=function(){};var mc=function(a){this.na=!1!==a;this.C=[];this.ma={}},oc=function(a){return(new va).e(nc(new mc(!0),a))},pc=function(a){a=nc(new mc(!1),a);return"JSON"in window?window.JSON.stringify(a,null," "):(new va).e(a)},nc=function(a,b){var c=a.V(b);a.na&&(c=ea(c)&&"ValueRef"==c.type&&1==a.C.length?a.C[0][1]:{type:"CompoundValue",scope:a.C,value:c},a.C=[],a.ma={});return c};
mc.prototype.V=function(a){if(!m(a))throw Error("Can't encode an undefined value.");var b=ea(a)?a[fa]||(a[fa]=++ha):null,c=this.na?this.ma[b]:void 0;if(m(c))return{type:"ValueRef",value:c};if(null===a||"boolean"==typeof a||q(a)||p(a))return a;if(ea(a)&&"function"==typeof a.getFullYear)return{type:"Date",value:Math.floor(1E3*a.getTime())};if(a instanceof lc){if(a=a.j(s(this.V,this)),!ea(a)||"ArgumentRef"==a.type)return a}else if(n(a))a=z(a,function(a){return this.V(a)},this);else if(ea(a)&&!r(a))a=
na(a,function(a){if(!r(a))return this.V(a)},this),ga(a),a={type:"Dictionary",value:a};else throw Error("Can't encode object: "+a);return this.na?(c=String(this.C.length),this.C.push([c,a]),this.ma[b]=c,{type:"ValueRef",value:c}):a};u("ee.Serializer",mc);u("ee.Serializer.toJSON",oc);u("ee.Serializer.toReadableJSON",pc);var M=function(a,b){if(!(this instanceof M))return new M(a,b);this.w=a;this.o=b};v(M,lc);f=M.prototype;f.s=function(a){return L.data.Pa({json:this.e()},a)};f.j=function(a){var b={},c;for(c in this.o)m(this.o[c])&&(b[c]=a(this.o[c]));b={type:"Invocation",arguments:b};a=a(this.w);b[p(a)?"functionName":"function"]=a;return b};f.e=function(){return oc(this)};f.toString=function(){return"ee."+this.name()+"("+pc(this)+")"};f.name=function(){return"ComputedObject"};u("ee.ComputedObject",M);
M.prototype.getInfo=M.prototype.s;M.prototype.serialize=M.prototype.e;M.prototype.toString=M.prototype.toString;var N=function(){if(!(this instanceof N))return new N};v(N,lc);var qc=function(a){return a};N.prototype.call=function(a){return this.apply(rc(this,Array.prototype.slice.call(arguments,0)))};
N.prototype.apply=function(a){for(var b=M,c=this.l().args,d={},e={},g=0;g<c.length;g++){var h=c[g].name;if(h in a&&m(a[h]))d[h]=qc(a[h],c[g].type);else if(!c[g].optional)throw Error("Required argument ("+h+") missing to function: "+this);e[h]=!0}var c=[],l;for(l in a)e[l]||c.push(l);if(0<c.length)throw Error("Unrecognized arguments ("+c+") to function: "+this);return qc(new b(this,d),this.l().returns)};
var rc=function(a,b){var c=a.l().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};
N.prototype.toString=function(a,b){var c=this.l(),d=[];d.push(a||c.name);d.push("(");d.push(z(c.args.slice(1),function(a){return a.name}).join(", "));d.push(")\n");c.description&&(d.push("\n"),d.push(c.description),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("): ");d.push(g.description)}}return d.join("")};
N.prototype.e=function(){return oc(this)};var O=function(a,b,c){if(!(this instanceof O))return new O(a,b,c);if(a instanceof O)if(null!=b||null!=c)a=a.j();else return a;if(3<arguments.length)throw Error("The Geometry constructor takes at most 3 arguments ("+arguments.length+" given)");if(!sc(a))throw Error("Invalid GeoJSON geometry: "+JSON.stringify(a));this.Fa=a.type;this.eb=a.coordinates||null;this.fb=a.geometries||null;this.Ea=b;this.pa=c;!m(c)&&"geodesic"in a&&(this.pa=Boolean(a.geodesic))};v(O,lc);
var tc=function(a,b){if(!(this instanceof tc))return uc(tc,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]}O.call(this,{type:"Point",coordinates:[a,b]})};v(tc,O);var vc=function(a){if(!(this instanceof vc))return uc(vc,arguments);O.call(this,{type:"MultiPoint",coordinates:wc(a,2,arguments)})};v(vc,O);
var xc=function(a,b,c,d){if(!(this instanceof xc))return new xc(a,b,c,d);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]}O.call(this,{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]})};v(xc,O);var yc=function(a){if(!(this instanceof yc))return uc(yc,arguments);O.call(this,{type:"LineString",coordinates:wc(a,2,arguments)})};v(yc,O);
var zc=function(a){if(!(this instanceof zc))return uc(zc,arguments);O.call(this,{type:"LinearRing",coordinates:wc(a,2,arguments)})};v(zc,O);var Ac=function(a){if(!(this instanceof Ac))return uc(Ac,arguments);O.call(this,{type:"MultiLineString",coordinates:wc(a,3,arguments)})};v(Ac,O);var Bc=function(a){if(!(this instanceof Bc))return uc(Bc,arguments);O.call(this,{type:"Polygon",coordinates:wc(a,3,arguments)})};v(Bc,O);
var Cc=function(a){if(!(this instanceof Cc))return uc(Cc,arguments);O.call(this,{type:"MultiPolygon",coordinates:wc(a,4,arguments)})};v(Cc,O);f=O.prototype;f.j=function(){var a={type:this.Fa};"GeometryCollection"==this.Fa?a.geometries=this.fb:a.coordinates=this.eb;null!=this.Ea&&(a.crs={type:"name",properties:{name:this.Ea}});null!=this.pa&&(a.geodesic=this.pa);return a};f.Qa=function(){return this.j()};f.$a=function(){return(new va).e(this.Qa())};f.e=function(){return oc(this)};
f.toString=function(){return"ee.Geometry("+this.$a()+")"};
var sc=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(!sc(b[a]))return!1;return!0}a=Dc(a.coordinates);return"Point"==b&&1==a||"MultiPoint"==b&&2==a||"LineString"==b&&2==a||"LinearRing"==b&&2==a||"MultiLineString"==b&&3==a||"Polygon"==b&&3==a||"MultiPolygon"==b&&4==a},Dc=function(a){if(!n(a))return-1;if(n(a[0])){for(var b=Dc(a[0]),c=1;c<a.length;c++)if(Dc(a[c])!=b)return-1;return b+1}for(c=0;c<a.length;c++)if(!q(a[c]))return-1;return 0==
a.length%2?1:-1},wc=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(Dc(a)!=b)throw Error("Invalid geometry");return a},uc=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("ee.Geometry",O);O.Point=tc;O.MultiPoint=vc;O.Rectangle=xc;O.LineString=yc;O.LinearRing=zc;O.MultiLineString=Ac;O.Polygon=Bc;O.MultiPolygon=Cc;O.prototype.encode=O.prototype.j;O.prototype.serialize=O.prototype.e;O.prototype.toGeoJSON=O.prototype.Qa;O.prototype.toGeoJSONString=O.prototype.$a;O.prototype.toString=O.prototype.toString;L.b={};L.b.Aa="__EE_VAR_TYPE";L.b.Ca=function(a){return a.prototype instanceof M?a.prototype.name.call(null):a==O?"Geometry":a==Number?"Number":a==String?"String":a==Array?"Array":a==Date?"Date":"Object"};
L.b.Ba=function(a,b){if(b==a)return!0;switch(a){case "EEObject":return"Image"==b||"Feature"==b||"Collection"==b||"EECollection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "EECollection":case "Collection":return"Collection"==b||"EECollection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return!0;default:return!1}};L.b.ka=function(a){return q(a)||L.b.qa(a,Number)};L.b.S=function(a){return p(a)||L.b.qa(a,String)};
L.b.isArray=function(a){return n(a)||L.b.qa(a,Array)};L.b.qa=function(a,b){if(a instanceof lc){var c=a[L.b.Aa];return c&&(c==b||c.prototype instanceof b)}return!1};var Q=function(a,b){if(!m(b))return P(a);if(!(this instanceof Q))return new Q(a,b);this.ta=qa(b);this.ta.name=a};v(Q,N);var R=function(a,b){return N.prototype.call.apply(P(a),Array.prototype.slice.call(arguments,1))};Q.prototype.j=function(){return this.ta.name};Q.prototype.l=function(){return this.ta};
var w=null,Ec={},Gc=function(){Fc();return na(w,function(a){return a.l()})},Hc=function(){Fc();return ma(function(a,b){return!Ec[b]})},P=function(a){Fc();var b=w[a];if(!b)throw Error("Unknown built-in function name: "+a);return b},Fc=function(a){if(!w){var b=function(b){w=na(b,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 Q(b,a)});a&&a()};a?L.data.Xa(b):b(L.data.Xa())}},S=function(a,b,c,d){Fc();var e=
d||"";la(w,function(d,h){var l=h.split(".");if(2==l.length&&l[0]==b){var l=e+l[1],F=d.l();Ec[h]=!0;var B=!1;if(F.args.length)var t=F.args[0].type,B="Object"!=t&&L.b.Ba(t,c);t=B?a.prototype:a;l in t&&(l+="_");t[l]=function(a){var b=Array.prototype.slice.call(arguments,0);B&&b.unshift(this);return d.call.apply(d,b)};t[l].toString=s(d.toString,d,l,B);t[l].signature=F}})},Ic=function(a){var b=function(a){for(var b in a)r(a[b])&&a[b].signature&&delete a[b]};b(a);b(a.prototype)};var Jc=function(a,b,c){if(!(this instanceof Jc))return new Jc(a,b,c);var d,e;if(r(c)){if(n(a)||!ea(a))throw Error('The "args" of a custom function created from a native JS function must be a map from name to type.');d=[];e=[];var g=[],h;for(h in a){var l=a[h];d.push(h);e.push(l);g.push(Kc(l,h))}c=c.apply(null,g)}else{if(!n(a))throw Error('The "args" of a custom function created from an expression must be an array of names.');d=a;e=z(a,function(){return Object})}this.za=d;this.bb=e;this.cb=b||Object;
this.qb=c};v(Jc,N);Jc.prototype.j=function(a){return{type:"Function",argumentNames:this.za,body:a(this.qb)}};Jc.prototype.l=function(){return{name:"",args:z(this.za,function(a,b){return{name:a,type:L.b.Ca(this.bb[b]),optional:!1}},this),returns:L.b.Ca(this.cb)}};var Kc=function(a,b){var c=function(){};a=a||Object;c.prototype=a.prototype instanceof lc?a.prototype:lc.prototype;c=new c;c.j=function(){return{type:"ArgumentRef",value:b}};c[L.b.Aa]=a;return c};var U=function(a,b){if(!(this instanceof U))return new U(a,b);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)");Lc();a instanceof M?b?M.call(this,new Q("Feature"),{geometry:a,metadata:b||null}):M.call(this,a.w,a.o):a instanceof O||null===a?M.call(this,new Q("Feature"),{geometry:a,metadata:b||null}):"Feature"==a.type?M.call(this,new Q("Feature"),
{geometry:new O(a.geometry),metadata:a.properties||null}):M.call(this,new Q("Feature"),{geometry:new O(a),metadata:b||null})};v(U,M);var Mc=!1,Lc=function(){Mc||(S(U,"Feature","Feature"),Mc=!0)};U.prototype.g=function(a,b){return R("Collection",[this]).g(a,b)};U.prototype.name=function(){return"Feature"};u("ee.Feature",U);U.Point=function(a,b){return tc.apply(null,arguments)};U.MultiPoint=function(a){return vc.apply(null,arguments)};U.Rectangle=function(a,b,c,d){return new xc(a,b,c,d)};
U.LineString=function(a){return yc.apply(null,arguments)};U.LinearRing=function(a){return zc.apply(null,arguments)};U.MultiLine=function(a){return Ac.apply(null,arguments)};U.Polygon=function(a){return Bc.apply(null,arguments)};U.MultiPolygon=function(a){return Cc.apply(null,arguments)};U.getMap=U.prototype.g;var V=function(a){if(!(this instanceof V))return new V(a);if(a instanceof V)return a;Nc();if(n(a)){if(0==a.length)throw Error("Empty list specified for ee.Filter().");if(1==a.length)return new V(a[0]);M.call(this,new Q("Filter.and"),{filters:a});this.J=a}else if(a instanceof M)M.call(this,a.w,a.o),this.J=[a];else{if(m(a))throw Error("Invalid argument specified for ee.Filter(): "+a);M.call(this,null,null);this.J=[]}};v(V,M);
var Oc=!1,Nc=function(){Oc||(S(V,"Filter","Filter"),Oc=!0)},Pc={equals:"equals",less_than:"lessThan",greater_than:"greaterThan",contains:"stringContains",starts_with:"stringStartsWith",ends_with:"stringEndsWith"};V.prototype.length=function(){return this.J.length};
var W=function(a,b){var c=a.J.slice(0);b instanceof V?Qa(c,b.J):b instanceof Array?Qa(c,b):c.push(b);return new V(c)},Qc=function(a){return R("Filter.not",a)},Rc=function(a,b,c){b=b.toLowerCase();var d=!1;0==b.lastIndexOf("not_",0)&&(d=!0,b=b.substring(4));if(!(b in Pc))throw Error("Unknown filtering operator: "+b);a=R("Filter."+Pc[b],a,c);return d?Qc(a):a},Sc=function(a,b){return R("Filter.equals",a,b)},Tc=function(a,b){return Qc(Sc(a,b))},Uc=function(a,b){return R("Filter.lessThan",a,b)},Vc=function(a,
b){return Qc(Uc(a,b))},Wc=function(a,b){return R("Filter.greaterThan",a,b)},Xc=function(a,b){return Qc(Wc(a,b))},Yc=function(a,b){return R("Filter.stringContains",a,b)},Zc=function(a,b){return Qc(Yc(a,b))},$c=function(a,b){return R("Filter.stringStartsWith",a,b)},ad=function(a,b){return Qc($c(a,b))},bd=function(a,b){return R("Filter.stringEndsWith",a,b)},cd=function(a,b){return Qc(bd(a,b))},dd=function(a){var b=Array.prototype.slice.call(arguments);return R("Filter.and",b)},ed=function(a,b){m(b)||
(b=0xffffffffffff);var c=R("DateRange",a,b);return P("Filter.dateRangeContains").apply({leftValue:c,rightField:"system:time_start"})},fd=function(a,b,c,d){return P("Filter.listContains").apply({leftField:c,rightValue:d,rightField:a,leftValue:b})},gd=function(a,b){var c={leftField:".all",rightValue:R("Feature",a),maxError:b};return P("Filter.intersects").apply(c)};f=V.prototype;f.Fb=function(){return W(this,Sc.apply(null,[].slice.call(arguments)))};f.Tb=function(){return W(this,Tc.apply(null,[].slice.call(arguments)))};
f.Rb=function(){return W(this,Uc.apply(null,[].slice.call(arguments)))};f.Ob=function(){return W(this,Vc.apply(null,[].slice.call(arguments)))};f.Nb=function(){return W(this,Wc.apply(null,[].slice.call(arguments)))};f.Sb=function(){return W(this,Xc.apply(null,[].slice.call(arguments)))};f.contains=function(){return W(this,Yc.apply(null,[].slice.call(arguments)))};f.Ub=function(){return W(this,Zc.apply(null,[].slice.call(arguments)))};f.Yb=function(){return W(this,$c.apply(null,[].slice.call(arguments)))};
f.Wb=function(){return W(this,ad.apply(null,[].slice.call(arguments)))};f.Eb=function(){return W(this,bd.apply(null,[].slice.call(arguments)))};f.Vb=function(){return W(this,cd.apply(null,[].slice.call(arguments)))};f.Bb=function(){return W(this,dd.apply(null,[].slice.call(arguments)))};f.Db=function(){return W(this,ed.apply(null,[].slice.call(arguments)))};f.Pb=function(){return W(this,fd.apply(null,[].slice.call(arguments)))};f.Cb=function(){return W(this,gd.apply(null,[].slice.call(arguments)))};
f.name=function(){return"Filter"};u("ee.Filter",V);V.prototype.length=V.prototype.length;V.prototype.and=V.prototype.Bb;V.prototype.eq=V.prototype.Fb;V.prototype.neq=V.prototype.Tb;V.prototype.lt=V.prototype.Rb;V.prototype.gte=V.prototype.Ob;V.prototype.gt=V.prototype.Nb;V.prototype.lte=V.prototype.Sb;V.prototype.contains=V.prototype.contains;V.prototype.not_contains=V.prototype.Ub;V.prototype.starts_with=V.prototype.Yb;V.prototype.not_starts_with=V.prototype.Wb;V.prototype.ends_with=V.prototype.Eb;
V.prototype.not_ends_with=V.prototype.Vb;V.prototype.bounds=V.prototype.Cb;V.prototype.inList=V.prototype.Pb;V.prototype.date=V.prototype.Db;V.prototype.serialize=V.prototype.e;V.prototype.toString=V.prototype.toString;V.and=dd;V.or=function(a){var b=Array.prototype.slice.call(arguments);return R("Filter.or",b)};V.eq=Sc;V.neq=Tc;V.lt=Uc;V.gte=Vc;V.gt=Wc;V.lte=Xc;V.contains=Yc;V.not_contains=Zc;V.starts_with=$c;V.not_starts_with=ad;V.ends_with=bd;V.not_ends_with=cd;V.bounds=gd;V.inList=fd;V.date=ed;var X=function(a,b){M.call(this,a,b);hd()};v(X,M);var id=0,jd=!1,hd=function(){jd||(S(X,"Collection","Collection"),S(X,"AggregateFeatureCollection","Collection","aggregate_"),jd=!0)};f=X.prototype;f.filter=function(a){if(!a)throw Error("Empty filters.");return ld(this,R("Collection.filter",this,a))};f.Jb=function(a,b,c){return this.filter(Rc(a,b,c))};f.Hb=function(a){return this.filter(gd(a))};f.Ib=function(a,b){return this.filter(ed(a,b))};f.s=function(a){return X.R.s.call(this,a)};
f.Qb=function(a,b,c){return ld(this,R("Collection.limit",this,a,b,c))};f.sort=function(a,b){return ld(this,R("Collection.limit",this,void 0,a,b))};var ld=function(a,b){return b instanceof a.constructor?b:new a.constructor(b)};X.prototype.name=function(){return"Collection"};
var md=function(a,b,c,d,e,g){if(r(c)){if(d)throw Error("Can't use dynamicArgs with a mapped JS function.");var h="_MAPPING_VAR_"+id++;c=new Jc(ta(h,b),b,c)}else if(p(c))c=new Q(c);else if(!(c instanceof N))throw Error("Can't map non-callable object: "+c);b={collection:a,baseAlgorithm:c};d?b.dynamicArgs=d:(h=c.l().args[0].name,b.dynamicArgs=ta(h,".all"));e&&(b.constantArgs=e);g&&(b.destination=g);return ld(a,P("Collection.map").apply(b))};X.prototype.map=function(a,b,c,d){return md(this,M,a,b,c,d)};
var nd=function(a,b){la(b.prototype,function(c,d){r(c)&&c.signature&&(a.prototype["map_"+d]=function(){var a=null;L.b.Ba("EEObject",c.signature.returns)||(a=d);var g=Array.prototype.slice.call(arguments,0);return md(this,b,function(a){return c.apply(a,g)},null,null,a)})})};u("ee.Collection",X);X.prototype.filter=X.prototype.filter;X.prototype.filterMetadata=X.prototype.Jb;X.prototype.filterBounds=X.prototype.Hb;X.prototype.filterDate=X.prototype.Ib;X.prototype.limit=X.prototype.Qb;
X.prototype.sort=X.prototype.sort;var Y=function(a,b){if(!(this instanceof Y))return new Y(a,b);if(a instanceof Y)return a;if(2<arguments.length)throw Error("The FeatureCollection constructor takes at most 2 arguments ("+arguments.length+" given)");od();a instanceof O&&(a=new U(a));a instanceof U&&(a=[a]);if(L.b.ka(a)||L.b.S(a)){var c={tableId:a};b&&(c.geometryColumn=b);X.call(this,new Q("Collection.loadTable"),c)}else if(n(a))X.call(this,new Q("Collection"),{features:z(a,function(a){return new U(a)})});else if(a instanceof M)X.call(this,
a.w,a.o);else throw Error("Unrecognized argument type to convert to a FeatureCollection: "+a);};v(Y,X);var pd=!1,od=function(){pd||(S(Y,"FeatureCollection","FeatureCollection"),nd(Y,U),pd=!0)};Y.prototype.g=function(a,b){var c=P("DrawVector").apply({collection:this,color:(a||{}).color||"000000"});if(b)c.g(null,b);else return c.g()};Y.prototype.map=function(a,b,c,d){return md(this,U,a,b,c,d)};Y.prototype.name=function(){return"FeatureCollection"};u("ee.FeatureCollection",Y);Y.prototype.map=Y.prototype.map;
Y.prototype.getMap=Y.prototype.g;var Z=function(a){if(!(this instanceof Z))return new Z(a);if(a instanceof Z)return a;qd();var b=arguments.length;if(0==b)M.call(this,new Q("Image.mask"),{image:Z(0),mask:Z(0)});else if(1==b)if(L.b.ka(a))M.call(this,new Q("Image.constant"),{value:a});else if(L.b.S(a))M.call(this,new Q("Image.load"),{id:a});else{if(n(a))return rd(z(a,function(a){return new Z(a)}));if(a instanceof M)M.call(this,a.w,a.o);else throw Error("Unrecognized argument type to convert to an Image: "+a);}else if(2==b){var b=arguments[0],
c=arguments[1];if(L.b.S(b)&&L.b.ka(c))M.call(this,new Q("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(Z,M);var sd=!1,qd=function(){sd||(S(Z,"Image","Image"),S(Z,"Window","Image","focal_"),sd=!0)};Z.prototype.s=function(a){return Z.R.s.call(this,a)};
Z.prototype.g=function(a,b){var c=a||{};c.image=this.e();if(b)L.data.ra(c,s(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=L.data.ra(c),c.image=this,c};Z.prototype.Kb=function(a){a=a||{};a.image=this.e();a=L.data.Ja(a);return L.data.La(a)};Z.prototype.Mb=function(a){a=a||{};a.image=this.e();return L.data.Ma(L.data.Ka(a))};
var rd=function(a,b){if(0==a.length)throw Error("Can't combine 0 images.");for(var c=new Z(a[0]),d=1;d<a.length;d++)c=R("Image.addBands",c,a[d]);b&&(c=c.select([".*"],b));return c};Z.prototype.select=function(a,b){var c={input:this,bandSelectors:a};if(n(a))b&&(c.newNames=b);else{a=Array.prototype.slice.call(arguments);for(var d=0;d<a.length;d++)if(!p(a[d])&&!q(a[d]))throw Error("Illegal argument to select(): "+a[d]);c.bandSelectors=a}return P("Image.select").apply(c)};
Z.prototype.Gb=function(a,b){var c=R("Image.parseExpression",a,"DEFAULT_EXPRESSION_IMAGE"),d=["DEFAULT_EXPRESSION_IMAGE"],e={DEFAULT_EXPRESSION_IMAGE:this};if(b)for(var g in b)d.push(g),e[g]=new Z(b[g]);g=new N;g.j=function(a){return c.j(a)};g.l=function(){return{name:"",args:z(d,function(a){return{name:a,type:"Image",optional:!1}},this),returns:"Image"}};return g.apply(e)};Z.prototype.clip=function(a){try{a=new O(a)}catch(b){}return R("Image.clip",this,a)};Z.prototype.name=function(){return"Image"};
u("ee.Image",Z);Z.prototype.getInfo=Z.prototype.s;Z.prototype.getDownloadURL=Z.prototype.Kb;Z.prototype.getThumbURL=Z.prototype.Mb;Z.prototype.getMap=Z.prototype.g;Z.prototype.select=Z.prototype.select;Z.prototype.expression=Z.prototype.Gb;Z.prototype.clip=Z.prototype.clip;Z.cat=function(a){var b=Array.prototype.slice.call(arguments);return rd(b,null)};Z.rgb=function(a,b,c){return rd([a,b,c],["vis-red","vis-green","vis-blue"])};Z.toString=Z.toString;var $=function(a){if(!(this instanceof $))return new $(a);if(a instanceof $)return a;if(1!=arguments.length)throw Error("The ImageCollection constructor takes exactly 1 argument ("+arguments.length+" given)");td();a instanceof Z&&(a=[a]);if(L.b.S(a))X.call(this,new Q("ImageCollection.load"),{id:a});else if(n(a))X.call(this,new Q("ImageCollection.fromImages"),{images:z(a,function(a){return new Z(a)})});else if(a instanceof M)X.call(this,a.w,a.o);else throw Error("Unrecognized argument type to convert to an ImageCollection: "+
a);};v($,X);var ud=!1,td=function(){ud||(S($,"ImageCollection","ImageCollection"),S($,"reduce","ImageCollection"),nd($,Z),ud=!0)};$.prototype.g=function(a,b){var c=R("ImageCollection.mosaic",this);if(b)c.g(a,b);else return c.g(a)};$.prototype.map=function(a,b,c,d){return md(this,Z,a,b,c,d)};$.prototype.name=function(){return"ImageCollection"};u("ee.ImageCollection",$);$.prototype.map=$.prototype.map;$.prototype.getMap=$.prototype.g;L.W=function(a,b,c){if("ready"!=L.I||a||b){if("loading"==L.Na())throw Error("Already loading.");L.I="loading";L.data.W(a,b);a=function(){qd();Lc();hd();td();od();Nc();L.nb();L.ob();L.I="ready";c&&c()};if(c)Fc(a);else try{Fc(),a()}catch(d){alert("Could not read algorithm list.")}}};L.reset=function(){L.I="not_ready";L.data.reset();w=null;Ec={};Ic(Z);sd=!1;Ic(U);Mc=!1;Ic(X);jd=!1;id=0;Ic($);ud=!1;Ic(Y);pd=!1;Ic(V);Oc=!1;L.sb();L.Ia={}};L.I="not_ready";L.zb=256;L.$=[];L.Ia={};L.Na=function(){return L.I};
L.call=function(a,b){p(a)&&(a=new Q(a));var c=Array.prototype.slice.call(arguments,1);return N.prototype.call.apply(a,c)};L.apply=function(a,b){p(a)&&(a=new Q(a));return a.apply(b)};
L.Xb=function(a,b){if(null===a)return null;if(m(a))switch(b){case "Image":return new Z(a);case "ImageCollection":return new $(a);case "Feature":case "EEObject":return a instanceof X?R("Feature",R("Collection.geometry",a)):"EEObject"==b&&a instanceof Z?a:new U(a);case "ProjGeometry":case "Geometry":return a instanceof Y?R("Collection.geometry",a):a instanceof M?a:new O(a);case "FeatureCollection":case "EECollection":case "Collection":return a instanceof X?a:new Y(a);case "Filter":return new V(a);case "ErrorMargin":return q(a)?
R("ErrorMargin",a,"meters"):a;case "Algorithm":return p(a)?new Q(a):a;case "Date":return p(a)?new Date(a):q(a)?new Date(a):a;case "Dictionary":return b in L?a instanceof L[b]?a:a instanceof M?new L[b](a):a:a;default:if(b in L&&a){if(a instanceof L[b])return a;if(p(a)){if(!(a in L[b]))throw Error("Unknown algorithm: "+b+"."+a);return L[b][a].call()}return new L[b](a)}return a}};
L.ob=function(){la(Hc(),function(a,b){var c=a.l();if(!c.hidden){for(var d=b.split("."),e=L.Ia;1<d.length;){var g=d[0];g in e||(e[g]={});e=e[g];d=Ra(d,1)}g=s(a.call,a);g.signature=c;g.toString=s(a.toString,a);e[d[0]]=g}})};L.nb=function(){var a=Gc(),b={},c={},d;for(d in a){if(-1!=d.indexOf(".")){var e=d.slice(0,d.indexOf("."));b[e]=!0}e=a[d].returns.replace(/<.*>/,"");c[e]=!0}for(var g in b)g in c&&!(g in L)&&(L[g]=L.vb(g),L.$.push(g))};
L.sb=function(){for(var a=0;a<L.$.length;a++){var b=L.$[a];Ic(L[b]);delete L[b]}L.$=[]};L.vb=function(a){var b=function(b){var d=Array.prototype.slice.apply(arguments);d[0]instanceof M&&1==d.length?d=d[0]:(d.unshift(a),d=R.apply(null,d));if(this instanceof L[a])M.call(this,d.w,d.o);else return new L[a](d)};v(b,M);S(b,a,a);return b};qc=L.Xb;u("ee.initialize",L.W);u("ee.reset",L.reset);u("ee.InitState",{$b:"not_ready",LOADING:"loading",ac:"ready"});u("ee.InitState.NOT_READY","not_ready");
u("ee.InitState.LOADING","loading");u("ee.InitState.READY","ready");u("ee.ready",L.Na);u("ee.call",L.call);u("ee.apply",L.apply);u("ee.TILE_SIZE",L.zb);})();