2013-01-31 18:01:19 -08:00

76 lines
42 KiB
JavaScript

(function() {function h(a){throw a;}
var i=void 0,j=!0,k=null,m=!1,n,aa=aa||{},p=this,ba=function(a){a=a.split(".");for(var b=p,c;c=a.shift();)if(b[c]!=k)b=b[c];else return k;return b},ca=function(){},da=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},q=function(a){return"array"==da(a)},ea=function(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length},r=function(a){return"string"==typeof a},fa=function(a){return"number"==typeof a},ga=function(a){return"function"==da(a)},ja=function(a){return a[ha]||
(a[ha]=++ia)},ha="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),ia=0,ka=function(a,b,c){return a.call.apply(a.bind,arguments)},la=function(a,b,c){a||h(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")?
ka:la;return t.apply(k,arguments)},ma=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}},na=Date.now||function(){return+new Date},v=function(a,b){var c=a.split("."),d=p;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var f;c.length&&(f=c.shift());)!c.length&&b!==i?d[f]=b:d=d[f]?d[f]:d[f]={}},w=function(a,b){function c(){}c.prototype=b.prototype;a.M=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 t.apply(k,c)}return t(this,a)};var 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={},c;for(c in a)b[c]=a[c];return b},ra="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),sa=function(a,b){for(var c,d,f=1;f<arguments.length;f++){d=arguments[f];for(c in d)a[c]=d[c];for(var e=0;e<ra.length;e++)c=ra[e],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}},ta=function(a){var b=
arguments.length;if(1==b&&q(arguments[0]))return ta.apply(k,arguments[0]);b%2&&h(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){}h(Error("Invalid JSON string: "+a))},va=function(a){this.G=a};va.prototype.d=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(b==k){c.push("null");break}if(q(b)){var d=b.length;c.push("[");for(var f="",e=0;e<d;e++)c.push(f),f=b[e],wa(a,a.G?a.G.call(b,String(e),f):f,c),f=",";c.push("]");break}a.Y(b,c);break;case "function":break;default:h(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),f="\\u";16>b?f+="000":256>b?f+="00":4096>b&&(f+="0");return ya[a]=f+b.toString(16)}),'"')};
va.prototype.Y=function(a,b){b.push("{");var c="",d;for(d in a)if(Object.prototype.hasOwnProperty.call(a,d)){var f=a[d];"function"!=typeof f&&(b.push(c),xa(d,b),b.push(":"),wa(this,this.G?this.G.call(a,d,f):f,b),c=",")}b.push("}")};var Aa=function(a){Error.captureStackTrace?Error.captureStackTrace(this,Aa):this.stack=Error().stack||"";a&&(this.message=String(a))};w(Aa,Error);Aa.prototype.name="CustomError";var Ba=function(a,b){for(var c=1;c<arguments.length;c++){var d=String(arguments[c]).replace(/\$/g,"$$$$");a=a.replace(/\%s/,d)}return a},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(k,b));b.shift()};w(Ia,Aa);Ia.prototype.name="AssertionError";var Ja=function(a,b,c){if(!a){var d=Array.prototype.slice.call(arguments,2),f="Assertion failed";if(b)var f=f+(": "+b),e=d;h(new Ia(""+f,e||[]))}},Ka=function(a,b){h(new Ia("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1)))};var x=Array.prototype,La=x.indexOf?function(a,b,c){Ja(a.length!=k);return x.indexOf.call(a,b,c)}:function(a,b,c){c=c==k?0:0>c?Math.max(0,a.length+c):c;if(r(a))return!r(b)||1!=b.length?-1:a.indexOf(b,c);for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Ma=x.forEach?function(a,b,c){Ja(a.length!=k);x.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,f=r(a)?a.split(""):a,e=0;e<d;e++)e in f&&b.call(c,f[e],e,a)},Na=x.map?function(a,b,c){Ja(a.length!=k);return x.map.call(a,b,c)}:function(a,
b,c){for(var d=a.length,f=Array(d),e=r(a)?a.split(""):a,g=0;g<d;g++)g in e&&(f[g]=b.call(c,e[g],g,a));return f},Oa=function(a,b){var c=La(a,b);0<=c&&(Ja(a.length!=k),x.splice.call(a,c,1))},Pa=function(a){return x.concat.apply(x,arguments)},Qa=function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c],f;if(q(d)||(f=ea(d))&&Object.prototype.hasOwnProperty.call(d,"callee"))a.push.apply(a,d);else if(f)for(var e=a.length,g=d.length,l=0;l<g;l++)a[e+l]=d[l];else a.push(d)}};var Ra="StopIteration"in p?p.StopIteration:Error("StopIteration"),Sa=function(){};Sa.prototype.next=function(){h(Ra)};Sa.prototype.Na=function(){return this};var Ta=function(a){if("function"==typeof a.l)return a.l();if(r(a))return a.split("");if(ea(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return oa(a)},Ua=function(a,b,c){if("function"==typeof a.forEach)a.forEach(b,c);else if(ea(a)||r(a))Ma(a,b,c);else{var d;if("function"==typeof a.v)d=a.v();else if("function"!=typeof a.l)if(ea(a)||r(a)){d=[];for(var f=a.length,e=0;e<f;e++)d.push(e)}else d=pa(a);else d=i;for(var f=Ta(a),e=f.length,g=0;g<e;g++)b.call(c,f[g],d&&d[g],a)}};var y=function(a,b){this.o={};this.f=[];var c=arguments.length;if(1<c){c%2&&h(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 y?(c=a.v(),d=a.l()):(c=pa(a),d=oa(a));for(var f=0;f<c.length;f++)this.set(c[f],d[f])}};n=y.prototype;n.b=0;n.X=0;n.l=function(){Va(this);for(var a=[],b=0;b<this.f.length;b++)a.push(this.o[this.f[b]]);return a};n.v=function(){Va(this);return this.f.concat()};
n.w=function(a){return Object.prototype.hasOwnProperty.call(this.o,a)};var Va=function(a){if(a.b!=a.f.length){for(var b=0,c=0;b<a.f.length;){var d=a.f[b];Object.prototype.hasOwnProperty.call(a.o,d)&&(a.f[c++]=d);b++}a.f.length=c}if(a.b!=a.f.length){for(var f={},c=b=0;b<a.f.length;)d=a.f[b],Object.prototype.hasOwnProperty.call(f,d)||(a.f[c++]=d,f[d]=1),b++;a.f.length=c}};y.prototype.get=function(a,b){return Object.prototype.hasOwnProperty.call(this.o,a)?this.o[a]:b};
y.prototype.set=function(a,b){Object.prototype.hasOwnProperty.call(this.o,a)||(this.b++,this.f.push(a),this.X++);this.o[a]=b};y.prototype.R=function(){return new y(this)};y.prototype.Na=function(a){Va(this);var b=0,c=this.f,d=this.o,f=this.X,e=this,g=new Sa;g.next=function(){for(;;){f!=e.X&&h(Error("The map has changed since the iterator was created"));b>=c.length&&h(Ra);var g=c[b++];return a?g:d[g]}};return g};var z,Wa,Xa,Ya,Za=function(){return p.navigator?p.navigator.userAgent:k};Ya=Xa=Wa=z=m;var $a;if($a=Za()){var ab=p.navigator;z=0==$a.indexOf("Opera");Wa=!z&&-1!=$a.indexOf("MSIE");Xa=!z&&-1!=$a.indexOf("WebKit");Ya=!z&&!Xa&&"Gecko"==ab.product}var bb=z,A=Wa,cb=Ya,db=Xa,eb=function(){var a=p.document;return a?a.documentMode:i},fb;
a:{var gb="",hb;if(bb&&p.opera)var ib=p.opera.version,gb="function"==typeof ib?ib():ib;else if(cb?hb=/rv\:([^\);]+)(\)|;)/:A?hb=/MSIE\s+([^\);]+)(\)|;)/:db&&(hb=/WebKit\/(\S+)/),hb)var jb=hb.exec(Za()),gb=jb?jb[1]:"";if(A){var kb=eb();if(kb>parseFloat(gb)){fb=String(kb);break a}}fb=gb}
var lb=fb,mb={},C=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("."),f=Math.max(c.length,d.length),e=0;0==b&&e<f;e++){var g=c[e]||"",l=d[e]||"",s=RegExp("(\\d*)(\\D*)","g"),B=RegExp("(\\d*)(\\D*)","g");do{var u=s.exec(g)||["","",""],D=B.exec(l)||["","",""];if(0==u[0].length&&0==D[0].length)break;b=((0==u[1].length?0:parseInt(u[1],10))<(0==D[1].length?0:parseInt(D[1],10))?-1:(0==u[1].length?
0:parseInt(u[1],10))>(0==D[1].length?0:parseInt(D[1],10))?1:0)||((0==u[2].length)<(0==D[2].length)?-1:(0==u[2].length)>(0==D[2].length)?1:0)||(u[2]<D[2]?-1:u[2]>D[2]?1:0)}while(0==b)}b=mb[a]=0<=b}return b},nb=p.document,ob=!nb||!A?i:eb()||("CSS1Compat"==nb.compatMode?parseInt(lb,10):5);var qb=function(a){return pb(a||arguments.callee.caller,[])},pb=function(a,b){var c=[];if(0<=La(b,a))c.push("[...circular reference...]");else if(a&&50>b.length){c.push(rb(a)+"(");for(var d=a.arguments,f=0;f<d.length;f++){0<f&&c.push(", ");var e;e=d[f];switch(typeof e){case "object":e=e?"object":"null";break;case "string":break;case "number":e=String(e);break;case "boolean":e=e?"true":"false";break;case "function":e=(e=rb(e))?e:"[fn]";break;default:e=typeof e}40<e.length&&(e=e.substr(0,40)+"...");
c.push(e)}b.push(a);c.push(")\n");try{c.push(pb(a.caller,b))}catch(g){c.push("[exception trying to get caller]\n")}}else a?c.push("[...long stack...]"):c.push("[end]");return c.join("")},rb=function(a){if(sb[a])return sb[a];a=String(a);if(!sb[a]){var b=/function ([^\(]+)/.exec(a);sb[a]=b?b[1]:"[Anonymous]"}return sb[a]},sb={};var tb=function(a,b,c,d,f){this.reset(a,b,c,d,f)};tb.prototype.qa=k;tb.prototype.pa=k;var ub=0;tb.prototype.reset=function(a,b,c,d,f){"number"==typeof f||ub++;d||na();this.F=a;this.Fa=b;delete this.qa;delete this.pa};tb.prototype.ta=function(a){this.F=a};var E=function(a){this.Ia=a};E.prototype.Q=k;E.prototype.F=k;E.prototype.Z=k;E.prototype.va=k;var vb=function(a,b){this.name=a;this.value=b};vb.prototype.toString=function(){return this.name};var wb=new vb("SEVERE",1E3),xb=new vb("WARNING",900),yb=new vb("CONFIG",700),zb=new vb("FINE",500);E.prototype.getParent=function(){return this.Q};E.prototype.ta=function(a){this.F=a};var Ab=function(a){if(a.F)return a.F;if(a.Q)return Ab(a.Q);Ka("Root logger has no level set.");return k};
E.prototype.log=function(a,b,c){if(a.value>=Ab(this).value){a=this.Ja(a,b,c);b="log:"+a.Fa;p.console&&(p.console.timeStamp?p.console.timeStamp(b):p.console.markTimeline&&p.console.markTimeline(b));p.msWriteProfilerMark&&p.msWriteProfilerMark(b);for(b=this;b;){c=b;var d=a;if(c.va)for(var f=0,e=i;e=c.va[f];f++)e(d);b=b.getParent()}}};
E.prototype.Ja=function(a,b,c){var d=new tb(a,String(b),this.Ia);if(c){d.qa=c;var f;var e=arguments.callee.caller;try{var g;var l=ba("window.location.href");if(r(c))g={message:c,name:"Unknown error",lineNumber:"Not available",fileName:l,stack:"Not available"};else{var s,B,u=m;try{s=c.lineNumber||c.cb||"Not available"}catch(D){s="Not available",u=j}try{B=c.fileName||c.filename||c.sourceURL||p.$googDebugFname||l}catch(J){B="Not available",u=j}g=u||!c.lineNumber||!c.fileName||!c.stack?{message:c.message,
name:c.name,lineNumber:s,fileName:B,stack:c.stack||"Not available"}:c}f="Message: "+Ha(g.message)+'\nUrl: <a href="view-source:'+g.fileName+'" target="_new">'+g.fileName+"</a>\nLine: "+g.lineNumber+"\n\nBrowser stack:\n"+Ha(g.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+Ha(qb(e)+"-> ")}catch(X){f="Exception trying to expose exception! You win, we lose. "+X}d.pa=f}return d};
var F=function(a,b){a.log(zb,b,i)},Bb={},Cb=k,Db=function(a){Cb||(Cb=new E(""),Bb[""]=Cb,Cb.ta(yb));var b;if(!(b=Bb[a])){b=new E(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Db(a.substr(0,c));c.Z||(c.Z={});c.Z[d]=b;b.Q=c;Bb[a]=b}return b};var Eb=function(a){Eb[" "](a);return a};Eb[" "]=ca;var Fb;if(!(Fb=!A))Fb=A&&9<=ob;var Gb=Fb,Hb=A&&!C("9");!db||C("528");cb&&C("1.9b")||A&&C("8")||bb&&C("9.5")||db&&C("528");cb&&!C("8")||A&&C("9");var Ib=function(){};Ib.prototype.ua=m;Ib.prototype.ya=function(){this.ua||(this.ua=j,this.s())};Ib.prototype.s=function(){if(this.za)for(;this.za.length;)this.za.shift()()};var Jb=function(a,b){this.type=a;this.currentTarget=this.target=b};n=Jb.prototype;n.s=function(){};n.ya=function(){};n.u=m;n.defaultPrevented=m;n.P=j;n.preventDefault=function(){this.defaultPrevented=j;this.P=m};var Kb=function(a,b){a&&this.j(a,b)};w(Kb,Jb);n=Kb.prototype;n.target=k;n.relatedTarget=k;n.offsetX=0;n.offsetY=0;n.clientX=0;n.clientY=0;n.screenX=0;n.screenY=0;n.button=0;n.keyCode=0;n.charCode=0;n.ctrlKey=m;n.altKey=m;n.shiftKey=m;n.metaKey=m;n.ra=k;
n.j=function(a,b){var c=this.type=a.type;Jb.call(this,c);this.target=a.target||a.srcElement;this.currentTarget=b;var d=a.relatedTarget;if(d){if(cb){var f;a:{try{Eb(d.nodeName);f=j;break a}catch(e){}f=m}f||(d=k)}}else"mouseover"==c?d=a.fromElement:"mouseout"==c&&(d=a.toElement);this.relatedTarget=d;this.offsetX=db||a.offsetX!==i?a.offsetX:a.layerX;this.offsetY=db||a.offsetY!==i?a.offsetY:a.layerY;this.clientX=a.clientX!==i?a.clientX:a.pageX;this.clientY=a.clientY!==i?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.ra=a;a.defaultPrevented&&this.preventDefault();delete this.u};
n.preventDefault=function(){Kb.M.preventDefault.call(this);var a=this.ra;if(a.preventDefault)a.preventDefault();else if(a.returnValue=m,Hb)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};n.s=function(){};var Lb=0;var Mb=function(){};n=Mb.prototype;n.key=0;n.q=m;n.N=m;n.j=function(a,b,c,d,f,e){ga(a)?this.ka=j:a&&a.handleEvent&&ga(a.handleEvent)?this.ka=m:h(Error("Invalid listener argument"));this.n=a;this.ia=b;this.src=c;this.type=d;this.capture=!!f;this.V=e;this.N=m;this.key=++Lb;this.q=m};n.handleEvent=function(a){return this.ka?this.n.call(this.V||this.src,a):this.n.handleEvent.call(this.n,a)};var Nb={},G={},H={},Ob={},Pb=function(a,b,c,d,f){if(q(b))for(var e=0;e<b.length;e++)Pb(a,b[e],c,d,f);else{a:{b||h(Error("Invalid event type"));d=!!d;var g=G;b in g||(g[b]={b:0,g:0});g=g[b];d in g||(g[d]={b:0,g:0},g.b++);var g=g[d],e=ja(a),l;g.g++;if(g[e]){l=g[e];for(var s=0;s<l.length;s++)if(g=l[s],g.n==c&&g.V==f){if(g.q)break;l[s].N=m;a=l[s];break a}}else l=g[e]=[],g.b++;var B=Qb,u=Gb?function(a){return B.call(u.src,u.n,a)}:function(a){a=B.call(u.src,u.n,a);if(!a)return a},s=u,g=new Mb;g.j(c,s,a,
b,d,f);g.N=m;s.src=a;s.n=g;l.push(g);H[e]||(H[e]=[]);H[e].push(g);a.addEventListener?(a==p||!a.ha)&&a.addEventListener(b,s,d):a.attachEvent(b in Ob?Ob[b]:Ob[b]="on"+b,s);a=g}Nb[a.key]=a}},Rb=function(a,b,c,d,f){if(q(b))for(var e=0;e<b.length;e++)Rb(a,b[e],c,d,f);else{d=!!d;a:{e=G;if(b in e&&(e=e[b],d in e&&(e=e[d],a=ja(a),e[a]))){a=e[a];break a}a=k}if(a)for(e=0;e<a.length;e++)if(a[e].n==c&&a[e].capture==d&&a[e].V==f){Sb(a[e].key);break}}},Sb=function(a){var b=Nb[a];if(b&&!b.q){var c=b.src,d=b.type,
f=b.ia,e=b.capture;c.removeEventListener?(c==p||!c.ha)&&c.removeEventListener(d,f,e):c.detachEvent&&c.detachEvent(d in Ob?Ob[d]:Ob[d]="on"+d,f);c=ja(c);H[c]&&(f=H[c],Oa(f,b),0==f.length&&delete H[c]);b.q=j;if(b=G[d][e][c])b.ja=j,Tb(d,e,c,b);delete Nb[a]}},Tb=function(a,b,c,d){if(!d.O&&d.ja){for(var f=0,e=0;f<d.length;f++)d[f].q?d[f].ia.src=k:(f!=e&&(d[e]=d[f]),e++);d.length=e;d.ja=m;0==e&&(delete G[a][b][c],G[a][b].b--,0==G[a][b].b&&(delete G[a][b],G[a].b--),0==G[a].b&&delete G[a])}},Vb=function(a,
b,c,d,f){var e=1;b=ja(b);if(a[b]){var g=--a.g,l=a[b];l.O?l.O++:l.O=1;try{for(var s=l.length,B=0;B<s;B++){var u=l[B];u&&!u.q&&(e&=Ub(u,f)!==m)}}finally{a.g=Math.max(g,a.g),l.O--,Tb(c,d,b,l)}}return Boolean(e)},Ub=function(a,b){a.N&&Sb(a.key);return a.handleEvent(b)},Qb=function(a,b){if(a.q)return j;var c=a.type,d=G;if(!(c in d))return j;var d=d[c],f,e;if(!Gb){f=b||ba("window.event");var g=j in d,l=m in d;if(g){if(0>f.keyCode||f.returnValue!=i)return j;a:{var s=m;if(0==f.keyCode)try{f.keyCode=-1;break a}catch(B){s=
j}if(s||f.returnValue==i)f.returnValue=j}}s=new Kb;s.j(f,this);f=j;try{if(g){for(var u=[],D=s.currentTarget;D;D=D.parentNode)u.push(D);e=d[j];e.g=e.b;for(var J=u.length-1;!s.u&&0<=J&&e.g;J--)s.currentTarget=u[J],f&=Vb(e,u[J],c,j,s);if(l){e=d[m];e.g=e.b;for(J=0;!s.u&&J<u.length&&e.g;J++)s.currentTarget=u[J],f&=Vb(e,u[J],c,m,s)}}else f=Ub(a,s)}finally{u&&(u.length=0)}return f}c=new Kb(b,this);return f=Ub(a,c)};Math.floor(2147483648*Math.random()).toString(36);var Wb=function(){};w(Wb,Ib);n=Wb.prototype;n.ha=j;n.W=k;n.addEventListener=function(a,b,c,d){Pb(this,a,b,c,d)};n.removeEventListener=function(a,b,c,d){Rb(this,a,b,c,d)};
n.dispatchEvent=function(a){var b=a.type||a,c=G;if(b in c){if(r(a))a=new Jb(a,this);else if(a instanceof Jb)a.target=a.target||this;else{var d=a;a=new Jb(b,this);sa(a,d)}var d=1,f,c=c[b],b=j in c,e;if(b){f=[];for(e=this;e;e=e.W)f.push(e);e=c[j];e.g=e.b;for(var g=f.length-1;!a.u&&0<=g&&e.g;g--)a.currentTarget=f[g],d&=Vb(e,f[g],a.type,j,a)&&a.P!=m}if(m in c)if(e=c[m],e.g=e.b,b)for(g=0;!a.u&&g<f.length&&e.g;g++)a.currentTarget=f[g],d&=Vb(e,f[g],a.type,m,a)&&a.P!=m;else for(f=this;!a.u&&f&&e.g;f=f.W)a.currentTarget=
f,d&=Vb(e,f,a.type,m,a)&&a.P!=m;a=Boolean(d)}else a=j;return a};n.s=function(){Wb.M.s.call(this);var a=0;if(this!=k){var b=ja(this);if(H[b])for(var b=H[b],c=b.length-1;0<=c;c--)Sb(b[c].key),a++}else for(c in b=function(b,c){Sb(c);a++},Nb)b.call(i,0,c);this.W=k};var Xb=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$"),Yb=db,Zb=function(a,b){if(Yb){Yb=m;var c=p.location;if(c){var d=c.href;if(d&&(d=(d=Zb(3,d))&&decodeURIComponent(d))&&d!=c.hostname)Yb=j,h(Error())}}return b.match(Xb)[a]||k};var $b=function(){};$b.prototype.xa=k;$b.prototype.A=function(){var a;if(!(a=this.xa))a={},ac(this)&&(a[0]=j,a[1]=j),a=this.xa=a;return a};var bc=function(a,b){this.Ma=a;this.La=b};w(bc,$b);bc.prototype.T=function(){return this.Ma()};bc.prototype.A=function(){return this.La()};var I=function(){return I.sa.T()};I.Ka=m;I.A=function(){return I.sa.A()};I.gb=function(a,b){I.Ba(new bc(a,b))};I.Ba=function(a){I.sa=a};var cc=function(){};w(cc,$b);cc.prototype.T=function(){var a=ac(this);return a?new ActiveXObject(a):new XMLHttpRequest};
var ac=function(a){if(I.Ka)return"";if(!a.wa&&"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.wa=d}catch(f){}}h(Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed"))}return a.wa};I.Ba(new cc);var K=function(a){this.headers=new y;this.L=a||k};w(K,Wb);K.prototype.h=Db("goog.net.XhrIo");var dc=/^https?$/i,ec=[],gc=function(a,b,c,d,f,e,g){var l=new K;ec.push(l);b&&Pb(l,"complete",b);Pb(l,"ready",ma(fc,l));e&&(l.B=Math.max(0,e));g&&(l.fa=g);l.send(a,c,d,f)},fc=function(a){a.ya();Oa(ec,a)};n=K.prototype;n.m=m;n.a=k;n.J=k;n.K="";n.ea="";n.z="";n.U=m;n.I=m;n.S=m;n.r=m;n.B=0;n.p=k;n.ga="";n.fa=m;
n.send=function(a,b,c,d){this.a&&h(Error("[goog.net.XhrIo] Object is active with another request="+this.K+"; newUri="+a));b=b?b.toUpperCase():"GET";this.K=a;this.z="";this.ea=b;this.U=m;this.m=j;this.a=this.L?this.L.T():I();this.J=this.L?this.L.A():I.A();this.a.onreadystatechange=t(this.da,this);try{F(this.h,L(this,"Opening Xhr")),this.S=j,this.a.open(b,a,j),this.S=m}catch(f){F(this.h,L(this,"Error opening Xhr: "+f.message));hc(this,f);return}a=c||"";var e=this.headers.R();d&&Ua(d,function(a,b){e.set(b,
a)});d=p.FormData&&a instanceof p.FormData;"POST"==b&&(!e.w("Content-Type")&&!d)&&e.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");Ua(e,function(a,b){this.a.setRequestHeader(b,a)},this);this.ga&&(this.a.responseType=this.ga);"withCredentials"in this.a&&(this.a.withCredentials=this.fa);try{this.p&&(p.clearTimeout(this.p),this.p=k),0<this.B&&(F(this.h,L(this,"Will abort after "+this.B+"ms if incomplete")),this.p=p.setTimeout(t(this.Ca,this),this.B)),F(this.h,L(this,"Sending request")),
this.I=j,this.a.send(a),this.I=m}catch(g){F(this.h,L(this,"Send error: "+g.message)),hc(this,g)}};n.Ca=function(){"undefined"!=typeof aa&&this.a&&(this.z="Timed out after "+this.B+"ms, aborting",F(this.h,L(this,this.z)),this.dispatchEvent("timeout"),this.abort(8))};var hc=function(a,b){a.m=m;a.a&&(a.r=j,a.a.abort(),a.r=m);a.z=b;ic(a);jc(a)},ic=function(a){a.U||(a.U=j,a.dispatchEvent("complete"),a.dispatchEvent("error"))};
K.prototype.abort=function(){this.a&&this.m&&(F(this.h,L(this,"Aborting")),this.m=m,this.r=j,this.a.abort(),this.r=m,this.dispatchEvent("complete"),this.dispatchEvent("abort"),jc(this))};K.prototype.s=function(){this.a&&(this.m&&(this.m=m,this.r=j,this.a.abort(),this.r=m),jc(this,j));K.M.s.call(this)};K.prototype.da=function(){!this.S&&!this.I&&!this.r?this.Ga():kc(this)};K.prototype.Ga=function(){kc(this)};
var kc=function(a){if(a.m&&"undefined"!=typeof aa)if(a.J[1]&&4==lc(a)&&2==mc(a))F(a.h,L(a,"Local request error detected and ignored"));else if(a.I&&4==lc(a))p.setTimeout(t(a.da,a),0);else if(a.dispatchEvent("readystatechange"),4==lc(a)){F(a.h,L(a,"Request complete"));a.m=m;try{var b=mc(a),c,d;a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:d=j;break a;default:d=m}if(!(c=d)){var f;if(f=0===b){var e=Zb(1,String(a.K));if(!e&&self.location)var g=self.location.protocol,e=g.substr(0,
g.length-1);f=!dc.test(e?e.toLowerCase():"")}c=f}if(c)a.dispatchEvent("complete"),a.dispatchEvent("success");else{var l;try{l=2<lc(a)?a.a.statusText:""}catch(s){F(a.h,"Can not get status: "+s.message),l=""}a.z=l+" ["+mc(a)+"]";ic(a)}}finally{jc(a)}}},jc=function(a,b){if(a.a){var c=a.a,d=a.J[0]?ca:k;a.a=k;a.J=k;a.p&&(p.clearTimeout(a.p),a.p=k);b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(f){a.h.log(wb,"Problem encountered resetting onreadystatechange: "+f.message,i)}}},lc=function(a){return a.a?
a.a.readyState:0},mc=function(a){try{return 2<lc(a)?a.a.status:-1}catch(b){return a.h.log(xb,"Can not get status: "+b.message,i),-1}};K.prototype.na=function(){try{return this.a?this.a.responseText:""}catch(a){return F(this.h,"Can not get responseText: "+a.message),""}};var L=function(a,b){return b+" ["+a.ea+" "+a.K+" "+mc(a)+"]"};var nc=function(a,b,c){this.k=a||k;this.Ha=!!c},pc=function(a){if(!a.e&&(a.e=new y,a.b=0,a.k))for(var b=a.k.split("&"),c=0;c<b.length;c++){var d=b[c].indexOf("="),f=k,e=k;0<=d?(f=b[c].substring(0,d),e=b[c].substring(d+1)):f=b[c];f=decodeURIComponent(f.replace(/\+/g," "));f=oc(a,f);a.add(f,e?decodeURIComponent(e.replace(/\+/g," ")):"")}};n=nc.prototype;n.e=k;n.b=k;n.add=function(a,b){pc(this);this.k=k;a=oc(this,a);var c=this.e.get(a);c||this.e.set(a,c=[]);c.push(b);this.b++;return this};
n.w=function(a){pc(this);a=oc(this,a);return this.e.w(a)};n.v=function(){pc(this);for(var a=this.e.l(),b=this.e.v(),c=[],d=0;d<b.length;d++)for(var f=a[d],e=0;e<f.length;e++)c.push(b[d]);return c};n.l=function(a){pc(this);var b=[];if(a)this.w(a)&&(b=Pa(b,this.e.get(oc(this,a))));else{a=this.e.l();for(var c=0;c<a.length;c++)b=Pa(b,a[c])}return b};n.set=function(a,b){pc(this);this.k=k;a=oc(this,a);this.w(a)&&(this.b-=this.e.get(a).length);this.e.set(a,[b]);this.b++;return this};
n.get=function(a,b){var c=a?this.l(a):[];return 0<c.length?String(c[0]):b};n.toString=function(){if(this.k)return this.k;if(!this.e)return"";for(var a=[],b=this.e.v(),c=0;c<b.length;c++)for(var d=b[c],f=encodeURIComponent(String(d)),d=this.l(d),e=0;e<d.length;e++){var g=f;""!==d[e]&&(g+="="+encodeURIComponent(String(d[e])));a.push(g)}return this.k=a.join("&")};n.R=function(){var a=new nc;a.k=this.k;this.e&&(a.e=this.e.R(),a.b=this.b);return a};
var oc=function(a,b){var c=String(b);a.Ha&&(c=c.toLowerCase());return c};var S=function(a,b,c){if(!("ready"==qc&&!a&&!b))if("loading"==qc&&h(Error("Already loading.")),qc="loading",rc=a||"/api",a=function(){M.i(N,"Image","Image");M.i(O,"Feature","Feature");M.i(P,"FeatureCollection","FeatureCollection");M.i(N,"Window","Image","focal_");M.i(Q,"ImageCollection","ImageCollection");M.i(Q,"reduce","ImageCollection");M.i(R,"Collection","Collection");M.i(R,"AggregateFeatureCollection","Collection","aggregate_",M.Da);M.i(Q,"Image","Image","map_",M.ma);M.i(P,"Feature","Feature",
"map_",M.ma);qc="ready";c&&c()},c)M.j(a);else try{M.j(),a()}catch(d){alert("Could not read algorithm list.")}},qc="not_ready",rc=k,sc=function(a,b){var c={c:{type:"Variable",name:b}};c.__proto__=a.prototype;return c},tc=function(a,b){return{type:"Algorithm",args:a,body:b}};v("ee.initialize",S);v("ee.InitState",{eb:"not_ready",LOADING:"loading",fb:"ready"});v("ee.InitState.NOT_READY","not_ready");v("ee.InitState.LOADING","loading");v("ee.InitState.READY","ready");v("ee.ready",function(){return qc});
v("ee.call",function(a,b){if(r(a)){var c=M.get(a),d=Array.prototype.slice.call(arguments,1);return M.C(c,d,{})}c=a.args;(!c||c.length>arguments.length-1)&&h(Error("Missing lambda arguments: "+c.slice(arguments.length-1)));for(var d={algorithm:a},f=1;f<arguments.length;f++)d[c[f-1]]=arguments[f];return d});v("ee.apply",function(a,b){if(r(a)){var c=M.get(a);return M.C(c,[],b)}c=qa(b);c.algorithm=a;return c});v("ee.variable",sc);v("ee.lambda",tc);v("ee.TILE_SIZE",256);var vc=function(a,b){return T("/mapid",uc(a),b)},wc=function(a,b){return T("/value",uc(a),b)},xc=function(a,b){return T("/download",uc(a),b)},yc=function(a){return rc+"/download?docid="+a.docid+"&token="+a.token},T=function(a,b,c,d){function f(a,b){var c=m;try{var d=ua(a),e=d.data,f=d.error}catch(J){c=j}var X=i;c||!e&&!f?X="Malformed request: "+a:f&&(X=d.error.message);if(b)b(e,X);else{if(!X)return e;h(Error(X))}}d=d||"POST";a=rc+a;b=b?b.toString():"";if(c)gc(a,function(a){return f(a.target.na(),
c)},d,b);else{var e=I();e.open(d,a,m);e.setRequestHeader("Content-type","application/x-www-form-urlencoded");e.send(b);return f(e.responseText,k)}},uc=function(a){var b=new nc,c;for(c in a)b.set(c,a[c]);return b},zc=function(a){return ua(a)};v("ee.data",function(){});v("ee.data.getInfo",function(a,b){return T("/info",(new nc).add("id",a),b)});v("ee.data.getList",function(a,b){return T("/list",(new nc).add("id",a),b)});v("ee.data.getMapId",vc);v("ee.data.getValue",wc);
v("ee.data.getThumbId",function(a,b){var c=uc(a).add("getid","1");return T("/thumb",c,b)});v("ee.data.getDownloadId",xc);v("ee.data.makeDownloadUrl",yc);v("ee.data.send_",T);
v("ee.data.setupMockSend",function(a){var b=a||{};gc=function(a,c,e,g){var l=new function(){};l.target={};l.target.na=function(){return a in b?r(b[a])?b[a]:b[a](a,c,e,g):'{"error": {}}'};setTimeout(t(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?r(b[this.url])?b[this.url]:b[this.url](this.url,this.method,a):(new va(i)).d({data:{url:this.url,method:this.method,
data:a}})};I=function(){return new c}});v("ee.data.parse",zc);var Ac=function(a){this.G=a};w(Ac,va);var U=function(a){return(new Ac).d(a)},V=function(a){a=U(a);return"JSON"in window?window.JSON.stringify(window.JSON.parse(a),k," "):a};Ac.prototype.Y=function(a,b){"serialize"in a?b.push(a.d()):Ac.M.Y.call(this,a,b)};v("ee.Serializer",Ac);v("ee.Serializer.toJSON",U);v("ee.Serializer.toReadableJSON",V);var W=function(a){if(!(this instanceof W))return new W(a);S();if(a instanceof W)return a;this.H=a instanceof Array?a:a?[a]:[]};W.prototype.length=function(){return this.H.length};
var Y=function(a,b){var c=a.H.slice(0);b instanceof W?Qa(c,b.H):b instanceof Array?Qa(c,b):c.push(b);return new W(c)},Z=function(a,b,c){return new W(ta("property",a,b,c))},Bc=function(a,b){return Z(a,"equals",b)},Cc=function(a,b){return Z(a,"not_equals",b)},Dc=function(a,b){return Z(a,"less_than",b)},Ec=function(a,b){return Z(a,"not_less_than",b)},Fc=function(a,b){return Z(a,"greater_than",b)},Gc=function(a,b){return Z(a,"not_greater_than",b)},Hc=function(a,b){return Z(a,"contains",b)},Ic=function(a,
b){return Z(a,"not_contains",b)},Jc=function(a,b){return Z(a,"starts_with",b)},Kc=function(a,b){return Z(a,"not_starts_with",b)},Lc=function(a,b){return Z(a,"ends_with",b)},Mc=function(a,b){return Z(a,"not_ends_with",b)},Nc=function(a){var b=Array.prototype.slice.call(arguments);return new W({and:b})},Oc=function(a,b){var c=function(a){return a instanceof Date?a.getTime():"string"==typeof a?(new Date(a)).getTime():a},d={property:"system:time_start",not_less_than:c(a)};b&&(d=[d,{property:"system:time_start",
not_greater_than:c(b)}]);return new W(d)},Pc=function(a){a instanceof P&&(a={algorithm:"ExtractGeometry",collection:a});return new W({geometry:a})};n=W.prototype;n.Sa=function(){return Y(this,Bc.apply(k,[].slice.call(arguments)))};n.Ya=function(){return Y(this,Cc.apply(k,[].slice.call(arguments)))};n.Wa=function(){return Y(this,Dc.apply(k,[].slice.call(arguments)))};n.Va=function(){return Y(this,Ec.apply(k,[].slice.call(arguments)))};n.Ua=function(){return Y(this,Fc.apply(k,[].slice.call(arguments)))};
n.Xa=function(){return Y(this,Gc.apply(k,[].slice.call(arguments)))};n.contains=function(){return Y(this,Hc.apply(k,[].slice.call(arguments)))};n.Za=function(){return Y(this,Ic.apply(k,[].slice.call(arguments)))};n.bb=function(){return Y(this,Jc.apply(k,[].slice.call(arguments)))};n.ab=function(){return Y(this,Kc.apply(k,[].slice.call(arguments)))};n.Ra=function(){return Y(this,Lc.apply(k,[].slice.call(arguments)))};n.$a=function(){return Y(this,Mc.apply(k,[].slice.call(arguments)))};
n.Oa=function(){return Y(this,Nc.apply(k,[].slice.call(arguments)))};n.Qa=function(){return Y(this,Oc.apply(k,[].slice.call(arguments)))};n.bounds=function(){return Y(this,Pc.apply(k,[].slice.call(arguments)))};n.d=function(){return U(this.H)};n.toString=function(){return"ee.Filter("+V(this.H)+")"};v("ee.Filter",W);W.prototype.length=W.prototype.length;W.prototype.and=W.prototype.Oa;W.prototype.eq=W.prototype.Sa;W.prototype.neq=W.prototype.Ya;W.prototype.lt=W.prototype.Wa;W.prototype.gte=W.prototype.Va;
W.prototype.gt=W.prototype.Ua;W.prototype.lte=W.prototype.Xa;W.prototype.contains=W.prototype.contains;W.prototype.not_contains=W.prototype.Za;W.prototype.starts_with=W.prototype.bb;W.prototype.not_starts_with=W.prototype.ab;W.prototype.ends_with=W.prototype.Ra;W.prototype.not_ends_with=W.prototype.$a;W.prototype.bounds=W.prototype.bounds;W.prototype.date=W.prototype.Qa;W.prototype.serialize=W.prototype.d;W.prototype.toString=W.prototype.toString;W.and=Nc;
W.or=function(a){var b=Array.prototype.slice.call(arguments);return new W({or:b})};W.eq=Bc;W.neq=Cc;W.lt=Dc;W.gte=Ec;W.gt=Fc;W.lte=Gc;W.contains=Hc;W.not_contains=Ic;W.starts_with=Jc;W.not_starts_with=Kc;W.ends_with=Lc;W.not_ends_with=Mc;W.bounds=Pc;W.date=Oc;var R=function(a){this.c=a};R.prototype.filter=function(a){a||h(Error("Empty filters."));var b;Qc(this)?(b=this.c.collection,a=Y(this.c.filters,a)):b=this.c;return new this.constructor({algorithm:"FilterFeatureCollection",collection:b,filters:a})};var Qc=function(a){return"FilterFeatureCollection"==a.c.algorithm};n=R.prototype;n.ba=function(a,b,c){return this.filter(Z(a,b,c))};n.$=function(a){return this.filter(Pc(a))};n.aa=function(a,b){return this.filter(Oc(a,b))};
n.t=function(a){return wc({json:this.d()},a)};n.d=function(){for(var a=this;Qc(a)&&0==a.c.filters.length;)a=a.c.collection;return U(a.c)};n.ca=function(a,b,c){a={algorithm:"LimitFeatureCollection",collection:this,limit:a};b&&(a.key=b,c&&(a.ascending=c));return new this.constructor(a)};n.sort=function(a,b){var c={algorithm:"LimitFeatureCollection",collection:this,key:a};b&&(c.ascending=b);return new this.constructor(c)};n.geometry=function(){return{algorithm:"ExtractGeometry",collection:this}};
var Sc=function(a,b,c,d,f,e){ga(c)&&(d&&h(Error("Can't use dynamicArgs with a mapped JS function.")),d="_MAPPING_VAR_"+Rc++,c=tc([d],c(sc(b,d))),d=ta(d,".all"));b={algorithm:"Collection.map",collection:a,baseAlgorithm:c};d&&(b.dynamicArgs=d);f&&(b.constantArgs=f);e&&(b.destination=e);return new a.constructor(b)},Rc=0;v("ee.Collection",R);R.prototype.filter=R.prototype.filter;R.prototype.filterMetadata=R.prototype.ba;R.prototype.filterBounds=R.prototype.$;R.prototype.filterDate=R.prototype.aa;
R.prototype.getInfo=R.prototype.t;R.prototype.serialize=R.prototype.d;R.prototype.limit=R.prototype.ca;R.prototype.sort=R.prototype.sort;R.isFilterFeatureCollection_=Qc;var $=function(a){if(!(this instanceof $))return new $(a);S();if(a instanceof $)return a;this.c=a};$.prototype.t=function(){return wc({json:this.d()})};$.prototype.d=function(){return U(this.c)};$.prototype.toString=function(){return"ee.ComputedObject("+V(this.c)+")"};v("ee.ComputedObject",$);$.prototype.getInfo=$.prototype.t;$.prototype.serialize=$.prototype.d;$.toString=$.toString;var N=function(a){if(!(this instanceof N))return new N(a);S();if(fa(a))a={algorithm:"Constant",value:a};else if(r(a))a={type:"Image",id:a};else{if(q(a))return Tc(Na(a,function(a){return new N(a)}));if(a instanceof N)return a}this.c=a};N.prototype.t=function(){return wc({json:this.d()})};N.prototype.getMap=function(a,b){var c=a||{};c.image=this.d();if(b)vc(c,t(function(a,c){a&&(a.image=this);b(a,c)},this));else return c=vc(c),c.image=this,c};
N.prototype.Ta=function(a){a=a||{};a.image=this.d();a=xc(a);return yc(a)};N.prototype.d=function(){return U(this.c)};var Tc=function(a,b){0==a.length&&h(Error("Can't combine 0 images."));for(var c=new N(a[0]),d=1;d<a.length;d++)c=new N({algorithm:"Image.addBands",dstImg:c,srcImg:new N(a[d])});b&&(c=c.select([".*"],b));return c};
N.prototype.select=function(a,b){var c={algorithm:"Image.select",input:this,bandSelectors:a};if(q(a))b&&(c.newNames=b);else{a=Array.prototype.slice.call(arguments);for(var d=0;d<a.length;d++)!r(a[d])&&!fa(a[d])&&h(Error("Illegal argument to select(): "+a[d]));c.bandSelectors=a}return new N(c)};N.prototype.toString=function(){return"ee.Image("+V(this.c)+")"};v("ee.Image",N);N.prototype.getInfo=N.prototype.t;N.prototype.getDownloadURL=N.prototype.Ta;N.prototype.getMap=N.prototype.getMap;
N.prototype.select=N.prototype.select;N.prototype.serialize=N.prototype.d;N.cat=function(a){var b=Array.prototype.slice.call(arguments);return Tc(b,k)};N.combine_=Tc;N.rgb=function(a,b,c){return Tc([a,b,c],["vis-red","vis-green","vis-blue"])};N.toString=N.toString;var O=function(a,b){if(!(this instanceof O))return new O(a,b);S();if(a instanceof O)return b&&h(Error("Can't create Feature out of a Feature and properties.")),a;"algorithm"in a?this.c=b?{algorithm:"Feature",geometry:a,metadata:b}:a:Uc(a)?this.c={algorithm:"Feature",geometry:a,metadata:b||{}}:h(Error("Not a geometry, feature or JSON description."))};
O.prototype.getMap=function(a,b){var c=new N({algorithm:"DrawVector",collection:{type:"FeatureCollection",features:[this]},color:(a||{}).color||"000000"});if(b)c.getMap(k,b);else return c.getMap()};
var Uc=function(a){var b=a.type;a=Vc(a.coordinates);return"Point"==b&&1==a||"MultiPoint"==b&&2==a||"LineString"==b&&2==a||"LinearRing"==b&&2==a||"MultiLine"==b&&3==a||"Polygon"==b&&3==a||"MultiPolygon"==b&&4==a},Vc=function(a){if(!q(a))return-1;if(q(a[0])){for(var b=Vc(a[0]),c=1;c<a.length;c++)if(Vc(a[c])!=b)return-1;return b+1}for(c=0;c<a.length;c++)if(!fa(a[c]))return-1;return 0==a.length%2?1:-1},Wc=function(a,b,c){(2>b||4<b)&&h(Error("Unexpected nesting level."));if(!q(a)&&c&&(a=Array.prototype.slice.call(c),
"number"==typeof a[0])){0!=a.length%2&&h(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;q(c);)c=c[0],d++;for(;d<b;)a=[a],d++;Vc(a)!=b&&h(Error("Invalid geometry"));return a};O.prototype.d=function(){return U(this.c)};O.prototype.toString=function(){return"ee.Feature("+V(this.c)+")"};v("ee.Feature",O);O.validGeometry=Uc;O.validCoordinates=Vc;O.Point=function(a,b){return{type:"Point",coordinates:[a,b]}};
O.MultiPoint=function(a){return{type:"MultiPoint",coordinates:Wc(a,2,arguments)}};O.Rectangle=function(a,b,c,d){q(a)&&(d=a,a=d[0],b=d[1],c=d[2],d=d[3]);return{type:"Polygon",coordinates:[[[a,d],[a,b],[c,b],[c,d]]]}};O.LineString=function(a){return{type:"LineString",coordinates:Wc(a,2,arguments)}};O.LinearRing=function(a){return{type:"LinearRing",coordinates:Wc(a,2,arguments)}};O.MultiLine=function(a){return{type:"MultiLine",coordinates:Wc(a,3,arguments)}};
O.Polygon=function(a){return{type:"Polygon",coordinates:Wc(a,3,arguments)}};O.MultiPolygon=function(a){return{type:"MultiPolygon",coordinates:Wc(a,4,arguments)}};O.getMap=O.prototype.getMap;O.prototype.serialize=O.prototype.d;O.prototype.toString=O.prototype.toString;var P=function(a,b){if(!(this instanceof P))return new P(a,b);S();a instanceof O&&(a=[a]);if(r(a))a={type:"FeatureCollection",id:a},b&&(a.geo_column=b);else if(fa(a))a={type:"FeatureCollection",table_id:a},b&&(a.geo_column=b);else if(q(a))a={type:"FeatureCollection",features:Na(a,function(a){return new O(a)})};else if(a instanceof P)return a;this.c=a};w(P,R);P.prototype.getMap=function(a,b){var c=new N({algorithm:"DrawVector",collection:this,color:(a||{}).color||"000000"});if(b)c.getMap(k,b);else return c.getMap()};
P.prototype.toString=function(){return"ee.FeatureCollection("+V(this.c)+")"};P.prototype.map=function(a,b,c,d){return Sc(this,O,a,b,c,d)};v("ee.FeatureCollection",P);P.prototype.filter=P.prototype.filter;P.prototype.filterDate=P.prototype.aa;P.prototype.filterMetadata=P.prototype.ba;P.prototype.filterBounds=P.prototype.$;P.prototype.getInfo=P.prototype.t;P.prototype.limit=P.prototype.ca;P.prototype.serialize=P.prototype.d;P.prototype.sort=P.prototype.sort;P.prototype.map=P.prototype.map;
P.prototype.geometry=P.prototype.geometry;P.prototype.getMap=P.prototype.getMap;P.prototype.toString=P.prototype.toString;var Q=function(a){if(!(this instanceof Q))return new Q(a);S();a instanceof N&&(a=[a]);if(r(a))a={type:"ImageCollection",id:a};else if(q(a))a={type:"ImageCollection",images:Na(a,function(a){return new N(a)})};else if(a instanceof Q)return a;this.c=a};w(Q,R);Q.prototype.getMap=function(a,b){var c=this.mosaic();if(b)c.getMap(a,b);else return c.getMap(a)};Q.prototype.Pa=function(a){return new Q({algorithm:"CombineCollectionBands",primary:this,secondary:a})};
Q.prototype.toString=function(){return"ee.ImageCollection("+V(this.c)+")"};Q.prototype.map=function(a,b,c,d){return Sc(this,N,a,b,c,d)};v("ee.ImageCollection",Q);Q.prototype.getMap=Q.prototype.getMap;Q.prototype.combine=Q.prototype.Pa;Q.prototype.filter=Q.prototype.filter;Q.prototype.filterDate=Q.prototype.aa;Q.prototype.filterMetadata=Q.prototype.ba;Q.prototype.filterBounds=Q.prototype.$;Q.prototype.getInfo=Q.prototype.t;Q.prototype.limit=Q.prototype.ca;Q.prototype.serialize=Q.prototype.d;
Q.prototype.sort=Q.prototype.sort;Q.prototype.map=Q.prototype.map;Q.prototype.toString=Q.prototype.toString;var M={j:function(a){M.D||(a?T("/algorithms",uc({}),function(b){M.D=b;a()},"GET"):M.D=T("/algorithms",uc({}),i,"GET"))},get:function(a){M.j();var b=M.D[a];b||h(Error("Unknown algorithm"));a in b||(b.name=a);return b},C:function(a,b,c){b=b||[];c=c||{};var d=a.args,f=b.length+c.length;f>d.length&&h(Error("Incorrect number of arguments: "+a.name+" expects no more than "+d.length+" arguments, got "+f+"."));for(var f={},e=0;e<d.length;e++)f[d[e].name]=j;var e=[],g;for(g in c)g in f||e.push(g);0<e.length&&
h(Error("Unrecognized arguments: "+a.name+"("+e+")"));for(e=0;e<b.length;e++)g=d[e].name,g in c&&h(Error("Argument already set: "+a.name+"("+g+")")),c[g]=b[e];for(e=0;e<d.length;e++)g=d[e].name,g in c?c[g]=M.Aa(d[e].type,c[g]):d[e].optional||h("Missing required argument: "+g);c.algorithm=a.name;return M.Aa(a.returns,c)},oa:function(a,b,c){var d=function(){var d=Array.prototype.slice.call(arguments,0);b&&d.unshift(this);return M.C(a,d,c)};M.la(d,a);return d},Da:function(a,b,c){var d=M.oa(a,b,c);a=
function(){var a=arguments,b=i,c=arguments[arguments.length-1];c&&ga(c)&&(b=c,a=Array.prototype.slice.call(arguments,0,arguments.length-1));a=d.apply(this,a);return wc({json:U(a)},b)};a.signature=d.signature;a.toString=d.toString;return a},ma:function(a,b,c){if(!b)return k;b=function(){var b=Array.prototype.slice.call(arguments,0),d=qa(a);d.returns=k;d.args=a.args.slice(1);d=M.C(d,b,c);d=zc(d.d());"algorithm"in d&&delete d.algorithm;var g={};g[a.args[0].name]=".all";b="Image"==a.returns?Q:P;d={constantArgs:d,
baseAlgorithm:a.name,collection:this,dynamicArgs:g,algorithm:"MapAlgorithm"};"Image"==a.returns||("EEObject"==a.returns||"Feature"==a.returns)||(d.destination=a.name.split(".").pop());return new b(d)};var d=qa(a);d.name="Map("+a.name+", this)";d.args=d.args.slice();d.args[0]=qa(d.args[0]);d.args[0].name="["+d.args[0].name+"]";d.args[0].type+="Collection";M.la(b,d);return b},la:function(a,b){a.signature=b;a.toString=function(){var a=[];a.push(b.name);a.push("(");a.push(Na(b.args.slice(1),function(a){return a.name}).join(", "));
a.push(")\n\n");a.push(b.description);if(b.args.length){a.push("\n\nArgs:\n");for(var d=0;d<b.args.length;d++){0==d?a.push(" this:"):a.push("\n ");var f=b.args[d];a.push(f.name);a.push(" (");a.push(f.type);f.optional&&a.push(", optional");a.push("): ");a.push(f.description)}}return a.join("")}},i:function(a,b,c,d,f){M.j();d=d||"";f=f||M.oa;for(var e in M.D){var g=e.split(".");if(2==g.length&&g[0]==b){var g=d+g[1],l=M.D[e];l.name=e;var s=l.args.length&&M.Ea(l.args[0].type,c),B=s?a.prototype:a;g in
B&&(g+="_");l=f(l,s);l!=k&&(B[g]=l)}}},Ea:function(a,b){if(b==a)return j;switch(a){case "EEObject":return"Image"==b||"Feature"==b||"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "FeatureCollection":case "EECollection":case "Collection":return"Collection"==b||"ImageCollection"==b||"FeatureCollection"==b;case "Object":return j;default:return m}},Aa:function(a,b){switch(a){case "Image":return new N(b);case "ImageCollection":return new Q(b);case "Feature":case "EEObject":return b instanceof
R?{type:"Feature",geometry:b.geometry(),properties:{}}:new O(b);case "FeatureCollection":case "EECollection":return new P(b);case "ErrorMargin":return fa(b)?{type:"ErrorMargin",unit:"meters",value:b}:b;default:return new $(b)}}};v("ee.Algorithms",M);v("ee.Algorithms.addFunctions",M.i);v("ee.Algorithms.applySignature_",M.C);v("ee.Algorithms.init",M.j);v("ee.Algorithms.get",M.get);})();