// Ol-Cesium. See https://github.com/openlayers/ol-cesium/ // License: https://github.com/openlayers/ol-cesium/blob/master/LICENSE // Version: v3.7-55-g38fe032c7a (function(){'use strict';var k,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=da)}var da=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}(); function ea(){ca();var a=ba.Symbol.iterator;a||(a=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(this)}});ea=function(){}}function fa(a){var b=0;return ha(function(){return bd&&(g|=4);be&&(g|=2);0===g&&(g=1);return g}function ib(){return[Infinity,Infinity,-Infinity,-Infinity]}function rb(a,b,c,d,e){return e?(e[0]=a,e[1]=b,e[2]=c,e[3]=d,e):[a,b,c,d]}function sb(a,b){var c=a[0];a=a[1];return rb(c,a,c,a,b)}function tb(a,b,c,d,e){e=rb(Infinity,Infinity,-Infinity,-Infinity,e);return ub(e,a,b,c,d)} function vb(a,b){return a[0]==b[0]&&a[2]==b[2]&&a[1]==b[1]&&a[3]==b[3]}function wb(a,b){b[0]a[2]&&(a[2]=b[2]);b[1]a[3]&&(a[3]=b[3]);return a}function jb(a,b){b[0]a[2]&&(a[2]=b[0]);b[1]a[3]&&(a[3]=b[1])}function ub(a,b,c,d,e){for(;cb[0]?a[0]:b[0],c[1]=a[1]>b[1]?a[1]:b[1],c[2]=a[2]=b[0]&&a[1]<=b[3]&&a[3]>=b[1]}function Db(a){return a[2]a*b?a+b:a}function Tb(a,b,c){return a+c*(b-a)};function Ub(a){Wa.call(this);var b=wa({},a);b.opacity=void 0!==a.opacity?a.opacity:1;b.visible=void 0!==a.visible?a.visible:!0;b.zIndex=void 0!==a.zIndex?a.zIndex:0;b.maxResolution=void 0!==a.maxResolution?a.maxResolution:Infinity;b.minResolution=void 0!==a.minResolution?a.minResolution:0;this.J(b);this.c={layer:this,hf:!0}}v(Ub,Wa); function Vb(a){a.c.opacity=Mb(a.La(),0,1);a.c.fk=a.xg();a.c.visible=a.lb();a.c.extent=a.D();a.c.zIndex=a.Da();a.c.maxResolution=a.tc();a.c.minResolution=Math.max(a.uc(),0);return a.c}k=Ub.prototype;k.D=function(){return this.get("extent")};k.tc=function(){return this.get("maxResolution")};k.uc=function(){return this.get("minResolution")};k.La=function(){return this.get("opacity")};k.lb=function(){return this.get("visible")};k.Da=function(){return this.get("zIndex")}; k.Oc=function(a){this.set("extent",a)};k.Sc=function(a){this.set("maxResolution",a)};k.Tc=function(a){this.set("minResolution",a)};k.Pc=function(a){this.set("opacity",a)};k.ec=function(a){this.set("visible",a)};k.jc=function(a){this.set("zIndex",a)};function Wb(a){var b=a||{};a=wa({},b);delete a.layers;b=b.layers;Ub.call(this,a);this.i=[];this.a={};y(this,Ya(Xb),this.wm,this);b?Array.isArray(b)?b=new bb(b.slice(),{unique:!0}):gb(b instanceof bb,43):b=new bb(void 0,{unique:!0});this.$i(b)}v(Wb,Ub);k=Wb.prototype;k.Zd=function(){};k.df=function(){this.lb()&&this.u()}; k.wm=function(){this.i.forEach(Ca);this.i.length=0;var a=this.Tb();this.i.push(y(a,"add",this.vm,this),y(a,"remove",this.xm,this));for(var b in this.a)this.a[b].forEach(Ca);xa(this.a);a=a.a;var c;b=0;for(c=a.length;ba-this.c||d||0!=b.length||(this.j&&console.log("stopping rendering @ "+Date.now()),this.i.qh(!0),this.f=!0);Cesium.Matrix4.clone(c.viewMatrix,this.o)};ec.prototype.s=function(){this.b()}; ec.prototype.b=function(){this.j&&this.f&&console.log("starting rendering @ "+Date.now());this.c=Date.now();this.i.qh(!1);this.f=!1};ec.prototype.Ba=function(a){this.j=a};/* Latitude/longitude spherical geodesy formulae taken from http://www.movable-type.co.uk/scripts/latlong.html Licensed under CC-BY-3.0. */ function hc(a){this.radius=a}hc.prototype.a=function(a){return jc(a,this.radius)};hc.prototype.b=function(a,b){return kc(a,b,this.radius)};hc.prototype.offset=function(a,b,c){var d=Rb(a[1]);b/=this.radius;var e=Math.asin(Math.sin(d)*Math.cos(b)+Math.cos(d)*Math.sin(b)*Math.cos(c));return[180*(Rb(a[0])+Math.atan2(Math.sin(c)*Math.sin(b)*Math.cos(d),Math.cos(b)-Math.sin(d)*Math.sin(e)))/Math.PI,180*e/Math.PI]}; function lc(a,b){var c=b||{},d=c.radius||6371008.8;c=c.projection||"EPSG:3857";a=a.clone().transform(c,"EPSG:4326");var e=a.U();c=0;var f;switch(e){case "Point":case "MultiPoint":break;case "LineString":case "LinearRing":b=a.T();c=mc(b,d);break;case "MultiLineString":case "Polygon":b=a.T();a=0;for(e=b.length;awc?f=wc:f<-wc&&(f=-wc);b[e+1]=f}return b}function zc(a,b,c){var d=a.length;c=1=a.minResolution&&b=b.ga&&a.ha<=b.ka&&a.ka>=b.ha};function fd(a,b){return a>b?1:ac)for(c=1;c>>0,d,e=0;ee)return 1;if(e>d)return-1}return 0};function ud(a,b){a[0]+=b[0];a[1]+=b[1];return a}function vd(a,b){var c=a[0];a=a[1];var d=b[0],e=b[1];b=d[0];d=d[1];var f=e[0];e=e[1];var g=f-b,h=e-d;c=0===g&&0===h?0:(g*(c-b)+h*(a-d))/(g*g+h*h||0);0>=c?(a=b,c=d):1<=c?(a=f,c=e):(a=b+c*g,c=d+c*h);return[a,c]} function wd(a,b,c){a=Sb(a+180,360)-180;var d=Math.abs(3600*a);c=c||0;var e=Math.pow(10,c),f=Math.floor(d/3600),g=Math.floor((d-3600*f)/60);d=Math.ceil((d-3600*f-60*g)*e)/e;60<=d&&(d=0,g+=1);60<=g&&(g=0,f+=1);return f+"\u00b0 "+sd(g)+"\u2032 "+sd(d,c)+"\u2033 "+b.charAt(0>a?1:0)}function xd(a,b,c){return a?b.replace("{x}",a[0].toFixed(c)).replace("{y}",a[1].toFixed(c)):""}function yd(a,b){for(var c=!0,d=a.length-1;0<=d;--d)if(a[d]!=b[d]){c=!1;break}return c} function zd(a,b){var c=Math.cos(b);b=Math.sin(b);var d=a[1]*c+a[0]*b;a[0]=a[0]*c-a[1]*b;a[1]=d;return a}function Ad(a,b){a[0]*=b;a[1]*=b}function Bd(a,b){var c=a[0]-b[0];a=a[1]-b[1];return c*c+a*a}function Cd(a,b){return Math.sqrt(Bd(a,b))}function Dd(a,b){return Bd(a,vd(a,b))}function Ed(a,b){return xd(a,"{x}, {y}",b)};function Fd(){return!0}function Gd(){return!1};function Hd(a,b,c,d,e){Na.call(this,a);this.vectorContext=b;this.frameState=c;this.context=d;this.glContext=e}v(Hd,Na);var Id=[0,0,0,1],Jd=[],Kd=[0,0,0,1];function Ld(a,b,c,d){0!==b&&(a.translate(c,d),a.rotate(b),a.translate(-c,-d))};var Md=/^#(?:[0-9a-f]{3}){1,2}$/i,Nd=/^([a-z]*)$/i;function Od(a){return Array.isArray(a)?a:Pd(a)}function Qd(a){if("string"!==typeof a){var b=a[0];b!=(b|0)&&(b=b+.5|0);var c=a[1];c!=(c|0)&&(c=c+.5|0);var d=a[2];d!=(d|0)&&(d=d+.5|0);a="rgba("+b+","+c+","+d+","+(void 0===a[3]?1:a[3])+")"}return a} var Pd=function(){var a={},b=0;return function(c){if(a.hasOwnProperty(c))var d=a[c];else{if(1024<=b){d=0;for(var e in a)0===(d++&3)&&(delete a[e],--b)}d=c;Nd.exec(d)&&(e=document.createElement("div"),e.style.color=d,document.body.appendChild(e),d=getComputedStyle(e).color,document.body.removeChild(e));if(Md.exec(d)){var f=d.length-1;gb(3==f||6==f,54);var g=3==f?1:2;f=parseInt(d.substr(1+0*g,g),16);e=parseInt(d.substr(1+1*g,g),16);d=parseInt(d.substr(1+2*g,g),16);1==g&&(f=(f<<4)+f,e=(e<<4)+e,d=(d<< 4)+d);f=[f,e,d,1]}else 0==d.indexOf("rgba(")?(d=d.slice(5,-1).split(",").map(Number),f=Rd(d)):0==d.indexOf("rgb(")?(d=d.slice(4,-1).split(",").map(Number),d.push(1),f=Rd(d)):gb(!1,14);d=f;a[c]=d;++b}return d}}();function Rd(a){var b=[];b[0]=Mb(a[0]+.5|0,0,255);b[1]=Mb(a[1]+.5|0,0,255);b[2]=Mb(a[2]+.5|0,0,255);b[3]=Mb(a[3],0,1);return b};function Sd(a){return"string"===typeof a||a instanceof CanvasPattern||a instanceof CanvasGradient?a:Qd(a)};function Td(){Wa.call(this);this.o=ib();this.s=-1;this.i={};this.l=this.f=0}v(Td,Wa);k=Td.prototype;k.Fb=function(a,b){b=b?b:[NaN,NaN];this.Lb(a[0],a[1],b,Infinity);return b};k.yb=function(a){return this.hd(a[0],a[1])};k.hd=Gd;k.D=function(a){this.s!=this.g&&(this.o=this.Re(this.o),this.s=this.g);var b=this.o;a?(a[0]=b[0],a[1]=b[1],a[2]=b[2],a[3]=b[3]):a=b;return a};k.Wb=function(a){return this.me(a*a)};k.transform=function(a,b){this.yc(Vc(a,b));return this};function Ud(a,b,c,d,e,f){for(var g=f?f:[],h=0;ba||0!==this.f&&a<=this.f)return this;var b=a.toString();if(this.i.hasOwnProperty(b))return this.i[b];var c=this.Ed(a);if(c.ja().lengtha.da&&(a.da=d.da),d.haa.ka&&(a.ka=d.ka)):a[b][c]=d:(a[b]={},a[b][c]=d)} function $e(a,b,c,d,e,f,g,h,l,m){var n=x(b).toString();n in a.wantedTiles||(a.wantedTiles[n]={});var p=a.wantedTiles[n];a=a.tileQueue;var q=c.minZoom,t,u,w;for(w=g;w>=q;--w){var z=af(c,f,w,z);var D=c.Ra(w);for(t=z.ga;t<=z.da;++t)for(u=z.ha;u<=z.ka;++u)if(g-w<=h){var B=b.cd(w,t,u,d,e);0==B.getState()&&(p[B.ob()]=!0,B.ob()in a.a||a.i([B,n,bf(c,B.Ka),D]));void 0!==l&&l.call(m,B)}else b.zh(w,t,u,e)}};function cf(a){Se.call(this,a);this.la=ve()}v(cf,Se);function df(a,b,c){var d=b.pixelRatio,e=b.size[0]*d,f=b.size[1]*d,g=b.viewState.rotation,h=Bb(c),l=Ab(c),m=zb(c);c=yb(c);Ae(b.coordinateToPixelTransform,h);Ae(b.coordinateToPixelTransform,l);Ae(b.coordinateToPixelTransform,m);Ae(b.coordinateToPixelTransform,c);a.save();Ld(a,-g,e/2,f/2);a.beginPath();a.moveTo(h[0]*d,h[1]*d);a.lineTo(l[0]*d,l[1]*d);a.lineTo(m[0]*d,m[1]*d);a.lineTo(c[0]*d,c[1]*d);a.clip();Ld(a,g,e/2,f/2)} function ef(a,b,c,d,e){var f=a.a;if(Ra(f,b)){var g=d.size[0]*d.pixelRatio,h=d.size[1]*d.pixelRatio,l=d.viewState.rotation;Ld(c,-l,g/2,h/2);a=void 0!==e?e:ff(a,d,0);f.b(new Hd(b,new Ge(c,d.pixelRatio,d.extent,a,d.viewState.rotation),d,c,null));Ld(c,l,g/2,h/2)}}cf.prototype.I=function(a,b,c,d){if(this.Ga(a,b,0,Fd,this))return c.call(d,this.a,null)};cf.prototype.Cf=function(a,b,c,d){ef(this,"postcompose",a,b,d)}; function ff(a,b,c){var d=b.viewState,e=b.pixelRatio,f=e/d.resolution;return Ee(a.la,e*b.size[0]/2,e*b.size[1]/2,f,-f,-d.rotation,-d.center[0]+c,-d.center[1])};function gf(a){cf.call(this,a);this.s=ve();this.j=null}v(gf,cf);gf.prototype.v=function(a,b,c){ef(this,"precompose",c,a,void 0);var d=this.W();if(d){var e=b.extent,f=void 0!==e&&!pb(e,a.extent)&&Jb(e,a.extent);f&&df(c,a,e);e=this.C();var g=c.globalAlpha;c.globalAlpha=b.opacity;c.drawImage(d,0,0,+d.width,+d.height,Math.round(e[4]),Math.round(e[5]),Math.round(d.width*e[0]),Math.round(d.height*e[3]));c.globalAlpha=g;f&&c.restore()}this.Cf(c,a,b)}; gf.prototype.Ga=function(a,b,c,d,e){var f=this.a;return f.ba().Ga(a,b.viewState.resolution,b.viewState.rotation,c,b.skippedFeatureUids,function(a){return d.call(e,a,f)})}; gf.prototype.I=function(a,b,c,d){if(this.W()){if(this.a.ba().Ga!==ua)return cf.prototype.I.apply(this,arguments);var e=Ae(this.s,a.slice());Ad(e,b.viewState.resolution/this.f);this.j||(this.j=pd(1,1));this.j.clearRect(0,0,1,1);this.j.drawImage(this.W(),e[0],e[1],1,1,0,0,1,1);e=this.j.getImageData(0,0,1,1).data;if(0=-Jf?void 0:0f;f+=d)this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=0,this.a[b++]=this.C,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=1,this.a[b++]=this.C,this.a[b++]=a[f],this.a[b++]=a[f+1],this.a[b++]=2,this.a[b++]=this.C,this.a[b++]=a[f],this.a[b++]=a[f+ 1],this.a[b++]=3,this.a[b++]=this.C,this.b[c++]=e,this.b[c++]=e+1,this.b[c++]=e+2,this.b[c++]=e+2,this.b[c++]=e+3,this.b[c++]=e,e+=4}else this.c.u&&(this.l.pop(),this.l.length&&(d=this.l[this.l.length-1],this.c.fillColor=d[0],this.c.strokeColor=d[1],this.c.lineWidth=d[2],this.c.u=!1))};k.Gb=function(){this.s=new Kf(this.a);this.o=new Kf(this.b);this.g.push(this.b.length);0===this.v.length&&0=h;){var l=this.g[g];var m=this.f[g];m=x(m).toString();c[m]&&(d!==f&&Ef(a,b,d,f),f=l);g--;d=l}d!==f&&Ef(a,b,d,f);d=f=h}}}; k.Ue=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.v.length-1;0<=f;--f){var m=this.l[f];a.uniform4fv(this.I.ea,m[0]);Qf(this,a,m[1],m[2]);for(g=this.v[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.f[h];var p=x(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||Jb(e,n.V().D()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),Ef(a,b,m,l),l=d(n)))return l;h--;l=m}}};function Qf(a,b,c,d){b.uniform4fv(a.I.Ba,c);b.uniform1f(a.I.ta,d)} k.Ta=function(a,b){if(b){var c=b.g;this.c.lineDash=c?c:Gf;c=b.f;this.c.lineDashOffset=c?c:0;c=b.b;c instanceof CanvasGradient||c instanceof CanvasPattern?c=Hf:c=Od(c).map(function(a,b){return 3!=b?a/255:a})||Hf;b=b.c;b=void 0!==b?b:1}else c=[0,0,0,0],b=0;a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=Ff:a=Od(a).map(function(a,b){return 3!=b?a/255:a})||Ff;this.c.strokeColor&&ld(this.c.strokeColor,c)&&this.c.fillColor&&ld(this.c.fillColor,a)&&this.c.lineWidth===b||(this.c.u= !0,this.c.fillColor=a,this.c.strokeColor=c,this.c.lineWidth=b,this.l.push([a,c,b]))};function Rf(){this.b="precision mediump float;\nvarying vec2 v_texCoord;\nvarying float v_opacity;\n\nuniform float u_opacity;\nuniform sampler2D u_image;\n\nvoid main(void) {\n vec4 texColor = texture2D(u_image, v_texCoord);\n gl_FragColor.rgb = texColor.rgb;\n float alpha = texColor.a * v_opacity * u_opacity;\n if (alpha == 0.0) {\n discard;\n }\n gl_FragColor.a = alpha;\n}\n"}v(Rf,tf);var Sf=new Rf; function Tf(){this.b="varying vec2 v_texCoord;\nvarying float v_opacity;\n\nattribute vec2 a_position;\nattribute vec2 a_texCoord;\nattribute vec2 a_offsets;\nattribute float a_opacity;\nattribute float a_rotateWithView;\n\nuniform mat4 u_projectionMatrix;\nuniform mat4 u_offsetScaleMatrix;\nuniform mat4 u_offsetRotateMatrix;\n\nvoid main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n if (a_rotateWithView == 1.0) {\n offsetMatrix = u_offsetScaleMatrix * u_offsetRotateMatrix;\n }\n vec4 offsets = offsetMatrix * vec4(a_offsets, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n v_texCoord = a_texCoord;\n v_opacity = a_opacity;\n}\n\n\n"} v(Tf,uf);var Uf=new Tf;function Vf(a,b){this.c=a.getUniformLocation(b,"u_offsetRotateMatrix");this.i=a.getUniformLocation(b,"u_offsetScaleMatrix");this.a=a.getUniformLocation(b,"u_opacity");this.g=a.getUniformLocation(b,"u_projectionMatrix");this.s=a.getAttribLocation(b,"a_offsets");this.I=a.getAttribLocation(b,"a_opacity");this.b=a.getAttribLocation(b,"a_position");this.C=a.getAttribLocation(b,"a_rotateWithView");this.B=a.getAttribLocation(b,"a_texCoord")};function Wf(a,b){this.j=a;this.b=b;this.a={};this.c={};this.g={};this.o=this.s=this.i=this.l=null;(this.f=gd(ta,"OES_element_index_uint"))&&b.getExtension("OES_element_index_uint");y(this.j,"webglcontextlost",this.Jp,this);y(this.j,"webglcontextrestored",this.Kp,this)}v(Wf,La); function Df(a,b,c){var d=a.b,e=c.b,f=String(x(c));if(f in a.a)d.bindBuffer(b,a.a[f].buffer);else{var g=d.createBuffer();d.bindBuffer(b,g);var h;34962==b?h=new Float32Array(e):34963==b&&(h=a.f?new Uint32Array(e):new Uint16Array(e));d.bufferData(b,h,c.a);a.a[f]={mc:c,buffer:g}}}function Of(a,b){var c=a.b;b=String(x(b));var d=a.a[b];c.isContextLost()||c.deleteBuffer(d.buffer);delete a.a[b]}k=Wf.prototype; k.xa=function(){Ka(this.j);var a=this.b;if(!a.isContextLost()){for(var b in this.a)a.deleteBuffer(this.a[b].buffer);for(b in this.g)a.deleteProgram(this.g[b]);for(b in this.c)a.deleteShader(this.c[b]);a.deleteFramebuffer(this.i);a.deleteRenderbuffer(this.o);a.deleteTexture(this.s)}};k.Ip=function(){return this.b}; function Xf(a){if(!a.i){var b=a.b,c=b.createFramebuffer();b.bindFramebuffer(b.FRAMEBUFFER,c);var d=Yf(b,1,1),e=b.createRenderbuffer();b.bindRenderbuffer(b.RENDERBUFFER,e);b.renderbufferStorage(b.RENDERBUFFER,b.DEPTH_COMPONENT16,1,1);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,d,0);b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,e);b.bindTexture(b.TEXTURE_2D,null);b.bindRenderbuffer(b.RENDERBUFFER,null);b.bindFramebuffer(b.FRAMEBUFFER,null);a.i=c; a.s=d;a.o=e}return a.i}function Zf(a,b){var c=String(x(b));if(c in a.c)return a.c[c];var d=a.b,e=d.createShader(b.U());d.shaderSource(e,b.b);d.compileShader(e);return a.c[c]=e}function Pf(a,b,c){var d=x(b)+"/"+x(c);if(d in a.g)return a.g[d];var e=a.b,f=e.createProgram();e.attachShader(f,Zf(a,b));e.attachShader(f,Zf(a,c));e.linkProgram(f);return a.g[d]=f}k.Jp=function(){xa(this.a);xa(this.c);xa(this.g);this.o=this.s=this.i=this.l=null};k.Kp=function(){}; k.ld=function(a){if(a==this.l)return!1;this.b.useProgram(a);this.l=a;return!0};function $f(a,b,c){var d=a.createTexture();a.bindTexture(a.TEXTURE_2D,d);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);void 0!==b&&a.texParameteri(3553,10242,b);void 0!==c&&a.texParameteri(3553,10243,c);return d}function Yf(a,b,c){var d=$f(a,void 0,void 0);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b,c,0,a.RGBA,a.UNSIGNED_BYTE,null);return d} function ag(a,b){var c=$f(a,33071,33071);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,b);return c};function bg(a,b){Cf.call(this,a,b);this.ea=this.B=void 0;this.C=[];this.I=[];this.G=void 0;this.l=[];this.c=[];this.Ba=this.N=void 0;this.ta=null;this.oa=this.la=this.Za=this.$=this.X=this.aa=void 0;this.Xa=[];this.v=[];this.Db=void 0}v(bg,Cf);k=bg.prototype;k.Hb=function(a){var b=this.s,c=this.o,d=this.Xa,e=this.v,f=a.b;return function(){if(!f.isContextLost()){var g;var h=0;for(g=d.length;h=l;){var m=this.g[h];var n=this.f[h];var p=x(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||Jb(e,n.V().D()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),Ef(a,b,m,g),g=d(n)))return g;g=m;h--}}}; k.ic=function(a){var b=a.Gc(),c=a.W(1),d=a.Ye(),e=a.Rg(),f=a.La(),g=a.jd(),h=a.j,l=a.i,m=a.gc();a=a.Ma();if(0===this.l.length)this.l.push(c);else{var n=this.l[this.l.length-1];x(n)!=x(c)&&(this.C.push(this.b.length),this.l.push(c))}0===this.c.length?this.c.push(e):(n=this.c[this.c.length-1],x(n)!=x(e)&&(this.I.push(this.b.length),this.c.push(e)));this.B=b[0];this.ea=b[1];this.G=m[1];this.N=d[1];this.Ba=d[0];this.aa=f;this.X=g[0];this.$=g[1];this.la=l;this.Za=h;this.oa=a;this.Db=m[0]};function eg(a,b,c,d){for(var e=0,f=a[c-d],g=a[c-d+1];bc&&(this.g.push(c),this.f.push(b),this.c.u&&(this.l.push(c),this.c.u=!1))}; function Dg(a,b,c,d){kg(b,b.length,d)||(b.push(b[0]),b.push(b[1]));rg(a,b,b.length,d);if(c.length){var e;b=0;for(e=c.length;b=n;){var p=this.g[m]; var q=this.f[m];q=x(q).toString();c[q]&&(g!==l&&(Ef(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(Ef(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))}; k.Ue=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.l.length-1;0<=f;--f){var m=this.v[f];Fg(this,a,m[0],m[1],m[2]);for(g=this.l[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.f[h];var p=x(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||Jb(e,n.V().D()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),Ef(a,b,m,l),l=d(n)))return l;h--;l=m}}};function Fg(a,b,c,d,e){b.uniform4fv(a.I.ea,c);b.uniform1f(a.I.ta,d);b.uniform1f(a.I.Ba,e)} k.Ta=function(a,b){a=b.i;this.c.lineCap=void 0!==a?a:"round";a=b.g;this.c.lineDash=a?a:Gf;a=b.f;this.c.lineDashOffset=a?a:0;a=b.j;this.c.lineJoin=void 0!==a?a:"round";a=b.b;a instanceof CanvasGradient||a instanceof CanvasPattern?a=Hf:a=Od(a).map(function(a,b){return 3!=b?a/255:a})||Hf;var c=b.c;c=void 0!==c?c:1;b=b.l;b=void 0!==b?b:10;this.c.strokeColor&&ld(this.c.strokeColor,a)&&this.c.lineWidth===c&&this.c.miterLimit===b||(this.c.u=!0,this.c.strokeColor=a,this.c.lineWidth=c,this.c.miterLimit=b, this.v.push([a,c,b]))};var ug=3,vg=5,tg=7,wg=11,xg=13,yg=17,zg=19,Ag=23;function Gg(a,b,c,d,e){return!xb(e,function(e){return!Hg(a,b,c,d,e[0],e[1])})}function Hg(a,b,c,d,e,f){for(var g=0,h=a[c-d],l=a[c-d+1];bf&&0<(m-h)*(f-l)-(e-h)*(n-l)&&g++:n<=f&&0>(m-h)*(f-l)-(e-h)*(n-l)&&g--;h=m;l=n}return 0!==g}function Ig(a,b,c,d,e,f){if(0===c.length||!Hg(a,b,c[0],d,e,f))return!1;var g;b=1;for(g=c.length;bd;){if(600m-l/2?-1:1);e(a,b,Math.max(d,Math.floor(b-m*p/l+n)),Math.min(f,Math.floor(b+(l-m)*p/l+n)),g)}l=a[b];m=d;p=f;h(a,d,b);for(0g(a[m],l);)m++;for(;0b?1:0}b.na=d;b.na.b=d},{}],2:[function(a,b){function d(a,b){if(!(this instanceof d))return new d(a,b);this.cg=Math.max(4,a||9);this.Kh=Math.max(2,Math.ceil(.4*this.cg));b&&this.Nk(b);this.clear()}function e(a,b){h(a,0,a.children.length,b,a)}function h(a,b,d,e,f){f||(f=w(null));f.ga=Infinity;f.ha=Infinity; f.da=-Infinity;f.ka=-Infinity;for(var g;b=a.ga&&b.ka>= a.ha}function w(a){return{children:a,height:1,nb:!0,ga:Infinity,ha:Infinity,da:-Infinity,ka:-Infinity}}function z(a,b,d,e,f){for(var g=[b,d],h;g.length;)d=g.pop(),b=g.pop(),d-b<=e||(h=b+Math.ceil((d-b)/e/2)*e,D(a,h,b,d,f),g.push(b,h,h,d))}b.na=d;var D=a("quickselect");d.prototype={all:function(){return this.Fh(this.data,[])},search:function(a){var b=this.data,d=[],e=this.Cb;if(!u(a,b))return d;for(var f=[],g,h,l,m;b;){g=0;for(h=b.children.length;gthis.cg)this.Sk(e, b),b--;else break;this.Gk(d,e,b)},Sk:function(a,b){var d=a[b],f=d.children.length,g=this.Kh;this.Hk(d,g,f);f=this.Ik(d,g,f);f=w(d.children.splice(f,d.children.length-f));f.height=d.height;f.nb=d.nb;e(d,this.Cb);e(f,this.Cb);b?a[b-1].children.push(f):this.Mh(d,f)},Mh:function(a,b){this.data=w([a,b]);this.data.height=a.height+1;this.data.nb=!1;e(this.data,this.Cb)},Ik:function(a,b,d){var e,f;var g=f=Infinity;for(e=b;e<=d-b;e++){var l=h(a,0,e,this.Cb);var m=h(a,e,d,this.Cb);var n=Math.max(0,Math.min(l.da, m.da)-Math.max(l.ga,m.ga))*Math.max(0,Math.min(l.ka,m.ka)-Math.max(l.ha,m.ha));l=p(l)+p(m);if(n=b;n--)p=a.children[n],l(g,a.nb?e(p):p),m+=q(g);return m}, Gk:function(a,b,d){for(;0<=d;d--)l(b[d],a)},Kk:function(a){for(var b=a.length-1,d;0<=b;b--)0===a[b].children.length?0f?b[q]:f;p=t}}else for(q=b.length-c,p=l=mh(a,b[q],b[q+1],h++),f=b[q],q-=c,g=0;q>=g;q-=c)t=mh(a,b[q],b[q+1],h++),n.push(nh(p,t,d)),m.push([Math.min(p.x,t.x),Math.min(p.y,t.y),Math.max(p.x,t.x),Math.max(p.y,t.y)]),f= b[q]>f?b[q]:f,p=t;n.push(nh(t,l,d));m.push([Math.min(p.x,t.x),Math.min(p.y,t.y),Math.max(p.x,t.x),Math.max(p.y,t.y)]);e.load(m,n);return f}function kh(a,b,c){var d=Rg(a),e=d,f=Sg(a),g=!1;do{var h=c?If(f.Y.x,f.Y.y,e.Y.x,e.Y.y,e.ca.x,e.ca.y):If(e.ca.x,e.ca.y,e.Y.x,e.Y.y,f.Y.x,f.Y.y);void 0===h?(oh(e,f,a,b),g=!0,f===d&&(d=Tg(a)),f=e,Ug(a)):e.Y.Ab!==h&&(e.Y.Ab=h,g=!0);e=f;f=Sg(a)}while(e!==d);return g} function jh(a,b,c,d,e){kh(a,e,!0);for(var f=Rg(a);f.Y.x!==b;)f=Sg(a);b=f.Y;d={x:d,y:b.y,mb:-1};var g=Infinity,h;var l=ph({ca:b,Y:d},e,!0);var m=0;for(h=l.length;mJf&&d<1-Jf&&c>Jf&&c<1-Jf||e&&0<=d&&1>=d&&0<=c&&1>=c))return[a.x+d*(b.x-a.x),a.y+d*(b.y-a.y)]} function vh(a,b,c,d,e){if(void 0===b.Ab||void 0===d.Ab)return!1;var f=(c.x-d.x)*(b.y-d.y)>(c.y-d.y)*(b.x-d.x);e=(e.x-d.x)*(b.y-d.y)<(e.y-d.y)*(b.x-d.x);a=(a.x-b.x)*(d.y-b.y)>(a.y-b.y)*(d.x-b.x);c=(c.x-b.x)*(d.y-b.y)<(c.y-b.y)*(d.x-b.x);b=b.Ab?c||a:c&&a;return(d.Ab?e||f:e&&f)&&b}k=gh.prototype; k.Dc=function(a,b){var c=a.bd();a=a.ya();var d=this.b.length,e=this.j.b.length,f,g;var h=0;for(f=c.length;hd&&(this.g.push(d),this.f.push(b),this.l.u&&(this.c.push(d),this.l.u=!1));this.j.b.length>e&&Eg(this.j,b,e)}; k.Fc=function(a,b){var c=a.Ic();a=a.ya();if(0=n;){var p=this.g[m];var q=this.f[m];q=x(q).toString(); c[q]&&(g!==l&&(Ef(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT)),l=p);m--;g=p}g!==l&&(Ef(a,b,g,l),a.clear(a.DEPTH_BUFFER_BIT));g=l=n}}d||(a.disable(a.DEPTH_TEST),a.clear(a.DEPTH_BUFFER_BIT),a.depthMask(f),a.depthFunc(e))}; k.Ue=function(a,b,c,d,e){var f,g;var h=this.g.length-2;var l=this.g[h+1];for(f=this.c.length-1;0<=f;--f){var m=this.v[f];a.uniform4fv(this.I.ea,m);for(g=this.c[f];0<=h&&this.g[h]>=g;){m=this.g[h];var n=this.f[h];var p=x(n).toString();if(void 0===c[p]&&n.V()&&(void 0===e||Jb(e,n.V().D()))&&(a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT),Ef(a,b,m,l),l=d(n)))return l;h--;l=m}}}; k.Ta=function(a,b){a=a?a.b:[0,0,0,0];a instanceof CanvasGradient||a instanceof CanvasPattern?a=Ff:a=Od(a).map(function(a,b){return 3!=b?a/255:a})||Ff;this.l.fillColor&&ld(a,this.l.fillColor)||(this.l.fillColor=a,this.l.u=!0,this.v.push(a));b?this.j.Ta(null,b):this.j.Ta(null,new Og({color:[0,0,0,0],lineWidth:0}))};function xh(){}xh.prototype.i=function(){};function yh(a,b,c){this.f=b;this.j=a;this.c=c;this.a={}}v(yh,rf);function zh(a,b){var c=[],d;for(d in a.a){var e=a.a[d],f;for(f in e)c.push(e[f].Hb(b))}return function(){for(var a=c.length,b,d=0;da.highWaterMark}bi.prototype.Bd=function(a){for(var b,c;ci(this);){b=this.a.ud;c=b.Ka[0].toString();var d;if(d=c in a)b=b.Ka,d=cd(a[c],b[1],b[2]);if(d)break;else Ma(this.pop())}};function di(a,b,c,d){var e=Xc(c,b,a);c=Jc(b,d,c);b=b.dc();void 0!==b&&(c*=b);b=a.dc();void 0!==b&&(c/=b);a=Jc(a,c,e)/c;isFinite(a)&&0Pa&&(Pa=jd,m=ic)}if(0===Pa){g=null;break a}Pa=g[m];g[m]=g[l];g[l]=Pa;for(m=l+1;mthis.b/2){var b=[[a.source[0][0],a.source[0][1]],[a.source[1][0],a.source[1][1]],[a.source[2][0],a.source[2][1]]];b[0][0]-n>this.b/2&&(b[0][0]-=this.b);b[1][0]-n>this.b/2&&(b[1][0]-=this.b);b[2][0]-n>this.b/2&&(b[2][0]-=this.b);Math.max(b[0][0],b[1][0],b[2][0])-Math.min(b[0][0],b[1][0],b[2][0])p,u=!1;if(0a.s),u)){Math.abs(b[0]-d[0])<=Math.abs(b[1]-d[1])?(t=[(c[0]+d[0])/2,(c[1]+d[1])/2],q=a.a(t),n=[(e[0]+b[0])/2,(e[1]+b[1])/2],p=a.a(n),hi(a,b,c,t,n,f,g,q,p,m-1),hi(a,n,t,d,e,p,q,h,l,m-1)):(t=[(b[0]+c[0])/2,(b[1]+c[1])/2],q=a.a(t),n=[(d[0]+e[0])/2,(d[1]+e[1])/2],p=a.a(n),hi(a,b,t,n,e,f,q,p,l,m-1),hi(a,t,c,d,n,q,g,h,p,m-1));return}if(t){if(!a.o)return;a.l=!0}a.c.push({source:[f,h,l],target:[b,d,e]});a.c.push({source:[f,g,h],target:[b,c,d]})}} function ii(a){var b=ib();a.c.forEach(function(a){a=a.source;jb(b,a[0]);jb(b,a[1]);jb(b,a[2])});return b};function ji(a,b,c,d,e,f,g,h,l,m,n){Yh.call(this,e,0);this.B=void 0!==n?n:!1;this.C=g;this.v=h;this.I=null;this.c=b;this.l=d;this.o=f?f:e;this.g=[];this.Sd=null;this.f=0;f=d.Ya(this.o);h=this.l.D();e=this.c.D();f=h?Ib(f,h):f;if(0===Cb(f))this.state=4;else if((h=a.D())&&(e?e=Ib(e,h):e=h),d=di(a,c,Gb(f),d.Ra(this.o[0])),!isFinite(d)||0>=d)this.state=4;else if(this.s=new gi(a,c,f,e,d*(void 0!==m?m:.5)),0===this.s.c.length)this.state=4;else if(this.f=b.dd(d),c=ii(this.s),e&&(a.a?(c[1]=Mb(c[1],e[1],e[3]), c[3]=Mb(c[3],e[1],e[3])):c=Ib(c,e)),Cb(c)){a=af(b,c,this.f);for(b=a.ga;b<=a.da;b++)for(c=a.ha;c<=a.ka;c++)(m=l(this.f,b,c,g))&&this.g.push(m);0===this.g.length&&(this.state=4)}else this.state=4}v(ji,Yh);ji.prototype.xa=function(){1==this.state&&(this.Sd.forEach(Ca),this.Sd=null);Yh.prototype.xa.call(this)};ji.prototype.W=function(){return this.I}; ji.prototype.Ae=function(){var a=[];this.g.forEach(function(b){b&&2==b.getState()&&a.push({extent:this.c.Ya(b.Ka),image:b.W()})},this);this.g.length=0;if(0===a.length)this.state=3;else{var b=this.o[0],c=this.l.gb(b),d="number"===typeof c?c:c[0];c="number"===typeof c?c:c[1];b=this.l.Ra(b);var e=this.c.Ra(this.f),f=this.l.Ya(this.o);this.I=fi(d,c,this.C,e,this.c.D(),b,f,this.s,a,this.v,this.B);this.state=2}this.u()}; ji.prototype.load=function(){if(0==this.state){this.state=1;this.u();var a=0;this.Sd=[];this.g.forEach(function(b){var c=b.getState();if(0==c||1==c){a++;var d=y(b,"change",function(){var c=b.getState();if(2==c||3==c||4==c)Ca(d),a--,0===a&&(this.Sd.forEach(Ca),this.Sd=null,this.Ae())},this);this.Sd.push(d)}},this);this.g.forEach(function(a){0==a.getState()&&a.load()});0===a&&setTimeout(this.Ae.bind(this),0)}};function ki(a,b,c,d){return void 0!==d?(d[0]=a,d[1]=b,d[2]=c,d):[a,b,c]}function li(a){var b=a[0],c=Array(b),d=1<>=1}return c.join("")};function mi(a,b){var c=/\{z\}/g,d=/\{x\}/g,e=/\{y\}/g,f=/\{-y\}/g;return function(g){if(g)return a.replace(c,g[0].toString()).replace(d,g[1].toString()).replace(e,function(){return(-g[2]-1).toString()}).replace(f,function(){var a=b.a?b.a[g[0]]:null;gb(a,55);return(a.ka-a.ha+1+g[2]).toString()})}}function ni(a,b){for(var c=a.length,d=Array(c),e=0;e=a.minZoom;){if(c.call(null,b,af(a,e,b,d)))return!0;--b}return!1}k.D=function(){return this.s};k.wj=function(){return this.maxZoom};k.xj=function(){return this.minZoom};k.kd=function(a){return this.g?this.g:this.c[a]};k.Ra=function(a){return this.b[a]};k.yj=function(){return this.b};function pf(a,b,c,d){return b[0]e||e>c.maxZoom)c=!1;else{var f=c.D();c=(c=f?af(c,f,e):c.a?c.a[e]:null)?cd(c,d,a):!0}return c?b:null} k.Aa=function(){this.a.clear();this.u()};k.zh=ua;function Gi(a,b){Na.call(this,a);this.tile=b}v(Gi,Na);function Hi(a){Di.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tilePixelRatio:a.tilePixelRatio,wrapX:a.wrapX});this.tileLoadFunction=a.tileLoadFunction;this.tileUrlFunction=this.Yc?this.Yc.bind(this):pi;this.urls=null;a.urls?this.jb(a.urls):a.url&&this.pb(a.url);a.tileUrlFunction&&this.ib(a.tileUrlFunction)}v(Hi,Di);k=Hi.prototype;k.ub=function(){return this.tileLoadFunction}; k.wb=function(){return this.tileUrlFunction};k.xb=function(){return this.urls};k.oj=function(a){a=a.target;switch(a.getState()){case 1:this.b(new Gi("tileloadstart",a));break;case 2:this.b(new Gi("tileloadend",a));break;case 3:this.b(new Gi("tileloaderror",a))}};k.Bb=function(a){this.a.clear();this.tileLoadFunction=a;this.u()};k.ib=function(a,b){this.tileUrlFunction=a;"undefined"!==typeof b?Ei(this,b):this.u()}; k.pb=function(a){var b=this.urls=qi(a);this.ib(this.Yc?this.Yc.bind(this):ni(b,this.tileGrid),a)};k.jb=function(a){this.urls=a;var b=a.join("\n");this.ib(this.Yc?this.Yc.bind(this):ni(a,this.tileGrid),b)};k.zh=function(a,b,c){a=this.cc(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function A(a){Hi.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,extent:a.extent,logo:a.logo,opaque:a.opaque,projection:a.projection,state:a.state,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction?a.tileLoadFunction:Ii,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls,wrapX:a.wrapX});this.crossOrigin=void 0!==a.crossOrigin?a.crossOrigin:null;this.tileClass=void 0!==a.tileClass?a.tileClass:Zh;this.f={};this.s={};this.wa=a.reprojectionErrorThreshold; this.G=!1}v(A,Hi);k=A.prototype;k.nj=function(){if(ci(this.a))return!0;for(var a in this.f)if(ci(this.f[a]))return!0;return!1};k.Bd=function(a,b){a=this.ne(a);this.a.Bd(this.a==a?b:{});for(var c in this.f){var d=this.f[c];d.Bd(d==a?b:{})}};k.sg=function(a){return this.c&&a&&!Uc(this.c,a)?0:this.tg()};k.tg=function(){return 0};k.wg=function(a){return this.c&&a&&!Uc(this.c,a)?!1:Hi.prototype.wg.call(this,a)}; k.Ob=function(a){var b=this.c;return!this.tileGrid||b&&!Uc(b,a)?(b=x(a).toString(),b in this.s||(this.s[b]=vi(a)),this.s[b]):this.tileGrid};k.ne=function(a){var b=this.c;if(!b||Uc(b,a))return this.a;a=x(a).toString();a in this.f||(this.f[a]=new bi(this.a.highWaterMark));return this.f[a]};function Ji(a,b,c,d,e,f,g){b=[b,c,d];e=(c=Fi(a,b,f))?a.tileUrlFunction(c,e,f):void 0;e=new a.tileClass(b,void 0!==e?0:4,void 0!==e?e:"",a.crossOrigin,a.tileLoadFunction);e.key=g;y(e,"change",a.oj,a);return e} k.cd=function(a,b,c,d,e){if(this.c&&e&&!Uc(this.c,e)){var f=this.ne(e);c=[a,b,c];var g;a=this.cc.apply(this,c);f.b.hasOwnProperty(a)&&(g=f.get(a));b=this.Kc;if(g&&g.key==b)return g;var h=this.c,l=this.Ob(h),m=this.Ob(e),n=Fi(this,c,e);d=new ji(h,l,e,m,c,n,this.vb(d),this.tg(),function(a,b,c,d){return Ki(this,a,b,c,d,h)}.bind(this),this.wa,this.G);d.key=b;g?(d.a=g,f.replace(a,d)):f.set(a,d);return d}return Ki(this,a,b,c,d,e)}; function Ki(a,b,c,d,e,f){var g=a.cc(b,c,d),h=a.Kc;if(a.a.b.hasOwnProperty(g)){var l=a.a.get(g);if(l.key!=h){var m=l;l=Ji(a,b,c,d,e,f,h);0==m.getState()?l.a=m.a:l.a=m;if(l.a){b=l.a;c=l;do{if(2==b.getState()){b.a=null;break}else 1==b.getState()?c=b:0==b.getState()?c.a=b.a:c=b;b=c.a}while(b)}a.a.replace(g,l)}}else l=Ji(a,b,c,d,e,f,h),a.a.set(g,l);return l}k.Ub=function(a){if(this.G!=a){this.G=a;for(var b in this.f)this.f[b].clear();this.u()}}; k.Vb=function(a,b){if(a=Lc(a))a=x(a).toString(),a in this.s||(this.s[a]=b)};function Ii(a,b){a.W().src=b};function Li(a,b){this.b=a;this.a=null;this.o=b||null;this.f=!1;if(a=this.b.get("olcs.proxy"))"function"===typeof a?this.c={getURL:a}:"string"===typeof a&&(this.c=new Cesium.DefaultProxy(a));this.l=new Cesium.Event;this.g=document.createElement("canvas");this.g.width=1;this.g.height=1;this.b.H("change",function(){Mi(this)},this);Mi(this)} Object.defineProperties(Li.prototype,{ready:{get:function(){return this.f}},rectangle:{get:function(){return this.s}},tileWidth:{get:function(){var a=this.b.tileGrid;return a?a.gb(0):256}},tileHeight:{get:function(){return this.tileWidth}},maximumLevel:{get:function(){var a=this.b.tileGrid;return a?a.maxZoom:18}},minimumLevel:{get:function(){return 0}},tilingScheme:{get:function(){return this.i}},tileDiscardPolicy:{get:function(){}},errorEvent:{get:function(){return this.l}},credit:{get:function(){return this.j}}, proxy:{get:function(){return this.c}},hasAlphaChannel:{get:function(){return!0}},pickFeatures:{get:function(){}}});function Mi(a){if(!a.f&&"ready"==a.b.getState()){var b=a.b.c;a.a=b?b:a.o;if(a.a==Lc("EPSG:4326"))a.i=new Cesium.GeographicTilingScheme;else if(a.a==Lc("EPSG:3857"))a.i=new Cesium.WebMercatorTilingScheme;else return;a.s=a.i.rectangle;a.j=Ni(a.b)||void 0;a.f=!0}} function Ni(a){var b="",c=a.j;c&&c.forEach(function(a){b+=a.b.replace(/<\/?[^>]+(>|$)/g,"")+" "});if(0==b.length&&(a=a.C))if("string"==typeof a)var d=a;else{d=a.src;var e=a.href}return d||0e?window.requestAnimationFrame(f):n&&n()}var g=Cesium.Math.clamp,h=Cesium.defaultValue;e=e||{};var l=h(e.duration,500),m=h(e.easing,Pi),n=e.callback,p=0,q=new Cesium.Matrix4,t=Date.now();window.requestAnimationFrame(f)}function Qi(a,b){var c=a.camera.getPickRay(b);return a.globe.pick(c,a)||a.camera.pickEllipsoid(b)} function Ri(a){var b=a.canvas;b=new Cesium.Cartesian2(b.clientWidth/2,b.clientHeight/2);return Qi(a,b)}function Si(a,b,c){var d=new Cesium.Cartesian3,e=new Cesium.Cartesian3,f=new Cesium.Cartesian3;Cesium.Cartesian3.normalize(a,d);Cesium.Cartesian3.normalize(b,e);Cesium.Cartesian3.cross(d,e,f);a=Cesium.Cartesian3.dot(d,e);b=Cesium.Cartesian3.magnitude(f);c=Cesium.Cartesian3.dot(c,f);f=Math.atan2(b,a);return 0<=c?f:-f} function Ti(a,b){var c=a.camera,d=c.frustum.fovy/2;a=a.camera;var e=a.direction,f=Cesium.Quaternion.fromAxisAngle(a.right,a.frustum.fovy/2);f=Cesium.Matrix3.fromQuaternion(f);var g=new Cesium.Cartesian3;Cesium.Matrix3.multiplyByVector(f,e,g);a=new Cesium.Ray(a.position,g);a=Cesium.Cartesian3.clone(a.direction);Cesium.Cartesian3.negate(a,a);e=new Cesium.Cartesian3;Cesium.Ellipsoid.WGS84.geocentricSurfaceNormal(b,e);b=new Cesium.Cartesian3;Cesium.Cartesian3.negate(c.right,b);return Si(e,a,b)+d} function Ui(a,b,c){c&&(c=c.getHeight(b),b.height=c||0);c=Cesium.Ellipsoid.WGS84;b=c.cartographicToCartesian(b);var d=a.position,e=new Cesium.Cartesian3;c.geocentricSurfaceNormal(d,e);a.lookAt(d,b,e)}function Vi(a,b){return a&&b?(a=Yc(a,b,"EPSG:4326"),Cesium.Rectangle.fromDegrees(a[0],a[1],a[2],a[3])):null} function Wi(a,b){if(!(a instanceof Xh))return null;var c=a.ba();if(c instanceof A){var d=c.c;if(!d)d=b;else if(d!==b)return null;var e=d===Lc("EPSG:3857");d=d===Lc("EPSG:4326");if(e||d)c=new Li(c,b);else return null}else return null;e={};(a=a.D())&&b&&(e.rectangle=Vi(a,b));return new Cesium.ImageryLayer(c,e)}function Xi(a,b){var c=a.La();void 0!==c&&(b.alpha=c);a=a.lb();void 0!==a&&(b.show=a)} function Yi(a){return 2c?e:-e);c=Math.acos(Cesium.Cartesian3.dot(b,a));this.j=isNaN(c)?0:c}else this.b.gd(this.a.heading),this.j=-this.a.pitch+Math.PI/2;this.o=!1}}; function fj(a,b){var c=a.s,d=a.a.viewMatrix;c&&Cesium.Matrix4.equalsEpsilon(c,d,1E-5)||(a.s=d.clone(),!0!==b&&a.td())};function gj(a){this.ta=a.opacity;this.j=a.rotateWithView;this.i=a.rotation;this.G=a.scale;this.l=a.snapToPixel}k=gj.prototype;k.La=function(){return this.ta};k.zf=function(){return this.j};k.Af=function(){return this.i};k.Ma=function(){return this.G};k.Ze=function(){return this.l};k.Ld=function(a){this.ta=a};k.Bf=function(a){this.i=a};k.Md=function(a){this.G=a};function hj(a){this.I=this.o=this.c=null;this.$a=void 0!==a.fill?a.fill:null;this.B=[0,0];this.b=a.points;this.a=void 0!==a.radius?a.radius:a.radius1;this.g=void 0!==a.radius2?a.radius2:this.a;this.f=void 0!==a.angle?a.angle:0;this.eb=void 0!==a.stroke?a.stroke:null;this.C=this.ea=this.v=null;this.s=a.atlasManager;ij(this,this.s);gj.call(this,{opacity:1,rotateWithView:void 0!==a.rotateWithView?a.rotateWithView:!1,rotation:void 0!==a.rotation?a.rotation:0,scale:1,snapToPixel:void 0!==a.snapToPixel? a.snapToPixel:!0})}v(hj,gj);k=hj.prototype;k.clone=function(){var a=new hj({fill:this.qa()?this.qa().clone():void 0,points:this.g!==this.a?this.b/2:this.b,radius:this.a,radius2:this.g,angle:this.f,snapToPixel:this.l,stroke:this.pa()?this.pa().clone():void 0,rotation:this.i,rotateWithView:this.j,atlasManager:this.s});a.Ld(this.La());a.Md(this.Ma());return a};k.Gc=function(){return this.v};k.sj=function(){return this.f};k.qa=function(){return this.$a};k.Rg=function(){return this.I};k.W=function(){return this.o}; k.Ye=function(){return this.C};k.yf=function(){return 2};k.jd=function(){return this.B};k.tj=function(){return this.b};k.uj=function(){return this.a};k.ii=function(){return this.g};k.gc=function(){return this.ea};k.pa=function(){return this.eb};k.ri=function(){};k.load=function(){};k.hk=function(){}; function ij(a,b){var c="",d="",e=0,f=null,g=0;if(a.eb){var h=a.eb.b;null===h&&(h=Kd);h=Sd(h);g=a.eb.c;void 0===g&&(g=1);f=a.eb.g;ie||(f=null);d=a.eb.j;void 0===d&&(d="round");c=a.eb.i;void 0===c&&(c="round");e=a.eb.l;void 0===e&&(e=10)}var l=2*(a.a+g)+1;c={strokeStyle:h,strokeWidth:g,size:l,lineCap:c,lineDash:f,lineJoin:d,miterLimit:e};if(void 0===b){var m=pd(l,l);a.o=m.canvas;b=l=a.o.width;a.Wh(c,m,0,0);a.$a?a.I=a.o:(m=pd(c.size,c.size),a.I=m.canvas,a.Vh(c,m,0,0))}else l=Math.round(l),(d=!a.$a)&& (m=a.Vh.bind(a,c)),a.eb?(e=a.eb,void 0===e.a&&(e.a="s",e.a=e.b?"string"===typeof e.b?e.a+e.b:e.a+x(e.b).toString():e.a+"-",e.a+=","+(void 0!==e.i?e.i.toString():"-")+","+(e.g?e.g.toString():"-")+","+(void 0!==e.f?e.f:"-")+","+(void 0!==e.j?e.j:"-")+","+(void 0!==e.l?e.l.toString():"-")+","+(void 0!==e.c?e.c.toString():"-")),e=e.a):e="-",a.$a?(f=a.$a,void 0===f.a&&(f.a=f.b instanceof CanvasPattern||f.b instanceof CanvasGradient?x(f.b).toString():"f"+(f.b?Qd(f.b):"-")),f=f.a):f="-",a.c&&e==a.c[1]&& f==a.c[2]&&a.a==a.c[3]&&a.g==a.c[4]&&a.f==a.c[5]&&a.b==a.c[6]||(a.c=["r"+e+f+(void 0!==a.a?a.a.toString():"-")+(void 0!==a.g?a.g.toString():"-")+(void 0!==a.f?a.f.toString():"-")+(void 0!==a.b?a.b.toString():"-"),e,f,a.a,a.g,a.f,a.b]),m=b.add(a.c[0],l,l,a.Wh.bind(a,c),m),a.o=m.image,a.B=[m.offsetX,m.offsetY],b=m.image.width,a.I=d?m.Pm:a.o;a.v=[l/2,l/2];a.ea=[l,l];a.C=[b,b]} k.Wh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();if(Infinity===this.b)b.arc(a.size/2,a.size/2,this.a,0,2*Math.PI,!0);else for(this.g!==this.a&&(this.b*=2),c=0;c<=this.b;c++){d=2*c*Math.PI/this.b-Math.PI/2+this.f;var e=0===c%2?this.a:this.g;b.lineTo(a.size/2+e*Math.cos(d),a.size/2+e*Math.sin(d))}this.$a&&(c=this.$a.b,null===c&&(c=Id),b.fillStyle=Sd(c),b.fill());this.eb&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.strokeWidth,a.lineDash&&b.setLineDash(a.lineDash),b.lineCap= a.lineCap,b.lineJoin=a.lineJoin,b.miterLimit=a.miterLimit,b.stroke());b.closePath()}; k.Vh=function(a,b,c,d){b.setTransform(1,0,0,1,0,0);b.translate(c,d);b.beginPath();if(Infinity===this.b)b.arc(a.size/2,a.size/2,this.a,0,2*Math.PI,!0);else for(this.g!==this.a&&(this.b*=2),c=0;c<=this.b;c++){var e=2*c*Math.PI/this.b-Math.PI/2+this.f;d=0===c%2?this.a:this.g;b.lineTo(a.size/2+d*Math.cos(e),a.size/2+d*Math.sin(e))}b.fillStyle=Id;b.fill();this.eb&&(b.strokeStyle=a.strokeStyle,b.lineWidth=a.strokeWidth,a.lineDash&&b.setLineDash(a.lineDash),b.stroke());b.closePath()};function jj(a){a=a||{};hj.call(this,{points:Infinity,fill:a.fill,radius:a.radius,snapToPixel:a.snapToPixel,stroke:a.stroke,atlasManager:a.atlasManager})}v(jj,hj);jj.prototype.clone=function(){var a=new jj({fill:this.qa()?this.qa().clone():void 0,stroke:this.pa()?this.pa().clone():void 0,radius:this.a,snapToPixel:this.l,atlasManager:this.s});a.Ld(this.La());a.Md(this.Ma());return a};jj.prototype.qd=function(a){this.a=a;ij(this,this.s)};function kj(a){a=a||{};this.b=void 0!==a.color?a.color:null;this.a=void 0}kj.prototype.clone=function(){var a=this.b;return new kj({color:a&&a.slice?a.slice():a||void 0})};kj.prototype.g=function(){return this.b};kj.prototype.c=function(a){this.b=a;this.a=void 0};function lj(a){a=a||{};this.Zc=null;this.Va=mj;void 0!==a.geometry&&this.Wa(a.geometry);this.$a=void 0!==a.fill?a.fill:null;this.O=void 0!==a.image?a.image:null;this.eb=void 0!==a.stroke?a.stroke:null;this.Ja=void 0!==a.text?a.text:null;this.lk=a.zIndex}k=lj.prototype; k.clone=function(){var a=this.V();a&&a.clone&&(a=a.clone());return new lj({geometry:a,fill:this.qa()?this.qa().clone():void 0,image:this.W()?this.W().clone():void 0,stroke:this.pa()?this.pa().clone():void 0,text:this.ra()?this.ra().clone():void 0,zIndex:this.Da()})};k.V=function(){return this.Zc};k.El=function(){return this.Va};k.qa=function(){return this.$a};k.Kf=function(a){this.$a=a};k.W=function(){return this.O};k.sh=function(a){this.O=a};k.pa=function(){return this.eb}; k.Lf=function(a){this.eb=a};k.ra=function(){return this.Ja};k.Mf=function(a){this.Ja=a};k.Da=function(){return this.lk};k.Wa=function(a){"function"===typeof a?this.Va=a:"string"===typeof a?this.Va=function(b){return b.get(a)}:a?void 0!==a&&(this.Va=function(){return a}):this.Va=mj;this.Zc=a};k.jc=function(a){this.lk=a};function nj(a){if("function"!==typeof a){if(Array.isArray(a))var b=a;else gb(a instanceof lj,41),b=[a];a=function(){return b}}return a}var oj=null; function pj(){if(!oj){var a=new kj({color:"rgba(255,255,255,0.4)"}),b=new Og({color:"#3399CC",width:1.25});oj=[new lj({image:new jj({fill:a,stroke:b,radius:5}),fill:a,stroke:b})]}return oj} function qj(){var a={},b=[255,255,255,1],c=[0,153,255,1];a.Polygon=[new lj({fill:new kj({color:[255,255,255,.5]})})];a.MultiPolygon=a.Polygon;a.LineString=[new lj({stroke:new Og({color:b,width:5})}),new lj({stroke:new Og({color:c,width:3})})];a.MultiLineString=a.LineString;a.Circle=a.Polygon.concat(a.LineString);a.Point=[new lj({image:new jj({radius:6,fill:new kj({color:c}),stroke:new Og({color:b,width:1.5})}),zIndex:Infinity})];a.MultiPoint=a.Point;a.GeometryCollection=a.Polygon.concat(a.LineString, a.Point);return a}function mj(a){return a.V()};function E(a){Wa.call(this);this.a=void 0;this.c="geometry";this.f=null;this.j=void 0;this.i=null;y(this,Ya(this.c),this.cf,this);void 0!==a&&(a instanceof Td||!a?this.Wa(a):this.J(a))}v(E,Wa);k=E.prototype;k.clone=function(){var a=new E(this.L());a.pd(this.c);var b=this.V();b&&a.Wa(b.clone());(b=this.f)&&a.Ig(b);return a};k.V=function(){return this.get(this.c)};k.pn=function(){return this.a};k.Fl=function(){return this.c};k.qn=function(){return this.f};k.Nc=function(){return this.j};k.pm=function(){this.u()}; k.cf=function(){this.i&&(Ca(this.i),this.i=null);var a=this.V();a&&(this.i=y(a,"change",this.pm,this));this.u()};k.Wa=function(a){this.set(this.c,a)};k.Ig=function(a){this.j=(this.f=a)?rj(a):void 0;this.u()};k.xc=function(a){this.a=a;this.u()};k.pd=function(a){Ja(this,Ya(this.c),this.cf,this);this.c=a;y(this,Ya(this.c),this.cf,this);this.cf()}; function rj(a){var b;if("function"===typeof a)2==a.length?b=function(b){return a(this,b)}:b=a;else{if(Array.isArray(a))var c=a;else gb(a instanceof lj,41),c=[a];b=function(){return c}}return b};var sj=void 0,tj=void 0;function uj(){if(void 0===sj){var a=document.createElement("canvas");a.setAttribute("style","image-rendering: -moz-crisp-edges;image-rendering: pixelated;");a=a.style.imageRendering;(sj=!!a)&&(tj=a)}return sj};var vj=document.implementation.createDocument("","",null);function wj(a,b){return vj.createElementNS(a,b)}function xj(a,b){return yj(a,b,[]).join("")}function yj(a,b,c){if(a.nodeType==Node.CDATA_SECTION_NODE||a.nodeType==Node.TEXT_NODE)b?c.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):c.push(a.nodeValue);else for(a=a.firstChild;a;a=a.nextSibling)yj(a,b,c);return c}function zj(a){return a instanceof Document}function Aj(a){return a instanceof Node} function Bj(a){return(new DOMParser).parseFromString(a,"application/xml")}function Cj(a,b){return function(c,d){c=a.call(b,c,d);void 0!==c&&id(d[d.length-1],c)}}function Dj(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&d[d.length-1].push(c)}}function Ej(a,b){return function(c,d){c=a.call(void 0!==b?b:this,c,d);void 0!==c&&(d[d.length-1]=c)}} function Fj(a,b){return function(c,d){var e=a.call(this,c,d);if(void 0!==e){d=d[d.length-1];c=void 0!==b?b:c.localName;var f;c in d?f=d[c]:f=d[c]=[];f.push(e)}}}function F(a,b){return function(c,d){var e=a.call(this,c,d);void 0!==e&&(d[d.length-1][void 0!==b?b:c.localName]=e)}}function G(a,b){return function(c,d,e){a.call(void 0!==b?b:this,c,d,e);e[e.length-1].node.appendChild(c)}} function Gj(a){var b,c;return function(d,e,f){if(void 0===b){b={};var g={};g[d.localName]=a;b[d.namespaceURI]=g;c=Hj(d.localName)}Ij(b,c,e,f)}}function Hj(a,b){return function(c,d,e){c=d[d.length-1].node;d=a;void 0===d&&(d=e);e=b;void 0===b&&(e=c.namespaceURI);return wj(e,d)}}var Jj=Hj();function Kj(a,b){for(var c=b.length,d=Array(c),e=0;eh.status){var a=b.U();if("json"==a||"text"==a)var e=h.responseText;else"xml"==a?(e=h.responseXML)||(e=Bj(h.responseText)):"arraybuffer"==a&&(e=h.response);e?c.call(this,b.Oa(e,{featureProjection:g}),b.hb(e)):d.call(this)}else d.call(this)}.bind(this);h.onerror=function(){d.call(this)}.bind(this); h.send()}}function Oj(a,b){return Nj(a,b,function(a){this.yd(a)},ua)};function Pj(){return[[-Infinity,-Infinity,Infinity,Infinity]]};function J(a){a=a||{};Ai.call(this,{attributions:a.attributions,logo:a.logo,projection:void 0,state:"ready",wrapX:void 0!==a.wrapX?a.wrapX:!0});this.$=ua;this.X=a.format;this.Ua=void 0==a.overlaps?!0:a.overlaps;this.la=a.url;void 0!==a.loader?this.$=a.loader:void 0!==this.la&&(gb(this.X,7),this.$=Oj(this.la,this.X));this.rb=void 0!==a.strategy?a.strategy:Pj;var b=void 0!==a.useSpatialIndex?a.useSpatialIndex:!0;this.a=b?new ah:null;this.wa=new ah;this.f={};this.l={};this.o={};this.s={};this.i=null; if(a.features instanceof bb){var c=a.features;var d=c.a}else Array.isArray(a.features)&&(d=a.features);b||void 0!==c||(c=new bb(d));void 0!==d&&Qj(this,d);void 0!==c&&Rj(this,c)}v(J,Ai);k=J.prototype;k.Eb=function(a,b){var c=x(a).toString();if(Sj(this,c,a)){Tj(this,c,a);var d=a.V();d?(c=d.D(),this.a&&this.a.Ha(c,a)):this.f[c]=a;this.b(new Uj("addfeature",a))}b||this.u()};function Tj(a,b,c){a.s[b]=[y(c,"change",a.rj,a),y(c,"propertychange",a.rj,a)]} function Sj(a,b,c){var d=!0,e=c.a;void 0!==e?e.toString()in a.l?d=!1:a.l[e.toString()]=c:(gb(!(b in a.o),30),a.o[b]=c);return d}k.yd=function(a){Qj(this,a);this.u()};function Qj(a,b){var c,d=[],e=[],f=[];var g=0;for(c=b.length;gDa&&(a.$a(b,e),Ua=0);ya>Da&&(b.stroke(),ya=0);Ua||ya||(b.beginPath(),z=D=NaN);++n;break;case 2:q=C[1];t=m[q];C=m[q+1];B=m[q+ 2]-t;q=m[q+3]-C;q=Math.sqrt(B*B+q*q);b.moveTo(t+q,C);b.arc(t,C,q,0,2*Math.PI,!0);++n;break;case 3:b.closePath();++n;break;case 4:q=C[1];t=C[2];var pa=C[3];var $a=C[4]*c;var ra=C[5]*c;var dc=C[6],Pa=C[7],ic=C[8],jd=C[9];var qc=C[10];B=C[11];S=C[12];var Lf=C[13],Cg=C[14];for(qc&&(B+=e);q pa.width?pa.width-ic:Cg;var Ep=dc+jd>pa.height?pa.height-jd:dc;b.drawImage(pa,ic,jd,wh,Ep,C,qc,wh*c,Ep*c);1!=Pa&&(b.globalAlpha=kf);1==S&&0===B||b.setTransform.apply(b,w)}++n;break;case 5:q=C[1];t=C[2];ra=C[3];dc=C[4]*c;Pa=C[5]*c;B=C[6];S=C[7]*c;pa=C[8];$a=C[9];for((qc=C[10])&&(B+=e);qthis.c&&(this.c=this.g.lineWidth,this.f=null)};function hk(a,b,c,d,e,f,g){var h=(c-b)/d;if(3>h){for(;bt&&(m=n,t=B)}t>e&&(l[(m-b)/d]=1,q+dDa&&paDa)&&(0>C&&$aC)||(w[z++]=S,w[z++]=g,D=S,B=g);S=Ua;g=ya}}w[z++]=S;w[z++]=g}g=z}h.push(g);b=n}return g};function jk(a,b,c,d){Xj.call(this,a,b,c,d);this.f=null;this.g={Th:void 0,ge:void 0,ae:void 0,be:null,ce:void 0,de:void 0,ee:void 0,fe:void 0,fillStyle:void 0,strokeStyle:void 0,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0}}v(jk,Xj); function kk(a,b,c,d,e){var f=a.g,g=void 0!==f.fillStyle;f=void 0!=f.strokeStyle;var h=d.length,l=[1];a.a.push(l);a.b.push(l);for(l=0;lthis.c&&(this.c=c.lineWidth,this.f=null)):(c.strokeStyle=void 0,c.lineCap=void 0,c.lineDash=null,c.lineDashOffset=void 0,c.lineJoin=void 0,c.lineWidth=void 0,c.miterLimit= void 0)};function lk(a,b){var c=a.g,d=c.fillStyle,e=c.strokeStyle,f=c.lineCap,g=c.lineDash,h=c.lineDashOffset,l=c.lineJoin,m=c.lineWidth,n=c.miterLimit;if(void 0!==d&&("string"!==typeof d||c.Th!=d)){var p=[9,d];"string"!==typeof d&&(b=b.D(),p.push([b[0],b[3]]));a.a.push(p);c.Th=c.fillStyle}void 0===e||c.ge==e&&c.ae==f&&ld(c.be,g)&&c.ce==h&&c.de==l&&c.ee==m&&c.fe==n||(a.a.push([10,e,m,f,l,n,g,h,!0,1]),c.ge=e,c.ae=f,c.be=g,c.ce=h,c.de=l,c.ee=m,c.fe=n)};function mk(a,b,c,d){Xj.call(this,a,b,c,d);this.ea=this.B=this.C=null;this.Ja="";this.o=this.l=0;this.s=void 0;this.v=this.I=0;this.j=this.f=this.g=null}v(mk,Xj); mk.prototype.Qc=function(a,b,c,d,e){if(""!==this.Ja&&this.j&&(this.g||this.f)){if(this.g){var f=this.g,g=this.C;if(!g||g.fillStyle!=f.fillStyle){var h=[9,f.fillStyle];this.a.push(h);this.b.push(h);g?g.fillStyle=f.fillStyle:this.C={fillStyle:f.fillStyle}}}this.f&&(f=this.f,g=this.B,g&&g.lineCap==f.lineCap&&g.lineDash==f.lineDash&&g.lineDashOffset==f.lineDashOffset&&g.lineJoin==f.lineJoin&&g.lineWidth==f.lineWidth&&g.miterLimit==f.miterLimit&&g.strokeStyle==f.strokeStyle||(h=[10,f.strokeStyle,f.lineWidth, f.lineCap,f.lineJoin,f.miterLimit,f.lineDash,f.lineDashOffset,!1,1],this.a.push(h),this.b.push(h),g?(g.lineCap=f.lineCap,g.lineDash=f.lineDash,g.lineDashOffset=f.lineDashOffset,g.lineJoin=f.lineJoin,g.lineWidth=f.lineWidth,g.miterLimit=f.miterLimit,g.strokeStyle=f.strokeStyle):this.B={lineCap:f.lineCap,lineDash:f.lineDash,lineDashOffset:f.lineDashOffset,lineJoin:f.lineJoin,lineWidth:f.lineWidth,miterLimit:f.miterLimit,strokeStyle:f.strokeStyle}));f=this.j;g=this.ea;g&&g.font==f.font&&g.textAlign== f.textAlign&&g.textBaseline==f.textBaseline||(h=[11,f.font,f.textAlign,f.textBaseline],this.a.push(h),this.b.push(h),g?(g.font=f.font,g.textAlign=f.textAlign,g.textBaseline=f.textBaseline):this.ea={font:f.font,textAlign:f.textAlign,textBaseline:f.textBaseline});Zj(this,e);f=this.coordinates.length;a=Yj(this,a,b,c,d,!1,!1);a=[5,f,a,this.Ja,this.l,this.o,this.I,this.v,!!this.g,!!this.f,this.s];this.a.push(a);this.b.push(a);ck(this,e)}}; mk.prototype.fc=function(a){if(a){var b=a.qa();b?(b=b.b,b=Sd(b?b:Id),this.g?this.g.fillStyle=b:this.g={fillStyle:b}):this.g=null;var c=a.pa();if(c){b=c.b;var d=c.i,e=c.g,f=c.f,g=c.j,h=c.c;c=c.l;d=void 0!==d?d:"round";e=e?e.slice():Jd;f=void 0!==f?f:0;g=void 0!==g?g:"round";h=void 0!==h?h:1;c=void 0!==c?c:10;b=Sd(b?b:Kd);if(this.f){var l=this.f;l.lineCap=d;l.lineDash=e;l.lineDashOffset=f;l.lineJoin=g;l.lineWidth=h;l.miterLimit=c;l.strokeStyle=b}else this.f={lineCap:d,lineDash:e,lineDashOffset:f,lineJoin:g, lineWidth:h,miterLimit:c,strokeStyle:b}}else this.f=null;var m=a.Zb;b=a.Lc;d=a.Mc;e=a.a;h=a.b;c=a.Ma();f=a.ra();g=a.Vc;l=a.sb;a=void 0!==m?m:"10px sans-serif";g=void 0!==g?g:"center";l=void 0!==l?l:"middle";this.j?(m=this.j,m.font=a,m.textAlign=g,m.textBaseline=l):this.j={font:a,textAlign:g,textBaseline:l};this.Ja=void 0!==f?f:"";this.l=void 0!==b?b:0;this.o=void 0!==d?d:0;this.s=void 0!==e?e:!1;this.I=void 0!==h?h:0;this.v=void 0!==c?c:1}else this.Ja=""};function nk(a,b,c,d,e){this.I=a;this.c=b;this.o=d;this.s=c;this.f=e;this.a={};this.j=pd(1,1);this.l=ve()}v(nk,rf);var ok={0:[[!0]]};function pk(a,b,c){var d,e=Math.floor(a.length/2);if(b>=e)for(d=e;d=d;)pk(c,a+b,a+d),pk(c,a+d,a+b),pk(c,a-d,a+b),pk(c,a-b,a+d),pk(c,a-b,a-d),pk(c,a-d,a-b),pk(c,a+d,a-b),pk(c,a+b,a-d),d++,e+=1+2*d,0<2*(e-b)+1&&(--b,e+=1-2*b);return ok[a]=c}function sk(a){for(var b in a.a){var c=a.a[b],d;for(d in c)c[d].uf()}} nk.prototype.Ga=function(a,b,c,d,e,f){d=Math.round(d);var g=2*d+1,h=Ee(this.l,d+.5,d+.5,1/b,-1/b,-c,-a[0],-a[1]),l=this.j;l.canvas.width!==g||l.canvas.height!==g?(l.canvas.width=g,l.canvas.height=g):l.clearRect(0,0,g,g);if(void 0!==this.f){var m=ib();jb(m,a);kb(m,b*(this.f+d),m)}var n=rk(d);return tk(this,l,h,c,e,function(a){for(var b=l.getImageData(0,0,g,g).data,c=0;ce&&(e=f);f=h;g=l}return e}function Pk(a,b,c,d,e){var f;var g=0;for(f=c.length;g>1),h=+fd(g[e],c),0>h?l=e+1:(m=e,n=!h);e=n?l:~l;0>e?(c=(c-g[-e-2])/(g[-e-1]-g[-e-2]),b+=(-e-2)*d,g=Tb(a[b],a[b+d],c),h=Tb(a[b+1],a[b+d+1],c)):(g=a[b+e*d],h=a[b+e*d+1])}return f? (f[0]=g,f[1]=h,f):[g,h]}function Yk(a,b,c,d,e,f){if(c==b)return null;if(e>1,e=e[0]&&f[2]<=e[2]||f[1]>=e[1]&&f[3]<=e[3]?!0:$k(a,b,c,d,function(a,b){var c=!1,d=qb(e,a),f=qb(e,b);if(1===d||1===f)c=!0;else{var g=e[0],h=e[1],t=e[2],u=e[3],w=b[0];b=b[1];a=(b-a[1])/(w-a[0]);f&2&&!(d&2)&&(c=w-(b-u)/a,c=c>=g&&c<=t);c||!(f&4)||d&4||(c=b-(w-t)*a,c=c>=h&&c<=u);c||!(f&8)||d&8||(c=w-(b-h)/a,c=c>=g&&c<=t);c||!(f&16)||d&16||(c=b-(w-g)*a,c=c>=h&&c<=u)}return c}):!1} function bl(a,b,c,d,e){var f=c[0];if(!(al(a,b,f,d,e)||Hg(a,b,f,d,e[0],e[1])||Hg(a,b,f,d,e[0],e[3])||Hg(a,b,f,d,e[2],e[1])||Hg(a,b,f,d,e[2],e[3])))return!1;if(1===c.length)return!0;b=1;for(f=c.length;bq&&(p=(p+t)/2,Ig(a,b,c,d,p,l)&&(n=p,q=w));p=t}isNaN(n)&&(n=e[f]);return g?(g.push(n,l),g):[n,l]};function M(a,b){Wd.call(this);this.c=[];this.v=-1;this.C=null;this.N=this.B=this.G=-1;this.j=null;this.ua(a,b)}v(M,Wd);k=M.prototype;k.Yk=function(a){this.A?id(this.A,a.ja()):this.A=a.ja().slice();this.c.push(this.A.length);this.u()};k.clone=function(){var a=new M(null);a.fa(this.ma,this.A.slice(),this.c.slice());return a}; k.Lb=function(a,b,c,d){if(da||this.c.length<=a)return null;var b=new cl(null);dl(b,this.ma,this.A.slice(0===a?0:this.c[a-1],this.c[a]));return b};k.Ic=function(){var a=this.ma,b=this.A,c=this.c,d=[],e=0,f;var g=0;for(f=c.length;gm?m:n}else f=new Cesium.PolygonGeometry({polygonHierarchy:d,perPositionHeight:l,height:p,vertexFormat:Cesium.PerInstanceColorAppearance.VERTEX_FORMAT,extrudedHeight:g?h+g.extrudedHeight:void 0});if(!g&&this.bc(a,b,c)===Cesium.HeightReference.CLAMP_TO_GROUND&& Cesium.GroundPolylinePrimitive.isSupported(this.scene)){if(p=pl(e),0c?e=d=void 0:c&&e&&c>e?d=Math.ceil(c/e):c&&d?e=c/d:e&&d&&(c=d*e);200e.T().length?null:this.se(a,b,e,h,c);case "Polygon":return e.T().some(function(a){return 2> a.length})?null:this.jf(a,b,e,h,c);case "MultiPoint":case "MultiLineString":case "MultiPolygon":return(e=this.Fg(a,b,e,h,c,d.billboards,f))?e:null;case "LinearRing":throw Error("LinearRing should only be part of polygon.");default:throw Error("Ol geom type not handled : "+e.U());}}; k.kf=function(a,b,c){var d=b.c;b=b.Ia();if(void 0===b||!d)throw qa("View not ready"),Error("View not ready");var e=a.ba();if(a instanceof wl)if(e instanceof Lk)e=e.vc();else return new jl(d,this.scene);e=e.Rc();d=new jl(d,this.scene);for(var f=d.g,g=0;gl[2];)++S,n=m*S,n=ff(this,a,n),p.i(w,e,n,g,f),h-=m;n=ff(this,a,0)}Ld(w,g,D/2,B/2);w!=c&&(ef(this,"render",w,a,n),c.drawImage(w.canvas,-t,-u),w.translate(-t,-u));w.globalAlpha=z}q&&c.restore();this.Cf(c,a,b,n)}; Fl.prototype.Ga=function(a,b,c,d,e){if(this.i){var f=this.a,g={};return this.i.Ga(a,b.viewState.resolution,b.viewState.rotation,c,{},function(a){var b=x(a).toString();if(!(b in g))return g[b]=!0,d.call(e,a,f)})}};Fl.prototype.C=function(){Ue(this)}; Fl.prototype.Kd=function(a){function b(a){var b=a.Nc();if(b)var d=b.call(a,m);else(b=c.a)&&(d=b(a,m));if(d){if(d){b=!1;if(Array.isArray(d))for(var e=0,f=d.length;ea[0]||a[0]>e[0]||0>a[1]||a[1]>e[1])&&(this.i|| (this.i=pd(1,1)),this.i.clearRect(0,0,1,1),this.i.drawImage(this.O.W(),a[0],a[1],1,1,0,0,1,1),e=this.i.getImageData(0,0,1,1).data,0pa.da)if(ed(C,new bd(Sb(z.ga,$a),Sb(z.da,$a),z.ha,z.ka))||z.da-z.ga+1>$a&&ed(C,pa)){D=!0;break a}}}D=!1}else D=!0}}else D=!1;D?(w in l&&delete l[w],D=u.b,D in m||(m[D]=!0,h[w]=u)):l[w]=u}}}}b=[h,l];p=b[0];b=b[1];for(var ra in this.l)ra in p?(this.f[ra]||(this.l[ra].style.display="",this.f[ra]=!0),delete p[ra]):ra in b?(this.f[ra]&&(this.l[ra].style.display="none",delete this.f[ra]),delete b[ra]):(rd(this.l[ra]),delete this.l[ra],delete this.f[ra]); for(ra in p)t=document.createElement("LI"),t.innerHTML=p[ra].b,this.G.appendChild(t),this.l[ra]=t,this.f[ra]=!0;for(ra in b)t=document.createElement("LI"),t.innerHTML=b[ra].b,t.style.display="none",this.G.appendChild(t),this.l[ra]=t;ra=!Aa(this.f)||!Aa(a.logos);this.B!=ra&&(this.element.style.display=ra?"":"none",this.B=ra);ra&&Aa(this.f)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only");a=a.logos;ra=this.aa;for(Pa in ra)Pa in a||(rd(ra[Pa]),delete ra[Pa]);for(var dc in a)if(b= a[dc],b instanceof HTMLElement&&(this.s.appendChild(b),ra[dc]=b),!(dc in ra)){var Pa=new Image;Pa.src=dc;""===b?p=Pa:(p=document.createElement("a"),p.href=b,p.appendChild(Pa));this.s.appendChild(p);ra[dc]=p}this.s.style.display=Aa(a)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}k=Wl.prototype;k.Pn=function(a){a.preventDefault();Yl(this)};function Yl(a){a.element.classList.toggle("ol-collapsed");a.a?qd(a.v,a.C):qd(a.C,a.v);a.a=!a.a}k.On=function(){return this.j}; k.Rn=function(a){this.j!==a&&(this.j=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.a&&Yl(this))};k.Qn=function(a){this.j&&this.a!==a&&Yl(this)};k.Nn=function(){return this.a};function Zl(a){return Math.pow(a,3)}function $l(a){return 1-Zl(1-a)}function am(a){return 3*a*a-2*a*a*a}function Pi(a){return a};function bm(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-rotate",c=void 0!==a.label?a.label:"\u21e7";this.a=null;"string"===typeof c?(this.a=document.createElement("span"),this.a.className="ol-compass",this.a.textContent=c):(this.a=c,this.a.classList.add("ol-compass"));var d=a.tipLabel?a.tipLabel:"Reset rotation";c=document.createElement("button");c.className=b+"-reset";c.setAttribute("type","button");c.title=d;c.appendChild(this.a);y(c,"click",bm.prototype.v,this);d=document.createElement("div"); d.className=b+" ol-unselectable ol-control";d.appendChild(c);b=a.render?a.render:cm;this.j=a.resetNorth?a.resetNorth:void 0;Vl.call(this,{element:d,render:b,target:a.target});this.l=void 0!==a.duration?a.duration:250;this.f=void 0!==a.autoHide?a.autoHide:!0;this.s=void 0;this.f&&this.element.classList.add("ol-hidden")}v(bm,Vl);bm.prototype.v=function(a){a.preventDefault();void 0!==this.j?this.j():(a=this.R.Z())&&void 0!==a.Qa()&&(0=Math.abs(c-f[0])&&25>=g)return!0}return!1}function wm(a){var b=xm(a,a),c=b.preventDefault;b.preventDefault=function(){a.preventDefault();c()};b.pointerId=1;b.isPrimary=!0;b.pointerType="mouse";return b}k=um.prototype; k.Wm=function(a){if(!vm(this,a)){(1).toString()in this.a&&this.cancel(a);var b=wm(a);this.a[(1).toString()]=a;ym(this.b,"pointerdown",b,a)}};k.Xm=function(a){if(!vm(this,a)){var b=wm(a);ym(this.b,"pointermove",b,a)}};k.$m=function(a){if(!vm(this,a)){var b=this.a[(1).toString()];b&&b.button===a.button&&(b=wm(a),ym(this.b,"pointerup",b,a),delete this.a[(1).toString()])}};k.Zm=function(a){if(!vm(this,a)){var b=wm(a);zm(this.b,b,a)}};k.Ym=function(a){if(!vm(this,a)){var b=wm(a);Am(this.b,b,a)}}; k.cancel=function(a){var b=wm(a);this.b.cancel(b,a);delete this.a[(1).toString()]};function Bm(a){tm.call(this,a,{MSPointerDown:this.en,MSPointerMove:this.fn,MSPointerUp:this.jn,MSPointerOut:this.gn,MSPointerOver:this.hn,MSPointerCancel:this.dn,MSGotPointerCapture:this.bn,MSLostPointerCapture:this.cn});this.a=a.g;this.g=["","unavailable","touch","pen","mouse"]}v(Bm,tm);function Cm(a,b){var c=b;"number"===typeof b.pointerType&&(c=xm(b,b),c.pointerType=a.g[b.pointerType]);return c}k=Bm.prototype; k.en=function(a){this.a[a.pointerId.toString()]=a;var b=Cm(this,a);ym(this.b,"pointerdown",b,a)};k.fn=function(a){var b=Cm(this,a);ym(this.b,"pointermove",b,a)};k.jn=function(a){var b=Cm(this,a);ym(this.b,"pointerup",b,a);delete this.a[a.pointerId.toString()]};k.gn=function(a){var b=Cm(this,a);Am(this.b,b,a)};k.hn=function(a){var b=Cm(this,a);zm(this.b,b,a)};k.dn=function(a){var b=Cm(this,a);this.b.cancel(b,a);delete this.a[a.pointerId.toString()]}; k.cn=function(a){this.b.b(new Dm("lostpointercapture",a,a))};k.bn=function(a){this.b.b(new Dm("gotpointercapture",a,a))};function Em(a){tm.call(this,a,{pointerdown:this.cq,pointermove:this.eq,pointerup:this.hq,pointerout:this.fq,pointerover:this.gq,pointercancel:this.bq,gotpointercapture:this.jm,lostpointercapture:this.Vm})}v(Em,tm);k=Em.prototype;k.cq=function(a){Fm(this.b,a)};k.eq=function(a){Fm(this.b,a)};k.hq=function(a){Fm(this.b,a)};k.fq=function(a){Fm(this.b,a)};k.gq=function(a){Fm(this.b,a)};k.bq=function(a){Fm(this.b,a)};k.Vm=function(a){Fm(this.b,a)};k.jm=function(a){Fm(this.b,a)};function Dm(a,b,c){Na.call(this,a);this.b=b;a=c?c:{};this.buttons=Gm(a);this.pressure=Hm(a,this.buttons);this.bubbles="bubbles"in a?a.bubbles:!1;this.cancelable="cancelable"in a?a.cancelable:!1;this.view="view"in a?a.view:null;this.detail="detail"in a?a.detail:null;this.screenX="screenX"in a?a.screenX:0;this.screenY="screenY"in a?a.screenY:0;this.clientX="clientX"in a?a.clientX:0;this.clientY="clientY"in a?a.clientY:0;this.ctrlKey="ctrlKey"in a?a.ctrlKey:!1;this.altKey="altKey"in a?a.altKey:!1;this.shiftKey= "shiftKey"in a?a.shiftKey:!1;this.metaKey="metaKey"in a?a.metaKey:!1;this.button="button"in a?a.button:0;this.relatedTarget="relatedTarget"in a?a.relatedTarget:null;this.pointerId="pointerId"in a?a.pointerId:0;this.width="width"in a?a.width:0;this.height="height"in a?a.height:0;this.tiltX="tiltX"in a?a.tiltX:0;this.tiltY="tiltY"in a?a.tiltY:0;this.pointerType="pointerType"in a?a.pointerType:"";this.isPrimary="isPrimary"in a?a.isPrimary:!1;b.preventDefault&&(this.preventDefault=function(){b.preventDefault()})} v(Dm,Na);function Gm(a){if(a.buttons||Im)a=a.buttons;else switch(a.which){case 1:a=1;break;case 2:a=4;break;case 3:a=2;break;default:a=0}return a}function Hm(a,b){var c=0;a.pressure?c=a.pressure:c=b?.5:0;return c}var Im=!1;try{Im=1===(new MouseEvent("click",{buttons:1})).buttons}catch(a){};function Jm(a,b){tm.call(this,a,{touchstart:this.Fr,touchmove:this.Er,touchend:this.Dr,touchcancel:this.Cr});this.a=a.g;this.j=b;this.g=void 0;this.f=0;this.c=void 0}v(Jm,tm);k=Jm.prototype;k.Pj=function(){this.f=0;this.c=void 0}; function Km(a,b,c){b=xm(b,c);b.pointerId=c.identifier+2;b.bubbles=!0;b.cancelable=!0;b.detail=a.f;b.button=0;b.buttons=1;b.width=c.webkitRadiusX||c.radiusX||0;b.height=c.webkitRadiusY||c.radiusY||0;b.pressure=c.webkitForce||c.force||.5;b.isPrimary=a.g===c.identifier;b.pointerType="touch";b.clientX=c.clientX;b.clientY=c.clientY;b.screenX=c.screenX;b.screenY=c.screenY;return b} function Lm(a,b,c){function d(){b.preventDefault()}var e=Array.prototype.slice.call(b.changedTouches),f=e.length,g;for(g=0;g=b.length){var e=[],f;for(f=0;f>1;){var l=2*b+1,m=2*b+2;l=mb;){var g=c-1>>1;if(a[g]>f)d[c]=d[g],a[c]=a[g],c=g;else break}d[c]=e;a[c]=f} function $m(a){var b=a.o,c=a.b,d=a.g,e=0,f=c.length,g;for(g=0;g>1)-1;0<=b;b--)Ym(a,b)};function an(a,b){Wm.call(this,function(b){return a.apply(null,b)},function(a){return a[0].ob()});this.s=b;this.j=0;this.f={}}v(an,Wm);an.prototype.i=function(a){var b=Wm.prototype.i.call(this,a);b&&y(a[0],"change",this.l,this);return b};an.prototype.l=function(a){a=a.target;var b=a.getState();if(2===b||3===b||4===b||5===b)Ja(a,"change",this.l,this),a=a.ob(),a in this.f&&(delete this.f[a],--this.j),this.s()}; function bn(a,b,c){for(var d=0,e,f;a.j=this.f&&a<=this.a){var b=this.o||0;if(this.j){var c=hd(this.j,a,1);b+=c;if(c==this.j.length-1)return b;var d=this.j[c];c=d/this.j[c+1]}else d=this.a,c=this.B;b+=Math.log(d/a)/Math.log(c)}return b}; k.ng=function(a,b){b=b||{};var c=b.size;c||(c=pn(this));if(a instanceof Wd)if("Circle"===a.U()){a=a.D();var d=gl(a);d.rotate(this.Qa(),Gb(a))}else d=a;else gb(Array.isArray(a),24),gb(!Db(a),25),d=gl(a);var e=void 0!==b.padding?b.padding:[0,0,0,0],f=void 0!==b.constrainResolution?b.constrainResolution:!0,g=void 0!==b.nearest?b.nearest:!1,h;void 0!==b.minResolution?h=b.minResolution:void 0!==b.maxZoom?h=this.constrainResolution(this.a,b.maxZoom-this.o,0):h=0;var l=d.ja(),m=this.Qa();a=Math.cos(-m); m=Math.sin(-m);var n=Infinity,p=Infinity,q=-Infinity,t=-Infinity;d=d.ya();for(var u=0,w=l.length;uc.b.length)c=!1;else{var d=Date.now()-c.f,e=c.b.length-3;if(c.b[e+2]d;)f-=3;d=c.b[e+2]-c.b[f+2];var g=c.b[e]-c.b[f];e=c.b[e+1]-c.b[f+1];c.g=Math.atan2(e,g);c.a=Math.sqrt(g*g+e*e)/d;c=c.a>c.c}}c&&(c=this.a,c=(c.c-c.a)/c.i,e=this.a.g,f=a.va(),f=b.Pa(f),b=b.ab([f[0]-c*Math.cos(e),f[1]-c*Math.sin(e)]),a.animate({center:a.Xc(b),duration:500,easing:$l}));ln(a,1,-1); return!1}this.a&&un(this.a);this.f=null;return!0}function On(a){if(0=this.s}function $n(a){if(In(a)){var b=this.a,c=a.pixel;b.g=this.f;b.a=c;Xn(b);Wn(b);this.b(new co(eo,a.coordinate,a))}}Yn.prototype.V=function(){return this.a.V()}; Yn.prototype.j=ua;function ao(a){if(!In(a))return!0;this.a.setMap(null);this.o(a,this.f,a.pixel)&&(this.j(a),this.b(new co(fo,a.coordinate,a)));return!1}function Zn(a){if(In(a)&&Cn(a)&&this.C(a)){this.f=a.pixel;this.a.setMap(a.map);var b=this.a,c=this.f;b.g=this.f;b.a=c;Xn(b);Wn(b);this.b(new co(go,a.coordinate,a));return!0}return!1}var go="boxstart",eo="boxdrag",fo="boxend";function co(a,b,c){Na.call(this,a);this.coordinate=b;this.mapBrowserEvent=c}v(co,Na);function ho(a){a=a?a:{};var b=a.condition?a.condition:Gn;this.B=void 0!==a.duration?a.duration:200;this.G=void 0!==a.out?a.out:!1;Yn.call(this,{condition:b,className:a.className||"ol-dragzoom"})}v(ho,Yn); ho.prototype.j=function(){var a=this.R,b=a.Z(),c=a.Rb(),d=this.V().D();if(this.G){var e=b.zd(c);d=[a.Pa(yb(d)),a.Pa(Ab(d))];a=rb(Infinity,Infinity,-Infinity,-Infinity,void 0);var f;var g=0;for(f=d.length;gMath.abs(d)?oo:po;if(this.l===oo){b=b.Z();this.o?clearTimeout(this.o): ln(b,1,1);this.o=setTimeout(this.B.bind(this),400);c=b.Ia()*Math.pow(2,d/300);var e=b.f,f=b.a,g=0;cf&&(c=Math.min(c,1.5*f),g=-1);if(this.a){var h=nn(b,c,this.a);b.cb(b.Xc(h))}b.Uc(c);0===g&&this.N&&b.animate({resolution:b.constrainResolution(c,0g&&b.animate({resolution:f,easing:$l,anchor:this.a,duration:500});this.f=a;return!1}this.j+=d;d=Math.max(this.X- (a-this.f),0);clearTimeout(this.s);this.s=setTimeout(this.G.bind(this,b),d);return!1}mo.prototype.B=function(){this.o=void 0;ln(this.R.Z(),1,-1)};mo.prototype.G=function(a){a=a.Z();a.$c()&&a.Ad();xn(a,-Mb(this.j,-1,1),this.a,this.v);this.l=void 0;this.j=0;this.a=null;this.s=this.f=void 0};mo.prototype.aa=function(a){this.C=a;a||(this.a=null)};var oo="trackpad",po="wheel";function qo(a){Kn.call(this,{handleDownEvent:ro,handleDragEvent:so,handleUpEvent:to});a=a||{};this.f=null;this.j=void 0;this.a=!1;this.o=0;this.C=void 0!==a.threshold?a.threshold:.3;this.s=void 0!==a.duration?a.duration:250}v(qo,Kn); function so(a){var b=0,c=this.l[0],d=this.l[1];c=Math.atan2(d.clientY-c.clientY,d.clientX-c.clientX);void 0!==this.j&&(b=c-this.j,this.o+=b,!this.a&&Math.abs(this.o)>this.C&&(this.a=!0));this.j=c;a=a.map;c=a.a.getBoundingClientRect();d=Mn(this.l);d[0]-=c.left;d[1]-=c.top;this.f=a.ab(d);this.a&&(c=a.Z(),d=c.Qa(),a.render(),wn(c,d+b,this.f))}function to(a){if(2>this.l.length){a=a.map.Z();ln(a,1,-1);if(this.a){var b=a.Qa(),c=this.f,d=this.s;b=a.constrainRotation(b,0);wn(a,b,c,d)}return!1}return!0} function ro(a){return 2<=this.l.length?(a=a.map,this.f=null,this.j=void 0,this.a=!1,this.o=0,this.v||ln(a.Z(),1,1),!0):!1}qo.prototype.sd=Gd;function uo(a){Kn.call(this,{handleDownEvent:vo,handleDragEvent:wo,handleUpEvent:xo});a=a?a:{};this.o=a.constrainResolution||!1;this.f=null;this.s=void 0!==a.duration?a.duration:400;this.a=void 0;this.j=1}v(uo,Kn); function wo(a){var b=1,c=this.l[0],d=this.l[1],e=c.clientX-d.clientX;c=c.clientY-d.clientY;e=Math.sqrt(e*e+c*c);void 0!==this.a&&(b=this.a/e);this.a=e;a=a.map;e=a.Z();d=e.Ia();var f=e.a,g=e.f;c=d*b;c>f?(b=f/d,c=f):cthis.l.length){a=a.map.Z();ln(a,1,-1);var b=a.Ia();if(this.o||ba.a){var c=this.f,d=this.s;b=a.constrainResolution(b,0,this.j-1);yn(a,b,c,d)}return!1}return!0}function vo(a){return 2<=this.l.length?(a=a.map,this.f=null,this.a=void 0,this.j=1,this.v||ln(a.Z(),1,1),!0):!1}uo.prototype.sd=Gd;function yo(a){a=a?a:{};var b=new bb,c=new tn(-.005,.05,100);(void 0!==a.altShiftDragRotate?a.altShiftDragRotate:1)&&b.push(new Rn);(void 0!==a.doubleClickZoom?a.doubleClickZoom:1)&&b.push(new zn({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.dragPan?a.dragPan:1)&&b.push(new Nn({kinetic:c}));(void 0!==a.pinchRotate?a.pinchRotate:1)&&b.push(new qo);(void 0!==a.pinchZoom?a.pinchZoom:1)&&b.push(new uo({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));if(void 0!==a.keyboard? a.keyboard:1)b.push(new io),b.push(new ko({delta:a.zoomDelta,duration:a.zoomDuration}));(void 0!==a.mouseWheelZoom?a.mouseWheelZoom:1)&&b.push(new mo({constrainResolution:a.constrainResolution,duration:a.zoomDuration}));(void 0!==a.shiftDragZoom?a.shiftDragZoom:1)&&b.push(new ho({duration:a.zoomDuration}));return b};function zo(){this.b={};this.a=0}zo.prototype.clear=function(){this.b={};this.a=0};zo.prototype.get=function(a,b,c){a=b+":"+a+":"+(c?Qd(c):"null");return a in this.b?this.b[a]:null};zo.prototype.set=function(a,b,c,d){this.b[b+":"+a+":"+(c?Qd(c):"null")]=d;++this.a};var Ao=new zo;function Bo(a,b){this.R=b;this.c={};this.o={}}v(Bo,La);function Co(a){var b=a.viewState,c=a.coordinateToPixelTransform,d=a.pixelToCoordinateTransform;Ee(c,a.size[0]/2,a.size[1]/2,1/b.resolution,-1/b.resolution,-b.rotation,-b.center[0],-b.center[1]);Fe(ze(d,c))}k=Bo.prototype;k.xa=function(){for(var a in this.c)Ma(this.c[a])};function Do(){if(32p[2])m=[t+q*Math.ceil((p[0]-t)/q),a[1]]}p=b.layerStatesArray;for(q=p.length-1;0<=q;--q){var u=p[q];t=u.layer;if(ad(u,n)&&f.call(g,t)&&(u=Eo(this,t),t.ba()&&(l=u.Ga(t.ba().aa?m:a,b,c,h,e)),l))return l}}; k.gj=function(a,b,c,d,e){return void 0!==this.Ga(a,b,c,Fd,this,d,e)};function Eo(a,b){var c=x(b).toString();if(c in a.c)return a.c[c];b=b.Zd(a);a.c[c]=b;a.o[c]=y(b,"change",a.um,a);return b}k.um=function(){this.R.render()};k.mh=ua;k.br=function(a,b){for(var c in this.c)if(!(b&&c in b.layerStates)){a=c;var d=this.c[a];delete this.c[a];Ca(this.o[a]);delete this.o[a];Ma(d)}};function Fo(a,b){for(var c in a.c)if(!(c in b.layerStates)){b.postRenderFunctions.push(a.br.bind(a));break}} function Go(a,b){return a.zIndex-b.zIndex};function Ho(a,b){Bo.call(this,a,b);this.g=pd();this.b=this.g.canvas;this.b.style.width="100%";this.b.style.height="100%";this.b.style.display="block";this.b.className="ol-unselectable";a.insertBefore(this.b,a.childNodes[0]||null);this.a=!0;this.i=ve()}v(Ho,Bo); function Io(a,b,c){var d=a.R,e=a.g;if(Ra(d,b)){var f=c.extent,g=c.pixelRatio,h=c.viewState.rotation,l=c.viewState,m=c.pixelRatio/l.resolution;a=Ee(a.i,a.b.width/2,a.b.height/2,m,-m,-l.rotation,-l.center[0],-l.center[1]);d.b(new Hd(b,new Ge(e,g,f,a,h),c,e,null))}}Ho.prototype.U=function(){return"canvas"}; Ho.prototype.mh=function(a){if(a){var b=this.g,c=a.pixelRatio,d=Math.round(a.size[0]*c),e=Math.round(a.size[1]*c);this.b.width!=d||this.b.height!=e?(this.b.width=d,this.b.height=e):b.clearRect(0,0,d,e);c=a.viewState.rotation;Co(a);Io(this,"precompose",a);var f=a.layerStatesArray;md(f,Go);c&&(b.save(),Ld(b,c,d/2,e/2));d=a.viewState.resolution;var g;e=0;for(g=f.length;ed?b[0]=d-c:0>e&&(b[0]=Math.abs(e)+c),0>f?b[1]=f-c:0>g&&(b[1]=Math.abs(g)+c),0===b[0]&&0===b[1])|| (c=a.Z().va(),c=a.Pa(c),b=[c[0]+b[0],c[1]+b[1]],a.Z().animate({center:a.ab(b),duration:this.j.duration,easing:this.j.easing}))}}};k.Fm=function(){Uo(this)};k.Sj=function(a){this.set(Po,a)};k.setMap=function(a){this.set(Qo,a)};k.Zj=function(a){this.set(Ro,a)};k.pf=function(a){this.set(So,a)};function Vo(a,b){var c=a.getBoundingClientRect();a=c.left+window.pageXOffset;c=c.top+window.pageYOffset;return[a,c,a+b[0],c+b[1]]}k.bk=function(a){this.set(To,a)}; function Wo(a,b){a.a.visible!==b&&(a.c.style.display=b?"":"none",a.a.visible=b)} function Uo(a){var b=a.nf(),c=a.Ci();if(b&&b.c&&c){c=b.Pa(c);var d=b.Rb();b=a.c.style;var e=a.gi(),f=a.hi();Wo(a,!0);var g=e[0];e=e[1];if("bottom-right"==f||"center-right"==f||"top-right"==f)""!==a.a.gf&&(a.a.gf=b.left=""),g=Math.round(d[0]-c[0]-g)+"px",a.a.Jf!=g&&(a.a.Jf=b.right=g);else{""!==a.a.Jf&&(a.a.Jf=b.right="");if("bottom-center"==f||"center-center"==f||"top-center"==f)g-=a.c.offsetWidth/2;g=Math.round(c[0]+g)+"px";a.a.gf!=g&&(a.a.gf=b.left=g)}if("bottom-left"==f||"bottom-center"==f||"bottom-right"== f)""!==a.a.Sf&&(a.a.Sf=b.top=""),c=Math.round(d[1]-c[1]-e)+"px",a.a.Qe!=c&&(a.a.Qe=b.bottom=c);else{""!==a.a.Qe&&(a.a.Qe=b.bottom="");if("center-left"==f||"center-center"==f||"center-right"==f)e-=a.c.offsetHeight/2;c=Math.round(c[1]+e)+"px";a.a.Sf!=c&&(a.a.Sf=b.top=c)}}else Wo(a,!1)}var Po="element",Qo="map",Ro="offset",So="position",To="positioning";function Xo(a){function b(a){a=h.pg(a);l.R.Z().cb(a);window.removeEventListener("mousemove",c);window.removeEventListener("mouseup",b)}function c(a){a=h.pg({clientX:a.clientX-n.offsetWidth/2,clientY:a.clientY+n.offsetHeight/2});m.pf(a)}a=a?a:{};this.f=void 0!==a.collapsed?a.collapsed:!0;this.j=void 0!==a.collapsible?a.collapsible:!0;this.j||(this.f=!1);var d=void 0!==a.className?a.className:"ol-overviewmap",e=void 0!==a.tipLabel?a.tipLabel:"Overview map",f=void 0!==a.collapseLabel?a.collapseLabel: "\u00ab";"string"===typeof f?(this.s=document.createElement("span"),this.s.textContent=f):this.s=f;f=void 0!==a.label?a.label:"\u00bb";"string"===typeof f?(this.v=document.createElement("span"),this.v.textContent=f):this.v=f;var g=this.j&&!this.f?this.s:this.v;f=document.createElement("button");f.setAttribute("type","button");f.title=e;f.appendChild(g);y(f,"click",this.Vn,this);this.C=document.createElement("DIV");this.C.className="ol-overviewmap-map";var h=this.a=new Q({controls:new bb,interactions:new bb, view:a.view});a.layers&&a.layers.forEach(function(a){h.Nh(a)},this);e=document.createElement("DIV");e.className="ol-overviewmap-box";e.style.boxSizing="border-box";this.l=new Oo({position:[0,0],positioning:"bottom-left",element:e});this.a.Oh(this.l);e=document.createElement("div");e.className=d+" ol-unselectable ol-control"+(this.f&&this.j?" ol-collapsed":"")+(this.j?"":" ol-uncollapsible");e.appendChild(this.C);e.appendChild(f);Vl.call(this,{element:e,render:a.render?a.render:Yo,target:a.target}); var l=this,m=this.l,n=this.l.ke();n.addEventListener("mousedown",function(){window.addEventListener("mousemove",c);window.addEventListener("mouseup",b)})}v(Xo,Vl);k=Xo.prototype;k.setMap=function(a){var b=this.R;a!==b&&(b&&((b=b.Z())&&Ja(b,Ya("rotation"),this.ef,this),this.a.mf(null)),Vl.prototype.setMap.call(this,a),a&&(this.a.mf(this.C),this.o.push(y(a,"propertychange",this.zm,this)),0===this.a.Bi().rc()&&this.a.Xj(a.Nb()),a=a.Z()))&&(y(a,Ya("rotation"),this.ef,this),Rl(a)&&(this.a.Ud(),Zo(this)))}; k.zm=function(a){"view"===a.key&&((a=a.oldValue)&&Ja(a,Ya("rotation"),this.ef,this),a=this.R.Z(),y(a,Ya("rotation"),this.ef,this))};k.ef=function(){this.a.Z().gd(this.R.Z().Qa())};function Yo(){var a=this.R,b=this.a;if(a.c&&b.c){var c=a.Rb();a=a.Z().zd(c);var d=b.Rb();c=b.Z().zd(d);var e=b.Pa(Bb(a)),f=b.Pa(zb(a));b=Math.abs(e[0]-f[0]);e=Math.abs(e[1]-f[1]);f=d[0];d=d[1];b<.1*f||e<.1*d||b>.75*f||e>.75*d?Zo(this):pb(c,a)||(a=this.a,c=this.R.Z(),a.Z().cb(c.va()))}$o(this)} function Zo(a){var b=a.R;a=a.a;var c=b.Rb();b=b.Z().zd(c);a=a.Z();Kb(b,1/(.1*Math.pow(2,Math.log(7.5)/Math.LN2/2)));a.ng(b)}function $o(a){var b=a.R,c=a.a;if(b.c&&c.c){var d=b.Rb(),e=b.Z(),f=c.Z();c=e.Qa();b=a.l;var g=a.l.ke(),h=e.zd(d);d=f.Ia();e=yb(h);f=Ab(h);if(a=a.R.Z().va()){var l=[e[0]-a[0],e[1]-a[1]];zd(l,c);ud(l,a)}b.pf(l);g&&(g.style.width=Math.abs((e[0]-f[0])/d)+"px",g.style.height=Math.abs((f[1]-e[1])/d)+"px")}}k.Vn=function(a){a.preventDefault();ap(this)}; function ap(a){a.element.classList.toggle("ol-collapsed");a.f?qd(a.s,a.v):qd(a.v,a.s);a.f=!a.f;var b=a.a;a.f||b.c||(b.Ud(),Zo(a),Ia(b,"postrender",function(){$o(this)},a))}k.Un=function(){return this.j};k.Xn=function(a){this.j!==a&&(this.j=a,this.element.classList.toggle("ol-uncollapsible"),!a&&this.f&&ap(this))};k.Wn=function(a){this.j&&this.f!==a&&ap(this)};k.Tn=function(){return this.f};k.Wl=function(){return this.a};function bp(a){a=a?a:{};var b=void 0!==a.className?a.className:"ol-scale-line";this.j=document.createElement("DIV");this.j.className=b+"-inner";this.a=document.createElement("DIV");this.a.className=b+" ol-unselectable";this.a.appendChild(this.j);this.s=null;this.l=void 0!==a.minWidth?a.minWidth:64;this.f=!1;this.C=void 0;this.v="";Vl.call(this,{element:this.a,render:a.render?a.render:cp,target:a.target});y(this,Ya(dp),this.G,this);this.B(a.units||"metric")}v(bp,Vl);var ep=[1,2,5]; bp.prototype.Pb=function(){return this.get(dp)};function cp(a){(a=a.frameState)?this.s=a.viewState:this.s=null;fp(this)}bp.prototype.G=function(){fp(this)};bp.prototype.B=function(a){this.set(dp,a)}; function fp(a){var b=a.s;if(b){var c=b.projection,d=c.dc();b=Jc(c,b.resolution,b.center)*d;d=a.l*b;c="";var e=a.Pb();"degrees"==e?(c=pc.degrees,b/=c,dd?(c="in",b/=.0254):1609.344>d?(c="ft",b/=.3048):(c="mi",b/=1609.344):"nautical"==e?(b/=1852,c="nm"):"metric"==e?.001>d?(c="\u03bcm",b*=1E6):1>d?(c="mm",b*=1E3):1E3>d?c="m":(c="km",b/=1E3):"us"==e?.9144>d?(c="in",b*=39.37):1609.344>d?(c="ft",b/=.30480061):(c="mi",b/=1609.3472): gb(!1,33);e=3*Math.floor(Math.log(a.l*b)/Math.log(10));for(var f;;){f=ep[(e%3+3)%3]*Math.pow(10,Math.floor(e/3));d=Math.round(f/b);if(isNaN(d)){a.a.style.display="none";a.f=!1;return}if(d>=a.l)break;++e}b=f+" "+c;a.v!=b&&(a.j.innerHTML=b,a.v=b);a.C!=d&&(a.j.style.width=d+"px",a.C=d);a.f||(a.a.style.display="",a.f=!0)}else a.f&&(a.a.style.display="none",a.f=!1)}var dp="units";function gp(a){a=a?a:{};this.a=void 0;this.f=hp;this.v=this.l=0;this.G=null;this.X=!1;this.aa=void 0!==a.duration?a.duration:200;var b=void 0!==a.className?a.className:"ol-zoomslider",c=document.createElement("button");c.setAttribute("type","button");c.className=b+"-thumb ol-unselectable";var d=document.createElement("div");d.className=b+" ol-unselectable ol-control";d.appendChild(c);this.j=new Om(d);y(this.j,"pointerdown",this.nm,this);y(this.j,"pointermove",this.lm,this);y(this.j,"pointerup",this.mm, this);y(d,"click",this.km,this);y(c,"click",Oa);Vl.call(this,{element:d,render:a.render?a.render:ip})}v(gp,Vl);gp.prototype.xa=function(){Ma(this.j);Vl.prototype.xa.call(this)};var hp=0;k=gp.prototype;k.setMap=function(a){Vl.prototype.setMap.call(this,a);a&&a.render()}; function ip(a){if(a.frameState){if(!this.X){var b=this.element,c=b.offsetWidth,d=b.offsetHeight,e=b.firstElementChild,f=getComputedStyle(e);b=e.offsetWidth+parseFloat(f.marginRight)+parseFloat(f.marginLeft);e=e.offsetHeight+parseFloat(f.marginTop)+parseFloat(f.marginBottom);this.G=[b,e];c>d?(this.f=1,this.v=c-b):(this.f=hp,this.l=d-e);this.X=!0}a=a.frameState.viewState.resolution;a!==this.a&&(this.a=a,jp(this,a))}} k.km=function(a){var b=this.R.Z();a=kp(this,Mb(1===this.f?(a.offsetX-this.G[0]/2)/this.v:(a.offsetY-this.G[1]/2)/this.l,0,1));b.animate({resolution:b.constrainResolution(a),duration:this.aa,easing:$l})};k.nm=function(a){this.s||a.b.target!==this.element.firstElementChild||(ln(this.R.Z(),1,1),this.C=a.clientX,this.B=a.clientY,this.s=!0)}; k.lm=function(a){if(this.s){var b=this.element.firstElementChild;this.a=kp(this,Mb(1===this.f?(a.clientX-this.C+parseInt(b.style.left,10))/this.v:(a.clientY-this.B+parseInt(b.style.top,10))/this.l,0,1));this.R.Z().Uc(this.a);jp(this,this.a);this.C=a.clientX;this.B=a.clientY}};k.mm=function(){if(this.s){var a=this.R.Z();ln(a,1,-1);a.animate({resolution:a.constrainResolution(this.a),duration:this.aa,easing:$l});this.s=!1;this.B=this.C=void 0}}; function jp(a,b){b=1-sn(a.R.Z())(b);var c=a.element.firstElementChild;1==a.f?c.style.left=a.v*b+"px":c.style.top=a.l*b+"px"}function kp(a,b){return rn(a.R.Z())(1-b)};function lp(a){a=a?a:{};this.a=a.extent?a.extent:null;var b=void 0!==a.className?a.className:"ol-zoom-extent",c=void 0!==a.label?a.label:"E",d=void 0!==a.tipLabel?a.tipLabel:"Fit to extent",e=document.createElement("button");e.setAttribute("type","button");e.title=d;e.appendChild("string"===typeof c?document.createTextNode(c):c);y(e,"click",this.f,this);c=document.createElement("div");c.className=b+" ol-unselectable ol-control";c.appendChild(e);Vl.call(this,{element:c,target:a.target})}v(lp,Vl); lp.prototype.f=function(a){a.preventDefault();a=this.R.Z();var b=this.a?this.a:a.c.D();a.ng(b)};function mp(a){Wa.call(this);a=a?a:{};this.a=null;y(this,Ya(np),this.nn,this);this.Hg(void 0!==a.tracking?a.tracking:!1)}v(mp,Wa);k=mp.prototype;k.xa=function(){this.Hg(!1);Wa.prototype.xa.call(this)}; k.Wp=function(a){if(null!==a.alpha){var b=Rb(a.alpha);this.set(op,b);"boolean"===typeof a.absolute&&a.absolute?this.set(pp,b):"number"===typeof a.webkitCompassHeading&&-1!=a.webkitCompassAccuracy&&this.set(pp,Rb(a.webkitCompassHeading))}null!==a.beta&&this.set(qp,Rb(a.beta));null!==a.gamma&&this.set(rp,Rb(a.gamma));this.u()};k.pl=function(){return this.get(op)};k.sl=function(){return this.get(qp)};k.Dl=function(){return this.get(rp)};k.mn=function(){return this.get(pp)};k.xi=function(){return this.get(np)}; k.nn=function(){if(ke){var a=this.xi();a&&!this.a?this.a=y(window,"deviceorientation",this.Wp,this):a||null===this.a||(Ca(this.a),this.a=null)}};k.Hg=function(a){this.set(np,a)};var op="alpha",qp="beta",rp="gamma",pp="heading",np="tracking";function sp(){this.i=this.defaultDataProjection=null}function tp(a,b,c){var d;c&&(d={dataProjection:c.dataProjection?c.dataProjection:a.hb(b),featureProjection:c.featureProjection});return up(a,d)}function up(a,b){return wa({dataProjection:a.defaultDataProjection,featureProjection:a.i},b)} function vp(a,b,c){var d=c?Lc(c.featureProjection):null,e=c?Lc(c.dataProjection):null,f;d&&e&&!Uc(d,e)?a instanceof Td?f=(b?a.clone():a).transform(b?d:e,b?e:d):f=Yc(b?a.slice():a,b?d:e,b?e:d):f=a;if(b&&c&&c.decimals){var g=Math.pow(10,c.decimals);a=function(a){for(var b=0,c=a.length;ba||this.c.length<=a)return null;var b=new K(null);b.fa(this.ma,this.A.slice(0===a?0:this.c[a-1],this.c[a]));return b}; k.Hc=function(){var a=this.A,b=this.c,c=this.ma,d=[],e=0,f;var g=0;for(f=b.length;ga||b<=a)return null;b=new L(null);b.fa(this.ma,this.A.slice(a*this.a,(a+1)*this.a));return b};k.Id=function(){var a=this.A,b=this.ma,c=this.a,d=[],e;var f=0;for(e=a.length;fa||this.c.length<=a)return null;if(0===a)var b=0;else b=this.c[a-1],b=b[b.length-1];a=this.c[a].slice();var c=a[a.length-1];if(0!==b){var d;var e=0;for(d=a.length;ea||0!==this.f&&ac;++c){var d=parseInt(b[c],10).toString(16);b[c]=1==d.length?"0"+d:d}Np(a,b.join(""))}function ft(a,b,c){a={node:a};var d=b.U();if("GeometryCollection"==d){var e=b.Dd();var f=gt}else"MultiPoint"==d?(e=b.Id(),f=ht):"MultiLineString"==d?(e=b.Hc(),f=it):"MultiPolygon"==d?(e=b.bd(),f=jt):gb(!1,39);Mj(a,kt,f,e,c)}function lt(a,b,c){Mj({node:a},mt,nt,[b],c)} function ot(a,b,c){var d={node:a};b.a&&a.setAttribute("id",b.a);a=b.L();var e={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};e[b.c]=1;var f=Object.keys(a||{}).sort().filter(function(a){return!e[a]});if(0>1,m=-7;f=d?f-1:0;var n=d?-1:1,z=a[b+f];f+=n;d=z&(1<<-m)-1;z>>=-m;for(m+=g;0>=-m;for(m+=e;0>1,n=23===f?Math.pow(2,-24)-Math.pow(2,-77):0;p=e?0:p-1;var D=e?1:-1,B=0>b||0===b&&0>1/b?1:0;b=Math.abs(b);isNaN(b)||Infinity===b?(b=isNaN(b)?1:0,e=l):(e=Math.floor(Math.log(b)/Math.LN2),1>b*(g=Math.pow(2,-e))&&(e--,g*=2),b=1<=e+m?b+n/g:b+n*Math.pow(2,1-m),2<=b*g&&(e++,g/=2),e+m>=l?(b=0,e=l):1<=e+m?(b=(b*g-1)*Math.pow(2,f),e+=m):(b=b*Math.pow(2,m-1)*Math.pow(2,f),e=0));for(;8<=f;a[d+p]=b&255,p+=D,b/=256,f-=8);e=e<>4;if(128>f)return h(a,g,b);f=e[d.ia++];g|=(f&127)<<3;if(128>f)return h(a,g,b);f=e[d.ia++];g|=(f&127)<<10;if(128>f)return h(a,g,b);f=e[d.ia++];g|=(f&127)<<17;if(128>f)return h(a,g,b);f=e[d.ia++];g|=(f&127)<<24;if(128>f)return h(a,g,b);f=e[d.ia++]; if(128>f)return h(a,g|(f&1)<<31,b);throw Error("Expected varint not more than 10 bytes");}function h(a,b,d){return d?4294967296*b+(a>>>0):4294967296*(b>>>0)+(a>>>0)}b.na=d;var l=a("ieee754");d.c=0;d.g=1;d.b=2;d.a=5;d.prototype={destroy:function(){this.mc=null},bh:function(a,b,d){for(d=d||this.length;this.ia>3,g=this.ia;this.type=e&7;a(f,b,this);this.ia===g&&this.Br(e)}return b},yq:function(){var a=l.read(this.mc,this.ia,!0,23,4);this.ia+=4;return a},uq:function(){var a=l.read(this.mc, this.ia,!0,52,8);this.ia+=8;return a},Sa:function(a){var b=this.mc;var d=b[this.ia++];var f=d&127;if(128>d)return f;d=b[this.ia++];f|=(d&127)<<7;if(128>d)return f;d=b[this.ia++];f|=(d&127)<<14;if(128>d)return f;d=b[this.ia++];f|=(d&127)<<21;if(128>d)return f;d=b[this.ia];return e(f|(d&15)<<28,a,this)},Uq:function(){return this.Sa(!0)},ze:function(){var a=this.Sa();return 1===a%2?(a+1)/-2:a/2},nq:function(){return!!this.Sa()},hh:function(){for(var a=this.Sa()+this.ia,b=this.mc,d="",e=this.ia;ea)break;if(1===h)128>f&&(g=f);else if(2===h){var l=b[e+1];128===(l&192)&&(g=(f&31)<<6|l&63,127>=g&&(g=null))}else if(3===h){l=b[e+1];var D=b[e+2];128===(l&192)&&128===(D&192)&&(g=(f&15)<<12|(l&63)<<6|D&63,2047>=g||55296<=g&&57343>=g)&&(g=null)}else if(4===h){l=b[e+1];D=b[e+2];var B=b[e+3];128===(l&192)&&128===(D&192)&&128===(B&192)&&(g=(f&15)<<18|(l&63)<<12|(D&63)<<6|B&63,65535>=g||1114112<=g)&&(g=null)}null===g?(g=65533,h=1):65535>> 10&1023|55296),g=56320|g&1023);d+=String.fromCharCode(g);e+=h}this.ia=a;return d},Br:function(a){a&=7;if(a===d.c)for(;127>=3),e--,1===d||2===d)f+=a.ze(),g+=a.ze(),1===d&&(w&&u.push(w),w=[]),w.push(new h(f,g));else if(7===d)w&&w.push(w[0].clone());else throw Error("unknown command "+d);w&&u.push(w);return u};d.prototype.bbox=function(){var a=this.Wc;a.ia= this.$f;for(var b=a.Sa()+a.ia,d=1,e=0,f=0,g=0,h=Infinity,w=-Infinity,z=Infinity,D=-Infinity;a.ia>=3),e--,1===d||2===d)f+=a.ze(),g+=a.ze(),fw&&(w=f),gD&&(D=g);else if(7!==d)throw Error("unknown command "+d);return[h,z,w,D]}},{"point-geometry":1}],5:[function(a,b){function d(a,b){this.version=1;this.name=null;this.extent=4096;this.length=0;this.Wc=a;this.Le=[];this.Ne=[];this.Ke=[];a.bh(e,this,b);this.length=this.Ke.length}function e(a,b,d){15===a? b.version=d.Sa():1===a?b.name=d.hh():5===a?b.extent=d.Sa():2===a?b.Ke.push(d.ia):3===a?b.Le.push(d.hh()):4===a&&b.Ne.push(h(d))}function h(a){for(var b=null,d=a.Sa()+a.ia;a.ia>3,b=1===b?a.hh():2===b?a.yq():3===b?a.uq():4===b?a.Uq():5===b?a.Sa():6===b?a.ze():7===b?a.nq():null;return b}var l=a("./vectortilefeature.js");b.na=d;d.prototype.feature=function(a){if(0>a||a>=this.Ke.length)throw Error("feature index out of bounds");this.Wc.ia=this.Ke[a];a=this.Wc.Sa()+this.Wc.ia;return new l(this.Wc, a,this.extent,this.Le,this.Ne)}},{"./vectortilefeature.js":4}]},{},[2])(2)});Zg=b.na})();function Ut(a,b,c,d){this.g=a;this.b=b;this.i=c;this.c=d}k=Ut.prototype;k.get=function(a){return this.c[a]};k.$b=function(){return this.i};k.D=function(){this.a||(this.a="Point"===this.g?sb(this.b):tb(this.b,0,this.b.length,2));return this.a};k.sc=function(){return this.b};k.ja=Ut.prototype.sc;k.V=function(){return this};k.L=function(){return this.c};k.me=Ut.prototype.V;k.ya=function(){return 2};k.Nc=ua;k.U=function(){return this.g};function Vt(a){sp.call(this);a=a?a:{};this.defaultDataProjection=new sc({code:"",units:"tile-pixels"});this.b=a.featureClass?a.featureClass:Ut;this.g=a.geometryName;this.a=a.layerName?a.layerName:"layer";this.c=a.layers?a.layers:null}v(Vt,sp);k=Vt.prototype;k.U=function(){return"arraybuffer"}; k.Oa=function(a,b){var c=this.c;a=new Yg(a);a=new Zg.Ek(a);var d=[],e=this.b,f;for(f in a.layers)if(!c||-1!=c.indexOf(f)){var g=a.layers[f];for(var h=0,l=g.length;hc?~(c<<1):c<<1;b="";d=0;for(c=a.length;d>=5;g+=String.fromCharCode(f+63);b+=g}return b} function zu(a,b){b=b?b:1E5;var c=[],d=0,e=0,f;var g=0;for(f=a.length;gh?(c.push(d),e=d=0):e+=5}a=0;for(d=c.length;a>1):e>>1;a=0;for(d=c.length;a=b||"."==b||"-"==b){c.type=4;b=a.b;var d=!1,e=!1;do{if("."==f)d=!0;else if("e"==f||"E"==f)e=!0;var f=a.a.charAt(++a.b)}while("0"<=f&&"9">=f||"."==f&&(void 0===d||!d)||!e&&("e"==f||"E"==f)||e&&("-"==f||"+"==f));a=parseFloat(a.a.substring(b,a.b--));c.value=a}else if("a"<=b&&"z">=b||"A"<=b&&"Z">=b){c.type=1;b=a.b;do f=a.a.charAt(++a.b);while("a"<=f&&"z">= f||"A"<=f&&"Z">=f);a=a.a.substring(b,a.b--).toUpperCase();c.value=a}else{if(" "==b||"\t"==b||"\r"==b||"\n"==b)return Av(a);if(""===b)c.type=6;else throw Error("Unexpected character: "+b);}return c}function wv(a){this.g=a;this.a="XY"}function yv(a){a.b=Av(a.g)}function Bv(a,b){(b=a.b.type==b)&&yv(a);return b} function zv(a){var b=a.b;if(Bv(a,1)){b=b.value;var c="XY",d=a.b;1==a.b.type&&(d=d.value,"Z"===d?c="XYZ":"M"===d?c="XYM":"ZM"===d&&(c="XYZM"),"XY"!==c&&yv(a));a.a=c;if("GEOMETRYCOLLECTION"==b){a:{if(Bv(a,2)){b=[];do b.push(zv(a));while(Bv(a,5));if(Bv(a,3)){a=b;break a}}else if(Cv(a)){a=[];break a}throw Error(Dv(a));}return new Eq(a)}d=Ev[b];c=Fv[b];if(!d||!c)throw Error("Invalid geometry type: "+b);b=d.call(a);return new c(b,a.a)}throw Error(Dv(a));}k=wv.prototype; k.Vg=function(){if(Bv(this,2)){var a=Gv(this);if(Bv(this,3))return a}else if(Cv(this))return null;throw Error(Dv(this));};k.Ug=function(){if(Bv(this,2)){var a=Hv(this);if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));};k.Wg=function(){if(Bv(this,2)){var a=Iv(this);if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));}; k.$p=function(){if(Bv(this,2)){var a;if(2==this.b.type)for(a=[this.Vg()];Bv(this,5);)a.push(this.Vg());else a=Hv(this);if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));};k.Zp=function(){if(Bv(this,2)){var a=Iv(this);if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));};k.aq=function(){if(Bv(this,2)){for(var a=[this.Wg()];Bv(this,5);)a.push(this.Wg());if(Bv(this,3))return a}else if(Cv(this))return[];throw Error(Dv(this));}; function Gv(a){for(var b=[],c=a.a.length,d=0;d=b[0]||a[1]<=b[1]&&a[3]>=b[1]?!0:xb(a,this.yb,this)):!1}; k.cb=function(a){var b=this.a,c=a.slice();c[b]=c[0]+(this.A[b]-this.A[0]);var d;for(d=1;df[2])&&(c=h*Math.ceil((f[0]-c)/h),d=[d[0]+c, d[1],d[2]+c,d[3]]);c=this.o[0];f=this.o[1];h=-1;m=Math.pow(this.G*g,2);p=[];q=[];g=0;for(l=Dw.length;ga.lc:e<=a.lc}a.o?(e=b.coordinate,c=a.j.V(),a.f===Ww?d=a.a:a.f===Vw?(d=a.a[0],d=d[d.length-1],cx(a,b)&&(e=a.o.slice())):(d=a.a,d=d[d.length-1]),d[0]=e[0],d[1]=e[1],a.Va(a.a,c),a.B&&a.B.V().ua(e),c instanceof M&&a.f!==Vw?(a.C||(a.C=new E(new K(null))),e=c.vg(0),b=a.C.V(),b.fa(e.ma,e.ja())):a.G&&(b=a.C.V(),b.ua(a.G)),ex(a)):(b=b.coordinate.slice(),a.B?a.B.V().ua(b):(a.B=new E(new L(b)), ex(a)));return!0}function cx(a,b){var c=!1;if(a.j){var d=!1,e=[a.o];a.f===Xw?d=a.a.length>a.wa:a.f===Vw&&(d=a.a[0].length>a.wa,e=[a.a[0][0],a.a[0][a.a[0].length-2]]);if(d){d=b.map;for(var f=0,g=e.length;f=a.oa&&(a.s?e.pop():d=!0);e.push(b.slice());a.Va(e,c)}else a.f===Vw&&(e=a.a[0],e.length>=a.oa&&(a.s?e.pop():d=!0),e.push(b.slice()),d&&(a.o=e[0]),a.Va(a.a,c));ex(a);d&&a.je()} k.Zq=function(){if(this.j){var a=this.j.V();if(this.f===Xw){var b=this.a;b.splice(-2,1);this.Va(b,a);2<=b.length&&(this.o=b[b.length-2].slice())}else if(this.f===Vw){b=this.a[0];b.splice(-2,1);var c=this.C.V();c.ua(b);this.Va(this.a,a)}0===b.length&&(this.o=null);ex(this)}}; k.je=function(){var a=dx(this),b=this.a,c=a.V();this.f===Xw?(b.pop(),this.Va(b,c)):this.f===Vw&&(b[0].pop(),this.Va(b,c),b=c.T());"MultiPoint"===this.N?a.Wa(new T([b])):"MultiLineString"===this.N?a.Wa(new R([b])):"MultiPolygon"===this.N&&a.Wa(new U([b]));this.b(new fx("drawend",a));this.Xa&&this.Xa.push(a);this.rb&&this.rb.Eb(a)};function dx(a){a.o=null;var b=a.j;b&&(a.j=null,a.B=null,a.C=null,a.la.ba().clear(!0));return b} k.po=function(a){var b=a.V();this.j=a;this.a=b.T();a=this.a[this.a.length-1];this.o=a.slice();this.a.push(a.slice());ex(this);this.b(new fx("drawstart",this.j))};k.sd=Gd;function ex(a){var b=[];a.j&&b.push(a.j);a.C&&b.push(a.C);a.B&&b.push(a.B);a=a.la.ba();a.clear(!0);a.yd(b)}k.Ui=function(){var a=this.R,b=this.c();a&&b||dx(this);this.la.setMap(b?a:null)}; function Uw(a){var b;"Point"===a||"MultiPoint"===a?b=Ww:"LineString"===a||"MultiLineString"===a?b=Xw:"Polygon"===a||"MultiPolygon"===a?b=Vw:"Circle"===a&&(b=bx);return b}var Ww="Point",Xw="LineString",Vw="Polygon",bx="Circle";function fx(a,b){Na.call(this,a);this.feature=b}v(fx,Na);function gx(a){this.a=this.j=null;this.C=!1;this.B=this.o=null;a||(a={});a.extent&&this.f(a.extent);Kn.call(this,{handleDownEvent:hx,handleDragEvent:ix,handleEvent:jx,handleUpEvent:kx});this.s=new N({source:new J({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.boxStyle?a.boxStyle:lx(),updateWhileAnimating:!0,updateWhileInteracting:!0});this.G=new N({source:new J({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.pointerStyle?a.pointerStyle:mx(),updateWhileAnimating:!0,updateWhileInteracting:!0})}v(gx,Kn); function jx(a){if(!(a instanceof sm))return!0;if("pointermove"==a.type&&!this.v){var b=a.pixel,c=a.map,d=nx(this,b,c);d||(d=c.ab(b));ox(this,d)}Ln.call(this,a);return!1} function hx(a){function b(a){var b=null,c=null;a[0]==e[0]?b=e[2]:a[0]==e[2]&&(b=e[0]);a[1]==e[1]?c=e[3]:a[1]==e[3]&&(c=e[1]);return null!==b&&null!==c?[b,c]:null}var c=a.pixel,d=a.map,e=this.D();(a=nx(this,c,d))&&e?(c=a[0]==e[0]||a[0]==e[2]?a[0]:null,d=a[1]==e[1]||a[1]==e[3]?a[1]:null,null!==c&&null!==d?this.a=px(b(a)):null!==c?this.a=qx(b([c,e[1]]),b([c,e[3]])):null!==d&&(this.a=qx(b([e[0],d]),b([e[2],d])))):(a=d.ab(c),this.f([a[0],a[1],a[0],a[1]]),this.a=px(a));return!0} function ix(a){this.a&&(a=a.coordinate,this.f(this.a(a)),ox(this,a));return!0}function kx(){this.a=null;var a=this.D();a&&0!==Cb(a)||this.f(null);return!1}function lx(){var a=qj();return function(){return a.Polygon}}function mx(){var a=qj();return function(){return a.Point}}function px(a){return function(b){return hb([a,b])}}function qx(a,b){return a[0]==b[0]?function(c){return hb([a,[c[0],b[1]]])}:a[1]==b[1]?function(c){return hb([a,[b[0],c[1]]])}:null} function nx(a,b,c){function d(a,b){return Dd(e,a)-Dd(e,b)}var e=c.ab(b),f=a.D();if(f){f=[[[f[0],f[1]],[f[0],f[3]]],[[f[0],f[3]],[f[2],f[3]]],[[f[2],f[3]],[f[2],f[1]]],[[f[2],f[1]],[f[0],f[1]]]];f.sort(d);f=f[0];var g=vd(e,f),h=c.Pa(g);if(10>=Cd(b,h))return b=c.Pa(f[0]),c=c.Pa(f[1]),b=Bd(h,b),c=Bd(h,c),a.C=10>=Math.sqrt(Math.min(b,c)),a.C&&(g=b>c?f[1]:f[0]),g}return null}function ox(a,b){var c=a.B;c?c.V().ua(b):(c=new E(new L(b)),a.B=c,a.G.ba().Eb(c))} gx.prototype.setMap=function(a){this.s.setMap(a);this.G.setMap(a);Kn.prototype.setMap.call(this,a)};gx.prototype.D=function(){return this.j};gx.prototype.f=function(a){this.j=a?a:null;var b=this.o;b?a?b.Wa(gl(a)):b.Wa(void 0):(this.o=b=a?new E(gl(a)):new E({}),this.s.ba().Eb(b));this.b(new rx(this.j))};function rx(a){Na.call(this,sx);this.b=a}v(rx,Na);var sx="extentchanged";function tx(a){Kn.call(this,{handleDownEvent:ux,handleDragEvent:vx,handleEvent:wx,handleUpEvent:xx});this.rb=a.condition?a.condition:Jn;this.Xa=function(a){return Fn(a)&&En(a)};this.Ua=a.deleteCondition?a.deleteCondition:this.Xa;this.wa=this.f=null;this.oa=[0,0];this.C=this.G=!1;this.a=new ah;this.$=void 0!==a.pixelTolerance?a.pixelTolerance:10;this.o=this.la=!1;this.j=[];this.B=new N({source:new J({useSpatialIndex:!1,wrapX:!!a.wrapX}),style:a.style?a.style:yx(),updateWhileAnimating:!0,updateWhileInteracting:!0}); this.aa={Point:this.wo,LineString:this.Wi,LinearRing:this.Wi,Polygon:this.xo,MultiPoint:this.uo,MultiLineString:this.to,MultiPolygon:this.vo,Circle:this.Lr,GeometryCollection:this.so};this.s=a.features;this.s.forEach(this.Mg,this);y(this.s,"add",this.qo,this);y(this.s,"remove",this.ro,this);this.N=null}v(tx,Kn);k=tx.prototype;k.Mg=function(a){var b=a.V();b&&b.U()in this.aa&&this.aa[b.U()].call(this,a,b);(b=this.R)&&b.c&&this.c()&&zx(this,this.oa,b);y(a,"change",this.Vi,this)}; function Ax(a,b){a.C||(a.C=!0,a.b(new Bx("modifystart",a.s,b)))}function Cx(a,b){Dx(a,b);a.f&&0===a.s.rc()&&(a.B.ba().Ib(a.f),a.f=null);Ja(b,"change",a.Vi,a)}function Dx(a,b){a=a.a;var c=[];a.forEach(function(a){b===a.feature&&c.push(a)});for(var d=c.length-1;0<=d;--d)a.remove(c[d])}k.Na=function(a){this.f&&!a&&(this.B.ba().Ib(this.f),this.f=null);Kn.prototype.Na.call(this,a)};k.setMap=function(a){this.B.setMap(a);Kn.prototype.setMap.call(this,a)};k.qo=function(a){this.Mg(a.element)}; k.Vi=function(a){this.o||(a=a.target,Cx(this,a),this.Mg(a))};k.ro=function(a){Cx(this,a.element)};k.wo=function(a,b){var c=b.T();a={feature:a,geometry:b,sa:[c,c]};this.a.Ha(b.D(),a)};k.uo=function(a,b){var c=b.T(),d;var e=0;for(d=c.length;em?h[1]:h[0]),Ex(a,l),m=1,c=f.length;mn&&(n=0);f=g.geometry;var p=d=f.T();var q=!1;switch(f.U()){case "MultiLineString":2c&&(a.index+=e)})}function yx(){var a=qj();return function(){return a.Point}}function Bx(a,b,c){Na.call(this,a);this.features=b;this.mapBrowserEvent=c}v(Bx,Na);function Jx(a){vn.call(this,{handleEvent:Kx});a=a?a:{};this.C=a.condition?a.condition:En;this.v=a.addCondition?a.addCondition:Gd;this.B=a.removeCondition?a.removeCondition:Gd;this.G=a.toggleCondition?a.toggleCondition:Gn;this.o=a.multi?a.multi:!1;this.l=a.filter?a.filter:Fd;this.j=a.hitTolerance?a.hitTolerance:0;this.f=new N({source:new J({useSpatialIndex:!1,features:a.features,wrapX:a.wrapX}),style:a.style?a.style:Lx(),updateWhileAnimating:!0,updateWhileInteracting:!0});if(a.layers)if("function"=== typeof a.layers)a=a.layers;else{var b=a.layers;a=function(a){return gd(b,a)}}else a=Fd;this.s=a;this.a={};a=this.f.ba().i;y(a,"add",this.yo,this);y(a,"remove",this.Co,this)}v(Jx,vn);k=Jx.prototype;k.zo=function(){return this.f.ba().i};k.Ao=function(){return this.j};k.Bo=function(a){a=x(a);return this.a[a]}; function Kx(a){if(!this.C(a))return!0;var b=this.v(a),c=this.B(a),d=this.G(a),e=!b&&!c&&!d,f=a.map,g=this.f.ba().i,h=[],l=[];if(e){xa(this.a);f.Ve(a.pixel,function(a,b){if(this.l(a,b))return l.push(a),a=x(a),this.a[a]=b,!this.o}.bind(this),{layerFilter:this.s,hitTolerance:this.j});for(e=g.rc()-1;0<=e;--e){f=g.item(e);var m=l.indexOf(f);-1b?g[1]:g[0],f=d.Pa(h)}else this.G&&(h=vd(c,g),f=d.Pa(h),Cd(b,f)<=this.f&&(e=!0,this.$&&(c=d.Pa(g[0]),l=d.Pa(g[1]),c=Bd(f,c),b=Bd(f,l),l=Math.sqrt(Math.min(c, b)),l=l<=this.f)))&&(h=c>b?g[1]:g[0],f=d.Pa(h));e&&(f=[Math.round(f[0]),Math.round(f[1])])}d=h;e&&(a.coordinate=d.slice(0,2),a.pixel=f);return Ln.call(this,a)}function Qx(){var a=za(this.s);a.length&&(a.forEach(this.jk,this),this.s={});return!1}function Rx(a,b){return Dd(this.B,a.sa)-Dd(this.B,b.sa)};function Sx(a){Kn.call(this,{handleDownEvent:Tx,handleDragEvent:Ux,handleMoveEvent:Vx,handleUpEvent:Wx});a=a?a:{};this.f=void 0;this.a=null;this.o=void 0!==a.features?a.features:null;if(a.layers)if("function"===typeof a.layers)var b=a.layers;else{var c=a.layers;b=function(a){return gd(c,a)}}else b=Fd;this.B=b;this.s=a.hitTolerance?a.hitTolerance:0;this.j=null;y(this,Ya("active"),this.C,this)}v(Sx,Kn); function Tx(a){this.j=Xx(this,a.pixel,a.map);if(!this.a&&this.j){this.a=a.coordinate;Vx.call(this,a);var b=this.o||new bb([this.j]);this.b(new Yx("translatestart",b,a.coordinate));return!0}return!1}function Wx(a){if(this.a){this.a=null;Vx.call(this,a);var b=this.o||new bb([this.j]);this.b(new Yx("translateend",b,a.coordinate));return!0}return!1} function Ux(a){if(this.a){a=a.coordinate;var b=a[0]-this.a[0],c=a[1]-this.a[1],d=this.o||new bb([this.j]);d.forEach(function(a){var d=a.V();d.translate(b,c);a.Wa(d)});this.a=a;this.b(new Yx("translating",d,a))}}function Vx(a){var b=a.map.Jc();Xx(this,a.pixel,a.map)?(this.f=void 0!==this.f?this.f:b.style.cursor,b.style.cursor=this.a?"-webkit-grabbing":"-webkit-grab",b.style.cursor=this.a?"grabbing":"grab"):void 0!==this.f&&(b.style.cursor=this.f,this.f=void 0)} function Xx(a,b,c){return c.Ve(b,function(a){if(!this.o||gd(this.o.a,a))return a}.bind(a),{layerFilter:a.B,hitTolerance:a.s})}Sx.prototype.G=function(){return this.s};Sx.prototype.N=function(a){this.s=a};Sx.prototype.setMap=function(a){var b=this.R;Kn.prototype.setMap.call(this,a);Zx(this,b)};Sx.prototype.C=function(){Zx(this,null)};function Zx(a,b){var c=a.R,d=a.c();c&&d||void 0===a.f||(c||(c=b),c.Jc().style.cursor=a.f,a.f=void 0)} function Yx(a,b,c){Na.call(this,a);this.features=b;this.coordinate=c}v(Yx,Na);function X(a){a=a?a:{};var b=wa({},a);delete b.gradient;delete b.radius;delete b.blur;delete b.shadow;delete b.weight;N.call(this,b);this.j=null;this.X=void 0!==a.shadow?a.shadow:250;this.aa=void 0;this.N=null;y(this,Ya($x),this.qm,this);this.Wj(a.gradient?a.gradient:ay);this.Qj(void 0!==a.blur?a.blur:15);this.qd(void 0!==a.radius?a.radius:8);y(this,Ya(by),this.Ag,this);y(this,Ya(cy),this.Ag,this);this.Ag();var c=a.weight?a.weight:"weight",d;"string"===typeof c?d=function(a){return a.get(c)}:d=c; this.f(function(a){a=d(a);a=void 0!==a?Mb(a,0,1):1;var b=255*a|0,c=this.N[b];c||(c=[new lj({image:new vl({opacity:a,src:this.aa})})],this.N[b]=c);return c}.bind(this));this.set(Gl,null);y(this,"render",this.Hm,this)}v(X,N);var ay=["#00f","#0ff","#0f0","#ff0","#f00"];k=X.prototype;k.$h=function(){return this.get(by)};k.fi=function(){return this.get($x)};k.aj=function(){return this.get(cy)}; k.qm=function(){for(var a=this.fi(),b=pd(1,256),c=b.createLinearGradient(0,0,1,256),d=1/(a.length-1),e=0,f=a.length;eTerms of Use'});hy.prototype.X=function(){return this.i};hy.prototype.$=function(){return this.o}; hy.prototype.la=function(a){if(200!=a.statusCode||"OK"!=a.statusDescription||"ValidCredentials"!=a.authenticationResultCode||1!=a.resourceSets.length||1!=a.resourceSets[0].resources.length)Ci(this,"error");else{var b=a.brandLogoUri;-1==b.indexOf("https")&&(b=b.replace("http","https"));var c=a.resourceSets[0].resources[0],d=-1==this.v?c.zoomMax:this.v;a=wi(this.c);var e=yi({extent:a,minZoom:c.zoomMin,maxZoom:d,tileSize:(c.imageWidth==c.imageHeight?c.imageWidth:[c.imageWidth,c.imageHeight])/this.vb()}); this.tileGrid=e;var f=this.N,g=this.B;this.tileUrlFunction=oi(c.imageUrlSubdomains.map(function(a){var b=[0,0,0],d=c.imageUrl.replace("{subdomain}",a).replace("{culture}",f);return function(a){if(a)return ki(a[0],a[1],-a[2]-1,b),a=d,g&&(a+="&dpi=d1&device=mobile"),a.replace("{quadkey}",li(b))}}));if(c.imageryProviders){var h=Kc(Lc("EPSG:4326"),this.c);a=c.imageryProviders.map(function(a){var b=a.attribution,c={};a.coverageAreas.forEach(function(a){var b=a.zoomMin,f=Math.min(a.zoomMax,d);a=a.bbox; a=Lb([a[1],a[0],a[3],a[2]],h);var g;for(g=b;g<=f;++g){var l=g.toString();b=af(e,a,g);l in c?c[l].push(b):c[l]=[b]}});return new zi({html:b,tileRanges:c})});a.push(iy);this.za(a)}this.C=b;Ci(this,"ready")}};function jy(a){a=a||{};var b=void 0!==a.projection?a.projection:"EPSG:3857",c=void 0!==a.tileGrid?a.tileGrid:yi({extent:wi(b),maxZoom:a.maxZoom,minZoom:a.minZoom,tileSize:a.tileSize});A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:a.opaque,projection:b,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:c,tileLoadFunction:a.tileLoadFunction,tilePixelRatio:a.tilePixelRatio,tileUrlFunction:a.tileUrlFunction,url:a.url,urls:a.urls, wrapX:void 0!==a.wrapX?a.wrapX:!0})}v(jy,A);function ky(a){this.v=a.account;this.B=a.map||"";this.i=a.config||{};this.o={};jy.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,maxZoom:void 0!==a.maxZoom?a.maxZoom:18,minZoom:a.minZoom,projection:a.projection,state:"loading",wrapX:a.wrapX});ly(this)}v(ky,jy);k=ky.prototype;k.wl=function(){return this.i};k.Hr=function(a){wa(this.i,a);ly(this)};k.hr=function(a){this.i=a||{};ly(this)}; function ly(a){var b=JSON.stringify(a.i);if(a.o[b])my(a,a.o[b]);else{var c="https://"+a.v+".cartodb.com/api/v1/map";a.B&&(c+="/named/"+a.B);var d=new XMLHttpRequest;d.addEventListener("load",a.sm.bind(a,b));d.addEventListener("error",a.rm.bind(a));d.open("POST",c);d.setRequestHeader("Content-type","application/json");d.send(JSON.stringify(a.i))}} k.sm=function(a,b){b=b.target;if(!b.status||200<=b.status&&300>b.status){try{var c=JSON.parse(b.responseText)}catch(d){Ci(this,"error");return}my(this,c);this.o[a]=c;Ci(this,"ready")}else Ci(this,"error")};k.rm=function(){Ci(this,"error")};function my(a,b){a.pb("https://"+b.cdn_url.https+"/"+a.v+"/api/v1/map/"+b.layergroupid+"/{z}/{x}/{y}.png")};function O(a){J.call(this,{attributions:a.attributions,extent:a.extent,logo:a.logo,projection:a.projection,wrapX:a.wrapX});this.N=void 0;this.B=void 0!==a.distance?a.distance:20;this.oa=!1;this.G=[];this.Va=a.geometryFunction||function(a){a=a.V();gb(a instanceof L,10);return a};this.v=a.source;this.v.H("change",O.prototype.ih,this)}v(O,J);k=O.prototype;k.Po=function(){return this.B};k.vc=function(){return this.v};k.re=function(a,b,c){this.v.re(a,b,c);b!==this.N&&(this.clear(),this.N=b,ny(this),this.yd(this.G))}; k.Qo=function(a){this.B=a;this.ih()};k.tr=function(a){(this.oa=a)||this.ih()};k.ih=function(){this.oa||(this.clear(),ny(this),this.yd(this.G),this.u())};function ny(a){if(void 0!==a.N){a.G.length=0;for(var b=ib(),c=a.B*a.N,d=a.v.Rc(),e={},f=0,g=d.length;fm*l?h*g/(m*p):l*g/(n*p),SETVIEWCENTERX:f[0],SETVIEWCENTERY:f[1]};wa(e,this.f);d=py(d,e);d=new Gw(a,b,c,this.j,d,this.X,this.i);y(d,"change",this.l,this)}else d=null;this.O=d;this.G=this.g;return d};k.Xo=function(){return this.i};k.$o=function(a){wa(this.f,a);this.u()};k.Zo=function(a){this.O=null;this.i=a;this.u()};function sy(a){var b=a.imageExtent,c=void 0!==a.crossOrigin?a.crossOrigin:null,d=void 0!==a.imageLoadFunction?a.imageLoadFunction:Jk;Dk.call(this,{attributions:a.attributions,logo:a.logo,projection:Lc(a.projection)});this.O=new Gw(b,void 0,1,this.j,a.url,c,d);this.i=a.imageSize?a.imageSize:null;y(this.O,"change",this.l,this)}v(sy,Dk);sy.prototype.ad=function(a){return Jb(a,this.O.D())?this.O:null}; sy.prototype.l=function(a){if(2==this.O.getState()){var b=this.O.D(),c=this.O.W();if(this.i){var d=this.i[0];var e=this.i[1]}else d=c.width,e=c.height;b=Math.ceil(Eb(b)/(Fb(b)/e));if(b!=d){b=pd(b,e);var f=b.canvas;b.drawImage(c,0,0,d,e,0,0,f.width,f.height);this.O.sh(f)}}Dk.prototype.l.call(this,a)};function ty(a){a=a||{};Dk.call(this,{attributions:a.attributions,logo:a.logo,projection:a.projection,resolutions:a.resolutions});this.oa=void 0!==a.crossOrigin?a.crossOrigin:null;this.f=a.url;this.B=void 0!==a.imageLoadFunction?a.imageLoadFunction:Jk;this.i=a.params||{};this.s=!0;uy(this);this.$=a.serverType;this.wa=void 0!==a.hidpi?a.hidpi:!0;this.O=null;this.G=[0,0];this.X=0;this.N=void 0!==a.ratio?a.ratio:1.5}v(ty,Dk);var vy=[101,101];k=ty.prototype; k.fp=function(a,b,c,d){if(void 0!==this.f){var e=Hb(a,b,0,vy),f={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.i.LAYERS};wa(f,this.i,d);d=Math.floor((e[3]-a[1])/b);f[this.s?"I":"X"]=Math.floor((a[0]-e[0])/b);f[this.s?"J":"Y"]=d;return wy(this,e,vy,1,Lc(c),f)}};k.hp=function(){return this.i}; k.ad=function(a,b,c,d){if(void 0===this.f)return null;b=Ek(this,b);1==c||this.wa&&void 0!==this.$||(c=1);var e=b/c,f=Gb(a),g=Hb(f,e,0,[Math.ceil(Eb(a)/e),Math.ceil(Fb(a)/e)]);a=Hb(f,e,0,[Math.ceil(this.N*Eb(a)/e),Math.ceil(this.N*Fb(a)/e)]);if((f=this.O)&&this.X==this.g&&f.resolution==b&&f.a==c&&pb(f.D(),g))return f;g={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};wa(g,this.i);this.G[0]=Math.round(Eb(a)/e);this.G[1]=Math.round(Fb(a)/e);d=wy(this,a,this.G,c,d,g); this.O=new Gw(a,b,c,this.j,d,this.oa,this.B);this.X=this.g;y(this.O,"change",this.l,this);return this.O};k.gp=function(){return this.B}; function wy(a,b,c,d,e,f){gb(void 0!==a.f,9);f[a.s?"CRS":"SRS"]=e.tb;"STYLES"in a.i||(f.STYLES="");if(1!=d)switch(a.$){case "geoserver":d=90*d+.5|0;f.FORMAT_OPTIONS="FORMAT_OPTIONS"in f?f.FORMAT_OPTIONS+(";dpi:"+d):"dpi:"+d;break;case "mapserver":f.MAP_RESOLUTION=90*d;break;case "carmentaserver":case "qgis":f.DPI=90*d;break;default:gb(!1,8)}f.WIDTH=c[0];f.HEIGHT=c[1];c=e.b;var g;a.s&&"ne"==c.substr(0,2)?g=[b[1],b[0],b[3],b[2]]:g=b;f.BBOX=g.join(",");return py(a.f,f)}k.ip=function(){return this.f}; k.jp=function(a){this.O=null;this.B=a;this.u()};k.kp=function(a){a!=this.f&&(this.f=a,this.O=null,this.u())};k.lp=function(a){wa(this.i,a);uy(this);this.O=null;this.u()};function uy(a){a.s=0<=td(a.i.VERSION||"1.3.0")};function xy(a){a=a||{};var b;void 0!==a.attributions?b=a.attributions:b=[yy];jy.call(this,{attributions:b,cacheSize:a.cacheSize,crossOrigin:void 0!==a.crossOrigin?a.crossOrigin:"anonymous",opaque:void 0!==a.opaque?a.opaque:!0,maxZoom:void 0!==a.maxZoom?a.maxZoom:19,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileLoadFunction:a.tileLoadFunction,url:void 0!==a.url?a.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",wrapX:a.wrapX})}v(xy,jy);var yy=new zi({html:'© OpenStreetMap contributors.'});(function(){var a={},b={na:a};(function(c){if("object"===typeof a&&"undefined"!==typeof b)b.na=c();else{var d;"undefined"!==typeof window?d=window:"undefined"!==typeof global?d=global:"undefined"!==typeof self?d=self:d=this;d.es=c()}})(function(){return function g(a,b,f){function d(h,l){if(!b[h]){if(!a[h]){var m="function"==typeof require&&require;if(!l&&m)return m(h,!0);if(e)return e(h,!0);l=Error("Cannot find module '"+h+"'");throw l.code="MODULE_NOT_FOUND",l;}l=b[h]={na:{}};a[h][0].call(l.na,function(b){var e= a[h][1][b];return d(e?e:b)},l,l.na,g,a,b,f)}return b[h].na}for(var e="function"==typeof require&&require,m=0;mthis.Ok;)this.Xd.shift().callback(null,null)};l.prototype.Ih=function(){if(0===this.Me&& 0Stamen Design, under CC BY 3.0.'}),yy],Iy={terrain:{Mb:"jpg",opaque:!0},"terrain-background":{Mb:"jpg",opaque:!0},"terrain-labels":{Mb:"png",opaque:!1},"terrain-lines":{Mb:"png",opaque:!1},"toner-background":{Mb:"png",opaque:!0},toner:{Mb:"png",opaque:!0},"toner-hybrid":{Mb:"png",opaque:!1},"toner-labels":{Mb:"png",opaque:!1},"toner-lines":{Mb:"png",opaque:!1},"toner-lite":{Mb:"png", opaque:!0},watercolor:{Mb:"jpg",opaque:!0}},Hy={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function Ky(a){a=a||{};A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.i=a.params||{};this.o=ib();Ei(this,Ly(this))}v(Ky,A);function Ly(a){var b=0,c=[],d;for(d in a.i)c[b++]=d+"-"+a.i[d];return c.join("/")}Ky.prototype.v=function(){return this.i}; Ky.prototype.vb=function(a){return a}; Ky.prototype.Yc=function(a,b,c){var d=this.tileGrid;d||(d=this.Ob(c));if(!(d.b.length<=a[0])){var e=d.Ya(a,this.o),f=mf(d.gb(a[0]),this.l);1!=b&&(f=Uh(f,b,this.l));d={F:"image",FORMAT:"PNG32",TRANSPARENT:!0};wa(d,this.i);var g=this.urls;g?(c=c.tb.split(":").pop(),d.SIZE=f[0]+","+f[1],d.BBOX=e.join(","),d.BBOXSR=c,d.IMAGESR=c,d.DPI=Math.round(d.DPI?d.DPI*b:90*b),a=(1==g.length?g[0]:g[Sb((a[1]<a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.wf();return}this.lj(b)}else this.wf()};k.mp=function(){this.wf()};k.dm=function(){return this.i}; k.lj=function(a){var b=Lc("EPSG:4326"),c=this.c;if(void 0!==a.bounds){var d=Kc(b,c);var e=Lb(a.bounds,d)}var f=a.minzoom||0;d=a.maxzoom||22;this.tileGrid=c=yi({extent:wi(c),maxZoom:d,minZoom:f});this.tileUrlFunction=ni(a.tiles,c);if(void 0!==a.attribution&&!this.j){b=void 0!==e?e:b.D();e={};for(var g;f<=d;++f)g=f.toString(),e[g]=[af(c,b,f)];this.za([new zi({html:a.attribution,tileRanges:e})])}this.i=a;Ci(this,"ready")};k.wf=function(){Ci(this,"error")};function Py(a){Di.call(this,{projection:Lc("EPSG:3857"),state:"loading"});this.s=void 0!==a.preemptive?a.preemptive:!0;this.o=pi;this.f=void 0;this.i=a.jsonp||!1;if(a.url)if(this.i)gy(a.url,this.Qg.bind(this),this.xf.bind(this));else{var b=new XMLHttpRequest;b.addEventListener("load",this.rp.bind(this));b.addEventListener("error",this.qp.bind(this));b.open("GET",a.url);b.send()}else a.tileJSON?this.Qg(a.tileJSON):gb(!1,51)}v(Py,Di);k=Py.prototype; k.rp=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.xf();return}this.Qg(b)}else this.xf()};k.qp=function(){this.xf()};k.am=function(){return this.f};k.jl=function(a,b,c,d,e){this.tileGrid?(b=this.tileGrid.$e(a,b),Qy(this.cd(b[0],b[1],b[2],1,this.c),a,c,d,e)):!0===e?setTimeout(function(){c.call(d,null)},0):c.call(d,null)};k.xf=function(){Ci(this,"error")}; k.Qg=function(a){var b=Lc("EPSG:4326"),c=this.c;if(void 0!==a.bounds){var d=Kc(b,c);var e=Lb(a.bounds,d)}var f=a.minzoom||0;d=a.maxzoom||22;this.tileGrid=c=yi({extent:wi(c),maxZoom:d,minZoom:f});this.f=a.template;var g=a.grids;if(g){this.o=ni(g,c);if(void 0!==a.attribution){b=void 0!==e?e:b.D();for(e={};f<=d;++f)g=f.toString(),e[g]=[af(c,b,f)];this.za([new zi({html:a.attribution,tileRanges:e})])}Ci(this,"ready")}else Ci(this,"error")}; k.cd=function(a,b,c,d,e){var f=this.cc(a,b,c);if(this.a.b.hasOwnProperty(f))return this.a.get(f);a=[a,b,c];b=Fi(this,a,e);d=this.o(b,d,e);d=new Ry(a,void 0!==d?0:4,void 0!==d?d:"",this.tileGrid.Ya(a),this.s,this.i);this.a.set(f,d);return d};k.zh=function(a,b,c){a=this.cc(a,b,c);this.a.b.hasOwnProperty(a)&&this.a.get(a)};function Ry(a,b,c,d,e,f){Yh.call(this,a,b);this.o=c;this.g=d;this.I=e;this.c=this.l=this.f=null;this.s=f}v(Ry,Yh);k=Ry.prototype;k.W=function(){return null}; k.getData=function(a){if(!this.f||!this.l)return null;var b=this.f[Math.floor((1-(a[1]-this.g[1])/(this.g[3]-this.g[1]))*this.f.length)];if("string"!==typeof b)return null;b=b.charCodeAt(Math.floor((a[0]-this.g[0])/(this.g[2]-this.g[0])*b.length));93<=b&&b--;35<=b&&b--;b-=32;a=null;b in this.l&&(b=this.l[b],this.c&&b in this.c?a=this.c[b]:a=b);return a}; function Qy(a,b,c,d,e){0==a.state&&!0===e?(Ia(a,"change",function(){c.call(d,this.getData(b))},a),Sy(a)):!0===e?setTimeout(function(){c.call(d,this.getData(b))}.bind(a),0):c.call(d,a.getData(b))}k.ob=function(){return this.o};k.bf=function(){this.state=3;this.u()};k.mj=function(a){this.f=a.grid;this.l=a.keys;this.c=a.data;this.state=4;this.u()}; function Sy(a){if(0==a.state)if(a.state=1,a.s)gy(a.o,a.mj.bind(a),a.bf.bind(a));else{var b=new XMLHttpRequest;b.addEventListener("load",a.pp.bind(a));b.addEventListener("error",a.op.bind(a));b.open("GET",a.o);b.send()}}k.pp=function(a){a=a.target;if(!a.status||200<=a.status&&300>a.status){try{var b=JSON.parse(a.responseText)}catch(c){this.bf();return}this.mj(b)}else this.bf()};k.op=function(){this.bf()};k.load=function(){this.I&&Sy(this)};function Ty(a){a=a||{};var b=a.params||{};A.call(this,{attributions:a.attributions,cacheSize:a.cacheSize,crossOrigin:a.crossOrigin,logo:a.logo,opaque:!("TRANSPARENT"in b?b.TRANSPARENT:1),projection:a.projection,reprojectionErrorThreshold:a.reprojectionErrorThreshold,tileGrid:a.tileGrid,tileLoadFunction:a.tileLoadFunction,url:a.url,urls:a.urls,wrapX:void 0!==a.wrapX?a.wrapX:!0});this.v=void 0!==a.gutter?a.gutter:0;this.i=b;this.o=!0;this.B=a.serverType;this.X=void 0!==a.hidpi?a.hidpi:!0;this.N=""; Uy(this);this.$=ib();Vy(this);Ei(this,Wy(this))}v(Ty,A);k=Ty.prototype; k.sp=function(a,b,c,d){c=Lc(c);var e=this.tileGrid;e||(e=this.Ob(c));b=e.$e(a,b);if(!(e.b.length<=b[0])){var f=e.Ra(b[0]),g=e.Ya(b,this.$);e=mf(e.gb(b[0]),this.l);var h=this.v;0!==h&&(e=Th(e,h,this.l),g=kb(g,f*h,g));h={SERVICE:"WMS",VERSION:"1.3.0",REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.i.LAYERS};wa(h,this.i,d);d=Math.floor((g[3]-a[1])/f);h[this.o?"I":"X"]=Math.floor((a[0]-g[0])/f);h[this.o?"J":"Y"]=d;return Xy(this,b,e,g,1,c,h)}};k.tg=function(){return this.v}; k.cc=function(a,b,c){return this.N+A.prototype.cc.call(this,a,b,c)};k.tp=function(){return this.i}; function Xy(a,b,c,d,e,f,g){var h=a.urls;if(h){g.WIDTH=c[0];g.HEIGHT=c[1];g[a.o?"CRS":"SRS"]=f.tb;"STYLES"in a.i||(g.STYLES="");if(1!=e)switch(a.B){case "geoserver":c=90*e+.5|0;g.FORMAT_OPTIONS="FORMAT_OPTIONS"in g?g.FORMAT_OPTIONS+(";dpi:"+c):"dpi:"+c;break;case "mapserver":g.MAP_RESOLUTION=90*e;break;case "carmentaserver":case "qgis":g.DPI=90*e;break;default:gb(!1,52)}f=f.b;a.o&&"ne"==f.substr(0,2)&&(a=d[0],d[0]=d[1],d[1]=a,a=d[2],d[2]=d[3],d[3]=a);g.BBOX=d.join(",");return py(1==h.length?h[0]:h[Sb((b[1]<< b[0])+b[2],h.length)],g)}}k.vb=function(a){return this.X&&void 0!==this.B?a:1};function Uy(a){var b=0,c=[];if(a.urls){var d;var e=0;for(d=a.urls.length;ef||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),f+=f;break;case fz:for(;c>f||d>f;)e.push([Math.ceil(c/f),Math.ceil(d/f)]),c>>=1,d>>=1;break;default:gb(!1,53)}e.push([1,1]);e.reverse();f=[1];var g=[0];d=1;for(c=e.length;d=b+this.b&&h.height>=c+this.b)return f={offsetX:h.x+this.b,offsetY:h.y+this.b,image:this.i},this.c[a]=f,d.call(e,this.g,h.x+this.b,h.y+this.b),a=g,b+=this.b,d=c+this.b,h.width-b>h.height-d?(c={x:h.x+b,y:h.y,width:h.width-b,height:h.height},b={x:h.x,y:h.y+d,width:b,height:h.height-d},iz(this,a,c,b)):(c={x:h.x+b,y:h.y,width:h.width-b,height:d},b={x:h.x,y:h.y+d,width:h.width,height:h.height-d}, iz(this,a,c,b)),f}return null};function iz(a,b,c,d){b=[b,1];0this.g||c+this.b>this.g)return null;d=kz(this,!1,a,b,c,d,f);if(!d)return null;a=kz(this,!0,a,b,c,void 0!==e?e:ua,f);return{offsetX:d.offsetX,offsetY:d.offsetY,image:d.image,Pm:a.image}}; function kz(a,b,c,d,e,f,g){var h=b?a.f:a.i,l;var m=0;for(l=h.length;ma?am(2*a):1-am(2*(a-.5))}); r("ol.extent.boundingExtent",hb);r("ol.extent.buffer",kb);r("ol.extent.containsCoordinate",nb);r("ol.extent.containsExtent",pb);r("ol.extent.containsXY",ob);r("ol.extent.createEmpty",ib);r("ol.extent.equals",vb);r("ol.extent.extend",wb);r("ol.extent.getBottomLeft",yb);r("ol.extent.getBottomRight",zb);r("ol.extent.getCenter",Gb);r("ol.extent.getHeight",Fb);r("ol.extent.getIntersection",Ib);r("ol.extent.getSize",function(a){return[a[2]-a[0],a[3]-a[1]]});r("ol.extent.getTopLeft",Bb); r("ol.extent.getTopRight",Ab);r("ol.extent.getWidth",Eb);r("ol.extent.intersects",Jb);r("ol.extent.isEmpty",Db);r("ol.extent.applyTransform",Lb);r("ol.Feature",E);E.prototype.clone=E.prototype.clone;E.prototype.getGeometry=E.prototype.V;E.prototype.getId=E.prototype.pn;E.prototype.getGeometryName=E.prototype.Fl;E.prototype.getStyle=E.prototype.qn;E.prototype.getStyleFunction=E.prototype.Nc;E.prototype.setGeometry=E.prototype.Wa;E.prototype.setStyle=E.prototype.Ig;E.prototype.setId=E.prototype.xc; E.prototype.setGeometryName=E.prototype.pd;r("ol.featureloader.xhr",Oj);r("ol.Geolocation",vw);vw.prototype.getAccuracy=vw.prototype.nl;vw.prototype.getAccuracyGeometry=vw.prototype.ol;vw.prototype.getAltitude=vw.prototype.rn;vw.prototype.getAltitudeAccuracy=vw.prototype.ql;vw.prototype.getHeading=vw.prototype.sn;vw.prototype.getPosition=vw.prototype.tn;vw.prototype.getProjection=vw.prototype.yi;vw.prototype.getSpeed=vw.prototype.$l;vw.prototype.getTracking=vw.prototype.zi; vw.prototype.getTrackingOptions=vw.prototype.ji;vw.prototype.setProjection=vw.prototype.Ai;vw.prototype.setTracking=vw.prototype.lf;vw.prototype.setTrackingOptions=vw.prototype.dk;r("ol.Graticule",Bw);Bw.prototype.getMap=Bw.prototype.xn;Bw.prototype.getMeridians=Bw.prototype.Pl;Bw.prototype.getParallels=Bw.prototype.Xl;Bw.prototype.setMap=Bw.prototype.setMap;r("ol.has.DEVICE_PIXEL_RATIO",he);r("ol.has.CANVAS",je);r("ol.has.DEVICE_ORIENTATION",ke);r("ol.has.GEOLOCATION",le);r("ol.has.TOUCH",me); r("ol.has.WEBGL",be);Gw.prototype.getImage=Gw.prototype.W;Gw.prototype.load=Gw.prototype.load;Zh.prototype.getImage=Zh.prototype.W;r("ol.inherits",v);r("ol.interaction.defaults",yo);r("ol.Kinetic",tn);r("ol.loadingstrategy.all",Pj);r("ol.loadingstrategy.bbox",function(a){return[a]});r("ol.loadingstrategy.tile",function(a){return function(b,c){c=a.dd(c);b=af(a,b,c);var d=[];c=[c,0,0];for(c[1]=b.ga;c[1]<=b.da;++c[1])for(c[2]=b.ha;c[2]<=b.ka;++c[2])d.push(a.Ya(c));return d}});r("ol.Map",Q); Q.prototype.addControl=Q.prototype.Uk;Q.prototype.addInteraction=Q.prototype.Vk;Q.prototype.addLayer=Q.prototype.Nh;Q.prototype.addOverlay=Q.prototype.Oh;Q.prototype.forEachFeatureAtPixel=Q.prototype.Ve;Q.prototype.forEachLayerAtPixel=Q.prototype.Dn;Q.prototype.hasFeatureAtPixel=Q.prototype.Om;Q.prototype.getEventCoordinate=Q.prototype.pg;Q.prototype.getEventPixel=Q.prototype.Xe;Q.prototype.getTarget=Q.prototype.yg;Q.prototype.getTargetElement=Q.prototype.Jc;Q.prototype.getCoordinateFromPixel=Q.prototype.ab; Q.prototype.getControls=Q.prototype.xl;Q.prototype.getOverlays=Q.prototype.Vl;Q.prototype.getOverlayById=Q.prototype.Ul;Q.prototype.getInteractions=Q.prototype.Gl;Q.prototype.getLayerGroup=Q.prototype.Nb;Q.prototype.getLayers=Q.prototype.Bi;Q.prototype.getPixelFromCoordinate=Q.prototype.Pa;Q.prototype.getSize=Q.prototype.Rb;Q.prototype.getView=Q.prototype.Z;Q.prototype.getViewport=Q.prototype.hm;Q.prototype.renderSync=Q.prototype.dr;Q.prototype.render=Q.prototype.render; Q.prototype.removeControl=Q.prototype.Xq;Q.prototype.removeInteraction=Q.prototype.Yq;Q.prototype.removeLayer=Q.prototype.$q;Q.prototype.removeOverlay=Q.prototype.ar;Q.prototype.setLayerGroup=Q.prototype.Xj;Q.prototype.setSize=Q.prototype.th;Q.prototype.setTarget=Q.prototype.mf;Q.prototype.setView=Q.prototype.En;Q.prototype.updateSize=Q.prototype.Ud;qm.prototype.originalEvent=qm.prototype.originalEvent;qm.prototype.pixel=qm.prototype.pixel;qm.prototype.coordinate=qm.prototype.coordinate; qm.prototype.dragging=qm.prototype.dragging;pm.prototype.map=pm.prototype.map;pm.prototype.frameState=pm.prototype.frameState;r("ol.Object",Wa);Wa.prototype.get=Wa.prototype.get;Wa.prototype.getKeys=Wa.prototype.P;Wa.prototype.getProperties=Wa.prototype.L;Wa.prototype.set=Wa.prototype.set;Wa.prototype.setProperties=Wa.prototype.J;Wa.prototype.unset=Wa.prototype.S;ab.prototype.key=ab.prototype.key;ab.prototype.oldValue=ab.prototype.oldValue;r("ol.Observable",Sa);r("ol.Observable.unByKey",Ta); Sa.prototype.changed=Sa.prototype.u;Sa.prototype.dispatchEvent=Sa.prototype.b;Sa.prototype.getRevision=Sa.prototype.M;Sa.prototype.on=Sa.prototype.H;Sa.prototype.once=Sa.prototype.once;Sa.prototype.un=Sa.prototype.K;r("ol.Overlay",Oo);Oo.prototype.getElement=Oo.prototype.ke;Oo.prototype.getId=Oo.prototype.Fn;Oo.prototype.getMap=Oo.prototype.nf;Oo.prototype.getOffset=Oo.prototype.gi;Oo.prototype.getPosition=Oo.prototype.Ci;Oo.prototype.getPositioning=Oo.prototype.hi;Oo.prototype.setElement=Oo.prototype.Sj; Oo.prototype.setMap=Oo.prototype.setMap;Oo.prototype.setOffset=Oo.prototype.Zj;Oo.prototype.setPosition=Oo.prototype.pf;Oo.prototype.setPositioning=Oo.prototype.bk;r("ol.proj.METERS_PER_UNIT",pc);r("ol.proj.setProj4",function(a){rc=a});r("ol.proj.getPointResolution",Jc);r("ol.proj.addEquivalentProjections",Mc);r("ol.proj.addProjection",Qc);r("ol.proj.addCoordinateTransforms",Sc);r("ol.proj.fromLonLat",function(a,b){return Xc(a,"EPSG:4326",void 0!==b?b:"EPSG:3857")}); r("ol.proj.toLonLat",function(a,b){return Xc(a,void 0!==b?b:"EPSG:3857","EPSG:4326")});r("ol.proj.get",Lc);r("ol.proj.equivalent",Uc);r("ol.proj.getTransform",Vc);r("ol.proj.transform",Xc);r("ol.proj.transformExtent",Yc);r("ol.render.toContext",function(a,b){var c=a.canvas,d=b?b:{};b=d.pixelRatio||he;if(d=d.size)c.width=d[0]*b,c.height=d[1]*b,c.style.width=d[0]+"px",c.style.height=d[1]+"px";c=[0,0,c.width,c.height];d=Ce(ve(),b,b);return new Ge(a,b,c,d,0)});r("ol.size.toSize",mf);r("ol.Sphere",hc); hc.prototype.geodesicArea=hc.prototype.a;hc.prototype.haversineDistance=hc.prototype.b;r("ol.Sphere.getLength",lc);r("ol.Sphere.getArea",nc);Yh.prototype.getTileCoord=Yh.prototype.i;Yh.prototype.load=Yh.prototype.load;r("ol.tilegrid.createXYZ",yi);Yy.prototype.getFormat=Yy.prototype.Gn;Yy.prototype.setFeatures=Yy.prototype.Tj;Yy.prototype.setProjection=Yy.prototype.Jg;Yy.prototype.setLoader=Yy.prototype.Yj;r("ol.View",P);P.prototype.animate=P.prototype.animate;P.prototype.getAnimating=P.prototype.$c; P.prototype.cancelAnimations=P.prototype.Ad;P.prototype.constrainCenter=P.prototype.Xc;P.prototype.constrainResolution=P.prototype.constrainResolution;P.prototype.constrainRotation=P.prototype.constrainRotation;P.prototype.getCenter=P.prototype.va;P.prototype.calculateExtent=P.prototype.zd;P.prototype.getMaxResolution=P.prototype.Hn;P.prototype.getMinResolution=P.prototype.Jn;P.prototype.getMaxZoom=P.prototype.In;P.prototype.setMaxZoom=P.prototype.qr;P.prototype.getMinZoom=P.prototype.Kn; P.prototype.setMinZoom=P.prototype.rr;P.prototype.getProjection=P.prototype.Ln;P.prototype.getResolution=P.prototype.Ia;P.prototype.getResolutions=P.prototype.Mn;P.prototype.getRotation=P.prototype.Qa;P.prototype.getZoom=P.prototype.ki;P.prototype.getZoomForResolution=P.prototype.af;P.prototype.fit=P.prototype.ng;P.prototype.centerOn=P.prototype.cl;P.prototype.rotate=P.prototype.rotate;P.prototype.setCenter=P.prototype.cb;P.prototype.setResolution=P.prototype.Uc;P.prototype.setRotation=P.prototype.gd; P.prototype.setZoom=P.prototype.Ar;r("ol.xml.getAllTextContent",xj);r("ol.xml.parse",Bj);Wf.prototype.getGL=Wf.prototype.Ip;Wf.prototype.useProgram=Wf.prototype.ld;r("ol.tilegrid.TileGrid",ri);ri.prototype.forEachTileCoord=ri.prototype.Zh;ri.prototype.getMaxZoom=ri.prototype.wj;ri.prototype.getMinZoom=ri.prototype.xj;ri.prototype.getOrigin=ri.prototype.kd;ri.prototype.getResolution=ri.prototype.Ra;ri.prototype.getResolutions=ri.prototype.yj;ri.prototype.getTileCoordExtent=ri.prototype.Ya; ri.prototype.getTileCoordForCoordAndResolution=ri.prototype.$e;ri.prototype.getTileCoordForCoordAndZ=ri.prototype.zg;ri.prototype.getTileSize=ri.prototype.gb;ri.prototype.getZForResolution=ri.prototype.dd;r("ol.tilegrid.WMTS",az);az.prototype.getMatrixIds=az.prototype.o;r("ol.tilegrid.WMTS.createFromCapabilitiesMatrixSet",bz);r("ol.style.AtlasManager",jz);r("ol.style.Circle",jj);jj.prototype.setRadius=jj.prototype.qd;r("ol.style.Fill",kj);kj.prototype.clone=kj.prototype.clone; kj.prototype.getColor=kj.prototype.g;kj.prototype.setColor=kj.prototype.c;r("ol.style.Icon",vl);vl.prototype.clone=vl.prototype.clone;vl.prototype.getAnchor=vl.prototype.Gc;vl.prototype.getColor=vl.prototype.zp;vl.prototype.getImage=vl.prototype.W;vl.prototype.getOrigin=vl.prototype.jd;vl.prototype.getSrc=vl.prototype.Ap;vl.prototype.getSize=vl.prototype.gc;vl.prototype.load=vl.prototype.load;r("ol.style.Image",gj);gj.prototype.getOpacity=gj.prototype.La;gj.prototype.getRotateWithView=gj.prototype.zf; gj.prototype.getRotation=gj.prototype.Af;gj.prototype.getScale=gj.prototype.Ma;gj.prototype.getSnapToPixel=gj.prototype.Ze;gj.prototype.setOpacity=gj.prototype.Ld;gj.prototype.setRotation=gj.prototype.Bf;gj.prototype.setScale=gj.prototype.Md;r("ol.style.RegularShape",hj);hj.prototype.clone=hj.prototype.clone;hj.prototype.getAnchor=hj.prototype.Gc;hj.prototype.getAngle=hj.prototype.sj;hj.prototype.getFill=hj.prototype.qa;hj.prototype.getImage=hj.prototype.W;hj.prototype.getOrigin=hj.prototype.jd; hj.prototype.getPoints=hj.prototype.tj;hj.prototype.getRadius=hj.prototype.uj;hj.prototype.getRadius2=hj.prototype.ii;hj.prototype.getSize=hj.prototype.gc;hj.prototype.getStroke=hj.prototype.pa;r("ol.style.Stroke",Og);Og.prototype.clone=Og.prototype.clone;Og.prototype.getColor=Og.prototype.Bp;Og.prototype.getLineCap=Og.prototype.Jl;Og.prototype.getLineDash=Og.prototype.Cp;Og.prototype.getLineDashOffset=Og.prototype.Kl;Og.prototype.getLineJoin=Og.prototype.Ll;Og.prototype.getMiterLimit=Og.prototype.Ql; Og.prototype.getWidth=Og.prototype.Dp;Og.prototype.setColor=Og.prototype.Ep;Og.prototype.setLineCap=Og.prototype.mr;Og.prototype.setLineDash=Og.prototype.setLineDash;Og.prototype.setLineDashOffset=Og.prototype.nr;Og.prototype.setLineJoin=Og.prototype.pr;Og.prototype.setMiterLimit=Og.prototype.sr;Og.prototype.setWidth=Og.prototype.yr;r("ol.style.Style",lj);lj.prototype.clone=lj.prototype.clone;lj.prototype.getGeometry=lj.prototype.V;lj.prototype.getGeometryFunction=lj.prototype.El; lj.prototype.getFill=lj.prototype.qa;lj.prototype.setFill=lj.prototype.Kf;lj.prototype.getImage=lj.prototype.W;lj.prototype.setImage=lj.prototype.sh;lj.prototype.getStroke=lj.prototype.pa;lj.prototype.setStroke=lj.prototype.Lf;lj.prototype.getText=lj.prototype.ra;lj.prototype.setText=lj.prototype.Mf;lj.prototype.getZIndex=lj.prototype.Da;lj.prototype.setGeometry=lj.prototype.Wa;lj.prototype.setZIndex=lj.prototype.jc;r("ol.style.Text",Pr);Pr.prototype.clone=Pr.prototype.clone; Pr.prototype.getFont=Pr.prototype.Cl;Pr.prototype.getOffsetX=Pr.prototype.Rl;Pr.prototype.getOffsetY=Pr.prototype.Sl;Pr.prototype.getFill=Pr.prototype.qa;Pr.prototype.getRotateWithView=Pr.prototype.Fp;Pr.prototype.getRotation=Pr.prototype.Gp;Pr.prototype.getScale=Pr.prototype.Ma;Pr.prototype.getStroke=Pr.prototype.pa;Pr.prototype.getText=Pr.prototype.ra;Pr.prototype.getTextAlign=Pr.prototype.bm;Pr.prototype.getTextBaseline=Pr.prototype.cm;Pr.prototype.setFont=Pr.prototype.Uj; Pr.prototype.setOffsetX=Pr.prototype.$j;Pr.prototype.setOffsetY=Pr.prototype.ak;Pr.prototype.setFill=Pr.prototype.Kf;Pr.prototype.setRotation=Pr.prototype.Hp;Pr.prototype.setScale=Pr.prototype.vj;Pr.prototype.setStroke=Pr.prototype.Lf;Pr.prototype.setText=Pr.prototype.Mf;Pr.prototype.setTextAlign=Pr.prototype.ck;Pr.prototype.setTextBaseline=Pr.prototype.wr;r("ol.source.BingMaps",hy);r("ol.source.BingMaps.TOS_ATTRIBUTION",iy);hy.prototype.getApiKey=hy.prototype.X;hy.prototype.getImagerySet=hy.prototype.$; r("ol.source.CartoDB",ky);ky.prototype.getConfig=ky.prototype.wl;ky.prototype.updateConfig=ky.prototype.Hr;ky.prototype.setConfig=ky.prototype.hr;r("ol.source.Cluster",O);O.prototype.getDistance=O.prototype.Po;O.prototype.getSource=O.prototype.vc;O.prototype.setDistance=O.prototype.Qo;O.prototype.setPause=O.prototype.tr;r("ol.source.Image",Dk);Fk.prototype.image=Fk.prototype.image;r("ol.source.ImageArcGISRest",qy);qy.prototype.getParams=qy.prototype.So;qy.prototype.getImageLoadFunction=qy.prototype.Ro; qy.prototype.getUrl=qy.prototype.To;qy.prototype.setImageLoadFunction=qy.prototype.Uo;qy.prototype.setUrl=qy.prototype.Vo;qy.prototype.updateParams=qy.prototype.Wo;r("ol.source.ImageCanvas",Kk);r("ol.source.ImageMapGuide",ry);ry.prototype.getParams=ry.prototype.Yo;ry.prototype.getImageLoadFunction=ry.prototype.Xo;ry.prototype.updateParams=ry.prototype.$o;ry.prototype.setImageLoadFunction=ry.prototype.Zo;r("ol.source.ImageStatic",sy);r("ol.source.ImageVector",Lk);Lk.prototype.getSource=Lk.prototype.vc; Lk.prototype.getStyle=Lk.prototype.ap;Lk.prototype.getStyleFunction=Lk.prototype.bp;Lk.prototype.setStyle=Lk.prototype.kj;r("ol.source.ImageWMS",ty);ty.prototype.getGetFeatureInfoUrl=ty.prototype.fp;ty.prototype.getParams=ty.prototype.hp;ty.prototype.getImageLoadFunction=ty.prototype.gp;ty.prototype.getUrl=ty.prototype.ip;ty.prototype.setImageLoadFunction=ty.prototype.jp;ty.prototype.setUrl=ty.prototype.kp;ty.prototype.updateParams=ty.prototype.lp;r("ol.source.OSM",xy); r("ol.source.OSM.ATTRIBUTION",yy);r("ol.source.Raster",zy);zy.prototype.setOperation=zy.prototype.B;Dy.prototype.extent=Dy.prototype.extent;Dy.prototype.resolution=Dy.prototype.resolution;Dy.prototype.data=Dy.prototype.data;r("ol.source.Source",Ai);Ai.prototype.getAttributions=Ai.prototype.Ea;Ai.prototype.getLogo=Ai.prototype.Ca;Ai.prototype.getProjection=Ai.prototype.Fa;Ai.prototype.getState=Ai.prototype.getState;Ai.prototype.refresh=Ai.prototype.Aa;Ai.prototype.setAttributions=Ai.prototype.za; r("ol.source.Stamen",Gy);r("ol.source.Tile",Di);Di.prototype.getTileGrid=Di.prototype.fb;Gi.prototype.tile=Gi.prototype.tile;r("ol.source.TileArcGISRest",Ky);Ky.prototype.getParams=Ky.prototype.v;Ky.prototype.updateParams=Ky.prototype.B;r("ol.source.TileDebug",My);r("ol.source.TileImage",A);A.prototype.setRenderReprojectionEdges=A.prototype.Ub;A.prototype.setTileGridForProjection=A.prototype.Vb;r("ol.source.TileJSON",Oy);Oy.prototype.getTileJSON=Oy.prototype.dm;r("ol.source.TileUTFGrid",Py); Py.prototype.getTemplate=Py.prototype.am;Py.prototype.forDataAtCoordinateAndResolution=Py.prototype.jl;r("ol.source.TileWMS",Ty);Ty.prototype.getGetFeatureInfoUrl=Ty.prototype.sp;Ty.prototype.getParams=Ty.prototype.tp;Ty.prototype.updateParams=Ty.prototype.vp;Hi.prototype.getTileLoadFunction=Hi.prototype.ub;Hi.prototype.getTileUrlFunction=Hi.prototype.wb;Hi.prototype.getUrls=Hi.prototype.xb;Hi.prototype.setTileLoadFunction=Hi.prototype.Bb;Hi.prototype.setTileUrlFunction=Hi.prototype.ib; Hi.prototype.setUrl=Hi.prototype.pb;Hi.prototype.setUrls=Hi.prototype.jb;r("ol.source.Vector",J);J.prototype.addFeature=J.prototype.Eb;J.prototype.addFeatures=J.prototype.yd;J.prototype.clear=J.prototype.clear;J.prototype.forEachFeature=J.prototype.Xh;J.prototype.forEachFeatureInExtent=J.prototype.oc;J.prototype.forEachFeatureIntersectingExtent=J.prototype.Yh;J.prototype.getFeaturesCollection=J.prototype.ei;J.prototype.getFeatures=J.prototype.Rc;J.prototype.getFeaturesAtCoordinate=J.prototype.di; J.prototype.getFeaturesInExtent=J.prototype.rg;J.prototype.getClosestFeatureToCoordinate=J.prototype.ai;J.prototype.getExtent=J.prototype.D;J.prototype.getFeatureById=J.prototype.qg;J.prototype.getFormat=J.prototype.pj;J.prototype.getUrl=J.prototype.qj;J.prototype.removeFeature=J.prototype.Ib;Uj.prototype.feature=Uj.prototype.feature;r("ol.source.VectorTile",$y);r("ol.source.WMTS",Z);Z.prototype.getDimensions=Z.prototype.Al;Z.prototype.getFormat=Z.prototype.wp;Z.prototype.getLayer=Z.prototype.xp; Z.prototype.getMatrixSet=Z.prototype.Ol;Z.prototype.getRequestEncoding=Z.prototype.Zl;Z.prototype.getStyle=Z.prototype.yp;Z.prototype.getVersion=Z.prototype.gm;Z.prototype.updateDimensions=Z.prototype.Ir; r("ol.source.WMTS.optionsFromCapabilities",function(a,b){var c=kd(a.Contents.Layer,function(a){return a.Identifier==b.layer});if(null===c)return null;var d=a.Contents.TileMatrixSet;var e=1e&&(e=0);var f=c.TileMatrixSetLink[e].TileMatrixSet;var g=c.TileMatrixSetLink[e].TileMatrixSetLimits;var h=c.Format[0];"format"in b&&(h=b.format);e=nd(c.Style,function(a){return"style"in b?a.Title==b.style:a.isDefault});0>e&&(e=0);e=c.Style[e].Identifier;var l={};"Dimension"in c&&c.Dimension.forEach(function(a){var b=a.Identifier,c=a.Default;void 0===c&&(c=a.Value[0]);l[b]=c});var m=kd(a.Contents.TileMatrixSet,function(a){return a.Identifier==f});var n="projection"in b?Lc(b.projection): Lc(m.SupportedCRS.replace(/urn:ogc:def:crs:(\w+):(.*:)?(\w+)$/,"$1:$3"));var p=c.WGS84BoundingBox;if(void 0!==p){var q=Lc("EPSG:4326").D();q=p[0]==q[0]&&p[2]==q[2];var t=Yc(p,"EPSG:4326",n);(p=n.D())&&(pb(p,t)||(t=void 0))}g=bz(m,t,g);var u=[];m=b.requestEncoding;m=void 0!==m?m:"";if("OperationsMetadata"in a&&"GetTile"in a.OperationsMetadata)for(a=a.OperationsMetadata.GetTile.DCP.HTTP.Get,t=0,p=a.length;t0?90:-90),t.lat_ts=t.lat1)}function o(t){var s=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?o[t]=yt(arguments[1]):o[t]=Ct(arguments[1]):o[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?o.apply(s,t):o(t)});if("string"==typeof t){if(t in o)return o[t]}else"EPSG"in t?o["EPSG:"+t.EPSG]=t:"ESRI"in t?o["ESRI:"+t.ESRI]=t:"IAU2000"in t?o["IAU2000:"+t.IAU2000]=t:console.log(t);return}}function l(t){return"string"==typeof t}function M(t){return t in o}function c(t){return Et.some(function(s){return t.indexOf(s)>-1})}function u(s){var i=t(s,"authority");if(i){var a=t(i,"epsg");return a&&Pt.indexOf(a)>-1}}function f(s){var i=t(s,"extension");if(i)return t(i,"proj4")}function m(t){return"+"===t[0]}function p(t){if(!l(t))return t;if(M(t))return o[t];if(c(t)){var s=Ct(t);if(u(s))return o["EPSG:3857"];var i=f(s);return i?yt(i):s}return m(t)?yt(t):void 0}function d(t){return t}function y(t,s){var i=Tt.length;return t.names?(Tt[i]=t,t.names.forEach(function(t){Gt[t.toLowerCase()]=i}),this):(console.log(s),!0)}function _(t,s,i,a){var h=t*t,e=s*s,n=(h-e)/h,r=0;return a?(h=(t*=1-n*(et+n*(nt+n*rt)))*t,n=0):r=Math.sqrt(n),{es:n,e:r,ep2:(h-e)/e}}function x(s,i,a,h,e){if(!s){var n=t(Lt,h);n||(n=zt),s=n.a,i=n.b,a=n.rf}return a&&!i&&(i=(1-1/a)*s),(0===a||Math.abs(s-i)3&&(0===n.datum_params[3]&&0===n.datum_params[4]&&0===n.datum_params[5]&&0===n.datum_params[6]||(n.datum_type=tt,n.datum_params[3]*=at,n.datum_params[4]*=at,n.datum_params[5]*=at,n.datum_params[6]=n.datum_params[6]/1e6+1))),n.a=i,n.b=a,n.es=h,n.ep2=e,n}function Projection(s,i){if(!(this instanceof Projection))return new Projection(s);i=i||function(t){if(t)throw t};var a=p(s);if("object"==typeof a){var h=Projection.projections.get(a.projName);if(h){if(a.datumCode&&"none"!==a.datumCode){var e=t(Dt,a.datumCode);e&&(a.datum_params=e.towgs84?e.towgs84.split(","):null,a.ellps=e.ellipse,a.datumName=e.datumName?e.datumName:a.datumCode)}a.k0=a.k0||1,a.axis=a.axis||"enu",a.ellps=a.ellps||"wgs84";var n=x(a.a,a.b,a.rf,a.ellps,a.sphere),r=_(n.a,n.b,n.rf,a.R_A),o=a.datum||v(a.datumCode,a.datum_params,n.a,n.b,r.es,r.ep2);Nt(this,a),Nt(this,h),this.a=n.a,this.b=n.b,this.rf=n.rf,this.sphere=n.sphere,this.es=r.es,this.e=r.e,this.ep2=r.ep2,this.datum=o,this.init(),i(null,this)}else i(s)}else i(s)}function g(t,s){return t.datum_type===s.datum_type&&(!(t.a!==s.a||Math.abs(t.es-s.es)>5e-11)&&(t.datum_type===$?t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]:t.datum_type!==tt||t.datum_params[0]===s.datum_params[0]&&t.datum_params[1]===s.datum_params[1]&&t.datum_params[2]===s.datum_params[2]&&t.datum_params[3]===s.datum_params[3]&&t.datum_params[4]===s.datum_params[4]&&t.datum_params[5]===s.datum_params[5]&&t.datum_params[6]===s.datum_params[6]))}function b(t,s,i){var a,h,e,n,r=t.x,o=t.y,l=t.z?t.z:0;if(o<-ht&&o>-1.001*ht)o=-ht;else if(o>ht&&o<1.001*ht)o=ht;else{if(o<-ht)return{x:-1/0,y:-1/0,z:t.z};if(o>ht)return{x:1/0,y:1/0,z:t.z}}return r>Math.PI&&(r-=2*Math.PI),h=Math.sin(o),n=Math.cos(o),e=h*h,a=i/Math.sqrt(1-s*e),{x:(a+l)*n*Math.cos(r),y:(a+l)*n*Math.sin(r),z:(a*(1-s)+l)*h}}function w(t,s,i,a){var h,e,n,r,o,l,M,c,u,f,m,p,d,y,_,x,v=t.x,g=t.y,b=t.z?t.z:0;if(h=Math.sqrt(v*v+g*g),e=Math.sqrt(v*v+g*g+b*b),h/i<1e-12){if(y=0,e/i<1e-12)return _=ht,x=-a,{x:t.x,y:t.y,z:t.z}}else y=Math.atan2(g,v);n=b/e,c=(r=h/e)*(1-s)*(o=1/Math.sqrt(1-s*(2-s)*r*r)),u=n*o,d=0;do{d++,l=s*(M=i/Math.sqrt(1-s*u*u))/(M+(x=h*c+b*u-M*(1-s*u*u))),p=(m=n*(o=1/Math.sqrt(1-l*(2-l)*r*r)))*c-(f=r*(1-l)*o)*u,c=f,u=m}while(p*p>1e-24&&d<30);return _=Math.atan(m/Math.abs(f)),{x:y,y:_,z:x}}function A(t,s,i){if(s===$)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(s===tt){var a=i[0],h=i[1],e=i[2],n=i[3],r=i[4],o=i[5],l=i[6];return{x:l*(t.x-o*t.y+r*t.z)+a,y:l*(o*t.x+t.y-n*t.z)+h,z:l*(-r*t.x+n*t.y+t.z)+e}}}function C(t,s,i){if(s===$)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(s===tt){var a=i[0],h=i[1],e=i[2],n=i[3],r=i[4],o=i[5],l=i[6],M=(t.x-a)/l,c=(t.y-h)/l,u=(t.z-e)/l;return{x:M+o*c-r*u,y:-o*M+c+n*u,z:r*M-n*c+u}}}function E(t){return t===$||t===tt}function P(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!==t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function N(t,s){return(t.datum.datum_type===$||t.datum.datum_type===tt)&&"WGS84"!==s.datumCode||(s.datum.datum_type===$||s.datum.datum_type===tt)&&"WGS84"!==t.datumCode}function S(t,s,i){var a;return Array.isArray(i)&&(i=Ft(i)),Qt(i),t.datum&&s.datum&&N(t,s)&&(i=S(t,a=new Projection("WGS84"),i),t=a),"enu"!==t.axis&&(i=Ut(t,!1,i)),"longlat"===t.projName?i={x:i.x*lt,y:i.y*lt}:(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter}),i=t.inverse(i)),t.from_greenwich&&(i.x+=t.from_greenwich),i=Bt(t.datum,s.datum,i),s.from_greenwich&&(i={x:i.x-s.from_greenwich,y:i.y}),"longlat"===s.projName?i={x:i.x*Mt,y:i.y*Mt}:(i=s.forward(i),s.to_meter&&(i={x:i.x/s.to_meter,y:i.y/s.to_meter})),"enu"!==s.axis?Ut(s,!0,i):i}function k(t,s,i){var a,h,e;return Array.isArray(i)?(a=S(t,s,i),3===i.length?[a.x,a.y,a.z]:[a.x,a.y]):(h=S(t,s,i),2===(e=Object.keys(i)).length?h:(e.forEach(function(t){"x"!==t&&"y"!==t&&(h[t]=i[t])}),h))}function q(t){return t instanceof Projection?t:t.oProj?t.oProj:Projection(t)}function I(t,s,i){t=q(t);var a,h=!1;return void 0===s?(s=t,t=Wt,h=!0):(void 0!==s.x||Array.isArray(s))&&(i=s,s=t,t=Wt,h=!0),s=q(s),i?k(t,s,i):(a={forward:function(i){return k(t,s,i)},inverse:function(i){return k(s,t,i)}},h&&(a.oProj=s),a)}function O(t,s){return s=s||5,D(j({lat:t[1],lon:t[0]}),s)}function R(t){var s=L(Q(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat]:[(s.left+s.right)/2,(s.top+s.bottom)/2]}function G(t){return t*(Math.PI/180)}function T(t){return t/Math.PI*180}function j(t){var s,i,a,h,e,n,r,o=t.lat,l=t.lon,M=6378137,c=G(o),u=G(l);r=Math.floor((l+180)/6)+1,180===l&&(r=60),o>=56&&o<64&&l>=3&&l<12&&(r=32),o>=72&&o<84&&(l>=0&&l<9?r=31:l>=9&&l<21?r=33:l>=21&&l<33?r=35:l>=33&&l<42&&(r=37)),n=G(6*(r-1)-180+3),s=M/Math.sqrt(1-.00669438*Math.sin(c)*Math.sin(c)),i=Math.tan(c)*Math.tan(c),a=.006739496752268451*Math.cos(c)*Math.cos(c);var f=.9996*s*((h=Math.cos(c)*(u-n))+(1-i+a)*h*h*h/6+(5-18*i+i*i+72*a-.39089081163157013)*h*h*h*h*h/120)+5e5,m=.9996*((e=M*(.9983242984503243*c-.002514607064228144*Math.sin(2*c)+2639046602129982e-21*Math.sin(4*c)-3.418046101696858e-9*Math.sin(6*c)))+s*Math.tan(c)*(h*h/2+(5-i+9*a+4*a*a)*h*h*h*h/24+(61-58*i+i*i+600*a-2.2240339282485886)*h*h*h*h*h*h/720));return o<0&&(m+=1e7),{northing:Math.round(m),easting:Math.round(f),zoneNumber:r,zoneLetter:z(o)}}function L(t){var s=t.northing,i=t.easting,a=t.zoneLetter,h=t.zoneNumber;if(h<0||h>60)return null;var e,n,r,o,l,M,c,u,f=6378137,m=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),p=i-5e5,d=s;a<"N"&&(d-=1e7),M=6*(h-1)-180+3,u=(c=d/.9996/6367449.145945056)+(3*m/2-27*m*m*m/32)*Math.sin(2*c)+(21*m*m/16-55*m*m*m*m/32)*Math.sin(4*c)+151*m*m*m/96*Math.sin(6*c),e=f/Math.sqrt(1-.00669438*Math.sin(u)*Math.sin(u)),n=Math.tan(u)*Math.tan(u),r=.006739496752268451*Math.cos(u)*Math.cos(u),o=.99330562*f/Math.pow(1-.00669438*Math.sin(u)*Math.sin(u),1.5),l=p/(.9996*e);var y=u-e*Math.tan(u)/o*(l*l/2-(5+3*n+10*r-4*r*r-.06065547077041606)*l*l*l*l/24+(61+90*n+298*r+45*n*n-1.6983531815716497-3*r*r)*l*l*l*l*l*l/720);y=T(y);var _=(l-(1+2*n+r)*l*l*l/6+(5-2*r+28*n-3*r*r+.05391597401814761+24*n*n)*l*l*l*l*l/120)/Math.cos(u);_=M+T(_);var x;if(t.accuracy){var v=L({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});x={top:v.lat,right:v.lon,bottom:y,left:_}}else x={lat:y,lon:_};return x}function z(t){var s="Z";return 84>=t&&t>=72?s="X":72>t&&t>=64?s="W":64>t&&t>=56?s="V":56>t&&t>=48?s="U":48>t&&t>=40?s="T":40>t&&t>=32?s="S":32>t&&t>=24?s="R":24>t&&t>=16?s="Q":16>t&&t>=8?s="P":8>t&&t>=0?s="N":0>t&&t>=-8?s="M":-8>t&&t>=-16?s="L":-16>t&&t>=-24?s="K":-24>t&&t>=-32?s="J":-32>t&&t>=-40?s="H":-40>t&&t>=-48?s="G":-48>t&&t>=-56?s="F":-56>t&&t>=-64?s="E":-64>t&&t>=-72?s="D":-72>t&&t>=-80&&(s="C"),s}function D(t,s){var i="00000"+t.easting,a="00000"+t.northing;return t.zoneNumber+t.zoneLetter+B(t.easting,t.northing,t.zoneNumber)+i.substr(i.length-5,s)+a.substr(a.length-5,s)}function B(t,s,i){var a=U(i);return F(Math.floor(t/1e5),Math.floor(s/1e5)%20,a)}function U(t){var s=t%Ht;return 0===s&&(s=Ht),s}function F(t,s,i){var a=i-1,h=Kt.charCodeAt(a),e=Xt.charCodeAt(a),n=h+t-1,r=e+s,o=!1;return n>$t&&(n=n-$t+Jt-1,o=!0),(n===Vt||hVt||(n>Vt||hZt||(n>Zt||h$t&&(n=n-$t+Jt-1),r>Yt?(r=r-Yt+Jt-1,o=!0):o=!1,(r===Vt||eVt||(r>Vt||eZt||(r>Zt||eYt&&(r=r-Yt+Jt-1),String.fromCharCode(n)+String.fromCharCode(r)}function Q(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var s,i=t.length,a=null,h="",e=0;!/[A-Z]/.test(s=t.charAt(e));){if(e>=2)throw"MGRSPoint bad conversion from: "+t;h+=s,e++}var n=parseInt(h,10);if(0===e||e+3>i)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(e++);if(r<="A"||"B"===r||"Y"===r||r>="Z"||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;a=t.substring(e,e+=2);for(var o=U(n),l=W(a.charAt(0),o),M=H(a.charAt(1),o);M0&&(u=1e5/Math.pow(10,y),f=t.substring(e,e+y),_=parseFloat(f)*u,m=t.substring(e+y),x=parseFloat(m)*u),p=_+l,d=x+M,{easting:p,northing:d,zoneLetter:r,zoneNumber:n,accuracy:u}}function W(t,s){for(var i=Kt.charCodeAt(s-1),a=1e5,h=!1;i!==t.charCodeAt(0);){if(++i===Vt&&i++,i===Zt&&i++,i>$t){if(h)throw"Bad character: "+t;i=Jt,h=!0}a+=1e5}return a}function H(t,s){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i=Xt.charCodeAt(s-1),a=0,h=!1;i!==t.charCodeAt(0);){if(++i===Vt&&i++,i===Zt&&i++,i>Yt){if(h)throw"Bad character: "+t;i=Jt,h=!0}a+=1e5}return a}function K(t){var s;switch(t){case"C":s=11e5;break;case"D":s=2e6;break;case"E":s=28e5;break;case"F":s=37e5;break;case"G":s=46e5;break;case"H":s=55e5;break;case"J":s=64e5;break;case"K":s=73e5;break;case"L":s=82e5;break;case"M":s=91e5;break;case"N":s=0;break;case"P":s=8e5;break;case"Q":s=17e5;break;case"R":s=26e5;break;case"S":s=35e5;break;case"T":s=44e5;break;case"U":s=53e5;break;case"V":s=62e5;break;case"W":s=7e6;break;case"X":s=79e5;break;default:s=-1}if(s>=0)return s;throw"Invalid zone letter: "+t}function Point(t,s,i){if(!(this instanceof Point))return new Point(t,s,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===s){var a=t.split(",");this.x=parseFloat(a[0],10),this.y=parseFloat(a[1],10),this.z=parseFloat(a[2],10)||0}else this.x=t,this.y=s,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}function X(t){var s,i=[];return i[0]=t*Ts,s=t*t,i[0]+=s*js,i[1]=s*zs,s*=t,i[0]+=s*Ls,i[1]+=s*Ds,i[2]=s*Bs,i}function J(t,s){var i=t+t;return t+s[0]*Math.sin(i)+s[1]*Math.sin(i+i)+s[2]*Math.sin(i+i+i)}function V(t,s,i,a){var h;return tct&&h<=ht+ct?(a.value=ri.AREA_1,h-=ht):h>ht+ct||h<=-(ht+ct)?(a.value=ri.AREA_2,h=h>=0?h-ft:h+ft):(a.value=ri.AREA_3,h+=ht)),h}function Z(t,s){var i=t+s;return i<-ft?i+=ut:i>+ft&&(i-=ut),i}function Y(t,s,i,a){for(var h=s;a;--a){var e=t(h);if(h-=e,Math.abs(e)=this.text.length)return;t=this.text[this.place++]}switch(this.state){case _t:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},s.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(bt.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},s.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=_t)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=_t,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},s.prototype.number=function(t){if(!wt.test(t)){if(bt.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},s.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},s.prototype.keyword=function(t){if(gt.test(t))this.word+=t;else{if("["===t){var s=[];return s.push(this.word),this.level++,null===this.root?this.root=s:this.currentObject.push(s),this.stack.push(this.currentObject),this.currentObject=s,void(this.state=_t)}if(!bt.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},s.prototype.neutral=function(t){if(vt.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(wt.test(t))return this.word=t,void(this.state=3);{if(!bt.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)}},s.prototype.output=function(){for(;this.place90&&i*Mt<-90&&s*Mt>180&&s*Mt<-180)return null;var a,h;if(Math.abs(Math.abs(i)-ht)<=ot)return null;if(this.sphere)a=this.x0+this.a*this.k0*qt(s-this.long0),h=this.y0+this.a*this.k0*Math.log(Math.tan(ct+.5*i));else{var e=Math.sin(i),n=It(this.e,i,e);a=this.x0+this.a*this.k0*qt(s-this.long0),h=this.y0-this.a*this.k0*Math.log(n)}return t.x=a,t.y=h,t},inverse:function(t){var s,i,a=t.x-this.x0,h=t.y-this.y0;if(this.sphere)i=ht-2*Math.atan(Math.exp(-h/(this.a*this.k0)));else{var e=Math.exp(-h/(this.a*this.k0));if(-9999===(i=Ot(this.e,e)))return null}return s=qt(this.long0+a/(this.a*this.k0)),t.x=s,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:d,inverse:d,names:["longlat","identity"]}],Gt={},Tt=[],jt={start:function(){Rt.forEach(y)},add:y,get:function(t){if(!t)return!1;var s=t.toLowerCase();return void 0!==Gt[s]&&Tt[Gt[s]]?Tt[Gt[s]]:void 0}},Lt={};Lt.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},Lt.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},Lt.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},Lt.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},Lt.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},Lt.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},Lt.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},Lt.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},Lt.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},Lt.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},Lt.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},Lt.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},Lt.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},Lt.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},Lt.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},Lt.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},Lt.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},Lt.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},Lt.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},Lt.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},Lt.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},Lt.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},Lt.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},Lt.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},Lt.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},Lt.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},Lt.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},Lt.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},Lt.hough={a:6378270,rf:297,ellipseName:"Hough"},Lt.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},Lt.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},Lt.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},Lt.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},Lt.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},Lt.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},Lt.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},Lt.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},Lt.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},Lt.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},Lt.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},Lt.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var zt=Lt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Lt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var Dt={};Dt.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},Dt.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},Dt.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},Dt.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},Dt.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},Dt.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},Dt.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},Dt.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},Dt.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},Dt.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},Dt.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},Dt.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},Dt.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},Dt.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},Dt.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},Dt.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},Dt.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},Projection.projections=jt,Projection.projections.start();var Bt=function(t,s,i){return g(t,s)?i:t.datum_type===it||s.datum_type===it?i:t.es!==s.es||t.a!==s.a||E(t.datum_type)||E(s.datum_type)?(i=b(i,t.es,t.a),E(t.datum_type)&&(i=A(i,t.datum_type,t.datum_params)),E(s.datum_type)&&(i=C(i,s.datum_type,s.datum_params)),w(i,s.es,s.a,s.b)):i},Ut=function(t,s,i){var a,h,e,n=i.x,r=i.y,o=i.z||0,l={};for(e=0;e<3;e++)if(!s||2!==e||void 0!==i.z)switch(0===e?(a=n,h="x"):1===e?(a=r,h="y"):(a=o,h="z"),t.axis[e]){case"e":l[h]=a;break;case"w":l[h]=-a;break;case"n":l[h]=a;break;case"s":l[h]=-a;break;case"u":void 0!==i[h]&&(l.z=a);break;case"d":void 0!==i[h]&&(l.z=-a);break;default:return null}return l},Ft=function(t){var s={x:t[0],y:t[1]};return t.length>2&&(s.z=t[2]),t.length>3&&(s.m=t[3]),s},Qt=function(t){P(t.x),P(t.y)},Wt=Projection("WGS84"),Ht=6,Kt="AJSAJS",Xt="AFAFAF",Jt=65,Vt=73,Zt=79,Yt=86,$t=90,ts={forward:O,inverse:function(t){var s=L(Q(t.toUpperCase()));return s.lat&&s.lon?[s.lon,s.lat,s.lon,s.lat]:[s.left,s.bottom,s.right,s.top]},toPoint:R};Point.fromMGRS=function(t){return new Point(R(t))},Point.prototype.toMGRS=function(t){return O([this.x,this.y],t)};var ss=.01068115234375,is=function(t){var s=[];s[0]=1-t*(.25+t*(.046875+t*(.01953125+t*ss))),s[1]=t*(.75-t*(.046875+t*(.01953125+t*ss)));var i=t*t;return s[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,s[3]=i*(.3645833333333333-.005696614583333333*t),s[4]=i*t*.3076171875,s},as=function(t,s,i,a){return i*=s,s*=s,a[0]*t-i*(a[1]+s*(a[2]+s*(a[3]+s*a[4])))},hs=function(t,s,i){for(var a=1/(1-s),h=t,e=20;e;--e){var n=Math.sin(h),r=1-s*n*n;if(r=(as(h,n,Math.cos(h),i)-t)*(r*Math.sqrt(r))*a,h-=r,Math.abs(r)ot?Math.tan(e):0,m=Math.pow(f,2),p=Math.pow(m,2);s=1-this.es*Math.pow(r,2),l/=Math.sqrt(s);var d=as(e,r,o,this.en);i=this.a*(this.k0*l*(1+M/6*(1-m+c+M/20*(5-18*m+p+14*c-58*m*c+M/42*(61+179*p-p*m-479*m)))))+this.x0,a=this.a*(this.k0*(d-this.ml0+r*n*l/2*(1+M/12*(5-m+9*c+4*u+M/30*(61+p-58*m+270*c-330*m*c+M/56*(1385+543*p-p*m-3111*m))))))+this.y0}else{var y=o*Math.sin(n);if(Math.abs(Math.abs(y)-1)=1){if(y-1>ot)return 93;a=0}else a=Math.acos(a);e<0&&(a=-a),a=this.a*this.k0*(a-this.lat0)+this.y0}return t.x=i,t.y=a,t},inverse:function(t){var s,i,a,h,e=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);if(this.es)if(s=this.ml0+n/this.k0,i=hs(s,this.es,this.en),Math.abs(i)ot?Math.tan(i):0,M=this.ep2*Math.pow(o,2),c=Math.pow(M,2),u=Math.pow(l,2),f=Math.pow(u,2);s=1-this.es*Math.pow(r,2);var m=e*Math.sqrt(s)/this.k0,p=Math.pow(m,2);a=i-(s*=l)*p/(1-this.es)*.5*(1-p/12*(5+3*u-9*M*u+M-4*c-p/30*(61+90*u-252*M*u+45*f+46*M-p/56*(1385+3633*u+4095*f+1574*f*u)))),h=qt(this.long0+m*(1-p/6*(1+2*u+M-p/20*(5+28*u+24*f+8*M*u+6*M-p/42*(61+662*u+1320*f+720*f*u))))/o)}else a=ht*kt(n),h=0;else{var d=Math.exp(e/this.k0),y=.5*(d-1/d),_=this.lat0+n/this.k0,x=Math.cos(_);s=Math.sqrt((1-Math.pow(x,2))/(1+Math.pow(y,2))),a=Math.asin(s),n<0&&(a=-a),h=0===y&&0===x?0:qt(Math.atan2(y,x)+this.long0)}return t.x=h,t.y=a,t},names:["Transverse_Mercator","Transverse Mercator","tmerc"]},ns=function(t){var s=Math.exp(t);return s=(s-1/s)/2},rs=function(t,s){t=Math.abs(t),s=Math.abs(s);var i=Math.max(t,s),a=Math.min(t,s)/(i||1);return i*Math.sqrt(1+Math.pow(a,2))},os=function(t){var s=1+t,i=s-1;return 0===i?t:t*Math.log(s)/i},ls=function(t){var s=Math.abs(t);return s=os(s*(1+s/(rs(1,s)+1))),t<0?-s:s},Ms=function(t,s){for(var i,a=2*Math.cos(2*s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return s+i*Math.sin(2*s)},cs=function(t,s){for(var i,a=2*Math.cos(s),h=t.length-1,e=t[h],n=0;--h>=0;)i=a*e-n+t[h],n=e,e=i;return Math.sin(s)*i},us=function(t){var s=Math.exp(t);return s=(s+1/s)/2},fs=function(t,s,i){for(var a,h,e=Math.sin(s),n=Math.cos(s),r=ns(i),o=us(i),l=2*n*o,M=-2*e*r,c=t.length-1,u=t[c],f=0,m=0,p=0;--c>=0;)a=m,h=f,u=l*(m=u)-a-M*(f=p)+t[c],p=M*m-h+l*f;return l=e*o,M=n*r,[l*u-M*p,l*p+M*u]},ms={init:function(){if(void 0===this.es||this.es<=0)throw new Error("incorrect elliptical usage");this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),s=t/(2-t),i=s;this.cgb[0]=s*(2+s*(-2/3+s*(s*(116/45+s*(26/45+s*(-2854/675)))-2))),this.cbg[0]=s*(s*(2/3+s*(4/3+s*(-82/45+s*(32/45+s*(4642/4725)))))-2),i*=s,this.cgb[1]=i*(7/3+s*(s*(-227/45+s*(2704/315+s*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+s*(-16/15+s*(-13/9+s*(904/315+s*(-1522/945))))),i*=s,this.cgb[2]=i*(56/15+s*(-136/35+s*(-1262/105+s*(73814/2835)))),this.cbg[2]=i*(-26/15+s*(34/21+s*(1.6+s*(-12686/2835)))),i*=s,this.cgb[3]=i*(4279/630+s*(-332/35+s*(-399572/14175))),this.cbg[3]=i*(1237/630+s*(s*(-24832/14175)-2.4)),i*=s,this.cgb[4]=i*(4174/315+s*(-144838/6237)),this.cbg[4]=i*(-734/315+s*(109598/31185)),i*=s,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(s,2),this.Qn=this.k0/(1+s)*(1+i*(.25+i*(1/64+i/256))),this.utg[0]=s*(s*(2/3+s*(-37/96+s*(1/360+s*(81/512+s*(-96199/604800)))))-.5),this.gtu[0]=s*(.5+s*(-2/3+s*(5/16+s*(41/180+s*(-127/288+s*(7891/37800)))))),this.utg[1]=i*(-1/48+s*(-1/15+s*(437/1440+s*(-46/105+s*(1118711/3870720))))),this.gtu[1]=i*(13/48+s*(s*(557/1440+s*(281/630+s*(-1983433/1935360)))-.6)),i*=s,this.utg[2]=i*(-17/480+s*(37/840+s*(209/4480+s*(-5569/90720)))),this.gtu[2]=i*(61/240+s*(-103/140+s*(15061/26880+s*(167603/181440)))),i*=s,this.utg[3]=i*(-4397/161280+s*(11/504+s*(830251/7257600))),this.gtu[3]=i*(49561/161280+s*(-179/168+s*(6601661/7257600))),i*=s,this.utg[4]=i*(-4583/161280+s*(108847/3991680)),this.gtu[4]=i*(34729/80640+s*(-3418889/1995840)),i*=s,this.utg[5]=-.03233083094085698*i,this.gtu[5]=.6650675310896665*i;var a=Ms(this.cbg,this.lat0);this.Zb=-this.Qn*(a+cs(this.gtu,2*a))},forward:function(t){var s=qt(t.x-this.long0),i=t.y;i=Ms(this.cbg,i);var a=Math.sin(i),h=Math.cos(i),e=Math.sin(s),n=Math.cos(s);i=Math.atan2(a,n*h),s=Math.atan2(e*h,rs(a,h*n)),s=ls(Math.tan(s));var r=fs(this.gtu,2*i,2*s);i+=r[0],s+=r[1];var o,l;return Math.abs(s)<=2.623395162778?(o=this.a*(this.Qn*s)+this.x0,l=this.a*(this.Qn*i+this.Zb)+this.y0):(o=1/0,l=1/0),t.x=o,t.y=l,t},inverse:function(t){var s=(t.x-this.x0)*(1/this.a),i=(t.y-this.y0)*(1/this.a);i=(i-this.Zb)/this.Qn,s/=this.Qn;var a,h;if(Math.abs(s)<=2.623395162778){var e=fs(this.utg,2*i,2*s);i+=e[0],s+=e[1],s=Math.atan(ns(s));var n=Math.sin(i),r=Math.cos(i),o=Math.sin(s),l=Math.cos(s);i=Math.atan2(n*l,rs(o,l*r)),s=Math.atan2(o,l*r),a=qt(s+this.long0),h=Ms(this.cgb,i)}else a=1/0,h=1/0;return t.x=a,t.y=h,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc"]},ps=function(t,s){if(void 0===t){if((t=Math.floor(30*(qt(s)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t},ds={init:function(){var t=ps(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*lt,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,ms.init.apply(this),this.forward=ms.forward,this.inverse=ms.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},ys=function(t,s){return Math.pow((1-t)/(1+t),s)},_s=20,xs={init:function(){var t=Math.sin(this.lat0),s=Math.cos(this.lat0);s*=s,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*s*s/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+ct)/(Math.pow(Math.tan(.5*this.lat0+ct),this.C)*ys(this.e*t,this.ratexp))},forward:function(t){var s=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+ct),this.C)*ys(this.e*Math.sin(i),this.ratexp))-ht,t.x=this.C*s,t},inverse:function(t){for(var s=t.x/this.C,i=t.y,a=Math.pow(Math.tan(.5*i+ct)/this.K,1/this.C),h=_s;h>0&&(i=2*Math.atan(a*ys(this.e*Math.sin(t.y),-.5*this.e))-ht,!(Math.abs(i-t.y)<1e-14));--h)t.y=i;return h?(t.x=s,t.y=i,t):null},names:["gauss"]},vs={init:function(){xs.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var s,i,a,h;return t.x=qt(t.x-this.long0),xs.forward.apply(this,[t]),s=Math.sin(t.y),i=Math.cos(t.y),a=Math.cos(t.x),h=this.k0*this.R2/(1+this.sinc0*s+this.cosc0*i*a),t.x=h*i*Math.sin(t.x),t.y=h*(this.cosc0*s-this.sinc0*i*a),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var s,i,a,h,e;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,e=Math.sqrt(t.x*t.x+t.y*t.y)){var n=2*Math.atan2(e,this.R2);s=Math.sin(n),i=Math.cos(n),h=Math.asin(i*this.sinc0+t.y*s*this.cosc0/e),a=Math.atan2(t.x*s,e*this.cosc0*i-t.y*this.sinc0*s)}else h=this.phic0,a=0;return t.x=a,t.y=h,xs.inverse.apply(this,[t]),t.x=qt(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},gs={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ot&&(this.k0=.5*(1+kt(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=ot&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ot&&(this.k0=.5*this.cons*St(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/It(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=St(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-ht,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var s,i,a,h,e,n,r=t.x,o=t.y,l=Math.sin(o),M=Math.cos(o),c=qt(r-this.long0);return Math.abs(Math.abs(r-this.long0)-Math.PI)<=ot&&Math.abs(o+this.lat0)<=ot?(t.x=NaN,t.y=NaN,t):this.sphere?(s=2*this.k0/(1+this.sinlat0*l+this.coslat0*M*Math.cos(c)),t.x=this.a*s*M*Math.sin(c)+this.x0,t.y=this.a*s*(this.coslat0*l-this.sinlat0*M*Math.cos(c))+this.y0,t):(i=2*Math.atan(this.ssfn_(o,l,this.e))-ht,h=Math.cos(i),a=Math.sin(i),Math.abs(this.coslat0)<=ot?(e=It(this.e,o*this.con,this.con*l),n=2*this.a*this.k0*e/this.cons,t.x=this.x0+n*Math.sin(r-this.long0),t.y=this.y0-this.con*n*Math.cos(r-this.long0),t):(Math.abs(this.sinlat0)0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y):this.long0+Math.atan2(t.x*Math.sin(r),n*this.coslat0*Math.cos(r)-t.y*this.sinlat0*Math.sin(r))),t.x=s,t.y=i,t)}if(Math.abs(this.coslat0)<=ot){if(n<=ot)return i=this.lat0,s=this.long0,t.x=s,t.y=i,t;t.x*=this.con,t.y*=this.con,a=n*this.cons/(2*this.a*this.k0),i=this.con*Ot(this.e,a),s=this.con*qt(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else h=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),s=this.long0,n<=ot?e=this.X0:(e=Math.asin(Math.cos(h)*this.sinX0+t.y*Math.sin(h)*this.cosX0/n),s=qt(this.long0+Math.atan2(t.x*Math.sin(h),n*this.cosX0*Math.cos(h)-t.y*this.sinX0*Math.sin(h)))),i=-1*Ot(this.e,Math.tan(.5*(ht+e)));return t.x=s,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,s,i){return s*=i,Math.tan(.5*(ht+t))*Math.pow((1-s)/(1+s),.5*i)}},bs={init:function(){var t=this.lat0;this.lambda0=this.long0;var s=Math.sin(t),i=this.a,a=1/this.rf,h=2*a-Math.pow(a,2),e=this.e=Math.sqrt(h);this.R=this.k0*i*Math.sqrt(1-h)/(1-h*Math.pow(s,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(s/this.alpha);var n=Math.log(Math.tan(Math.PI/4+this.b0/2)),r=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+e*s)/(1-e*s));this.K=n-this.alpha*r+this.alpha*e/2*o},forward:function(t){var s=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),a=-this.alpha*(s+i)+this.K,h=2*(Math.atan(Math.exp(a))-Math.PI/4),e=this.alpha*(t.x-this.lambda0),n=Math.atan(Math.sin(e)/(Math.sin(this.b0)*Math.tan(h)+Math.cos(this.b0)*Math.cos(e))),r=Math.asin(Math.cos(this.b0)*Math.sin(h)-Math.sin(this.b0)*Math.cos(h)*Math.cos(e));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*n+this.x0,t},inverse:function(t){for(var s=t.x-this.x0,i=t.y-this.y0,a=s/this.R,h=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),e=Math.asin(Math.cos(this.b0)*Math.sin(h)+Math.sin(this.b0)*Math.cos(h)*Math.cos(a)),n=Math.atan(Math.sin(a)/(Math.cos(this.b0)*Math.cos(a)-Math.sin(this.b0)*Math.tan(h))),r=this.lambda0+n/this.alpha,o=0,l=e,M=-1e3,c=0;Math.abs(l-M)>1e-7;){if(++c>20)return;o=1/this.alpha*(Math.log(Math.tan(Math.PI/4+e/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),M=l,l=2*Math.atan(Math.exp(o))-Math.PI/2}return t.x=r,t.y=l,t},names:["somerc"]},ws={init:function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),s=Math.cos(this.lat0),i=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(s,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-i*i);var a=It(this.e,this.lat0,t),h=this.bl/s*Math.sqrt((1-this.es)/(1-i*i));h*h<1&&(h=1);var e,n;if(isNaN(this.longc)){var r=It(this.e,this.lat1,Math.sin(this.lat1)),o=It(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(h+Math.sqrt(h*h-1))*Math.pow(a,this.bl):this.el=(h-Math.sqrt(h*h-1))*Math.pow(a,this.bl);var l=Math.pow(r,this.bl),M=Math.pow(o,this.bl);n=.5*((e=this.el/l)-1/e);var c=(this.el*this.el-M*l)/(this.el*this.el+M*l),u=(M-l)/(M+l),f=qt(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(c*Math.tan(.5*this.bl*f)/u)/this.bl,this.long0=qt(this.long0);var m=qt(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*m)/n),this.alpha=Math.asin(h*Math.sin(this.gamma0))}else e=this.lat0>=0?h+Math.sqrt(h*h-1):h-Math.sqrt(h*h-1),this.el=e*Math.pow(a,this.bl),n=.5*(e-1/e),this.gamma0=Math.asin(Math.sin(this.alpha)/h),this.long0=this.longc-Math.asin(n*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(h*h-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(h*h-1),Math.cos(this.alpha))},forward:function(t){var s,i,a,h=t.x,e=t.y,n=qt(h-this.long0);if(Math.abs(Math.abs(e)-ht)<=ot)a=e>0?-1:1,i=this.al/this.bl*Math.log(Math.tan(ct+a*this.gamma0*.5)),s=-1*a*ht*this.al/this.bl;else{var r=It(this.e,e,Math.sin(e)),o=this.el/Math.pow(r,this.bl),l=.5*(o-1/o),M=.5*(o+1/o),c=Math.sin(this.bl*n),u=(l*Math.sin(this.gamma0)-c*Math.cos(this.gamma0))/M;i=Math.abs(Math.abs(u)-1)<=ot?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-u)/(1+u))/this.bl,s=Math.abs(Math.cos(this.bl*n))<=ot?this.al*this.bl*n:this.al*Math.atan2(l*Math.cos(this.gamma0)+c*Math.sin(this.gamma0),Math.cos(this.bl*n))/this.bl}return this.no_rot?(t.x=this.x0+s,t.y=this.y0+i):(s-=this.uc,t.x=this.x0+i*Math.cos(this.alpha)+s*Math.sin(this.alpha),t.y=this.y0+s*Math.cos(this.alpha)-i*Math.sin(this.alpha)),t},inverse:function(t){var s,i;this.no_rot?(i=t.y-this.y0,s=t.x-this.x0):(i=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),s=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),s+=this.uc);var a=Math.exp(-1*this.bl*i/this.al),h=.5*(a-1/a),e=.5*(a+1/a),n=Math.sin(this.bl*s/this.al),r=(n*Math.cos(this.gamma0)+h*Math.sin(this.gamma0))/e,o=Math.pow(this.el/Math.sqrt((1+r)/(1-r)),1/this.bl);return Math.abs(r-1)ot?this.ns=Math.log(a/r)/Math.log(h/o):this.ns=s,isNaN(this.ns)&&(this.ns=s),this.f0=a/(this.ns*Math.pow(h,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var s=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=ot&&(i=kt(i)*(ht-2*ot));var a,h,e=Math.abs(Math.abs(i)-ht);if(e>ot)a=It(this.e,i,Math.sin(i)),h=this.a*this.f0*Math.pow(a,this.ns);else{if((e=i*this.ns)<=0)return null;h=0}var n=this.ns*qt(s-this.long0);return t.x=this.k0*(h*Math.sin(n))+this.x0,t.y=this.k0*(this.rh-h*Math.cos(n))+this.y0,t},inverse:function(t){var s,i,a,h,e,n=(t.x-this.x0)/this.k0,r=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(s=Math.sqrt(n*n+r*r),i=1):(s=-Math.sqrt(n*n+r*r),i=-1);var o=0;if(0!==s&&(o=Math.atan2(i*n,i*r)),0!==s||this.ns>0){if(i=1/this.ns,a=Math.pow(s/(this.a*this.f0),i),-9999===(h=Ot(this.e,a)))return null}else h=-ht;return e=qt(o/this.ns+this.long0),t.x=e,t.y=h,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]},Cs={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y,M=qt(o-this.long0);return s=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/s)-this.s45),a=-M*this.alfa,h=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(a)),e=Math.asin(Math.cos(i)*Math.sin(a)/Math.cos(h)),n=this.n*e,r=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(h/2+this.s45),this.n),t.y=r*Math.cos(n)/1,t.x=r*Math.sin(n)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var s,i,a,h,e,n,r,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),e=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.y,t.x)/Math.sin(this.s0),a=2*(Math.atan(Math.pow(this.ro0/e,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),s=Math.asin(Math.cos(this.ad)*Math.sin(a)-Math.sin(this.ad)*Math.cos(a)*Math.cos(h)),i=Math.asin(Math.cos(a)*Math.sin(h)/Math.cos(s)),t.x=this.long0-i/this.alfa,n=s,r=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(s/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(n))/(1-this.e*Math.sin(n)),this.e/2))-this.s45),Math.abs(n-t.y)<1e-10&&(r=1),n=t.y,l+=1}while(0===r&&l<15);return l>=15?null:t},names:["Krovak","krovak"]},Es=function(t,s,i,a,h){return t*h-s*Math.sin(2*h)+i*Math.sin(4*h)-a*Math.sin(6*h)},Ps=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))},Ns=function(t){return.375*t*(1+.25*t*(1+.46875*t))},Ss=function(t){return.05859375*t*t*(1+.75*t)},ks=function(t){return t*t*t*(35/3072)},qs=function(t,s,i){var a=s*i;return t/Math.sqrt(1-a*a)},Is=function(t){return Math.abs(t)1e-7?(i=t*s,(1-t*t)*(s/(1-i*i)-.5/t*Math.log((1-i)/(1+i)))):2*s},Ts=.3333333333333333,js=.17222222222222222,Ls=.10257936507936508,zs=.06388888888888888,Ds=.0664021164021164,Bs=.016415012942191543,Us={init:function(){var t=Math.abs(this.lat0);if(Math.abs(t-ht)0){var s;switch(this.qp=Gs(this.e,1),this.mmf=.5/(1-this.es),this.apa=X(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),s=Math.sin(this.lat0),this.sinb1=Gs(this.e,s)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*s*s)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var s,i,a,h,e,n,r,o,l,M,c=t.x,u=t.y;if(c=qt(c-this.long0),this.sphere){if(e=Math.sin(u),M=Math.cos(u),a=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+M*a:1+this.sinph0*e+this.cosph0*M*a)<=ot)return null;s=(i=Math.sqrt(2/i))*M*Math.sin(c),i*=this.mode===this.EQUIT?e:this.cosph0*e-this.sinph0*M*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(u+this.phi0)=0?(s=(l=Math.sqrt(n))*h,i=a*(this.mode===this.S_POLE?l:-l)):s=i=0}}return t.x=this.a*s+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e,n,r,o=t.x/this.a,l=t.y/this.a;if(this.sphere){var M,c=0,u=0;if(M=Math.sqrt(o*o+l*l),(i=.5*M)>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=Math.sin(i),c=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(M)<=ot?0:Math.asin(l*u/M),o*=u,l=c*M;break;case this.OBLIQ:i=Math.abs(M)<=ot?this.phi0:Math.asin(c*this.sinph0+l*u*this.cosph0/M),o*=u*this.cosph0,l=(c-Math.sin(i)*this.sinph0)*M;break;case this.N_POLE:l=-l,i=ht-i;break;case this.S_POLE:i-=ht}s=0!==l||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(o,l):0}else{if(r=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(o/=this.dd,l*=this.dd,(n=Math.sqrt(o*o+l*l))1&&(t=t>1?1:-1),Math.asin(t)},Qs={init:function(){Math.abs(this.lat1+this.lat2)ot?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var s=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var a=Gs(this.e3,this.sin_phi,this.cos_phi),h=this.a*Math.sqrt(this.c-this.ns0*a)/this.ns0,e=this.ns0*qt(s-this.long0),n=h*Math.sin(e)+this.x0,r=this.rh-h*Math.cos(e)+this.y0;return t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),a=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),a=-1),h=0,0!==s&&(h=Math.atan2(a*t.x,a*t.y)),a=s*this.ns0/this.a,this.sphere?n=Math.asin((this.c-a*a)/(2*this.ns0)):(i=(this.c-a*a)/this.ns0,n=this.phi1z(this.e3,i)),e=qt(h/this.ns0+this.long0),t.x=e,t.y=n,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,s){var i,a,h,e,n,r=Fs(.5*s);if(t0||Math.abs(e)<=ot?(n=this.x0+1*this.a*i*Math.sin(a)/e,r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)/e):(n=this.x0+this.infinity_dist*i*Math.sin(a),r=this.y0+this.infinity_dist*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(s=Math.sqrt(t.x*t.x+t.y*t.y))?(h=Math.atan2(s,this.rc),i=Math.sin(h),a=Math.cos(h),n=Fs(a*this.sin_p14+t.y*i*this.cos_p14/s),e=Math.atan2(t.x*i,s*this.cos_p14*a-t.y*this.sin_p14*i),e=qt(this.long0+e)):(n=this.phic0,e=0),t.x=e,t.y=n,t},names:["gnom"]},Hs=function(t,s){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(s)-i)<1e-6)return s<0?-1*ht:ht;for(var a,h,e,n,r=Math.asin(.5*s),o=0;o<30;o++)if(h=Math.sin(r),e=Math.cos(r),n=t*h,a=Math.pow(1-n*n,2)/(2*e)*(s/(1-t*t)-h/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),r+=a,Math.abs(a)<=1e-10)return r;return NaN},Ks={init:function(){this.sphere||(this.k0=St(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var s,i,a=t.x,h=t.y,e=qt(a-this.long0);if(this.sphere)s=this.x0+this.a*e*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(h)/Math.cos(this.lat_ts);else{var n=Gs(this.e,Math.sin(h));s=this.x0+this.a*this.k0*e,i=this.y0+this.a*n*.5/this.k0}return t.x=s,t.y=i,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i;return this.sphere?(s=qt(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=Hs(this.e,2*t.y*this.k0/this.a),s=qt(this.long0+t.x/(this.a*this.k0))),t.x=s,t.y=i,t},names:["cea"]},Xs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var s=t.x,i=t.y,a=qt(s-this.long0),h=Is(i-this.lat0);return t.x=this.x0+this.a*a*this.rc,t.y=this.y0+this.a*h,t},inverse:function(t){var s=t.x,i=t.y;return t.x=qt(this.long0+(s-this.x0)/(this.a*this.rc)),t.y=Is(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},Js=20,Vs={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ps(this.es),this.e1=Ns(this.es),this.e2=Ss(this.es),this.e3=ks(this.es),this.ml0=this.a*Es(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var s,i,a,h=t.x,e=t.y,n=qt(h-this.long0);if(a=n*Math.sin(e),this.sphere)Math.abs(e)<=ot?(s=this.a*n,i=-1*this.a*this.lat0):(s=this.a*Math.sin(a)/Math.tan(e),i=this.a*(Is(e-this.lat0)+(1-Math.cos(a))/Math.tan(e)));else if(Math.abs(e)<=ot)s=this.a*n,i=-1*this.ml0;else{var r=qs(this.a,this.e,Math.sin(e))/Math.tan(e);s=r*Math.sin(a),i=this.a*Es(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+r*(1-Math.cos(a))}return t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){var s,i,a,h,e,n,r,o,l;if(a=t.x-this.x0,h=t.y-this.y0,this.sphere)if(Math.abs(h+this.a*this.lat0)<=ot)s=qt(a/this.a+this.long0),i=0;else{n=this.lat0+h/this.a,r=a*a/this.a/this.a+n*n,o=n;var M;for(e=Js;e;--e)if(M=Math.tan(o),l=-1*(n*(o*M+1)-o-.5*(o*o+r)*M)/((o-n)/M-1),o+=l,Math.abs(l)<=ot){i=o;break}s=qt(this.long0+Math.asin(a*Math.tan(o)/this.a)/Math.sin(i))}else if(Math.abs(h+this.ml0)<=ot)i=0,s=qt(this.long0+a/this.a);else{n=(this.ml0+h)/this.a,r=a*a/this.a/this.a+n*n,o=n;var c,u,f,m,p;for(e=Js;e;--e)if(p=this.e*Math.sin(o),c=Math.sqrt(1-p*p)*Math.tan(o),u=this.a*Es(this.e0,this.e1,this.e2,this.e3,o),f=this.e0-2*this.e1*Math.cos(2*o)+4*this.e2*Math.cos(4*o)-6*this.e3*Math.cos(6*o),m=u/this.a,l=(n*(c*m+1)-m-.5*c*(m*m+r))/(this.es*Math.sin(2*o)*(m*m+r-2*n*m)/(4*c)+(n-m)*(c*f-2/Math.sin(2*o))-f),o-=l,Math.abs(l)<=ot){i=o;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),s=qt(this.long0+Math.asin(a*c/this.a)/Math.sin(i))}return t.x=s,t.y=i,t},names:["Polyconic","poly"]},Zs={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var s,i=t.x,a=t.y-this.lat0,h=i-this.long0,e=a/at*1e-5,n=h,r=1,o=0;for(s=1;s<=10;s++)r*=e,o+=this.A[s]*r;var l,M=o,c=n,u=1,f=0,m=0,p=0;for(s=1;s<=6;s++)l=f*M+u*c,u=u*M-f*c,f=l,m=m+this.B_re[s]*u-this.B_im[s]*f,p=p+this.B_im[s]*u+this.B_re[s]*f;return t.x=p*this.a+this.x0,t.y=m*this.a+this.y0,t},inverse:function(t){var s,i,a=t.x,h=t.y,e=a-this.x0,n=(h-this.y0)/this.a,r=e/this.a,o=1,l=0,M=0,c=0;for(s=1;s<=6;s++)i=l*n+o*r,o=o*n-l*r,l=i,M=M+this.C_re[s]*o-this.C_im[s]*l,c=c+this.C_im[s]*o+this.C_re[s]*l;for(var u=0;u.999999999999&&(i=.999999999999),s=Math.asin(i);var a=qt(this.long0+t.x/(.900316316158*this.a*Math.cos(s)));a<-Math.PI&&(a=-Math.PI),a>Math.PI&&(a=Math.PI),i=(2*s+Math.sin(2*s))/Math.PI,Math.abs(i)>1&&(i=1);var h=Math.asin(i);return t.x=a,t.y=h,t},names:["Mollweide","moll"]},ii={init:function(){Math.abs(this.lat1+this.lat2)=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1);var e=0;if(0!==i&&(e=Math.atan2(s*t.x,s*t.y)),this.sphere)return h=qt(this.long0+e/this.ns),a=Is(this.g-i/this.a),t.x=h,t.y=a,t;var n=this.g-i/this.a;return a=Os(n,this.e0,this.e1,this.e2,this.e3),h=qt(this.long0+e/this.ns),t.x=h,t.y=a,t},names:["Equidistant_Conic","eqdc"]},ai={init:function(){this.R=this.a},forward:function(t){var s,i,a=t.x,h=t.y,e=qt(a-this.long0);Math.abs(h)<=ot&&(s=this.x0+this.R*e,i=this.y0);var n=Fs(2*Math.abs(h/Math.PI));(Math.abs(e)<=ot||Math.abs(Math.abs(h)-ht)<=ot)&&(s=this.x0,i=h>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var r=.5*Math.abs(Math.PI/e-e/Math.PI),o=r*r,l=Math.sin(n),M=Math.cos(n),c=M/(l+M-1),u=c*c,f=c*(2/l-1),m=f*f,p=Math.PI*this.R*(r*(c-m)+Math.sqrt(o*(c-m)*(c-m)-(m+o)*(u-m)))/(m+o);e<0&&(p=-p),s=this.x0+p;var d=o+c;return p=Math.PI*this.R*(f*d-r*Math.sqrt((m+o)*(o+1)-d*d))/(m+o),i=h>=0?this.y0+p:this.y0-p,t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,M,c,u,f;return t.x-=this.x0,t.y-=this.y0,c=Math.PI*this.R,a=t.x/c,h=t.y/c,e=a*a+h*h,n=-Math.abs(h)*(1+e),r=n-2*h*h+a*a,o=-2*n+1+2*h*h+e*e,f=h*h/o+(2*r*r*r/o/o/o-9*n*r/o/o)/27,l=(n-r*r/3/o)/o,M=2*Math.sqrt(-l/3),c=3*f/l/M,Math.abs(c)>1&&(c=c>=0?1:-1),u=Math.acos(c)/3,i=t.y>=0?(-M*Math.cos(u+Math.PI/3)-r/3/o)*Math.PI:-(-M*Math.cos(u+Math.PI/3)-r/3/o)*Math.PI,s=Math.abs(a)2*ht*this.a)return;return i=s/this.a,a=Math.sin(i),h=Math.cos(i),e=this.long0,Math.abs(s)<=ot?n=this.lat0:(n=Fs(h*this.sin_p12+t.y*a*this.cos_p12/s),r=Math.abs(this.lat0)-ht,e=qt(Math.abs(r)<=ot?this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*a,s*this.cos_p12*h-t.y*this.sin_p12*a))),t.x=e,t.y=n,t}return o=Ps(this.es),l=Ns(this.es),M=Ss(this.es),c=ks(this.es),Math.abs(this.sin_p12-1)<=ot?(u=this.a*Es(o,l,M,c,ht),s=Math.sqrt(t.x*t.x+t.y*t.y),f=u-s,n=Os(f/this.a,o,l,M,c),e=qt(this.long0+Math.atan2(t.x,-1*t.y)),t.x=e,t.y=n,t):Math.abs(this.sin_p12+1)<=ot?(u=this.a*Es(o,l,M,c,ht),s=Math.sqrt(t.x*t.x+t.y*t.y),f=s-u,n=Os(f/this.a,o,l,M,c),e=qt(this.long0+Math.atan2(t.x,t.y)),t.x=e,t.y=n,t):(s=Math.sqrt(t.x*t.x+t.y*t.y),d=Math.atan2(t.x,t.y),m=qs(this.a,this.e,this.sin_p12),y=Math.cos(d),_=this.e*this.cos_p12*y,x=-_*_/(1-this.es),v=3*this.es*(1-x)*this.sin_p12*this.cos_p12*y/(1-this.es),g=s/m,b=g-x*(1+x)*Math.pow(g,3)/6-v*(1+3*x)*Math.pow(g,4)/24,w=1-x*b*b/2-g*b*b*b/6,p=Math.asin(this.sin_p12*Math.cos(b)+this.cos_p12*Math.sin(b)*y),e=qt(this.long0+Math.asin(Math.sin(d)*Math.sin(b)/Math.cos(p))),n=Math.atan((1-this.es*w*this.sin_p12/Math.sin(p))*Math.tan(p)/(1-this.es)),t.x=e,t.y=n,t)},names:["Azimuthal_Equidistant","aeqd"]},ei={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y;return a=qt(o-this.long0),s=Math.sin(l),i=Math.cos(l),h=Math.cos(a),((e=this.sin_p14*s+this.cos_p14*i*h)>0||Math.abs(e)<=ot)&&(n=1*this.a*i*Math.sin(a),r=this.y0+1*this.a*(this.cos_p14*s-this.sin_p14*i*h)),t.x=n,t.y=r,t},inverse:function(t){var s,i,a,h,e,n,r;return t.x-=this.x0,t.y-=this.y0,s=Math.sqrt(t.x*t.x+t.y*t.y),i=Fs(s/this.a),a=Math.sin(i),h=Math.cos(i),n=this.long0,Math.abs(s)<=ot?(r=this.lat0,t.x=n,t.y=r,t):(r=Fs(h*this.sin_p14+t.y*a*this.cos_p14/s),e=Math.abs(this.lat0)-ht,Math.abs(e)<=ot?(n=qt(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y)),t.x=n,t.y=r,t):(n=qt(this.long0+Math.atan2(t.x*a,s*this.cos_p14*h-t.y*this.sin_p14*a)),t.x=n,t.y=r,t))},names:["ortho"]},ni={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ri={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4},oi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ht-ct/2?this.face=ni.TOP:this.lat0<=-(ht-ct/2)?this.face=ni.BOTTOM:Math.abs(this.long0)<=ct?this.face=ni.FRONT:Math.abs(this.long0)<=ht+ct?this.face=this.long0>0?ni.RIGHT:ni.LEFT:this.face=ni.BACK,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var s,i,a,h,e,n,r={x:0,y:0},o={value:0};if(t.x-=this.long0,s=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,this.face===ni.TOP)h=ht-s,i>=ct&&i<=ht+ct?(o.value=ri.AREA_0,a=i-ht):i>ht+ct||i<=-(ht+ct)?(o.value=ri.AREA_1,a=i>0?i-ft:i+ft):i>-(ht+ct)&&i<=-ct?(o.value=ri.AREA_2,a=i+ht):(o.value=ri.AREA_3,a=i);else if(this.face===ni.BOTTOM)h=ht+s,i>=ct&&i<=ht+ct?(o.value=ri.AREA_0,a=-i+ht):i=-ct?(o.value=ri.AREA_1,a=-i):i<-ct&&i>=-(ht+ct)?(o.value=ri.AREA_2,a=-i-ht):(o.value=ri.AREA_3,a=i>0?-i+ft:-i-ft);else{var l,M,c,u,f,m;this.face===ni.RIGHT?i=Z(i,+ht):this.face===ni.BACK?i=Z(i,+ft):this.face===ni.LEFT&&(i=Z(i,-ht)),u=Math.sin(s),f=Math.cos(s),m=Math.sin(i),l=f*Math.cos(i),M=f*m,c=u,this.face===ni.FRONT?a=V(h=Math.acos(l),c,M,o):this.face===ni.RIGHT?a=V(h=Math.acos(M),c,-l,o):this.face===ni.BACK?a=V(h=Math.acos(-l),c,-M,o):this.face===ni.LEFT?a=V(h=Math.acos(-M),c,l,o):(h=a=0,o.value=ri.AREA_0)}return n=Math.atan(12/ft*(a+Math.acos(Math.sin(a)*Math.cos(ct))-ht)),e=Math.sqrt((1-Math.cos(h))/(Math.cos(n)*Math.cos(n))/(1-Math.cos(Math.atan(1/Math.cos(a))))),o.value===ri.AREA_1?n+=ht:o.value===ri.AREA_2?n+=ft:o.value===ri.AREA_3&&(n+=1.5*ft),r.x=e*Math.cos(n),r.y=e*Math.sin(n),r.x=r.x*this.a+this.x0,r.y=r.y*this.a+this.y0,t.x=r.x,t.y=r.y,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,M={lam:0,phi:0},c={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),s=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?c.value=ri.AREA_0:t.y>=0&&t.y>=Math.abs(t.x)?(c.value=ri.AREA_1,s-=ht):t.x<0&&-t.x>=Math.abs(t.y)?(c.value=ri.AREA_2,s=s<0?s+ft:s-ft):(c.value=ri.AREA_3,s+=ht),l=ft/12*Math.tan(s),e=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),n=Math.atan(e),a=Math.cos(s),h=Math.tan(i),(r=1-a*a*h*h*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?r=-1:r>1&&(r=1),this.face===ni.TOP)o=Math.acos(r),M.phi=ht-o,c.value===ri.AREA_0?M.lam=n+ht:c.value===ri.AREA_1?M.lam=n<0?n+ft:n-ft:c.value===ri.AREA_2?M.lam=n-ht:M.lam=n;else if(this.face===ni.BOTTOM)o=Math.acos(r),M.phi=o-ht,c.value===ri.AREA_0?M.lam=-n+ht:c.value===ri.AREA_1?M.lam=-n:c.value===ri.AREA_2?M.lam=-n-ht:M.lam=n<0?-n-ft:-n+ft;else{var u,f,m;l=(u=r)*u,f=(l+=(m=l>=1?0:Math.sqrt(1-l)*Math.sin(n))*m)>=1?0:Math.sqrt(1-l),c.value===ri.AREA_1?(l=f,f=-m,m=l):c.value===ri.AREA_2?(f=-f,m=-m):c.value===ri.AREA_3&&(l=f,f=m,m=-l),this.face===ni.RIGHT?(l=u,u=-f,f=l):this.face===ni.BACK?(u=-u,f=-f):this.face===ni.LEFT&&(l=u,u=f,f=-l),M.phi=Math.acos(-m)-ht,M.lam=Math.atan2(f,u),this.face===ni.RIGHT?M.lam=Z(M.lam,-ht):this.face===ni.BACK?M.lam=Z(M.lam,-ft):this.face===ni.LEFT&&(M.lam=Z(M.lam,+ht))}if(0!==this.es){var p,d,y;p=M.phi<0?1:0,d=Math.tan(M.phi),y=this.b/Math.sqrt(d*d+this.one_minus_f_squared),M.phi=Math.atan(Math.sqrt(this.a*this.a-y*y)/(this.one_minus_f*y)),p&&(M.phi=-M.phi)}return M.lam+=this.long0,t.x=M.lam,t.y=M.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},li=[[1,2.2199e-17,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Mi=[[-5.20417e-18,.0124,1.21431e-18,-8.45284e-11],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ci=.8487,ui=1.3523,fi=Mt/5,mi=1/fi,pi=18,di=function(t,s){return t[0]+s*(t[1]+s*(t[2]+s*t[3]))},yi=function(t,s){return t[1]+s*(2*t[2]+3*s*t[3])},_i={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var s=qt(t.x-this.long0),i=Math.abs(t.y),a=Math.floor(i*fi);a<0?a=0:a>=pi&&(a=pi-1),i=Mt*(i-mi*a);var h={x:di(li[a],i)*s,y:di(Mi[a],i)};return t.y<0&&(h.y=-h.y),h.x=h.x*this.a*ci+this.x0,h.y=h.y*this.a*ui+this.y0,h},inverse:function(t){var s={x:(t.x-this.x0)/(this.a*ci),y:Math.abs(t.y-this.y0)/(this.a*ui)};if(s.y>=1)s.x/=li[pi][0],s.y=t.y<0?-ht:ht;else{var i=Math.floor(s.y*pi);for(i<0?i=0:i>=pi&&(i=pi-1);;)if(Mi[i][0]>s.y)--i;else{if(!(Mi[i+1][0]<=s.y))break;++i}var a=Mi[i],h=5*(s.y-a[0])/(Mi[i+1][0]-a[0]);h=Y(function(t){return(di(a,t)-s.y)/yi(a,t)},h,ot,100),s.x/=di(li[i],h),s.y=(5*i+h)*lt,t.y<0&&(s.y=-s.y)}return s.x=qt(s.x+this.long0),s},names:["Robinson","robin"]};return I.defaultDatum="WGS84",I.Proj=Projection,I.WGS84=new I.Proj("WGS84"),I.Point=Point,I.toPoint=Ft,I.defs=o,I.transform=S,I.mgrs=ts,I.version="2.5.0",function(proj4){proj4.Proj.projections.add(es),proj4.Proj.projections.add(ms),proj4.Proj.projections.add(ds),proj4.Proj.projections.add(vs),proj4.Proj.projections.add(gs),proj4.Proj.projections.add(bs),proj4.Proj.projections.add(ws),proj4.Proj.projections.add(As),proj4.Proj.projections.add(Cs),proj4.Proj.projections.add(Rs),proj4.Proj.projections.add(Us),proj4.Proj.projections.add(Qs),proj4.Proj.projections.add(Ws),proj4.Proj.projections.add(Ks),proj4.Proj.projections.add(Xs),proj4.Proj.projections.add(Vs),proj4.Proj.projections.add(Zs),proj4.Proj.projections.add(Ys),proj4.Proj.projections.add(ti),proj4.Proj.projections.add(si),proj4.Proj.projections.add(ii),proj4.Proj.projections.add(ai),proj4.Proj.projections.add(hi),proj4.Proj.projections.add(ei),proj4.Proj.projections.add(oi),proj4.Proj.projections.add(_i)}(I),I});