/** * The code below uses open source software. Please visit the URL below for an overview of the licenses: * http://js.api.here.com/v3/3.1.8.1/HERE_NOTICE */ (function(){var n,aa=[];function ba(a){return function(){return aa[a].apply(this,arguments)}}function ca(a,b){return aa[a]=b}var da="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ea="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this; function fa(a,b){if(b){var c=ea;a=a.split(".");for(var d=0;dc&&(c=Math.max(0,b+c));if(null==d||d>b)d=b;d=Number(d);0>d&&(d=Math.max(0,b+d));for(c=Number(c||0);c>>0),ya=0;function za(a,b,c){return a.call.apply(a.bind,arguments)} function Aa(a,b,c){if(!a)throw Error();if(2this.b&&(this.b++,a.next=this.a,this.a=a)};function Fa(){this.b=this.a=null}var Ia=new Ea(function(){return new Ha},function(a){a.reset()});Fa.prototype.add=function(a,b){var c=Ia.get();c.set(a,b);this.b?this.b.next=c:this.a=c;this.b=c};Fa.prototype.remove=function(){var a=null;this.a&&(a=this.a,this.a=this.a.next,this.a||(this.b=null),a.next=null);return a};function Ha(){this.next=this.b=this.a=null}Ha.prototype.set=function(a,b){this.a=a;this.b=b;this.next=null};Ha.prototype.reset=function(){this.next=this.b=this.a=null};function Ja(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}function Ka(a){for(var b in a)return!1;return!0}function La(a){var b={},c;for(c in a)b[c]=a[c];return b}function Na(a){var b=ua(a);if("object"==b||"array"==b){if(r(a.clone))return a.clone();b="array"==b?[]:{};for(var c in a)b[c]=Na(a[c]);return b}return a}var Oa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); function Pa(a,b){for(var c,d,e=1;eb?1:0};var Ta;a:{var Ua=oa.navigator;if(Ua){var Va=Ua.userAgent;if(Va){Ta=Va;break a}}Ta=""}function Wa(a){return Ra(Ta,a)};var Xa=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if(ra(a))return ra(b)&&1==b.length?a.indexOf(b,0):-1;for(var c=0;cXb.indexOf(a)&&Xb.push(a)}Yb(Xb); function Nb(a,b,c,d){var e="",f=2>arguments.length,g;f&&(b={H:y.H},c="",d=Xb.slice());Zb(b,!0,function(b,f){try{if(g=b[f],f=$b(b,g),!(wa(g)&&g.window===g&&g.self===g||wa(g)&&0d.indexOf(g)&&(d.push(g),e=Nb(a,g,c+"."+f,d)))return!0}}catch(l){}});f&&(e=e?e.substr(1).replace("."+Kb[0]+".","#"):"~"+(r(a)?ac(a)+"()":Pb(a)));return e} function $b(a,b){var c=[];Zb(a,!1,function(a,e){a[e]===b&&c.push(e)});return c.sort(bc)[0]}function bc(a,b){return b.length-a.length}var cc=Object[Kb[0]][Kb[2]];function Zb(a,b,c){var d;if(a){for(e in a)if((!b||cc.call(a,e))&&c(a,e,!0))return;for(d=Kb.length;d--;){var e=Kb[d];if((!b||cc.call(a,e))&&c(a,e,!1))break}}}function ac(a){return(a=/^\s*function ([^\( ]+)/.exec(a))?a[1]:"anonymous"}function dc(a,b,c){c[b]="#"+b}var ec=!!y.__karma__;function fc(){throw Error("unimplemented method");};function gc(a,b){b=b||{};"status"in b&&(this.status=+b.status);"statusText"in b&&(this.statusText=b.statusText);this.ok=200<=this.status&&300>this.status;this.bodyUsed=!1;a?"string"===typeof a?this.c=a:ArrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(a)||a.buffer)?this.a=a.buffer||a:Blob.prototype.isPrototypeOf(a)&&(this.b=a):this.c=""}u("H.net.Response",gc);gc.prototype.type="default";gc.prototype.type=gc.prototype.type;gc.prototype.status=200;gc.prototype.status=gc.prototype.status; gc.prototype.statusText="OK";gc.prototype.statusText=gc.prototype.statusText;gc.a=function(a){if(a.bodyUsed)return qb(new TypeError("Already read"));a.bodyUsed=!0};gc.error=function(){gc.b||(gc.b=new gc(null,{status:0,statusText:""}),gc.b.type="error");return gc.b};gc.error=gc.error;gc.prototype.text=function(){var a=gc.a(this);a||(this.c?a=pb(this.c):this.a?a=gc.c(this.a):this.b?a=gc.g(this.b):a=qb("Unsupported response body"));return a};gc.prototype.json=function(){return this.text().then(y.JSON.parse)}; gc.prototype.blob=function(){var a,b=gc.a(this);b||(this.b?a=this.b:this.a&&(a=new Blob([this.a],{type:"application/octet-stream"})));return b||pb(a)};gc.prototype.arrayBuffer=function(){return this.a?gc.a(this)||pb(this.a.slice(0)):this.blob().then(gc.f)};gc.f=function(a){var b=new FileReader;b.readAsArrayBuffer(a);return new gb(function(a,d){b.onload=function(){a(b.result)};b.onerror=function(){d(b.error)}})}; gc.g=function(a){var b=new FileReader;b.readAsText(a);return new gb(function(a,d){b.onload=function(){a(b.result)};b.onerror=function(){d(b.error)}})};gc.c=function(a){a=new Uint8Array(a);var b=a.length,c=Array(b),d;for(d=0;d(c=a%b)===0>b?c:c+b}function kd(a,b,c){b-=c=c||0;a-=c;return a-Lc(a/b)*b+c}u("H.math.normalize",kd);function ld(a,b,c){return a>c?c:a=b-d&&a<=c+d:a>=c-d&&a<=b+d}function nd(a,b,c,d,e,f){return Pc(Qc((a-e)*(d-f)-(b-f)*(c-e),2)/(Qc(c-e,2)+Qc(d-f,2)))}var od={NONE:0,VERTEX:1,EDGE:2,SURFACE:3};u("H.math.CoverType",od); function pd(a,b,c,d,e){for(var f=c.length,g=f,h,k,l,m=c[0],p=0,q=0,t=0,v=d/2||0,x=e?1:3;1!=p&&g>x;){h=c[--g];d=c[--g];l=c[g?g-1:(f+(g-1))%f];k=c[g?g-2:(f+(g-2))%f];if(d>=a-v&&d<=a+v&&h>=b-v&&h<=b+v||k>=a-v&&k<=a+v&&l>=b-v&&l<=b+v)p=1;else if(!p&&d===a)k===a&&(hb||h>b&&la||m>=a&&k=b?++q:++t),p=md(b,h,l,v)&&nd(a,b,d,h,k,l)<=v?2:0;else if(!p&&md(a,d,k,v)){if(da||d>a&&kb,t+=mthis.ae&&(this.qe(),this.fh().remove(this),this.ae=4)};function td(a){var b;this.a={};for(b in sd)this.a[sd[b]]=[];this.gg=a;this.gg.addEventListener("allocatable",A(this.b,this))}u("H.util.JobManager",td);var ud=Object.keys(sd).map(function(a){return sd[a]}).sort().reverse();td.prototype.add=function(a){C(a,qd,this.add,0);this.a[a.c].push(a);this.b()};td.prototype.contains=function(a){return-1parseFloat(Od)){Nd=String(Qd);break a}}Nd=Od}var Rd={},Sd;var Td=oa.document;Sd=Td&&Id?Md()||("CSS1Compat"==Td.compatMode?parseInt(Nd,10):5):void 0;var Ud;(Ud=!Id)||(Ud=9<=Number(Sd));var Vd=Ud,Wd; if(Wd=Id){var Xd;if(Object.prototype.hasOwnProperty.call(Rd,"9"))Xd=Rd["9"];else{for(var Yd,Zd=0,$d=Qa(String(Nd)).split("."),ae=Qa("9").split("."),be=Math.max($d.length,ae.length),ce=0;0==Zd&&ce=a.keyCode)a.keyCode=-1}catch(b){}};var le="closure_lm_"+(1E6*Math.random()|0),me={},ne=0;function oe(a,b,c,d,e){if(d&&d.once)return pe(a,b,c,d,e);if("array"==ua(b)){for(var f=0;fd.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.a&&0<=e;e--){b.currentTarget=d[e];var f=ze(d[e],a,!0,b);c=c&&f}for(e=0;!b.a&&e>>0);function qe(a){if(r(a))return a;a[Be]||(a[Be]=function(b){return a.handleEvent(b)});return a[Be]};function G(){Ac.call(this);this.W=new Bd(this);this.pn=this;this.Sg=null}w(G,Ac);G.prototype[wd]=!0;n=G.prototype;n.fc=function(){return this.Sg};n.ba=function(a){this.Sg=a};n.addEventListener=function(a,b,c,d){oe(this,a,b,c,d)};n.removeEventListener=function(a,b,c,d){we(this,a,b,c,d)}; n.dispatchEvent=function(a){var b,c=this.fc();if(c)for(b=[];c;c=c.fc())b.push(c);c=this.pn;var d=a.type||a;if(ra(a))a=new Ec(a,c);else if(a instanceof Ec)a.target=a.target||c;else{var e=a;a=new Ec(d,c);Pa(a,e)}e=!0;if(b)for(var f=b.length-1;!a.a&&0<=f;f--){var g=a.currentTarget=b[f];e=g.kd(d,!0,a)&&e}a.a||(g=a.currentTarget=c,e=g.kd(d,!0,a)&&e,a.a||(e=g.kd(d,!1,a)&&e));if(b)for(f=0;!a.a&&fb.status?a.resolve(b.json()):a.reject(b)},b)},"text/plain":function(){var a=this;return new hc(this.data,function(b){200<=b.status&&300>b.status?a.resolve(b.text()):a.reject(b)},ef(this.a))},image:function(){var a=y.document.createElement("img"),b=this,c=this.data;a.onload=A(this.resolve,this,a);a.onerror=function(){b.reject(gc.error())}; a.crossOrigin=this.a.crossOrigin;a.src=c;return{abort:function(){a.onerror=a.onload=null;Le&&Ye(a)||a.removeAttribute("src")}}}}; (function(){try{var a=new XMLHttpRequest;a.open("get","/",!0)}catch(b){a={}}"response"in a&&(cf.prototype.b.arraybuffer=function(){var a=new XMLHttpRequest,c=this,d=this.a,e=d.headers,f;a.open("GET",this.data);ff(a,d);a.responseType="arraybuffer";if(e)for(f in e)a.setRequestHeader(f,e[f]);a.onerror=a.ontimeout=function(){c.reject(gc.error())};a.onload=function(){c.resolve(new gc(a.response))};a.send();return a})})();var gf=new td(new af);cf.prototype.fh=function(){return gf};var df=y.document.createElement("a"); function ef(a){var b=La(a);delete b.crossOrigin;ff(b,a);return b}function ff(a,b){a.withCredentials="use-credentials"===b.crossOrigin};function H(a,b){this.x=+a;this.y=+b}u("H.math.Point",H);H.prototype.set=H;H.prototype.set=H.prototype.set;H.prototype.clone=function(a){a?(a.x=this.x,a.y=this.y):a=new H(this.x,this.y);return a};H.prototype.clone=H.prototype.clone;H.prototype.add=function(a){this.x+=a.x;this.y+=a.y;return this};H.prototype.add=H.prototype.add;H.prototype.sub=function(a){this.x-=a.x;this.y-=a.y;return this};H.prototype.sub=H.prototype.sub;H.prototype.scale=function(a,b){this.x*=a;this.y*=void 0===b?a:b;return this}; H.prototype.scale=H.prototype.scale;H.prototype.round=function(){this.x=Kc(this.x);this.y=Kc(this.y);return this};H.prototype.round=H.prototype.round;H.prototype.floor=function(){this.x=Lc(this.x);this.y=Lc(this.y);return this};H.prototype.floor=H.prototype.floor;H.prototype.ceil=function(){this.x=Mc(this.x);this.y=Mc(this.y);return this};H.prototype.ceil=H.prototype.ceil;H.prototype.da=function(a){return!(!a||this.x!==a.x||this.y!==a.y)};H.prototype.equals=H.prototype.da; H.prototype.xj=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=a;if(c||d){var f=((this.x-a.x)*c+(this.y-a.y)*d)/(c*c+d*d);0>=f?e=a:1<=f?e=b:e=new H(a.x+f*c,a.y+f*d)}return e};H.prototype.getNearest=H.prototype.xj;H.prototype.bb=function(a){return Pc(Qc(this.x-a.x,2)+Qc(this.y-a.y,2))};H.prototype.distance=H.prototype.bb;function hf(a){if(!a)throw Error("invalid argument");return a instanceof H?a:new H(a.x,a.y)}H.fromIPoint=hf;function jf(a){var b=kf[a];if(!b)if(a in lf)b=kf[a]=a;else{b=mf.length;var c="",d=a.charAt(0).toUpperCase()+a.substr(1),e="",f=!1;nf&&(e=nf+d,f=e in lf);for(;b--&&!f;)c=mf[b],e=c+d,f=e in lf;f&&(nf=c);if(b=f?e:null)kf[a]=b;else throw Error("Could not find any variant of CSS property ["+a+"]");}return b}u("H.dom.cssPrefixer.prefix",jf);var mf=["O","Ms","ms","Moz","Webkit"],kf={},nf="",lf=document.createElement("span").style;function of(a,b,c,d){if(!a||!b||!c)throw new D(of,null,"Must specify name, version and revision parameter");this.name=a;this.version=b;this.revision=c;d&&Pa(this,d)}u("H.util.BuildInfo",of);of.prototype.toString=function(){var a,b=[];for(a in this)ra(this[a])&&b.push(this[a]);return b.join(";")};var pf={};function qf(a,b,c,d){if(!a)throw new D(qf,1,"Must specify a name parameter");return pf[a]||(pf[a]=new of(a,b,c,d))}of.get=qf;function rf(){rf.l.constructor.call(this);this.a=sf(this);this.f=Fb();this.c=A(this.c,this);this.a.addEventListener("message",this.c);this.b={}}w(rf,G);rf.prototype.s=function(){this.a.terminate()};rf.prototype.i=function(a){var b=a.type,c=!!this.f[b],d=a.data,e=tf++,f=d&&d.oo?d.oo:B,g=!0;c?(this.b[e]=a,uf(this,b,e,d&&d.message,f)):(a.reject(new D(this.i,0,"processor_not_found")),g=!1);return g}; rf.prototype.c=function(a){a=a.data;var b=this.b[a.taskId],c=a.taskId,d=a.data,e=this;if(2===a.type)(new cf("arraybuffer",d)).then(function(a){return a.arrayBuffer()}).then(function(a){e.a.postMessage(["3",c,[a]],[a])},function(){e.a.postMessage(["3",c,[null,"ERROR"]])});else{if(b){switch(a.type){case 1:b.resolve(d);break;case 0:b.reject(d)}delete this.b[c]}this.dispatchEvent(new Ec(this.g.IDLE))}};var tf=0;function vf(a,b,c){var d=tf++,e;a.b[d]=e=rb();uf(a,b,d,c);return e.bi} function uf(a,b,c,d,e){d===B||va(d)||(d=[d]);try{a.a.postMessage([b,c,d],e)}catch(f){a=a.b[c],a.reject(f.message)}}rf.prototype.g={IDLE:"idle",Mi:"error"};rf.prototype.j=function(a,b){var c=this.m||(this.m=new Ec(this.g.Mi));c.data=b;delete this.f[a];this.dispatchEvent(c)}; function sf(a){var b=y.H.__bootstrap__;b=r(b)?(""+b).replace(/^[^{]+{((.|[\r\n])+?)}\s*$/,"$1"):""+b;if(y.Worker&&y.URL)try{var c=new y.Worker(y.URL.createObjectURL($e(b,"application/javascript")))}catch(d){}c||(a=new wf(a),function(){eval("var self = arguments[0];"+b)}(a),c=new xf(a));return c}function xf(a){G.call(this);this.a=a}w(xf,G);xf.prototype.postMessage=function(a){y.setTimeout(A(this.b,this,a),0)};xf.prototype.b=function(a){var b=new Ec("message");b.data=a;this.a.dispatchEvent(b)}; xf.prototype.terminate=function(){this.a.F();this.F()};function wf(a){G.call(this);this.a=a;this.addEventListener=A(this.addEventListener,this);this.removeEventListener=A(this.removeEventListener,this);this.postMessage=A(this.postMessage,this);this.eval=A(eval,this)}w(wf,G);wf.prototype.postMessage=function(a){var b=new Ec("message");b.data=a;y.setTimeout(A(this.a.c,this.a,b),0)};function yf(){var a=zf;a||(a=zf=this,G.call(a),Af(this));return a}var zf;w(yf,G);yf.prototype.s=function(){yf.l.s.call(this);Af(this)};function Af(a){var b=a.b,c;if(b)for(c=b.length;c--;)b[c].F();a.b=[];Yb(a.b);a.c=Fb();a.f=Fb()} yf.prototype.Eg=function(a){var b;a=a.type;if(b=this.f[a]){var c=this.b;var d=c[0];d||(d=c[0]=new rf,this.xb(Ca(Dc,d)),Ka(this.c)||(c=y.Object.keys(this.c),vf(d,"0",c)));c=d;c.f[a]||(c.f[a]=b,vf(c,"1",[a,r(b)?b+"":b]).then(vc,A(c.j,c,a)))}else throw new nc(this.Eg,'Unknown type "'+a+'"');return d};yf.prototype.Qg=function(){};yf.prototype.a=function(a,b){var c=this.f,d=c[a];if(d){if(b!==d)throw new nc(this.a,'Type "'+a+'" is already registered');}else c[a]=b};function Bf(a,b,c){qd.call(this,a,b,c)}var Cf;w(Bf,qd);Bf.prototype.fh=function(){Cf||(Cf=new td(new yf));return Cf};Bf.prototype.qe=function(){};Bf.prototype.qj=function(a){return a.i(this)};function Df(a,b,c){var d=ld(+a,-90,90);if(b&&F(d))throw new D(b,c,a);return d}function Ef(a,b,c){var d=+a;if(-180>d||180a^0>b)&&180ad&&(f=0ad?$c:0))%cd-$c)*fd):this};I.prototype.walk=I.prototype.rg;I.prototype.I=function(){return new J(this.lat,this.lng,this.lat,this.lng)};I.prototype.getBoundingBox=I.prototype.I;function If(a,b,c){var d=wa(a)&&!(F(a.lat=Df(a.lat))||F(a.lng=Ef(a.lng))||a.alt!==B&&F(a.alt=Ff(a.alt)));if(!d&&b)throw new D(b,c,a);return d}I.validate=If; function Jf(a){if(!a)throw new D(Jf,0,a);return new I(a.lat,a.lng,a.alt)}I.fromIPoint=Jf;I.prototype.nb="Point";I.prototype.Oc=function(a){a.push("(",this.lng," ",this.lat,")");return a};I.prototype.uc=function(){return[this.lat,this.lng,this.alt||0]};function J(a,b,c,d){Lf(this,Df(a,J,0),Ef(b,J,1),Df(c,J,2),Ef(d,J,3))}w(J,Hf);u("H.geo.Rect",J);J.prototype.nb="Polygon";J.prototype.Oc=function(a){var b=this.oa,c=this.aa,d=this.ka,e=this.ea;a.push("(","(",c," ",b,",",e," ",b,",",e," ",d,",",c," ",d,",",c," ",b,")",")");return a};J.prototype.da=function(a){return this===a||!!a&&this.oa===a.oa&&this.aa===a.aa&&this.ka===a.ka&&this.ea===a.ea};J.prototype.equals=J.prototype.da;J.prototype.clone=function(){return new J(this.oa,this.aa,this.ka,this.ea)}; J.prototype.clone=J.prototype.clone;function Lf(a,b,c,d,e){a.aa=c;a.ea=e;bthis.ea};J.prototype.isCDB=J.prototype.Gb;J.prototype.Nf=function(){return!this.Fb()&&!this.Od()};J.prototype.isEmpty=J.prototype.Nf;J.prototype.I=function(){return new J(this.oa,this.aa,this.ka,this.ea)};J.prototype.getBoundingBox=J.prototype.I; J.prototype.vf=function(a,b,c){var d=this.lb();c||(a=Df(a,this.vf,0),b=Ef(b,this.vf,1));b=this.bd(a,b,c);a=b.lb();return a.lat===d.lat&&a.lng===d.lng&&this.Od()===b.Od()&&this.Fb()===b.Fb()};J.prototype.containsLatLng=J.prototype.vf;J.prototype.Gd=function(a,b){b||If(a,this.Gd,0);return this.vf(a.lat,a.lng,b)};J.prototype.containsPoint=J.prototype.Gd; J.prototype.Kg=function(a,b){var c=this.lb();if(!b&&!C(a,J))throw new D(this.Kg,0,a);b=this.jc(a,b);a=b.lb();return a.lat===c.lat&&a.lng===c.lng&&this.Od()===b.Od()&&this.Fb()===b.Fb()};J.prototype.containsRect=J.prototype.Kg;J.prototype.bd=function(a,b,c,d){if(!c){if(F(a=Df(a)))throw new D(this.bd,0,a);if(F(b=Ef(b)))throw new D(this.bd,1,b);}return Of(this.oa,this.aa,this.ka,this.ea,a,b,a,b,d)};J.prototype.mergeLatLng=J.prototype.bd; J.prototype.hk=function(a,b,c){b||If(a,this.hk,0);return this.bd(a.lat,a.lng,b,c)};J.prototype.mergePoint=J.prototype.hk;J.prototype.jc=function(a,b,c){if(!b&&!C(a,J))throw new D(this.jc,0,a);return Of(this.oa,this.aa,this.ka,this.ea,a.oa,a.aa,a.ka,a.ea,c)};J.prototype.mergeRect=J.prototype.jc;J.prototype.Fc=function(a,b,c,d,e,f){e||(a=Df(a,this.Fc,0),b=Ef(b,this.Fc,1),c=Df(c,this.Fc,2),d=Ef(d,this.Fc,3));return Of(this.oa,this.aa,this.ka,this.ea,a,b,c,d,f)};J.prototype.mergeTopLeftBottomRight=J.prototype.Fc; J.prototype.Vd=function(a,b){var c=this.aa<=this.ea,d=a.aa<=a.ea,e=this.aaa?360:0)}function Mf(a,b){a+=b/2;return a-(180m-1E-6?360:0;if(180>m-1E-6){l=b;var p=h}else m=360-m,l=f,p=d;m=m+e/2+g/2;360<=m+5E-7?(l=-180,p=180):m-5E-7k?-(g+a.lng):k;a=c+(0>k?2*k:0);a=-180>a?360+a:a;e+=0h?f+2*h:f;-90>=f&&(f=-90);return b?Lf(b,d,a,f,e):new J(d,a,f,e)};J.prototype.resizeToCenter=J.prototype.Dk;J.prototype.U=function(){return this.uc()};J.prototype.uc=function(){return[this.oa,this.aa,this.ka,this.ea]};function Tf(a,b,c,d,e,f){Mb(this,Tf);this.c=a||10;this.b=this.a=null;this.f=d||0;this.g=e||0;this.i=b||1;this.j=c||1;this.u=!!f;this.flush()}var Uf={sl:0,tl:1,hl:2,il:3};function Vf(a){var b=a.b;if(a.u&&!b){var c=a.head;if(c.entries||c[0]||c[1]||c[2]||c[3])b=[c],b=Wf([b,b,b,b],[c[6],c[7],c[4],c[5]]),a.b=b}return b} function Wf(a,b){var c,d,e,f,g=0;for(c=3;0<=c;c--){var h=c+4;var k=0m:tm:e[h]=d[e]:f<=d[e])if(c)d[e]=f;else{a.b=null;break}}} Tf.prototype.remove=function(a){var b,c,d,e=!1;a&&(b=a.node)&&b.b===this&&(c=b.entries)&&0<=(d=c.indexOf(a))&&(c.splice(d,1),this.m(b),Xf(this,a,!1),e=!0);return e};Tf.prototype.flush=function(){var a=new Yf(null,NaN,this.f-this.i,this.g-this.j,this.f+this.i,this.g+this.j);a.b=this;this.head=this.a=a;this.b=null};function Zf(a,b){var c=a.head,d;if(b){var e=b;if(e!==c)for(c=e;e=e.parent;)if(e.entries||1(d=c.a);)if(d)c=e;else break;a.head=c} Tf.prototype.Za=function(a,b,c,d){var e=[],f=this.head,g=this.a;a<=f[5]&&b<=f[6]&&c>f[7]&&d>f[4]&&$f(this,f,e,a,b,c,d,d>=g[6],c>=g[5]);return e}; function $f(a,b,c,d,e,f,g,h,k){var l=b.entries,m=b[7],p=b[4],q=b[5],t=b[6],v=b[8],x=b[9],E;if(l){var O=l.length;if(e>p||d>m||g=e&&t>=d&&(qv&&(ex&&(E=b[Uf.il])&&$f(a,E,c,d,e,f,g,h,k));dx&&(E=b[Uf.hl])&&$f(a,E,c,d,e,f,g,h,k))}Tf.prototype.Pc=ba(1);var ag=0; function Yf(a,b,c,d,e,f){this.c=b;a&&(this.parent=a,this.b=a.b,b&1?(c=a[8],e=a[5]):(c=a[7],e=a[8]),b&2?(d=a[9],f=a[6]):(d=a[4],f=a[9]));this[7]=c;this[5]=e;this[8]=(c+e)/2;this[4]=d;this[6]=f;this[9]=(d+f)/2}Yf.prototype.a=0;function bg(a,b){return a[b]||(++a.a,a[b]=new Yf(a,b))}Yf.prototype.removeChild=function(a){var b=a.c;this[b]===a&&(delete this[b],delete a.parent,--this.a)};Yf.prototype.Pc=ba(0);function cg(a,b){(a.entries||(a.entries=[])).push(b);b.node=a} function dg(a,b,c,d,e){var f=a[5],g=a[6];return a[7]<=b&&a[4]<=c&&(f>d||f===d&&f===a.b.a[5])&&(g>e||g===e&&g===a.b.a[6])};function eg(a,b,c,d,e,f){eg.l.constructor.apply(this,arguments)}w(eg,Tf);eg.prototype.m=function(a){for(var b,c,d=this.head;a;){if(!(b=a.entries)||!b.length)if(b&&delete a.entries,!a.a&&(c=a.parent)){c.removeChild(a);d===a&&(d=c);a=c;continue}a=z}this.head!==d&&(this.head=d,Zf(this))};function fg(a,b,c,d,e){if(dg(a.a,b,c,d,e))return gg(a,a.a,b,c,d,e,a.c);throw Error("Coordinates out of bounds");}eg.prototype.Cc=function(a,b){return fg(this,a,b,a,b)}; function gg(a,b,c,d,e,f,g){var h=b[8],k=b[9],l,m;g&&(e=h))&&(f=k))?c=gg(a,bg(b,l|m<<1),c,d,e,f,g-1):(cg(b,c=new hg(c,d,e,f)),Xf(a,c,!0),Zf(a,b));return c}function hg(a,b,c,d){this.id=ag++;this[0]=b;this[1]=c;this[2]=d;this[3]=a}hg.prototype.md=function(a){return this[a]};function ig(a){this.f=new eg(+a||10,180,90,0,0,!0);this.c=[];this.g=!1;this.a=this.b=this.N=null}u("H.geo.QuadTree",ig);n=ig.prototype;n.Dh=0;n.Yc=function(){return this.Dh};n.Gb=function(){return this.g}; n.I=function(){var a,b;if(!this.N){var c=[];!this.b&&(a=Vf(this.f))&&(this.b=new J(-a[0],a[3],-a[2],a[1]));(b=this.b)&&c.push(b);var d,e,f;if(!this.a&&(f=(e=this.c).length)){a=90;var g=360;var h=-90;for(d=0;f--;){var k=e[f];a=Ic(a,k[0]);g=Ic(g,k[3]);h=Jc(h,k[2]);d=Jc(d,k[1])}this.a=new J(-a,g,-h,d-360)}(b=this.a)&&c.push(b);if(b=c[0])c[1]&&(b=b.jc(c[1],!0)),this.N=b}return this.N}; function jg(a,b,c,d,e,f){f?(f=new hg(e,-b,c+360,-d),a.c.push(f),a.g=!0,a.a&&a.a.Fc(b,c,d,e,!0,a.a)):(f=fg(a.f,c,-b,e,-d),a.b&&a.b.Fc(b,c,d,e,!0,a.b));++a.Dh;a.N=null;return f}n.Cc=function(a){var b=a.lng;a=a.lat;return jg(this,a,b,a,b,!1)};n.Mj=function(a){var b=a.Qb(),c=a.Nb();return(a=a.Gb())?jg(this,b.lat,c.lng,c.lat,b.lng,a):jg(this,b.lat,b.lng,c.lat,c.lng,a)};ig.prototype.insertBoundingBox=ig.prototype.Mj; ig.prototype.remove=function(a){var b;if(a.node){var c=this.f.remove(a);this.b=null}else if(a=(b=this.c).indexOf(a),c=0<=a)b.splice(a,1),this.g=0=b&&g>=c} function mg(a,b){var c,d,e;if(c=b.length){var f=a.length;for(d={};f--;)d[a[f].id]=1;for(;c--;)(e=b[c]).id in d||a.push(e)}}ig.prototype.Mf=function(a){var b=this.f,c=a.Qb(),d=a.Nb(),e=-c.lat;c=c.lng;var f=-d.lat;d=d.lng;e===f||c===d?a=[]:a.Gb()?(a=b.Za(-180,e,d,f),mg(a,b.Za(c,e,180,f)),mg(a,kg(this,e,d,f,c+360))):(a=b.Za(c,e,d,f),mg(a,kg(this,e,c,f,d)));return a};ig.prototype.intersectBoundingBox=ig.prototype.Mf;function K(a){K.l.constructor.call(this);a&&ng(a,K,0);this.qa=a||[];this.a=og(this,0,this.qa.length)}w(K,Hf);u("H.geo.LineString",K);function og(a,b,c){a=a.qa;var d=0;b=Jc(b,0);c=Ic(c,a.length);c-=2;for(b+=1;be&&180k-e||eNc(e-k)){var l=k;k=e;e=l}hd+1){var E=[c[l],c[l+1]];e.push(E)}d=h;E.push(c[l+3],c[l+4])}if(a.a){c=[];d=e.length;for(b=0;bf?360:-360,k.push(E[a-2],f,h,l));c.push(k)}e=c}return e}K.prototype.nb="LineString";K.prototype.Oc=function(a){var b=this.qa,c=b.length,d;if(c){a.push("(");for(d=0;da[c]&&(a[c]+=360)}return a};function tg(a){tg.l.constructor.call(this);void 0!==a&&(this.data=a)}w(tg,G);u("H.map.Feature",tg);tg.prototype.getData=function(){return this.data};tg.prototype.getData=tg.prototype.getData;tg.prototype.s=function(){tg.l.s.call(this);delete this.data};function ug(){}u("H.map.provider.Invalidations",ug);ug.MARK_INITIAL=hd;ug.prototype.update=function(a,b){b!==vg.NONE&&(this.a=a,b&vg.SPATIAL&&(this.f=a),b&vg.VISUAL&&(this.g=a),b&vg.ADD&&(this.b=a),b&vg.REMOVE&&(this.c=a),b&vg.Z_ORDER&&(this.j=a),b&vg.VOLATILITY&&(this.i=a))};ug.prototype.update=ug.prototype.update;ug.prototype.Am=function(){return this.a};ug.prototype.getMark=ug.prototype.Am;ug.prototype.a=hd;ug.prototype.kn=function(a){return this.a>a};ug.prototype.isAny=ug.prototype.kn; ug.prototype.g=hd;ug.prototype.Yd=function(a){return this.g>a};ug.prototype.isVisual=ug.prototype.Yd;ug.prototype.f=hd;ug.prototype.xh=function(a){return this.f>a};ug.prototype.isSpatial=ug.prototype.xh;ug.prototype.b=hd;ug.prototype.Oj=function(a){return this.b>a};ug.prototype.isAdd=ug.prototype.Oj;ug.prototype.c=hd;ug.prototype.Of=function(a){return this.c>a};ug.prototype.isRemove=ug.prototype.Of;ug.prototype.j=hd;ug.prototype.yh=function(a){return this.j>a};ug.prototype.isZOrder=ug.prototype.yh; ug.prototype.i=hd;ug.prototype.on=function(a){return this.i>a};ug.prototype.isVolatility=ug.prototype.on;var vg={NONE:0,VISUAL:1,SPATIAL:2,ADD:4,REMOVE:8,Z_ORDER:16,VOLATILITY:32};ug.Flag=vg;function wg(a,b,c){wg.l.constructor.call(this,a);this.oldValue=c;this.newValue=b}w(wg,Ec);u("H.util.ChangeEvent",wg);function L(a){Mb(this,L);L.l.constructor.call(this,a?a.data:B);this.G=xg.next();if(a){var b="min";Tb(a[b])&&(this.o=a[b]);b="max";Tb(a[b])&&(this.u=a[b]);b="visibility";b in a&&(this.g=!!a[b]);b="volatility";b in a&&(this.D=!!a[b]);b="zIndex";b in a&&(this.m=+a[b]||0);b="provider";b in a&&(this.a=a[b],this.Aa(vg.ADD))}}w(L,tg);u("H.map.Object",L);var xg=new Oe(1),yg={ANY:0,OVERLAY:1,SPATIAL:2,MARKER:3,DOM_MARKER:4,GROUP:5};L.Type=yg;L.prototype.eb=function(){return this.G}; L.prototype.getId=L.prototype.eb;L.prototype.o=-1/0;L.prototype.u=1/0;L.prototype.Bm=function(){return this.u};L.prototype.getMax=L.prototype.Bm;L.prototype.Dm=function(){return this.o};L.prototype.getMin=L.prototype.Dm;L.prototype.g=!0;L.prototype.wb=function(a){var b=this.g;(a=!!a)^b&&(this.g=a,this.invalidate(vg.VISUAL));return this};L.prototype.setVisibility=L.prototype.wb;L.prototype.Ac=function(a){for(var b=this,c;(c=b.g)&&a&&(b=b.Va););return c};L.prototype.getVisibility=L.prototype.Ac; L.prototype.D=!1;L.prototype.Dj=function(a){for(var b=this,c;!(c=b.D)&&a&&(b=b.Va););return c};L.prototype.getVolatility=L.prototype.Dj;L.prototype.Uk=function(a){var b=this.D;b^a&&(this.D=!b,this.invalidate(vg.VOLATILITY));return this};L.prototype.setVolatility=L.prototype.Uk;L.prototype.m=B;L.prototype.Ej=function(){return this.m};L.prototype.getZIndex=L.prototype.Ej;L.prototype.ff=function(a){a!==this.m&&(this.Ze(),this.m=a,this.invalidate(vg.Z_ORDER));return this};L.prototype.setZIndex=L.prototype.ff; L.prototype.B=B;function zg(a){var b=a.B,c,d;if(!b){var e=(c=a.m)!==B;(b=a.Va)?(b=zg(b).slice(),b[0]|=e):b=[e|0];b.push(c||0,0>(d=a.yi)?a.G:d);a.B=b}return b}L.prototype.Ze=function(){this.B=B};function Ag(a,b,c){var d,e;if(!c||a[0]|b[0]){var f=a.length;var g=b.length;var h=Ic(f,g);var k=1;for(e=1+c;k=a?+a:Gg},function(a){a=Gb(a);return"butt"===a||"square"===a||"round"===a||"arrow-head"===a||"arrow-tail"===a?a:Gg},function(a){return"round"===a||"bevel"===a||"miter"===a?a:Gg},function(a){return 0=a?+a:Gg},function(a){return a&&a.every&&a.every(Vb)?a:Gg},function(a){return F(+a)?Gg:+a},function(a){return Lb(a)?Fg[3](a):B},function(a){return Lb(a)?Fg[3](a):B}];Cg.MAX_LINE_WIDTH=100; var Hg=new Cg;Cg.DEFAULT_STYLE=Hg;var Ig="fillColor strokeColor lineWidth lineCap lineJoin miterLimit lineDashOffset lineDash lineTailCap lineHeadCap".split(" ");Cg.prototype.U=function(){for(var a={},b=Ig.length,c;b--;)c=Ig[b],a[c]=this[c];return a};Cg.prototype.forWorkerMessage=Cg.prototype.U;function Jg(a){var b;if(a){var c=C(a,Jg);for(b in a)if(b in this){var d=a[b];d!==this[b]&&("fillColor"===b||0<(d=+d))&&(this[b]=d)}a=c?a.Rb:!!(Ke(this.fillColor)&&this.width&&this.width);a||(this.Rb=a)}Hb(this)}u("H.map.ArrowStyle",Jg);Jg.prototype.Rb=!0;Jg.prototype.fillColor="rgba(255,255,255,.75)";Jg.prototype.width=1.2;Jg.prototype.length=1.6;Jg.prototype.frequency=5;Jg.prototype.uj=function(){return new Jg(this)}; Jg.prototype.da=function(a){var b=this===a;!b&&a&&(b=a.width===this.width&&a.fillColor===this.fillColor&&a.length===this.length&&a.frequency===this.frequency);return b};Jg.prototype.equals=Jg.prototype.da;function Kg(a,b){var c;Kg.l.constructor.call(this,b);b&&this.fd(b.style);a&&(this.j=!0);b&&(c=b.arrows)&&this.Jk(c)}w(Kg,L);u("H.map.Spatial",Kg);Kg.prototype.type=yg.SPATIAL;Kg.prototype.sg=0;Kg.prototype.style=Hg;Kg.prototype.Ia=function(){return this.style};Kg.prototype.getStyle=Kg.prototype.Ia;Kg.prototype.fd=function(a){var b=!0;a?this.style=C(a,Cg)?a:new Cg(a):this.style?delete this.style:b=!1;b&&this.invalidate(vg.VISUAL);return this};Kg.prototype.setStyle=Kg.prototype.fd; Kg.prototype.Ul=function(){return this.f};Kg.prototype.getArrows=Kg.prototype.Ul;Kg.prototype.Jk=function(a){var b=this.f,c=!1;!a&&b?(delete this.f,c=!0):!a||b&&b.da(a)||(this.f=new Jg(a),c=!0);c&&"none"!==this.style.strokeColor&&this.Aa(1);return this};Kg.prototype.setArrows=Kg.prototype.Jk;function Lg(a,b){var c=!1,d=!1,e;if(b.length){for(c=0;cf?-360:360);a.X=c;return e.zh(b,c+d)} function Rg(a,b,c){for(var d=b,e,f=a.length+b,g,h;d--;){b=a[d];g=b.length;for(e=Array(g);g--;)h=b[g],e[g]=new H(h.x+c,h.y);a[--f]=e}}var Sg=new K([0,0,0,0,0,0,0,0,0]);function Tg(a){Mb(this,Tg);Tg.l.constructor.call(this);this.sa=Ug(this,a,this.constructor,0)}w(Tg,Hf);u("H.geo.MultiGeometry",Tg);Tg.prototype.splice=function(a,b,c){a=[a];b!==B&&a.push(b);c&&(b=Ug(this,c,this.splice,2),a=a.concat(b));this.N=z;return this.sa.splice.apply(this.sa,a)};Tg.prototype.splice=Tg.prototype.splice;Tg.prototype.lc=function(a){var b=this.sa.length;if(!(0<=a&&aa.Ie())throw new D(b,0);} function Yg(a,b,c,d){var e=sg(b,c.Ff());if(e.length&&(b=c.Hf(),a=Og(a,e,!1,b),e=a.length)){var f=c.Ke();b=b.w;c.x||Rg(a,e,-b);c.x===(1<a?B:this.og(a,1)[0]};N.prototype.removeInterior=N.prototype.Tn; N.prototype.xk=function(a){if(!C(a,K))throw new D(this.xk,0,a);this.gb.push(a)};N.prototype.pushInterior=N.prototype.xk;N.prototype.I=function(){var a=this.N;a||(this.N=a=ch(this.ec,this.qd));return a};N.prototype.getBoundingBox=N.prototype.I;n=N.prototype;n.tj=function(a){var b=this.gb.length;if(0>a||a>=b)throw new vd(this.tj,a,[0,b-1]);(b=this.a[a])||(this.a[a]=b=ch(this.gb[a],this.qd));return b};n.ec=z;n.gb=[]; function ch(a,b){var c,d,e;if(e=a.I())(c=a.ah(!0))&&(d=a.Ie())&&(e=e.jc(Qf([a.we(0),a.we(d-1)],!0),!0)),360===e.Fb()&&1===c%2&&(e=e.bd(b,0));return e}n.nb="Polygon";n.Oc=function(a){var b=this.gb,c=b.length,d;if(this.ec.Ie()){a.push("(");this.ec.Oc(a);for(d=0;dgh)throw new vd(fh,e,[0,gh]);C(a,K)?this.fa(new N(a)):this.fa(a)}w(fh,Ng);u("H.map.Polygon",fh);fh.prototype.i=0;fh.prototype.c=0;fh.prototype.cb=z;var gh=2047;fh.MAX_EXTRUDE_HEIGHT=gh;fh.prototype.ki=function(a){var b=+a;if(b!==a)throw new D(this.ki,0,a);if(0>b||this.c+b>gh)throw new vd(this.ki,this.c+b,[0,gh]);this.i=b;this.Aa(vg.SPATIAL)}; fh.prototype.setExtrusion=fh.prototype.ki;fh.prototype.im=function(){return this.i};fh.prototype.getExtrusion=fh.prototype.im;fh.prototype.ji=function(a){var b=+a;if(b!==a)throw new D(this.ji,0,a);if(0>b||this.i+b>gh)throw new vd(this.ji,this.i+b,[0,gh]);this.c=b;this.Aa(vg.SPATIAL)};fh.prototype.setElevation=fh.prototype.ji;fh.prototype.gm=function(){return this.c};fh.prototype.getElevation=fh.prototype.gm;fh.prototype.pa=function(){return this.cb};fh.prototype.getGeometry=fh.prototype.pa; fh.prototype.fa=function(a){if(a===z||C(a,N))var b=!1;else C(a,dh,this.fa,0),b=!0;this.od=b;b=this.cb;this.cb=a;b!==z&&this.Aa(vg.SPATIAL);return this};fh.prototype.setGeometry=fh.prototype.fa;fh.prototype.I=function(){return this.pa().I()};fh.prototype.getBoundingBox=fh.prototype.I; fh.prototype.Nd=function(a){var b,c=this.pa(),d,e;if(this.od){c=c.sa;var f=0;for(e=c.length;fh&&-180==g.aa&&(g=new J(g.oa,180,g.ka,g.ea));360>h&&180==g.ea&&(g=new J(g.oa,g.aa,g.ka,-180));if(g.Gb()){h=l;v=h.length;l=-1;for(m=0;mp?-x:x),m=0g.Fb()&&g.Gd(new I(g.oa,180))&&(l=jh([].concat(l),g.ea),k.push(l));g=c.Hf();a=Og(a,k,!0,g);if(360===e.Fb()&&1===b.ah(!0)%2){b=a;a=c.Ke();b[0][1].x>b[0][b[0].length-1].x&&(b[0]=b[0].reverse());l=[];h=b[0].length-1;for(k=0;kd?d=l:le?e=m:me;e+=120)f.fi(c,e-180,B);else for(a=a.v,a=360/a;360>e;e+=a)f.sd(b.rg(e,d,!0));b=new N(f);0>c&&b.Qk(bh.SOUTH);return b};function rh(a,b){if(!C(a,Element)){sh.innerHTML=a;a=sh.firstElementChild;if(!a)throw new D(rh,0,"No element data");sh.removeChild(a);var c=!0;sh.innerHTML=""}this.a=0!==Ve(a).length;this.c=c?a:We(a,y.document,this.a);b&&(c="onAttach",c in b&&Ob(a=b[c],"Function",rh,1,c)&&(this.Sh=a),c="onDetach",c in b&&Ob(a=b[c],"Function",rh,1,c)&&(this.b=a))}u("H.map.DomIcon",rh);var sh=document.createElement("DIV");rh.prototype.Sh=null;rh.prototype.b=null;rh.prototype.uj=function(a){return We(this.c,a,this.a)}; rh.prototype.a=!1;function th(a){th.l.constructor.call(this,a)}w(th,Tg);u("H.geo.MultiPoint",th);th.prototype.a=function(a){return If(a)};th.prototype.b=function(a){return C(a,I)?a:Jf(a)};th.prototype.nb="Multi"+I.prototype.nb;function uh(a,b){this.w=+a;this.h=+b}u("H.math.Size",uh);function vh(a,b){var c;var d=a;var e=b||[];if(a!==wh.NONE){b=c=e.length;if(-1===this.b.indexOf(d))throw new D(vh,0,a);if(!e)throw new D(vh,1,e);for(;c--;)if(F(e[c]))throw new D(vh,1,e);d===wh.RECT&&3',size:new uh(38, 47),anchor:new H(19,45),hitArea:new vh(3,[19,46,2,27,0,18,5,6,19,0,32,5,38,15,36,27,19,47])};xh.prototype.U=function(){var a=xh.l.U.call(this),b=this.Ab(),c=b.Db(),d=b.ld();a.geometry=this.pa().U();c&&(b=a.properties.icon={id:b.uid},b.size={w:c.w,h:c.h},b.offset=[c.w/2-(d?d.x:0),c.h/2-(d?d.y:0)]);return a};xh.prototype.forWorkerMessage=xh.prototype.U;function Ah(a,b){Ah.l.constructor.call(this,a,b)}w(Ah,xh);u("H.map.DomMarker",Ah);Ah.prototype.type=yg.DOM_MARKER;Ah.prototype.sg=2;Ah.prototype.c=function(a){var b=new rh(a.svg,a);a=a.anchor;b.c.style.margin=-a.y+"px 0 0 -"+a.x+"px";return b};Ah.prototype.Qj=function(a){return C(a,rh)};function Bh(a,b,c,d){Bh.l.constructor.call(this,a,b,c);this.modifiers=d}w(Bh,wg);u("H.map.ChangeEvent",Bh);Bh.prototype.pl=1;Bh.prototype.SIZE=Bh.prototype.pl;Bh.prototype.ac=2;Bh.prototype.POSITION=Bh.prototype.ac;Bh.prototype.pc=4;Bh.prototype.HEADING=Bh.prototype.pc;Bh.prototype.bc=8;Bh.prototype.TILT=Bh.prototype.bc;Bh.prototype.ke=16;Bh.prototype.INCLINE=Bh.prototype.ke;Bh.prototype.Rc=32;Bh.prototype.ZOOM=Bh.prototype.Rc;Bh.prototype.zd=64;Bh.prototype.BOUNDS=Bh.prototype.zd;function Ch(){this.a=[];Ch.l.constructor.call(this)}w(Ch,G);u("H.util.OList",Ch);function Dh(a,b,c){a=a.a.length;if(c)var d=a;else if(F(d=0>(d=+b)?Jc(0,a+d):Ic(a,d)))throw new vd(Ch,b,[0,a-1]);return d}Ch.prototype.add=function(a,b){b=Dh(this,b,F(b));this.a.splice(b,0,a);this.dispatchEvent(new Eh(this,this.b.he,b,a,null,null))};Ch.prototype.add=Ch.prototype.add;function Fh(a,b){var c=a.a.splice(b,1)[0];a.dispatchEvent(new Eh(a,a.b.le,b,null,c,null));return c} Ch.prototype.lc=function(a){this.get(a);return Fh(this,a)};Ch.prototype.removeAt=Ch.prototype.lc;Ch.prototype.remove=function(a){a=this.indexOf(a);return 0<=a?(Fh(this,a),!0):!1};Ch.prototype.remove=Ch.prototype.remove;Ch.prototype.set=function(a,b){if(0!==this.a.length||0!==a){this.get(a);a=Dh(this,a,!1);var c=this.a[a]}this.a[a]=b;this.dispatchEvent(new Eh(this,this.b.me,a,b,c,null));return c};Ch.prototype.set=Ch.prototype.set;Ch.prototype.indexOf=function(a){return this.a.indexOf(a)}; Ch.prototype.indexOf=Ch.prototype.indexOf;Ch.prototype.get=function(a){var b=Dh(this,a,!1),c=this.a;if(b>=c.length)throw new vd(this.get,a,[0,c.length-1]);return c[b]};Ch.prototype.get=Ch.prototype.get;Ch.prototype.xm=function(){return this.a.length};Ch.prototype.getLength=Ch.prototype.xm;Ch.prototype.ab=function(){return[].concat(this.a)};Ch.prototype.asArray=Ch.prototype.ab;Ch.prototype.flush=function(){for(var a=this.a.length;a--;)Fh(this,a)};Ch.prototype.flush=Ch.prototype.flush; Ch.prototype.s=function(){this.flush();Ch.l.s.call(this)};Ch.prototype.b={he:"add",le:"remove",me:"set",yo:"move"};function Eh(a,b,c,d,e,f){Eh.l.constructor.call(this,b,a);this.idx=c;this.added=d;this.removed=e;this.moved=f}w(Eh,Ec);var Gh={};u("H.geo.mercator",Gh);Gh.a=function(a){return Ic(1,Jc(0,.5-Oc(Wc(bd+ad*a/180))/$c/2))};Gh.b=function(a){return a/360+.5};Gh.Pf=function(a,b,c){c?(c.x=Gh.b(b),c.y=Gh.a(a)):c=new H(Gh.b(b),Gh.a(a));return c};Gh.latLngToPoint=Gh.Pf;Gh.Mb=function(a,b){return Gh.Pf(a.lat,a.lng,b)};Gh.geoToPoint=Gh.Mb;Gh.f=function(a){return 0>=a?90:1<=a?-90:fd*(2*Xc(Rc($c*(1-2*a)))-ad)};Gh.c=function(a){return 360*(1===a?1:jd(a,1))-180}; Gh.Ra=function(a,b,c){c?(c.lat=Gh.f(b),c.lng=Gh.c(a)):c=new I(Gh.f(b),Gh.c(a));return c};Gh.xyToGeo=Gh.Ra;Gh.Yf=function(a,b){return Gh.Ra(a.x,a.y,b)};Gh.pointToGeo=Gh.Yf;u("H.util.constants.DEFAULT_MIN_ZOOM_LEVEL",0);u("H.util.constants.DEFAULT_MAX_ZOOM_LEVEL",22);function Hh(a,b){this.projection=a||Gh;this.b=0;this.a=this.exp=Oc(b||256)/Zc;Ih(this);this.y=this.x=0}u("H.geo.PixelProjection",Hh);var Jh=Nc(24)+Nc(-8);Hh.prototype.Ea=function(a){if(F(a))throw new D(this.Ea,0,a);var b=this.x/this.w;var c=this.y/this.h;this.b=a;this.a=this.exp+a;Ih(this);this.x=b*this.w;this.y=c*this.h};Hh.prototype.rescale=Hh.prototype.Ea;function Ih(a){a.a>Jh&&(a.a=Jh);a.w=Qc(2,a.a);a.h=Qc(2,a.a)}Hh.prototype.Fj=function(){return this.b||0};Hh.prototype.getZoomScale=Hh.prototype.Fj; Hh.prototype.kb=function(a,b){a=this.projection.Pf(a.lat,a.lng,b);a.x=a.x*this.w-this.x;a.y=a.y*this.h-this.y;return a};Hh.prototype.geoToPixel=Hh.prototype.kb;Hh.prototype.Se=function(a,b){return this.projection.Ra((a.x+this.x)/this.w,(a.y+this.y)/this.h,b)};Hh.prototype.pixelToGeo=Hh.prototype.Se;Hh.prototype.Ra=function(a,b,c){return this.projection.Ra((a+this.x)/this.w,(b+this.y)/this.h,c)};Hh.prototype.xyToGeo=Hh.prototype.Ra; Hh.prototype.zh=function(a,b,c){a=this.projection.Pf(a,b,c);a.x=a.x*this.w-this.x;a.y=a.y*this.h-this.y;return a};Hh.prototype.latLngToPixel=Hh.prototype.zh;Hh.prototype.cd=function(a){return new H(a.x*this.w-this.x,a.y*this.h-this.y)};Hh.prototype.pointToPixel=Hh.prototype.cd;var Kh;function Lh(a,b){if(y.URL)return(new y.URL(a,b)).toString();if(!a||!Mh(a))return a;if(!b||Mh(b))throw new TypeError("Failed to construct 'URL': Invalid base URL");Kh||(Kh=document.createElement("a"),Yb(Kh));var c=Kh;c.href=b;"/"!==a[0]?a=c.href.replace(/\/[^\/]*$/,"/")+a:((b=c.origin)||(b=c.protocol+"//"+c.host),a=b+a);return a}function Mh(a){var b=!1;"string"===typeof a&&(b=!(-1Kb.indexOf(d)?(b=b[d],++a=a.min)a[b]=c,a.g(),a.i(),a.dispatchEvent(new wg(e?a.b.Qi:a.b.Pi,c,d));else throw new D(f,0,"Invalid condition min <= max");return a}ki.prototype.pi=function(a){return mi(this,"min",+a)};ki.prototype.setMin=ki.prototype.pi; ki.prototype.ni=function(a){return mi(this,"max",+a)};ki.prototype.setMax=ki.prototype.ni;ki.prototype.g=function(){this.dispatchEvent(this.b.Fa)};ki.prototype.i=function(){this.dispatchEvent(this.b.ie)};ki.prototype.s=function(){ki.l.s.call(this)};ki.prototype.la=function(){return null};ki.prototype.getCopyrights=ki.prototype.la;function ni(a){var b;ni.l.constructor.call(this);this.dispatchEvent=A(this.dispatchEvent,this);if(a){var c=a.length;for(b=0;bui.indexOf(a))throw new D(this.R,0,a);if(this.C!==a||1===a&&1c&&(d=a.parent)&&1===d.a){d.removeChild(a);e===a&&(e=d);d.entries=b;a=b[0].node=d;continue}}else if(delete a.entries,d=a.parent)if(d.removeChild(a),e===a&&(e=d),1===d.a){a=d.a?d[0]||d[1]||d[2]||d[3]:null;continue}a=z}this.head!==e&&(this.head=e,Zf(this))}; Ui.prototype.Cc=function(a,b){if(dg(this.a,a,b,a,b))return Vi(this,this.a,a,b,this.c);throw Error("Coordinates out of bounds");};function Vi(a,b,c,d,e){var f=b.entries;if(e)if(b.a)f=Wi(a,b,c,d,e);else if(f){f=f[0];var g=bg(b,f[1]>=b[8]|(f[0]>=b[9])<<1);g.entries=b.entries;delete b.entries;f.node=g;Zf(a,g);f=Wi(a,b,c,d,e)}else cg(b,f=new Xi(c,d)),Zf(a,b),Xf(a,f,!0);else f||Zf(a,b),cg(b,f=new Xi(c,d)),Xf(a,f,!0);return f}function Wi(a,b,c,d,e){return Vi(a,bg(b,c>=b[8]|(d>=b[9])<<1),c,d,e-1)} function Xi(a,b){this.id=ag++;this[0]=b;this[1]=a}Xi.prototype.md=function(a){return this[a%2]};function Yi(){this.a=new Ui(10,180,90,0,0,!0)}n=Yi.prototype;n.Ch=0;n.Yc=function(){return this.Ch};n.N=null;n.I=function(){var a=this.N,b;!a&&(b=Vf(this.a))&&(this.N=a=new J(-b[0],b[3],-b[2],b[1]));return a};n.Cc=function(a){++this.Ch;this.N=null;return this.a.Cc(a.lng,-a.lat)};n.remove=function(a){if(a=this.a.remove(a))--this.Ch,this.N=null;return a}; n.Mf=function(a){var b=this.a,c=a.Qb(),d=a.Nb(),e=-c.lat;c=c.lng;var f=-d.lat;d=d.lng;var g;a.Gb()?g=b.Za(-180,e,d,f).concat(b.Za(c,e,180,f)):g=b.Za(c,e,d,f);return g};function Zi(a,b,c){this.c=a;this.a=b;this.f=c;this.b={}}function $i(a){return{"translucent-pattern-lines":{color:gi("strokeColor"),width:gi("lineWidth * $meters_per_pixel"),join:a?a:gi("lineJoin"),cap:gi("lineCap"),tail_cap:gi("lineTailCap"),head_cap:gi("lineHeadCap"),miter_limit:gi("miterLimit"),order:"function() { return 2 + feature.effectiveZIdx / 2; }",interactive:!0,dash:gi("lineDash"),extrude:!0,dash_phase:gi("lineDashOffset")}}};function aj(a,b,c,d){this.a=a;this.b=b;this.c=c;this.kf=d}function bj(a,b,c,d){a={type:b,uid:a.b,tiled:c,max_zoom:a.c};d&&Pa(a,d);return a};function cj(a){this.a=a};function dj(a,b,c,d,e){this.a=a;this.b=b;this.c=c;this.f=d;this.kf=e} function ej(a){if(a.a&32&&!(a.a&16))return{};var b=new aj(a.a,a.b,a.c,a.kf);var c=new cj(a.a);a=new Zi(a.a,a.b,a.f);var d={},e=b.b;b=b.a&1?bj(b,"ObjectSource",!1,{progressiveUpdate:!0,has_volatile_data:!!(b.a&128)}):b.a&2?bj(b,"RemoteRasterTileSource",!0,{url:""}):bj(b,"ObjectTileSource",!0,{tile_size:b.kf});d[e]=b;b={};c.a&2&&(b={"translucent-raster":hi("raster","inlay",1)});c.a&28&&(e={"translucent-polygons":hi("polygons","inlay",2),"translucent-extruded-polygons":hi("polygons","translucent",3), "translucent-pattern-lines":hi("pattern-lines","translucent",4),"translucent-overlays":hi("overlays","inlay",5),markers:hi("custom_icons","overlay",6,!1)},e["translucent-pattern-lines"].crop_by_tile=!!(c.a&64),e.markers.suppress_fade=!0,e.markers.stick=!0,Pa(b,e));a.c&2&&(a.b["tile_layer_"+a.a]=ji(a.a,"_default",{"translucent-raster":{color:[1,1,1,a.f],order:0}}));if(a.c&4){c=$i();e=a.b;var f="polygon_layer_"+a.a;var g=ji(a.a,"polygons",void 0,"function(){return sources[$source].isVisible(feature, $zoom)}"); g.flat={filter:"function(){return !feature.height && !feature.min_height;}",draw:ii(!1)};g.extruded={filter:"function(){return feature.height || feature.min_height;}",draw:ii(!0)};e[f]=g;a.b["outline_layer_"+a.a]=ji(a.a,"outlines",c,"function(){return sources[$source].isVisible(feature, $zoom)}");c=$i("round");a.b["polyline_layer_"+a.a]=ji(a.a,"polylines",c,"function(){return sources[$source].isVisible(feature, $zoom)}")}a.c&8&&(a.b["overlay_layer_"+a.a]=ji(a.a,"overlays",{"translucent-overlays":{color:[1, 1,1,a.f],order:16382,interactive:!0}},"function(){return sources[$source].isVisible(feature, $zoom)}"));a.c&16&&(a.b["marker_layer_"+a.a]=ji(a.a,"markers",{markers:{sprite:fi("icon.id"),offset:fi("icon.offset"),collide:!1,priority:16383,elevate_by_altitude:!0,interactive:!0,stick:{color:fi("icon.stick_color"),height:fi("icon.stick_height")}}},"function(){return sources[$source].isVisible(feature, $zoom)}"));return{sources:d,styles:b,layers:a.b}};function fj(a,b){fj.l.constructor.call(this);this.C=gj.INIT;this.a=null;if(b&&Mh(b))throw new D(fj,1,"Base URL must be absolute");this.b=b;if(hj.test(a))this.A=a,b||(this.b=Mh(this.A)?B:this.A);else if(ra(a))this.c=a;else if(wa(a))ij(this,Na(a));else throw new D(fj,0,jj);}w(fj,G);u("H.map.Style",fj);fj.prototype.getState=function(){return this.C};fj.prototype.getState=fj.prototype.getState;fj.prototype.Kd=function(){return this.b};fj.prototype.getBaseUrl=fj.prototype.Kd;fj.prototype.Ef=function(){return Na(this.a)}; fj.prototype.getConfig=fj.prototype.Ef;fj.prototype.load=function(){var a=this;if(this.A)this.C=gj.LOADING,(new cf("text/plain",this.A)).then(function(a){return Nh(a)}).then(function(b){ij(a,b)},function(b){kj(a,b.message)}),this.A=null;else if(this.c){this.C=gj.LOADING;try{ij(this,Nh(this.c))}catch(b){kj(this,b.message)}this.c=null}};fj.prototype.load=fj.prototype.load; fj.prototype.Pk=function(a,b,c){var d;lj(this);a=mj(this,a,this.Pk,c);for(c=0;cl&&(k=Sh(k.layers,b),Ph(k)))break a;k=Qh}if(k===Qh)throw new D(c,0,'Unresolvable layer ID "'+g+'"');e.push({id:b,sb:k});if(d)for(h in k)!Uh[h]&&Ph(k[h])&&f.push(g+"."+h)}return e} function oj(a,b){var c=0,d;for(d=b.length;c!==d;){var e=b[c++];var f=a;a=f[e];if(!a)break}return c===d?{node:a,parent:f,Zf:e}:void 0}var hj=/^(http[s]?)?.*\.ya?ml/,jj="invalid style configuration",gj={ERROR:-1,INIT:0,LOADING:1,READY:2};fj.State=gj;var rj="change",qj="error";function li(a){var b=""+Qe(),c;li.l.constructor.call(this);a=a||{};this.min=a.min||0;this.max=a.max||22;if(c=a.uri){if(/_/.test(c))throw new D(li,0,"uri "+c);}else c=b;this.uri=c||b;this.uid=b;a.getCopyrights&&Ob(a.getCopyrights,"Function",li)&&(this.getCopyrights=a.getCopyrights);this.f=this.f.bind(this);this.ja=!0}w(li,G);u("H.map.provider.Provider",li);li.prototype.i={ie:"configchange",Fa:"update"};function sj(a,b){a.dispatchEvent(new Ec(a.i.Fa,b))}li.prototype.f=function(){this.dispatchEvent(this.i.ie)}; li.prototype.s=function(){G.prototype.s.call(this);this.c&&(this.c.removeEventListener(rj,this.f),this.c=null)};li.prototype.la=function(){return null};li.prototype.getCopyrights=li.prototype.la;li.prototype.m=function(){var a=0;this.di()&&(a|=1);this.providesRasters()&&(a|=2);this.providesSpatials()&&(a|=4);this.providesOverlays()&&(a|=8);this.providesMarkers()&&(a|=16);this.providesDomMarkers()&&(a|=32);return a};li.prototype.di=Se;li.prototype.Ue=Se;li.prototype.providesRasters=li.prototype.Ue; li.prototype.Gc=Se;li.prototype.providesSpatials=li.prototype.Gc;li.prototype.ei=Se;li.prototype.providesOverlays=li.prototype.ei;li.prototype.Ub=Se;li.prototype.providesMarkers=li.prototype.Ub;li.prototype.Tb=Se;li.prototype.providesDomMarkers=li.prototype.Tb;li.prototype.ai=vc;li.prototype.j=1;function tj(a,b){b=ld(b,0,1);F(b)&&(b=1);a.j!==b&&(a.j=b,a.ja&&uj(a),a.f(),sj(a))} li.prototype.yd=function(a,b){this.c&&(this.c.removeEventListener(rj,this.f),this.c.removeEventListener(qj,this.f));this.c=a;this.c.addEventListener(rj,this.f);this.c.addEventListener(qj,this.f);b||this.f();this.ja=!1};li.prototype.setStyleInternal=li.prototype.yd;li.prototype.Eb=function(){this.c||uj(this);return this.c};li.prototype.getStyleInternal=li.prototype.Eb;function uj(a){var b=new dj(a.m(),a.uid,a.max,a.j,a.tileSize);a.c=new fj(ej(b));a.ja=!0} function vj(a){a=a.m();var b=wj;a&1?b=xj:a&2?b=null:a&28&&(b=yj);return b}li.prototype.km=function(){return!1};li.prototype.getFeatureProxy=li.prototype.km;function zj(a){var b;Mb(this,zj);zj.l.constructor.call(this,a);this.$a=a=[];for(b in yg)a[yg[b]]=new ug}w(zj,li);u("H.map.provider.ObjectProvider",zj);zj.prototype.di=Re;zj.prototype.providesByViewport=zj.prototype.di;zj.prototype.Pb=function(a){return this.$a[a||yg.ANY]};zj.prototype.getInvalidations=zj.prototype.Pb;zj.prototype.Wd=function(a,b){if(b!==vg.NONE){var c=this.$a[yg.ANY];var d=c.a+1;c.update(d,b);c=this.$a[a.type];c.update(d,b);a.Pb().update(d,b);sj(this,a)}}; zj.prototype.invalidateObject=zj.prototype.Wd;zj.prototype.requestOverlays=zj.prototype.ud;zj.prototype.requestSpatials=zj.prototype.eg;zj.prototype.requestSpatialsByTile=zj.prototype.fg;zj.prototype.jb=!1;zj.prototype.requestMarkers=zj.prototype.Ic;zj.prototype.requestDomMarkers=zj.prototype.Hc;function M(a){a=a||{};M.l.constructor.call(this,a);this.b=a=new P({provider:this,min:a.min,max:a.max});a.ba(this);this.P=new ig;this.o=new ig;this.g=new Yi;this.u=new ig;this.D=new Yi;this.G=new ig}w(M,zj);u("H.map.provider.LocalObjectProvider",M);M.prototype.m=function(){return 125};M.prototype.Eb=function(){if(!this.L){this.L=M.l.Eb.call(this);var a=new dj(this.m()|128,this.uid+"_vol",this.max,this.j,this.tileSize);this.L.Rf(ej(a))}return this.L};M.prototype.gc=function(){return this.b}; M.prototype.getRootGroup=M.prototype.gc;M.prototype.Wd=function(a,b){b&vg.SPATIAL&&this.T(a);M.l.Wd.call(this,a,b)};M.prototype.invalidateObject=M.prototype.Wd;M.prototype.T=function(a){var b;C(a,L,this.T,0);if(a.a!==this)throw new nc(this.T,"foreign object");this.La(a);var c=a.type;if(c===yg.MARKER)if((b=a.pa())instanceof I){var d=!0;c=this.g}else c=this.u;else c===yg.DOM_MARKER?(b=a.pa())instanceof I?(d=!0,c=this.D):c=this.G:c=c===yg.OVERLAY?this.P:this.o;d=d?c.Cc(b):c.Mj(a.I());d.Ji=a;a.$=d}; M.prototype.La=function(a){var b;if(a)if(a.a!==this){if(C(a,L))throw new nc(this.La,"foreign object");}else if(b=a.$){var c=a.type;c===yg.MARKER?this.g.remove(b)||this.u.remove(b):c===yg.DOM_MARKER?this.D.remove(b)||this.G.remove(b):c===yg.OVERLAY?this.P.remove(b):this.o.remove(b);delete b.Ji;delete a.$}};M.prototype.removeObject=M.prototype.La; function Aj(a,b,c,d,e,f){var g;f=f||[];if(b.Yc())for(a=b!==a.g&&b!==a.u,e=!e,b=b.Mf(c),c=b.length,g=0;g=l)&&(m=m.Va););k&&(e||h.Ac(!0))&&(a||1===h.Ab().getState())&&f.push(h)}return f}M.prototype.ei=function(){return 0a)throw new D(Pj,1,'Argument "maxTime" must be a positive number');this.a=a;this.Nc=Oj()}Qj.prototype.next=function(a){return a.length&&Oj()-this.Ncb||30c)throw new D(this.add,2,c);a=String(a);var d=this.a[a];var e=!0;this.filter&&(e=this.filter(a,b,c));d?e?(this.b+=c-d.size,d.size=c,d.data=b,Vj(this,d)):Wj(this,d,!0):e&&(this.a[a]=Xj(this,{id:a,data:b,size:c,kc:null,dd:null},this.c));Yj(this);return e};Uj.prototype.add=Uj.prototype.add; Uj.prototype.be=function(a){if(!r(a))throw new D(this.be,0,a);this.g.push(a)};Uj.prototype.registerOnDrop=Uj.prototype.be;Uj.prototype.Pg=function(a){this.g=this.g.filter(function(b){return b!==a})};Uj.prototype.deRegisterOnDrop=Uj.prototype.Pg;Uj.prototype.get=function(a,b){return(a=b?this.a[a]:Vj(this,this.a[a]))&&a.data};Uj.prototype.get=Uj.prototype.get;Uj.prototype.zf=function(a){var b;(b=this.a[a])&&Wj(this,b,!0)};Uj.prototype.drop=Uj.prototype.zf; Uj.prototype.forEach=function(a,b,c){var d;for(d in this.a){var e=this.a[d];(c?c(d,e.data,e.size):1)&&a.call(b,d,e.data,e.size)}};Uj.prototype.forEach=Uj.prototype.forEach;Uj.prototype.ha=function(a){var b;for(b in this.a){var c=this.a[b];(a?a(b,c.data,c.size):1)&&Wj(this,this.a[b],!0)}};Uj.prototype.removeAll=Uj.prototype.ha;Uj.prototype.oi=function(a){if(!(0<+a))throw new D(Uj.prototype.oi,0,a);this.i=+a;Yj(this);return this};Uj.prototype.setMaxSize=Uj.prototype.oi;Uj.prototype.Cm=function(){return this.i}; Uj.prototype.getMaxSize=Uj.prototype.Cm;Uj.prototype.cm=function(){return this.b};Uj.prototype.getCurrentSize=Uj.prototype.cm;function Vj(a,b){b&&(a.c=Xj(a,b,a.c));return b}function Yj(a){for(;a.b>a.i&&a.f;)Wj(a,a.f,!0)}function Xj(a,b,c){if(c!==b){(b.kc||b.dd)&&Wj(a,b);if(b.kc=c)b.dd=c.dd,c.dd=b;b.dd||(a.c=b);b.kc||(a.f=b);a.b+=b.size}return b} function Wj(a,b,c){var d=b.dd,e=b.kc;if(d||e||b==a.c&&b==a.f)if(d?d.kc=e:a.c=e,e?e.dd=d:a.f=d,a.b-=b.size,c){for(c=a.g.length;c--;)a.g[c].call(a,b.id,b.data,b.size);delete a.a[b.id]}b.kc=b.dd=null};var Zj,ak=function(){function a(){}for(var b,c,d,e=Jb("o ms moz webkit "),f=5;f--&&!b;)b=e[f],b=(c=y[b+(b?"R":"r")+"equestAnimationFrame"])&&!F(c.call(window,a))&&(d=y[b+(b?"C":"c")+"ancelAnimationFrame"]);Zj=b?function(a){return c.call(y,a)}:function(a){return y.setTimeout(a,25)};return b?function(a){return d.call(y,a)}:function(a){return y.clearTimeout(a)}}(),Oj=y.performance&&y.performance.now?function(){return y.performance.now()}:function(){return y.Date.now()};function Zg(a,b,c,d,e,f){var g,h,k=a.length,l,m;if(k)for(g=[];k--;){var p=a[k];var q=p.length;var t=0;for(l=1;lh){if(h>e||ge||hb){if(b>c||ac||bc)return;g=d}if(ae)return;a=f}h>e&&(b=a+(e-g)*(b-a)/(h-g),h=e);b>c&&(h=g+(c-a)*(h-g)/(b-a),b=c);m&&(a=-a,b=-b);return k?[new H(h,-b),new H(g,-a)]:[new H(g,-a),new H(h,-b)]} function kh(a,b,c){a=ck(a,!0);b=ck(b,!1);var d,e;var f={};var g=d=1;switch(~~(c||0)){case 1:g=d=0;break;case 2:d=0;g=1;break;case 3:d=1,g=0}c=d;var h=g;if(b&&a){b.xf=dk(b.x,b.y,null,ek(b));a.xf=dk(a.x,a.y,null,ek(a));for(g=b;g.next;g=g.next)if(!g.Za)for(d=a;d.next;d=d.next)if(!d.Za){var k=fk(g.next);var l=fk(d.next);if(e=gk(g,k,d,l,f)){e=f.wl;var m=f.xl;var p=f.qo;var q=f.ro;e=dk(p,q,null,null,null,null,!0,0,0,e);hk(e,g,k);k=dk(p,q,null,null,null,null,!0,0,0,m);hk(k,d,l);e.Qh=k;k.Qh=e}}f=nh(b,a); c&&(f=!f);for(g=b;g;g=g.next)g.Za&&(g.Ug=f,f=!f);f=nh(a,b);h&&(f=!f);for(d=a;d.next;d=d.next)d.Za&&(d.Ug=f,f=!f);ik(b);for(ik(a);(a=jk(b))!=b;){for(c=null;!a.qg;a=a.Qh){for(f=a.Ug;;){c=dk(a.x,a.y,c);c.artificial=a.Za||a.ln;a.qg=1;a=f?a.next:a.Sb;if(!a)break;if(a.Za){a.qg=1;break}}if(!a)break}c.Rh=t;var t=c}return t}}u("H.math.clipping.clipPolygon",kh); function dk(a,b,c,d,e,f,g,h,k,l){a={x:a,y:b,next:c||null,Sb:d||null,Rh:e||null,Qh:f||null,Za:!!g,Ug:h||0,qg:k||0,alpha:l||0};d&&(a.Sb.next=a);c&&(a.next.Sb=a);return a}function fk(a){for(;a&&a.Za;)a=a.next;return a}function ek(a){if(a)for(;a.next;)a=a.next;return a}function jk(a){var b=a;if(b){do b=b.next;while(b!=a&&(!b.Za||b.Za&&b.qg))}return b}function ik(a){var b=ek(a);b.Sb.next=a;a.Sb=b.Sb} function gk(a,b,c,d,e){var f,g=b.x-a.x,h=b.y-a.y;var k=d.x-c.x;var l=d.y-c.y;var m=g*l-h*k;if(!m)return 0;k=((c.x-a.x)*l-(c.y-a.y)*k)/m;m=(h*(c.x-a.x)-g*(c.y-a.y))/m;if(0>k||1m||1x?lk(v,t,h,k):1f&&(f=v,g=p-1)}else for(;pf&&(f=v,g=p-1);f>=b||0h){b.beginPath();for(f=h;ff;){var O=0;var Y=c[k];if(m=l=Y.length){var Ga=Y;m=Ga.length;for(p=0;--m;)p+=Ga[m].bb(Ga[m-1]);m=(Ga=p)>=d}if(m)for(m=Ic(Lc(Ga/d),1E3),m=Ga/(m+1),p=m/2;--l;){for(q=(t=Y[l]).bb(v=Y[l-1]);p<=O+q;){var pa=t.x+(v.x-t.x)*(x=(p-O)/q);x=t.y+(v.y-t.y)*x;a.wf(pa,x)&&(b.save(),b.translate(pa,x),b.rotate(-Xc((v.y-t.y)/ (t.x-v.x))+(t.x=pa;var di=!Eb&&l>=Ga;if(ye===eh&&O)di?ob++:Uc++;else{var ei=ye.length;Ak.length=2*ei;for(x= 0;xb.right,c)} Ck.prototype.Je=function(a,b,c,d,e,f){var g,h=[],k,l=this.a;f=null!=f?f:"__default__";var m=l.requestTile;if(!C(a,Dj))throw new D(this.Je,0,a);if(F(c=+c))throw new D(this.Je,1,c);d||(g={});b=Fk(this,a,b,c,e);if(a=b.length)for(d||b.sort(Gk),c=a;c--;)e=b[c],d||(g[l.Jf.apply(l,e)]=!0),e[3]=+d,(k=m.apply(l,e))&&h.push(k);if(!d){d=g;var p;g=this.c[f]||{};for(p in g)g.hasOwnProperty(p)&&g[p]&&!d[p]&&this.a.cancelTileByKey(p);this.c[f]=d}return{total:a,tiles:h}};Ck.prototype.getProviderTiles=Ck.prototype.Je; function Gk(a,b){return b[3]-a[3]};function Q(a){Mb(this,Q);Q.l.constructor.call(this,a);this.g={};this.u={};this.dc=new Hk;this.hd=A(this.hd,this);this.P=Ik;this.createTileInternal=this.jd.bind(this)}w(Q,Rj);u("H.map.provider.RemoteTileProvider",Q);Q.prototype.Md=function(){return 1};Q.prototype.getEntryWeight=Q.prototype.Md;var Ik=new Uj(65536);Q.prototype.Ob=function(){return this.P};Q.prototype.getCache=Q.prototype.Ob;Q.prototype.v=ba(2);Q.prototype.hd=function(a){var b=this.uri;return!a.indexOf(b)&&"_"===a.charAt(b.length)}; Q.prototype.cacheFilter=Q.prototype.hd;Q.prototype.$a=function(a,b){b.valid=!1};Q.prototype.reload=function(a){var b,c=this.getCache();a?c.ha(this.hd):c.forEach(this.$a,this,this.hd);for(b in this.g)this.g[b].cancel(),this.u[b].cancel();this.g={};this.u={};sj(this)};Q.prototype.reload=Q.prototype.reload;Q.prototype.pe=function(){return!1};Q.prototype.canStore=Q.prototype.pe;Q.prototype.MAX_STORE_TIME=Infinity;Q.prototype.Sd=function(){return this.dc};Q.prototype.getStorage=Q.prototype.Sd; Q.prototype.L=function(a,b){b(a)};function Ij(a,b,c,d,e,f){var g=a.Sd();d=~~d;return a.requestInternal(b,c,d,function(h,k){g.put(a.Jf(b,c,d),k&&{raw:k.raw,timestamp:y.Date.now()},e,f)},f,0)}Q.prototype.requestInternal=Q.prototype.Pa; Q.prototype.ib=function(a,b,c,d){var e=this;var f=this.getCache();if(F(a=+a))throw new D(this.ib,0,a);if(F(b=+b))throw new D(this.ib,0,b);if(F(c=+c))throw new D(this.ib,0,c);c=~~c;var g=this.getTileKey(a,b,c);f=f.get(g);f&&f.valid||d||this.g[g]||(f=B,this.requestTileAsPromise(a,b,c,d).then(function(a){sj(e,a)},vc));return f};Q.prototype.requestTile=Q.prototype.ib; Q.prototype.Ck=function(a,b,c,d){var e=this,f=this.getCache(),g=this.getTileKey(a,b,c),h=this.g,k=this.u,l,m=this.Sd();if(k[g])return k[g];k[g]=k=new gb(function(k,q){l=m.get(g,function(l){var p,t;var E=function(d,h){t=e.createTileInternal(a,b,c,d,h);t.key=g;f.add(g,t,e.Md(d));k(t);Jk(e,g)};l&&(p=y.Date.now()-l.timestamp);l&&p=a&&this.top<=b&&this.bottom>=b}; Dj.prototype.containsXY=Dj.prototype.wf;function Ek(a,b){return new Dj(a.x,a.y,b.x,b.y)}Dj.fromPoints=Ek;Dj.prototype.clone=function(){return new Dj(this.left,this.top,this.right,this.bottom)};Dj.prototype.clone=Dj.prototype.clone;function Dk(a,b){Ck.call(this,a,b)}w(Dk,Ck);u("H.map.layer.TileLayer",Dk);Dk.prototype.vd=function(a,b,c,d,e){if(!C(a,J))throw new D(this.vd,0,a);if(F(b=+b))throw new D(this.vd,1,b);b=Lc(b);this.pixelProjection.Ea(b);a=this.Ae(a);var f=this.Ud(a,b);return this.Je(f,a.left>a.right,b,c,d,e)};Dk.prototype.requestTiles=Dk.prototype.vd;function Lk(a,b){b=b?La(b):{};b.tileSize=b.tileSize||256;b.pixelRatio=b.pixelRatio||Fe();b.max=24;this.c=new Bk(a,b);this.f=new Dk(this.c);b.minWorldSize=this.c.tileSize;b.provider=a;Lk.l.constructor.call(this,b);this.tileSize=this.f.tileSize;this.j=A(this.j,this);this.c.addEventListener(this.c.i.Fa,this.j);a.addEventListener("update",this.j)}w(Lk,ki);u("H.map.layer.ObjectLayer",Lk);Lk.prototype.j=function(a){a.currentTarget!==this.c&&a.target.type===yg.SPATIAL||this.g()}; var Mk={markers:Te,total:0};Lk.prototype.Ic=function(a,b,c){var d=this.a,e;return d.providesMarkers()&&(e=d.requestMarkers(a,b,!0,c)).length?{markers:e,total:e.length}:Mk};Lk.prototype.requestMarkers=Lk.prototype.Ic;Lk.prototype.Hc=function(a,b,c){var d=this.a,e;return d.providesDomMarkers()&&(e=d.requestDomMarkers(a,b,!0,c)).length?{markers:e,total:e.length}:Mk};Lk.prototype.requestDomMarkers=Lk.prototype.Hc;var Nk={tiles:Te,total:0}; Lk.prototype.vd=function(a,b,c,d){if(this.a.providesSpatials()){var e=this.f.vd(a,b,c,d);c||(c=this.c,e=Oj(),333*p;l=.8>l||1.2>>0),g=!0));!g&&b&e&&b&(c|d)&&(l||k?(ql(this,e),g=!0):m&&(ql(this, h),g=!0));this.j=g}}}else this.g=a,f||(this.j=!0);this.m&&this.f.push(a)}return f};kl.prototype.clear=function(){this.f.length=0;this.a=this.m=this.i=this.j=!1;this.g=this.u=this.c=void 0};function ql(a,b){a.b^=a.b&b}kl.prototype.Ka=function(){return this.a};var nl=Hb(new il(0,0));function rl(a){var b;if(a.m){var c=a.f;var d=c.length;var e=0;for(b=new il(0,0);--d&&e=a.Xa&&b-g.timestamp<=a.v?e>a.W?a.W:e:0}function ul(a){return a.c?vl(a.c):B}function ml(a,b){return(b=b?a.g:a.u)?sl(b,a.c):new il(0,0)}function ol(a,b){var c=1;if(a.i){var d=a.c;a=b?a.g:a.u;if(a=wl(a))if(d=wl(d))c=d/a}return c} function ll(a,b,c,d,e){this.a=new H(a,b);c!==B&&(this.b=new H(c,d),this.c=!0);this.timestamp=e!==B?e:Oj()}ll.prototype.c=!1;function vl(a){var b=a.a;return(a=a.b)?new H(b.x-(b.x-a.x)/2,b.y-(b.y-a.y)/2):B}function xl(a,b){var c=a.a;return(a=a.b)&&a.bb(b)=g.min&&d<=g.max)return l&&k.wb(!0),g.V(k.J(),{boundingBox:a,zoom:d,screenCenter:b,priorityCenter:f,projection:c,cacheOnly:e,size:k.Db(),pixelRatio:k.fb(),cameraMatrix:h});l&&k.wb(!1);return Bj.DONE};Jl.prototype.Td=function(){return this.a};u("H.util.animation.ease.LINEAR",function(a){return a});u("H.util.animation.ease.EASE_IN_QUAD",function(a){return a*a});function Ll(a){return-a*(a-2)}u("H.util.animation.ease.EASE_OUT_QUAD",Ll);u("H.util.animation.ease.EASE_IN_OUT_QUINT",function(a){a*=2;return 1>a?Qc(a,5)/2:(a-=2,Qc(a,5)/2+1)});u("H.util.animation.ease.EASE_OUT_CIRC",function(a){return Pc(2*a-a*a)});function Ml(a,b,c,d){if(!r(this.i=a))throw new D(Ml,0,a);if(F(this.g=+b))throw new D(Ml,1,b);if(!r(this.f=c)&&null!=c)throw new D(Ml,2,c);if(!r(this.c=d)&&null!=d)throw new D(Ml,3,d);this.id=Nl.next();this.a=!1}u("H.util.animation.Animation",Ml);var Nl=new Oe;Ml.prototype.start=function(){var a=this,b=Zj;var c=function(){var e=Oj(),f=e-a.Nc,g=f/a.g;if(1<=g){g=1;var h=!0}a.c&&(g=a.c(g));a.i(g,f,e-d,e);d=e;h?a.stop():a.b=b(c)};a.Nc=Oj();var d=a.Nc;a.a=!0;a.b=b(c)};Ml.prototype.start=Ml.prototype.start; Ml.prototype.stop=function(a){ak(this.b);this.a=!1;a||this.f&&this.f(this)};Ml.prototype.stop=Ml.prototype.stop;Ml.prototype.Ka=function(){return this.a};Ml.prototype.isRunning=Ml.prototype.Ka;function Ol(a,b){Ol.l.constructor.call(this,a);this.tc=!(!b||!b.tc);this.c={}}w(Ol,Il);Ol.prototype.ef=function(a){Ol.l.ef.call(this,a);this.f=a.rc.ownerDocument};var Pl=function(a,b){b=b.pa();return C(b,Tg)?b.sa:(a[0]=b,a)}.bind(null,[]); Ol.prototype.V=function(a,b,c,d,e,f,g){var h=this.sb,k,l,m,p;this.j=b=this.c;this.c=c={};if(d>=h.min&&d<=h.max){var q=this.sj(a,d,e,f);var t=q.markers;if(a=t.length){d=[];e=this.Ib;for(f=0;fe.indexOf(l=g.lf)&&(e===Te&&(e=[]),e.push(l),c))break;f||(f=[]);var t=g.style;f.push({fj:t.getPropertyValue(Tl),hn:t.getPropertyPriority(Tl),style:t});t.setProperty(Tl, "visibility"===Tl?"hidden":"none","important");t=h}if(f)for(b=f.length;b--;)a=f[b],a.style.removeProperty(Tl),ra(a.fj)&&a.style.setProperty(Tl,a.fj,a.hn)}return e};Rl.prototype.Td=function(){return"dom"};function Sl(a,b,c){b.clear(b=c.detail);delete b.lf;a.b--;c=(a=c.gk).Ab();c.b&&c.b(b,c,a)}Rl.prototype.s=function(){this.a.length=0;var a=this.Ib,b=this.c,c;for(c in b)Sl(this,a,b[c]);this.Ib.F();Rl.l.s.call(this)};function Kl(a,b){var c=b||{},d=c.contextType;c=c.contextAttributes;Kl.l.constructor.call(this,b);Ob(a,"Function",Kl,0,"invalid render callback");if(d){if(-1===Xl.indexOf(d))throw new D(Kl,1,"invalid context type");this.f=d}c&&(this.m=c);this.j=a}w(Kl,ki);u("H.map.layer.CanvasLayer",Kl);var Xl=["2d","webgl","webgl2","experimental-webgl"];Kl.prototype.f="2d";Kl.prototype.Ld=function(){return this.f}; Kl.prototype.V=function(a,b){this.c&&this.c.canvas===a||(this.c=a.getContext(this.f,this.m));return this.j(this.c,b)};Kl.prototype.s=function(){Kl.l.s.call(this);this.c=B};function Yl(a,b){Yl.l.constructor.call(this,b);Ob(a,"Function",Yl,0,"invalid render callback");this.c=a}w(Yl,ki);u("H.map.layer.DomLayer",Yl);Yl.prototype.V=function(a,b){return this.c(a,b)};function Zl(a,b){if(F(this.b=+a))throw new D(Zl,0,a);this.a=0;b&&this.Ok(b)}u("H.util.kinetics.KineticMove",Zl);Zl.prototype.Ok=function(a){this.a=a;return this};Zl.prototype.setInitialSpeed=Zl.prototype.Ok;Zl.prototype.fm=function(){return Math.abs(this.a/this.b)};Zl.prototype.getDuration=Zl.prototype.fm;Zl.prototype.Ee=function(a){return this.a+this.b*a};Zl.prototype.getCurrentSpeed=Zl.prototype.Ee;Zl.prototype.bm=function(a){return this.a*a+this.b*a*a/2};Zl.prototype.getCurrentPath=Zl.prototype.bm;function $l(a,b){this.a=a;this.b=b} function am(a,b,c){var d=[],e={rc:a.a,width:b.w,height:b.h,ga:a.b};for(a=0;a=f?f:180a)throw new D(this.bf,1,"positive number required");this.ja=a}; R.prototype.setAnimationDuration=R.prototype.bf;R.prototype.Yg=function(){return this.ja};R.prototype.getAnimationDuration=R.prototype.Yg;R.prototype.ca=Ll;R.prototype.cf=function(a){if(!r(a))throw new D(this.cf,1,"function required");this.ca=a};R.prototype.setAnimationEase=R.prototype.cf;R.prototype.Zg=function(){return this.ca};R.prototype.getAnimationEase=R.prototype.Zg;R.prototype.Ye=function(){this.ca=Ll;this.ja=300};R.prototype.resetAnimationDefaults=R.prototype.Ye;n=R.prototype; n.lk=function(){dl(this.a);this.ma()};n.Qe=function(a,b){R.l.Qe.call(this,a,b);vm(b)&&(dl(this.a),(a=(a=b.za())&&a.Eb())&&a.getState()===gj.INIT&&a.load())};n.Uh=function(a,b,c){var d;this.jb=Oj();if(b.requestDomMarkers||C(b,Kl)||C(b,Yl)){var e=this.G.na;for(d=e.length;d--;){var f=e[d];if(f.Bb()===b){e.splice(d,1);f.F();break}}}vm(b)&&fl(this.a,this.i);this.f=this.i.ab();0===a&&(Uk(this,b,!1),this.Kb());am(this.Ed,wm(this),xm(this));this.de();c||this.ma()}; function vm(a){return!(C(a,Yl)||C(a,Kl))}function mm(a){var b=a.i.ab(),c=0,d=b.length;[a.G={}].forEach(function(a){a.Vc=[];a.na=[]});for(a.f=b;cd?c.add(a,b):d-b&&(c.lc(d),c.add(a,e?b-1:b));return this};S.prototype.addLayer=S.prototype.Yi;S.prototype.cg=function(a){var b=this.a.indexOf(a);a!==this.g&&a!==this.c&&-1!==b&&this.a.lc(b);return this};S.prototype.removeLayer=S.prototype.cg; S.prototype.xd=function(a){this.g!==a&&(this.a.a.length&&this.a.get(0)!==this.c?this.a.set(0,a):this.a.add(a,0),this.g=a);return this};S.prototype.setBaseLayer=S.prototype.xd;S.prototype.Wl=function(){return this.g};S.prototype.getBaseLayer=S.prototype.Wl;S.prototype.Ga=function(a){if(!If(a))throw new D(this.Ga,0,a);return(a=this.f.Ga(a))?hf(a):z};S.prototype.geoToScreen=S.prototype.Ga; S.prototype.Wa=function(a,b){var c;if(c=+F(a)||2*F(b))throw new D(this.Wa,c-1,arguments[c-1]);return(c=this.f.Wa(a,b))?Jf(c):z};S.prototype.screenToGeo=S.prototype.Wa;S.prototype.jg=function(a,b){return this.f.jg(a,b)};S.prototype.screenToLookAtData=S.prototype.jg;S.prototype.T=function(a){if(!C(a,L))throw new D(this.T,0,a);!this.c&&Jm(this);this.j.gc().T(a);return a};S.prototype.addObject=S.prototype.T; S.prototype.La=function(a){if(!C(a,L))throw new D(this.La,0,a);!this.c&&Jm(this);this.j.gc().La(a);return a};S.prototype.removeObject=S.prototype.La;S.prototype.Cb=function(a){!this.c&&Jm(this);return this.j.gc().Cb(a)};S.prototype.getObjects=S.prototype.Cb;S.prototype.gd=function(a){var b;Qb(a,this.gd,0,a);!this.c&&Jm(this);var c=a.length;for(b=0;bb;if(0<=a&&1>=a)a!==b&&(this.f=a,c&&this.Aa(vg.VISUAL));else throw new D(this.mc,0);return this};Qm.prototype.setOpacity=Qm.prototype.mc;Qm.prototype.U=function(){var a=Qm.l.U.call(this);a.geometry=ah(this.N).U();a.properties.overlay=!0;return a};Qm.prototype.forWorkerMessage=Qm.prototype.U;function Rm(a){if(!a||!r(a.requestData))throw new D(Rm,0,"options.requestData");Rm.l.constructor.call(this,a);this.G=a.requestData;this.B=!!a.providesDomMarkers}w(Rm,Q);u("H.map.provider.MarkerTileProvider",Rm);Rm.prototype.Md=function(a){return a?a.length+1:1};Rm.prototype.getEntryWeight=Rm.prototype.Md; Rm.prototype.Pa=function(a,b,c,d,e){var f=this;return this.G(a,b,c,function(e){for(var g=[],k,l,m=e.length;m--;)l=e[m],l.ko=f.getTileKey(a,b,c),l.ba(f),k=l.Ab(),(C(l,Ah)||1===k.getState())&&g.push(e[m]);d(g)},e)};Rm.prototype.requestInternal=Rm.prototype.Pa;Rm.prototype.Wd=function(a,b){b===vg.VISUAL&&(a=this.Ob().get(a.ko))&&(a.valid=!1,sj(this,a))};Rm.prototype.invalidateObject=Rm.prototype.Wd;Rm.prototype.Tb=function(){return this.B};Rm.prototype.providesDomMarkers=Rm.prototype.Tb; Rm.prototype.Ub=Re;Rm.prototype.providesMarkers=Rm.prototype.Ub;function Sm(a,b){Sm.l.constructor.call(this,a,b)}w(Sm,Ck);u("H.map.layer.MarkerTileLayer",Sm);var Tm={markers:[],total:0,requested:0};function Um(a,b,c,d,e){var f=Lc(c);a.pixelProjection.Ea(f);b=a.Ud(a.Ae(b),f);c=a.Je(b,b.left>b.right,~~c,d,e);a=c.tiles;c=c.total;d=a.length;e=[];var g;for(g=0;g>1;d|e&&a.next();c=$m(a);if("EMPTY"===c)if(a.next(),d=b[1])var f=new d([]);else b!==hn&&(f=new K([]),b===gn&&(f=new N(f)));else if("("===c){f=b[0];b=b[1];if(b){var g=[];Ym(a,0);if(f===cn){var h="("!==$m(a);do g.push(f(a,d,e,h));while(Zm(a))}else{do g.push(f(a,d,e));while(Zm(a))}Ym(a,1);d=new b(g)}else d=f(a,d,e);f=d}else Vm(a,c,'"Z", "M", "ZM", "(" or "EMPTY"'); a.next()&&Vm(a,c,"end of stream")}return f||z}function ln(a){this.a=a}function $m(a){var b=a.b;if(b===B){for(b=a.a;b.a()===mn;)b.next();if(nn[b.a()])b=b.next(),b=b===on?"":String.fromCharCode(b);else{b.f();do b.next();while(!nn[b.a()]);b=String.fromCharCode.apply(null,b.b())}a.b=b}return b}ln.prototype.next=function(){var a=$m(this);""!==a&&delete this.b;return a};var mn=32,on=-1,pn={ql:mn,nl:40,ol:41,jl:44,ll:on},nn=Object.keys(pn).reduce(function(a,b){a[pn[b]]=!0;return a},Fb());function qn(){}u("H.util.ICharStream",qn);qn.prototype.next=function(){};qn.prototype.f=function(){};qn.prototype.b=function(){};qn.prototype.a=function(){};function rn(a){this.i=String(a);this.j=0;this.c=[];this.g=!1}u("H.util.CharStream",rn);rn.prototype.next=function(){var a=this.i.charCodeAt(this.j++);a=isNaN(a)?-1:a;this.g&&this.c.push(a);return a};rn.prototype.f=function(){this.g=!0;this.c=[]};rn.prototype.b=function(){var a=this.c.slice();this.g=!1;this.c=[];return a};rn.prototype.a=function(){var a=this.i.charCodeAt(this.j);return isNaN(a)?-1:a};u("H.util.wkt.toGeometry",function(a){return Wm(new rn(a))});function sn(){return qf("mapsjs-core","1.8.1","55a4702")}u("H.buildInfo",sn);var tn=function(){var a="maps"+eval('"js-"');var b=y.document.querySelector('script[src*="'+a+'"]');if(!b){var c=y.document.getElementsByTagName("script");var d=new RegExp("^.*"+a);var e=0;for(a=c.length;e>>0),ja=0;function ka(a,b,c){return a.call.apply(a.bind,arguments)}\nfunction ma(a,b,c){if(!a)throw Error();if(2La.indexOf(La)&&La.push(La);\nfunction Ma(a,b,c,d){var e=\"\",f=2>arguments.length,g;f&&(b={H:z.H},c=\"\",d=La.slice());Na(b,!0,function(b,f){try{if(g=b[f],f=Oa(b,g),!(fa(g)&&g.window===g&&g.self===g||fa(g)&&0d.indexOf(g)&&(d.push(g),e=Ma(a,g,c+\".\"+f,d)))return!0}}catch(m){}});f&&(e=e?e.substr(1).replace(\".\"+Da[0]+\".\",\"#\"):\"~\"+(r(a)?Pa(a)+\"()\":Ia(a)));return e}\nfunction Oa(a,b){var c=[];Na(a,!1,function(a,e){a[e]===b&&c.push(e)});return c.sort(Qa)[0]}function Qa(a,b){return b.length-a.length}var Ra=Object[Da[0]][Da[2]];function Na(a,b,c){var d;if(a){for(e in a)if((!b||Ra.call(a,e))&&c(a,e,!0))return;for(d=Da.length;d--;){var e=Da[d];if((!b||Ra.call(a,e))&&c(a,e,!1))break}}}function Pa(a){return(a=/^\\s*function ([^\\( ]+)/.exec(a))?a[1]:\"anonymous\"}function Sa(a,b,c){c[b]=\"#\"+b};function D(a,b,c){this.g=[];b&&this.$(b);if(c&&!r(c))throw new B(D,2,c);this.b=0;this.filter=c;this.a={};this.f=this.c=null;this.Da(a)}t(\"H.util.Cache\",D);D.prototype.add=function(a,b,c){c=+c;if(!Ka(c)||0>c)throw new B(this.add,2,c);a=String(a);var d=this.a[a];var e=!0;this.filter&&(e=this.filter(a,b,c));d?e?(this.b+=c-d.size,d.size=c,d.data=b,Ta(this,d)):Ua(this,d,!0):e&&(this.a[a]=Va(this,{id:a,data:b,size:c,A:null,D:null},this.c));Wa(this);return e};D.prototype.add=D.prototype.add;\nD.prototype.$=function(a){if(!r(a))throw new B(this.$,0,a);this.g.push(a)};D.prototype.registerOnDrop=D.prototype.$;D.prototype.oa=function(a){this.g=this.g.filter(function(b){return b!==a})};D.prototype.deRegisterOnDrop=D.prototype.oa;D.prototype.get=function(a,b){return(a=b?this.a[a]:Ta(this,this.a[a]))&&a.data};D.prototype.get=D.prototype.get;D.prototype.qa=function(a){var b;(b=this.a[a])&&Ua(this,b,!0)};D.prototype.drop=D.prototype.qa;\nD.prototype.forEach=function(a,b,c){var d;for(d in this.a){var e=this.a[d];(c?c(d,e.data,e.size):1)&&a.call(b,d,e.data,e.size)}};D.prototype.forEach=D.prototype.forEach;D.prototype.S=function(a){var b;for(b in this.a){var c=this.a[b];(a?a(b,c.data,c.size):1)&&Ua(this,this.a[b],!0)}};D.prototype.removeAll=D.prototype.S;D.prototype.Da=function(a){if(!(0<+a))throw new B(D.prototype.Da,0,a);this.i=+a;Wa(this);return this};D.prototype.setMaxSize=D.prototype.Da;D.prototype.ob=function(){return this.i};\nD.prototype.getMaxSize=D.prototype.ob;D.prototype.kb=function(){return this.b};D.prototype.getCurrentSize=D.prototype.kb;function Ta(a,b){b&&(a.c=Va(a,b,a.c));return b}function Wa(a){for(;a.b>a.i&&a.f;)Ua(a,a.f,!0)}function Va(a,b,c){if(c!==b){(b.A||b.D)&&Ua(a,b);if(b.A=c)b.D=c.D,c.D=b;b.D||(a.c=b);b.A||(a.f=b);a.b+=b.size}return b}\nfunction Ua(a,b,c){var d=b.D,e=b.A;if(d||e||b==a.c&&b==a.f)if(d?d.A=e:a.c=e,e?e.D=d:a.f=d,a.b-=b.size,c){for(c=a.g.length;c--;)a.g[c].call(a,b.id,b.data,b.size);delete a.a[b.id]}b.A=b.D=null};function E(){}t(\"H.service.extension.dataView.ITable\",E);E.prototype.ta=function(){};E.prototype.getMeta=E.prototype.ta;E.prototype.ua=function(){};E.prototype.getRowCount=E.prototype.ua;E.prototype.ha=function(){};E.prototype.getRow=E.prototype.ha;E.prototype.C=function(){};E.prototype.getColumnNames=E.prototype.C;E.prototype.sa=function(){};E.prototype.getColumn=E.prototype.sa;E.prototype.s=function(){};E.prototype.getCell=E.prototype.s;E.prototype.concat=function(){};E.prototype.concat=E.prototype.concat;function $a(){}t(\"H.service.extension.dataView.IRow\",$a);$a.prototype.C=function(){};$a.prototype.getColumnNames=$a.prototype.C;$a.prototype.s=function(){};$a.prototype.getCell=$a.prototype.s;$a.prototype.va=function(){};$a.prototype.getTable=$a.prototype.va;function ab(a,b){this.a=a;this.b=b}t(\"H.service.extension.dataView.ObjRow\",ab);ab.prototype.C=function(){return this.a.C()};ab.prototype.getColumnNames=ab.prototype.C;ab.prototype.s=function(a){return this.a.s(this.b,a)};ab.prototype.getCell=ab.prototype.s;ab.prototype.va=function(){return this.a};ab.prototype.getTable=ab.prototype.va;function bb(){}t(\"H.service.extension.dataView.IColumn\",bb);bb.prototype.s=function(){};bb.prototype.getCell=bb.prototype.s;function cb(a,b){this.b=a;this.a=b}t(\"H.service.extension.dataView.ObjColumn\",cb);cb.prototype.s=function(a){return this.b.s(a,this.a)};cb.prototype.getCell=cb.prototype.s;function B(a,b,c){var d=arguments.length;b=1=f?e=a:1<=f?e=b:e=new G(a.x+f*c,a.y+f*d)}return e};G.prototype.getNearest=G.prototype.pb;G.prototype.pa=function(a){return hb(ib(this.x-a.x,2)+ib(this.y-a.y,2))};G.prototype.distance=G.prototype.pa;G.fromIPoint=function(a){if(!a)throw Error(\"invalid argument\");return a instanceof G?a:new G(a.x,a.y)};var H=Math,jb=H.min,kb=H.max,eb=H.round,fb=H.floor,gb=H.ceil,lb=H.abs,mb=H.log,hb=H.sqrt,ib=H.pow,nb=H.exp,ob=H.sin,pb=H.asin,qb=H.cos,rb=H.tan,sb=H.atan,tb=H.atan2,ub=H.LN2,J=H.PI,vb=J/2,wb=J/4,xb=2*J,zb=3*J,Ab=J/180,Bb=180/J,Cb=1/0;ib(-2,53);function Db(a,b){var c;return 0>(c=a%b)===0>b?c:c+b}t(\"H.math.normalize\",function(a,b,c){b-=c=c||0;a-=c;return a-fb(a/b)*b+c});function Eb(a,b,c){return a>c?c:a=b-d&&a<=c+d:a>=c-d&&a<=b+d}function Gb(a,b,c,d,e,f){return hb(ib((a-e)*(d-f)-(b-f)*(c-e),2)/(ib(c-e,2)+ib(d-f,2)))}var Hb={NONE:0,VERTEX:1,EDGE:2,SURFACE:3};t(\"H.math.CoverType\",Hb);\nfunction Ib(a,b,c,d,e){for(var f=c.length,g=f,h,k,m,q=c[0],n=0,u=0,C=0,y=d/2||0,v=e?1:3;1!=n&&g>v;){h=c[--g];d=c[--g];m=c[g?g-1:(f+(g-1))%f];k=c[g?g-2:(f+(g-2))%f];if(d>=a-y&&d<=a+y&&h>=b-y&&h<=b+y||k>=a-y&&k<=a+y&&m>=b-y&&m<=b+y)n=1;else if(!n&&d===a)k===a&&(hb||h>b&&ma||q>=a&&k=b?++u:++C),n=Fb(b,h,m,y)&&Gb(a,b,d,h,k,m)<=y?2:0;else if(!n&&Fb(a,d,k,y)){if(da||d>a&&kb,C+=qh){if(h>e||ge||hb){if(b>c||ac||bc)return;g=d}if(ae)return;a=f}h>e&&(b=a+(e-g)*(b-a)/(h-g),h=e);b>c&&(h=g+(c-a)*(h-g)/(b-a),b=c);q&&(a=-a,b=-b);return k?[new G(h,-b),new G(g,-a)]:[new G(g,-a),new G(h,-b)]}\nfunction Lb(a,b,c){a=Mb(a,!0);b=Mb(b,!1);var d,e;var f={};var g=d=1;switch(~~(c||0)){case 1:g=d=0;break;case 2:d=0;g=1;break;case 3:d=1,g=0}c=d;var h=g;if(b&&a){b.ea=Nb(b.x,b.y,null,Ob(b));a.ea=Nb(a.x,a.y,null,Ob(a));for(g=b;g.next;g=g.next)if(!g.B)for(d=a;d.next;d=d.next)if(!d.B){var k=Pb(g.next);var m=Pb(d.next);if(e=Qb(g,k,d,m,f)){e=f.Za;var q=f.$a;var n=f.Rb;var u=f.Sb;e=Nb(n,u,null,null,null,null,!0,0,0,e);Rb(e,g,k);k=Nb(n,u,null,null,null,null,!0,0,0,q);Rb(k,d,m);e.za=k;k.za=e}}f=Sb(b,a);c&&\n(f=!f);for(g=b;g;g=g.next)g.B&&(g.ra=f,f=!f);f=Sb(a,b);h&&(f=!f);for(d=a;d.next;d=d.next)d.B&&(d.ra=f,f=!f);Tb(b);for(Tb(a);(a=Ub(b))!=b;){for(c=null;!a.ma;a=a.za){for(f=a.ra;;){c=Nb(a.x,a.y,c);c.artificial=a.B||a.Ab;a.ma=1;a=f?a.next:a.u;if(!a)break;if(a.B){a.ma=1;break}}if(!a)break}c.Ra=C;var C=c}return C}}t(\"H.math.clipping.clipPolygon\",Lb);\nfunction Nb(a,b,c,d,e,f,g,h,k,m){a={x:a,y:b,next:c||null,u:d||null,Ra:e||null,za:f||null,B:!!g,ra:h||0,ma:k||0,alpha:m||0};d&&(a.u.next=a);c&&(a.next.u=a);return a}function Pb(a){for(;a&&a.B;)a=a.next;return a}function Ob(a){if(a)for(;a.next;)a=a.next;return a}function Ub(a){var b=a;if(b){do b=b.next;while(b!=a&&(!b.B||b.B&&b.ma))}return b}function Tb(a){var b=Ob(a);b.u.next=a;a.u=b.u}\nfunction Qb(a,b,c,d,e){var f,g=b.x-a.x,h=b.y-a.y;var k=d.x-c.x;var m=d.y-c.y;var q=g*m-h*k;if(!q)return 0;k=((c.x-a.x)*m-(c.y-a.y)*k)/q;q=(h*(c.x-a.x)-g*(c.y-a.y))/q;if(0>k||1q||1a.b&&(a.b++,b.next=a.a,a.a=b)};function jc(){this.b=this.a=null}var nc=new hc(function(){return new kc},function(a){a.reset()});jc.prototype.add=function(a,b){var c=nc.get();c.set(a,b);this.b?this.b.next=c:this.a=c;this.b=c};function oc(){var a=pc,b=null;a.a&&(b=a.a,a.a=a.a.next,a.a||(a.b=null),b.next=null);return b}function kc(){this.next=this.b=this.a=null}kc.prototype.set=function(a,b){this.a=a;this.b=b;this.next=null};kc.prototype.reset=function(){this.next=this.b=this.a=null};var qc=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\\s\\xa0]*([\\s\\S]*?)[\\s\\xa0]*$/.exec(a)[1]};function rc(a,b){return ab?1:0};var sc;a:{var tc=p.navigator;if(tc){var uc=tc.userAgent;if(uc){sc=uc;break a}}sc=\"\"}function M(a){return-1!=sc.indexOf(a)};function vc(a){p.setTimeout(function(){throw a;},0)}var wc;\nfunction xc(){var a=p.MessageChannel;\"undefined\"===typeof a&&\"undefined\"!==typeof window&&window.postMessage&&window.addEventListener&&!M(\"Presto\")&&(a=function(){var a=document.createElement(\"IFRAME\");a.style.display=\"none\";a.src=\"\";document.documentElement.appendChild(a);var b=a.contentWindow;a=b.document;a.open();a.write(\"\");a.close();var c=\"callImmediate\"+Math.random(),d=\"file:\"==b.location.protocol?\"*\":b.location.protocol+\"//\"+b.location.host;a=na(function(a){if((\"*\"==d||a.origin==d)&&a.data==\nc)this.port1.onmessage()},this);b.addEventListener(\"message\",a,!1);this.port1={};this.port2={postMessage:function(){b.postMessage(c,d)}}});if(\"undefined\"!==typeof a&&!M(\"Trident\")&&!M(\"MSIE\")){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var a=c.Ia;c.Ia=null;a()}};return function(a){d.next={Ia:a};d=d.next;b.port2.postMessage(0)}}return\"undefined\"!==typeof document&&\"onreadystatechange\"in document.createElement(\"SCRIPT\")?function(a){var b=document.createElement(\"SCRIPT\");\nb.onreadystatechange=function(){b.onreadystatechange=null;b.parentNode.removeChild(b);b=null;a();a=null};document.documentElement.appendChild(b)}:function(a){p.setTimeout(a,0)}};function yc(a,b){zc||Ac();Bc||(zc(),Bc=!0);pc.add(a,b)}var zc;function Ac(){if(-1!=String(p.Promise).indexOf(\"[native code]\")){var a=p.Promise.resolve(void 0);zc=function(){a.then(Cc)}}else zc=function(){var a=Cc;!r(p.setImmediate)||p.Window&&p.Window.prototype&&!M(\"Edge\")&&p.Window.prototype.setImmediate==p.setImmediate?(wc||(wc=xc()),wc(a)):p.setImmediate(a)}}var Bc=!1,pc=new jc;function Cc(){for(var a;a=oc();){try{a.a.call(a.b)}catch(b){vc(b)}ic(nc,a)}Bc=!1};function O(a){this.a=Dc;this.v=void 0;this.f=this.b=this.c=null;this.g=this.i=!1;if(a!=da)try{var b=this;a.call(void 0,function(a){Ec(b,Fc,a)},function(a){Ec(b,Gc,a)})}catch(c){Ec(this,Gc,c)}}var Dc=0,Fc=2,Gc=3;function Hc(){this.next=this.c=this.b=this.f=this.a=null;this.g=!1}Hc.prototype.reset=function(){this.c=this.b=this.f=this.a=null;this.g=!1};var Ic=new hc(function(){return new Hc},function(a){a.reset()});function Jc(a,b,c){var d=Ic.get();d.f=a;d.b=b;d.c=c;return d}\nfunction Kc(a,b,c){Lc(a,b,c,null)||yc(pa(b,a))}function Mc(a){return new O(function(b,c){var d=a.length,e=[];if(d)for(var f=function(a,c){d--;e[a]=c;0==d&&b(e)},g=function(a){c(a)},h=0,k;hthis.X){this.f();var a=this.c(),b=this.b,c=a.a[b].indexOf(this);-1parseFloat(ud)){td=String(wd);break a}}td=ud}var xd={},yd;var zd=p.document;yd=zd&&od?sd()||(\"CSS1Compat\"==zd.compatMode?parseInt(td,10):5):void 0;var Ad;(Ad=!od)||(Ad=9<=Number(yd));var Bd=Ad,Cd;\nif(Cd=od){var Dd;if(Object.prototype.hasOwnProperty.call(xd,\"9\"))Dd=xd[\"9\"];else{for(var Ed=0,Fd=qc(String(td)).split(\".\"),Gd=qc(\"9\").split(\".\"),Hd=Math.max(Fd.length,Gd.length),Id=0;0==Ed&&Id=a.keyCode)a.keyCode=-1}catch(b){}};var Rd=\"closure_lm_\"+(1E6*Math.random()|0),Sd={},Td=0;function Ud(a,b,c,d,e){if(d&&d.once)Vd(a,b,c,d,e);else if(\"array\"==ea(b))for(var f=0;fd.keyCode||void 0!=d.returnValue)){a:{var e=!1;if(0==d.keyCode)try{d.keyCode=-1;break a}catch(g){e=!0}if(e||void 0==d.returnValue)d.returnValue=!0}d=[];for(e=b.currentTarget;e;e=e.parentNode)d.push(e);a=a.type;for(e=d.length-1;!b.a&&0<=e;e--){b.currentTarget=d[e];var f=de(d[e],a,!0,b);c=c&&f}for(e=0;!b.a&&e>>0);function Wd(a){if(r(a))return a;a[ge]||(a[ge]=function(b){return a.handleEvent(b)});return a[ge]};function Q(){K.call(this);this.b=new jd(this);this.v=this;this.i=null}qa(Q,K);Q.prototype[fd]=!0;l=Q.prototype;l.I=function(){return this.i};l.Ea=function(a){this.i=a};l.addEventListener=function(a,b,c,d){Ud(this,a,b,c,d)};l.removeEventListener=function(a,b,c,d){be(this,a,b,c,d)};\nl.dispatchEvent=function(a){var b,c=this.I();if(c)for(b=[];c;c=c.I())b.push(c);c=this.v;var d=a.type||a;if(aa(a))a=new L(a,c);else if(a instanceof L)a.target=a.target||c;else{var e=a;a=new L(d,c);va(a,e)}e=!0;if(b)for(var f=b.length-1;!a.a&&0<=f;f--){var g=a.currentTarget=b[f];e=g.O(d,!0,a)&&e}a.a||(g=a.currentTarget=c,e=g.O(d,!0,a)&&e,a.a||(e=g.O(d,!1,a)&&e));if(b)for(f=0;!a.a&&fd||180a^0>b)&&180vb&&(f=0vb?J:0))%xb-J)*Bb):this};U.prototype.walk=U.prototype.Qb;U.prototype.ga=function(){return new V(this.lat,this.lng,this.lat,this.lng)};U.prototype.getBoundingBox=U.prototype.ga;function pe(a,b,c){var d=fa(a)&&!(Ja(a.lat=le(a.lat))||Ja(a.lng=me(a.lng))||a.alt!==A&&Ja(a.alt=ne(a.alt)));if(!d&&b)throw new B(b,c,a);return d}U.validate=pe;\nfunction qe(a){if(!a)throw new B(qe,0,a);return new U(a.lat,a.lng,a.alt)}U.fromIPoint=qe;U.prototype.f=\"Point\";U.prototype.g=function(a){a.push(\"(\",this.lng,\" \",this.lat,\")\");return a};var W={};t(\"H.geo.mercator\",W);W.a=function(a){return jb(1,kb(0,.5-mb(rb(wb+vb*a/180))/J/2))};W.b=function(a){return a/360+.5};W.ja=function(a,b,c){c?(c.x=W.b(b),c.y=W.a(a)):c=new G(W.b(b),W.a(a));return c};W.latLngToPoint=W.ja;W.hb=function(a,b){return W.ja(a.lat,a.lng,b)};W.geoToPoint=W.hb;W.f=function(a){return 0>=a?90:1<=a?-90:Bb*(2*sb(nb(J*(1-2*a)))-vb)};W.c=function(a){return 360*(1===a?1:Db(a,1))-180};W.V=function(a,b,c){c?(c.lat=W.f(b),c.lng=W.c(a)):c=new U(W.f(b),W.c(a));return c};\nW.xyToGeo=W.V;W.Gb=function(a,b){return W.V(a.x,a.y,b)};W.pointToGeo=W.Gb;t(\"H.util.constants.DEFAULT_MIN_ZOOM_LEVEL\",0);t(\"H.util.constants.DEFAULT_MAX_ZOOM_LEVEL\",22);function Y(a,b){this.projection=a||W;this.b=0;this.a=this.exp=mb(b||256)/ub;re(this);this.y=this.x=0}t(\"H.geo.PixelProjection\",Y);var se=lb(24)+lb(-8);Y.prototype.aa=function(a){if(Ja(a))throw new B(this.aa,0,a);var b=this.x/this.w;var c=this.y/this.h;this.b=a;this.a=this.exp+a;re(this);this.x=b*this.w;this.y=c*this.h};Y.prototype.rescale=Y.prototype.aa;function re(a){a.a>se&&(a.a=se);a.w=ib(2,a.a);a.h=ib(2,a.a)}Y.prototype.Ma=function(){return this.b||0};Y.prototype.getZoomScale=Y.prototype.Ma;\nY.prototype.gb=function(a,b){a=this.projection.ja(a.lat,a.lng,b);a.x=a.x*this.w-this.x;a.y=a.y*this.h-this.y;return a};Y.prototype.geoToPixel=Y.prototype.gb;Y.prototype.Ba=function(a,b){return this.projection.V((a.x+this.x)/this.w,(a.y+this.y)/this.h,b)};Y.prototype.pixelToGeo=Y.prototype.Ba;Y.prototype.V=function(a,b,c){return this.projection.V((a+this.x)/this.w,(b+this.y)/this.h,c)};Y.prototype.xyToGeo=Y.prototype.V;\nY.prototype.wa=function(a,b,c){a=this.projection.ja(a,b,c);a.x=a.x*this.w-this.x;a.y=a.y*this.h-this.y;return a};Y.prototype.latLngToPixel=Y.prototype.wa;Y.prototype.Hb=function(a){return new G(a.x*this.w-this.x,a.y*this.h-this.y)};Y.prototype.pointToPixel=Y.prototype.Hb;t(\"H.util.Disposable\",K);K.prototype.L=K.prototype.L;K.prototype.addOnDisposeCallback=K.prototype.L;t(\"H.util.dispose\",function(a){a&&\"function\"==typeof a.N&&a.N()});function te(a,b,c,d){this.key=\"\";this.x=a;this.y=b;this.b=c;this.W=d;this.a=Nc()}te.prototype.then=function(a,b,c){return this.a.a.then(a,b,c)};te.prototype.reject=function(a){this.a.reject(a)};te.prototype.cancel=function(){this.a.a.cancel()};function Z(a,b,c,d,e,f){if(a&&b)this.Wa(a),this.Ca(b),this.Fa(c),this.Va(e),this.Ua(f),this.Ga(d);else throw Error('Parameters \"scheme\" and \"host\" must be specified');}t(\"H.service.Url\",Z);\nfunction ue(a,b){var c=z.document,d,e=c&&c.createElement(\"a\"),f=\"\";if(c){if(b){var g=(d=c.getElementsByTagName(\"base\")[0])&&d.href;var h=c.head;var k=d||h.appendChild(c.createElement(\"base\"));k.href=b}e.href=a;f=e.href;b&&(d?d.href=g:h.removeChild(k))}else/[\\w]+:\\/\\//.test(a)&&(f=a);g=/(?:(\\w+):\\/\\/)?(?:([^:]+):([^@/]*)@)?([^/:]+)?(?:[:]{1}([0-9]+))?(\\/[^?#]*)?(\\?[^#]+)?(#.*)?/.exec(f);a=g[1];k=g[4];b=g[5];h=g[6];c=g[7];d=g[8];!g[2]&&k&&/@/.test(k)&&(k=k.split(\"@\")[1]);g=k;h=h&&0f||(g=a[c++],224>f?f=(f&31)<<6|g&63:(h=a[c++],240>f?f=(f&15)<<12|(g&63)<<6|h&63:(k=a[c++],f=(f&7)<<18|(g&63)<<12|(h&63)<<6|k&63))),65536>f?d+=String.fromCharCode(f):(f-=65536,d+=String.fromCharCode((f>>10)+55296,(f&1023)+56320));c=d}e(c)}}}var Ge=0,Ie=1;function V(a,b,c,d){Je(this,le(a,V,0),me(b,V,1),le(c,V,2),me(d,V,3))}qa(V,oe);t(\"H.geo.Rect\",V);V.prototype.f=\"Polygon\";V.prototype.g=function(a){var b=this.o,c=this.j,d=this.m,e=this.l;a.push(\"(\",\"(\",c,\" \",b,\",\",e,\" \",b,\",\",e,\" \",d,\",\",c,\" \",d,\",\",c,\" \",b,\")\",\")\");return a};V.prototype.G=function(a){return this===a||!!a&&this.o===a.o&&this.j===a.j&&this.m===a.m&&this.l===a.l};V.prototype.equals=V.prototype.G;V.prototype.clone=function(){return new V(this.o,this.j,this.m,this.l)};\nV.prototype.clone=V.prototype.clone;function Je(a,b,c,d,e){a.j=c;a.l=e;bthis.l};V.prototype.isCDB=V.prototype.zb;V.prototype.Cb=function(){return!this.J()&&!this.P()};V.prototype.isEmpty=V.prototype.Cb;V.prototype.ga=function(){return new V(this.o,this.j,this.m,this.l)};V.prototype.getBoundingBox=V.prototype.ga;V.prototype.ca=function(a,b,c){var d=this.H();c||(a=le(a,this.ca,0),b=me(b,this.ca,1));b=this.K(a,b,c);a=b.H();return a.lat===d.lat&&a.lng===d.lng&&this.P()===b.P()&&this.J()===b.J()};V.prototype.containsLatLng=V.prototype.ca;\nV.prototype.da=function(a,b){b||pe(a,this.da,0);return this.ca(a.lat,a.lng,b)};V.prototype.containsPoint=V.prototype.da;V.prototype.Ja=function(a,b){var c=this.H();if(!b&&!Ea(a,V))throw new B(this.Ja,0,a);b=this.ka(a,b);a=b.H();return a.lat===c.lat&&a.lng===c.lng&&this.P()===b.P()&&this.J()===b.J()};V.prototype.containsRect=V.prototype.Ja;\nV.prototype.K=function(a,b,c,d){if(!c){if(Ja(a=le(a)))throw new B(this.K,0,a);if(Ja(b=me(b)))throw new B(this.K,1,b);}return Me(this.o,this.j,this.m,this.l,a,b,a,b,d)};V.prototype.mergeLatLng=V.prototype.K;V.prototype.Qa=function(a,b,c){b||pe(a,this.Qa,0);return this.K(a.lat,a.lng,b,c)};V.prototype.mergePoint=V.prototype.Qa;V.prototype.ka=function(a,b,c){if(!b&&!Ea(a,V))throw new B(this.ka,0,a);return Me(this.o,this.j,this.m,this.l,a.o,a.j,a.m,a.l,c)};V.prototype.mergeRect=V.prototype.ka;\nV.prototype.Z=function(a,b,c,d,e,f){e||(a=le(a,this.Z,0),b=me(b,this.Z,1),c=le(c,this.Z,2),d=me(d,this.Z,3));return Me(this.o,this.j,this.m,this.l,a,b,c,d,f)};V.prototype.mergeTopLeftBottomRight=V.prototype.Z;V.prototype.Oa=function(a,b){var c=this.j<=this.l,d=a.j<=a.l,e=this.ja?360:0)}\nfunction Ke(a,b){a+=b/2;return a-(180q-1E-6?360:0;if(180>q-1E-6){m=b;var n=h}else q=360-q,m=f,n=d;q=q+e/2+g/2;360<=q+5E-7?(m=-180,n=180):q-5E-7k?-(g+a.lng):k;a=c+(0>k?2*k:0);a=-180>a?360+a:a;e+=0h?f+2*h:f;-90>=f&&(f=-90);return b?Je(b,d,a,f,e):new V(d,a,f,e)};V.prototype.resizeToCenter=V.prototype.Sa;function Re(a,b,c,d){var e=!!c,f,g=0,h=0,k=0,m=0,q=0,n,u=-1;var C=z.Float32Array;var y,v=[];if(b){b=Ca(b);a=Ca(a);e&&(f=Ca(c));c=b.length;d=d?1E-7:1E-5;for(y=new C(3*c);gu&&(u=g);g++;m=y[h++]=m+la*d;k=y[h++]=k+I*d;e&&(q=y[h]=q+n);h++}0<=u&&1=a[0];e--)for(b=d[1];b<=a[1];b++)c.push(e,b);return c};function Xe(a,b){var c=a.tileSize||256;this.b={};this.v=ue(a.serverUrl);this.g=b;this.Aa=a.layerConfigs||[];this.i=a.projected;this.R=c;this.xa=!1!==a.batchTiles;this.Lb=a.onlyOutline;this.Pb=new Y(Ba,c);this.f=new Y(Ba,c);this.f.aa(22-Math.log(c)/Math.LN2+8)}qa(Xe,K);l=Xe.prototype;l.Kb=function(a,b,c){var d=this.R,e={x:a*d,y:b*d};d={x:a*d+(d-1),y:b*d+(d-1)};var f=this.Pb;f.aa(c);e=f.Ba(e);d=f.Ba(d);return Ye(this,new V(e.lat,e.lng,d.lat,d.lng),this.Aa,{x:a,y:b,z:c})};\nl.Jb=function(a,b,c,d,e){return Ye(this,new V(a,b,c,d),e)};\nfunction Ye(a,b,c,d){var e=Ze(c),f=e.length,g={},h,k=a.b,m=[],q=[];for(c=0;c=lc){X===lc&&(N=S.length);var ha=Jb([w],k,m,q,f,!1);jf(ha,g,b,d,S)}else{var yb=yb||(yb=ff(k,m,q,f,!0));if(X>=v)if(X===v&&(R=S.length),Za)for(n=Za.length;n--;){if(ha=kf(Za[n],w),u=ha.length){for(ba=ba||[];u--;)ba.push(n);jf(ha,g,b,d,S)}}else ha=kf(yb,w),jf(ha,g,b,d,S);else if(ha=kf(yb,w),jf(ha,g,b,d,S),1>d;g[h++]=k.y-c>>d}return g}\nl.fb=function(a,b){var c=b.Ob,d=b.bb,e=b.yb,f=b.Eb;b=b.cb;for(var g=[],h,k={Rows:g},m,q=a?a.length:0,n=0,u,C=c.Rows,y=C.length,v;n=c,f=y.Na,d=f.length,b?(m.push(d),m=m.concat(f)):\n(k+=d,q=q.concat(f));c=[k].concat(q).concat(m);c=e?(new Uint32Array(c)).buffer:c;this.postMessage(c,[c])});self.addEventListener(\"message\",function(a){a=new Ce(a.data);var b=ye[a.b];if(b)try{b.apply(a,a.c)}catch(c){a.postError(c.message)}else a.postError(\"processor_not_found\")});(function(){var a=new Ce;var b=function(b,d){Be.apply(a,[b,d,!0])};b(\"0\",ze);b(\"1\",Be);b(\"2\",Ae);b(\"3\",He)})();\n"; !function(){var e=function(){if(("undefined"==typeof self||!("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope))&&("undefined"!=typeof module&&module.exports||"undefined"!=typeof window))var sp=e.toString(),lp="",up="undefined"!=typeof document&&document.currentScript instanceof HTMLScriptElement?document.currentScript.src:"";!function(){"use strict";function n(e){return t.call(e).slice(8,-1)}var t={}.toString,e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e,t){return e(t={exports:{}},t.exports),t.exports}function r(e){return e&&e.Math==Math&&e}function o(e){try{return!!e()}catch(e){return!0}}function a(e){return"object"==typeof e?null!==e:"function"==typeof e}function s(e){return y?g.createElement(e):{}}function f(e){if(!a(e))throw TypeError(String(e)+" is not an object");return e}function l(e,t){if(!a(e))return e;var i,r;if(t&&"function"==typeof(i=e.toString)&&!a(r=i.call(e)))return r;if("function"==typeof(i=e.valueOf)&&!a(r=i.call(e)))return r;if(!t&&"function"==typeof(i=e.toString)&&!a(r=i.call(e)))return r;throw TypeError("Can't convert object to primitive value")}function m(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function c(t,i){try{T(p,t,i)}catch(e){p[t]=i}return i}function u(e){return"Symbol(".concat(void 0===e?"":e,")_",(++k+E).toString(36))}function h(e){return R[e]||(R[e]=M&&S[e]||(M?S:u)("Symbol."+e))}function d(e){var t,i,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),P))?i:z?n(t):"Object"==(r=n(t))&&"function"==typeof t.callee?"Arguments":r}var _="object",p=r(typeof globalThis==_&&globalThis)||r(typeof window==_&&window)||r(typeof self==_&&self)||r(typeof e==_&&e)||Function("return this")(),v=!o(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),g=p.document,y=a(g)&&a(g.createElement),x=!v&&!o(function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}),b=Object.defineProperty,A={f:v?b:function(e,t,i){if(f(e),t=l(t,!0),f(i),x)try{return b(e,t,i)}catch(e){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},T=v?function(e,t,i){return A.f(e,t,m(1,i))}:function(e,t,i){return e[t]=i,e},w=i(function(e){var t="__core-js_shared__",i=p[t]||c(t,{});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.1.0",mode:"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})}),k=0,E=Math.random(),M=!o(function(){return!String(Symbol())}),R=w("wks"),S=p.Symbol,P=h("toStringTag"),z="Arguments"==n(function(){return arguments}()),N={};N[h("toStringTag")]="z";function O(e,t){return j.call(e,t)}function I(e){return V[e]||(V[e]=u(e))}var L,C,F,D="[object z]"!==String(N)?function(){return"[object "+d(this)+"]"}:N.toString,j={}.hasOwnProperty,U=w("native-function-to-string",Function.toString),G=p.WeakMap,B="function"==typeof G&&/native code/.test(U.call(G)),V=w("keys"),q={},Y=p.WeakMap;if(B){var W=new Y,X=W.get,Z=W.has,K=W.set;L=function(e,t){return K.call(W,e,t),t},C=function(e){return X.call(W,e)||{}},F=function(e){return Z.call(W,e)}}else{var J=I("state");q[J]=!0,L=function(e,t){return T(e,J,t),t},C=function(e){return O(e,J)?e[J]:{}},F=function(e){return O(e,J)}}var $={set:L,get:C,has:F,enforce:function(e){return F(e)?C(e):L(e,{})},getterFor:function(i){return function(e){var t;if(!a(e)||(t=C(e)).type!==i)throw TypeError("Incompatible receiver, "+i+" required");return t}}},Q=i(function(e){var t=$.get,s=$.enforce,l=String(U).split("toString");w("inspectSource",function(e){return U.call(e)}),(e.exports=function(e,t,i,r){var n=!!r&&!!r.unsafe,o=!!r&&!!r.enumerable,a=!!r&&!!r.noTargetGet;"function"==typeof i&&("string"!=typeof t||O(i,"name")||T(i,"name",t),s(i).source=l.join("string"==typeof t?t:"")),e!==p?(n?!a&&e[t]&&(o=!0):delete e[t],o?e[t]=i:T(e,t,i)):o?e[t]=i:c(t,i)})(Function.prototype,"toString",function(){return"function"==typeof this&&t(this).source||U.call(this)})}),ee=Object.prototype;D!==ee.toString&&Q(ee,"toString",D,{unsafe:!0});function te(e){return isNaN(e=+e)?0:(0n;)O(r,i=t[n++])&&(~ke(o,i)||o.push(i));return o}function ae(e,t){for(var i=ze(t),r=A.f,n=be.f,o=0;odocument.F=Object"),e.close(),Qe=e.F;i--;)delete Qe[$e][Ee[i]];return Qe()},et=Object.create||function(e,t){var i;return null!==e?(He[$e]=f(e),i=new He,He[$e]=null,i[Je]=e):i=Qe(),void 0===t?i:Xe(i,t)};q[Je]=!0;function tt(e,t,i){e&&!O(e=i?e:e.prototype,at)&&ot(e,at,{configurable:!0,value:t})}function it(){return this}function rt(){return this}function nt(e,t,i,r,n,o,a){function s(e){if(e===n&&p)return p;if(!ft&&e in d)return d[e];switch(e){case"keys":case dt:case _t:return function(){return new i(this,e)}}return function(){return new i(this)}}!function(e,t,i){var r=t+" Iterator";e.prototype=et(lt,{next:m(1,i)}),tt(e,r,!1),st[r]=it}(i,t,r);var l,u,c,h=t+" Iterator",f=!1,d=e.prototype,_=d[ct]||d["@@iterator"]||n&&d[n],p=!ft&&_||s(n),v="Array"==t&&d.entries||_;if(v&&(l=Be(v.call(new e)),ht!==Object.prototype&&l.next&&(Be(l)!==ht&&(ut?ut(l,ht):"function"!=typeof l[ct]&&T(l,ct,rt)),tt(l,h,!0))),n==dt&&_&&_.name!==dt&&(f=!0,p=function(){return _.call(this)}),d[ct]!==p&&T(d,ct,p),st[t]=p,n)if(u={values:s(dt),keys:o?p:s("keys"),entries:s(_t)},a)for(c in u)!ft&&!f&&c in d||Q(d,c,u[c]);else le({target:t,proto:!0,forced:ft||f},u);return u}var ot=A.f,at=h("toStringTag"),st={},lt=Ye.IteratorPrototype,ut=Object.setPrototypeOf||("__proto__"in{}?function(){var i,r=!1,e={};try{(i=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return function(e,t){if(f(e),!a(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype")}(e,t),r?i.call(e,t):e.__proto__=t,e}}():void 0),ct=h("iterator"),ht=Ye.IteratorPrototype,ft=Ye.BUGGY_SAFARI_ITERATORS,dt="values",_t="entries",pt="String Iterator",vt=$.set,mt=$.getterFor(pt);nt(String,"String",function(e){vt(this,{type:pt,string:String(e),index:0})},function(){var e,t=mt(this),i=t.string,r=t.index;return r>=i.length?{value:void 0,done:!0}:(e=function(e,t,i){var r,n,o=String(ie(e)),a=te(t),s=o.length;return a<0||s<=a?i?"":void 0:(r=o.charCodeAt(a))<55296||56319=t.length?{value:e.target=void 0,done:!0}:"keys"==i?{value:r,done:!1}:"values"==i?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");st.Arguments=st.Array,bt("keys"),bt("values"),bt("entries");var Et=h("iterator"),Mt=h("toStringTag"),Rt=kt.values;for(var St in gt){var Pt=p[St],zt=Pt&&Pt.prototype;if(zt){if(zt[Et]!==Rt)try{T(zt,Et,Rt)}catch(e){zt[Et]=Rt}if(zt[Mt]||T(zt,Mt,St),gt[St])for(var Nt in kt)if(zt[Nt]!==kt[Nt])try{T(zt,Nt,kt[Nt])}catch(e){zt[Nt]=kt[Nt]}}}function Ot(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}function It(r,n,e){if(Ot(r),void 0===n)return r;switch(e){case 0:return function(){return r.call(n)};case 1:return function(e){return r.call(n,e)};case 2:return function(e,t){return r.call(n,e,t)};case 3:return function(e,t,i){return r.call(n,e,t,i)}}return function(){return r.apply(n,arguments)}}function Lt(t,e,i,r){try{return r?e(f(i)[0],i[1]):e(i)}catch(e){var n=t.return;throw void 0!==n&&f(n.call(t)),e}}var Ct=h("iterator"),Ft=Array.prototype,Dt=h("iterator"),jt=i(function(e){var h={};(e.exports=function(e,t,i,r,n){var o,a,s,l,u,c=It(t,i,r?2:1);if(n)o=e;else{if("function"!=typeof(a=function(e){if(null!=e)return e[Dt]||e["@@iterator"]||st[d(e)]}(e)))throw TypeError("Target is not iterable");if(function(e){return void 0!==e&&(st.Array===e||Ft[Ct]===e)}(a)){for(s=0,l=ne(e.length);se;)t(r[e++]);h.reactions=[],h.notified=!1,i&&!h.rejection&&cr(c,h)})}}function Ni(e,t,i){var r,n;ar?((r=$i.createEvent("Event")).promise=t,r.reason=i,r.initEvent(e,!1,!0),p.dispatchEvent(r)):r={promise:t,reason:i},(n=p["on"+e])?n(r):e===sr&&function(e,t){var i=p.console;i&&i.error&&(1===arguments.length?i.error(e):i.error(e,t))}("Unhandled promise rejection",i)}function Oi(t,i,r,n){return function(e){t(i,r,e,n)}}function Ii(e,t,i,r){t.done||(t.done=!0,r&&(t=r),t.value=i,t.state=2,zi(e,t,!0))}var Li,Ci,Fi,Di,ji,Ui=wi||function(e){var t={fn:e,next:void 0};ui&&(ui.next=t),li||(li=t,ci()),ui=t},Gi={f:function(e){return new ki(e)}},Bi=p,Vi=h("species"),qi="Promise",Hi=_i.set,Yi=h("species"),Wi=$.get,Xi=$.set,Zi=$.getterFor(qi),Ki=p[qi],Ji=p.TypeError,$i=p.document,Qi=p.process,er=p.fetch,tr=Qi&&Qi.versions,ir=tr&&tr.v8||"",rr=Gi.f,nr=rr,or="process"==n(Qi),ar=!!($i&&$i.createEvent&&p.dispatchEvent),sr="unhandledrejection",lr=Fe(qi,function(){function t(){}var e=Ki.resolve(1),i=(e.constructor={})[Yi]=function(e){e(t,t)};return!((or||"function"==typeof PromiseRejectionEvent)&&e.then(t)instanceof i&&0!==ir.indexOf("6.6")&&-1===vi.indexOf("Chrome/66"))}),ur=lr||!function(e,t){if(!t&&!Gt)return!1;var i=!1;try{var r={};r[Ut]=function(){return{next:function(){return{done:i=!0}}}},e(r)}catch(e){}return i}(function(e){Ki.all(e).catch(function(){})}),cr=function(i,r){Hi.call(p,function(){var e,t=r.value;if(hr(r)&&(e=Mi(function(){or?Qi.emit("unhandledRejection",t,i):Ni(sr,i,t)}),r.rejection=or||hr(r)?2:1,e.error))throw e.value})},hr=function(e){return 1!==e.rejection&&!e.parent},fr=function(e,t){Hi.call(p,function(){or?Qi.emit("rejectionHandled",e):Ni("rejectionhandled",e,t.value)})},dr=function(i,r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(i===e)throw Ji("Promise can't be resolved itself");var n=Pi(e);n?Ui(function(){var t={done:!1};try{n.call(e,Oi(dr,i,t,r),Oi(Ii,i,t,r))}catch(e){Ii(i,t,e,r)}}):(r.value=e,r.state=1,zi(i,r,!1))}catch(e){Ii(i,{done:!1},e,r)}}};lr&&(Ki=function(e){!function(e,t,i){if(!(e instanceof t))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation")}(this,Ki,qi),Ot(e),Li.call(this);var t=Wi(this);try{e(Oi(dr,this,t),Oi(Ii,this,t))}catch(e){Ii(this,t,e)}},(Li=function(e){Xi(this,{type:qi,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(e,t,i){for(var r in t)Q(e,r,t[r],i);return e}(Ki.prototype,{then:function(e,t){var i=Zi(this),r=rr(Vt(this,Ki));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=or?Qi.domain:void 0,i.parent=!0,i.reactions.push(r),0!=i.state&&zi(this,i,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Ci=function(){var e=new Li,t=Wi(e);this.promise=e,this.resolve=Oi(dr,e,t),this.reject=Oi(Ii,e,t)},Gi.f=rr=function(e){return e===Ki||e===Fi?new Ci(e):nr(e)},"function"==typeof er&&le({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Ei(Ki,er.apply(p,arguments))}})),le({global:!0,wrap:!0,forced:lr},{Promise:Ki}),tt(Ki,qi,!1),Di=Si(qi),ji=A.f,v&&Di&&!Di[Vi]&&ji(Di,Vi,{configurable:!0,get:function(){return this}}),Fi=Bi[qi],le({target:qi,stat:!0,forced:lr},{reject:function(e){var t=rr(this);return t.reject.call(void 0,e),t.promise}}),le({target:qi,stat:!0,forced:lr},{resolve:function(e){return Ei(this,e)}}),le({target:qi,stat:!0,forced:ur},{all:function(e){var s=this,t=rr(s),l=t.resolve,u=t.reject,i=Mi(function(){var r=Ot(s.resolve),n=[],o=0,a=1;jt(e,function(e){var t=o++,i=!1;n.push(void 0),a++,r.call(s,e).then(function(e){i||(i=!0,n[t]=e,--a||l(n))},u)}),--a||l(n)});return i.error&&u(i.value),t.promise},race:function(e){var i=this,r=rr(i),n=r.reject,t=Mi(function(){var t=Ot(i.resolve);jt(e,function(e){t.call(i,e).then(r.resolve,n)})});return t.error&&n(t.value),r.promise}}),le({target:"Promise",proto:!0,real:!0},{finally:function(t){var i=Vt(this,Si("Promise")),e="function"==typeof t;return this.then(e?function(e){return Ei(i,t()).then(function(){return e})}:t,e?function(e){return Ei(i,t()).then(function(){throw e})}:t)}});var _r;Bi.Promise;if("function"!=typeof Object.assign&&(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;ie.ne.x||t.ne.xe.ne.y||t.ne.yi&&(i=s[0]),s[1]>n&&(n=s[1])}return[t,r,i,n]},Yr.geometryType=function(e){return"Polygon"===e||"MultiPolygon"===e?"polygon":"LineString"===e||"MultiLineString"===e?"line":"Point"===e||"MultiPoint"===e?"point":void 0},Yr.centroid=function(e){var t=!(1=o?i():(s||(s=Date.now()),a=setTimeout(function(){i()},n))}}var on=tn={};Cr.addTarget("Utils",tn),tn.isSafari=function(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},tn.isMicrosoft=function(){return/(Trident\/7.0|Edge[ /](\d+[\.\d]+))/i.test(navigator.userAgent)},tn._requests={},tn._proxy_requests={},tn.io=function(i){var r=1>=1;)t<<=1;return t},tn.interpolate=function(e,t,i){if(!Array.isArray(t)||!Array.isArray(t[0]))return t;if(t.length<1)return t;var r,n,o,a,s;if(e<=t[0][0])a=t[0][1],"function"==typeof i&&(a=i(a));else if(e>=t[t.length-1][0])a=t[t.length-1][1],"function"==typeof i&&(a=i(a));else for(var l=0;l=t[l][0]&&e-Jr.tile_scale&&e[0]this.max_display_zoom)return!1;for(var i=0;ii.x||e.yi.y)return!1}return!0}},{key:"includesTile",value:function(e,t){return!!Rr(Ar(r.prototype),"includesTile",this).call(this,e,t)&&!!this.checkBounds(e)}},{key:"formatUrl",value:function(e,t){var i=Jr.wrapTile(t.coords,{x:!0});this.tms&&(i.y=Math.pow(2,i.z)-1-i.y);var r=e.replace("{x}",i.x).replace("{y}",i.y).replace("{z}",i.z);return null!=this.url_subdomains&&(r=r.replace("{s}",this.url_subdomains[this.next_url_subdomain]),this.next_url_subdomain=(this.next_url_subdomain+1)%this.url_subdomains.length),r}},{key:"urlHasTilePattern",value:function(e){return e&&-1>3}if(n--,1===r||2===r)o+=e.readSVarint(),a+=e.readSVarint(),1===r&&(t&&s.push(t),t=[]),t.push(new gn(o,a));else{if(7!==r)throw new Error("unknown command "+r);t&&t.push(t[0].clone())}}return t&&s.push(t),s},bn.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,i=1,r=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;e.pos>3}if(r--,1===i||2===i)(n+=e.readSVarint())>3;t=1==r?e.readString():2==r?e.readFloat():3==r?e.readDouble():4==r?e.readVarint64():5==r?e.readVarint():6==r?e.readSVarint():7==r?e.readBoolean():null}return t}(i))}function Mn(e,t,i){if(3===e){var r=new wn(i,i.readVarint()+i.pos);r.length&&(t[r.name]=r)}}kn.prototype.feature=function(e){if(e<0||e>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new xn(this._pbf,t,this.extent,this._keys,this._values)};var Rn=function(e,t){this.layers=e.readFields(Mn,{},t)},Sn=xn;Sn.prototype.loadGeometry=function(e){var t=this._pbf;t.pos=this._geometry;for(var i,r=t.readVarint()+t.pos,n=1,o=0,a=0,s=0,l=[];t.pos>3}if(o--,1===n||2===n)a+=t.readSVarint(),s+=t.readSVarint(),1===n&&(i&&l.push(i),i=[]),i.push([a*e,s*e]);else{if(7!==n)throw new Error("unknown command "+n);i&&i.push(i[0].slice())}}return i&&l.push(i),l};var Pn={UNKNOWN:0,POINT:1,LINESTRING:2,POLYGON:3};function zn(e){var t=[],i=e&&e.features;if(i)for(var r=0,n=i.length;r>1,l=r-i,u=t[i],c=t[i+1],h=t[r],f=t[r+1],d=i+3;da.maxX&&(a.maxX=c),h>a.maxY&&(a.maxY=h)}return a}function to(e,t,i,r){var n=t.geometry,o=t.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;sa)&&(i.numSimplified++,s.push(t[l]),s.push(t[l+1])),i.numPoints++;n&&function(e,t){for(var i=0,r=0,n=e.length,o=n-2;r>1,c=-7,h=i?n-1:0,f=i?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-c)-1,d>>=-c,c+=s;0>=-c,c+=r;0>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(t+=1<=a+h?f/l:f*Math.pow(2,1-h))*l&&(a++,l/=2),c<=a+h?(s=0,a=c):1<=a+h?(s=(t*l-1)*Math.pow(2,n),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),a=0));8<=n;e[i+d]=255&s,d+=_,s/=256,n-=8);for(a=a<>>0):4294967296*(t>>>0)+(e>>>0)}function yo(e,t,i){var r=t<=16383?1:t<=2097151?2:t<=268435455?3:Math.ceil(Math.log(t)/(7*Math.LN2));i.realloc(r);for(var n=i.pos-1;e<=n;n--)i.buf[n+r]=i.buf[n]}function xo(e,t){for(var i=0;i>>8,e[i+2]=t>>>16,e[i+3]=t>>>24}function zo(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}_o.prototype={destroy:function(){this.buf=null},readFields:function(e,t,i){for(i=i||this.length;this.pos>3,o=this.pos;this.type=7&r,e(n,t,this),this.pos===o&&this.skip(r)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=So(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=zo(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=So(this.buf,this.pos)+So(this.buf,this.pos+4)*po;return this.pos+=8,e},readSFixed64:function(){var e=So(this.buf,this.pos)+zo(this.buf,this.pos+4)*po;return this.pos+=8,e},readFloat:function(){var e=co(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=co(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,i,r=this.buf;return t=127&(i=r[this.pos++]),i<128?t:(t|=(127&(i=r[this.pos++]))<<7,i<128?t:(t|=(127&(i=r[this.pos++]))<<14,i<128?t:(t|=(127&(i=r[this.pos++]))<<21,i<128?t:function(e,t,i){var r,n,o=i.buf;if(n=o[i.pos++],r=(112&n)>>4,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(127&n)<<3,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(127&n)<<10,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(127&n)<<17,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(127&n)<<24,n<128)return go(e,r,t);if(n=o[i.pos++],r|=(1&n)<<31,n<128)return go(e,r,t);throw new Error("Expected varint not more than 10 bytes")}(t|=(15&(i=r[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?(e+1)/-2:e/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var e=this.readVarint()+this.pos,t=function(e,t,i){var r="",n=t;for(;n>>10&1023|55296),u=56320|1023&u),r+=String.fromCharCode(u),n+=c}return r}(this.buf,this.pos,e);return this.pos=e,t},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){var i=mo(this);for(e=e||[];this.pos>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos++]=127&e|128,e>>>=7,i.buf[i.pos]=127&e}(i,0,t),function(e,t){var i=(7&e)<<4;if(t.buf[t.pos++]|=i|((e>>>=3)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;if(t.buf[t.pos++]=127&e|((e>>>=7)?128:0),!e)return;t.buf[t.pos++]=127&e}(r,t)}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|(127>>=7)|(127>>=7)|(127>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?2*-e-1:2*e)},writeBoolean:function(e){this.writeVarint(Boolean(e))},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,i){for(var r,n,o=0;o>6|192:(r<65536?e[i++]=r>>12|224:(e[i++]=r>>18|240,e[i++]=r>>12&63|128),e[i++]=r>>6&63|128),e[i++]=63&r|128)}return i}(this.buf,e,this.pos);var i=this.pos-t;128<=i&&yo(t,i,this),this.pos=t-1,this.writeVarint(i),this.pos+=i},writeFloat:function(e){this.realloc(4),ho(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),ho(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var i=0;i>4|(3840&t)>>8,240&t|(240&t)>>4,15&t|(15&t)<<4,1]:null:7===i.length&&0<=(t=parseInt(i.substr(1),16))&&t<=16777215?[(16711680&t)>>16,(65280&t)>>8,255&t,1]:null;var r=i.indexOf("("),n=i.indexOf(")");if(-1!==r&&n+1===i.length){var o=i.substr(0,r),a=i.substr(r+1,n-(r+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return null;s=v(a.pop());case"rgb":return 3!==a.length?null:[p(a[0]),p(a[1]),p(a[2]),s];case"hsla":if(4!==a.length)return null;s=v(a.pop());case"hsl":if(3!==a.length)return null;var l=(parseFloat(a[0])%360+360)%360/360,u=v(a[1]),c=v(a[2]),h=c<=.5?c*(u+1):c+u-c*u,f=2*c-h;return[_(255*m(f,h,l+1/3)),_(255*m(f,h,l)),_(255*m(f,h,l-1/3)),s];default:return null}}return null}}catch(e){}}),jo=(Do.parseCSSColor,{});Object.assign(jo,{clampPositive:Io,noNaN:Lo,parseNumber:Co,parsePositiveNumber:Fo}),jo.wrapFunction=function(e){return"\n var feature = context.feature.properties;\n var global = context.global;\n var $zoom = context.zoom;\n var $layer = context.layer;\n var $source = context.source;\n var sources = context.sources;\n var $geometry = context.geometry;\n var $meters_per_pixel = context.meters_per_pixel;\n\n var val = (function(){ ".concat(e," }());\n\n if (typeof val === 'number' && isNaN(val)) {\n val = null; // convert NaNs to nulls\n }\n\n return val;\n ")},jo.zeroPair=Object.freeze([0,0]),jo.defaults={color:[1,1,1,1],width:1,size:1,extrude:!1,height:20,min_height:0,order:0,z:0,outline:{color:[0,0,0,0],width:0},material:{ambient:1,diffuse:1}},jo.macros={"Style.color.pseudoRandomColor":function(){return[parseInt(feature.id,16)/100%1*.7,parseInt(feature.id,16)/1e4%1*.7,parseInt(feature.id,16)/1e6%1*.7,1]},"Style.color.randomColor":function(){return[.7*Math.random(),.7*Math.random(),.7*Math.random(),1]}},jo.getFeatureParseContext=function(e,t,i,r){return{feature:e,tile:t,global:i,sources:r,zoom:t.style_zoom,geometry:Jr.geometryType(e.geometry.type),meters_per_pixel:t.meters_per_pixel,meters_per_pixel_sq:t.meters_per_pixel_sq,units_per_meter_overzoom:t.units_per_meter_overzoom}};var Uo={STATIC:0,DYNAMIC:1,ZOOM:2};jo.CACHE_TYPE=Uo,jo.createPropertyCache=function(e){var i=1this.width||r<0||t>this.height)return!n&&[];var a=[];if(e<=0&&t<=0&&this.width<=i&&this.height<=r){if(n)return!0;for(var s=0;sthis.width||l<0||s>this.height)return!r&&[];var u=[],c={hitTest:r,circle:{x:e,y:t,radius:i},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,l,this._queryCellCircle,u,c,n),r?0=c[0+m]&&r>=c[1+m]&&(!s||s(this.boxKeys[v]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[v],x1:c[m],y1:c[1+m],x2:c[2+m],y2:c[3+m]})}}}}catch(e){f=!0,d=e}finally{try{h||null==p.return||p.return()}finally{if(f)throw d}}}var g=this.circleCells[n];if(null!==g){var y=this.circles,x=!0,b=!1,A=void 0;try{for(var T,w=g[Symbol.iterator]();!(x=(T=w.next()).done);x=!0){var k=T.value;if(!l.circle[k]){l.circle[k]=!0;var E=3*k;if(this._circleAndRectCollide(y[E],y[1+E],y[2+E],e,t,i,r)&&(!s||s(this.circleKeys[k]))){if(a.hitTest)return o.push(!0),!0;var M=y[E],R=y[1+E],S=y[2+E];o.push({key:this.circleKeys[k],x1:M-S,y1:R-S,x2:M+S,y2:R+S})}}}}catch(e){b=!0,A=e}finally{try{x||null==w.return||w.return()}finally{if(b)throw A}}}}},{key:"_queryCellCircle",value:function(e,t,i,r,n,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[n];if(null!==c){var h=this.bboxes,f=!0,d=!1,_=void 0;try{for(var p,v=c[Symbol.iterator]();!(f=(p=v.next()).done);f=!0){var m=p.value;if(!u.box[m]){u.box[m]=!0;var g=4*m;if(this._circleAndRectCollide(l.x,l.y,l.radius,h[0+g],h[1+g],h[2+g],h[3+g])&&(!s||s(this.boxKeys[m])))return o.push(!0),!0}}}catch(e){d=!0,_=e}finally{try{f||null==v.return||v.return()}finally{if(d)throw _}}}var y=this.circleCells[n];if(null!==y){var x=this.circles,b=!0,A=!1,T=void 0;try{for(var w,k=y[Symbol.iterator]();!(b=(w=k.next()).done);b=!0){var E=w.value;if(!u.circle[E]){u.circle[E]=!0;var M=3*E;if(this._circlesCollide(x[M],x[1+M],x[2+M],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[E])))return o.push(!0),!0}}}catch(e){A=!0,T=e}finally{try{b||null==k.return||k.return()}finally{if(A)throw T}}}}},{key:"_forEachCell",value:function(e,t,i,r,n,o,a,s){for(var l=this._convertToXCellCoord(e),u=this._convertToYCellCoord(t),c=this._convertToXCellCoord(i),h=this._convertToYCellCoord(r),f=l;f<=c;f++)for(var d=u;d<=h;d++){var _=this.xCellCount*d+f;if(n.call(this,e,t,i,r,_,o,a,s))return}}},{key:"_convertToXCellCoord",value:function(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}},{key:"_convertToYCellCoord",value:function(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}},{key:"_circlesCollide",value:function(e,t,i,r,n,o){var a=r-e,s=n-t,l=i+o;return a*a+s*st.max_time?t.pause_factor:0),t.total_elapsed+=t.elapsed),this.elapsed=performance.now()-this.start_time,this.elapsed>=Ko.max_time){this.start_time=null;break}}},finish:function(e,t){return e.elapsed=performance.now()-e.start_time,e.total_elapsed+=e.elapsed,this.remove(e),e.resolve(t),e.promise},cancel:function(e){var t;e.cancel instanceof Function&&(t=e.cancel(e)),e.resolve(t||{})},shouldContinue:function(e){return e.elapsed=performance.now()-e.start_time,this.elapsed=performance.now()-this.start_time,e.elapsedthis.style_zoom?"child":"parent"):(this.proxy_for=null,this.proxy_depth=0)}},{key:"isProxy",value:function(){return null!=this.proxy_for}},{key:"shouldProxyForStyle",value:function(t){return!this.proxy_for||this.proxy_for.some(function(e){return null==e.meshes[t]})}},{key:"setupProgram",value:function(e,t){var i=e.model,r=e.model32;t.uniform("4fv","u_tile_origin",[this.min.x,this.min.y,this.style_zoom,this.coords.z]),t.uniform("1f","u_tile_proxy_depth",this.proxy_depth),ia.identity(i),ia.translate(i,i,ea.fromValues(this.min.x,this.min.y,0)),ia.scale(i,i,ea.fromValues(this.span.x/Jr.tile_scale,-1*this.span.y/Jr.tile_scale,1)),ia.copy(r,i),t.uniform("Matrix4fv","u_model",r),t.uniform("1i","u_tile_fade_in",this.fade_in&&"child"!==this.proxied_as)}},{key:"merge",value:function(e){return this.loading=e.loading,this.loaded=e.loaded,this.generation=e.generation,this.error=e.error,this.mesh_data=e.mesh_data,this.selection_data?Object.assign(this.selection_data,e.selection_data):this.selection_data=e.selection_data,this}}],[{key:"coord",value:function(e){return{x:e.x,y:e.y,z:e.z,key:T.coordKey(e)}}},{key:"coordKey",value:function(e){return e.x+"/"+e.y+"/"+e.z}},{key:"key",value:function(e,t,i){if(!(e.y<0||e.y>=1<e.z){var i=T.coordinateAtZoom(t,e.z),r=i.x,n=i.y;return e.x===r&&e.y===n}return!1}},{key:"cancel",value:function(e){e&&(e.canceled=!0,e.source_data&&e.source_data.request_id&&(on.cancelRequest(e.source_data.request_id),e.source_data.request_id=null),T.abortBuild(e))}},{key:"buildGeometry",value:function(e,t){var i=t.scene_id,r=t.layers,n=t.styles,o=t.global,a=t.sources,s=e.source_data;for(var l in Zo.startTile(e.id,{apply_repeat_groups:!0}),r){var u=r[l];if(u&&u.config_data){if(u.config_data.source===e.source)for(var c=T._getDataForSource(s,u.config_data,l),h=0;h>16&255,o[s++]=r>>8&255,o[s++]=255&r;return 2==n?(r=xa[e.charCodeAt(t)]<<2|xa[e.charCodeAt(t+1)]>>4,o[s++]=255&r):1==n&&(r=xa[e.charCodeAt(t)]<<10|xa[e.charCodeAt(t+1)]<<4|xa[e.charCodeAt(t+2)]>>2,o[s++]=r>>8&255,o[s++]=255&r),o}function ka(e,t,i){for(var r,n,o=[],a=t;a>18&63]+ya[n>>12&63]+ya[n>>6&63]+ya[63&n]);return o.join("")}function Ea(e){var t;Aa||Ta();for(var i=e.length,r=i%3,n="",o=[],a=0,s=i-r;a>2],n+=ya[t<<4&63],n+="=="):2==r&&(t=(e[i-2]<<8)+e[i-1],n+=ya[t>>10],n+=ya[t>>4&63],n+=ya[t<<2&63],n+="="),o.push(n),o.join("")}function Ma(e,t,i,r,n){var o,a,s=8*n-r-1,l=(1<>1,c=-7,h=i?n-1:0,f=i?-1:1,d=e[t+h];for(h+=f,o=d&(1<<-c)-1,d>>=-c,c+=s;0>=-c,c+=r;0>1,f=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,_=r?1:-1,p=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),2<=(t+=1<=a+h?f/l:f*Math.pow(2,1-h))*l&&(a++,l/=2),c<=a+h?(s=0,a=c):1<=a+h?(s=(t*l-1)*Math.pow(2,n),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),a=0));8<=n;e[i+d]=255&s,d+=_,s/=256,n-=8);for(a=a<=Na())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Na().toString(16)+" bytes");return 0|e}function Ua(e){return!(null==e||!e._isBuffer)}function Ga(e,t){if(Ua(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return us(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return cs(e).length;default:if(r)return us(e).length;t=(""+t).toLowerCase(),r=!0}}function Ba(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function Va(e,t,i,r,n){if(0===e.length)return-1;if("string"==typeof i?(r=i,i=0):2147483647=e.length){if(n)return-1;i=e.length-1}else if(i<0){if(!n)return-1;i=0}if("string"==typeof t&&(t=Ia.from(t,r)),Ua(t))return 0===t.length?-1:qa(e,t,i,r,n);if("number"==typeof t)return t&=255,Ia.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,i):Uint8Array.prototype.lastIndexOf.call(e,t,i):qa(e,[t],i,r,n);throw new TypeError("val must be string, number or Buffer")}function qa(e,t,i,r,n){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s/=a=2,l/=2,i/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var c=-1;for(o=i;o>>10&1023|55296),c=56320|1023&c),r.push(c),n+=h}return function(e){var t=e.length;if(t<=Za)return String.fromCharCode.apply(String,e);var i="",r=0;for(;rthis.length)return"";if((void 0===i||i>this.length)&&(i=this.length),i<=0)return"";if((i>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return $a(this,t,i);case"utf8":case"utf-8":return Xa(this,t,i);case"ascii":return Ka(this,t,i);case"latin1":case"binary":return Ja(this,t,i);case"base64":return Wa(this,t,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qa(this,t,i);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},Ia.prototype.equals=function(e){if(!Ua(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Ia.compare(this,e)},Ia.prototype.inspect=function(){var e="";return 0"},Ia.prototype.compare=function(e,t,i,r,n){if(!Ua(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(n<=r&&i<=t)return 0;if(n<=r)return-1;if(i<=t)return 1;if(this===e)return 0;for(var o=(n>>>=0)-(r>>>=0),a=(i>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(r,n),u=e.slice(t,i),c=0;cthis.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o,a,s,l,u,c,h,f,d,_=!1;;)switch(r){case"hex":return Ha(this,e,t,i);case"utf8":case"utf-8":return f=t,d=i,hs(us(e,(h=this).length-f),h,f,d);case"ascii":return Ya(this,e,t,i);case"latin1":case"binary":return Ya(this,e,t,i);case"base64":return l=this,u=t,c=i,hs(cs(e),l,u,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=t,s=i,hs(function(e,t){for(var i,r,n,o=[],a=0;a>8,n=i%256,o.push(n),o.push(r);return o}(e,(o=this).length-a),o,a,s);default:if(_)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),_=!0}},Ia.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Za=4096;function Ka(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;ne.length)throw new RangeError("Index out of range")}function is(e,t,i,r){t<0&&(t=65535+t+1);for(var n=0,o=Math.min(e.length-i,2);n>>8*(r?n:1-n)}function rs(e,t,i,r){t<0&&(t=4294967295+t+1);for(var n=0,o=Math.min(e.length-i,4);n>>8*(r?n:3-n)&255}function ns(e,t,i,r){if(i+r>e.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("Index out of range")}function os(e,t,i,r,n){return n||ns(e,0,i,4),Ra(e,t,i,r,23,4),i+4}function as(e,t,i,r,n){return n||ns(e,0,i,8),Ra(e,t,i,r,52,8),i+8}Ia.prototype.slice=function(e,t){var i,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):r>>8):is(this,e,t,!0),t+2},Ia.prototype.writeUInt16BE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,2,65535,0),Ia.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):is(this,e,t,!1),t+2},Ia.prototype.writeUInt32LE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,4,4294967295,0),Ia.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):rs(this,e,t,!0),t+4},Ia.prototype.writeUInt32BE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,4,4294967295,0),Ia.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):rs(this,e,t,!1),t+4},Ia.prototype.writeIntLE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);ts(this,e,t,i,n-1,-n)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+i},Ia.prototype.writeIntBE=function(e,t,i,r){if(e=+e,t|=0,!r){var n=Math.pow(2,8*i-1);ts(this,e,t,i,n-1,-n)}var o=i-1,a=1,s=0;for(this[t+o]=255&e;0<=--o&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+i},Ia.prototype.writeInt8=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,1,127,-128),Ia.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Ia.prototype.writeInt16LE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,2,32767,-32768),Ia.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):is(this,e,t,!0),t+2},Ia.prototype.writeInt16BE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,2,32767,-32768),Ia.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):is(this,e,t,!1),t+2},Ia.prototype.writeInt32LE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,4,2147483647,-2147483648),Ia.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):rs(this,e,t,!0),t+4},Ia.prototype.writeInt32BE=function(e,t,i){return e=+e,t|=0,i||ts(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Ia.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):rs(this,e,t,!1),t+4},Ia.prototype.writeFloatLE=function(e,t,i){return os(this,e,t,!0,i)},Ia.prototype.writeFloatBE=function(e,t,i){return os(this,e,t,!1,i)},Ia.prototype.writeDoubleLE=function(e,t,i){return as(this,e,t,!0,i)},Ia.prototype.writeDoubleBE=function(e,t,i){return as(this,e,t,!1,i)},Ia.prototype.copy=function(e,t,i,r){if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(o=t;o>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(i<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function cs(e){return wa(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(ss,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function hs(e,t,i,r){for(var n=0;n=t.length||n>=e.length);++n)t[n+i]=e[n];return n}function fs(e){return null!=e&&(!!e._isBuffer||ds(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&ds(e.slice(0,0))}(e))}function ds(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}var _s=Object.freeze({INSPECT_MAX_BYTES:50,kMaxLength:za,Buffer:Ia,SlowBuffer:function(e){return+e!=e&&(e=0),Ia.alloc(+e)},isBuffer:fs});ga.setTimeout,ga.clearTimeout;var ps=ga.performance||{},vs=(ps.now||ps.mozNow||ps.msNow||ps.oNow||ps.webkitNow,"function"==typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;function i(){}i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e});function ms(e,t){var i={seen:[],stylize:ys};return 3<=arguments.length&&(i.depth=arguments[2]),4<=arguments.length&&(i.colors=arguments[3]),Ts(t)?i.showHidden=t:t&&function(e,t){if(!t||!Rs(t))return;var i=Object.keys(t),r=i.length;for(;r--;)e[i[r]]=t[i[r]]}(i,t),Es(i.showHidden)&&(i.showHidden=!1),Es(i.depth)&&(i.depth=2),Es(i.colors)&&(i.colors=!1),Es(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=gs),xs(i,e,i.depth)}function gs(e,t){var i=ms.styles[t];return i?"\x1b["+ms.colors[i][0]+"m"+e+"\x1b["+ms.colors[i][1]+"m":e}function ys(e,t){return e}function xs(t,i,r){if(t.customInspect&&i&&zs(i.inspect)&&i.inspect!==ms&&(!i.constructor||i.constructor.prototype!==i)){var e=i.inspect(r,t);return ks(e)||(e=xs(t,e,r)),e}var n=function(e,t){if(Es(t))return e.stylize("undefined","undefined");if(ks(t)){var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string")}if(function(e){return"number"==typeof e}(t))return e.stylize(""+t,"number");if(Ts(t))return e.stylize(""+t,"boolean");if(ws(t))return e.stylize("null","null")}(t,i);if(n)return n;var o=Object.keys(i),a=function(e){var t={};return e.forEach(function(e){t[e]=!0}),t}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(i)),Ps(i)&&(0<=o.indexOf("message")||0<=o.indexOf("description")))return bs(i);if(0===o.length){if(zs(i)){var s=i.name?": "+i.name:"";return t.stylize("[Function"+s+"]","special")}if(Ms(i))return t.stylize(RegExp.prototype.toString.call(i),"regexp");if(Ss(i))return t.stylize(Date.prototype.toString.call(i),"date");if(Ps(i))return bs(i)}var l,u="",c=!1,h=["{","}"];!function(e){return Array.isArray(e)}(i)||(c=!0,h=["[","]"]),zs(i)&&(u=" [Function"+(i.name?": "+i.name:"")+"]");return Ms(i)&&(u=" "+RegExp.prototype.toString.call(i)),Ss(i)&&(u=" "+Date.prototype.toUTCString.call(i)),Ps(i)&&(u=" "+bs(i)),0!==o.length||c&&0!=i.length?r<0?Ms(i)?t.stylize(RegExp.prototype.toString.call(i),"regexp"):t.stylize("[Object]","special"):(t.seen.push(i),l=c?function(t,i,r,n,e){for(var o=[],a=0,s=i.length;a=this.root.width+e,o=i&&this.root.width>=this.root.height+t;return n?this.growRight(e,t):o?this.growDown(e,t):r?this.growRight(e,t):i?this.growDown(e,t):null},growRight:function(e,t){var i;return this.root={used:!0,x:0,y:0,width:this.root.width+e,height:this.root.height,down:this.root,right:{x:this.root.width,y:0,width:e,height:this.root.height}},(i=this.findNode(this.root,e,t))?this.splitNode(i,e,t):null},growDown:function(e,t){var i;return this.root={used:!0,x:0,y:0,width:this.root.width,height:this.root.height+t,down:{x:0,y:this.root.height,width:this.root.width,height:t},right:this.root},(i=this.findNode(this.root,e,t))?this.splitNode(i,e,t):null}};var al=tl,sl={sort:function(e){return e},placeItems:function(e){return function(e,t){t=t||{};var i=new al,r=t.inPlace||!1,n=e.map(function(e){return r?e:{width:e.width,height:e.height,item:e}});n=n.sort(function(e,t){return t.width*t.height-e.width*e.height}),i.fit(n);var o={width:n.reduce(function(e,t){return Math.max(e,t.x+t.width)},0),height:n.reduce(function(e,t){return Math.max(e,t.y+t.height)},0)};r||(o.items=n)}(e,{inPlace:!0}),e}},ll={};function ul(e,t){var i=e||"top-down";return"string"==typeof i&&Vs(i=ll[e],"Sorry, the '"+e+"' algorithm could not be loaded."),new ma(i,t)}function cl(e,t){ll[e]=t}ul.PackingSmith=ma,ul.addAlgorithm=cl,ul.algorithms=ll,cl("top-down",il),cl("left-right",rl),cl("diagonal",nl),cl("alt-diagonal",ol),cl("binary-tree",sl);var hl=ul;function fl(e){for(var t=0;t<(arguments.length<=1?0:arguments.length-1);t++){var i=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];if(i)for(var r in i){var n=i[r];null===n||"object"!==vr(n)||Array.isArray(n)?void 0!==n&&(e[r]=n):null===e[r]||"object"!==vr(e[r])||Array.isArray(e[r])?e[r]=fl({},n):e[r]=fl(e[r],n)}}return e}function dl(e){var t;try{e.getContext("2d").getImageData(0,0,1,1)}catch(e){t=e.message}return t}function _l(e,t,i){if(e instanceof HTMLImageElement){var r=e.ownerDocument.createElement("canvas");r.width=t,r.height=i,r.getContext("2d").drawImage(e,0,0,t,i),e=r}return e}var pl,vl={};(function(){var n=this;function s(e){var t=vr(e);if("object"==t){if(!e)return"null";if(e instanceof Array)return"array";if(e instanceof Object)return t;var i=Object.prototype.toString.call(e);if("[object Window]"==i)return"object";if("[object Array]"==i||"number"==typeof e.length&&void 0!==e.splice&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("splice"))return"array";if("[object Function]"==i||void 0!==e.call&&void 0!==e.propertyIsEnumerable&&!e.propertyIsEnumerable("call"))return"function"}else if("function"==t&&void 0===e.call)return"object";return t}function l(e){var t=vr(e);return"object"==t&&null!=e||"function"==t}function e(e,t){e=e.split(".");var i,r=n;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(;e.length&&(i=e.shift());)e.length||void 0===t?r=r[i]&&r[i]!==Object.prototype[i]?r[i]:r[i]={}:r[i]=t}function t(e,o){function t(){}t.prototype=o.prototype,e.ma=o.prototype,e.prototype=new t,(e.prototype.constructor=e).ta=function(e,t,i){for(var r=Array(arguments.length-2),n=2;nb&&(o=0b?x:0))%T-x)*E):this},ue.prototype.getBoundingBox=ue.prototype.D=function(){return new he(this.lat,this.lng,this.lat,this.lng)},ue.validate=ce,ue.fromIPoint=function e(t){if(!t)throw new ie(e,0,t);return new ue(t.lat,t.lng,t.alt,t.ctx)},ue.prototype.j="Point",ue.prototype.o=function(e){return e.push("(",this.lng," ",this.lat,")"),e},t(he,le),e("H.geo.Rect",he),he.prototype.j="Polygon",he.prototype.o=function(e){var t=this.i,i=this.c,r=this.h,n=this.g;return e.push("(","(",i," ",t,",",n," ",t,",",n," ",r,",",i," ",r,",",i," ",t,")",")"),e},he.prototype.equals=he.prototype.w=function(e){return this===e||!!e&&this.i===e.i&&this.c===e.c&&this.h===e.h&&this.g===e.g},he.prototype.clone=he.prototype.clone=function(){return new he(this.i,this.c,this.h,this.g)},he.prototype.getTopLeft=he.prototype.N=function(){return this.f||(this.f=new ue(this.i,this.c)),this.f},he.prototype.getBottomRight=he.prototype.M=function(){return this.a||(this.a=new ue(this.h,this.g)),this.a},he.prototype.getTop=he.prototype.ga=function(){return this.i},he.prototype.getBottom=he.prototype.ca=function(){return this.h},he.prototype.getLeft=he.prototype.da=function(){return this.c},he.prototype.getRight=he.prototype.fa=function(){return this.g},he.prototype.getCenter=he.prototype.A=function(){return this.b||(this.b=new ue(this.h+(this.i-this.h)/2,_e(this.c,this.s()))),this.b},he.prototype.getWidth=he.prototype.s=function(){return de(this.c,this.g)},he.prototype.getHeight=he.prototype.B=function(){return this.i-this.h},he.prototype.isCDB=he.prototype.I=function(){return this.c>this.g},he.prototype.isEmpty=he.prototype.ja=function(){return!this.s()&&!this.B()},he.prototype.getBoundingBox=he.prototype.D=function(){return new he(this.i,this.c,this.h,this.g)},he.prototype.containsLatLng=he.prototype.G=function(e,t,i){var r=this.A();return i||(e=ne(e,this.G,0),t=oe(t,this.G,1)),(e=(t=this.u(e,t,i)).A()).lat===r.lat&&e.lng===r.lng&&this.B()===t.B()&&this.s()===t.s()},he.prototype.containsPoint=he.prototype.P=function(e,t){return t||ce(e,this.P,0),this.G(e.lat,e.lng,t)},he.prototype.containsRect=he.prototype.R=function(e,t){var i=this.A();if(!(t||e instanceof he))throw new ie(this.R,0,e);return(e=(t=this.F(e,t)).A()).lat===i.lat&&e.lng===i.lng&&this.B()===t.B()&&this.s()===t.s()},he.prototype.mergeLatLng=he.prototype.u=function(e,t,i,r){if(!i){if(X(e=ne(e)))throw new ie(this.u,0,e);if(X(t=oe(t)))throw new ie(this.u,1,t)}return pe(this.i,this.c,this.h,this.g,e,t,e,t,r)},he.prototype.mergePoint=he.prototype.V=function(e,t,i){return t||ce(e,this.V,0),this.u(e.lat,e.lng,t,i)},he.prototype.mergeRect=he.prototype.F=function(e,t,i){if(!(t||e instanceof he))throw new ie(this.F,0,e);return pe(this.i,this.c,this.h,this.g,e.i,e.c,e.h,e.g,i)},he.prototype.mergeTopLeftBottomRight=he.prototype.v=function(e,t,i,r,n,o){return n||(e=ne(e,this.v,0),t=oe(t,this.v,1),i=ne(i,this.v,2),r=oe(r,this.v,3)),pe(this.i,this.c,this.h,this.g,e,t,i,r,o)},he.prototype.intersects=he.prototype.T=function(e,t){var i=this.c<=this.g,r=e.c<=e.g,n=this.c=r[n]:o<=r[n]){if(!i){e.f=null;break}r[n]=o}}}function xe(e,t){var i,r=e.a;if(t){var n=t;if(n!==r)for(r=n;n=n.f;)(n.entries||1o[7]&&r>o[4]&&function e(t,i,r,n,o,a,s,l,u){var c,h=i.entries,f=i[7],d=i[4],_=i[5],p=i[6],v=i[8],m=i[9];if(h){var g=h.length;if(d=a[6],i>=a[5]),n};var be=0;function Ae(e,t,i,r,n,o){this.j=t,e&&(this.f=e,this.b=e.b,n=1&t?(i=e[8],e[5]):(i=e[7],e[8]),o=2&t?(r=e[9],e[6]):(r=e[4],e[9])),this[7]=i,this[5]=n,this[8]=(i+n)/2,this[4]=r,this[6]=o,this[9]=(r+o)/2}function Te(e,t,i,r,n,o){Te.ma.constructor.apply(this,arguments)}function we(e,t,i,r,n,o,a){var s,l,u=t[8],c=t[9];return a&&(nh:o[l]i?i:e=t){var a=[(n[0]+o[0])/2,(n[1]+o[1])/2];i.push(a)}}return i.length!==e.length-1?pl.splitLegs(i,t):i},pl.getBBox=function(e){var t=1/0,i=1/0,r=-1/0,n=-1/0;return e.forEach(function(e){e[0]r&&(r=e[0]),e[1]>n&&(n=e[1])}),[t,i,r,n]},pl.getBBoxCenter=function(e){var t=Sr(e,4),i=t[0],r=t[1];return[i+(t[2]-i)/2,r+(t[3]-r)/2]},pl.getLineLength=function(e,t,i,r){return Math.sqrt(Math.pow(e-i,2)+Math.pow(t-r,2))};var yl=Jr.metersToLatLng([Jr.half_circumference_meters,Jr.half_circumference_meters]),xl=Math.log(Jr.tile_size)/Math.LN2;function bl(e){var t=e.x,i=e.y,r=e.z;return{row:i===Math.pow(2,r)-1,column:t===Math.pow(2,r)-1}}var Al=function(){function g(e,t){var i;return mr(this,g),i=Mr(this,Ar(g).call(this,e,t)),Lr.is_worker&&(i._quad_tree=new vl.H.geo.QuadTree,i._marker_quad_tree=new vl.H.geo.QuadTree,i._tree_entries_by_object_id={},i._groups_by_id={}),Lr.is_main&&(i._objects_by_id={},i._commands=[],i._sendCommands=nn(i._sendCommands,100,200)),i}return br(g,uo),yr(g,[{key:"onReady",value:function(){var e=this;this._synced_at=this.provider.getInvalidations().getMark();var t,i,r=this.provider.getRootGroup(),n=r.getObjects(!0),o=[];for(n.push(r),t=n.length;t--;)i=n[t],this._isObjectSupported(i)&&this._shouldBeStored(i)&&(this._objects_by_id[i.getId()]=i,o.push(i.forWorkerMessage()));Cr.postMessage(this.worker,this.target_name+".addObjects",o).then(function(){return e.dispatchUpdate()})}},{key:"onProviderUpdate",value:function(e){var t=e.target,i=e.currentTarget.getInvalidations(t.type);if(this._isObjectSupported(t)){var r=this._synced_at,n=t.getId();i.isRemove(r)?this._hasSameVolatility(t)&&(delete this._objects_by_id[n],this._commands.push({method_name:"removeObjectsByIds",arguments:[[n]]})):i.isAdd(r)?this._shouldBeStored(t)&&(this._objects_by_id[n]=t,this._commands.push({method_name:"addObjects",arguments:[[t.forWorkerMessage()]]})):this.has_volatile_data&&(i.isSpatial(r)||i.isVisual(r))?this._shouldBeStored(t)&&(this._objects_by_id[n]=t,this._sendImmediateCommands([{method_name:"removeObjectsByIds",arguments:[[n]]},{method_name:"addObjects",arguments:[[t.forWorkerMessage()]]}])):i.isSpatial(r)||i.isVisual(r)||i.isZOrder(r)?this._shouldBeStored(t)&&(delete this._objects_by_id[n],this._commands.push({method_name:"removeObjectsByIds",arguments:[[n]]}),this._objects_by_id[n]=t,this._commands.push({method_name:"addObjects",arguments:[[t.forWorkerMessage()]]})):i.isVolatility(r)&&(delete this._objects_by_id[n],this._commands.push({method_name:"removeObjectsByIds",arguments:[[n]]}),this._shouldBeStored(t)&&(this._objects_by_id[n]=t,this._commands.push({method_name:"addObjects",arguments:[[t.forWorkerMessage()]]}))),this._commands.length&&this._sendCommands()}this._synced_at=i.getMark()}},{key:"_shouldBeStored",value:function(e){return 5===e.type||(!e.getIcon||1===e.getIcon().getState())&&this._hasSameVolatility(e)}},{key:"_hasSameVolatility",value:function(e){return e.getVolatility(!0)===this.has_volatile_data}},{key:"hasPendingCommands",value:function(){return 0=t,n=!e.parent||this.isVisible(this._groups_by_id[e.parent].properties,t);return i&&r&&n}}],[{key:"_getObjectId",value:function(e){return e.id}},{key:"_compareZInfo",value:function(e,t){for(var i,r=e.properties.zInfo,n=t.properties.zInfo,o=r.length,a=n.length,s=Math.min(o,a),l=1;l>>0,o=this._pixels[h+3];else for(var _=-1>>>0,p=h=0;p>>0,o=this._pixels[h+3],_=m)}if(255!==o){var g=this._getFeatureWithKey(i,t);if(e.features||(e.features=[]),!g)return void this._finishRead(e);if(e.features.every(function(e){return e.id!==g.id})&&e.features.push(g),e.ttl)return this._pending_deep_request=e,y._discardColor([f[0]/255,f[1]/255,f[2]/255,f[3]/255]),this._has_dirty_buffer=!0;this._finishRead(e)}else this._finishRead(e)}},{key:"_finishRead",value:function(e){var t=e.features||y.EMPTY_ARRAY;e.top_most_only||(this._pending_deep_request=null,y._resetDiscardedColors()),delete this._requests[e.id],e.resolve({features:t})}},{key:"_getFeatureWithKey",value:function(e,t){for(var i=null,r=0;r>8&255,i=this.map_entry>>16&255,r=this.map_prefix;return{key:e+(t<<8)+(i<<16)+(r<<24)>>>0,color:[e/255,t/255,i/255,r/255]}}},{key:"reset",value:function(){this.map_entry=0}},{key:"setPrefix",value:function(e){this.map_prefix=e}},{key:"_discardColor",value:function(e){this._discarded_colors.push(e)}},{key:"_resetDiscardedColors",value:function(){this._discarded_colors.length=0}}]),y}();Jl._discarded_colors=[],Jl.map_entry=0,Jl.map_prefix=0,Jl.defaultColor=[0,0,0,1],Jl.MAX_PICKING_TRIES=10,Jl.EMPTY_ARRAY=Object.freeze([]);var $l,Ql=function(){function o(e,t,i,r,n){mr(this,o),n=n||{},this.gl=e,this.vertex_data=t,this.element_data=i,this.vertex_layout=r,this.vertex_buffer=this.gl.createBuffer(),this.buffer_size=this.vertex_data.byteLength,this.draw_mode=n.draw_mode||this.gl.TRIANGLES,this.data_usage=n.data_usage||this.gl.STATIC_DRAW,this.vertices_per_geometry=3,this.uniforms=n.uniforms,this.textures=n.textures,this.retain=n.retain||!1,this.created_at=+new Date,this.fade_in_time=n.fade_in_time||0,this.vertex_count=this.vertex_data.byteLength/this.vertex_layout.stride,this.element_count=0,this.vaos={},this.toggle_element_array=!1,this.element_data?(this.toggle_element_array=!0,this.element_count=this.element_data.length,this.geometry_count=this.element_count/this.vertices_per_geometry,this.element_type=this.element_data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT,this.element_buffer=this.gl.createBuffer(),this.buffer_size+=this.element_data.byteLength,this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.element_buffer),this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,this.element_data,this.data_usage)):this.geometry_count=this.vertex_count/this.vertices_per_geometry,this.upload(),this.retain||(delete this.vertex_data,delete this.element_data),this.valid=!0}return yr(o,[{key:"render",value:function(e){var t=00.0){vec3 reflectVector=reflect(_light.direction,_normal);float eyeDotR=max(dot(normalize(_eyeToPoint),reflectVector),0.0);pf=pow(eyeDotR,material.shininess);}light_accumulator_specular.rgb+=_light.specular*pf;\n#endif\n}")}}]),n}();ru.types.directional=ou;var au=function(){function r(e,t){var i;return mr(this,r),(i=Mr(this,Ar(r).call(this,e,t))).type="point",i.struct_name="PointLight",i.position=t.position||[0,0,"100px"],i.position_eye=[],i.origin=t.origin||"ground",i.attenuation=isNaN(parseFloat(t.attenuation))?0:parseFloat(t.attenuation),t.radius?Array.isArray(t.radius)&&2===t.radius.length?i.radius=t.radius:i.radius=[null,t.radius]:i.radius=null,i}return br(r,ru),yr(r,[{key:"inject",value:function(){Rr(Ar(r.prototype),"inject",this).call(this),Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT=0!==this.attenuation,Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS=null!=this.radius&&null!=this.radius[0],Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS=null!=this.radius}},{key:"update",value:function(){var e=this.view.lookAtManipulator.getLookAtData().zoom;if("world"===this.origin){var t=Sr(Jr.latLngToMeters(this.position),2),i=t[0],r=t[1];this.position_eye[0]=i-this.view.lookAtManipulator.getLookAtData().position[0],this.position_eye[1]=r-this.view.lookAtManipulator.getLookAtData().position[1],this.position_eye[2]=jo.convertUnits(this.position[2],{zoom:e,meters_per_pixel:Jr.metersPerPixel(e)}),this.position_eye[2]=this.position_eye[2]-this.view.lookAtManipulator.getLookAtData().distance}else"ground"!==this.origin&&"camera"!==this.origin||(this.position_eye=jo.convertUnits(this.position,{zoom:e,meters_per_pixel:Jr.metersPerPixel(e)}),"ground"===this.origin&&(this.position_eye[2]=this.position_eye[2]-this.view.lookAtManipulator.getLookAtData().distance));this.position_eye[3]=1}},{key:"setupProgram",value:function(e){Rr(Ar(r.prototype),"setupProgram",this).call(this,e),e.uniform("4fv","u_".concat(this.name,".position"),this.position_eye),Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT&&e.uniform("1f","u_".concat(this.name,".attenuationExponent"),this.attenuation);var t=this.view.lookAtManipulator.getLookAtData().zoom;Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS&&e.uniform("1f","u_".concat(this.name,".innerRadius"),jo.convertUnits(this.radius[0],{zoom:t,meters_per_pixel:Jr.metersPerPixel(t)})),Zl.defines.TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS&&e.uniform("1f","u_".concat(this.name,".outerRadius"),jo.convertUnits(this.radius[1],{zoom:t,meters_per_pixel:Jr.metersPerPixel(t)}))}}],[{key:"inject",value:function(){Zl.addBlock(ru.block,"/*Expected globals:materiallight_accumulator_**/struct PointLight{vec3 ambient;vec3 diffuse;vec3 specular;vec4 position;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT\nfloat attenuationExponent;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nfloat innerRadius;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat outerRadius;\n#endif\n};void calculateLight(in PointLight _light,in vec3 _eyeToPoint,in vec3 _normal){float dist=length(_light.position.xyz-_eyeToPoint);vec3 VP=(_light.position.xyz-_eyeToPoint)/dist;float nDotVP=clamp(dot(VP,_normal),0.0,1.0);float attenuation=1.0;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT\nfloat Rin=1.0;float e=_light.attenuationExponent;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nRin=_light.innerRadius;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat Rdiff=_light.outerRadius-Rin;float d=clamp(max(0.0,dist-Rin)/Rdiff,0.0,1.0);attenuation=1.0-(pow(d,e));\n#else\nfloat d=max(0.0,dist-Rin)/Rin+1.0;attenuation=clamp(1.0/(pow(d,e)),0.0,1.0);\n#endif\n#else\nfloat Rin=0.0;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nRin=_light.innerRadius;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat Rdiff=_light.outerRadius-Rin;float d=clamp(max(0.0,dist-Rin)/Rdiff,0.0,1.0);attenuation=1.0-d*d;\n#else\nfloat d=max(0.0,dist-Rin)/Rin+1.0;attenuation=clamp(1.0/d,0.0,1.0);\n#endif\n#else\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat d=clamp(dist/_light.outerRadius,0.0,1.0);attenuation=1.0-d*d;\n#else\nattenuation=1.0;\n#endif\n#endif\n#endif\nlight_accumulator_ambient.rgb+=_light.ambient*attenuation;\n#ifdef TANGRAM_MATERIAL_DIFFUSE\nlight_accumulator_diffuse.rgb+=_light.diffuse*nDotVP*attenuation;\n#endif\n#ifdef TANGRAM_MATERIAL_SPECULAR\nfloat pf=0.0;if(nDotVP>0.0){vec3 reflectVector=reflect(-VP,_normal);float eyeDotR=max(0.0,dot(-normalize(_eyeToPoint),reflectVector));pf=pow(eyeDotR,material.shininess);}light_accumulator_specular.rgb+=_light.specular*pf*attenuation;\n#endif\n}")}}]),r}();ru.types.point=au;var su=function(){function r(e,t){var i;return mr(this,r),(i=Mr(this,Ar(r).call(this,e,t))).type="spotlight",i.struct_name="SpotLight",i.direction=i._direction=(t.direction||[0,0,-1]).map(parseFloat),i._initial_direction=[i.direction[0],i.direction[1],i.direction[2]],i.exponent=t.exponent?parseFloat(t.exponent):.2,i.angle=t.angle?parseFloat(t.angle):20,i}return br(r,au),yr(r,[{key:"setupProgram",value:function(e){Rr(Ar(r.prototype),"setupProgram",this).call(this,e),e.uniform("3fv","u_".concat(this.name,".direction"),this.direction),e.uniform("1f","u_".concat(this.name,".spotCosCutoff"),Math.cos(3.14159*this.angle/180)),e.uniform("1f","u_".concat(this.name,".spotExponent"),this.exponent)}},{key:"update",value:function(){Rr(Ar(r.prototype),"update",this).call(this),ea.transformMat4(this.direction,this._initial_direction,this.view.lookAtManipulator.getTransformationMatrix())}},{key:"direction",get:function(){return this._direction},set:function(e){this._direction=iu.normalize(iu.copy(e))}}],[{key:"inject",value:function(){Zl.addBlock(ru.block,"/*Expected globals:materiallight_accumulator_**/struct SpotLight{vec3 ambient;vec3 diffuse;vec3 specular;vec4 position;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT\nfloat attenuationExponent;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nfloat innerRadius;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat outerRadius;\n#endif\nvec3 direction;float spotCosCutoff;float spotExponent;};void calculateLight(in SpotLight _light,in vec3 _eyeToPoint,in vec3 _normal){float dist=length(_light.position.xyz-_eyeToPoint);vec3 VP=(_light.position.xyz-_eyeToPoint)/dist;float nDotVP=clamp(dot(_normal,VP),0.0,1.0);float attenuation=1.0;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_EXPONENT\nfloat Rin=1.0;float e=_light.attenuationExponent;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nRin=_light.innerRadius;\n#endif\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat Rdiff=_light.outerRadius-Rin;float d=clamp(max(0.0,dist-Rin)/Rdiff,0.0,1.0);attenuation=1.0-(pow(d,e));\n#else\nfloat d=max(0.0,dist-Rin)/Rin+1.0;attenuation=clamp(1.0/(pow(d,e)),0.0,1.0);\n#endif\n#else\nfloat Rin=0.0;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_INNER_RADIUS\nRin=_light.innerRadius;\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat Rdiff=_light.outerRadius-Rin;float d=clamp(max(0.0,dist-Rin)/Rdiff,0.0,1.0);attenuation=1.0-d*d;\n#else\nfloat d=max(0.0,dist-Rin)/Rin+1.0;attenuation=clamp(1.0/d,0.0,1.0);\n#endif\n#else\n#ifdef TANGRAM_POINTLIGHT_ATTENUATION_OUTER_RADIUS\nfloat d=clamp(dist/_light.outerRadius,0.0,1.0);attenuation=1.0-d*d;\n#else\nattenuation=1.0;\n#endif\n#endif\n#endif\nfloat spotAttenuation=0.0;float spotDot=clamp(dot(-VP,_light.direction),0.0,1.0);if(spotDot>=_light.spotCosCutoff){spotAttenuation=pow(spotDot,_light.spotExponent);}light_accumulator_ambient.rgb+=_light.ambient*attenuation*spotAttenuation;\n#ifdef TANGRAM_MATERIAL_DIFFUSE\nlight_accumulator_diffuse.rgb+=_light.diffuse*nDotVP*attenuation*spotAttenuation;\n#endif\n#ifdef TANGRAM_MATERIAL_SPECULAR\nfloat pf=0.0;if(nDotVP>0.0){vec3 reflectVector=reflect(-VP,_normal);float eyeDotR=max(dot(-normalize(_eyeToPoint),reflectVector),0.0);pf=pow(eyeDotR,material.shininess);}light_accumulator_specular.rgb+=_light.specular*pf*attenuation*spotAttenuation;\n#endif\n}")}}]),r}();ru.types.spotlight=su;var lu,uu="\n#ifdef TANGRAM_FRAGMENT_SHADER\nuniform sampler2D u_rasters[TANGRAM_NUM_RASTER_SOURCES];uniform vec2 u_raster_sizes[TANGRAM_NUM_RASTER_SOURCES];uniform vec3 u_raster_offsets[TANGRAM_NUM_RASTER_SOURCES];\n#define adjustRasterUV(raster_index, uv) ((uv) * u_raster_offsets[raster_index].z + u_raster_offsets[raster_index].xy)\n#define currentRasterUV(raster_index) (adjustRasterUV(raster_index, v_modelpos_base_zoom.xy))\n#define currentRasterPixel(raster_index) (currentRasterUV(raster_index) * rasterPixelSize(raster_index))\n#define sampleRaster(raster_index) (texture2D(u_rasters[raster_index], currentRasterUV(raster_index)))\n#define sampleRasterAtPixel(raster_index, pixel) (texture2D(u_rasters[raster_index], adjustRasterUV(raster_index, (pixel) / rasterPixelSize(raster_index))))\n#define rasterPixelSize(raster_index) (u_raster_sizes[raster_index])\n#endif\n",cu={init:function(e){var t=0s?i[s]:i;this.vertex_template[a+s+o]=l}else Kr("warn","Style: in style '".concat(this.name,"', no index found in vertex layout for attribute '").concat(t,"'"))},startData:function(e){this.tile_data[e.id]=this.tile_data[e.id]||{meshes:{},uniforms:{},textures:[]}},endData:function(e){var t=this.tile_data[e.id];if(this.tile_data[e.id]=null,t&&0s&&(o.vertex_data.vertex_buffer.fill(0,a,o.vertex_data.offset),o.vertex_data.vertex_count=s,o.vertex_data.offset=a)}},buildGeometry:function(e,t,i,r){var n;return"Polygon"===e.type?n=this.buildPolygons([e.coordinates],t,i,r):"MultiPolygon"===e.type?n=this.buildPolygons(e.coordinates,t,i,r):"LineString"===e.type?n=this.buildLines([e.coordinates],t,i,r):"MultiLineString"===e.type?n=this.buildLines(e.coordinates,t,i,r):"Point"===e.type?n=this.buildPoints([e.coordinates],t,i,r):"MultiPoint"===e.type&&(n=this.buildPoints(e.coordinates,t,i,r)),n},parseFeature:function(t,e,i){try{var r=this.feature_style;if(r.order=this.parseOrder(e.order,i),null==r.order&&"overlay"!==this.blend){var n="Layer '".concat(e.layers.join(", "),"', draw group '").concat(e.group,"': ");return n+="'order' parameter is required unless blend mode is 'overlay'",null!=e.order&&(n+="; 'order' was set to a dynamic value (e.g. string tied to feature property, ",n+="or JS function), but evaluated to null for one or more features"),void Kr({level:"warn",once:!0},n)}if(!(r=this._parseFeature(t,e,i)))return;if(this.selection?r.interactive=jo.evalProperty(this.introspection||e.interactive,i):r.interactive=!1,!0===r.interactive){var o=Jl.makeEntry(),a=o.color,s=o.key;r.selection_color=a,i.tile.selection_data||(i.tile.selection_data={}),i.tile.selection_data[s]={id:t.id||s,properties:t.properties,source_name:i.source,source_layer:i.layer,layers:i.layers}}else r.selection_color=Jl.defaultColor;return r}catch(e){Kr("error","Style.parseFeature: style parsing error",t,r,e.stack)}},_parseFeature:function(e,t,i){return this.feature_style},preprocess:function(e,t){if(!e.preprocessed){if(this.draw)for(var i in this.draw){var r=this.draw[i];"object"!==vr(r)||Array.isArray(r)?null==e[i]&&(e[i]=r):e[i]=fl({},r,e[i])}var n=t||"";if(!(e=this._preprocess(e,n)))return;e.preprocessed=!0}return e},_preprocess:function(e,t){return e},parseOrder:function(e,t){return"number"!=typeof e?jo.calculateOrder(e,t):e},scaleOrder:function(e){return 2*e},parseColor:function(e,t){return e?jo.evalCachedColorProperty(e,t):this.shaders.blocks.color||this.shaders.blocks.filter?jo.defaults.color:void 0},buildPolygons:function(){return 0},buildLines:function(){return 0},buildPoints:function(){return 0},setGL:function(e){this.gl=e,this.max_texture_size=$o.getMaxTextureSize(this.gl)},makeMesh:function(e,t,i){var r=2i.z){var r=l.coords.z-i.z,n=Math.pow(2,r);s[t]=[(l.coords.x%n+n)%n/n,(n-1-l.coords.y%n)/n,1/n]}else s[t]=[0,0,1]}),u})},loadTextures:function(e){return $o.createFromObject(this.gl,e).then(function(){return Promise.all(Object.keys(e).map(function(e){return $o.textures[e]&&$o.textures[e].load()}).filter(function(e){return e}))}).then(function(e){return e.forEach(function(e){return e.retain()}),e.map(function(e){return{name:e.name,width:e.width,height:e.height,loaded:e.loaded}})})},setup:function(){this.setUniforms(),this.material.setupProgram(Zl.current)},setUniforms:function(){var e=Zl.current;e&&e.setUniforms(this.shaders&&this.shaders.uniforms,!0)},render_states:{opaque:{depth_test:!0,depth_write:!0},translucent:{depth_test:!0,depth_write:!0},add:{depth_test:!0,depth_write:!1},multiply:{depth_test:!0,depth_write:!1},inlay:{depth_test:!0,depth_write:!1},overlay:{depth_test:!1,depth_write:!1}},default_blend_orders:{opaque:0,add:1,multiply:2,inlay:3,translucent:4,overlay:5},blendOrderSort:function(e,t){var i=parseInt(e.name)-parseInt(t.name);return i||("opaque"===e.blend||"opaque"===t.blend?"opaque"===e.blend&&"opaque"===t.blend?e.namet.blend_order?1:cu.default_blend_orders[e.blend]cu.default_blend_orders[t.blend]?1:e.namethis.byte_length){this.size=Math.floor(1.5*this.size),this.size-=this.size%4,this.byte_length=this.stride*this.size;var e=new Uint8Array(this.byte_length);e.set(this.vertex_buffer),r.array_pool.push(this.vertex_buffer),this.vertex_buffer=e,this.setBufferViews(),this.realloc_count++}}},{key:"setAddVertexFunction",value:function(){this.vertexLayoutAddVertex=this.vertex_layout.getAddVertexFunction()}},{key:"addVertex",value:function(e){this.checkBufferSize(),this.vertexLayoutAddVertex(e,this.views,this.offset),this.offset+=this.stride,this.vertex_count++}},{key:"end",value:function(){return this.vertex_buffer=this.vertex_buffer.subarray(0,this.offset),this.element_buffer=this.vertex_elements.end(),Kr("trace","VertexData: ".concat(this.size," vertices total, realloc count ").concat(this.realloc_count)),this}}]),r}();mu.array_pool=[];var gu=function(){function l(e){mr(this,l),this.attribs=e,this.dynamic_attribs=this.attribs.filter(function(e){return!e.static}),this.components=[],this.index={},this.offset={};for(var t=this.stride=0,i=0,r=0;r>o,s=0;s> "+o.shift:"",";")),t=o.type),i.push("t[o + ".concat(o.offset,"] = v[").concat(o.index,"];"))}i=i.join("\n");var a=new Function("v","vs","off",i);l.add_vertex_funcs[e]=a}this.addVertex=l.add_vertex_funcs[e]}}]),l}();gu.enabled_attribs={},gu.add_vertex_funcs={};var yu=[{x:0,y:0},{x:Jr.tile_scale,y:-Jr.tile_scale}],xu=[0,0,1,1];function bu(e,t,i){var r=yu[0],n=yu[1];return e[0]<=r.x+i&&t[0]<=r.x+i||e[0]>=n.x-i&&t[0]>=n.x-i||e[1]>=r.y-i&&t[1]>=r.y-i||e[1]<=n.y+i&&t[1]<=n.y+i}function Au(e,t){t=t||0;var i=yu[0],r=yu[1];return e[0]<=i.x+t||e[0]>=r.x-t||e[1]>=i.y-t||e[1]<=r.y+t}var Tu=wu;function wu(e,t,i){i=i||2;var r,n,o,a,s,l,u,c=t&&t.length,h=c?t[0]*i:e.length,f=ku(e,0,h,i,!0),d=[];if(!f)return d;if(c&&(f=function(e,t,i,r){var n,o,a,s,l,u=[];for(n=0,o=t.length;n80*i){r=o=e[0],n=a=e[1];for(var _=i;_o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,c=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,h=Iu(s,l,t,i,r),f=Iu(u,c,t,i,r),d=e.nextZ;d&&d.z<=f;){if(d!==e.prev&&d!==e.next&&Cu(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&0<=Fu(d.prev,d,d.next))return!1;d=d.nextZ}for(d=e.prevZ;d&&d.z>=h;){if(d!==e.prev&&d!==e.next&&Cu(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&0<=Fu(d.prev,d,d.next))return!1;d=d.prevZ}return!0}function Pu(e,t,i){var r=e;do{var n=r.prev,o=r.next.next;!Du(n,o)&&ju(n,r,r.next,o)&&Uu(n,o)&&Uu(o,n)&&(t.push(n.i/i),t.push(r.i/i),t.push(o.i/i),Vu(r),Vu(r.next),r=e=o),r=r.next}while(r!==e);return r}function zu(e,t,i,r,n,o){var a,s,l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&(s=u,(a=l).next.i!==s.i&&a.prev.i!==s.i&&!function(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&ju(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}(a,s)&&Uu(a,s)&&Uu(s,a)&&function(e,t){var i=e,r=!1,n=(e.x+t.x)/2,o=(e.y+t.y)/2;for(;i.y>o!=i.next.y>o&&n<(i.next.x-i.x)*(o-i.y)/(i.next.y-i.y)+i.x&&(r=!r),i=i.next,i!==e;);return r}(a,s))){var c=Gu(l,u);return l=Eu(l,l.next),c=Eu(c,c.next),Mu(l,t,i,r,n,o),void Mu(c,t,i,r,n,o)}u=u.next}l=l.next}while(l!==e)}function Nu(e,t){return e.x-t.x}function Ou(e,t){if(t=function(e,t){var i,r=t,n=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&a=r.x&&r.x>=c&&Cu(oi.x)&&Uu(r,e)&&(i=r,f=l),r=r.next;return i}(e,t)){var i=Gu(t,e);Eu(i,i.next)}}function Iu(e,t,i,r,n){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)/n)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)/n)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Lu(e){for(var t=e,i=e;t.xo.miter_len_sq&&(r=Qu.bevel),r===Qu.miter?(hc(e,a,t,1,n,o,1),hc(e,a,t,0,n,o,-1)):(hc(e,t,t,1,n,o,1),hc(e,t,t,0,n,o,-1)),cc(1,o)}}(i,n,o=iu.normalize(iu.perp(i,e[1])),a,p,t):(hc(i,n,o,1,p,t,1),hc(i,n,o,0,p,t,-1),cc(1,t),!d&&Au(i)||_c(i,p,n,s,!1,t))}}}function ac(e,t,i){for(var r=t;e[r+1]&&bu(e[r],e[r+1],i);)r++;return 2<=e.length-r&&e.slice(r)}function sc(e,t){var i=iu.normalize(iu.add(e,t)),r=2/(1+Math.abs(iu.dot(e,i)));return iu.mult(i,r*r)}function lc(e,t,i,r,n,o,a){var s=sc(i,r);iu.lengthSq(s)>n?uc(Qu.bevel,e,t,i,r,o,a):(hc(t,s,s,1,e,a,1),hc(t,s,s,0,e,a,-1),o||cc(1,a))}function uc(e,t,i,r,n,o,a){var s=sc(r,n),l=0=Math.PI;)d-=2*Math.PI;if(u)_=1;else{var _=function(e,t){e<0&&(e=-e);var i=t>2*ec.MIN_FAN_WIDTH?Math.log2(t/ec.MIN_FAN_WIDTH):1;return Math.ceil(e/Math.PI*i)}(d,c.half_width);if(_<1)return}var p=c.vertex_data.vertex_count,v=c.vertex_data.vertex_elements;hc(e,i,n,a[0],a[1],c,1),hc(e,t,n,o[0],o[1],c,1);var m=t,g=null!=c.texcoord_index;if(g)if(l)var y=iu.sub(o,a);else{fc=iu.copy(o);var x=iu.div(iu.sub(s,o),_)}var b,A,T=d/_,w=d<0?-1:1;A=0=Math.abs(n)?(t.offset=r*i.units_per_meter_overzoom,t.offset_scale=0!==r?1-n/r:0):(t.offset=n*i.units_per_meter_overzoom,t.offset_scale=0!=n?-1*(1-r/n):0)}else t.offset=r*i.units_per_meter_overzoom,t.offset_scale=0}else t.offset=0,t.offset_scale=0;jo.evalProperty(e.offset_reverse,i)&&(t.offset*=-1)},_parseFeature:function(e,t,i){var r=this.feature_style;if(!1!==this.calcWidth(t,r,i)&&(this.calcOffset(t,r,i),r.color=this.parseColor(t.color,i),r.color)){if(r.variant=t.variant,r.z=t.z&&jo.evalCachedDistanceProperty(t.z||0,i)||jo.defaults.z,r.height=e.properties.height||jo.defaults.height,r.extrude=jo.evalProperty(t.extrude,i),r.extrude&&("number"==typeof r.extrude?r.height=r.extrude:Array.isArray(r.extrude)&&(r.height=r.extrude[1])),r.extrude&&r.height&&(r.z+=r.height),r.z*=Jr.height_scale,r.height*=Jr.height_scale,r.cap=jo.evalProperty(t.cap,i),r.join=jo.evalProperty(t.join,i),r.miter_limit=jo.evalProperty(t.miter_limit,i),r.tile_edges=t.tile_edges,r.outline=r.outline||{width:{},next_width:{},preprocessed:!0},t.outline&&!1!==t.outline.visible&&t.outline.color&&t.outline.width){var n=2*this.calcDistance(t.outline.width,i),o=2*this.calcDistanceNextZoom(t.outline.next_width,i);0==n&&0==o||n<0||o<0?(r.outline.width.value=null,r.outline.next_width.value=null,r.outline.color=null,r.outline.inline_texcoord_width=null,r.outline.texcoords=!1):(r.outline.width.value=n+r.width_unscaled,r.outline.next_width.value=o+r.next_width_unscaled,r.outline.inline_texcoord_width=r.texcoord_width,r.outline.offset_precalc=r.offset,r.outline.offset_scale_precalc=r.offset_scale,r.outline.color=t.outline.color,r.outline.cap=t.outline.cap,r.outline.join=t.outline.join,r.outline.miter_limit=t.outline.miter_limit,r.outline.texcoords=t.outline.texcoords,r.outline.style=t.outline.style,r.outline.variant=t.outline.variant,t.outline.order?r.outline.order=this.parseOrder(t.outline.order,i):r.outline.order=r.order,r.outline.order>r.order&&(r.outline.order=r.order),r.outline.order-=.5,r.outline.variant_order=0)}else r.outline.width.value=null,r.outline.next_width.value=null,r.outline.color=null,r.outline.inline_texcoord_width=null;return r}},_preprocess:function(e,t){var i=this.sources[t]?this.sources[t].config.uid:"";if(e.color=jo.createColorPropertyCache(e.color),e.width=jo.createPropertyCache(e.width,jo.parseUnits),e.width&&e.width.type!==jo.CACHE_TYPE.STATIC&&(e.next_width=jo.createPropertyCache(e.width,jo.parseUnits)),e.offset=e.offset&&jo.createPropertyCache(e.offset,jo.parseUnits),e.offset&&e.offset.type!==jo.CACHE_TYPE.STATIC&&(e.next_offset=jo.createPropertyCache(e.offset,jo.parseUnits)),e.z=jo.createPropertyCache(e.z,jo.parseUnits),e.dash=void 0!==e.dash?e.dash:this.dash,e.dash_key=e.dash&&this.dashTextureKey(e.dash,i),e.dash_background_color=void 0!==e.dash_background_color?e.dash_background_color:this.dash_background_color,e.dash_background_color=e.dash_background_color&&jo.parseColor(e.dash_background_color),e.texture_merged=e.dash_key||(void 0!==e.texture?e.texture:this.texture),e.texcoords=this.texcoords||e.texture_merged?1:0,this.computeVariant(e),e.outline){e.outline.style=e.outline.style||this.name,e.outline.color=jo.createColorPropertyCache(e.outline.color),e.outline.width=jo.createPropertyCache(e.outline.width,jo.parseUnits),e.outline.next_width=jo.createPropertyCache(e.outline.width,jo.parseUnits),e.outline.cap=e.outline.cap||e.cap,e.outline.join=e.outline.join||e.join,e.outline.miter_limit=e.outline.miter_limit||e.miter_limit,e.outline.offset=e.offset;var r=this.styles[e.outline.style];r?(e.outline.dash=void 0!==e.outline.dash?e.outline.dash:r.dash,e.outline.texture=void 0!==e.outline.texture?e.outline.texture:r.texture,null!=e.outline.dash?(e.outline.dash_key=e.outline.dash&&this.dashTextureKey(e.outline.dash,i),e.outline.texture_merged=e.outline.dash_key):null===e.outline.dash?(e.outline.dash_key=null,e.outline.texture_merged=e.outline.texture):null!=e.outline.texture?(e.outline.dash_key=null,e.outline.texture_merged=e.outline.texture):(e.outline.dash=e.dash,e.outline.dash_key=e.outline.dash&&this.dashTextureKey(e.outline.dash,i),e.outline.texture_merged=e.outline.dash_key),e.outline.dash_background_color=void 0!==e.outline.dash_background_color?e.outline.dash_background_color:r.dash_background_color,e.outline.dash_background_color=void 0!==e.outline.dash_background_color?e.outline.dash_background_color:e.dash_background_color,e.outline.dash_background_color=e.outline.dash_background_color&&jo.parseColor(e.outline.dash_background_color),e.outline.texcoords=r.texcoords||e.outline.texture_merged?1:0,this.computeVariant(e.outline)):(Kr({level:"warn",once:!0},"Layer '".concat(e.layers[e.layers.length-1],"': ")+"line 'outline' specifies non-existent draw style '".concat(e.outline.style,"' (or maybe the style is ")+"defined but is missing a 'base' or has another error), skipping outlines in layer"),e.outline=null)}return e},dashTextureKey:function(e,t){return"__dash_"+t+"_"+JSON.stringify(e)},getDashTexture:function(e,t){var i=this.dashTextureKey(e,this.sources[t].config.uid);if(null==mc.dash_textures[i]){mc.dash_textures[i]=!0;var r=function(e,t){var i=1l[i]?2:0,n=l[i-1],l[i]),u[c++]=l[i],u[c++]=r,u[c++]=n,u[c++]=o},f=0;f0.0){if((abs(angle)>THETA)){position.xy+=v*width*o/cos(angle/2.0);float s=sign(angle);if(angle<0.0){if(u==+1.0){u=v_segment.y+v*width*tan(angle/2.0);if(v==1.0){position.xy-=2.0*width*t1/sin(angle);u-=2.0*width/sin(angle);}}else{u=v_segment.x-v*width*tan(angle/2.0);if(v==1.0){position.xy+=2.0*width*t2/sin(angle);u+=2.0*width/sin(angle);}}}else{if(u==+1.0){u=v_segment.y+v*width*tan(angle/2.0);if(v==-1.0){position.xy+=2.0*width*t1/sin(angle);u+=2.0*width/sin(angle);}}else{u=v_segment.x-v*width*tan(angle/2.0);if(v==-1.0){position.xy-=2.0*width*t2/sin(angle);u-=2.0*width/sin(angle);}}}}else{position.xy+=v*width*o/cos(angle/2.0);if(u==+1.0){u=v_segment.y;}else{u=v_segment.x;}}}else{position.xy+=v*o*halfMiterlength;if(u==+1.0){u=v_segment.y+v*width*tan(angle/2.0);}else{u=v_segment.x-v*width*tan(angle/2.0);}}v_joinIndicator=(segmentLength+v*width*tan(angle/2.0))/segmentLength;}else{v_joinIndicator=-1.0;position.xy+=v*width*o1;if(u==-1.0){u=v_segment.x-width;position.xy-=width*t1;}else{u=v_segment.y+width;position.xy+=width*t2;}}vec2 t;vec2 curr=a_position.xy;if(a_texcoord.x>=0.0){vec2 next=curr+t2*(v_segment.y-v_segment.x);rotate(t1,+a_angles.x/2.0,t);v_miter.x=signed_distance(curr,curr+t,position.xy);rotate(t2,+a_angles.y/2.0,t);v_miter.y=signed_distance(next,next+t,position.xy);}else{vec2 prev=curr-t1*(v_segment.y-v_segment.x);rotate(t1,-a_angles.x/2.0,t);v_miter.x=signed_distance(prev,prev+t,position.xy);rotate(t2,-a_angles.y/2.0,t);v_miter.y=signed_distance(curr,curr+t,position.xy);}v_distances=vec2(u,v*width);v_world_position=wrapWorldPosition(u_model*position);v_local_space_position=position;position=u_modelView*position;\n#pragma tangram: position\nv_position=position;v_normal=normalize(u_normalMatrix*TANGRAM_NORMAL);\n#if defined(TANGRAM_LIGHTING_VERTEX)\nvec3 normal=v_normal;\n#pragma tangram: normal\nv_lighting=calculateLighting(position.xyz-u_eye,normal,vec4(1.));\n#endif\ncameraProjection(position);\n#ifdef TANGRAM_LAYER_ORDER\napplyLayerOrder(a_position.w+u_tile_proxy_depth+1.,position);\n#endif\ngl_Position=position;}",fragment_shader_src:"uniform vec2 u_resolution;uniform float u_time;uniform vec4 u_tile_origin;uniform float u_meters_per_pixel;uniform float u_device_pixel_ratio;uniform mat3 u_normalMatrix;uniform mat3 u_inverseNormalMatrix;uniform sampler2D u_dash_atlas;uniform float u_antialias;uniform vec2 u_linecaps;uniform float u_linejoin;uniform float u_miter_limit;uniform float u_dash_phase;uniform float u_dash_period;uniform float u_dash_index;uniform vec2 u_dash_caps;varying vec4 v_position;varying vec4 v_local_space_position;varying vec3 v_normal;varying vec4 v_color;varying vec4 v_world_position;varying float v_closed;\n#ifdef TANGRAM_DEBUG_TRIANGLES\nvarying vec3 v_barycentric;\n#endif\nvarying vec2 v_segment;varying vec2 v_angles;varying vec2 v_texcoord;varying vec2 v_distances;varying vec2 v_miter;varying float v_length;varying float v_linewidth;varying float v_joinIndicator;\n#define TANGRAM_NORMAL v_normal\n#ifdef TANGRAM_MODEL_POSITION_BASE_ZOOM_VARYING\nvarying vec4 v_modelpos_base_zoom;\n#endif\n#if defined(TANGRAM_LIGHTING_VERTEX)\nvarying vec4 v_lighting;\n#endif\n#pragma tangram: camera\n#pragma tangram: material\n#pragma tangram: lighting\n#pragma tangram: global\n#pragma tangram: utils\nconst float PI=3.141592653589793;const float HALF_PI=PI/2.0;const float THETA=15.0*PI/180.0;/***Compute distance to cap.*@param{int}type The Type of the cap(see CAP_TYPE in pattern_lines)*@param{float}dx The distance of the pixel from the beginning of the line(not straight distance,but along the legs)*@param{float}dy The distance of the pixel from the midline(see v_distances in vertex shader,aka \xb11*half_line_width)*@param{float}aa_radius The distance from the mid-line from where antialiasing starts.*For example for a line width 10px width and 2px filter radius it is 10px/2-2px=3px.*@return{float}distance*/float cap(int type,float dx,float dy,float aa_radius){float dist=0.0;dx=abs(dx);dy=abs(dy);if(type==1)dist=sqrt(dx*dx+dy*dy);else if(type==3)dist=(dx+abs(dy));else if(type==2)dist=max(abs(dy),(aa_radius+dx-abs(dy)));else if(type==4)dist=max(dx,dy);else if(type==5)dist=max(dx+aa_radius,dy);return dist;}/***Compute distance to join.*@param{int}type The type of the join(see JOIN_TYPE in pattern_lines)*@param{vec2}segment Interpolated a_segment attribute from the vertex shader*@param{vec2}texcoord Pair of u/v coordinates to identify the 4 different extruded points of the segment.*@param{vec2}distances 2 component vector where:*x is the distance of the pixel from the beginning of the line(along the legs)*y is the distance of the pixel from the midline(see v_distances in vertex shader,\xb11*half_line_width)*@param{vec2}miter Miter point coordiante*@param{float}miter_limit The miter limit*@param{float}line_width The line width*@return{float}computed distance*/float join(in int type,in vec2 segment,in vec2 texcoord,in vec2 distances,in vec2 miter,in float miter_limit,in float line_width){float dx=distances.x;float result=abs(distances.y);if((dxsegment.y)){if(type==1){float s=dx=0.0 ? miter.x : miter.y);if(type==2){result=max(result,m);}else if(type==0){result=max(result,m-miter_limit*line_width/2.0);}}}return result;}void main(void){\n#pragma tangram: setup\nvec4 color=v_color;vec3 normal=TANGRAM_NORMAL;\n#ifdef TANGRAM_CROP_BY_TILE\nif(isLocalSpacePixelOutsideTile(v_local_space_position,TANGRAM_TILE_SCALE.x)){discard;}\n#endif\n#if defined(TANGRAM_LIGHTING_FRAGMENT) && defined(TANGRAM_MATERIAL_NORMAL_TEXTURE)\ncalculateNormal(normal);\n#endif\n#if !defined(TANGRAM_LIGHTING_VERTEX)\n#pragma tangram: normal\n#endif\n#pragma tangram: color\n#if defined(TANGRAM_LIGHTING_FRAGMENT)\ncolor=calculateLighting(v_position.xyz-u_eye,normal,color);\n#elif defined(TANGRAM_LIGHTING_VERTEX)\ncolor*=v_lighting;\n#endif\n#pragma tangram: filter\nif(v_color.a<=0.0){discard;}bool solid=(u_dash_index==0.0);bool closed=v_closed>0.0;float dx=v_distances.x;float dy=v_distances.y;float aa_radius=v_linewidth/2.0-u_antialias;float width=v_linewidth;float dist=0.0;vec2 linecaps=u_linecaps;vec2 dash_caps=u_dash_caps;float line_start=0.0;float line_stop=v_length;if(solid){dist=abs(dy);bool potentialCap=!closed&&v_joinIndicator<0.0;if(potentialCap&&dxline_stop){dist=cap(int(u_linecaps.y),abs(dx)-line_stop,abs(dy),aa_radius);}else{dist=join(int(u_linejoin),v_segment,v_texcoord,v_distances,v_miter,u_miter_limit,v_linewidth);}}else{float segment_start=v_segment.x;float segment_stop=v_segment.y;float segment_center=(segment_start+segment_stop)/2.0;float freq=u_dash_period*width;float dash_phase=u_dash_phase-1e-5;float u=mod(dx+dash_phase*width,freq);vec4 tex=texture2D(u_dash_atlas,vec2(u/freq,u_dash_index));float dash_center=float(tex.x)*255.0*width;float dash_type=floor(float(tex.y)*255.0+0.5);float _start=float(tex.z)*255.0*width;float _stop=float(tex.a)*255.0*width;float dash_start=dx-u+_start;float dash_stop=dx-u+_stop;if((dash_stopsegment_stop)&&(dash_caps.y!=5.0)){float u=mod(segment_stop+dash_phase*width,freq);vec4 tex=texture2D(u_dash_atlas,vec2(u/freq,u_dash_index));dash_center=float(tex.x)*255.0*width;float _start=float(tex.z)*255.0*width;float _stop=float(tex.a)*255.0*width;dash_start=segment_stop-u+_start;dash_stop=segment_stop-u+_stop;}bool discontinuous=((dxTHETA)||((dx>=segment_center)&&abs(v_angles.y)>THETA);float d_join=join(int(u_linejoin),v_segment,v_texcoord,v_distances,v_miter,u_miter_limit,v_linewidth);if(closed){line_start+=v_linewidth/2.0;line_stop-=v_linewidth/2.0;}if(dash_stop<=line_start){discard;}if(dash_start>=line_stop){discard;}if(discontinuous){if((dash_start>segment_stop)){discard;}if((dash_stop_stop)&&(dash_stop>segment_stop)&&(abs(v_angles.y)0.0){discard;}dash_caps.x=4.0;}}if((dash_caps.y!=1.0)&&(dash_caps.y!=5.0)){if((dash_stop>segment_stop)&&(abs(v_angles.y)0.0){discard;}dash_caps.y=4.0;}}}if((dxline_start)){dist=cap(int(linecaps.x),dx-line_start,dy,aa_radius);}else if((dx>line_stop)&&(dash_stop>line_stop)&&(dash_startline_start)&&(dxline_start)&&(dxline_start)&&(dx=segment_start)){dist=d_join;float angle=HALF_PI+v_angles.x;float f=abs((segment_start-dx)*cos(angle)-dy*sin(angle));dist=max(f,dist);}else if((dx>segment_stop)&&(dash_start<=segment_stop)&&(dash_stop>=segment_stop)){dist=d_join;float angle=HALF_PI+v_angles.y;float f=abs((dx-segment_stop)*cos(angle)-dy*sin(angle));dist=max(f,dist);}else if(dx<(segment_start-v_linewidth/2.)){discard;}else if(dx>(segment_stop+v_linewidth/2.)){discard;}}else if(dx<(segment_start-v_linewidth/2.)){discard;}else if(dx>(segment_stop+v_linewidth/2.)){discard;}}dist=dist-aa_radius;if(dist>=0.0){if(u_antialias==0.0){discard;}else{color=vec4(color.rgb,exp(-dist*dist)*color.a);}}\n#ifdef TANGRAM_DEBUG_TRIANGLES\nif(any(lessThan(v_barycentric,vec3(0.0085)))){color=vec4(0.0,1.0,0.0,1.0);}\n#endif\ngl_FragColor=color;}",selection:!0,init:function(){cu.init.apply(this,arguments),this.defines.TANGRAM_LAYER_ORDER=!0,this.defines.TANGRAM_CROP_BY_TILE=this.crop_by_tile,this.defines.TANGRAM_DEBUG_TRIANGLES=!1,this.defines.TANGRAM_DEBUG_NO_TEXTURE_FLOAT_SUPPORT=!1,this.styles=this.styles||{},wc.vertex_layouts=[],wc.variants={}},calcDistance:function(e,t){return e&&jo.evalCachedDistanceProperty(e,t)||0},calcDash:function(e,t){var i=jo.evalProperty(e.dash,t),r=0;return i&&((i=Array.isArray(i)&&i.length?i:Sc).length%2==1&&(i=i.concat(i)),r=+(r=i.reduce(function(e,t){return e+t}))||0),{dash:i,dash_period:r}},calcWidth:function(e,t,i){var r=this.calcDistance(e.width,i);return!(r<0)&&(t.width=r*i.units_per_meter_overzoom,!0)},getCapType:function(e,t,i){var r=jo.evalProperty(e,t);return void 0!==kc[r]?kc[r]:i},_parseFeature:function(e,t,i){if(!1!==this.calcWidth(t,this.feature_style,i)){var r=this.parseColor(t.color,i);if(r&&0!==r[3]){var n=this.getCapType(t.cap,i,Mc),o=jo.evalProperty(t.join,i),a=+jo.evalProperty(t.miter_limit,i),s=this.calcDash(t,i),l=s.dash,u=s.dash_period,c=Object.assign({color:r,antialias:t.antialias,linecaps:[this.getCapType(t.tail_cap,i,n),this.getCapType(t.head_cap,i,n)],join:void 0!==Ec[o]?Ec[o]:Rc,miter_limit:0<=a?a:3,dash_index:0===u?0:1,dash:l,dash_caps:[this.getCapType(t.tail_cap,i,n),this.getCapType(t.head_cap,i,n)],dash_phase:+jo.evalProperty(t.dash_phase,i)||0,dash_period:u},this.feature_style);return c.z=t.z&&jo.evalCachedDistanceProperty(t.z||0,i)||jo.defaults.z,c.z*=Jr.height_scale,c.extrude=jo.evalProperty(t.extrude,i),c.extrude&&(!0===c.extrude?(c.height=void 0!==e.properties.height?e.properties.height:jo.defaults.height,c.min_height=void 0!==e.properties.min_height?e.properties.min_height:jo.defaults.min_height):"number"==typeof c.extrude?(c.height=c.extrude,c.min_height=0):Array.isArray(c.extrude)&&(c.min_height=c.extrude[0],c.height=c.extrude[1]),c.height*=Jr.height_scale,c.min_height*=Jr.height_scale),this.computeVariant(c),c}}},_preprocess:function(e,t){e.color=jo.createColorPropertyCache(e.color),e.width=jo.createPropertyCache(e.width,jo.parseUnits),e.width&&e.width.type!==jo.CACHE_TYPE.STATIC&&(e.next_width=jo.createPropertyCache(e.width,jo.parseUnits)),e.z=jo.createPropertyCache(e.z,jo.parseUnits);var i=+e.antialias;return e.antialias=isNaN(i)?0:i,e},buildRasterTextures:function(e,t){var i=[];for(var r in t.meshes){var n=wc.variants[r],o=n.uniforms,a=n.pattern;if(o.u_dash_index){var s="__dash_"+a.join("_")+"_"+e.key+"_"+e.id;i.push({name:s,data:Tc(a,1024)}),o.u_dash_atlas=s,t.meshes[r].textures=[s]}t.meshes[r].uniforms=o}return t.uniforms=t.uniforms||{},i.length?Cr.postMessage(this.main_thread_target+".loadTextures",i).then(function(){return t}):Promise.resolve(t)},loadTextures:function(e){for(var t=[],i=0;ia)){var A=new Uc(b,t,i,r);A.angle=qc(y,x,r.angle),n.push(A)}}}return n}function qc(e,t,i){var r=2=m?e():document.fonts.load(A(_,'"'+_.family+'"'),p).then(function(e){1<=e.length?i():setTimeout(t,25)},function(){e()})}()});var t=new Promise(function(e,t){v=setTimeout(t,m)});Promise.race([t,e]).then(function(){clearTimeout(v),f(_)},function(){d(_)})}else!function(t){document.body?t():document.addEventListener?document.addEventListener("DOMContentLoaded",function e(){document.removeEventListener("DOMContentLoaded",e),t()}):document.attachEvent("onreadystatechange",function e(){"interactive"!=document.readyState&&"complete"!=document.readyState||(document.detachEvent("onreadystatechange",e),t())})}(function(){function t(){var e;(e=-1!=o&&-1!=a||-1!=o&&-1!=s||-1!=a&&-1!=s)&&((e=o!=a&&o!=s&&a!=s)||(null===T&&(e=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent),T=!!e&&(parseInt(e[1],10)<536||536===parseInt(e[1],10)&&parseInt(e[2],10)<=11)),e=T&&(o==l&&a==l&&s==l||o==u&&a==u&&s==u||o==c&&a==c&&s==c)),e=!e),e&&(h.parentNode&&h.parentNode.removeChild(h),clearTimeout(v),f(_))}var i=new y(p),r=new y(p),n=new y(p),o=-1,a=-1,s=-1,l=-1,u=-1,c=-1,h=document.createElement("div");h.dir="ltr",x(i,A(_,"sans-serif")),x(r,A(_,"serif")),x(n,A(_,"monospace")),h.appendChild(i.a),h.appendChild(r.a),h.appendChild(n.a),document.body.appendChild(h),l=i.a.offsetWidth,u=r.a.offsetWidth,c=n.a.offsetWidth,function H(){if((new Date).getTime()-g>=m)h.parentNode&&h.parentNode.removeChild(h),d(_);else{var e=document.hidden;!0!==e&&void 0!==e||(o=i.a.offsetWidth,a=r.a.offsetWidth,s=n.a.offsetWidth,t()),v=setTimeout(H,50)}}(),b(i,function(e){o=e,t()}),x(i,A(_,'"'+_.family+'",sans-serif')),b(r,function(e){a=e,t()}),x(r,A(_,'"'+_.family+'",serif')),b(n,function(e){s=e,t()}),x(n,A(_,'"'+_.family+'",monospace'))})})},e.exports=t}),Zc={fonts_loaded:Promise.resolve(),last_loaded:null,loadFonts:function(r){var n=this,e=JSON.stringify(r)===this.last_loaded;return r&&!e&&function(){function e(t){Array.isArray(r[t])?r[t].forEach(function(e){return i.push(n.loadFontFace(t,e))}):i.push(n.loadFontFace(t,r[t]))}var i=[];for(var t in r)e(t);n.last_loaded=JSON.stringify(r),n.fonts_loaded=Promise.all(i.filter(function(e){return e}))}(),this.fonts_loaded},loadFontFace:function(e,t){if(null!=t&&("object"===vr(t)||"external"===t)){var i={family:e},r=Promise.resolve();"object"===vr(t)&&(Object.assign(i,t),"string"==typeof t.url&&(r=this.injectFontFace(i)));var n=new Xc(e,i);return r.then(function(){return n.load()}).then(function(){Kr("debug","Font face '".concat(e,"' is available"),i)},function(){Kr("debug","Font face '".concat(e,"' is NOT available"),i)})}},injectFontFace:function(e){var n=this,o=e.family,t=e.url,a=e.weight,s=e.style;void 0===this.supports_native_font_loading&&(this.supports_native_font_loading=void 0!==window.FontFace);var i=Promise.resolve(t);return"blob:"===t.slice(0,5)&&(i=on.io(t,6e4,"arraybuffer").then(function(e){var t=new Uint8Array(e);if(n.supports_native_font_loading)return t;for(var i="",r=0;rT.cache.text_count_max&&(T.cache.text={},T.cache.text_count=0,Kr("debug","CanvasText: pruning text cache")),Object.keys(T.cache.segment).length>T.cache.segment_count_max&&(T.cache.segment={},Kr("debug","CanvasText: pruning segment cache"))}}]),T}();Kc.font_size_re=/((?:[0-9]*\.)?[0-9]+)\s*(px|pt|em|%)?/,Kc.cache={text:{},text_count:0,text_count_max:2e3,segment:{},segment_count_max:2e3,stats:{text_hits:0,text_misses:0,segment_hits:0,segment_misses:0}};var Jc=new RegExp("[\u0591-\u07ff\u200f\u202b\u202e\ufb1d-\ufdfd\ufe70-\ufefc]");function $c(e){return Jc.test(e)}var Qc="\0-/:-@[-`{-\xbf\xd7\xf7\u02b9-\u02ff\u2000-\u2bff\u2010-\u2029\u202c\u202f-\u2bff",eh=new RegExp("["+Qc+"]+");function th(e){return eh.test(e)}var ih=new RegExp("^["+Qc+"\u0600-\u06ff]+"),rh=new RegExp("["+Qc+"\u0622-\u0625\u0627\u062f-\u0632\u0648\u0671-\u0677\u0688-\u0699\u06c4-\u06cb\u06cf\u06d2\u06d3\u06ee\u06ef]"),nh=new RegExp("^[\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed]+"),oh="[\u0300-\u036f\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u07a6-\u07b0\u0900-\u0903\u093a-\u094c\u094e\u094f\u0951-\u0957\u0962\u0963\u0981-\u0983\u09bc\u09be-\u09cc\u09d7\u09e2\u09e3\u0a01-\u0a03\u0a3c-\u0a4c\u0a51\u0a81-\u0a83\u0abc\u0abe-\u0acc\u0ae2\u0ae3\u0b01-\u0b03\u0b3c\u0b3e-\u0b4c\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe-\u0bcd\u0bd7\u0c00-\u0c03\u0c3e-\u0c4c\u0c55\u0c56\u0c62\u0c63\u0c81-\u0c83\u0cbc\u0cbe-\u0ccc\u0cd5\u0cd6\u0ce2\u0ce3\u0d01-\u0d03\u0d3e-\u0d4c\u0d4e\u0d57\u0d62\u0d63\u0d82\u0d83\u0dca-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f83\u0f86\u0f87\u0f8d-\u0fbc\u0fc6\u102b-\u1038\u103a-\u103e\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f\u109a-\u109d\u17b4-\u17d1\u17d3\u1a55-\u1a5e\u1a61-\u1a7c\u1dc0-\u1dff\u20d0-\u20ff]",ah=new RegExp("^.(?:"+oh+"+)?([\u094d\u09cd\u0a4d\u0acd\u0b4d\u0c4d\u0ccd\u0d4d\u0f84\u1039\u17d2\u1a60\u1a7f]\\W(?:"+oh+"+)?)*"),sh={Mongolian:"\u1800-\u18af"},lh=Object.keys(sh).map(function(e){return sh[e]}).join(""),uh=new RegExp("["+lh+"]");var ch=2;function hh(e,t){var i=t?1:ch;if(e.lengththis.width&&(this.width=Math.ceil(t)),this.lines.push(e),this.height+=e.height,!0}return this.addEllipsis(),!1}},{key:"advance",value:function(e,t){return!!this.push(e)&&this.createLine(t)}},{key:"addEllipsis",value:function(){var e=this.lines[this.lines.length-1],t=Math.ceil(this.context.measureText(_.ellipsis).width);e.append(_.ellipsis),e.width+=t,e.width>this.width&&(this.width=e.width)}},{key:"finish",value:function(e){e?this.push(e):this.addEllipsis()}}],[{key:"parse",value:function(e,t,i,r,n){var o;o="number"==typeof t?e.split(" "):[e];for(var a=new _(n,i,t),s=a.createLine(r),l=0;lthis.text_wrap}}]),i}(),_h={resetText:function(){this.texts={}},freeText:function(e){delete this.texts[e.id]},parseTextFeature:function(e,t,i,r){var n=this.parseTextSource(e,t,i);if(null!=n&&""!==n){var o=Wc.compute(e,t,i),a=Wc.key(o);this.texts[r.id]=this.texts[r.id]||{};var s=this.texts[r.id][a]=this.texts[r.id][a]||{};if(n instanceof Object){var l=[],u=n.left+"-"+n.right;for(var c in n){var h=n[c];if(h){var f=this.computeTextLayout({},e,t,i,r,h,o,u,c);s[h]||(s[h]={text_settings:o,ref:0}),l.push({draw:t,text:h,text_settings_key:a,layout:f})}}return 0=this._min_zoom;){if(n.setLookAtData({zoom:o-=.1,position:t,tilt:i,heading:r}),e.every(function(e){return ml.isPointInsidePolygon(e,n.getLookAtData().bounds)}))break}return n.getLookAtData().zoom}},{key:"setZoomConstraints",value:function(e,t){this._min_zoom=e,this._max_zoom=t,this.setLookAtData(this.getLookAtData())}},{key:"setLookAtData",value:function(e,t){var i,r,n=e.position,o=e.zoom;if(n===i&&e.bounds!==i&&(n=ml.getBBoxCenter(ml.getBBox(e.bounds))),o===i&&e.bounds!==i&&(o=this._getZoomForBounds(e.bounds,n,e.tilt,e.heading)),t!==i&&(r=n||this.screenToWorld(t)),o!==i){o=ml.clamp(o,this._min_zoom,this._max_zoom);var a=on.zoomToTileLevel(o),s=this._lookAtData.tile_level;a!==s&&(this._zoom_direction=s=Jr.circumference_meters&&(s=[[-Jr.half_circumference_meters,o],[Jr.half_circumference_meters,o],[Jr.half_circumference_meters,r],[-Jr.half_circumference_meters,r]]);var u=[];return s&&(u=ml.splitLegs(s,Jr.half_circumference_meters)),u}},{key:"applyPxOffset",value:function(e){var t=Sr(e,2),i=t[0],r=t[1],n=Math.PI-this._lookAtData.heading*ph,o=Jr.metersPerPixel(this._lookAtData.zoom);this._lookAtData.position[0]+=(i*Math.cos(n)+r*Math.sin(n))*o,this._lookAtData.position[1]-=(r*Math.cos(n)-i*Math.sin(n))*o,this._lookAtData.position[1]=ml.clamp(this._lookAtData.position[1],-Jr.half_circumference_meters,Jr.half_circumference_meters),this._updateMatrices(),this._updateVisibleBounds()}},{key:"screenToWorld",value:function(e){var t=Sr(e,2),i=t[0],r=t[1],n=this._viewport,o=n.width,a=n.height;return 0===o||0===a?[0,0]:(i-=o/2,r-=a/2,this._clipCoordsToWorldPlaneCoords([2*(i+o/2)/o-1,1-2*(r+a/2)/a,-1,1]))}},{key:"_clipToScreenCoords",value:function(e){var t=this._viewport,i=t.width,r=t.height;return[(.5*e[0]+.5)*i,r-(.5*e[1]+.5)*r]}},{key:"_isScreenPointInViewPort",value:function(e){var t=this._viewport,i=t.width,r=t.height;return 0<=e[0]&&e[0]<=i&&0<=e[1]&&e[1]<=r}},{key:"worldToScreen",value:function(e,t){var i,r=1i.preserve_tiles_within_zoom)return!0;var t=aa.coordinateAtZoom(e.coords,i.lookAtManipulator.getLookAtData().tile_level);return Math.abs(t.x-i.center_tile.x)-r[0]>i.buffer||Math.abs(t.y-i.center_tile.y)-r[1]>i.buffer})}}},{key:"createMatrices",value:function(){this.matrices={},this.matrices.model=new Float64Array(16),this.matrices.model32=new Float32Array(16),this.matrices.model_view=new Float64Array(16),this.matrices.model_view32=new Float32Array(16),this.matrices.normal=new Float64Array(9),this.matrices.normal32=new Float32Array(9),this.matrices.inverse_normal32=new Float32Array(9)}},{key:"setupTile",value:function(e,t){e.setupProgram(this.matrices,t),this.lookAtManipulator.setupMatrices(this.matrices,t)}},{key:"setupProgram",value:function(e){var t=this.lookAtManipulator.getLookAtData();e.uniform("2fv","u_resolution",[this.size.device.width,this.size.device.height]),e.uniform("3fv","u_map_position",[t.position[0],t.position[1],Math.trunc(1e5*t.zoom)/1e5]),e.uniform("1f","u_meters_per_pixel",Jr.metersPerPixel(t.zoom)),e.uniform("1f","u_device_pixel_ratio",on.device_pixel_ratio),e.uniform("1f","u_view_pan_snap_timer",this.pan_snap_timer),e.uniform("1i","u_view_panning",this.panning),e.uniform("1f","u_horizon",this.lookAtManipulator.getHorizon()/(this.size.css.height/2)),this.lookAtManipulator.setupProgram(e)}},{key:"isAnimating",value:function(){return this.pan_snap_timer<=.5}},{key:"xyToGeo",value:function(e,t){var i=this.lookAtManipulator.screenToWorld([e,t]),r=Sr(Jr.metersToLatLng(i),2),n=r[0];return{lat:r[1],lng:n}}},{key:"geoToPixel",value:function(e){var t=Jr.latLngToMeters([e.lng,e.lat]);t.push(e.alt||0);var i=this.lookAtManipulator.worldToScreen(t);return{x:Math.floor(i[0]),y:Math.floor(i[1])}}},{key:"geoToMeters",value:function(e){var t=Sr(Jr.latLngToMeters([e.lng,e.lat]),2);return{x:t[0],y:t[1],z:e.alt||0}}},{key:"metersToGeo",value:function(e){var t=Sr(Jr.metersToLatLng([e.x,e.y]),2),i=t[0];return{lat:t[1],lng:i,alt:e.z||0}}},{key:"setZoomConstraints",value:function(e,t){this.lookAtManipulator.setZoomConstraints(e,t)}}]),i}(),Dh=Uc.PLACEMENT,jh=128/Math.PI,Uh=16384/Math.PI,Gh=Object.create(cu);Gh.variants={};Object.assign(Gh,_h),Object.assign(Gh,{name:"points",built_in:!0,vertex_shader_src:"uniform vec2 u_resolution;uniform float u_time;uniform vec3 u_map_position;uniform vec4 u_tile_origin;uniform float u_tile_proxy_depth;uniform bool u_tile_fade_in;uniform float u_meters_per_pixel;uniform float u_device_pixel_ratio;uniform float u_visible_time;uniform bool u_view_panning;uniform float u_tilt;uniform mat4 u_model;uniform mat4 u_modelView;uniform mat3 u_normalMatrix;uniform mat3 u_inverseNormalMatrix;uniform float u_heading;uniform float u_near_plane;uniform float u_depth_buffer_adjustment;attribute vec4 a_position;attribute vec4 a_shape;attribute vec4 a_color;attribute vec2 a_texcoord;attribute vec2 a_offset;uniform float u_point_type;attribute float a_is_flat;\n#ifdef TANGRAM_IS_TEXT_STYLE\nattribute vec4 a_offsets_alt;attribute vec4 a_pre_angles_alt;attribute vec4 a_angles_alt;attribute vec4 a_offsets;attribute vec4 a_pre_angles;attribute vec4 a_angles;\n#endif\n#ifdef TANGRAM_POINT_DRAW_STICK\nattribute float a_is_stick;attribute float a_stick_height;varying float v_is_stick;\n#endif\nvarying vec4 v_color;varying vec2 v_texcoord;varying vec4 v_world_position;varying float v_alpha_factor;\n#ifdef TANGRAM_HAS_SHADER_POINTS\nattribute float a_outline_edge;attribute vec4 a_outline_color;varying float v_outline_edge;varying vec4 v_outline_color;varying float v_aa_offset;\n#endif\n#ifdef TANGRAM_SHOW_HIDDEN_LABELS\nvarying float v_label_hidden;\n#endif\n#define PI 3.14159265359\n#define TANGRAM_NORMAL vec3(0., 0., 1.)\n#pragma tangram: camera\n#pragma tangram: material\n#pragma tangram: lighting\n#pragma tangram: raster\n#pragma tangram: global\nvec2 rotate2D(vec2 _st,float _angle){return mat2(cos(_angle),-sin(_angle),sin(_angle),cos(_angle))*_st;}vec3 rotateX3D(vec3 _st,float _angle){return mat3(1.,0.,0.,0.,cos(_angle),sin(_angle),0.,-sin(_angle),cos(_angle))*_st;}vec3 rotateZ3D(vec3 _st,float _angle){return mat3(cos(_angle),sin(_angle),0.,-sin(_angle),cos(_angle),0.,0.,0.,1.)*_st;}\n#ifdef TANGRAM_IS_TEXT_STYLE\nfloat mix4linear(float a,float b,float c,float d,float x){return mix(mix(a,b,3.*x),mix(b,mix(c,d,3.*(max(x,.66)-.66)),3.*(clamp(x,.33,.66)-.33)),step(0.33,x));}\n#endif\nvoid main(){\n#pragma tangram: setup\n#ifndef TANGRAM_SHOW_HIDDEN_LABELS\nif(a_shape.w==0.){gl_Position=vec4(0.,0.,0.,1.);return;}\n#else\nif(a_shape.w==0.){v_label_hidden=1.;}else{v_label_hidden=0.;}\n#endif\nv_alpha_factor=1.0;v_color=a_color;v_texcoord=a_texcoord;\n#ifdef TANGRAM_HAS_SHADER_POINTS\nv_outline_color=a_outline_color;v_outline_edge=a_outline_edge;if(u_point_type==TANGRAM_POINT_TYPE_SHADER){v_outline_color=a_outline_color;v_outline_edge=a_outline_edge;float size=abs(a_shape.x/128.);v_texcoord=sign(a_shape.xy)*(size+1.)/(size);size+=2.;v_aa_offset=2./size;}\n#endif\nvec4 position=u_modelView*vec4(a_position.xyz,1.);vec4 shape=vec4(a_shape.xy,0.,0.);vec2 offset=vec2(a_offset.x,-a_offset.y);\n#ifdef TANGRAM_POINT_DRAW_STICK\nv_is_stick=a_is_stick;float scaled_stick_height=(sin(u_tilt+(1.5*PI))+1.0)*a_stick_height;offset.y+=(1.0-a_is_stick)*scaled_stick_height;\n#endif\nfloat zoom=clamp(u_map_position.z-u_tile_origin.z,0.,1.);float theta=a_shape.z/4096.;float heading=u_heading;float delta=(heading-PI);float new_theta=theta-delta;float reversed=abs(new_theta)>PI/2. ? 1. : 0.;if(a_is_flat==1.0){\n#ifdef TANGRAM_IS_TEXT_STYLE\nif(a_offsets[0]!=0.){vec4 angles_scaled;vec4 pre_angles_scaled;vec4 offsets_scaled;if(reversed==1.){offsets_scaled=a_offsets_alt*4.;angles_scaled=(PI/16384.)*a_angles_alt;pre_angles_scaled=(PI/128.)*a_pre_angles_alt;}else{offsets_scaled=a_offsets*4.;angles_scaled=(PI/16384.)*a_angles;pre_angles_scaled=(PI/128.)*a_pre_angles;}float pre_angle=mix4linear(pre_angles_scaled[0],pre_angles_scaled[1],pre_angles_scaled[2],pre_angles_scaled[3],zoom);float angle=mix4linear(angles_scaled[0],angles_scaled[1],angles_scaled[2],angles_scaled[3],zoom);float offset_curve=mix4linear(offsets_scaled[0],offsets_scaled[1],offsets_scaled[2],offsets_scaled[3],zoom);shape.xy=rotate2D(shape.xy,pre_angle+PI*reversed);shape.x+=offset_curve;shape.xy=rotate2D(shape.xy,angle);shape.xy+=rotate2D(offset,theta);}else{shape.xy=rotate2D(shape.xy+offset*256.,theta+(PI*reversed));}\n#else\nshape.xy=rotate2D(shape.xy+offset*256.,theta);\n#endif\nshape.xy/=pow(2.,4.+(u_map_position.z-u_tile_origin.w));shape=u_modelView*shape;position+=shape;}else{shape.xy/=256.;\n#ifdef TANGRAM_POINT_DRAW_STICK\nshape.y*=1.0+(scaled_stick_height-1.0)*a_is_stick;\n#endif\nshape.xy=rotate2D(shape.xy+offset,theta);}\n#ifdef TANGRAM_FADE_IN_RATE\nif(u_tile_fade_in){v_alpha_factor*=clamp(u_visible_time*TANGRAM_FADE_IN_RATE,0.,1.);}\n#endif\n#ifdef TANGRAM_FADE_ON_ZOOM_OUT\nv_alpha_factor*=clamp(1.+TANGRAM_FADE_ON_ZOOM_OUT_RATE*(u_map_position.z-u_tile_origin.z),0.,1.);\n#endif\nv_world_position=u_model*position;v_world_position.xy+=shape.xy*u_meters_per_pixel;v_world_position=wrapWorldPosition(v_world_position);\n#pragma tangram: position\ncameraProjection(position);\n#ifdef TANGRAM_LAYER_ORDER\napplyLayerOrder(a_position.w+u_tile_proxy_depth+1.,position);/***Due to the precision loss on depth buffer,we had a z-fighting of translucent points when the distance to the camera was big.*For more information about the problem see: https:*For more information about the fix see: https:*position.z=(2.0*log(position.w/u_near_plane)/log(u_far_plane/u_near_plane)-1.0)*position.w;*/position.z=(log(position.w/u_near_plane)*u_depth_buffer_adjustment-1.0)*position.w;\n#endif\nif(a_is_flat!=1.){position.xy+=shape.xy*position.w*2.*u_device_pixel_ratio/u_resolution;}\n#ifdef TANGRAM_HAS_SHADER_POINTS\nif(u_point_type==TANGRAM_POINT_TYPE_SHADER){position.xy+=sign(shape.xy)*position.w*u_device_pixel_ratio/u_resolution;}\n#endif\n#ifdef TANGRAM_HAS_SHADER_POINTS\nif(!u_view_panning&&(abs(theta)0.){color.a*=0.5;color.rgb=vec3(1.,0.,0.);}\n#endif\n#if !defined(TANGRAM_BLEND_OVERLAY) && !defined(TANGRAM_BLEND_INLAY) && !defined(TANGRAM_BLEND_ADD)\nif(color.a>>0,o.priority=a,o},buildTextLabels:function(e,t){for(var i=[],r=0;ru[0]?1===n?(t.push(l),r<(i+=c)&&(o=t,r=i,a=!1)):(t=[u,l],r<(i=c)&&(o=t,r=i,a=!1),n=1):l[0]Math.PI&&(d+=pMath.PI&&(_+=v<_?-2*Math.PI:2*Math.PI)}a.push(d),s.push(_),l.push(f)}return[l,a,s]}}]),j}();function Wh(e,t){var i=iu.sub(t,e);return iu.angle(i)}function Xh(e){for(var t=[],i=0;iMath.PI;)i+=2*Math.PI;return Math.abs(r-i)}var Kh=Object.create(Gh);Object.assign(Kh,{name:"text",super:Gh,built_in:!0,init:function(e){var t=0=tile_scale||pixel_local_space_position.y>0.||pixel_local_space_position.y<=-tile_scale;}\n#endif\n"),Zl.replaceBlock("setup","\n#if defined(TANGRAM_FEATURE_SELECTION) && defined(TANGRAM_VERTEX_SHADER)\nif(a_selection_color.rgb==vec3(0.)||a_selection_color==u_selection_discard0||a_selection_color==u_selection_discard1||a_selection_color==u_selection_discard2||a_selection_color==u_selection_discard3||a_selection_color==u_selection_discard4||a_selection_color==u_selection_discard5||a_selection_color==u_selection_discard6||a_selection_color==u_selection_discard7||a_selection_color==u_selection_discard8||a_selection_color==u_selection_discard9){gl_Position=vec4(0.,0.,0.,1.);return;}v_selection_color=a_selection_color;\n#endif\n"),Zl.defines.TANGRAM_EPSILON=1e-5,Zl.defines.TANGRAM_LAYER_DELTA=1/16384,Zl.defines.TANGRAM_TILE_SCALE="vec3(".concat(Jr.tile_scale,"., ").concat(Jr.tile_scale,"., u_meters_per_pixel * ").concat(Jr.tile_size,".)"),Zl.defines.TANGRAM_HEIGHT_SCALE=Jr.height_scale,Zl.defines.TANGRAM_ALPHA_TEST=.1,mc.dash_textures={}}},{key:"destroy",value:function(i){var r=this;Object.keys(this.styles).forEach(function(e){var t=r.styles[e];t.gl===i&&(Kr("trace","StyleManager.destroy: destroying render style ".concat(t.name)),t.base&&r.remove(t.name),t.destroy())})}},{key:"register",value:function(e){this.styles[e.name]=e,this.base_styles[e.name]=e}},{key:"remove",value:function(e){delete this.styles[e]}},{key:"mix",value:function(t,i){if(t.mixed)return t;t.mixed={};var e=[];if(t.mix){var r;if(Array.isArray(t.mix))(r=e).push.apply(r,Pr(t.mix));else e.push(t.mix);(e=e.map(function(e){return i[e]}).filter(function(e){return e&&e!==t})).forEach(function(e){return t.mixed[e.name]=!0})}e.push(t),t.animated=e.some(function(e){return e&&e.animated}),t.texcoords=e.some(function(e){return e&&e.texcoords}),t.base=e.map(function(e){return e.base}).filter(function(e){return e}).pop(),t.lighting=e.map(function(e){return e.lighting}).filter(function(e){return null!=e}).pop(),t.texture=e.map(function(e){return e.texture}).filter(function(e){return e}).pop(),t.raster=e.map(function(e){return e.raster}).filter(function(e){return null!=e}).pop(),t.dash=e.map(function(e){return e.dash}).filter(function(e){return null!=e}).pop(),t.dash_background_color=e.map(function(e){return e.dash_background_color}).filter(function(e){return null!=e}).pop(),e.some(function(e){return e.hasOwnProperty("blend")&&e.blend})&&(t.blend=e.map(function(e){return e.hasOwnProperty("blend")&&e.blend}).filter(function(e){return e}).pop()),t.blend_order=e.map(function(e){return e.blend_order}).filter(function(e){return null!=e}).pop(),t.defines=Object.assign.apply(Object,[{}].concat(Pr(e.map(function(e){return e.defines}).filter(function(e){return e})))),t.material=Object.assign.apply(Object,[{}].concat(Pr(e.map(function(e){return e.material}).filter(function(e){return e}))));var n=e.map(function(e){return e.draw}).filter(function(e){return e});return 0t/2-1){i=" ... ",r+=5;break}for(n="",o=this.position;ot/2-1){n=" ... ",o-=5;break}return a=this.buffer.slice(r,o),af.repeat(" ",e)+i+a+n+"\n"+af.repeat(" ",e+this.position-r+i.length)+"^"},uf.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(i+=":\n"+t),i};var cf=uf,hf=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],ff=["scalar","sequence","mapping"];var df=function(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===hf.indexOf(e))throw new lf('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(e){return e},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=function(e){var i={};return null!==e&&Object.keys(e).forEach(function(t){e[t].forEach(function(e){i[String(e)]=t})}),i}(e.styleAliases||null),-1===ff.indexOf(this.kind))throw new lf('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')};function _f(e,t,r){var n=[];return e.include.forEach(function(e){r=_f(e,t,r)}),e[t].forEach(function(i){r.forEach(function(e,t){e.tag===i.tag&&n.push(t)}),r.push(i)}),r.filter(function(e,t){return-1===n.indexOf(t)})}function pf(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new lf("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=_f(this,"implicit",[]),this.compiledExplicit=_f(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,i={};function r(e){i[e.tag]=e}for(e=0,t=arguments.length;e>16&255),s.push(a>>8&255),s.push(255&a)),a=a<<6|o.indexOf(r.charAt(t));return 0==(i=n%4*6)?(s.push(a>>16&255),s.push(a>>8&255),s.push(255&a)):18==i?(s.push(a>>10&255),s.push(a>>2&255)):12==i&&s.push(a>>4&255),Rf?new Rf(s):s},predicate:function(e){return Rf&&Rf.isBuffer(e)},represent:function(e){var t,i,r="",n=0,o=e.length,a=Sf;for(t=0;t>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]),n=(n<<8)+e[t];return 0==(i=o%3)?(r+=a[n>>18&63],r+=a[n>>12&63],r+=a[n>>6&63],r+=a[63&n]):2==i?(r+=a[n>>10&63],r+=a[n>>4&63],r+=a[n<<2&63],r+=a[64]):1==i&&(r+=a[n>>2&63],r+=a[n<<4&63],r+=a[64],r+=a[64]),r}}),zf=Object.prototype.hasOwnProperty,Nf=Object.prototype.toString;var Of=new df("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,i,r,n,o,a=[],s=e;for(t=0,i=s.length;tt)&&0!==r)fd(e,"bad indentation of a sequence entry");else if(e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt?d=1:e.lineIndent===t?d=0:e.lineIndentt)&&(kd(e,t,Wf,!0,n)&&(_?f=e.result:d=e.result),_||(md(e,u,c,h,f,d),h=f=d=null),yd(e,!0,-1),a=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==a)fd(e,"bad indentation of a mapping entry");else if(e.lineIndentu&&(u=e.lineIndent),id(o))c++;else{if(e.lineIndent>10),56320+(l-65536&1023)),e.position++}else fd(e,"unknown escape sequence");i=r=e.position}else id(s)?(pd(e,i,r,!0),bd(e,yd(e,!1,t)),i=r=e.position):e.position===e.lineStart&&xd(e)?fd(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}fd(e,"unexpected end of the stream within a double quoted scalar")}(e,h)?p=!0:!function(e){var t,i,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!nd(r)&&!od(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&fd(e,"name of an alias node must contain at least one character"),i=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(i)||fd(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],yd(e,!0,-1),!0}(e)?function(e,t,i){var r,n,o,a,s,l,u,c,h=e.kind,f=e.result;if(nd(c=e.input.charCodeAt(e.position))||od(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(nd(r=e.input.charCodeAt(e.position+1))||i&&od(r)))return!1;for(e.kind="scalar",e.result="",n=o=e.position,a=!1;0!==c;){if(58===c){if(nd(r=e.input.charCodeAt(e.position+1))||i&&od(r))break}else if(35===c){if(nd(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&xd(e)||i&&od(c))break;if(id(c)){if(s=e.line,l=e.lineStart,u=e.lineIndent,yd(e,!1,-1),e.lineIndent>=t){a=!0,c=e.input.charCodeAt(e.position);continue}e.position=o,e.line=s,e.lineStart=l,e.lineIndent=u;break}}a&&(pd(e,n,o,!1),bd(e,e.line-s),n=o=e.position,a=!1),rd(c)||(o=e.position+1),c=e.input.charCodeAt(++e.position)}return pd(e,n,o,!1),!!e.result||(e.kind=h,e.result=f,!1)}(e,h,qf===i)&&(p=!0,null===e.tag&&(e.tag="?")):(p=!0,null===e.tag&&null===e.anchor||fd(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===d&&(p=s&&Ad(e,f))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(l=0,u=e.implicitTypes.length;l tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result)?(e.result=c.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):fd(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):fd(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||p}function Ed(e){var t,i,r,n,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(n=e.input.charCodeAt(e.position))&&(yd(e,!0,-1),n=e.input.charCodeAt(e.position),!(0t?o+=e.slice(s,a)+"\n"+e.slice(a+1):o+=e.slice(s),o}function c_(e){return!(32<=e&&e<=126||133===e||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function h_(e,t,i){var r,n,o,a,s,l;for(o=0,a=(n=i?e.explicitTypes:e.implicitTypes).length;o tag resolver accepts not "'+l+'" style');r=s.represent[l](t,l)}e.dump=r}return!0}return!1}function f_(e,t,i,r,n,o){e.tag=null,e.dump=i,h_(e,i,!1)||h_(e,i,!0);var a=zd.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var s,l,u="[object Object]"===a||"[object Array]"===a;if(u&&(l=-1!==(s=e.duplicates.indexOf(i))),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&0 "+e.dump)}return!0}function d_(e,t){var i,r,n=[],o=[];for(function e(t,i,r){var n,o,a;if(null!==t&&"object"==typeof t)if(-1!==(o=i.indexOf(t)))-1===r.indexOf(o)&&r.push(o);else if(i.push(t),Array.isArray(t))for(o=0,a=t.length;o checkpoint")).position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},s_.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=i_[e]||function(e){var t,i,r;if(t=e.toString(16).toUpperCase(),e<=255)i="x",r=2;else if(e<=65535)i="u",r=4;else{if(!(e<=4294967295))throw new lf("code point within a string may not be greater than 0xFFFFFFFF");i="U",r=8}return"\\"+i+af.repeat("0",r-t.length)+t}(e),this.result+=t,this.checkpoint+=1,this},s_.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)};var p_={dump:__,safeDump:function(e,t){return __(e,af.extend({schema:Ff},t))}};function v_(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var m_={Type:df,Schema:vf,FAILSAFE_SCHEMA:mf,JSON_SCHEMA:Tf,CORE_SCHEMA:wf,DEFAULT_SAFE_SCHEMA:Ff,DEFAULT_FULL_SCHEMA:Bf,load:Pd.load,loadAll:Pd.loadAll,safeLoad:Pd.safeLoad,safeLoadAll:Pd.safeLoadAll,dump:p_.dump,safeDump:p_.safeDump,YAMLException:lf,MINIMAL_SCHEMA:mf,SAFE_SCHEMA:Ff,DEFAULT_SCHEMA:Bf,scan:v_("scan"),parse:v_("parse"),compose:v_("compose"),addConstructor:v_("addConstructor")},g_=function(){function r(e,t){var i=2= "+a)}return b_(r.join(" && "))}function S_(e,t){var i=[];if("function"==typeof e)return[b_(e.toString()+"(context)")];if(Array.isArray(e))return[E_(0,e,t)];if(null==e)return["true"];for(var r,n=Object.keys(e),o=0;ot&&(t=e[n].length);if(0===t)return null;for(var o={visible:!0},a=function(t){if(r=[],e.forEach(function(e){e[t]&&e[t][i]&&-1===r.indexOf(e[t][i])&&r.push(e[t][i])}),0===r.length)return"continue";r.sort(function(e,t){return(e&&e.layer_name)>(t&&t.layer_name)?1:-1}),fl.apply(void 0,[o].concat(Pr(r))),delete o.layer_name},s=0;sthis.max_proxy_ancestor_depth)){if(r>n.max_coord_zoom){var a=this.sourceTiles(i,n);if(a)for(var s=r-1;s>=n.max_coord_zoom;s--)if(a[s]&&a[s].loaded)return a[s];r=n.max_coord_zoom}r--;var l=aa.coordinateAtZoom(i,i.z-1),u=this.sourceTiles(l,n);return u&&u[r]&&u[r].loaded?u[r]:0=n.max_coord_zoom){var s=this.sourceTiles(i,n);if(s)for(var l=Math.max(Jr.default_view_max_zoom,r+this.max_proxy_descendant_depth),u=r+1;u<=l;u++)if(s[u]&&s[u].loaded)return a.push(s[u]),a;return a}if(this.coords[i.key]&&0