2013-05-22 15:03:30 -07:00

89 lines
49 KiB
JavaScript

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