vue-geojson-view-ts 1.3.15 → 1.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- (function(ye,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],X):(ye=typeof globalThis<"u"?globalThis:ye||self,X(ye.vueGeojsonViewTs={},ye.Vue))})(this,function(ye,X){"use strict";var je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ua(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Oh(r){if(r.__esModule)return r;var t=r.default;if(typeof t=="function"){var e=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),e}var Fh={exports:{}};function vg(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var da={exports:{}};const xg=Oh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var zh;function Nh(){return zh||(zh=1,function(r,t){(function(e,n){r.exports=n()})(je,function(){var e=e||function(n,i){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof je<"u"&&je.crypto&&(s=je.crypto),!s&&typeof vg=="function")try{s=xg}catch{}var a=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},h=Object.create||function(){function y(){}return function(x){var C;return y.prototype=x,C=new y,y.prototype=null,C}}(),c={},d=c.lib={},f=d.Base=function(){return{extend:function(y){var x=h(this);return y&&x.mixIn(y),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var x in y)y.hasOwnProperty(x)&&(this[x]=y[x]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=d.WordArray=f.extend({init:function(y,x){y=this.words=y||[],x!=i?this.sigBytes=x:this.sigBytes=y.length*4},toString:function(y){return(y||v).stringify(this)},concat:function(y){var x=this.words,C=y.words,T=this.sigBytes,k=y.sigBytes;if(this.clamp(),T%4)for(var R=0;R<k;R++){var I=C[R>>>2]>>>24-R%4*8&255;x[T+R>>>2]|=I<<24-(T+R)%4*8}else for(var z=0;z<k;z+=4)x[T+z>>>2]=C[z>>>2];return this.sigBytes+=k,this},clamp:function(){var y=this.words,x=this.sigBytes;y[x>>>2]&=4294967295<<32-x%4*8,y.length=n.ceil(x/4)},clone:function(){var y=f.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var x=[],C=0;C<y;C+=4)x.push(a());return new p.init(x,y)}}),m=c.enc={},v=m.Hex={stringify:function(y){for(var x=y.words,C=y.sigBytes,T=[],k=0;k<C;k++){var R=x[k>>>2]>>>24-k%4*8&255;T.push((R>>>4).toString(16)),T.push((R&15).toString(16))}return T.join("")},parse:function(y){for(var x=y.length,C=[],T=0;T<x;T+=2)C[T>>>3]|=parseInt(y.substr(T,2),16)<<24-T%8*4;return new p.init(C,x/2)}},E=m.Latin1={stringify:function(y){for(var x=y.words,C=y.sigBytes,T=[],k=0;k<C;k++){var R=x[k>>>2]>>>24-k%4*8&255;T.push(String.fromCharCode(R))}return T.join("")},parse:function(y){for(var x=y.length,C=[],T=0;T<x;T++)C[T>>>2]|=(y.charCodeAt(T)&255)<<24-T%4*8;return new p.init(C,x)}},b=m.Utf8={stringify:function(y){try{return decodeURIComponent(escape(E.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return E.parse(unescape(encodeURIComponent(y)))}},M=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=b.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var x,C=this._data,T=C.words,k=C.sigBytes,R=this.blockSize,I=R*4,z=k/I;y?z=n.ceil(z):z=n.max((z|0)-this._minBufferSize,0);var G=z*R,j=n.min(G*4,k);if(G){for(var W=0;W<G;W+=R)this._doProcessBlock(T,W);x=T.splice(0,G),C.sigBytes-=j}return new p.init(x,j)},clone:function(){var y=f.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});d.Hasher=M.extend({cfg:f.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){M.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(y){return function(x,C){return new y.init(C).finalize(x)}},_createHmacHelper:function(y){return function(x,C){return new S.HMAC.init(y,C).finalize(x)}}});var S=c.algo={};return c}(Math);return e})}(da)),da.exports}(function(r,t){(function(e,n){r.exports=n(Nh())})(je,function(e){return function(){var n=e,i=n.lib,s=i.WordArray,a=n.enc;a.Base64={stringify:function(c){var d=c.words,f=c.sigBytes,p=this._map;c.clamp();for(var m=[],v=0;v<f;v+=3)for(var E=d[v>>>2]>>>24-v%4*8&255,b=d[v+1>>>2]>>>24-(v+1)%4*8&255,M=d[v+2>>>2]>>>24-(v+2)%4*8&255,S=E<<16|b<<8|M,y=0;y<4&&v+y*.75<f;y++)m.push(p.charAt(S>>>6*(3-y)&63));var x=p.charAt(64);if(x)for(;m.length%4;)m.push(x);return m.join("")},parse:function(c){var d=c.length,f=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var m=0;m<f.length;m++)p[f.charCodeAt(m)]=m}var v=f.charAt(64);if(v){var E=c.indexOf(v);E!==-1&&(d=E)}return h(c,d,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function h(c,d,f){for(var p=[],m=0,v=0;v<d;v++)if(v%4){var E=f[c.charCodeAt(v-1)]<<v%4*2,b=f[c.charCodeAt(v)]>>>6-v%4*2,M=E|b;p[m>>>2]|=M<<24-m%4*8,m++}return s.create(p,m)}}(),e.enc.Base64})})(Fh);var wg=Fh.exports;const fa=ua(wg);var Bh={exports:{}};(function(r,t){(function(e,n){r.exports=n(Nh())})(je,function(e){return e.enc.Utf8})})(Bh);var Eg=Bh.exports;const Gh=ua(Eg),Lg=(r,t)=>{localStorage.setItem(r,fa.stringify(Gh.parse(t)))},ps=r=>{const t=localStorage.getItem(r);return t?fa.parse(t).toString(Gh):null},Uh=r=>{const t=localStorage.getItem(r);return t?fa.parse(t):null},_s=r=>{localStorage.removeItem(r)};function bg(){const r=document.createElement("div");return r.className="loading-overlay",r.innerHTML="Recuperando Datos de Google Maps",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%",r.style.backgroundColor="rgba(255, 255, 255)",r.style.display="flex",r.style.justifyContent="center",r.style.alignItems="center",r.style.color="#000",r.style.fontSize="24px",r.style.zIndex="999999",document.body.appendChild(r),r}function Cg(r){r&&r.remove()}const Tg=()=>{const t=window.location.href.split("?")[1],e=new URLSearchParams(t),n=Object.fromEntries(e.entries());if(n.coordinates){const i=bg();setTimeout(function(){Lg("coordinates",n.coordinates.replace("#/",""))},4e3),setTimeout(function(){window.close(),Cg(i)},5e3)}},Mg=async()=>{window.open("https://www.google.com/maps/?hl=es","Iniciar Sesion Ciudadania Digital","width=700,height=700,resizable=no"),_s("coordinates"),_s("closePopup");var r=!1;const t=setInterval(function(){let i=ps("coordinates"),s=Uh("closePopup");(i||s)&&(clearInterval(t),r=!0)},1e3);await(async()=>{for(;!r;)await new Promise(i=>setTimeout(i,100));return!0})();let n=ps("coordinates");if(n){const i=JSON.parse(n);return[parseFloat(i.lat),parseFloat(i.long),parseFloat(i.z)]}},Sg=async r=>{window.open(`http://maps.google.com/?q=${r}`,"Iniciar Sesion Ciudadania Digital","width=700,height=700,resizable=no"),_s("coordinates"),_s("closePopup");var t=!1;const e=setInterval(function(){let s=ps("coordinates"),a=Uh("closePopup");(s||a)&&(clearInterval(e),t=!0)},1e3);await(async()=>{for(;!t;)await new Promise(s=>setTimeout(s,100));return!0})();let i=ps("coordinates");if(i){const s=JSON.parse(i);return[parseFloat(s.lat),parseFloat(s.long),parseFloat(s.z)]}},ms="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=";var ys={exports:{}};/* @preserve
1
+ (function(ye,X){typeof exports=="object"&&typeof module<"u"?X(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],X):(ye=typeof globalThis<"u"?globalThis:ye||self,X(ye.vueGeojsonViewTs={},ye.Vue))})(this,function(ye,X){"use strict";var je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ua(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function Oh(r){if(r.__esModule)return r;var t=r.default;if(typeof t=="function"){var e=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),e}var Fh={exports:{}};function vg(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var da={exports:{}};const xg=Oh(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var zh;function Nh(){return zh||(zh=1,function(r,t){(function(e,n){r.exports=n()})(je,function(){var e=e||function(n,i){var s;if(typeof window<"u"&&window.crypto&&(s=window.crypto),typeof self<"u"&&self.crypto&&(s=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(s=globalThis.crypto),!s&&typeof window<"u"&&window.msCrypto&&(s=window.msCrypto),!s&&typeof je<"u"&&je.crypto&&(s=je.crypto),!s&&typeof vg=="function")try{s=xg}catch{}var a=function(){if(s){if(typeof s.getRandomValues=="function")try{return s.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof s.randomBytes=="function")try{return s.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},h=Object.create||function(){function y(){}return function(x){var b;return y.prototype=x,b=new y,y.prototype=null,b}}(),c={},d=c.lib={},f=d.Base=function(){return{extend:function(y){var x=h(this);return y&&x.mixIn(y),(!x.hasOwnProperty("init")||this.init===x.init)&&(x.init=function(){x.$super.init.apply(this,arguments)}),x.init.prototype=x,x.$super=this,x},create:function(){var y=this.extend();return y.init.apply(y,arguments),y},init:function(){},mixIn:function(y){for(var x in y)y.hasOwnProperty(x)&&(this[x]=y[x]);y.hasOwnProperty("toString")&&(this.toString=y.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),p=d.WordArray=f.extend({init:function(y,x){y=this.words=y||[],x!=i?this.sigBytes=x:this.sigBytes=y.length*4},toString:function(y){return(y||v).stringify(this)},concat:function(y){var x=this.words,b=y.words,T=this.sigBytes,k=y.sigBytes;if(this.clamp(),T%4)for(var R=0;R<k;R++){var I=b[R>>>2]>>>24-R%4*8&255;x[T+R>>>2]|=I<<24-(T+R)%4*8}else for(var z=0;z<k;z+=4)x[T+z>>>2]=b[z>>>2];return this.sigBytes+=k,this},clamp:function(){var y=this.words,x=this.sigBytes;y[x>>>2]&=4294967295<<32-x%4*8,y.length=n.ceil(x/4)},clone:function(){var y=f.clone.call(this);return y.words=this.words.slice(0),y},random:function(y){for(var x=[],b=0;b<y;b+=4)x.push(a());return new p.init(x,y)}}),m=c.enc={},v=m.Hex={stringify:function(y){for(var x=y.words,b=y.sigBytes,T=[],k=0;k<b;k++){var R=x[k>>>2]>>>24-k%4*8&255;T.push((R>>>4).toString(16)),T.push((R&15).toString(16))}return T.join("")},parse:function(y){for(var x=y.length,b=[],T=0;T<x;T+=2)b[T>>>3]|=parseInt(y.substr(T,2),16)<<24-T%8*4;return new p.init(b,x/2)}},E=m.Latin1={stringify:function(y){for(var x=y.words,b=y.sigBytes,T=[],k=0;k<b;k++){var R=x[k>>>2]>>>24-k%4*8&255;T.push(String.fromCharCode(R))}return T.join("")},parse:function(y){for(var x=y.length,b=[],T=0;T<x;T++)b[T>>>2]|=(y.charCodeAt(T)&255)<<24-T%4*8;return new p.init(b,x)}},C=m.Utf8={stringify:function(y){try{return decodeURIComponent(escape(E.stringify(y)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(y){return E.parse(unescape(encodeURIComponent(y)))}},M=d.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new p.init,this._nDataBytes=0},_append:function(y){typeof y=="string"&&(y=C.parse(y)),this._data.concat(y),this._nDataBytes+=y.sigBytes},_process:function(y){var x,b=this._data,T=b.words,k=b.sigBytes,R=this.blockSize,I=R*4,z=k/I;y?z=n.ceil(z):z=n.max((z|0)-this._minBufferSize,0);var G=z*R,j=n.min(G*4,k);if(G){for(var W=0;W<G;W+=R)this._doProcessBlock(T,W);x=T.splice(0,G),b.sigBytes-=j}return new p.init(x,j)},clone:function(){var y=f.clone.call(this);return y._data=this._data.clone(),y},_minBufferSize:0});d.Hasher=M.extend({cfg:f.extend(),init:function(y){this.cfg=this.cfg.extend(y),this.reset()},reset:function(){M.reset.call(this),this._doReset()},update:function(y){return this._append(y),this._process(),this},finalize:function(y){y&&this._append(y);var x=this._doFinalize();return x},blockSize:16,_createHelper:function(y){return function(x,b){return new y.init(b).finalize(x)}},_createHmacHelper:function(y){return function(x,b){return new S.HMAC.init(y,b).finalize(x)}}});var S=c.algo={};return c}(Math);return e})}(da)),da.exports}(function(r,t){(function(e,n){r.exports=n(Nh())})(je,function(e){return function(){var n=e,i=n.lib,s=i.WordArray,a=n.enc;a.Base64={stringify:function(c){var d=c.words,f=c.sigBytes,p=this._map;c.clamp();for(var m=[],v=0;v<f;v+=3)for(var E=d[v>>>2]>>>24-v%4*8&255,C=d[v+1>>>2]>>>24-(v+1)%4*8&255,M=d[v+2>>>2]>>>24-(v+2)%4*8&255,S=E<<16|C<<8|M,y=0;y<4&&v+y*.75<f;y++)m.push(p.charAt(S>>>6*(3-y)&63));var x=p.charAt(64);if(x)for(;m.length%4;)m.push(x);return m.join("")},parse:function(c){var d=c.length,f=this._map,p=this._reverseMap;if(!p){p=this._reverseMap=[];for(var m=0;m<f.length;m++)p[f.charCodeAt(m)]=m}var v=f.charAt(64);if(v){var E=c.indexOf(v);E!==-1&&(d=E)}return h(c,d,p)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function h(c,d,f){for(var p=[],m=0,v=0;v<d;v++)if(v%4){var E=f[c.charCodeAt(v-1)]<<v%4*2,C=f[c.charCodeAt(v)]>>>6-v%4*2,M=E|C;p[m>>>2]|=M<<24-m%4*8,m++}return s.create(p,m)}}(),e.enc.Base64})})(Fh);var wg=Fh.exports;const fa=ua(wg);var Bh={exports:{}};(function(r,t){(function(e,n){r.exports=n(Nh())})(je,function(e){return e.enc.Utf8})})(Bh);var Eg=Bh.exports;const Gh=ua(Eg),Lg=(r,t)=>{localStorage.setItem(r,fa.stringify(Gh.parse(t)))},ps=r=>{const t=localStorage.getItem(r);return t?fa.parse(t).toString(Gh):null},Uh=r=>{const t=localStorage.getItem(r);return t?fa.parse(t):null},_s=r=>{localStorage.removeItem(r)};function bg(){const r=document.createElement("div");return r.className="loading-overlay",r.innerHTML="Recuperando Datos de Google Maps",r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.width="100%",r.style.height="100%",r.style.backgroundColor="rgba(255, 255, 255)",r.style.display="flex",r.style.justifyContent="center",r.style.alignItems="center",r.style.color="#000",r.style.fontSize="24px",r.style.zIndex="999999",document.body.appendChild(r),r}function Cg(r){r&&r.remove()}const Tg=()=>{const t=window.location.href.split("?")[1],e=new URLSearchParams(t),n=Object.fromEntries(e.entries());if(n.coordinates){const i=bg();setTimeout(function(){Lg("coordinates",n.coordinates.replace("#/",""))},4e3),setTimeout(function(){window.close(),Cg(i)},5e3)}},Mg=async()=>{window.open("https://www.google.com/maps/?hl=es","Iniciar Sesion Ciudadania Digital","width=700,height=700,resizable=no"),_s("coordinates"),_s("closePopup");var r=!1;const t=setInterval(function(){let i=ps("coordinates"),s=Uh("closePopup");(i||s)&&(clearInterval(t),r=!0)},1e3);await(async()=>{for(;!r;)await new Promise(i=>setTimeout(i,100));return!0})();let n=ps("coordinates");if(n){const i=JSON.parse(n);return[parseFloat(i.lat),parseFloat(i.long),parseFloat(i.z)]}},Sg=async r=>{window.open(`http://maps.google.com/?q=${r}`,"Iniciar Sesion Ciudadania Digital","width=700,height=700,resizable=no"),_s("coordinates"),_s("closePopup");var t=!1;const e=setInterval(function(){let s=ps("coordinates"),a=Uh("closePopup");(s||a)&&(clearInterval(e),t=!0)},1e3);await(async()=>{for(;!t;)await new Promise(s=>setTimeout(s,100));return!0})();let i=ps("coordinates");if(i){const s=JSON.parse(i);return[parseFloat(s.lat),parseFloat(s.long),parseFloat(s.z)]}},ms="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=";var ys={exports:{}};/* @preserve
2
2
  * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
3
3
  * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
4
- */var jh;function Zh(){return jh||(jh=1,function(r,t){(function(e,n){n(t)})(je,function(e){var n="1.9.4";function i(o){var l,u,g,_;for(u=1,g=arguments.length;u<g;u++){_=arguments[u];for(l in _)o[l]=_[l]}return o}var s=Object.create||function(){function o(){}return function(l){return o.prototype=l,new o}}();function a(o,l){var u=Array.prototype.slice;if(o.bind)return o.bind.apply(o,u.call(arguments,1));var g=u.call(arguments,2);return function(){return o.apply(l,g.length?g.concat(u.call(arguments)):arguments)}}var h=0;function c(o){return"_leaflet_id"in o||(o._leaflet_id=++h),o._leaflet_id}function d(o,l,u){var g,_,w,P;return P=function(){g=!1,_&&(w.apply(u,_),_=!1)},w=function(){g?_=arguments:(o.apply(u,arguments),setTimeout(P,l),g=!0)},w}function f(o,l,u){var g=l[1],_=l[0],w=g-_;return o===g&&u?o:((o-_)%w+w)%w+_}function p(){return!1}function m(o,l){if(l===!1)return o;var u=Math.pow(10,l===void 0?6:l);return Math.round(o*u)/u}function v(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function E(o){return v(o).split(/\s+/)}function b(o,l){Object.prototype.hasOwnProperty.call(o,"options")||(o.options=o.options?s(o.options):{});for(var u in l)o.options[u]=l[u];return o.options}function M(o,l,u){var g=[];for(var _ in o)g.push(encodeURIComponent(u?_.toUpperCase():_)+"="+encodeURIComponent(o[_]));return(!l||l.indexOf("?")===-1?"?":"&")+g.join("&")}var S=/\{ *([\w_ -]+) *\}/g;function y(o,l){return o.replace(S,function(u,g){var _=l[g];if(_===void 0)throw new Error("No value provided for variable "+u);return typeof _=="function"&&(_=_(l)),_})}var x=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};function C(o,l){for(var u=0;u<o.length;u++)if(o[u]===l)return u;return-1}var T="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function k(o){return window["webkit"+o]||window["moz"+o]||window["ms"+o]}var R=0;function I(o){var l=+new Date,u=Math.max(0,16-(l-R));return R=l+u,window.setTimeout(o,u)}var z=window.requestAnimationFrame||k("RequestAnimationFrame")||I,G=window.cancelAnimationFrame||k("CancelAnimationFrame")||k("CancelRequestAnimationFrame")||function(o){window.clearTimeout(o)};function j(o,l,u){if(u&&z===I)o.call(l);else return z.call(window,a(o,l))}function W(o){o&&G.call(window,o)}var Y={__proto__:null,extend:i,create:s,bind:a,get lastId(){return h},stamp:c,throttle:d,wrapNum:f,falseFn:p,formatNum:m,trim:v,splitWords:E,setOptions:b,getParamString:M,template:y,isArray:x,indexOf:C,emptyImageUrl:T,requestFn:z,cancelFn:G,requestAnimFrame:j,cancelAnimFrame:W};function $(){}$.extend=function(o){var l=function(){b(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},u=l.__super__=this.prototype,g=s(u);g.constructor=l,l.prototype=g;for(var _ in this)Object.prototype.hasOwnProperty.call(this,_)&&_!=="prototype"&&_!=="__super__"&&(l[_]=this[_]);return o.statics&&i(l,o.statics),o.includes&&(K(o.includes),i.apply(null,[g].concat(o.includes))),i(g,o),delete g.statics,delete g.includes,g.options&&(g.options=u.options?s(u.options):{},i(g.options,o.options)),g._initHooks=[],g.callInitHooks=function(){if(!this._initHooksCalled){u.callInitHooks&&u.callInitHooks.call(this),this._initHooksCalled=!0;for(var w=0,P=g._initHooks.length;w<P;w++)g._initHooks[w].call(this)}},l},$.include=function(o){var l=this.prototype.options;return i(this.prototype,o),o.options&&(this.prototype.options=l,this.mergeOptions(o.options)),this},$.mergeOptions=function(o){return i(this.prototype.options,o),this},$.addInitHook=function(o){var l=Array.prototype.slice.call(arguments,1),u=typeof o=="function"?o:function(){this[o].apply(this,l)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(u),this};function K(o){if(!(typeof L>"u"||!L||!L.Mixin)){o=x(o)?o:[o];for(var l=0;l<o.length;l++)o[l]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var V={on:function(o,l,u){if(typeof o=="object")for(var g in o)this._on(g,o[g],l);else{o=E(o);for(var _=0,w=o.length;_<w;_++)this._on(o[_],l,u)}return this},off:function(o,l,u){if(!arguments.length)delete this._events;else if(typeof o=="object")for(var g in o)this._off(g,o[g],l);else{o=E(o);for(var _=arguments.length===1,w=0,P=o.length;w<P;w++)_?this._off(o[w]):this._off(o[w],l,u)}return this},_on:function(o,l,u,g){if(typeof l!="function"){console.warn("wrong listener type: "+typeof l);return}if(this._listens(o,l,u)===!1){u===this&&(u=void 0);var _={fn:l,ctx:u};g&&(_.once=!0),this._events=this._events||{},this._events[o]=this._events[o]||[],this._events[o].push(_)}},_off:function(o,l,u){var g,_,w;if(this._events&&(g=this._events[o],!!g)){if(arguments.length===1){if(this._firingCount)for(_=0,w=g.length;_<w;_++)g[_].fn=p;delete this._events[o];return}if(typeof l!="function"){console.warn("wrong listener type: "+typeof l);return}var P=this._listens(o,l,u);if(P!==!1){var A=g[P];this._firingCount&&(A.fn=p,this._events[o]=g=g.slice()),g.splice(P,1)}}},fire:function(o,l,u){if(!this.listens(o,u))return this;var g=i({},l,{type:o,target:this,sourceTarget:l&&l.sourceTarget||this});if(this._events){var _=this._events[o];if(_){this._firingCount=this._firingCount+1||1;for(var w=0,P=_.length;w<P;w++){var A=_[w],D=A.fn;A.once&&this.off(o,D,A.ctx),D.call(A.ctx||this,g)}this._firingCount--}}return u&&this._propagateEvent(g),this},listens:function(o,l,u,g){typeof o!="string"&&console.warn('"string" type argument expected');var _=l;typeof l!="function"&&(g=!!l,_=void 0,u=void 0);var w=this._events&&this._events[o];if(w&&w.length&&this._listens(o,_,u)!==!1)return!0;if(g){for(var P in this._eventParents)if(this._eventParents[P].listens(o,l,u,g))return!0}return!1},_listens:function(o,l,u){if(!this._events)return!1;var g=this._events[o]||[];if(!l)return!!g.length;u===this&&(u=void 0);for(var _=0,w=g.length;_<w;_++)if(g[_].fn===l&&g[_].ctx===u)return _;return!1},once:function(o,l,u){if(typeof o=="object")for(var g in o)this._on(g,o[g],l,!0);else{o=E(o);for(var _=0,w=o.length;_<w;_++)this._on(o[_],l,u,!0)}return this},addEventParent:function(o){return this._eventParents=this._eventParents||{},this._eventParents[c(o)]=o,this},removeEventParent:function(o){return this._eventParents&&delete this._eventParents[c(o)],this},_propagateEvent:function(o){for(var l in this._eventParents)this._eventParents[l].fire(o.type,i({layer:o.target,propagatedFrom:o.target},o),!0)}};V.addEventListener=V.on,V.removeEventListener=V.clearAllEventListeners=V.off,V.addOneTimeEventListener=V.once,V.fireEvent=V.fire,V.hasEventListeners=V.listens;var Z=$.extend(V);function U(o,l,u){this.x=u?Math.round(o):o,this.y=u?Math.round(l):l}var xt=Math.trunc||function(o){return o>0?Math.floor(o):Math.ceil(o)};U.prototype={clone:function(){return new U(this.x,this.y)},add:function(o){return this.clone()._add(H(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(H(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new U(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new U(this.x/o.x,this.y/o.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=xt(this.x),this.y=xt(this.y),this},distanceTo:function(o){o=H(o);var l=o.x-this.x,u=o.y-this.y;return Math.sqrt(l*l+u*u)},equals:function(o){return o=H(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=H(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+m(this.x)+", "+m(this.y)+")"}};function H(o,l,u){return o instanceof U?o:x(o)?new U(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new U(o.x,o.y):new U(o,l,u)}function at(o,l){if(o)for(var u=l?[o,l]:o,g=0,_=u.length;g<_;g++)this.extend(u[g])}at.prototype={extend:function(o){var l,u;if(!o)return this;if(o instanceof U||typeof o[0]=="number"||"x"in o)l=u=H(o);else if(o=F(o),l=o.min,u=o.max,!l||!u)return this;return!this.min&&!this.max?(this.min=l.clone(),this.max=u.clone()):(this.min.x=Math.min(l.x,this.min.x),this.max.x=Math.max(u.x,this.max.x),this.min.y=Math.min(l.y,this.min.y),this.max.y=Math.max(u.y,this.max.y)),this},getCenter:function(o){return H((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,o)},getBottomLeft:function(){return H(this.min.x,this.max.y)},getTopRight:function(){return H(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(o){var l,u;return typeof o[0]=="number"||o instanceof U?o=H(o):o=F(o),o instanceof at?(l=o.min,u=o.max):l=u=o,l.x>=this.min.x&&u.x<=this.max.x&&l.y>=this.min.y&&u.y<=this.max.y},intersects:function(o){o=F(o);var l=this.min,u=this.max,g=o.min,_=o.max,w=_.x>=l.x&&g.x<=u.x,P=_.y>=l.y&&g.y<=u.y;return w&&P},overlaps:function(o){o=F(o);var l=this.min,u=this.max,g=o.min,_=o.max,w=_.x>l.x&&g.x<u.x,P=_.y>l.y&&g.y<u.y;return w&&P},isValid:function(){return!!(this.min&&this.max)},pad:function(o){var l=this.min,u=this.max,g=Math.abs(l.x-u.x)*o,_=Math.abs(l.y-u.y)*o;return F(H(l.x-g,l.y-_),H(u.x+g,u.y+_))},equals:function(o){return o?(o=F(o),this.min.equals(o.getTopLeft())&&this.max.equals(o.getBottomRight())):!1}};function F(o,l){return!o||o instanceof at?o:new at(o,l)}function wt(o,l){if(o)for(var u=l?[o,l]:o,g=0,_=u.length;g<_;g++)this.extend(u[g])}wt.prototype={extend:function(o){var l=this._southWest,u=this._northEast,g,_;if(o instanceof it)g=o,_=o;else if(o instanceof wt){if(g=o._southWest,_=o._northEast,!g||!_)return this}else return o?this.extend(ht(o)||et(o)):this;return!l&&!u?(this._southWest=new it(g.lat,g.lng),this._northEast=new it(_.lat,_.lng)):(l.lat=Math.min(g.lat,l.lat),l.lng=Math.min(g.lng,l.lng),u.lat=Math.max(_.lat,u.lat),u.lng=Math.max(_.lng,u.lng)),this},pad:function(o){var l=this._southWest,u=this._northEast,g=Math.abs(l.lat-u.lat)*o,_=Math.abs(l.lng-u.lng)*o;return new wt(new it(l.lat-g,l.lng-_),new it(u.lat+g,u.lng+_))},getCenter:function(){return new it((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new it(this.getNorth(),this.getWest())},getSouthEast:function(){return new it(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(o){typeof o[0]=="number"||o instanceof it||"lat"in o?o=ht(o):o=et(o);var l=this._southWest,u=this._northEast,g,_;return o instanceof wt?(g=o.getSouthWest(),_=o.getNorthEast()):g=_=o,g.lat>=l.lat&&_.lat<=u.lat&&g.lng>=l.lng&&_.lng<=u.lng},intersects:function(o){o=et(o);var l=this._southWest,u=this._northEast,g=o.getSouthWest(),_=o.getNorthEast(),w=_.lat>=l.lat&&g.lat<=u.lat,P=_.lng>=l.lng&&g.lng<=u.lng;return w&&P},overlaps:function(o){o=et(o);var l=this._southWest,u=this._northEast,g=o.getSouthWest(),_=o.getNorthEast(),w=_.lat>l.lat&&g.lat<u.lat,P=_.lng>l.lng&&g.lng<u.lng;return w&&P},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(o,l){return o?(o=et(o),this._southWest.equals(o.getSouthWest(),l)&&this._northEast.equals(o.getNorthEast(),l)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function et(o,l){return o instanceof wt?o:new wt(o,l)}function it(o,l,u){if(isNaN(o)||isNaN(l))throw new Error("Invalid LatLng object: ("+o+", "+l+")");this.lat=+o,this.lng=+l,u!==void 0&&(this.alt=+u)}it.prototype={equals:function(o,l){if(!o)return!1;o=ht(o);var u=Math.max(Math.abs(this.lat-o.lat),Math.abs(this.lng-o.lng));return u<=(l===void 0?1e-9:l)},toString:function(o){return"LatLng("+m(this.lat,o)+", "+m(this.lng,o)+")"},distanceTo:function(o){return Xt.distance(this,ht(o))},wrap:function(){return Xt.wrapLatLng(this)},toBounds:function(o){var l=180*o/40075017,u=l/Math.cos(Math.PI/180*this.lat);return et([this.lat-l,this.lng-u],[this.lat+l,this.lng+u])},clone:function(){return new it(this.lat,this.lng,this.alt)}};function ht(o,l,u){return o instanceof it?o:x(o)&&typeof o[0]!="object"?o.length===3?new it(o[0],o[1],o[2]):o.length===2?new it(o[0],o[1]):null:o==null?o:typeof o=="object"&&"lat"in o?new it(o.lat,"lng"in o?o.lng:o.lon,o.alt):l===void 0?null:new it(o,l,u)}var kt={latLngToPoint:function(o,l){var u=this.projection.project(o),g=this.scale(l);return this.transformation._transform(u,g)},pointToLatLng:function(o,l){var u=this.scale(l),g=this.transformation.untransform(o,u);return this.projection.unproject(g)},project:function(o){return this.projection.project(o)},unproject:function(o){return this.projection.unproject(o)},scale:function(o){return 256*Math.pow(2,o)},zoom:function(o){return Math.log(o/256)/Math.LN2},getProjectedBounds:function(o){if(this.infinite)return null;var l=this.projection.bounds,u=this.scale(o),g=this.transformation.transform(l.min,u),_=this.transformation.transform(l.max,u);return new at(g,_)},infinite:!1,wrapLatLng:function(o){var l=this.wrapLng?f(o.lng,this.wrapLng,!0):o.lng,u=this.wrapLat?f(o.lat,this.wrapLat,!0):o.lat,g=o.alt;return new it(u,l,g)},wrapLatLngBounds:function(o){var l=o.getCenter(),u=this.wrapLatLng(l),g=l.lat-u.lat,_=l.lng-u.lng;if(g===0&&_===0)return o;var w=o.getSouthWest(),P=o.getNorthEast(),A=new it(w.lat-g,w.lng-_),D=new it(P.lat-g,P.lng-_);return new wt(A,D)}},Xt=i({},kt,{wrapLng:[-180,180],R:6371e3,distance:function(o,l){var u=Math.PI/180,g=o.lat*u,_=l.lat*u,w=Math.sin((l.lat-o.lat)*u/2),P=Math.sin((l.lng-o.lng)*u/2),A=w*w+Math.cos(g)*Math.cos(_)*P*P,D=2*Math.atan2(Math.sqrt(A),Math.sqrt(1-A));return this.R*D}}),Te=6378137,Qe={R:Te,MAX_LATITUDE:85.0511287798,project:function(o){var l=Math.PI/180,u=this.MAX_LATITUDE,g=Math.max(Math.min(u,o.lat),-u),_=Math.sin(g*l);return new U(this.R*o.lng*l,this.R*Math.log((1+_)/(1-_))/2)},unproject:function(o){var l=180/Math.PI;return new it((2*Math.atan(Math.exp(o.y/this.R))-Math.PI/2)*l,o.x*l/this.R)},bounds:function(){var o=Te*Math.PI;return new at([-o,-o],[o,o])}()};function Xi(o,l,u,g){if(x(o)){this._a=o[0],this._b=o[1],this._c=o[2],this._d=o[3];return}this._a=o,this._b=l,this._c=u,this._d=g}Xi.prototype={transform:function(o,l){return this._transform(o.clone(),l)},_transform:function(o,l){return l=l||1,o.x=l*(this._a*o.x+this._b),o.y=l*(this._c*o.y+this._d),o},untransform:function(o,l){return l=l||1,new U((o.x/l-this._b)/this._a,(o.y/l-this._d)/this._c)}};function Me(o,l,u,g){return new Xi(o,l,u,g)}var Yi=i({},Xt,{code:"EPSG:3857",projection:Qe,transformation:function(){var o=.5/(Math.PI*Qe.R);return Me(o,.5,-o,.5)}()}),$e=i({},Yi,{code:"EPSG:900913"});function Ki(o){return document.createElementNS("http://www.w3.org/2000/svg",o)}function Fe(o,l){var u="",g,_,w,P,A,D;for(g=0,w=o.length;g<w;g++){for(A=o[g],_=0,P=A.length;_<P;_++)D=A[_],u+=(_?"L":"M")+D.x+" "+D.y;u+=l?J.svg?"z":"x":""}return u||"M0 0"}var qi=document.documentElement.style,wi="ActiveXObject"in window,rr=wi&&!document.addEventListener,Ei="msLaunchUri"in navigator&&!("documentMode"in document),En=Bt("webkit"),qt=Bt("android"),ae=Bt("android 2")||Bt("android 3"),be=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ze=qt&&Bt("Google")&&be<537&&!("AudioNode"in window),ti=!!window.opera,ei=!Ei&&Bt("chrome"),Ne=Bt("gecko")&&!En&&!ti&&!wi,Ji=!ei&&Bt("safari"),Ln=Bt("phantom"),Yt="OTransition"in qi,$r=navigator.platform.indexOf("Win")===0,jo=wi&&"transition"in qi,ts="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ae,es="MozPerspective"in qi,Zo=!window.L_DISABLE_3D&&(jo||ts||es)&&!Yt&&!Ln,Li=typeof orientation<"u"||Bt("mobile"),Wo=Li&&En,is=Li&&ts,Qi=!window.PointerEvent&&window.MSPointerEvent,$i=!!(window.PointerEvent||Qi),tn="ontouchstart"in window||!!window.TouchEvent,Ho=!window.L_NO_TOUCH&&(tn||$i),Vo=Li&&ti,le=Li&&Ne,en=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,pe=function(){var o=!1;try{var l=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",p,l),window.removeEventListener("testPassiveEventSupport",p,l)}catch{}return o}(),Be=function(){return!!document.createElement("canvas").getContext}(),Jt=!!(document.createElementNS&&Ki("svg").createSVGRect),sr=!!Jt&&function(){var o=document.createElement("div");return o.innerHTML="<svg/>",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),or=!Jt&&function(){try{var o=document.createElement("div");o.innerHTML='<v:shape adj="1"/>';var l=o.firstChild;return l.style.behavior="url(#default#VML)",l&&typeof l.adj=="object"}catch{return!1}}(),se=navigator.platform.indexOf("Mac")===0,_e=navigator.platform.indexOf("Linux")===0;function Bt(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var J={ie:wi,ielt9:rr,edge:Ei,webkit:En,android:qt,android23:ae,androidStock:ze,opera:ti,chrome:ei,gecko:Ne,safari:Ji,phantom:Ln,opera12:Yt,win:$r,ie3d:jo,webkit3d:ts,gecko3d:es,any3d:Zo,mobile:Li,mobileWebkit:Wo,mobileWebkit3d:is,msPointer:Qi,pointer:$i,touch:Ho,touchNative:tn,mobileOpera:Vo,mobileGecko:le,retina:en,passiveEvents:pe,canvas:Be,svg:Jt,vml:or,inlineSvg:sr,mac:se,linux:_e},bf=J.msPointer?"MSPointerDown":"pointerdown",Cf=J.msPointer?"MSPointerMove":"pointermove",Tf=J.msPointer?"MSPointerUp":"pointerup",Mf=J.msPointer?"MSPointerCancel":"pointercancel",hh={touchstart:bf,touchmove:Cf,touchend:Tf,touchcancel:Mf},Sf={touchstart:KE,touchmove:Xo,touchend:Xo,touchcancel:Xo},ar={},Pf=!1;function WE(o,l,u){return l==="touchstart"&&YE(),Sf[l]?(u=Sf[l].bind(this,u),o.addEventListener(hh[l],u,!1),u):(console.warn("wrong event specified:",l),p)}function HE(o,l,u){if(!hh[l]){console.warn("wrong event specified:",l);return}o.removeEventListener(hh[l],u,!1)}function VE(o){ar[o.pointerId]=o}function XE(o){ar[o.pointerId]&&(ar[o.pointerId]=o)}function kf(o){delete ar[o.pointerId]}function YE(){Pf||(document.addEventListener(bf,VE,!0),document.addEventListener(Cf,XE,!0),document.addEventListener(Tf,kf,!0),document.addEventListener(Mf,kf,!0),Pf=!0)}function Xo(o,l){if(l.pointerType!==(l.MSPOINTER_TYPE_MOUSE||"mouse")){l.touches=[];for(var u in ar)l.touches.push(ar[u]);l.changedTouches=[l],o(l)}}function KE(o,l){l.MSPOINTER_TYPE_TOUCH&&l.pointerType===l.MSPOINTER_TYPE_TOUCH&&Qt(l),Xo(o,l)}function qE(o){var l={},u,g;for(g in o)u=o[g],l[g]=u&&u.bind?u.bind(o):u;return o=l,l.type="dblclick",l.detail=2,l.isTrusted=!1,l._simulated=!0,l}var JE=200;function QE(o,l){o.addEventListener("dblclick",l);var u=0,g;function _(w){if(w.detail!==1){g=w.detail;return}if(!(w.pointerType==="mouse"||w.sourceCapabilities&&!w.sourceCapabilities.firesTouchEvents)){var P=Of(w);if(!(P.some(function(D){return D instanceof HTMLLabelElement&&D.attributes.for})&&!P.some(function(D){return D instanceof HTMLInputElement||D instanceof HTMLSelectElement}))){var A=Date.now();A-u<=JE?(g++,g===2&&l(qE(w))):g=1,u=A}}}return o.addEventListener("click",_),{dblclick:l,simDblclick:_}}function $E(o,l){o.removeEventListener("dblclick",l.dblclick),o.removeEventListener("click",l.simDblclick)}var ch=qo(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ns=qo(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Rf=ns==="webkitTransition"||ns==="OTransition"?ns+"End":"transitionend";function Af(o){return typeof o=="string"?document.getElementById(o):o}function rs(o,l){var u=o.style[l]||o.currentStyle&&o.currentStyle[l];if((!u||u==="auto")&&document.defaultView){var g=document.defaultView.getComputedStyle(o,null);u=g?g[l]:null}return u==="auto"?null:u}function Et(o,l,u){var g=document.createElement(o);return g.className=l||"",u&&u.appendChild(g),g}function At(o){var l=o.parentNode;l&&l.removeChild(o)}function Yo(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function lr(o){var l=o.parentNode;l&&l.lastChild!==o&&l.appendChild(o)}function hr(o){var l=o.parentNode;l&&l.firstChild!==o&&l.insertBefore(o,l.firstChild)}function uh(o,l){if(o.classList!==void 0)return o.classList.contains(l);var u=Ko(o);return u.length>0&&new RegExp("(^|\\s)"+l+"(\\s|$)").test(u)}function ft(o,l){if(o.classList!==void 0)for(var u=E(l),g=0,_=u.length;g<_;g++)o.classList.add(u[g]);else if(!uh(o,l)){var w=Ko(o);dh(o,(w?w+" ":"")+l)}}function Ft(o,l){o.classList!==void 0?o.classList.remove(l):dh(o,v((" "+Ko(o)+" ").replace(" "+l+" "," ")))}function dh(o,l){o.className.baseVal===void 0?o.className=l:o.className.baseVal=l}function Ko(o){return o.correspondingElement&&(o=o.correspondingElement),o.className.baseVal===void 0?o.className:o.className.baseVal}function Se(o,l){"opacity"in o.style?o.style.opacity=l:"filter"in o.style&&tL(o,l)}function tL(o,l){var u=!1,g="DXImageTransform.Microsoft.Alpha";try{u=o.filters.item(g)}catch{if(l===1)return}l=Math.round(l*100),u?(u.Enabled=l!==100,u.Opacity=l):o.style.filter+=" progid:"+g+"(opacity="+l+")"}function qo(o){for(var l=document.documentElement.style,u=0;u<o.length;u++)if(o[u]in l)return o[u];return!1}function bn(o,l,u){var g=l||new U(0,0);o.style[ch]=(J.ie3d?"translate("+g.x+"px,"+g.y+"px)":"translate3d("+g.x+"px,"+g.y+"px,0)")+(u?" scale("+u+")":"")}function Gt(o,l){o._leaflet_pos=l,J.any3d?bn(o,l):(o.style.left=l.x+"px",o.style.top=l.y+"px")}function Cn(o){return o._leaflet_pos||new U(0,0)}var ss,os,fh;if("onselectstart"in document)ss=function(){ut(window,"selectstart",Qt)},os=function(){Pt(window,"selectstart",Qt)};else{var as=qo(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ss=function(){if(as){var o=document.documentElement.style;fh=o[as],o[as]="none"}},os=function(){as&&(document.documentElement.style[as]=fh,fh=void 0)}}function gh(){ut(window,"dragstart",Qt)}function ph(){Pt(window,"dragstart",Qt)}var Jo,_h;function mh(o){for(;o.tabIndex===-1;)o=o.parentNode;o.style&&(Qo(),Jo=o,_h=o.style.outlineStyle,o.style.outlineStyle="none",ut(window,"keydown",Qo))}function Qo(){Jo&&(Jo.style.outlineStyle=_h,Jo=void 0,_h=void 0,Pt(window,"keydown",Qo))}function If(o){do o=o.parentNode;while((!o.offsetWidth||!o.offsetHeight)&&o!==document.body);return o}function yh(o){var l=o.getBoundingClientRect();return{x:l.width/o.offsetWidth||1,y:l.height/o.offsetHeight||1,boundingClientRect:l}}var eL={__proto__:null,TRANSFORM:ch,TRANSITION:ns,TRANSITION_END:Rf,get:Af,getStyle:rs,create:Et,remove:At,empty:Yo,toFront:lr,toBack:hr,hasClass:uh,addClass:ft,removeClass:Ft,setClass:dh,getClass:Ko,setOpacity:Se,testProp:qo,setTransform:bn,setPosition:Gt,getPosition:Cn,get disableTextSelection(){return ss},get enableTextSelection(){return os},disableImageDrag:gh,enableImageDrag:ph,preventOutline:mh,restoreOutline:Qo,getSizedParentNode:If,getScale:yh};function ut(o,l,u,g){if(l&&typeof l=="object")for(var _ in l)xh(o,_,l[_],u);else{l=E(l);for(var w=0,P=l.length;w<P;w++)xh(o,l[w],u,g)}return this}var ii="_leaflet_events";function Pt(o,l,u,g){if(arguments.length===1)Df(o),delete o[ii];else if(l&&typeof l=="object")for(var _ in l)wh(o,_,l[_],u);else if(l=E(l),arguments.length===2)Df(o,function(A){return C(l,A)!==-1});else for(var w=0,P=l.length;w<P;w++)wh(o,l[w],u,g);return this}function Df(o,l){for(var u in o[ii]){var g=u.split(/\d/)[0];(!l||l(g))&&wh(o,g,null,null,u)}}var vh={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function xh(o,l,u,g){var _=l+c(u)+(g?"_"+c(g):"");if(o[ii]&&o[ii][_])return this;var w=function(A){return u.call(g||o,A||window.event)},P=w;!J.touchNative&&J.pointer&&l.indexOf("touch")===0?w=WE(o,l,w):J.touch&&l==="dblclick"?w=QE(o,w):"addEventListener"in o?l==="touchstart"||l==="touchmove"||l==="wheel"||l==="mousewheel"?o.addEventListener(vh[l]||l,w,J.passiveEvents?{passive:!1}:!1):l==="mouseenter"||l==="mouseleave"?(w=function(A){A=A||window.event,Lh(o,A)&&P(A)},o.addEventListener(vh[l],w,!1)):o.addEventListener(l,P,!1):o.attachEvent("on"+l,w),o[ii]=o[ii]||{},o[ii][_]=w}function wh(o,l,u,g,_){_=_||l+c(u)+(g?"_"+c(g):"");var w=o[ii]&&o[ii][_];if(!w)return this;!J.touchNative&&J.pointer&&l.indexOf("touch")===0?HE(o,l,w):J.touch&&l==="dblclick"?$E(o,w):"removeEventListener"in o?o.removeEventListener(vh[l]||l,w,!1):o.detachEvent("on"+l,w),o[ii][_]=null}function Tn(o){return o.stopPropagation?o.stopPropagation():o.originalEvent?o.originalEvent._stopped=!0:o.cancelBubble=!0,this}function Eh(o){return xh(o,"wheel",Tn),this}function ls(o){return ut(o,"mousedown touchstart dblclick contextmenu",Tn),o._leaflet_disable_click=!0,this}function Qt(o){return o.preventDefault?o.preventDefault():o.returnValue=!1,this}function Mn(o){return Qt(o),Tn(o),this}function Of(o){if(o.composedPath)return o.composedPath();for(var l=[],u=o.target;u;)l.push(u),u=u.parentNode;return l}function Ff(o,l){if(!l)return new U(o.clientX,o.clientY);var u=yh(l),g=u.boundingClientRect;return new U((o.clientX-g.left)/u.x-l.clientLeft,(o.clientY-g.top)/u.y-l.clientTop)}var iL=J.linux&&J.chrome?window.devicePixelRatio:J.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function zf(o){return J.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/iL:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function Lh(o,l){var u=l.relatedTarget;if(!u)return!0;try{for(;u&&u!==o;)u=u.parentNode}catch{return!1}return u!==o}var nL={__proto__:null,on:ut,off:Pt,stopPropagation:Tn,disableScrollPropagation:Eh,disableClickPropagation:ls,preventDefault:Qt,stop:Mn,getPropagationPath:Of,getMousePosition:Ff,getWheelDelta:zf,isExternalTarget:Lh,addListener:ut,removeListener:Pt},Nf=Z.extend({run:function(o,l,u,g){this.stop(),this._el=o,this._inProgress=!0,this._duration=u||.25,this._easeOutPower=1/Math.max(g||.5,.2),this._startPos=Cn(o),this._offset=l.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=j(this._animate,this),this._step()},_step:function(o){var l=+new Date-this._startTime,u=this._duration*1e3;l<u?this._runFrame(this._easeOut(l/u),o):(this._runFrame(1),this._complete())},_runFrame:function(o,l){var u=this._startPos.add(this._offset.multiplyBy(o));l&&u._round(),Gt(this._el,u),this.fire("step")},_complete:function(){W(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(o){return 1-Math.pow(1-o,this._easeOutPower)}}),yt=Z.extend({options:{crs:Yi,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(o,l){l=b(this,l),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(o),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),l.maxBounds&&this.setMaxBounds(l.maxBounds),l.zoom!==void 0&&(this._zoom=this._limitZoom(l.zoom)),l.center&&l.zoom!==void 0&&this.setView(ht(l.center),l.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ns&&J.any3d&&!J.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ut(this._proxy,Rf,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(o,l,u){if(l=l===void 0?this._zoom:this._limitZoom(l),o=this._limitCenter(ht(o),l,this.options.maxBounds),u=u||{},this._stop(),this._loaded&&!u.reset&&u!==!0){u.animate!==void 0&&(u.zoom=i({animate:u.animate},u.zoom),u.pan=i({animate:u.animate,duration:u.duration},u.pan));var g=this._zoom!==l?this._tryAnimatedZoom&&this._tryAnimatedZoom(o,l,u.zoom):this._tryAnimatedPan(o,u.pan);if(g)return clearTimeout(this._sizeTimer),this}return this._resetView(o,l,u.pan&&u.pan.noMoveStart),this},setZoom:function(o,l){return this._loaded?this.setView(this.getCenter(),o,{zoom:l}):(this._zoom=o,this)},zoomIn:function(o,l){return o=o||(J.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+o,l)},zoomOut:function(o,l){return o=o||(J.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-o,l)},setZoomAround:function(o,l,u){var g=this.getZoomScale(l),_=this.getSize().divideBy(2),w=o instanceof U?o:this.latLngToContainerPoint(o),P=w.subtract(_).multiplyBy(1-1/g),A=this.containerPointToLatLng(_.add(P));return this.setView(A,l,{zoom:u})},_getBoundsCenterZoom:function(o,l){l=l||{},o=o.getBounds?o.getBounds():et(o);var u=H(l.paddingTopLeft||l.padding||[0,0]),g=H(l.paddingBottomRight||l.padding||[0,0]),_=this.getBoundsZoom(o,!1,u.add(g));if(_=typeof l.maxZoom=="number"?Math.min(l.maxZoom,_):_,_===1/0)return{center:o.getCenter(),zoom:_};var w=g.subtract(u).divideBy(2),P=this.project(o.getSouthWest(),_),A=this.project(o.getNorthEast(),_),D=this.unproject(P.add(A).divideBy(2).add(w),_);return{center:D,zoom:_}},fitBounds:function(o,l){if(o=et(o),!o.isValid())throw new Error("Bounds are not valid.");var u=this._getBoundsCenterZoom(o,l);return this.setView(u.center,u.zoom,l)},fitWorld:function(o){return this.fitBounds([[-90,-180],[90,180]],o)},panTo:function(o,l){return this.setView(o,this._zoom,{pan:l})},panBy:function(o,l){if(o=H(o).round(),l=l||{},!o.x&&!o.y)return this.fire("moveend");if(l.animate!==!0&&!this.getSize().contains(o))return this._resetView(this.unproject(this.project(this.getCenter()).add(o)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Nf,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),l.noMoveStart||this.fire("movestart"),l.animate!==!1){ft(this._mapPane,"leaflet-pan-anim");var u=this._getMapPanePos().subtract(o).round();this._panAnim.run(this._mapPane,u,l.duration||.25,l.easeLinearity)}else this._rawPanBy(o),this.fire("move").fire("moveend");return this},flyTo:function(o,l,u){if(u=u||{},u.animate===!1||!J.any3d)return this.setView(o,l,u);this._stop();var g=this.project(this.getCenter()),_=this.project(o),w=this.getSize(),P=this._zoom;o=ht(o),l=l===void 0?P:l;var A=Math.max(w.x,w.y),D=A*this.getZoomScale(P,l),B=_.distanceTo(g)||1,q=1.42,st=q*q;function _t(Ut){var ca=Ut?-1:1,HL=Ut?D:A,VL=D*D-A*A+ca*st*st*B*B,XL=2*HL*st*B,Dh=VL/XL,yg=Math.sqrt(Dh*Dh+1)-Dh,YL=yg<1e-9?-18:Math.log(yg);return YL}function he(Ut){return(Math.exp(Ut)-Math.exp(-Ut))/2}function Kt(Ut){return(Math.exp(Ut)+Math.exp(-Ut))/2}function ke(Ut){return he(Ut)/Kt(Ut)}var me=_t(0);function pr(Ut){return A*(Kt(me)/Kt(me+q*Ut))}function UL(Ut){return A*(Kt(me)*ke(me+q*Ut)-he(me))/st}function jL(Ut){return 1-Math.pow(1-Ut,1.5)}var ZL=Date.now(),_g=(_t(1)-me)/q,WL=u.duration?1e3*u.duration:1e3*_g*.8;function mg(){var Ut=(Date.now()-ZL)/WL,ca=jL(Ut)*_g;Ut<=1?(this._flyToFrame=j(mg,this),this._move(this.unproject(g.add(_.subtract(g).multiplyBy(UL(ca)/B)),P),this.getScaleZoom(A/pr(ca),P),{flyTo:!0})):this._move(o,l)._moveEnd(!0)}return this._moveStart(!0,u.noMoveStart),mg.call(this),this},flyToBounds:function(o,l){var u=this._getBoundsCenterZoom(o,l);return this.flyTo(u.center,u.zoom,l)},setMaxBounds:function(o){return o=et(o),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),o.isValid()?(this.options.maxBounds=o,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(o){var l=this.options.minZoom;return this.options.minZoom=o,this._loaded&&l!==o&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(o):this},setMaxZoom:function(o){var l=this.options.maxZoom;return this.options.maxZoom=o,this._loaded&&l!==o&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,l){this._enforcingBounds=!0;var u=this.getCenter(),g=this._limitCenter(u,this._zoom,et(o));return u.equals(g)||this.panTo(g,l),this._enforcingBounds=!1,this},panInside:function(o,l){l=l||{};var u=H(l.paddingTopLeft||l.padding||[0,0]),g=H(l.paddingBottomRight||l.padding||[0,0]),_=this.project(this.getCenter()),w=this.project(o),P=this.getPixelBounds(),A=F([P.min.add(u),P.max.subtract(g)]),D=A.getSize();if(!A.contains(w)){this._enforcingBounds=!0;var B=w.subtract(A.getCenter()),q=A.extend(w).getSize().subtract(D);_.x+=B.x<0?-q.x:q.x,_.y+=B.y<0?-q.y:q.y,this.panTo(this.unproject(_),l),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=i({animate:!1,pan:!0},o===!0?{animate:!0}:o);var l=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var u=this.getSize(),g=l.divideBy(2).round(),_=u.divideBy(2).round(),w=g.subtract(_);return!w.x&&!w.y?this:(o.animate&&o.pan?this.panBy(w):(o.pan&&this._rawPanBy(w),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:l,newSize:u}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(o){if(o=this._locateOptions=i({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var l=a(this._handleGeolocationResponse,this),u=a(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(l,u,o):navigator.geolocation.getCurrentPosition(l,u,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var l=o.code,u=o.message||(l===1?"permission denied":l===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:l,message:"Geolocation error: "+u+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var l=o.coords.latitude,u=o.coords.longitude,g=new it(l,u),_=g.toBounds(o.coords.accuracy*2),w=this._locateOptions;if(w.setView){var P=this.getBoundsZoom(_);this.setView(g,w.maxZoom?Math.min(P,w.maxZoom):P)}var A={latlng:g,bounds:_,timestamp:o.timestamp};for(var D in o.coords)typeof o.coords[D]=="number"&&(A[D]=o.coords[D]);this.fire("locationfound",A)}},addHandler:function(o,l){if(!l)return this;var u=this[o]=new l(this);return this._handlers.push(u),this.options[o]&&u.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),At(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(W(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)At(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,l){var u="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),g=Et("div",u,l||this._mapPane);return o&&(this._panes[o]=g),g},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),l=this.unproject(o.getBottomLeft()),u=this.unproject(o.getTopRight());return new wt(l,u)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(o,l,u){o=et(o),u=H(u||[0,0]);var g=this.getZoom()||0,_=this.getMinZoom(),w=this.getMaxZoom(),P=o.getNorthWest(),A=o.getSouthEast(),D=this.getSize().subtract(u),B=F(this.project(A,g),this.project(P,g)).getSize(),q=J.any3d?this.options.zoomSnap:1,st=D.x/B.x,_t=D.y/B.y,he=l?Math.max(st,_t):Math.min(st,_t);return g=this.getScaleZoom(he,g),q&&(g=Math.round(g/(q/100))*(q/100),g=l?Math.ceil(g/q)*q:Math.floor(g/q)*q),Math.max(_,Math.min(w,g))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new U(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,l){var u=this._getTopLeftPoint(o,l);return new at(u,u.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,l){var u=this.options.crs;return l=l===void 0?this._zoom:l,u.scale(o)/u.scale(l)},getScaleZoom:function(o,l){var u=this.options.crs;l=l===void 0?this._zoom:l;var g=u.zoom(o*u.scale(l));return isNaN(g)?1/0:g},project:function(o,l){return l=l===void 0?this._zoom:l,this.options.crs.latLngToPoint(ht(o),l)},unproject:function(o,l){return l=l===void 0?this._zoom:l,this.options.crs.pointToLatLng(H(o),l)},layerPointToLatLng:function(o){var l=H(o).add(this.getPixelOrigin());return this.unproject(l)},latLngToLayerPoint:function(o){var l=this.project(ht(o))._round();return l._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(ht(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(et(o))},distance:function(o,l){return this.options.crs.distance(ht(o),ht(l))},containerPointToLayerPoint:function(o){return H(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return H(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var l=this.containerPointToLayerPoint(H(o));return this.layerPointToLatLng(l)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ht(o)))},mouseEventToContainerPoint:function(o){return Ff(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var l=this._container=Af(o);if(l){if(l._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ut(l,"scroll",this._onScroll,this),this._containerId=c(l)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&J.any3d,ft(o,"leaflet-container"+(J.touch?" leaflet-touch":"")+(J.retina?" leaflet-retina":"")+(J.ielt9?" leaflet-oldie":"")+(J.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var l=rs(o,"position");l!=="absolute"&&l!=="relative"&&l!=="fixed"&&l!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Gt(this._mapPane,new U(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ft(o.markerPane,"leaflet-zoom-hide"),ft(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,l,u){Gt(this._mapPane,new U(0,0));var g=!this._loaded;this._loaded=!0,l=this._limitZoom(l),this.fire("viewprereset");var _=this._zoom!==l;this._moveStart(_,u)._move(o,l)._moveEnd(_),this.fire("viewreset"),g&&this.fire("load")},_moveStart:function(o,l){return o&&this.fire("zoomstart"),l||this.fire("movestart"),this},_move:function(o,l,u,g){l===void 0&&(l=this._zoom);var _=this._zoom!==l;return this._zoom=l,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),g?u&&u.pinch&&this.fire("zoom",u):((_||u&&u.pinch)&&this.fire("zoom",u),this.fire("move",u)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return W(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){Gt(this._mapPane,this._getMapPanePos().subtract(o))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(o){this._targets={},this._targets[c(this._container)]=this;var l=o?Pt:ut;l(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&l(window,"resize",this._onResize,this),J.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){W(this._resizeRequest),this._resizeRequest=j(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,l){for(var u=[],g,_=l==="mouseout"||l==="mouseover",w=o.target||o.srcElement,P=!1;w;){if(g=this._targets[c(w)],g&&(l==="click"||l==="preclick")&&this._draggableMoved(g)){P=!0;break}if(g&&g.listens(l,!0)&&(_&&!Lh(w,o)||(u.push(g),_))||w===this._container)break;w=w.parentNode}return!u.length&&!P&&!_&&this.listens(l,!0)&&(u=[this]),u},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var l=o.target||o.srcElement;if(!(!this._loaded||l._leaflet_disable_events||o.type==="click"&&this._isClickDisabled(l))){var u=o.type;u==="mousedown"&&mh(l),this._fireDOMEvent(o,u)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,l,u){if(o.type==="click"){var g=i({},o);g.type="preclick",this._fireDOMEvent(g,g.type,u)}var _=this._findEventTargets(o,l);if(u){for(var w=[],P=0;P<u.length;P++)u[P].listens(l,!0)&&w.push(u[P]);_=w.concat(_)}if(_.length){l==="contextmenu"&&Qt(o);var A=_[0],D={originalEvent:o};if(o.type!=="keypress"&&o.type!=="keydown"&&o.type!=="keyup"){var B=A.getLatLng&&(!A._radius||A._radius<=10);D.containerPoint=B?this.latLngToContainerPoint(A.getLatLng()):this.mouseEventToContainerPoint(o),D.layerPoint=this.containerPointToLayerPoint(D.containerPoint),D.latlng=B?A.getLatLng():this.layerPointToLatLng(D.layerPoint)}for(P=0;P<_.length;P++)if(_[P].fire(l,D,!0),D.originalEvent._stopped||_[P].options.bubblingMouseEvents===!1&&C(this._mouseEvents,l)!==-1)return}},_draggableMoved:function(o){return o=o.dragging&&o.dragging.enabled()?o:this,o.dragging&&o.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var o=0,l=this._handlers.length;o<l;o++)this._handlers[o].disable()},whenReady:function(o,l){return this._loaded?o.call(l||this,{target:this}):this.on("load",o,l),this},_getMapPanePos:function(){return Cn(this._mapPane)||new U(0,0)},_moved:function(){var o=this._getMapPanePos();return o&&!o.equals([0,0])},_getTopLeftPoint:function(o,l){var u=o&&l!==void 0?this._getNewPixelOrigin(o,l):this.getPixelOrigin();return u.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(o,l){var u=this.getSize()._divideBy(2);return this.project(o,l)._subtract(u)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(o,l,u){var g=this._getNewPixelOrigin(u,l);return this.project(o,l)._subtract(g)},_latLngBoundsToNewLayerBounds:function(o,l,u){var g=this._getNewPixelOrigin(u,l);return F([this.project(o.getSouthWest(),l)._subtract(g),this.project(o.getNorthWest(),l)._subtract(g),this.project(o.getSouthEast(),l)._subtract(g),this.project(o.getNorthEast(),l)._subtract(g)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(o){return this.latLngToLayerPoint(o).subtract(this._getCenterLayerPoint())},_limitCenter:function(o,l,u){if(!u)return o;var g=this.project(o,l),_=this.getSize().divideBy(2),w=new at(g.subtract(_),g.add(_)),P=this._getBoundsOffset(w,u,l);return Math.abs(P.x)<=1&&Math.abs(P.y)<=1?o:this.unproject(g.add(P),l)},_limitOffset:function(o,l){if(!l)return o;var u=this.getPixelBounds(),g=new at(u.min.add(o),u.max.add(o));return o.add(this._getBoundsOffset(g,l))},_getBoundsOffset:function(o,l,u){var g=F(this.project(l.getNorthEast(),u),this.project(l.getSouthWest(),u)),_=g.min.subtract(o.min),w=g.max.subtract(o.max),P=this._rebound(_.x,-w.x),A=this._rebound(_.y,-w.y);return new U(P,A)},_rebound:function(o,l){return o+l>0?Math.round(o-l)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(l))},_limitZoom:function(o){var l=this.getMinZoom(),u=this.getMaxZoom(),g=J.any3d?this.options.zoomSnap:1;return g&&(o=Math.round(o/g)*g),Math.max(l,Math.min(u,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ft(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,l){var u=this._getCenterOffset(o)._trunc();return(l&&l.animate)!==!0&&!this.getSize().contains(u)?!1:(this.panBy(u,l),!0)},_createAnimProxy:function(){var o=this._proxy=Et("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(l){var u=ch,g=this._proxy.style[u];bn(this._proxy,this.project(l.center,l.zoom),this.getZoomScale(l.zoom,1)),g===this._proxy.style[u]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){At(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),l=this.getZoom();bn(this._proxy,this.project(o,l),this.getZoomScale(l,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,l,u){if(this._animatingZoom)return!0;if(u=u||{},!this._zoomAnimated||u.animate===!1||this._nothingToAnimate()||Math.abs(l-this._zoom)>this.options.zoomAnimationThreshold)return!1;var g=this.getZoomScale(l),_=this._getCenterOffset(o)._divideBy(1-1/g);return u.animate!==!0&&!this.getSize().contains(_)?!1:(j(function(){this._moveStart(!0,u.noMoveStart||!1)._animateZoom(o,l,!0)},this),!0)},_animateZoom:function(o,l,u,g){this._mapPane&&(u&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=l,ft(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:l,noUpdate:g}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ft(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function rL(o,l){return new yt(o,l)}var Ge=$.extend({options:{position:"topright"},initialize:function(o){b(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var l=this._map;return l&&l.removeControl(this),this.options.position=o,l&&l.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var l=this._container=this.onAdd(o),u=this.getPosition(),g=o._controlCorners[u];return ft(l,"leaflet-control"),u.indexOf("bottom")!==-1?g.insertBefore(l,g.firstChild):g.appendChild(l),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(At(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),hs=function(o){return new Ge(o)};yt.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},l="leaflet-",u=this._controlContainer=Et("div",l+"control-container",this._container);function g(_,w){var P=l+_+" "+l+w;o[_+w]=Et("div",P,u)}g("top","left"),g("top","right"),g("bottom","left"),g("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)At(this._controlCorners[o]);At(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Bf=Ge.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,l,u,g){return u<g?-1:g<u?1:0}},initialize:function(o,l,u){b(this,u),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var g in o)this._addLayer(o[g],g);for(g in l)this._addLayer(l[g],g,!0)},onAdd:function(o){this._initLayout(),this._update(),this._map=o,o.on("zoomend",this._checkDisabledLayers,this);for(var l=0;l<this._layers.length;l++)this._layers[l].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(o){return Ge.prototype.addTo.call(this,o),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var o=0;o<this._layers.length;o++)this._layers[o].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(o,l){return this._addLayer(o,l),this._map?this._update():this},addOverlay:function(o,l){return this._addLayer(o,l,!0),this._map?this._update():this},removeLayer:function(o){o.off("add remove",this._onLayerChange,this);var l=this._getLayer(c(o));return l&&this._layers.splice(this._layers.indexOf(l),1),this._map?this._update():this},expand:function(){ft(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var o=this._map.getSize().y-(this._container.offsetTop+50);return o<this._section.clientHeight?(ft(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=o+"px"):Ft(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Ft(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var o="leaflet-control-layers",l=this._container=Et("div",o),u=this.options.collapsed;l.setAttribute("aria-haspopup",!0),ls(l),Eh(l);var g=this._section=Et("section",o+"-list");u&&(this._map.on("click",this.collapse,this),ut(l,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var _=this._layersLink=Et("a",o+"-toggle",l);_.href="#",_.title="Layers",_.setAttribute("role","button"),ut(_,{keydown:function(w){w.keyCode===13&&this._expandSafely()},click:function(w){Qt(w),this._expandSafely()}},this),u||this.expand(),this._baseLayersList=Et("div",o+"-base",g),this._separator=Et("div",o+"-separator",g),this._overlaysList=Et("div",o+"-overlays",g),l.appendChild(g)},_getLayer:function(o){for(var l=0;l<this._layers.length;l++)if(this._layers[l]&&c(this._layers[l].layer)===o)return this._layers[l]},_addLayer:function(o,l,u){this._map&&o.on("add remove",this._onLayerChange,this),this._layers.push({layer:o,name:l,overlay:u}),this.options.sortLayers&&this._layers.sort(a(function(g,_){return this.options.sortFunction(g.layer,_.layer,g.name,_.name)},this)),this.options.autoZIndex&&o.setZIndex&&(this._lastZIndex++,o.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Yo(this._baseLayersList),Yo(this._overlaysList),this._layerControlInputs=[];var o,l,u,g,_=0;for(u=0;u<this._layers.length;u++)g=this._layers[u],this._addItem(g),l=l||g.overlay,o=o||!g.overlay,_+=g.overlay?0:1;return this.options.hideSingleBase&&(o=o&&_>1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=l&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var l=this._getLayer(c(o.target)),u=l.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;u&&this._map.fire(u,l)},_createRadioElement:function(o,l){var u='<input type="radio" class="leaflet-control-layers-selector" name="'+o+'"'+(l?' checked="checked"':"")+"/>",g=document.createElement("div");return g.innerHTML=u,g.firstChild},_addItem:function(o){var l=document.createElement("label"),u=this._map.hasLayer(o.layer),g;o.overlay?(g=document.createElement("input"),g.type="checkbox",g.className="leaflet-control-layers-selector",g.defaultChecked=u):g=this._createRadioElement("leaflet-base-layers_"+c(this),u),this._layerControlInputs.push(g),g.layerId=c(o.layer),ut(g,"click",this._onInputClick,this);var _=document.createElement("span");_.innerHTML=" "+o.name;var w=document.createElement("span");l.appendChild(w),w.appendChild(g),w.appendChild(_);var P=o.overlay?this._overlaysList:this._baseLayersList;return P.appendChild(l),this._checkDisabledLayers(),l},_onInputClick:function(){if(!this._preventClick){var o=this._layerControlInputs,l,u,g=[],_=[];this._handlingClick=!0;for(var w=o.length-1;w>=0;w--)l=o[w],u=this._getLayer(l.layerId).layer,l.checked?g.push(u):l.checked||_.push(u);for(w=0;w<_.length;w++)this._map.hasLayer(_[w])&&this._map.removeLayer(_[w]);for(w=0;w<g.length;w++)this._map.hasLayer(g[w])||this._map.addLayer(g[w]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var o=this._layerControlInputs,l,u,g=this._map.getZoom(),_=o.length-1;_>=0;_--)l=o[_],u=this._getLayer(l.layerId).layer,l.disabled=u.options.minZoom!==void 0&&g<u.options.minZoom||u.options.maxZoom!==void 0&&g>u.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;this._preventClick=!0,ut(o,"click",Qt),this.expand();var l=this;setTimeout(function(){Pt(o,"click",Qt),l._preventClick=!1})}}),sL=function(o,l,u){return new Bf(o,l,u)},bh=Ge.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(o){var l="leaflet-control-zoom",u=Et("div",l+" leaflet-bar"),g=this.options;return this._zoomInButton=this._createButton(g.zoomInText,g.zoomInTitle,l+"-in",u,this._zoomIn),this._zoomOutButton=this._createButton(g.zoomOutText,g.zoomOutTitle,l+"-out",u,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),u},onRemove:function(o){o.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(o){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(o.shiftKey?3:1))},_zoomOut:function(o){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,l,u,g,_){var w=Et("a",u,g);return w.innerHTML=o,w.href="#",w.title=l,w.setAttribute("role","button"),w.setAttribute("aria-label",l),ls(w),ut(w,"click",Mn),ut(w,"click",_,this),ut(w,"click",this._refocusOnMap,this),w},_updateDisabled:function(){var o=this._map,l="leaflet-disabled";Ft(this._zoomInButton,l),Ft(this._zoomOutButton,l),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(ft(this._zoomOutButton,l),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(ft(this._zoomInButton,l),this._zoomInButton.setAttribute("aria-disabled","true"))}});yt.mergeOptions({zoomControl:!0}),yt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new bh,this.addControl(this.zoomControl))});var oL=function(o){return new bh(o)},Gf=Ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var l="leaflet-control-scale",u=Et("div",l),g=this.options;return this._addScales(g,l+"-line",u),o.on(g.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),u},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,l,u){o.metric&&(this._mScale=Et("div",l,u)),o.imperial&&(this._iScale=Et("div",l,u))},_update:function(){var o=this._map,l=o.getSize().y/2,u=o.distance(o.containerPointToLatLng([0,l]),o.containerPointToLatLng([this.options.maxWidth,l]));this._updateScales(u)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var l=this._getRoundNum(o),u=l<1e3?l+" m":l/1e3+" km";this._updateScale(this._mScale,u,l/o)},_updateImperial:function(o){var l=o*3.2808399,u,g,_;l>5280?(u=l/5280,g=this._getRoundNum(u),this._updateScale(this._iScale,g+" mi",g/u)):(_=this._getRoundNum(l),this._updateScale(this._iScale,_+" ft",_/l))},_updateScale:function(o,l,u){o.style.width=Math.round(this.options.maxWidth*u)+"px",o.innerHTML=l},_getRoundNum:function(o){var l=Math.pow(10,(Math.floor(o)+"").length-1),u=o/l;return u=u>=10?10:u>=5?5:u>=3?3:u>=2?2:1,l*u}}),aL=function(o){return new Gf(o)},lL='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ch=Ge.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(J.inlineSvg?lL+" ":"")+"Leaflet</a>"},initialize:function(o){b(this,o),this._attributions={}},onAdd:function(o){o.attributionControl=this,this._container=Et("div","leaflet-control-attribution"),ls(this._container);for(var l in o._layers)o._layers[l].getAttribution&&this.addAttribution(o._layers[l].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var l in this._attributions)this._attributions[l]&&o.push(l);var u=[];this.options.prefix&&u.push(this.options.prefix),o.length&&u.push(o.join(", ")),this._container.innerHTML=u.join(' <span aria-hidden="true">|</span> ')}}});yt.mergeOptions({attributionControl:!0}),yt.addInitHook(function(){this.options.attributionControl&&new Ch().addTo(this)});var hL=function(o){return new Ch(o)};Ge.Layers=Bf,Ge.Zoom=bh,Ge.Scale=Gf,Ge.Attribution=Ch,hs.layers=sL,hs.zoom=oL,hs.scale=aL,hs.attribution=hL;var ni=$.extend({initialize:function(o){this._map=o},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ni.addTo=function(o,l){return o.addHandler(l,this),this};var cL={Events:V},Uf=J.touch?"touchstart mousedown":"mousedown",nn=Z.extend({options:{clickTolerance:3},initialize:function(o,l,u,g){b(this,g),this._element=o,this._dragStartTarget=l||o,this._preventOutline=u},enable:function(){this._enabled||(ut(this._dragStartTarget,Uf,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(nn._dragging===this&&this.finishDrag(!0),Pt(this._dragStartTarget,Uf,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!uh(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){nn._dragging===this&&this.finishDrag();return}if(!(nn._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(nn._dragging=this,this._preventOutline&&mh(this._element),gh(),ss(),!this._moving)){this.fire("down");var l=o.touches?o.touches[0]:o,u=If(this._element);this._startPoint=new U(l.clientX,l.clientY),this._startPos=Cn(this._element),this._parentScale=yh(u);var g=o.type==="mousedown";ut(document,g?"mousemove":"touchmove",this._onMove,this),ut(document,g?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var l=o.touches&&o.touches.length===1?o.touches[0]:o,u=new U(l.clientX,l.clientY)._subtract(this._startPoint);!u.x&&!u.y||Math.abs(u.x)+Math.abs(u.y)<this.options.clickTolerance||(u.x/=this._parentScale.x,u.y/=this._parentScale.y,Qt(o),this._moved||(this.fire("dragstart"),this._moved=!0,ft(document.body,"leaflet-dragging"),this._lastTarget=o.target||o.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ft(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(u),this._moving=!0,this._lastEvent=o,this._updatePosition())}},_updatePosition:function(){var o={originalEvent:this._lastEvent};this.fire("predrag",o),Gt(this._element,this._newPos),this.fire("drag",o)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(o){Ft(document.body,"leaflet-dragging"),this._lastTarget&&(Ft(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Pt(document,"mousemove touchmove",this._onMove,this),Pt(document,"mouseup touchend touchcancel",this._onUp,this),ph(),os();var l=this._moved&&this._moving;this._moving=!1,nn._dragging=!1,l&&this.fire("dragend",{noInertia:o,distance:this._newPos.distanceTo(this._startPos)})}});function jf(o,l,u){var g,_=[1,4,2,8],w,P,A,D,B,q,st,_t;for(w=0,q=o.length;w<q;w++)o[w]._code=Sn(o[w],l);for(A=0;A<4;A++){for(st=_[A],g=[],w=0,q=o.length,P=q-1;w<q;P=w++)D=o[w],B=o[P],D._code&st?B._code&st||(_t=$o(B,D,st,l,u),_t._code=Sn(_t,l),g.push(_t)):(B._code&st&&(_t=$o(B,D,st,l,u),_t._code=Sn(_t,l),g.push(_t)),g.push(D));o=g}return o}function Zf(o,l){var u,g,_,w,P,A,D,B,q;if(!o||o.length===0)throw new Error("latlngs not passed");Pe(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var st=ht([0,0]),_t=et(o),he=_t.getNorthWest().distanceTo(_t.getSouthWest())*_t.getNorthEast().distanceTo(_t.getNorthWest());he<1700&&(st=Th(o));var Kt=o.length,ke=[];for(u=0;u<Kt;u++){var me=ht(o[u]);ke.push(l.project(ht([me.lat-st.lat,me.lng-st.lng])))}for(A=D=B=0,u=0,g=Kt-1;u<Kt;g=u++)_=ke[u],w=ke[g],P=_.y*w.x-w.y*_.x,D+=(_.x+w.x)*P,B+=(_.y+w.y)*P,A+=P*3;A===0?q=ke[0]:q=[D/A,B/A];var pr=l.unproject(H(q));return ht([pr.lat+st.lat,pr.lng+st.lng])}function Th(o){for(var l=0,u=0,g=0,_=0;_<o.length;_++){var w=ht(o[_]);l+=w.lat,u+=w.lng,g++}return ht([l/g,u/g])}var uL={__proto__:null,clipPolygon:jf,polygonCenter:Zf,centroid:Th};function Wf(o,l){if(!l||!o.length)return o.slice();var u=l*l;return o=gL(o,u),o=fL(o,u),o}function Hf(o,l,u){return Math.sqrt(cs(o,l,u,!0))}function dL(o,l,u){return cs(o,l,u)}function fL(o,l){var u=o.length,g=typeof Uint8Array!=void 0+""?Uint8Array:Array,_=new g(u);_[0]=_[u-1]=1,Mh(o,_,l,0,u-1);var w,P=[];for(w=0;w<u;w++)_[w]&&P.push(o[w]);return P}function Mh(o,l,u,g,_){var w=0,P,A,D;for(A=g+1;A<=_-1;A++)D=cs(o[A],o[g],o[_],!0),D>w&&(P=A,w=D);w>u&&(l[P]=1,Mh(o,l,u,g,P),Mh(o,l,u,P,_))}function gL(o,l){for(var u=[o[0]],g=1,_=0,w=o.length;g<w;g++)pL(o[g],o[_])>l&&(u.push(o[g]),_=g);return _<w-1&&u.push(o[w-1]),u}var Vf;function Xf(o,l,u,g,_){var w=g?Vf:Sn(o,u),P=Sn(l,u),A,D,B;for(Vf=P;;){if(!(w|P))return[o,l];if(w&P)return!1;A=w||P,D=$o(o,l,A,u,_),B=Sn(D,u),A===w?(o=D,w=B):(l=D,P=B)}}function $o(o,l,u,g,_){var w=l.x-o.x,P=l.y-o.y,A=g.min,D=g.max,B,q;return u&8?(B=o.x+w*(D.y-o.y)/P,q=D.y):u&4?(B=o.x+w*(A.y-o.y)/P,q=A.y):u&2?(B=D.x,q=o.y+P*(D.x-o.x)/w):u&1&&(B=A.x,q=o.y+P*(A.x-o.x)/w),new U(B,q,_)}function Sn(o,l){var u=0;return o.x<l.min.x?u|=1:o.x>l.max.x&&(u|=2),o.y<l.min.y?u|=4:o.y>l.max.y&&(u|=8),u}function pL(o,l){var u=l.x-o.x,g=l.y-o.y;return u*u+g*g}function cs(o,l,u,g){var _=l.x,w=l.y,P=u.x-_,A=u.y-w,D=P*P+A*A,B;return D>0&&(B=((o.x-_)*P+(o.y-w)*A)/D,B>1?(_=u.x,w=u.y):B>0&&(_+=P*B,w+=A*B)),P=o.x-_,A=o.y-w,g?P*P+A*A:new U(_,w)}function Pe(o){return!x(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]<"u"}function Yf(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Pe(o)}function Kf(o,l){var u,g,_,w,P,A,D,B;if(!o||o.length===0)throw new Error("latlngs not passed");Pe(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var q=ht([0,0]),st=et(o),_t=st.getNorthWest().distanceTo(st.getSouthWest())*st.getNorthEast().distanceTo(st.getNorthWest());_t<1700&&(q=Th(o));var he=o.length,Kt=[];for(u=0;u<he;u++){var ke=ht(o[u]);Kt.push(l.project(ht([ke.lat-q.lat,ke.lng-q.lng])))}for(u=0,g=0;u<he-1;u++)g+=Kt[u].distanceTo(Kt[u+1])/2;if(g===0)B=Kt[0];else for(u=0,w=0;u<he-1;u++)if(P=Kt[u],A=Kt[u+1],_=P.distanceTo(A),w+=_,w>g){D=(w-g)/_,B=[A.x-D*(A.x-P.x),A.y-D*(A.y-P.y)];break}var me=l.unproject(H(B));return ht([me.lat+q.lat,me.lng+q.lng])}var _L={__proto__:null,simplify:Wf,pointToSegmentDistance:Hf,closestPointOnSegment:dL,clipSegment:Xf,_getEdgeIntersection:$o,_getBitCode:Sn,_sqClosestPointOnSegment:cs,isFlat:Pe,_flat:Yf,polylineCenter:Kf},Sh={project:function(o){return new U(o.lng,o.lat)},unproject:function(o){return new it(o.y,o.x)},bounds:new at([-180,-90],[180,90])},Ph={R:6378137,R_MINOR:6356752314245179e-9,bounds:new at([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(o){var l=Math.PI/180,u=this.R,g=o.lat*l,_=this.R_MINOR/u,w=Math.sqrt(1-_*_),P=w*Math.sin(g),A=Math.tan(Math.PI/4-g/2)/Math.pow((1-P)/(1+P),w/2);return g=-u*Math.log(Math.max(A,1e-10)),new U(o.lng*l*u,g)},unproject:function(o){for(var l=180/Math.PI,u=this.R,g=this.R_MINOR/u,_=Math.sqrt(1-g*g),w=Math.exp(-o.y/u),P=Math.PI/2-2*Math.atan(w),A=0,D=.1,B;A<15&&Math.abs(D)>1e-7;A++)B=_*Math.sin(P),B=Math.pow((1-B)/(1+B),_/2),D=Math.PI/2-2*Math.atan(w*B)-P,P+=D;return new it(P*l,o.x*l/u)}},mL={__proto__:null,LonLat:Sh,Mercator:Ph,SphericalMercator:Qe},yL=i({},Xt,{code:"EPSG:3395",projection:Ph,transformation:function(){var o=.5/(Math.PI*Ph.R);return Me(o,.5,-o,.5)}()}),qf=i({},Xt,{code:"EPSG:4326",projection:Sh,transformation:Me(1/180,1,-1/180,.5)}),vL=i({},kt,{projection:Sh,transformation:Me(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,l){var u=l.lng-o.lng,g=l.lat-o.lat;return Math.sqrt(u*u+g*g)},infinite:!0});kt.Earth=Xt,kt.EPSG3395=yL,kt.EPSG3857=Yi,kt.EPSG900913=$e,kt.EPSG4326=qf,kt.Simple=vL;var Ue=Z.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[c(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[c(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var l=o.target;if(l.hasLayer(this)){if(this._map=l,this._zoomAnimated=l._zoomAnimated,this.getEvents){var u=this.getEvents();l.on(u,this),this.once("remove",function(){l.off(u,this)},this)}this.onAdd(l),this.fire("add"),l.fire("layeradd",{layer:this})}}});yt.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var l=c(o);return this._layers[l]?this:(this._layers[l]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var l=c(o);return this._layers[l]?(this._loaded&&o.onRemove(this),delete this._layers[l],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return c(o)in this._layers},eachLayer:function(o,l){for(var u in this._layers)o.call(l,this._layers[u]);return this},_addLayers:function(o){o=o?x(o)?o:[o]:[];for(var l=0,u=o.length;l<u;l++)this.addLayer(o[l])},_addZoomLimit:function(o){(!isNaN(o.options.maxZoom)||!isNaN(o.options.minZoom))&&(this._zoomBoundLayers[c(o)]=o,this._updateZoomLevels())},_removeZoomLimit:function(o){var l=c(o);this._zoomBoundLayers[l]&&(delete this._zoomBoundLayers[l],this._updateZoomLevels())},_updateZoomLevels:function(){var o=1/0,l=-1/0,u=this._getZoomSpan();for(var g in this._zoomBoundLayers){var _=this._zoomBoundLayers[g].options;o=_.minZoom===void 0?o:Math.min(o,_.minZoom),l=_.maxZoom===void 0?l:Math.max(l,_.maxZoom)}this._layersMaxZoom=l===-1/0?void 0:l,this._layersMinZoom=o===1/0?void 0:o,u!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var cr=Ue.extend({initialize:function(o,l){b(this,l),this._layers={};var u,g;if(o)for(u=0,g=o.length;u<g;u++)this.addLayer(o[u])},addLayer:function(o){var l=this.getLayerId(o);return this._layers[l]=o,this._map&&this._map.addLayer(o),this},removeLayer:function(o){var l=o in this._layers?o:this.getLayerId(o);return this._map&&this._layers[l]&&this._map.removeLayer(this._layers[l]),delete this._layers[l],this},hasLayer:function(o){var l=typeof o=="number"?o:this.getLayerId(o);return l in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(o){var l=Array.prototype.slice.call(arguments,1),u,g;for(u in this._layers)g=this._layers[u],g[o]&&g[o].apply(g,l);return this},onAdd:function(o){this.eachLayer(o.addLayer,o)},onRemove:function(o){this.eachLayer(o.removeLayer,o)},eachLayer:function(o,l){for(var u in this._layers)o.call(l,this._layers[u]);return this},getLayer:function(o){return this._layers[o]},getLayers:function(){var o=[];return this.eachLayer(o.push,o),o},setZIndex:function(o){return this.invoke("setZIndex",o)},getLayerId:function(o){return c(o)}}),xL=function(o,l){return new cr(o,l)},bi=cr.extend({addLayer:function(o){return this.hasLayer(o)?this:(o.addEventParent(this),cr.prototype.addLayer.call(this,o),this.fire("layeradd",{layer:o}))},removeLayer:function(o){return this.hasLayer(o)?(o in this._layers&&(o=this._layers[o]),o.removeEventParent(this),cr.prototype.removeLayer.call(this,o),this.fire("layerremove",{layer:o})):this},setStyle:function(o){return this.invoke("setStyle",o)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var o=new wt;for(var l in this._layers){var u=this._layers[l];o.extend(u.getBounds?u.getBounds():u.getLatLng())}return o}}),wL=function(o,l){return new bi(o,l)},ur=$.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(o){b(this,o)},createIcon:function(o){return this._createIcon("icon",o)},createShadow:function(o){return this._createIcon("shadow",o)},_createIcon:function(o,l){var u=this._getIconUrl(o);if(!u){if(o==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var g=this._createImg(u,l&&l.tagName==="IMG"?l:null);return this._setIconStyles(g,o),(this.options.crossOrigin||this.options.crossOrigin==="")&&(g.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),g},_setIconStyles:function(o,l){var u=this.options,g=u[l+"Size"];typeof g=="number"&&(g=[g,g]);var _=H(g),w=H(l==="shadow"&&u.shadowAnchor||u.iconAnchor||_&&_.divideBy(2,!0));o.className="leaflet-marker-"+l+" "+(u.className||""),w&&(o.style.marginLeft=-w.x+"px",o.style.marginTop=-w.y+"px"),_&&(o.style.width=_.x+"px",o.style.height=_.y+"px")},_createImg:function(o,l){return l=l||document.createElement("img"),l.src=o,l},_getIconUrl:function(o){return J.retina&&this.options[o+"RetinaUrl"]||this.options[o+"Url"]}});function EL(o){return new ur(o)}var us=ur.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(o){return typeof us.imagePath!="string"&&(us.imagePath=this._detectIconPath()),(this.options.imagePath||us.imagePath)+ur.prototype._getIconUrl.call(this,o)},_stripUrl:function(o){var l=function(u,g,_){var w=g.exec(u);return w&&w[_]};return o=l(o,/^url\((['"])?(.+)\1\)$/,2),o&&l(o,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var o=Et("div","leaflet-default-icon-path",document.body),l=rs(o,"background-image")||rs(o,"backgroundImage");if(document.body.removeChild(o),l=this._stripUrl(l),l)return l;var u=document.querySelector('link[href$="leaflet.css"]');return u?u.href.substring(0,u.href.length-11-1):""}}),Jf=ni.extend({initialize:function(o){this._marker=o},addHooks:function(){var o=this._marker._icon;this._draggable||(this._draggable=new nn(o,o,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ft(o,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Ft(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(o){var l=this._marker,u=l._map,g=this._marker.options.autoPanSpeed,_=this._marker.options.autoPanPadding,w=Cn(l._icon),P=u.getPixelBounds(),A=u.getPixelOrigin(),D=F(P.min._subtract(A).add(_),P.max._subtract(A).subtract(_));if(!D.contains(w)){var B=H((Math.max(D.max.x,w.x)-D.max.x)/(P.max.x-D.max.x)-(Math.min(D.min.x,w.x)-D.min.x)/(P.min.x-D.min.x),(Math.max(D.max.y,w.y)-D.max.y)/(P.max.y-D.max.y)-(Math.min(D.min.y,w.y)-D.min.y)/(P.min.y-D.min.y)).multiplyBy(g);u.panBy(B,{animate:!1}),this._draggable._newPos._add(B),this._draggable._startPos._add(B),Gt(l._icon,this._draggable._newPos),this._onDrag(o),this._panRequest=j(this._adjustPan.bind(this,o))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(o){this._marker.options.autoPan&&(W(this._panRequest),this._panRequest=j(this._adjustPan.bind(this,o)))},_onDrag:function(o){var l=this._marker,u=l._shadow,g=Cn(l._icon),_=l._map.layerPointToLatLng(g);u&&Gt(u,g),l._latlng=_,o.latlng=_,o.oldLatLng=this._oldLatLng,l.fire("move",o).fire("drag",o)},_onDragEnd:function(o){W(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",o)}}),ta=Ue.extend({options:{icon:new us,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(o,l){b(this,l),this._latlng=ht(o)},onAdd:function(o){this._zoomAnimated=this._zoomAnimated&&o.options.markerZoomAnimation,this._zoomAnimated&&o.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(o){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&o.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(o){var l=this._latlng;return this._latlng=ht(o),this.update(),this.fire("move",{oldLatLng:l,latlng:this._latlng})},setZIndexOffset:function(o){return this.options.zIndexOffset=o,this.update()},getIcon:function(){return this.options.icon},setIcon:function(o){return this.options.icon=o,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var o=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(o)}return this},_initIcon:function(){var o=this.options,l="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),u=o.icon.createIcon(this._icon),g=!1;u!==this._icon&&(this._icon&&this._removeIcon(),g=!0,o.title&&(u.title=o.title),u.tagName==="IMG"&&(u.alt=o.alt||"")),ft(u,l),o.keyboard&&(u.tabIndex="0",u.setAttribute("role","button")),this._icon=u,o.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ut(u,"focus",this._panOnFocus,this);var _=o.icon.createShadow(this._shadow),w=!1;_!==this._shadow&&(this._removeShadow(),w=!0),_&&(ft(_,l),_.alt=""),this._shadow=_,o.opacity<1&&this._updateOpacity(),g&&this.getPane().appendChild(this._icon),this._initInteraction(),_&&w&&this.getPane(o.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Pt(this._icon,"focus",this._panOnFocus,this),At(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&At(this._shadow),this._shadow=null},_setPos:function(o){this._icon&&Gt(this._icon,o),this._shadow&&Gt(this._shadow,o),this._zIndex=o.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(o){this._icon&&(this._icon.style.zIndex=this._zIndex+o)},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center).round();this._setPos(l)},_initInteraction:function(){if(this.options.interactive&&(ft(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Jf)){var o=this.options.draggable;this.dragging&&(o=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Jf(this),o&&this.dragging.enable()}},setOpacity:function(o){return this.options.opacity=o,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var o=this.options.opacity;this._icon&&Se(this._icon,o),this._shadow&&Se(this._shadow,o)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var o=this._map;if(o){var l=this.options.icon.options,u=l.iconSize?H(l.iconSize):H(0,0),g=l.iconAnchor?H(l.iconAnchor):H(0,0);o.panInside(this._latlng,{paddingTopLeft:g,paddingBottomRight:u.subtract(g)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function LL(o,l){return new ta(o,l)}var rn=Ue.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(o){this._renderer=o.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(o){return b(this,o),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&o&&Object.prototype.hasOwnProperty.call(o,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),ea=rn.extend({options:{fill:!0,radius:10},initialize:function(o,l){b(this,l),this._latlng=ht(o),this._radius=this.options.radius},setLatLng:function(o){var l=this._latlng;return this._latlng=ht(o),this.redraw(),this.fire("move",{oldLatLng:l,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(o){return this.options.radius=this._radius=o,this.redraw()},getRadius:function(){return this._radius},setStyle:function(o){var l=o&&o.radius||this._radius;return rn.prototype.setStyle.call(this,o),this.setRadius(l),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var o=this._radius,l=this._radiusY||o,u=this._clickTolerance(),g=[o+u,l+u];this._pxBounds=new at(this._point.subtract(g),this._point.add(g))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(o){return o.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function bL(o,l){return new ea(o,l)}var kh=ea.extend({initialize:function(o,l,u){if(typeof l=="number"&&(l=i({},u,{radius:l})),b(this,l),this._latlng=ht(o),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(o){return this._mRadius=o,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var o=[this._radius,this._radiusY||this._radius];return new wt(this._map.layerPointToLatLng(this._point.subtract(o)),this._map.layerPointToLatLng(this._point.add(o)))},setStyle:rn.prototype.setStyle,_project:function(){var o=this._latlng.lng,l=this._latlng.lat,u=this._map,g=u.options.crs;if(g.distance===Xt.distance){var _=Math.PI/180,w=this._mRadius/Xt.R/_,P=u.project([l+w,o]),A=u.project([l-w,o]),D=P.add(A).divideBy(2),B=u.unproject(D).lat,q=Math.acos((Math.cos(w*_)-Math.sin(l*_)*Math.sin(B*_))/(Math.cos(l*_)*Math.cos(B*_)))/_;(isNaN(q)||q===0)&&(q=w/Math.cos(Math.PI/180*l)),this._point=D.subtract(u.getPixelOrigin()),this._radius=isNaN(q)?0:D.x-u.project([B,o-q]).x,this._radiusY=D.y-P.y}else{var st=g.unproject(g.project(this._latlng).subtract([this._mRadius,0]));this._point=u.latLngToLayerPoint(this._latlng),this._radius=this._point.x-u.latLngToLayerPoint(st).x}this._updateBounds()}});function CL(o,l,u){return new kh(o,l,u)}var Ci=rn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(o,l){b(this,l),this._setLatLngs(o)},getLatLngs:function(){return this._latlngs},setLatLngs:function(o){return this._setLatLngs(o),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(o){for(var l=1/0,u=null,g=cs,_,w,P=0,A=this._parts.length;P<A;P++)for(var D=this._parts[P],B=1,q=D.length;B<q;B++){_=D[B-1],w=D[B];var st=g(o,_,w,!0);st<l&&(l=st,u=g(o,_,w))}return u&&(u.distance=Math.sqrt(l)),u},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Kf(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(o,l){return l=l||this._defaultShape(),o=ht(o),l.push(o),this._bounds.extend(o),this.redraw()},_setLatLngs:function(o){this._bounds=new wt,this._latlngs=this._convertLatLngs(o)},_defaultShape:function(){return Pe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(o){for(var l=[],u=Pe(o),g=0,_=o.length;g<_;g++)u?(l[g]=ht(o[g]),this._bounds.extend(l[g])):l[g]=this._convertLatLngs(o[g]);return l},_project:function(){var o=new at;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,o),this._bounds.isValid()&&o.isValid()&&(this._rawPxBounds=o,this._updateBounds())},_updateBounds:function(){var o=this._clickTolerance(),l=new U(o,o);this._rawPxBounds&&(this._pxBounds=new at([this._rawPxBounds.min.subtract(l),this._rawPxBounds.max.add(l)]))},_projectLatlngs:function(o,l,u){var g=o[0]instanceof it,_=o.length,w,P;if(g){for(P=[],w=0;w<_;w++)P[w]=this._map.latLngToLayerPoint(o[w]),u.extend(P[w]);l.push(P)}else for(w=0;w<_;w++)this._projectLatlngs(o[w],l,u)},_clipPoints:function(){var o=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}var l=this._parts,u,g,_,w,P,A,D;for(u=0,_=0,w=this._rings.length;u<w;u++)for(D=this._rings[u],g=0,P=D.length;g<P-1;g++)A=Xf(D[g],D[g+1],o,g,!0),A&&(l[_]=l[_]||[],l[_].push(A[0]),(A[1]!==D[g+1]||g===P-2)&&(l[_].push(A[1]),_++))}},_simplifyPoints:function(){for(var o=this._parts,l=this.options.smoothFactor,u=0,g=o.length;u<g;u++)o[u]=Wf(o[u],l)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(o,l){var u,g,_,w,P,A,D=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(o))return!1;for(u=0,w=this._parts.length;u<w;u++)for(A=this._parts[u],g=0,P=A.length,_=P-1;g<P;_=g++)if(!(!l&&g===0)&&Hf(o,A[_],A[g])<=D)return!0;return!1}});function TL(o,l){return new Ci(o,l)}Ci._flat=Yf;var dr=Ci.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Zf(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(o){var l=Ci.prototype._convertLatLngs.call(this,o),u=l.length;return u>=2&&l[0]instanceof it&&l[0].equals(l[u-1])&&l.pop(),l},_setLatLngs:function(o){Ci.prototype._setLatLngs.call(this,o),Pe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Pe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,l=this.options.weight,u=new U(l,l);if(o=new at(o.min.subtract(u),o.max.add(u)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var g=0,_=this._rings.length,w;g<_;g++)w=jf(this._rings[g],o,!0),w.length&&this._parts.push(w)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(o){var l=!1,u,g,_,w,P,A,D,B;if(!this._pxBounds||!this._pxBounds.contains(o))return!1;for(w=0,D=this._parts.length;w<D;w++)for(u=this._parts[w],P=0,B=u.length,A=B-1;P<B;A=P++)g=u[P],_=u[A],g.y>o.y!=_.y>o.y&&o.x<(_.x-g.x)*(o.y-g.y)/(_.y-g.y)+g.x&&(l=!l);return l||Ci.prototype._containsPoint.call(this,o,!0)}});function ML(o,l){return new dr(o,l)}var Ti=bi.extend({initialize:function(o,l){b(this,l),this._layers={},o&&this.addData(o)},addData:function(o){var l=x(o)?o:o.features,u,g,_;if(l){for(u=0,g=l.length;u<g;u++)_=l[u],(_.geometries||_.geometry||_.features||_.coordinates)&&this.addData(_);return this}var w=this.options;if(w.filter&&!w.filter(o))return this;var P=ia(o,w);return P?(P.feature=sa(o),P.defaultOptions=P.options,this.resetStyle(P),w.onEachFeature&&w.onEachFeature(o,P),this.addLayer(P)):this},resetStyle:function(o){return o===void 0?this.eachLayer(this.resetStyle,this):(o.options=i({},o.defaultOptions),this._setLayerStyle(o,this.options.style),this)},setStyle:function(o){return this.eachLayer(function(l){this._setLayerStyle(l,o)},this)},_setLayerStyle:function(o,l){o.setStyle&&(typeof l=="function"&&(l=l(o.feature)),o.setStyle(l))}});function ia(o,l){var u=o.type==="Feature"?o.geometry:o,g=u?u.coordinates:null,_=[],w=l&&l.pointToLayer,P=l&&l.coordsToLatLng||Rh,A,D,B,q;if(!g&&!u)return null;switch(u.type){case"Point":return A=P(g),Qf(w,o,A,l);case"MultiPoint":for(B=0,q=g.length;B<q;B++)A=P(g[B]),_.push(Qf(w,o,A,l));return new bi(_);case"LineString":case"MultiLineString":return D=na(g,u.type==="LineString"?0:1,P),new Ci(D,l);case"Polygon":case"MultiPolygon":return D=na(g,u.type==="Polygon"?1:2,P),new dr(D,l);case"GeometryCollection":for(B=0,q=u.geometries.length;B<q;B++){var st=ia({geometry:u.geometries[B],type:"Feature",properties:o.properties},l);st&&_.push(st)}return new bi(_);case"FeatureCollection":for(B=0,q=u.features.length;B<q;B++){var _t=ia(u.features[B],l);_t&&_.push(_t)}return new bi(_);default:throw new Error("Invalid GeoJSON object.")}}function Qf(o,l,u,g){return o?o(l,u):new ta(u,g&&g.markersInheritOptions&&g)}function Rh(o){return new it(o[1],o[0],o[2])}function na(o,l,u){for(var g=[],_=0,w=o.length,P;_<w;_++)P=l?na(o[_],l-1,u):(u||Rh)(o[_]),g.push(P);return g}function Ah(o,l){return o=ht(o),o.alt!==void 0?[m(o.lng,l),m(o.lat,l),m(o.alt,l)]:[m(o.lng,l),m(o.lat,l)]}function ra(o,l,u,g){for(var _=[],w=0,P=o.length;w<P;w++)_.push(l?ra(o[w],Pe(o[w])?0:l-1,u,g):Ah(o[w],g));return!l&&u&&_.length>0&&_.push(_[0].slice()),_}function fr(o,l){return o.feature?i({},o.feature,{geometry:l}):sa(l)}function sa(o){return o.type==="Feature"||o.type==="FeatureCollection"?o:{type:"Feature",properties:{},geometry:o}}var Ih={toGeoJSON:function(o){return fr(this,{type:"Point",coordinates:Ah(this.getLatLng(),o)})}};ta.include(Ih),kh.include(Ih),ea.include(Ih),Ci.include({toGeoJSON:function(o){var l=!Pe(this._latlngs),u=ra(this._latlngs,l?1:0,!1,o);return fr(this,{type:(l?"Multi":"")+"LineString",coordinates:u})}}),dr.include({toGeoJSON:function(o){var l=!Pe(this._latlngs),u=l&&!Pe(this._latlngs[0]),g=ra(this._latlngs,u?2:l?1:0,!0,o);return l||(g=[g]),fr(this,{type:(u?"Multi":"")+"Polygon",coordinates:g})}}),cr.include({toMultiPoint:function(o){var l=[];return this.eachLayer(function(u){l.push(u.toGeoJSON(o).geometry.coordinates)}),fr(this,{type:"MultiPoint",coordinates:l})},toGeoJSON:function(o){var l=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(l==="MultiPoint")return this.toMultiPoint(o);var u=l==="GeometryCollection",g=[];return this.eachLayer(function(_){if(_.toGeoJSON){var w=_.toGeoJSON(o);if(u)g.push(w.geometry);else{var P=sa(w);P.type==="FeatureCollection"?g.push.apply(g,P.features):g.push(P)}}}),u?fr(this,{geometries:g,type:"GeometryCollection"}):{type:"FeatureCollection",features:g}}});function $f(o,l){return new Ti(o,l)}var SL=$f,oa=Ue.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(o,l,u){this._url=o,this._bounds=et(l),b(this,u)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ft(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){At(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(o){return this.options.opacity=o,this._image&&this._updateOpacity(),this},setStyle:function(o){return o.opacity&&this.setOpacity(o.opacity),this},bringToFront:function(){return this._map&&lr(this._image),this},bringToBack:function(){return this._map&&hr(this._image),this},setUrl:function(o){return this._url=o,this._image&&(this._image.src=o),this},setBounds:function(o){return this._bounds=et(o),this._map&&this._reset(),this},getEvents:function(){var o={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var o=this._url.tagName==="IMG",l=this._image=o?this._url:Et("img");if(ft(l,"leaflet-image-layer"),this._zoomAnimated&&ft(l,"leaflet-zoom-animated"),this.options.className&&ft(l,this.options.className),l.onselectstart=p,l.onmousemove=p,l.onload=a(this.fire,this,"load"),l.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),o){this._url=l.src;return}l.src=this._url,l.alt=this.options.alt},_animateZoom:function(o){var l=this._map.getZoomScale(o.zoom),u=this._map._latLngBoundsToNewLayerBounds(this._bounds,o.zoom,o.center).min;bn(this._image,u,l)},_reset:function(){var o=this._image,l=new at(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),u=l.getSize();Gt(o,l.min),o.style.width=u.x+"px",o.style.height=u.y+"px"},_updateOpacity:function(){Se(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var o=this.options.errorOverlayUrl;o&&this._url!==o&&(this._url=o,this._image.src=o)},getCenter:function(){return this._bounds.getCenter()}}),PL=function(o,l,u){return new oa(o,l,u)},tg=oa.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var o=this._url.tagName==="VIDEO",l=this._image=o?this._url:Et("video");if(ft(l,"leaflet-image-layer"),this._zoomAnimated&&ft(l,"leaflet-zoom-animated"),this.options.className&&ft(l,this.options.className),l.onselectstart=p,l.onmousemove=p,l.onloadeddata=a(this.fire,this,"load"),o){for(var u=l.getElementsByTagName("source"),g=[],_=0;_<u.length;_++)g.push(u[_].src);this._url=u.length>0?g:[l.src];return}x(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(l.style,"objectFit")&&(l.style.objectFit="fill"),l.autoplay=!!this.options.autoplay,l.loop=!!this.options.loop,l.muted=!!this.options.muted,l.playsInline=!!this.options.playsInline;for(var w=0;w<this._url.length;w++){var P=Et("source");P.src=this._url[w],l.appendChild(P)}}});function kL(o,l,u){return new tg(o,l,u)}var eg=oa.extend({_initImage:function(){var o=this._image=this._url;ft(o,"leaflet-image-layer"),this._zoomAnimated&&ft(o,"leaflet-zoom-animated"),this.options.className&&ft(o,this.options.className),o.onselectstart=p,o.onmousemove=p}});function RL(o,l,u){return new eg(o,l,u)}var ri=Ue.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(o,l){o&&(o instanceof it||x(o))?(this._latlng=ht(o),b(this,l)):(b(this,o),this._source=l),this.options.content&&(this._content=this.options.content)},openOn:function(o){return o=arguments.length?o:this._source._map,o.hasLayer(this)||o.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(o){return this._map?this.close():(arguments.length?this._source=o:o=this._source,this._prepareOpen(),this.openOn(o._map)),this},onAdd:function(o){this._zoomAnimated=o._zoomAnimated,this._container||this._initLayout(),o._fadeAnimated&&Se(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),o._fadeAnimated&&Se(this._container,1),this.bringToFront(),this.options.interactive&&(ft(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(o){o._fadeAnimated?(Se(this._container,0),this._removeTimeout=setTimeout(a(At,void 0,this._container),200)):At(this._container),this.options.interactive&&(Ft(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(o){return this._latlng=ht(o),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(o){return this._content=o,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var o={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&lr(this._container),this},bringToBack:function(){return this._map&&hr(this._container),this},_prepareOpen:function(o){var l=this._source;if(!l._map)return!1;if(l instanceof bi){l=null;var u=this._source._layers;for(var g in u)if(u[g]._map){l=u[g];break}if(!l)return!1;this._source=l}if(!o)if(l.getCenter)o=l.getCenter();else if(l.getLatLng)o=l.getLatLng();else if(l.getBounds)o=l.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(o),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var o=this._contentNode,l=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof l=="string")o.innerHTML=l;else{for(;o.hasChildNodes();)o.removeChild(o.firstChild);o.appendChild(l)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var o=this._map.latLngToLayerPoint(this._latlng),l=H(this.options.offset),u=this._getAnchor();this._zoomAnimated?Gt(this._container,o.add(u)):l=l.add(o).add(u);var g=this._containerBottom=-l.y,_=this._containerLeft=-Math.round(this._containerWidth/2)+l.x;this._container.style.bottom=g+"px",this._container.style.left=_+"px"}},_getAnchor:function(){return[0,0]}});yt.include({_initOverlay:function(o,l,u,g){var _=l;return _ instanceof o||(_=new o(g).setContent(l)),u&&_.setLatLng(u),_}}),Ue.include({_initOverlay:function(o,l,u,g){var _=u;return _ instanceof o?(b(_,g),_._source=this):(_=l&&!g?l:new o(g,this),_.setContent(u)),_}});var aa=ri.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(o){return o=arguments.length?o:this._source._map,!o.hasLayer(this)&&o._popup&&o._popup.options.autoClose&&o.removeLayer(o._popup),o._popup=this,ri.prototype.openOn.call(this,o)},onAdd:function(o){ri.prototype.onAdd.call(this,o),o.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof rn||this._source.on("preclick",Tn))},onRemove:function(o){ri.prototype.onRemove.call(this,o),o.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof rn||this._source.off("preclick",Tn))},getEvents:function(){var o=ri.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(o.preclick=this.close),this.options.keepInView&&(o.moveend=this._adjustPan),o},_initLayout:function(){var o="leaflet-popup",l=this._container=Et("div",o+" "+(this.options.className||"")+" leaflet-zoom-animated"),u=this._wrapper=Et("div",o+"-content-wrapper",l);if(this._contentNode=Et("div",o+"-content",u),ls(l),Eh(this._contentNode),ut(l,"contextmenu",Tn),this._tipContainer=Et("div",o+"-tip-container",l),this._tip=Et("div",o+"-tip",this._tipContainer),this.options.closeButton){var g=this._closeButton=Et("a",o+"-close-button",l);g.setAttribute("role","button"),g.setAttribute("aria-label","Close popup"),g.href="#close",g.innerHTML='<span aria-hidden="true">&#215;</span>',ut(g,"click",function(_){Qt(_),this.close()},this)}},_updateLayout:function(){var o=this._contentNode,l=o.style;l.width="",l.whiteSpace="nowrap";var u=o.offsetWidth;u=Math.min(u,this.options.maxWidth),u=Math.max(u,this.options.minWidth),l.width=u+1+"px",l.whiteSpace="",l.height="";var g=o.offsetHeight,_=this.options.maxHeight,w="leaflet-popup-scrolled";_&&g>_?(l.height=_+"px",ft(o,w)):Ft(o,w),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),u=this._getAnchor();Gt(this._container,l.add(u))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,l=parseInt(rs(this._container,"marginBottom"),10)||0,u=this._container.offsetHeight+l,g=this._containerWidth,_=new U(this._containerLeft,-u-this._containerBottom);_._add(Cn(this._container));var w=o.layerPointToContainerPoint(_),P=H(this.options.autoPanPadding),A=H(this.options.autoPanPaddingTopLeft||P),D=H(this.options.autoPanPaddingBottomRight||P),B=o.getSize(),q=0,st=0;w.x+g+D.x>B.x&&(q=w.x+g-B.x+D.x),w.x-q-A.x<0&&(q=w.x-A.x),w.y+u+D.y>B.y&&(st=w.y+u-B.y+D.y),w.y-st-A.y<0&&(st=w.y-A.y),(q||st)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([q,st]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),AL=function(o,l){return new aa(o,l)};yt.mergeOptions({closePopupOnClick:!0}),yt.include({openPopup:function(o,l,u){return this._initOverlay(aa,o,l,u).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),Ue.include({bindPopup:function(o,l){return this._popup=this._initOverlay(aa,this._popup,o,l),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(o){return this._popup&&(this instanceof bi||(this._popup._source=this),this._popup._prepareOpen(o||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Mn(o);var l=o.layer||o.target;if(this._popup._source===l&&!(l instanceof rn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=l,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var la=ri.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){ri.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){ri.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=ri.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",l=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Et("div",l),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var l,u,g=this._map,_=this._container,w=g.latLngToContainerPoint(g.getCenter()),P=g.layerPointToContainerPoint(o),A=this.options.direction,D=_.offsetWidth,B=_.offsetHeight,q=H(this.options.offset),st=this._getAnchor();A==="top"?(l=D/2,u=B):A==="bottom"?(l=D/2,u=0):A==="center"?(l=D/2,u=B/2):A==="right"?(l=0,u=B/2):A==="left"?(l=D,u=B/2):P.x<w.x?(A="right",l=0,u=B/2):(A="left",l=D+(q.x+st.x)*2,u=B/2),o=o.subtract(H(l,u,!0)).add(q).add(st),Ft(_,"leaflet-tooltip-right"),Ft(_,"leaflet-tooltip-left"),Ft(_,"leaflet-tooltip-top"),Ft(_,"leaflet-tooltip-bottom"),ft(_,"leaflet-tooltip-"+A),Gt(_,o)},_updatePosition:function(){var o=this._map.latLngToLayerPoint(this._latlng);this._setPosition(o)},setOpacity:function(o){this.options.opacity=o,this._container&&Se(this._container,o)},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center);this._setPosition(l)},_getAnchor:function(){return H(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),IL=function(o,l){return new la(o,l)};yt.include({openTooltip:function(o,l,u){return this._initOverlay(la,o,l,u).openOn(this),this},closeTooltip:function(o){return o.close(),this}}),Ue.include({bindTooltip:function(o,l){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(la,this._tooltip,o,l),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(o){if(!(!o&&this._tooltipHandlersAdded)){var l=o?"off":"on",u={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?u.add=this._openTooltip:(u.mouseover=this._openTooltip,u.mouseout=this.closeTooltip,u.click=this._openTooltip,this._map?this._addFocusListeners():u.add=this._addFocusListeners),this._tooltip.options.sticky&&(u.mousemove=this._moveTooltip),this[l](u),this._tooltipHandlersAdded=!o}},openTooltip:function(o){return this._tooltip&&(this instanceof bi||(this._tooltip._source=this),this._tooltip._prepareOpen(o)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(o){return this._tooltip&&this._tooltip.setContent(o),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(o){var l=typeof o.getElement=="function"&&o.getElement();l&&(ut(l,"focus",function(){this._tooltip._source=o,this.openTooltip()},this),ut(l,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(o){var l=typeof o.getElement=="function"&&o.getElement();l&&l.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(o){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var l=this;this._map.once("moveend",function(){l._openOnceFlag=!1,l._openTooltip(o)});return}this._tooltip._source=o.layer||o.target,this.openTooltip(this._tooltip.options.sticky?o.latlng:void 0)}},_moveTooltip:function(o){var l=o.latlng,u,g;this._tooltip.options.sticky&&o.originalEvent&&(u=this._map.mouseEventToContainerPoint(o.originalEvent),g=this._map.containerPointToLayerPoint(u),l=this._map.layerPointToLatLng(g)),this._tooltip.setLatLng(l)}});var ig=ur.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(o){var l=o&&o.tagName==="DIV"?o:document.createElement("div"),u=this.options;if(u.html instanceof Element?(Yo(l),l.appendChild(u.html)):l.innerHTML=u.html!==!1?u.html:"",u.bgPos){var g=H(u.bgPos);l.style.backgroundPosition=-g.x+"px "+-g.y+"px"}return this._setIconStyles(l,"icon"),l},createShadow:function(){return null}});function DL(o){return new ig(o)}ur.Default=us;var ds=Ue.extend({options:{tileSize:256,opacity:1,updateWhenIdle:J.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(o){b(this,o)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(o){o._addZoomLimit(this)},onRemove:function(o){this._removeAllTiles(),At(this._container),o._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(lr(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(hr(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(o){return this.options.opacity=o,this._updateOpacity(),this},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var o=this._clampZoom(this._map.getZoom());o!==this._tileZoom&&(this._tileZoom=o,this._updateLevels()),this._update()}return this},getEvents:function(){var o={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=d(this._onMoveEnd,this.options.updateInterval,this)),o.move=this._onMove),this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},createTile:function(){return document.createElement("div")},getTileSize:function(){var o=this.options.tileSize;return o instanceof U?o:new U(o,o)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(o){for(var l=this.getPane().children,u=-o(-1/0,1/0),g=0,_=l.length,w;g<_;g++)w=l[g].style.zIndex,l[g]!==this._container&&w&&(u=o(u,+w));isFinite(u)&&(this.options.zIndex=u+o(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!J.ielt9){Se(this._container,this.options.opacity);var o=+new Date,l=!1,u=!1;for(var g in this._tiles){var _=this._tiles[g];if(!(!_.current||!_.loaded)){var w=Math.min(1,(o-_.loaded)/200);Se(_.el,w),w<1?l=!0:(_.active?u=!0:this._onOpaqueTile(_),_.active=!0)}}u&&!this._noPrune&&this._pruneTiles(),l&&(W(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this))}},_onOpaqueTile:p,_initContainer:function(){this._container||(this._container=Et("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var o=this._tileZoom,l=this.options.maxZoom;if(o!==void 0){for(var u in this._levels)u=Number(u),this._levels[u].el.children.length||u===o?(this._levels[u].el.style.zIndex=l-Math.abs(o-u),this._onUpdateLevel(u)):(At(this._levels[u].el),this._removeTilesAtZoom(u),this._onRemoveLevel(u),delete this._levels[u]);var g=this._levels[o],_=this._map;return g||(g=this._levels[o]={},g.el=Et("div","leaflet-tile-container leaflet-zoom-animated",this._container),g.el.style.zIndex=l,g.origin=_.project(_.unproject(_.getPixelOrigin()),o).round(),g.zoom=o,this._setZoomTransform(g,_.getCenter(),_.getZoom()),p(g.el.offsetWidth),this._onCreateLevel(g)),this._level=g,g}},_onUpdateLevel:p,_onRemoveLevel:p,_onCreateLevel:p,_pruneTiles:function(){if(this._map){var o,l,u=this._map.getZoom();if(u>this.options.maxZoom||u<this.options.minZoom){this._removeAllTiles();return}for(o in this._tiles)l=this._tiles[o],l.retain=l.current;for(o in this._tiles)if(l=this._tiles[o],l.current&&!l.active){var g=l.coords;this._retainParent(g.x,g.y,g.z,g.z-5)||this._retainChildren(g.x,g.y,g.z,g.z+2)}for(o in this._tiles)this._tiles[o].retain||this._removeTile(o)}},_removeTilesAtZoom:function(o){for(var l in this._tiles)this._tiles[l].coords.z===o&&this._removeTile(l)},_removeAllTiles:function(){for(var o in this._tiles)this._removeTile(o)},_invalidateAll:function(){for(var o in this._levels)At(this._levels[o].el),this._onRemoveLevel(Number(o)),delete this._levels[o];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(o,l,u,g){var _=Math.floor(o/2),w=Math.floor(l/2),P=u-1,A=new U(+_,+w);A.z=+P;var D=this._tileCoordsToKey(A),B=this._tiles[D];return B&&B.active?(B.retain=!0,!0):(B&&B.loaded&&(B.retain=!0),P>g?this._retainParent(_,w,P,g):!1)},_retainChildren:function(o,l,u,g){for(var _=2*o;_<2*o+2;_++)for(var w=2*l;w<2*l+2;w++){var P=new U(_,w);P.z=u+1;var A=this._tileCoordsToKey(P),D=this._tiles[A];if(D&&D.active){D.retain=!0;continue}else D&&D.loaded&&(D.retain=!0);u+1<g&&this._retainChildren(_,w,u+1,g)}},_resetView:function(o){var l=o&&(o.pinch||o.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),l,l)},_animateZoom:function(o){this._setView(o.center,o.zoom,!0,o.noUpdate)},_clampZoom:function(o){var l=this.options;return l.minNativeZoom!==void 0&&o<l.minNativeZoom?l.minNativeZoom:l.maxNativeZoom!==void 0&&l.maxNativeZoom<o?l.maxNativeZoom:o},_setView:function(o,l,u,g){var _=Math.round(l);this.options.maxZoom!==void 0&&_>this.options.maxZoom||this.options.minZoom!==void 0&&_<this.options.minZoom?_=void 0:_=this._clampZoom(_);var w=this.options.updateWhenZooming&&_!==this._tileZoom;(!g||w)&&(this._tileZoom=_,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),_!==void 0&&this._update(o),u||this._pruneTiles(),this._noPrune=!!u),this._setZoomTransforms(o,l)},_setZoomTransforms:function(o,l){for(var u in this._levels)this._setZoomTransform(this._levels[u],o,l)},_setZoomTransform:function(o,l,u){var g=this._map.getZoomScale(u,o.zoom),_=o.origin.multiplyBy(g).subtract(this._map._getNewPixelOrigin(l,u)).round();J.any3d?bn(o.el,_,g):Gt(o.el,_)},_resetGrid:function(){var o=this._map,l=o.options.crs,u=this._tileSize=this.getTileSize(),g=this._tileZoom,_=this._map.getPixelWorldBounds(this._tileZoom);_&&(this._globalTileRange=this._pxBoundsToTileRange(_)),this._wrapX=l.wrapLng&&!this.options.noWrap&&[Math.floor(o.project([0,l.wrapLng[0]],g).x/u.x),Math.ceil(o.project([0,l.wrapLng[1]],g).x/u.y)],this._wrapY=l.wrapLat&&!this.options.noWrap&&[Math.floor(o.project([l.wrapLat[0],0],g).y/u.x),Math.ceil(o.project([l.wrapLat[1],0],g).y/u.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(o){var l=this._map,u=l._animatingZoom?Math.max(l._animateToZoom,l.getZoom()):l.getZoom(),g=l.getZoomScale(u,this._tileZoom),_=l.project(o,this._tileZoom).floor(),w=l.getSize().divideBy(g*2);return new at(_.subtract(w),_.add(w))},_update:function(o){var l=this._map;if(l){var u=this._clampZoom(l.getZoom());if(o===void 0&&(o=l.getCenter()),this._tileZoom!==void 0){var g=this._getTiledPixelBounds(o),_=this._pxBoundsToTileRange(g),w=_.getCenter(),P=[],A=this.options.keepBuffer,D=new at(_.getBottomLeft().subtract([A,-A]),_.getTopRight().add([A,-A]));if(!(isFinite(_.min.x)&&isFinite(_.min.y)&&isFinite(_.max.x)&&isFinite(_.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var B in this._tiles){var q=this._tiles[B].coords;(q.z!==this._tileZoom||!D.contains(new U(q.x,q.y)))&&(this._tiles[B].current=!1)}if(Math.abs(u-this._tileZoom)>1){this._setView(o,u);return}for(var st=_.min.y;st<=_.max.y;st++)for(var _t=_.min.x;_t<=_.max.x;_t++){var he=new U(_t,st);if(he.z=this._tileZoom,!!this._isValidTile(he)){var Kt=this._tiles[this._tileCoordsToKey(he)];Kt?Kt.current=!0:P.push(he)}}if(P.sort(function(me,pr){return me.distanceTo(w)-pr.distanceTo(w)}),P.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ke=document.createDocumentFragment();for(_t=0;_t<P.length;_t++)this._addTile(P[_t],ke);this._level.el.appendChild(ke)}}}},_isValidTile:function(o){var l=this._map.options.crs;if(!l.infinite){var u=this._globalTileRange;if(!l.wrapLng&&(o.x<u.min.x||o.x>u.max.x)||!l.wrapLat&&(o.y<u.min.y||o.y>u.max.y))return!1}if(!this.options.bounds)return!0;var g=this._tileCoordsToBounds(o);return et(this.options.bounds).overlaps(g)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var l=this._map,u=this.getTileSize(),g=o.scaleBy(u),_=g.add(u),w=l.unproject(g,o.z),P=l.unproject(_,o.z);return[w,P]},_tileCoordsToBounds:function(o){var l=this._tileCoordsToNwSe(o),u=new wt(l[0],l[1]);return this.options.noWrap||(u=this._map.wrapLatLngBounds(u)),u},_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var l=o.split(":"),u=new U(+l[0],+l[1]);return u.z=+l[2],u},_removeTile:function(o){var l=this._tiles[o];l&&(At(l.el),delete this._tiles[o],this.fire("tileunload",{tile:l.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){ft(o,"leaflet-tile");var l=this.getTileSize();o.style.width=l.x+"px",o.style.height=l.y+"px",o.onselectstart=p,o.onmousemove=p,J.ielt9&&this.options.opacity<1&&Se(o,this.options.opacity)},_addTile:function(o,l){var u=this._getTilePos(o),g=this._tileCoordsToKey(o),_=this.createTile(this._wrapCoords(o),a(this._tileReady,this,o));this._initTile(_),this.createTile.length<2&&j(a(this._tileReady,this,o,null,_)),Gt(_,u),this._tiles[g]={el:_,coords:o,current:!0},l.appendChild(_),this.fire("tileloadstart",{tile:_,coords:o})},_tileReady:function(o,l,u){l&&this.fire("tileerror",{error:l,tile:u,coords:o});var g=this._tileCoordsToKey(o);u=this._tiles[g],u&&(u.loaded=+new Date,this._map._fadeAnimated?(Se(u.el,0),W(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this)):(u.active=!0,this._pruneTiles()),l||(ft(u.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:u.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),J.ielt9||!this._map._fadeAnimated?j(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var l=new U(this._wrapX?f(o.x,this._wrapX):o.x,this._wrapY?f(o.y,this._wrapY):o.y);return l.z=o.z,l},_pxBoundsToTileRange:function(o){var l=this.getTileSize();return new at(o.min.unscaleBy(l).floor(),o.max.unscaleBy(l).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function OL(o){return new ds(o)}var gr=ds.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,l){this._url=o,l=b(this,l),l.detectRetina&&J.retina&&l.maxZoom>0?(l.tileSize=Math.floor(l.tileSize/2),l.zoomReverse?(l.zoomOffset--,l.minZoom=Math.min(l.maxZoom,l.minZoom+1)):(l.zoomOffset++,l.maxZoom=Math.max(l.minZoom,l.maxZoom-1)),l.minZoom=Math.max(0,l.minZoom)):l.zoomReverse?l.minZoom=Math.min(l.maxZoom,l.minZoom):l.maxZoom=Math.max(l.minZoom,l.maxZoom),typeof l.subdomains=="string"&&(l.subdomains=l.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,l){return this._url===o&&l===void 0&&(l=!0),this._url=o,l||this.redraw(),this},createTile:function(o,l){var u=document.createElement("img");return ut(u,"load",a(this._tileOnLoad,this,l,u)),ut(u,"error",a(this._tileOnError,this,l,u)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(u.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(u.referrerPolicy=this.options.referrerPolicy),u.alt="",u.src=this.getTileUrl(o),u},getTileUrl:function(o){var l={r:J.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var u=this._globalTileRange.max.y-o.y;this.options.tms&&(l.y=u),l["-y"]=u}return y(this._url,i(l,this.options))},_tileOnLoad:function(o,l){J.ielt9?setTimeout(a(o,this,null,l),0):o(null,l)},_tileOnError:function(o,l,u){var g=this.options.errorTileUrl;g&&l.getAttribute("src")!==g&&(l.src=g),o(u,l)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,l=this.options.maxZoom,u=this.options.zoomReverse,g=this.options.zoomOffset;return u&&(o=l-o),o+g},_getSubdomain:function(o){var l=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[l]},_abortLoading:function(){var o,l;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(l=this._tiles[o].el,l.onload=p,l.onerror=p,!l.complete)){l.src=T;var u=this._tiles[o].coords;At(l),delete this._tiles[o],this.fire("tileabort",{tile:l,coords:u})}},_removeTile:function(o){var l=this._tiles[o];if(l)return l.el.setAttribute("src",T),ds.prototype._removeTile.call(this,o)},_tileReady:function(o,l,u){if(!(!this._map||u&&u.getAttribute("src")===T))return ds.prototype._tileReady.call(this,o,l,u)}});function ng(o,l){return new gr(o,l)}var rg=gr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,l){this._url=o;var u=i({},this.defaultWmsParams);for(var g in l)g in this.options||(u[g]=l[g]);l=b(this,l);var _=l.detectRetina&&J.retina?2:1,w=this.getTileSize();u.width=w.x*_,u.height=w.y*_,this.wmsParams=u},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var l=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[l]=this._crs.code,gr.prototype.onAdd.call(this,o)},getTileUrl:function(o){var l=this._tileCoordsToNwSe(o),u=this._crs,g=F(u.project(l[0]),u.project(l[1])),_=g.min,w=g.max,P=(this._wmsVersion>=1.3&&this._crs===qf?[_.y,_.x,w.y,w.x]:[_.x,_.y,w.x,w.y]).join(","),A=gr.prototype.getTileUrl.call(this,o);return A+M(this.wmsParams,A,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+P},setParams:function(o,l){return i(this.wmsParams,o),l||this.redraw(),this}});function FL(o,l){return new rg(o,l)}gr.WMS=rg,ng.wms=FL;var Mi=Ue.extend({options:{padding:.1},initialize:function(o){b(this,o),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ft(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,l){var u=this._map.getZoomScale(l,this._zoom),g=this._map.getSize().multiplyBy(.5+this.options.padding),_=this._map.project(this._center,l),w=g.multiplyBy(-u).add(_).subtract(this._map._getNewPixelOrigin(o,l));J.any3d?bn(this._container,w,u):Gt(this._container,w)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,l=this._map.getSize(),u=this._map.containerPointToLayerPoint(l.multiplyBy(-o)).round();this._bounds=new at(u,u.add(l.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sg=Mi.extend({options:{tolerance:0},getEvents:function(){var o=Mi.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Mi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");ut(o,"mousemove",this._onMouseMove,this),ut(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ut(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){W(this._redrawRequest),delete this._ctx,At(this._container),Pt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var l in this._layers)o=this._layers[l],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mi.prototype._update.call(this);var o=this._bounds,l=this._container,u=o.getSize(),g=J.retina?2:1;Gt(l,o.min),l.width=g*u.x,l.height=g*u.y,l.style.width=u.x+"px",l.style.height=u.y+"px",J.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){Mi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[c(o)]=o;var l=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=l),this._drawLast=l,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var l=o._order,u=l.next,g=l.prev;u?u.prev=g:this._drawLast=g,g?g.next=u:this._drawFirst=u,delete o._order,delete this._layers[c(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)},_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var l=o.options.dashArray.split(/[, ]+/),u=[],g,_;for(_=0;_<l.length;_++){if(g=Number(l[_]),isNaN(g))return;u.push(g)}o.options._dashArray=u}else o.options._dashArray=o.options.dashArray},_requestRedraw:function(o){this._map&&(this._extendRedrawBounds(o),this._redrawRequest=this._redrawRequest||j(this._redraw,this))},_extendRedrawBounds:function(o){if(o._pxBounds){var l=(o.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new at,this._redrawBounds.extend(o._pxBounds.min.subtract([l,l])),this._redrawBounds.extend(o._pxBounds.max.add([l,l]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var o=this._redrawBounds;if(o){var l=o.getSize();this._ctx.clearRect(o.min.x,o.min.y,l.x,l.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var o,l=this._redrawBounds;if(this._ctx.save(),l){var u=l.getSize();this._ctx.beginPath(),this._ctx.rect(l.min.x,l.min.y,u.x,u.y),this._ctx.clip()}this._drawing=!0;for(var g=this._drawFirst;g;g=g.next)o=g.layer,(!l||o._pxBounds&&o._pxBounds.intersects(l))&&o._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(o,l){if(this._drawing){var u,g,_,w,P=o._parts,A=P.length,D=this._ctx;if(A){for(D.beginPath(),u=0;u<A;u++){for(g=0,_=P[u].length;g<_;g++)w=P[u][g],D[g?"lineTo":"moveTo"](w.x,w.y);l&&D.closePath()}this._fillStroke(D,o)}}},_updateCircle:function(o){if(!(!this._drawing||o._empty())){var l=o._point,u=this._ctx,g=Math.max(Math.round(o._radius),1),_=(Math.max(Math.round(o._radiusY),1)||g)/g;_!==1&&(u.save(),u.scale(1,_)),u.beginPath(),u.arc(l.x,l.y/_,g,0,Math.PI*2,!1),_!==1&&u.restore(),this._fillStroke(u,o)}},_fillStroke:function(o,l){var u=l.options;u.fill&&(o.globalAlpha=u.fillOpacity,o.fillStyle=u.fillColor||u.color,o.fill(u.fillRule||"evenodd")),u.stroke&&u.weight!==0&&(o.setLineDash&&o.setLineDash(l.options&&l.options._dashArray||[]),o.globalAlpha=u.opacity,o.lineWidth=u.weight,o.strokeStyle=u.color,o.lineCap=u.lineCap,o.lineJoin=u.lineJoin,o.stroke())},_onClick:function(o){for(var l=this._map.mouseEventToLayerPoint(o),u,g,_=this._drawFirst;_;_=_.next)u=_.layer,u.options.interactive&&u._containsPoint(l)&&(!(o.type==="click"||o.type==="preclick")||!this._map._draggableMoved(u))&&(g=u);this._fireEvent(g?[g]:!1,o)},_onMouseMove:function(o){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var l=this._map.mouseEventToLayerPoint(o);this._handleMouseHover(o,l)}},_handleMouseOut:function(o){var l=this._hoveredLayer;l&&(Ft(this._container,"leaflet-interactive"),this._fireEvent([l],o,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(o,l){if(!this._mouseHoverThrottled){for(var u,g,_=this._drawFirst;_;_=_.next)u=_.layer,u.options.interactive&&u._containsPoint(l)&&(g=u);g!==this._hoveredLayer&&(this._handleMouseOut(o),g&&(ft(this._container,"leaflet-interactive"),this._fireEvent([g],o,"mouseover"),this._hoveredLayer=g)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,o),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(o,l,u){this._map._fireDOMEvent(l,u||l.type,o)},_bringToFront:function(o){var l=o._order;if(l){var u=l.next,g=l.prev;if(u)u.prev=g;else return;g?g.next=u:u&&(this._drawFirst=u),l.prev=this._drawLast,this._drawLast.next=l,l.next=null,this._drawLast=l,this._requestRedraw(o)}},_bringToBack:function(o){var l=o._order;if(l){var u=l.next,g=l.prev;if(g)g.next=u;else return;u?u.prev=g:g&&(this._drawLast=g),l.prev=null,l.next=this._drawFirst,this._drawFirst.prev=l,this._drawFirst=l,this._requestRedraw(o)}}});function og(o){return J.canvas?new sg(o):null}var fs=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(o){return document.createElement("<lvml:"+o+' class="lvml">')}}catch{}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zL={_initContainer:function(){this._container=Et("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Mi.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var l=o._container=fs("shape");ft(l,"leaflet-vml-shape "+(this.options.className||"")),l.coordsize="1 1",o._path=fs("path"),l.appendChild(o._path),this._updateStyle(o),this._layers[c(o)]=o},_addPath:function(o){var l=o._container;this._container.appendChild(l),o.options.interactive&&o.addInteractiveTarget(l)},_removePath:function(o){var l=o._container;At(l),o.removeInteractiveTarget(l),delete this._layers[c(o)]},_updateStyle:function(o){var l=o._stroke,u=o._fill,g=o.options,_=o._container;_.stroked=!!g.stroke,_.filled=!!g.fill,g.stroke?(l||(l=o._stroke=fs("stroke")),_.appendChild(l),l.weight=g.weight+"px",l.color=g.color,l.opacity=g.opacity,g.dashArray?l.dashStyle=x(g.dashArray)?g.dashArray.join(" "):g.dashArray.replace(/( *, *)/g," "):l.dashStyle="",l.endcap=g.lineCap.replace("butt","flat"),l.joinstyle=g.lineJoin):l&&(_.removeChild(l),o._stroke=null),g.fill?(u||(u=o._fill=fs("fill")),_.appendChild(u),u.color=g.fillColor||g.color,u.opacity=g.fillOpacity):u&&(_.removeChild(u),o._fill=null)},_updateCircle:function(o){var l=o._point.round(),u=Math.round(o._radius),g=Math.round(o._radiusY||u);this._setPath(o,o._empty()?"M0 0":"AL "+l.x+","+l.y+" "+u+","+g+" 0,"+65535*360)},_setPath:function(o,l){o._path.v=l},_bringToFront:function(o){lr(o._container)},_bringToBack:function(o){hr(o._container)}},ha=J.vml?fs:Ki,gs=Mi.extend({_initContainer:function(){this._container=ha("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ha("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){At(this._container),Pt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mi.prototype._update.call(this);var o=this._bounds,l=o.getSize(),u=this._container;(!this._svgSize||!this._svgSize.equals(l))&&(this._svgSize=l,u.setAttribute("width",l.x),u.setAttribute("height",l.y)),Gt(u,o.min),u.setAttribute("viewBox",[o.min.x,o.min.y,l.x,l.y].join(" ")),this.fire("update")}},_initPath:function(o){var l=o._path=ha("path");o.options.className&&ft(l,o.options.className),o.options.interactive&&ft(l,"leaflet-interactive"),this._updateStyle(o),this._layers[c(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){At(o._path),o.removeInteractiveTarget(o._path),delete this._layers[c(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var l=o._path,u=o.options;l&&(u.stroke?(l.setAttribute("stroke",u.color),l.setAttribute("stroke-opacity",u.opacity),l.setAttribute("stroke-width",u.weight),l.setAttribute("stroke-linecap",u.lineCap),l.setAttribute("stroke-linejoin",u.lineJoin),u.dashArray?l.setAttribute("stroke-dasharray",u.dashArray):l.removeAttribute("stroke-dasharray"),u.dashOffset?l.setAttribute("stroke-dashoffset",u.dashOffset):l.removeAttribute("stroke-dashoffset")):l.setAttribute("stroke","none"),u.fill?(l.setAttribute("fill",u.fillColor||u.color),l.setAttribute("fill-opacity",u.fillOpacity),l.setAttribute("fill-rule",u.fillRule||"evenodd")):l.setAttribute("fill","none"))},_updatePoly:function(o,l){this._setPath(o,Fe(o._parts,l))},_updateCircle:function(o){var l=o._point,u=Math.max(Math.round(o._radius),1),g=Math.max(Math.round(o._radiusY),1)||u,_="a"+u+","+g+" 0 1,0 ",w=o._empty()?"M0 0":"M"+(l.x-u)+","+l.y+_+u*2+",0 "+_+-u*2+",0 ";this._setPath(o,w)},_setPath:function(o,l){o._path.setAttribute("d",l)},_bringToFront:function(o){lr(o._path)},_bringToBack:function(o){hr(o._path)}});J.vml&&gs.include(zL);function ag(o){return J.svg||J.vml?new gs(o):null}yt.include({getRenderer:function(o){var l=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return l||(l=this._renderer=this._createRenderer()),this.hasLayer(l)||this.addLayer(l),l},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var l=this._paneRenderers[o];return l===void 0&&(l=this._createRenderer({pane:o}),this._paneRenderers[o]=l),l},_createRenderer:function(o){return this.options.preferCanvas&&og(o)||ag(o)}});var lg=dr.extend({initialize:function(o,l){dr.prototype.initialize.call(this,this._boundsToLatLngs(o),l)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))},_boundsToLatLngs:function(o){return o=et(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function NL(o,l){return new lg(o,l)}gs.create=ha,gs.pointsToPath=Fe,Ti.geometryToLayer=ia,Ti.coordsToLatLng=Rh,Ti.coordsToLatLngs=na,Ti.latLngToCoords=Ah,Ti.latLngsToCoords=ra,Ti.getFeature=fr,Ti.asFeature=sa,yt.mergeOptions({boxZoom:!0});var hg=ni.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){ut(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){At(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ss(),gh(),this._startPoint=this._map.mouseEventToContainerPoint(o),ut(document,{contextmenu:Mn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=Et("div","leaflet-zoom-box",this._container),ft(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var l=new at(this._point,this._startPoint),u=l.getSize();Gt(this._box,l.min),this._box.style.width=u.x+"px",this._box.style.height=u.y+"px"},_finish:function(){this._moved&&(At(this._box),Ft(this._container,"leaflet-crosshair")),os(),ph(),Pt(document,{contextmenu:Mn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var l=new wt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(l).fire("boxzoomend",{boxZoomBounds:l})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});yt.addInitHook("addHandler","boxZoom",hg),yt.mergeOptions({doubleClickZoom:!0});var cg=ni.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var l=this._map,u=l.getZoom(),g=l.options.zoomDelta,_=o.originalEvent.shiftKey?u-g:u+g;l.options.doubleClickZoom==="center"?l.setZoom(_):l.setZoomAround(o.containerPoint,_)}});yt.addInitHook("addHandler","doubleClickZoom",cg),yt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ug=ni.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new nn(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}ft(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ft(this._map._container,"leaflet-grab"),Ft(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var l=et(this._map.options.maxBounds);this._offsetLimit=F(this._map.latLngToContainerPoint(l.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(l.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var l=this._lastTime=+new Date,u=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(u),this._times.push(l),this._prunePositions(l)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),l=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=l.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,l){return o-(o-l)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),l=this._offsetLimit;o.x<l.min.x&&(o.x=this._viscousLimit(o.x,l.min.x)),o.y<l.min.y&&(o.y=this._viscousLimit(o.y,l.min.y)),o.x>l.max.x&&(o.x=this._viscousLimit(o.x,l.max.x)),o.y>l.max.y&&(o.y=this._viscousLimit(o.y,l.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,l=Math.round(o/2),u=this._initialWorldOffset,g=this._draggable._newPos.x,_=(g-l+u)%o+l-u,w=(g+l+u)%o-l-u,P=Math.abs(_+u)<Math.abs(w+u)?_:w;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=P},_onDragEnd:function(o){var l=this._map,u=l.options,g=!u.inertia||o.noInertia||this._times.length<2;if(l.fire("dragend",o),g)l.fire("moveend");else{this._prunePositions(+new Date);var _=this._lastPos.subtract(this._positions[0]),w=(this._lastTime-this._times[0])/1e3,P=u.easeLinearity,A=_.multiplyBy(P/w),D=A.distanceTo([0,0]),B=Math.min(u.inertiaMaxSpeed,D),q=A.multiplyBy(B/D),st=B/(u.inertiaDeceleration*P),_t=q.multiplyBy(-st/2).round();!_t.x&&!_t.y?l.fire("moveend"):(_t=l._limitOffset(_t,l.options.maxBounds),j(function(){l.panBy(_t,{duration:st,easeLinearity:P,noMoveStart:!0,animate:!0})}))}}});yt.addInitHook("addHandler","dragging",ug),yt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var dg=ni.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(o){this._map=o,this._setPanDelta(o.options.keyboardPanDelta),this._setZoomDelta(o.options.zoomDelta)},addHooks:function(){var o=this._map._container;o.tabIndex<=0&&(o.tabIndex="0"),ut(o,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Pt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var o=document.body,l=document.documentElement,u=o.scrollTop||l.scrollTop,g=o.scrollLeft||l.scrollLeft;this._map._container.focus(),window.scrollTo(g,u)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(o){var l=this._panKeys={},u=this.keyCodes,g,_;for(g=0,_=u.left.length;g<_;g++)l[u.left[g]]=[-1*o,0];for(g=0,_=u.right.length;g<_;g++)l[u.right[g]]=[o,0];for(g=0,_=u.down.length;g<_;g++)l[u.down[g]]=[0,o];for(g=0,_=u.up.length;g<_;g++)l[u.up[g]]=[0,-1*o]},_setZoomDelta:function(o){var l=this._zoomKeys={},u=this.keyCodes,g,_;for(g=0,_=u.zoomIn.length;g<_;g++)l[u.zoomIn[g]]=o;for(g=0,_=u.zoomOut.length;g<_;g++)l[u.zoomOut[g]]=-o},_addHooks:function(){ut(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Pt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(o){if(!(o.altKey||o.ctrlKey||o.metaKey)){var l=o.keyCode,u=this._map,g;if(l in this._panKeys){if(!u._panAnim||!u._panAnim._inProgress)if(g=this._panKeys[l],o.shiftKey&&(g=H(g).multiplyBy(3)),u.options.maxBounds&&(g=u._limitOffset(H(g),u.options.maxBounds)),u.options.worldCopyJump){var _=u.wrapLatLng(u.unproject(u.project(u.getCenter()).add(g)));u.panTo(_)}else u.panBy(g)}else if(l in this._zoomKeys)u.setZoom(u.getZoom()+(o.shiftKey?3:1)*this._zoomKeys[l]);else if(l===27&&u._popup&&u._popup.options.closeOnEscapeKey)u.closePopup();else return;Mn(o)}}});yt.addInitHook("addHandler","keyboard",dg),yt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var fg=ni.extend({addHooks:function(){ut(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Pt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(o){var l=zf(o),u=this._map.options.wheelDebounceTime;this._delta+=l,this._lastMousePos=this._map.mouseEventToContainerPoint(o),this._startTime||(this._startTime=+new Date);var g=Math.max(u-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),g),Mn(o)},_performZoom:function(){var o=this._map,l=o.getZoom(),u=this._map.options.zoomSnap||0;o._stop();var g=this._delta/(this._map.options.wheelPxPerZoomLevel*4),_=4*Math.log(2/(1+Math.exp(-Math.abs(g))))/Math.LN2,w=u?Math.ceil(_/u)*u:_,P=o._limitZoom(l+(this._delta>0?w:-w))-l;this._delta=0,this._startTime=null,P&&(o.options.scrollWheelZoom==="center"?o.setZoom(l+P):o.setZoomAround(this._lastMousePos,l+P))}});yt.addInitHook("addHandler","scrollWheelZoom",fg);var BL=600;yt.mergeOptions({tapHold:J.touchNative&&J.safari&&J.mobile,tapTolerance:15});var gg=ni.extend({addHooks:function(){ut(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Pt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var l=o.touches[0];this._startPos=this._newPos=new U(l.clientX,l.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(ut(document,"touchend",Qt),ut(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",l))},this),BL),ut(document,"touchend touchcancel contextmenu",this._cancel,this),ut(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){Pt(document,"touchend",Qt),Pt(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),Pt(document,"touchend touchcancel contextmenu",this._cancel,this),Pt(document,"touchmove",this._onMove,this)},_onMove:function(o){var l=o.touches[0];this._newPos=new U(l.clientX,l.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,l){var u=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:l.screenX,screenY:l.screenY,clientX:l.clientX,clientY:l.clientY});u._simulated=!0,l.target.dispatchEvent(u)}});yt.addInitHook("addHandler","tapHold",gg),yt.mergeOptions({touchZoom:J.touch,bounceAtZoomLimits:!0});var pg=ni.extend({addHooks:function(){ft(this._map._container,"leaflet-touch-zoom"),ut(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ft(this._map._container,"leaflet-touch-zoom"),Pt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var l=this._map;if(!(!o.touches||o.touches.length!==2||l._animatingZoom||this._zooming)){var u=l.mouseEventToContainerPoint(o.touches[0]),g=l.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=l.getSize()._divideBy(2),this._startLatLng=l.containerPointToLatLng(this._centerPoint),l.options.touchZoom!=="center"&&(this._pinchStartLatLng=l.containerPointToLatLng(u.add(g)._divideBy(2))),this._startDist=u.distanceTo(g),this._startZoom=l.getZoom(),this._moved=!1,this._zooming=!0,l._stop(),ut(document,"touchmove",this._onTouchMove,this),ut(document,"touchend touchcancel",this._onTouchEnd,this),Qt(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var l=this._map,u=l.mouseEventToContainerPoint(o.touches[0]),g=l.mouseEventToContainerPoint(o.touches[1]),_=u.distanceTo(g)/this._startDist;if(this._zoom=l.getScaleZoom(_,this._startZoom),!l.options.bounceAtZoomLimits&&(this._zoom<l.getMinZoom()&&_<1||this._zoom>l.getMaxZoom()&&_>1)&&(this._zoom=l._limitZoom(this._zoom)),l.options.touchZoom==="center"){if(this._center=this._startLatLng,_===1)return}else{var w=u._add(g)._divideBy(2)._subtract(this._centerPoint);if(_===1&&w.x===0&&w.y===0)return;this._center=l.unproject(l.project(this._pinchStartLatLng,this._zoom).subtract(w),this._zoom)}this._moved||(l._moveStart(!0,!1),this._moved=!0),W(this._animRequest);var P=a(l._move,l,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=j(P,this,!0),Qt(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,W(this._animRequest),Pt(document,"touchmove",this._onTouchMove,this),Pt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});yt.addInitHook("addHandler","touchZoom",pg),yt.BoxZoom=hg,yt.DoubleClickZoom=cg,yt.Drag=ug,yt.Keyboard=dg,yt.ScrollWheelZoom=fg,yt.TapHold=gg,yt.TouchZoom=pg,e.Bounds=at,e.Browser=J,e.CRS=kt,e.Canvas=sg,e.Circle=kh,e.CircleMarker=ea,e.Class=$,e.Control=Ge,e.DivIcon=ig,e.DivOverlay=ri,e.DomEvent=nL,e.DomUtil=eL,e.Draggable=nn,e.Evented=Z,e.FeatureGroup=bi,e.GeoJSON=Ti,e.GridLayer=ds,e.Handler=ni,e.Icon=ur,e.ImageOverlay=oa,e.LatLng=it,e.LatLngBounds=wt,e.Layer=Ue,e.LayerGroup=cr,e.LineUtil=_L,e.Map=yt,e.Marker=ta,e.Mixin=cL,e.Path=rn,e.Point=U,e.PolyUtil=uL,e.Polygon=dr,e.Polyline=Ci,e.Popup=aa,e.PosAnimation=Nf,e.Projection=mL,e.Rectangle=lg,e.Renderer=Mi,e.SVG=gs,e.SVGOverlay=eg,e.TileLayer=gr,e.Tooltip=la,e.Transformation=Xi,e.Util=Y,e.VideoOverlay=tg,e.bind=a,e.bounds=F,e.canvas=og,e.circle=CL,e.circleMarker=bL,e.control=hs,e.divIcon=DL,e.extend=i,e.featureGroup=wL,e.geoJSON=$f,e.geoJson=SL,e.gridLayer=OL,e.icon=EL,e.imageOverlay=PL,e.latLng=ht,e.latLngBounds=et,e.layerGroup=xL,e.map=rL,e.marker=LL,e.point=H,e.polygon=ML,e.polyline=TL,e.popup=AL,e.rectangle=NL,e.setOptions=b,e.stamp=c,e.svg=ag,e.svgOverlay=RL,e.tileLayer=ng,e.tooltip=IL,e.transformation=Me,e.version=n,e.videoOverlay=kL;var GL=window.L;e.noConflict=function(){return window.L=GL,this},window.L=e})}(ys,ys.exports)),ys.exports}var tt=Zh();const JL="";function Wh(r,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=r,n}function Pg(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Hh(r[0])||!Hh(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return Wh(n,t,e)}function kg(r,t,e){e===void 0&&(e={});for(var n=0,i=r;n<i.length;n++){var s=i[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}var h={type:"Polygon",coordinates:r};return Wh(h,t,e)}function Hh(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Rg(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ag(r){return r.type==="Feature"?r.geometry:r}var Vh={exports:{}};(function(r,t){(function(e,n){r.exports=n()})(je,function(){function e(y,x,C,T,k){(function R(I,z,G,j,W){for(;j>G;){if(j-G>600){var Y=j-G+1,$=z-G+1,K=Math.log(Y),V=.5*Math.exp(2*K/3),Z=.5*Math.sqrt(K*V*(Y-V)/Y)*($-Y/2<0?-1:1),U=Math.max(G,Math.floor(z-$*V/Y+Z)),xt=Math.min(j,Math.floor(z+(Y-$)*V/Y+Z));R(I,z,U,xt,W)}var H=I[z],at=G,F=j;for(n(I,G,z),W(I[j],H)>0&&n(I,G,j);at<F;){for(n(I,at,F),at++,F--;W(I[at],H)<0;)at++;for(;W(I[F],H)>0;)F--}W(I[G],H)===0?n(I,G,F):n(I,++F,j),F<=z&&(G=F+1),z<=F&&(j=F-1)}})(y,x,C||0,T||y.length-1,k||i)}function n(y,x,C){var T=y[x];y[x]=y[C],y[C]=T}function i(y,x){return y<x?-1:y>x?1:0}var s=function(y){y===void 0&&(y=9),this._maxEntries=Math.max(4,y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function a(y,x,C){if(!C)return x.indexOf(y);for(var T=0;T<x.length;T++)if(C(y,x[T]))return T;return-1}function h(y,x){c(y,0,y.children.length,x,y)}function c(y,x,C,T,k){k||(k=M(null)),k.minX=1/0,k.minY=1/0,k.maxX=-1/0,k.maxY=-1/0;for(var R=x;R<C;R++){var I=y.children[R];d(k,y.leaf?T(I):I)}return k}function d(y,x){return y.minX=Math.min(y.minX,x.minX),y.minY=Math.min(y.minY,x.minY),y.maxX=Math.max(y.maxX,x.maxX),y.maxY=Math.max(y.maxY,x.maxY),y}function f(y,x){return y.minX-x.minX}function p(y,x){return y.minY-x.minY}function m(y){return(y.maxX-y.minX)*(y.maxY-y.minY)}function v(y){return y.maxX-y.minX+(y.maxY-y.minY)}function E(y,x){return y.minX<=x.minX&&y.minY<=x.minY&&x.maxX<=y.maxX&&x.maxY<=y.maxY}function b(y,x){return x.minX<=y.maxX&&x.minY<=y.maxY&&x.maxX>=y.minX&&x.maxY>=y.minY}function M(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function S(y,x,C,T,k){for(var R=[x,C];R.length;)if(!((C=R.pop())-(x=R.pop())<=T)){var I=x+Math.ceil((C-x)/T/2)*T;e(y,I,x,C,k),R.push(x,I,I,C)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(y){var x=this.data,C=[];if(!b(y,x))return C;for(var T=this.toBBox,k=[];x;){for(var R=0;R<x.children.length;R++){var I=x.children[R],z=x.leaf?T(I):I;b(y,z)&&(x.leaf?C.push(I):E(y,z)?this._all(I,C):k.push(I))}x=k.pop()}return C},s.prototype.collides=function(y){var x=this.data;if(!b(y,x))return!1;for(var C=[];x;){for(var T=0;T<x.children.length;T++){var k=x.children[T],R=x.leaf?this.toBBox(k):k;if(b(y,R)){if(x.leaf||E(y,R))return!0;C.push(k)}}x=C.pop()}return!1},s.prototype.load=function(y){if(!y||!y.length)return this;if(y.length<this._minEntries){for(var x=0;x<y.length;x++)this.insert(y[x]);return this}var C=this._build(y.slice(),0,y.length-1,0);if(this.data.children.length)if(this.data.height===C.height)this._splitRoot(this.data,C);else{if(this.data.height<C.height){var T=this.data;this.data=C,C=T}this._insert(C,this.data.height-C.height-1,!0)}else this.data=C;return this},s.prototype.insert=function(y){return y&&this._insert(y,this.data.height-1),this},s.prototype.clear=function(){return this.data=M([]),this},s.prototype.remove=function(y,x){if(!y)return this;for(var C,T,k,R=this.data,I=this.toBBox(y),z=[],G=[];R||z.length;){if(R||(R=z.pop(),T=z[z.length-1],C=G.pop(),k=!0),R.leaf){var j=a(y,R.children,x);if(j!==-1)return R.children.splice(j,1),z.push(R),this._condense(z),this}k||R.leaf||!E(R,I)?T?(C++,R=T.children[C],k=!1):R=null:(z.push(R),G.push(C),C=0,T=R,R=R.children[0])}return this},s.prototype.toBBox=function(y){return y},s.prototype.compareMinX=function(y,x){return y.minX-x.minX},s.prototype.compareMinY=function(y,x){return y.minY-x.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(y){return this.data=y,this},s.prototype._all=function(y,x){for(var C=[];y;)y.leaf?x.push.apply(x,y.children):C.push.apply(C,y.children),y=C.pop();return x},s.prototype._build=function(y,x,C,T){var k,R=C-x+1,I=this._maxEntries;if(R<=I)return h(k=M(y.slice(x,C+1)),this.toBBox),k;T||(T=Math.ceil(Math.log(R)/Math.log(I)),I=Math.ceil(R/Math.pow(I,T-1))),(k=M([])).leaf=!1,k.height=T;var z=Math.ceil(R/I),G=z*Math.ceil(Math.sqrt(I));S(y,x,C,G,this.compareMinX);for(var j=x;j<=C;j+=G){var W=Math.min(j+G-1,C);S(y,j,W,z,this.compareMinY);for(var Y=j;Y<=W;Y+=z){var $=Math.min(Y+z-1,W);k.children.push(this._build(y,Y,$,T-1))}}return h(k,this.toBBox),k},s.prototype._chooseSubtree=function(y,x,C,T){for(;T.push(x),!x.leaf&&T.length-1!==C;){for(var k=1/0,R=1/0,I=void 0,z=0;z<x.children.length;z++){var G=x.children[z],j=m(G),W=(Y=y,$=G,(Math.max($.maxX,Y.maxX)-Math.min($.minX,Y.minX))*(Math.max($.maxY,Y.maxY)-Math.min($.minY,Y.minY))-j);W<R?(R=W,k=j<k?j:k,I=G):W===R&&j<k&&(k=j,I=G)}x=I||x.children[0]}var Y,$;return x},s.prototype._insert=function(y,x,C){var T=C?y:this.toBBox(y),k=[],R=this._chooseSubtree(T,this.data,x,k);for(R.children.push(y),d(R,T);x>=0&&k[x].children.length>this._maxEntries;)this._split(k,x),x--;this._adjustParentBBoxes(T,k,x)},s.prototype._split=function(y,x){var C=y[x],T=C.children.length,k=this._minEntries;this._chooseSplitAxis(C,k,T);var R=this._chooseSplitIndex(C,k,T),I=M(C.children.splice(R,C.children.length-R));I.height=C.height,I.leaf=C.leaf,h(C,this.toBBox),h(I,this.toBBox),x?y[x-1].children.push(I):this._splitRoot(C,I)},s.prototype._splitRoot=function(y,x){this.data=M([y,x]),this.data.height=y.height+1,this.data.leaf=!1,h(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(y,x,C){for(var T,k,R,I,z,G,j,W=1/0,Y=1/0,$=x;$<=C-x;$++){var K=c(y,0,$,this.toBBox),V=c(y,$,C,this.toBBox),Z=(k=K,R=V,I=void 0,z=void 0,G=void 0,j=void 0,I=Math.max(k.minX,R.minX),z=Math.max(k.minY,R.minY),G=Math.min(k.maxX,R.maxX),j=Math.min(k.maxY,R.maxY),Math.max(0,G-I)*Math.max(0,j-z)),U=m(K)+m(V);Z<W?(W=Z,T=$,Y=U<Y?U:Y):Z===W&&U<Y&&(Y=U,T=$)}return T||C-x},s.prototype._chooseSplitAxis=function(y,x,C){var T=y.leaf?this.compareMinX:f,k=y.leaf?this.compareMinY:p;this._allDistMargin(y,x,C,T)<this._allDistMargin(y,x,C,k)&&y.children.sort(T)},s.prototype._allDistMargin=function(y,x,C,T){y.children.sort(T);for(var k=this.toBBox,R=c(y,0,x,k),I=c(y,C-x,C,k),z=v(R)+v(I),G=x;G<C-x;G++){var j=y.children[G];d(R,y.leaf?k(j):j),z+=v(R)}for(var W=C-x-1;W>=x;W--){var Y=y.children[W];d(I,y.leaf?k(Y):Y),z+=v(I)}return z},s.prototype._adjustParentBBoxes=function(y,x,C){for(var T=C;T>=0;T--)d(x[T],y)},s.prototype._condense=function(y){for(var x=y.length-1,C=void 0;x>=0;x--)y[x].children.length===0?x>0?(C=y[x-1].children).splice(C.indexOf(y[x]),1):this.clear():h(y[x],this.toBBox)},s})})(Vh);var Ig=Vh.exports;const Xh=ua(Ig);function Dg(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=Rg(r),i=Ag(t),s=i.type,a=t.bbox,h=i.coordinates;if(a&&Og(n,a)===!1)return!1;s==="Polygon"&&(h=[h]);for(var c=!1,d=0;d<h.length&&!c;d++)if(Yh(n,h[d][0],e.ignoreBoundary)){for(var f=!1,p=1;p<h[d].length&&!f;)Yh(n,h[d][p],!e.ignoreBoundary)&&(f=!0),p++;f||(c=!0)}return c}function Yh(r,t,e){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var a=t[i][0],h=t[i][1],c=t[s][0],d=t[s][1],f=r[1]*(a-c)+h*(c-r[0])+d*(r[0]-a)===0&&(a-r[0])*(c-r[0])<=0&&(h-r[1])*(d-r[1])<=0;if(f)return!e;var p=h>r[1]!=d>r[1]&&r[0]<(c-a)*(r[1]-h)/(d-h)+a;p&&(n=!n)}return n}function Og(r,t){return t[0]<=r[0]&&t[1]<=r[1]&&t[2]>=r[0]&&t[3]>=r[1]}var Kh={exports:{}};Kh.exports=vs,Kh.exports.default=vs;function vs(r,t,e){e=e||2;var n=t&&t.length,i=n?t[0]*e:r.length,s=qh(r,0,i,e,!0),a=[];if(!s||s.next===s.prev)return a;var h,c,d,f,p,m,v;if(n&&(s=Gg(r,t,s,e)),r.length>80*e){h=d=r[0],c=f=r[1];for(var E=e;E<i;E+=e)p=r[E],m=r[E+1],p<h&&(h=p),m<c&&(c=m),p>d&&(d=p),m>f&&(f=m);v=Math.max(d-h,f-c),v=v!==0?32767/v:0}return _r(s,a,e,h,c,v,0),a}function qh(r,t,e,n,i){var s,a;if(i===_a(r,t,e,n)>0)for(s=t;s<e;s+=n)a=$h(s,r[s],r[s+1],a);else for(s=e-n;s>=t;s-=n)a=$h(s,r[s],r[s+1],a);return a&&xs(a,a.next)&&(yr(a),a=a.next),a}function sn(r,t){if(!r)return r;t||(t=r);var e=r,n;do if(n=!1,!e.steiner&&(xs(e,e.next)||Rt(e.prev,e,e.next)===0)){if(yr(e),e=t=e.prev,e===e.next)break;n=!0}else e=e.next;while(n||e!==t);return t}function _r(r,t,e,n,i,s,a){if(r){!a&&s&&Hg(r,n,i,s);for(var h=r,c,d;r.prev!==r.next;){if(c=r.prev,d=r.next,s?zg(r,n,i,s):Fg(r)){t.push(c.i/e|0),t.push(r.i/e|0),t.push(d.i/e|0),yr(r),r=d.next,h=d.next;continue}if(r=d,r===h){a?a===1?(r=Ng(sn(r),t,e),_r(r,t,e,n,i,s,2)):a===2&&Bg(r,t,e,n,i,s):_r(sn(r),t,e,n,i,s,1);break}}}}function Fg(r){var t=r.prev,e=r,n=r.next;if(Rt(t,e,n)>=0)return!1;for(var i=t.x,s=e.x,a=n.x,h=t.y,c=e.y,d=n.y,f=i<s?i<a?i:a:s<a?s:a,p=h<c?h<d?h:d:c<d?c:d,m=i>s?i>a?i:a:s>a?s:a,v=h>c?h>d?h:d:c>d?c:d,E=n.next;E!==t;){if(E.x>=f&&E.x<=m&&E.y>=p&&E.y<=v&&Pn(i,h,s,c,a,d,E.x,E.y)&&Rt(E.prev,E,E.next)>=0)return!1;E=E.next}return!0}function zg(r,t,e,n){var i=r.prev,s=r,a=r.next;if(Rt(i,s,a)>=0)return!1;for(var h=i.x,c=s.x,d=a.x,f=i.y,p=s.y,m=a.y,v=h<c?h<d?h:d:c<d?c:d,E=f<p?f<m?f:m:p<m?p:m,b=h>c?h>d?h:d:c>d?c:d,M=f>p?f>m?f:m:p>m?p:m,S=ga(v,E,t,e,n),y=ga(b,M,t,e,n),x=r.prevZ,C=r.nextZ;x&&x.z>=S&&C&&C.z<=y;){if(x.x>=v&&x.x<=b&&x.y>=E&&x.y<=M&&x!==i&&x!==a&&Pn(h,f,c,p,d,m,x.x,x.y)&&Rt(x.prev,x,x.next)>=0||(x=x.prevZ,C.x>=v&&C.x<=b&&C.y>=E&&C.y<=M&&C!==i&&C!==a&&Pn(h,f,c,p,d,m,C.x,C.y)&&Rt(C.prev,C,C.next)>=0))return!1;C=C.nextZ}for(;x&&x.z>=S;){if(x.x>=v&&x.x<=b&&x.y>=E&&x.y<=M&&x!==i&&x!==a&&Pn(h,f,c,p,d,m,x.x,x.y)&&Rt(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;C&&C.z<=y;){if(C.x>=v&&C.x<=b&&C.y>=E&&C.y<=M&&C!==i&&C!==a&&Pn(h,f,c,p,d,m,C.x,C.y)&&Rt(C.prev,C,C.next)>=0)return!1;C=C.nextZ}return!0}function Ng(r,t,e){var n=r;do{var i=n.prev,s=n.next.next;!xs(i,s)&&Jh(i,n,n.next,s)&&mr(i,s)&&mr(s,i)&&(t.push(i.i/e|0),t.push(n.i/e|0),t.push(s.i/e|0),yr(n),yr(n.next),n=r=s),n=n.next}while(n!==r);return sn(n)}function Bg(r,t,e,n,i,s){var a=r;do{for(var h=a.next.next;h!==a.prev;){if(a.i!==h.i&&Yg(a,h)){var c=Qh(a,h);a=sn(a,a.next),c=sn(c,c.next),_r(a,t,e,n,i,s,0),_r(c,t,e,n,i,s,0);return}h=h.next}a=a.next}while(a!==r)}function Gg(r,t,e,n){var i=[],s,a,h,c,d;for(s=0,a=t.length;s<a;s++)h=t[s]*n,c=s<a-1?t[s+1]*n:r.length,d=qh(r,h,c,n,!1),d===d.next&&(d.steiner=!0),i.push(Xg(d));for(i.sort(Ug),s=0;s<i.length;s++)e=jg(i[s],e);return e}function Ug(r,t){return r.x-t.x}function jg(r,t){var e=Zg(r,t);if(!e)return t;var n=Qh(e,r);return sn(n,n.next),sn(e,e.next)}function Zg(r,t){var e=t,n=r.x,i=r.y,s=-1/0,a;do{if(i<=e.y&&i>=e.next.y&&e.next.y!==e.y){var h=e.x+(i-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(h<=n&&h>s&&(s=h,a=e.x<e.next.x?e:e.next,h===n))return a}e=e.next}while(e!==t);if(!a)return null;var c=a,d=a.x,f=a.y,p=1/0,m;e=a;do n>=e.x&&e.x>=d&&n!==e.x&&Pn(i<f?n:s,i,d,f,i<f?s:n,i,e.x,e.y)&&(m=Math.abs(i-e.y)/(n-e.x),mr(e,r)&&(m<p||m===p&&(e.x>a.x||e.x===a.x&&Wg(a,e)))&&(a=e,p=m)),e=e.next;while(e!==c);return a}function Wg(r,t){return Rt(r.prev,r,t.prev)<0&&Rt(t.next,r,r.next)<0}function Hg(r,t,e,n){var i=r;do i.z===0&&(i.z=ga(i.x,i.y,t,e,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,Vg(i)}function Vg(r){var t,e,n,i,s,a,h,c,d=1;do{for(e=r,r=null,s=null,a=0;e;){for(a++,n=e,h=0,t=0;t<d&&(h++,n=n.nextZ,!!n);t++);for(c=d;h>0||c>0&&n;)h!==0&&(c===0||!n||e.z<=n.z)?(i=e,e=e.nextZ,h--):(i=n,n=n.nextZ,c--),s?s.nextZ=i:r=i,i.prevZ=s,s=i;e=n}s.nextZ=null,d*=2}while(a>1);return r}function ga(r,t,e,n,i){return r=(r-e)*i|0,t=(t-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r|t<<1}function Xg(r){var t=r,e=r;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==r);return e}function Pn(r,t,e,n,i,s,a,h){return(i-a)*(t-h)>=(r-a)*(s-h)&&(r-a)*(n-h)>=(e-a)*(t-h)&&(e-a)*(s-h)>=(i-a)*(n-h)}function Yg(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!Kg(r,t)&&(mr(r,t)&&mr(t,r)&&qg(r,t)&&(Rt(r.prev,r,t.prev)||Rt(r,t.prev,t))||xs(r,t)&&Rt(r.prev,r,r.next)>0&&Rt(t.prev,t,t.next)>0)}function Rt(r,t,e){return(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y)}function xs(r,t){return r.x===t.x&&r.y===t.y}function Jh(r,t,e,n){var i=Es(Rt(r,t,e)),s=Es(Rt(r,t,n)),a=Es(Rt(e,n,r)),h=Es(Rt(e,n,t));return!!(i!==s&&a!==h||i===0&&ws(r,e,t)||s===0&&ws(r,n,t)||a===0&&ws(e,r,n)||h===0&&ws(e,t,n))}function ws(r,t,e){return t.x<=Math.max(r.x,e.x)&&t.x>=Math.min(r.x,e.x)&&t.y<=Math.max(r.y,e.y)&&t.y>=Math.min(r.y,e.y)}function Es(r){return r>0?1:r<0?-1:0}function Kg(r,t){var e=r;do{if(e.i!==r.i&&e.next.i!==r.i&&e.i!==t.i&&e.next.i!==t.i&&Jh(e,e.next,r,t))return!0;e=e.next}while(e!==r);return!1}function mr(r,t){return Rt(r.prev,r,r.next)<0?Rt(r,t,r.next)>=0&&Rt(r,r.prev,t)>=0:Rt(r,t,r.prev)<0||Rt(r,r.next,t)<0}function qg(r,t){var e=r,n=!1,i=(r.x+t.x)/2,s=(r.y+t.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&i<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next;while(e!==r);return n}function Qh(r,t){var e=new pa(r.i,r.x,r.y),n=new pa(t.i,t.x,t.y),i=r.next,s=t.prev;return r.next=t,t.prev=r,e.next=i,i.prev=e,n.next=e,e.prev=n,s.next=n,n.prev=s,n}function $h(r,t,e,n){var i=new pa(r,t,e);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function yr(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function pa(r,t,e){this.i=r,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}vs.deviation=function(r,t,e,n){var i=t&&t.length,s=i?t[0]*e:r.length,a=Math.abs(_a(r,0,s,e));if(i)for(var h=0,c=t.length;h<c;h++){var d=t[h]*e,f=h<c-1?t[h+1]*e:r.length;a-=Math.abs(_a(r,d,f,e))}var p=0;for(h=0;h<n.length;h+=3){var m=n[h]*e,v=n[h+1]*e,E=n[h+2]*e;p+=Math.abs((r[m]-r[E])*(r[v+1]-r[m+1])-(r[m]-r[v])*(r[E+1]-r[m+1]))}return a===0&&p===0?0:Math.abs((p-a)/a)};function _a(r,t,e,n){for(var i=0,s=t,a=e-n;s<e;s+=n)i+=(r[a]-r[s])*(r[s+1]+r[a+1]),a=s;return i}vs.flatten=function(r){for(var t=r[0][0].length,e={vertices:[],holes:[],dimensions:t},n=0,i=0;i<r.length;i++){for(var s=0;s<r[i].length;s++)for(var a=0;a<t;a++)e.vertices.push(r[i][s][a]);i>0&&(n+=r[i-1].length,e.holes.push(n))}return e};const QL="";var Jg={exports:{}};const tc=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],si=(()=>{if(typeof document>"u")return!1;const r=tc[0],t={};for(const e of tc)if((e==null?void 0:e[1])in document){for(const[i,s]of e.entries())t[r[i]]=s;return t}return!1})(),ec={change:si.fullscreenchange,error:si.fullscreenerror};let ve={request(r=document.documentElement,t){return new Promise((e,n)=>{const i=()=>{ve.off("change",i),e()};ve.on("change",i);const s=r[si.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(n)})},exit(){return new Promise((r,t)=>{if(!ve.isFullscreen){r();return}const e=()=>{ve.off("change",e),r()};ve.on("change",e);const n=document[si.exitFullscreen]();n instanceof Promise&&n.then(e).catch(t)})},toggle(r,t){return ve.isFullscreen?ve.exit():ve.request(r,t)},onchange(r){ve.on("change",r)},onerror(r){ve.on("error",r)},on(r,t){const e=ec[r];e&&document.addEventListener(e,t,!1)},off(r,t){const e=ec[r];e&&document.removeEventListener(e,t,!1)},raw:si};Object.defineProperties(ve,{isFullscreen:{get:()=>!!document[si.fullscreenElement]},element:{enumerable:!0,get:()=>document[si.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[si.fullscreenEnabled]}}),si||(ve={isEnabled:!1});const Qg=Oh(Object.freeze(Object.defineProperty({__proto__:null,default:ve},Symbol.toStringTag,{value:"Module"})));/*!
4
+ */var jh;function Zh(){return jh||(jh=1,function(r,t){(function(e,n){n(t)})(je,function(e){var n="1.9.4";function i(o){var l,u,g,_;for(u=1,g=arguments.length;u<g;u++){_=arguments[u];for(l in _)o[l]=_[l]}return o}var s=Object.create||function(){function o(){}return function(l){return o.prototype=l,new o}}();function a(o,l){var u=Array.prototype.slice;if(o.bind)return o.bind.apply(o,u.call(arguments,1));var g=u.call(arguments,2);return function(){return o.apply(l,g.length?g.concat(u.call(arguments)):arguments)}}var h=0;function c(o){return"_leaflet_id"in o||(o._leaflet_id=++h),o._leaflet_id}function d(o,l,u){var g,_,w,P;return P=function(){g=!1,_&&(w.apply(u,_),_=!1)},w=function(){g?_=arguments:(o.apply(u,arguments),setTimeout(P,l),g=!0)},w}function f(o,l,u){var g=l[1],_=l[0],w=g-_;return o===g&&u?o:((o-_)%w+w)%w+_}function p(){return!1}function m(o,l){if(l===!1)return o;var u=Math.pow(10,l===void 0?6:l);return Math.round(o*u)/u}function v(o){return o.trim?o.trim():o.replace(/^\s+|\s+$/g,"")}function E(o){return v(o).split(/\s+/)}function C(o,l){Object.prototype.hasOwnProperty.call(o,"options")||(o.options=o.options?s(o.options):{});for(var u in l)o.options[u]=l[u];return o.options}function M(o,l,u){var g=[];for(var _ in o)g.push(encodeURIComponent(u?_.toUpperCase():_)+"="+encodeURIComponent(o[_]));return(!l||l.indexOf("?")===-1?"?":"&")+g.join("&")}var S=/\{ *([\w_ -]+) *\}/g;function y(o,l){return o.replace(S,function(u,g){var _=l[g];if(_===void 0)throw new Error("No value provided for variable "+u);return typeof _=="function"&&(_=_(l)),_})}var x=Array.isArray||function(o){return Object.prototype.toString.call(o)==="[object Array]"};function b(o,l){for(var u=0;u<o.length;u++)if(o[u]===l)return u;return-1}var T="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function k(o){return window["webkit"+o]||window["moz"+o]||window["ms"+o]}var R=0;function I(o){var l=+new Date,u=Math.max(0,16-(l-R));return R=l+u,window.setTimeout(o,u)}var z=window.requestAnimationFrame||k("RequestAnimationFrame")||I,G=window.cancelAnimationFrame||k("CancelAnimationFrame")||k("CancelRequestAnimationFrame")||function(o){window.clearTimeout(o)};function j(o,l,u){if(u&&z===I)o.call(l);else return z.call(window,a(o,l))}function W(o){o&&G.call(window,o)}var Y={__proto__:null,extend:i,create:s,bind:a,get lastId(){return h},stamp:c,throttle:d,wrapNum:f,falseFn:p,formatNum:m,trim:v,splitWords:E,setOptions:C,getParamString:M,template:y,isArray:x,indexOf:b,emptyImageUrl:T,requestFn:z,cancelFn:G,requestAnimFrame:j,cancelAnimFrame:W};function $(){}$.extend=function(o){var l=function(){C(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},u=l.__super__=this.prototype,g=s(u);g.constructor=l,l.prototype=g;for(var _ in this)Object.prototype.hasOwnProperty.call(this,_)&&_!=="prototype"&&_!=="__super__"&&(l[_]=this[_]);return o.statics&&i(l,o.statics),o.includes&&(K(o.includes),i.apply(null,[g].concat(o.includes))),i(g,o),delete g.statics,delete g.includes,g.options&&(g.options=u.options?s(u.options):{},i(g.options,o.options)),g._initHooks=[],g.callInitHooks=function(){if(!this._initHooksCalled){u.callInitHooks&&u.callInitHooks.call(this),this._initHooksCalled=!0;for(var w=0,P=g._initHooks.length;w<P;w++)g._initHooks[w].call(this)}},l},$.include=function(o){var l=this.prototype.options;return i(this.prototype,o),o.options&&(this.prototype.options=l,this.mergeOptions(o.options)),this},$.mergeOptions=function(o){return i(this.prototype.options,o),this},$.addInitHook=function(o){var l=Array.prototype.slice.call(arguments,1),u=typeof o=="function"?o:function(){this[o].apply(this,l)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(u),this};function K(o){if(!(typeof L>"u"||!L||!L.Mixin)){o=x(o)?o:[o];for(var l=0;l<o.length;l++)o[l]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var V={on:function(o,l,u){if(typeof o=="object")for(var g in o)this._on(g,o[g],l);else{o=E(o);for(var _=0,w=o.length;_<w;_++)this._on(o[_],l,u)}return this},off:function(o,l,u){if(!arguments.length)delete this._events;else if(typeof o=="object")for(var g in o)this._off(g,o[g],l);else{o=E(o);for(var _=arguments.length===1,w=0,P=o.length;w<P;w++)_?this._off(o[w]):this._off(o[w],l,u)}return this},_on:function(o,l,u,g){if(typeof l!="function"){console.warn("wrong listener type: "+typeof l);return}if(this._listens(o,l,u)===!1){u===this&&(u=void 0);var _={fn:l,ctx:u};g&&(_.once=!0),this._events=this._events||{},this._events[o]=this._events[o]||[],this._events[o].push(_)}},_off:function(o,l,u){var g,_,w;if(this._events&&(g=this._events[o],!!g)){if(arguments.length===1){if(this._firingCount)for(_=0,w=g.length;_<w;_++)g[_].fn=p;delete this._events[o];return}if(typeof l!="function"){console.warn("wrong listener type: "+typeof l);return}var P=this._listens(o,l,u);if(P!==!1){var A=g[P];this._firingCount&&(A.fn=p,this._events[o]=g=g.slice()),g.splice(P,1)}}},fire:function(o,l,u){if(!this.listens(o,u))return this;var g=i({},l,{type:o,target:this,sourceTarget:l&&l.sourceTarget||this});if(this._events){var _=this._events[o];if(_){this._firingCount=this._firingCount+1||1;for(var w=0,P=_.length;w<P;w++){var A=_[w],D=A.fn;A.once&&this.off(o,D,A.ctx),D.call(A.ctx||this,g)}this._firingCount--}}return u&&this._propagateEvent(g),this},listens:function(o,l,u,g){typeof o!="string"&&console.warn('"string" type argument expected');var _=l;typeof l!="function"&&(g=!!l,_=void 0,u=void 0);var w=this._events&&this._events[o];if(w&&w.length&&this._listens(o,_,u)!==!1)return!0;if(g){for(var P in this._eventParents)if(this._eventParents[P].listens(o,l,u,g))return!0}return!1},_listens:function(o,l,u){if(!this._events)return!1;var g=this._events[o]||[];if(!l)return!!g.length;u===this&&(u=void 0);for(var _=0,w=g.length;_<w;_++)if(g[_].fn===l&&g[_].ctx===u)return _;return!1},once:function(o,l,u){if(typeof o=="object")for(var g in o)this._on(g,o[g],l,!0);else{o=E(o);for(var _=0,w=o.length;_<w;_++)this._on(o[_],l,u,!0)}return this},addEventParent:function(o){return this._eventParents=this._eventParents||{},this._eventParents[c(o)]=o,this},removeEventParent:function(o){return this._eventParents&&delete this._eventParents[c(o)],this},_propagateEvent:function(o){for(var l in this._eventParents)this._eventParents[l].fire(o.type,i({layer:o.target,propagatedFrom:o.target},o),!0)}};V.addEventListener=V.on,V.removeEventListener=V.clearAllEventListeners=V.off,V.addOneTimeEventListener=V.once,V.fireEvent=V.fire,V.hasEventListeners=V.listens;var Z=$.extend(V);function U(o,l,u){this.x=u?Math.round(o):o,this.y=u?Math.round(l):l}var xt=Math.trunc||function(o){return o>0?Math.floor(o):Math.ceil(o)};U.prototype={clone:function(){return new U(this.x,this.y)},add:function(o){return this.clone()._add(H(o))},_add:function(o){return this.x+=o.x,this.y+=o.y,this},subtract:function(o){return this.clone()._subtract(H(o))},_subtract:function(o){return this.x-=o.x,this.y-=o.y,this},divideBy:function(o){return this.clone()._divideBy(o)},_divideBy:function(o){return this.x/=o,this.y/=o,this},multiplyBy:function(o){return this.clone()._multiplyBy(o)},_multiplyBy:function(o){return this.x*=o,this.y*=o,this},scaleBy:function(o){return new U(this.x*o.x,this.y*o.y)},unscaleBy:function(o){return new U(this.x/o.x,this.y/o.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=xt(this.x),this.y=xt(this.y),this},distanceTo:function(o){o=H(o);var l=o.x-this.x,u=o.y-this.y;return Math.sqrt(l*l+u*u)},equals:function(o){return o=H(o),o.x===this.x&&o.y===this.y},contains:function(o){return o=H(o),Math.abs(o.x)<=Math.abs(this.x)&&Math.abs(o.y)<=Math.abs(this.y)},toString:function(){return"Point("+m(this.x)+", "+m(this.y)+")"}};function H(o,l,u){return o instanceof U?o:x(o)?new U(o[0],o[1]):o==null?o:typeof o=="object"&&"x"in o&&"y"in o?new U(o.x,o.y):new U(o,l,u)}function at(o,l){if(o)for(var u=l?[o,l]:o,g=0,_=u.length;g<_;g++)this.extend(u[g])}at.prototype={extend:function(o){var l,u;if(!o)return this;if(o instanceof U||typeof o[0]=="number"||"x"in o)l=u=H(o);else if(o=F(o),l=o.min,u=o.max,!l||!u)return this;return!this.min&&!this.max?(this.min=l.clone(),this.max=u.clone()):(this.min.x=Math.min(l.x,this.min.x),this.max.x=Math.max(u.x,this.max.x),this.min.y=Math.min(l.y,this.min.y),this.max.y=Math.max(u.y,this.max.y)),this},getCenter:function(o){return H((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,o)},getBottomLeft:function(){return H(this.min.x,this.max.y)},getTopRight:function(){return H(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(o){var l,u;return typeof o[0]=="number"||o instanceof U?o=H(o):o=F(o),o instanceof at?(l=o.min,u=o.max):l=u=o,l.x>=this.min.x&&u.x<=this.max.x&&l.y>=this.min.y&&u.y<=this.max.y},intersects:function(o){o=F(o);var l=this.min,u=this.max,g=o.min,_=o.max,w=_.x>=l.x&&g.x<=u.x,P=_.y>=l.y&&g.y<=u.y;return w&&P},overlaps:function(o){o=F(o);var l=this.min,u=this.max,g=o.min,_=o.max,w=_.x>l.x&&g.x<u.x,P=_.y>l.y&&g.y<u.y;return w&&P},isValid:function(){return!!(this.min&&this.max)},pad:function(o){var l=this.min,u=this.max,g=Math.abs(l.x-u.x)*o,_=Math.abs(l.y-u.y)*o;return F(H(l.x-g,l.y-_),H(u.x+g,u.y+_))},equals:function(o){return o?(o=F(o),this.min.equals(o.getTopLeft())&&this.max.equals(o.getBottomRight())):!1}};function F(o,l){return!o||o instanceof at?o:new at(o,l)}function wt(o,l){if(o)for(var u=l?[o,l]:o,g=0,_=u.length;g<_;g++)this.extend(u[g])}wt.prototype={extend:function(o){var l=this._southWest,u=this._northEast,g,_;if(o instanceof it)g=o,_=o;else if(o instanceof wt){if(g=o._southWest,_=o._northEast,!g||!_)return this}else return o?this.extend(ht(o)||et(o)):this;return!l&&!u?(this._southWest=new it(g.lat,g.lng),this._northEast=new it(_.lat,_.lng)):(l.lat=Math.min(g.lat,l.lat),l.lng=Math.min(g.lng,l.lng),u.lat=Math.max(_.lat,u.lat),u.lng=Math.max(_.lng,u.lng)),this},pad:function(o){var l=this._southWest,u=this._northEast,g=Math.abs(l.lat-u.lat)*o,_=Math.abs(l.lng-u.lng)*o;return new wt(new it(l.lat-g,l.lng-_),new it(u.lat+g,u.lng+_))},getCenter:function(){return new it((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new it(this.getNorth(),this.getWest())},getSouthEast:function(){return new it(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(o){typeof o[0]=="number"||o instanceof it||"lat"in o?o=ht(o):o=et(o);var l=this._southWest,u=this._northEast,g,_;return o instanceof wt?(g=o.getSouthWest(),_=o.getNorthEast()):g=_=o,g.lat>=l.lat&&_.lat<=u.lat&&g.lng>=l.lng&&_.lng<=u.lng},intersects:function(o){o=et(o);var l=this._southWest,u=this._northEast,g=o.getSouthWest(),_=o.getNorthEast(),w=_.lat>=l.lat&&g.lat<=u.lat,P=_.lng>=l.lng&&g.lng<=u.lng;return w&&P},overlaps:function(o){o=et(o);var l=this._southWest,u=this._northEast,g=o.getSouthWest(),_=o.getNorthEast(),w=_.lat>l.lat&&g.lat<u.lat,P=_.lng>l.lng&&g.lng<u.lng;return w&&P},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(o,l){return o?(o=et(o),this._southWest.equals(o.getSouthWest(),l)&&this._northEast.equals(o.getNorthEast(),l)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function et(o,l){return o instanceof wt?o:new wt(o,l)}function it(o,l,u){if(isNaN(o)||isNaN(l))throw new Error("Invalid LatLng object: ("+o+", "+l+")");this.lat=+o,this.lng=+l,u!==void 0&&(this.alt=+u)}it.prototype={equals:function(o,l){if(!o)return!1;o=ht(o);var u=Math.max(Math.abs(this.lat-o.lat),Math.abs(this.lng-o.lng));return u<=(l===void 0?1e-9:l)},toString:function(o){return"LatLng("+m(this.lat,o)+", "+m(this.lng,o)+")"},distanceTo:function(o){return Xt.distance(this,ht(o))},wrap:function(){return Xt.wrapLatLng(this)},toBounds:function(o){var l=180*o/40075017,u=l/Math.cos(Math.PI/180*this.lat);return et([this.lat-l,this.lng-u],[this.lat+l,this.lng+u])},clone:function(){return new it(this.lat,this.lng,this.alt)}};function ht(o,l,u){return o instanceof it?o:x(o)&&typeof o[0]!="object"?o.length===3?new it(o[0],o[1],o[2]):o.length===2?new it(o[0],o[1]):null:o==null?o:typeof o=="object"&&"lat"in o?new it(o.lat,"lng"in o?o.lng:o.lon,o.alt):l===void 0?null:new it(o,l,u)}var kt={latLngToPoint:function(o,l){var u=this.projection.project(o),g=this.scale(l);return this.transformation._transform(u,g)},pointToLatLng:function(o,l){var u=this.scale(l),g=this.transformation.untransform(o,u);return this.projection.unproject(g)},project:function(o){return this.projection.project(o)},unproject:function(o){return this.projection.unproject(o)},scale:function(o){return 256*Math.pow(2,o)},zoom:function(o){return Math.log(o/256)/Math.LN2},getProjectedBounds:function(o){if(this.infinite)return null;var l=this.projection.bounds,u=this.scale(o),g=this.transformation.transform(l.min,u),_=this.transformation.transform(l.max,u);return new at(g,_)},infinite:!1,wrapLatLng:function(o){var l=this.wrapLng?f(o.lng,this.wrapLng,!0):o.lng,u=this.wrapLat?f(o.lat,this.wrapLat,!0):o.lat,g=o.alt;return new it(u,l,g)},wrapLatLngBounds:function(o){var l=o.getCenter(),u=this.wrapLatLng(l),g=l.lat-u.lat,_=l.lng-u.lng;if(g===0&&_===0)return o;var w=o.getSouthWest(),P=o.getNorthEast(),A=new it(w.lat-g,w.lng-_),D=new it(P.lat-g,P.lng-_);return new wt(A,D)}},Xt=i({},kt,{wrapLng:[-180,180],R:6371e3,distance:function(o,l){var u=Math.PI/180,g=o.lat*u,_=l.lat*u,w=Math.sin((l.lat-o.lat)*u/2),P=Math.sin((l.lng-o.lng)*u/2),A=w*w+Math.cos(g)*Math.cos(_)*P*P,D=2*Math.atan2(Math.sqrt(A),Math.sqrt(1-A));return this.R*D}}),Te=6378137,Qe={R:Te,MAX_LATITUDE:85.0511287798,project:function(o){var l=Math.PI/180,u=this.MAX_LATITUDE,g=Math.max(Math.min(u,o.lat),-u),_=Math.sin(g*l);return new U(this.R*o.lng*l,this.R*Math.log((1+_)/(1-_))/2)},unproject:function(o){var l=180/Math.PI;return new it((2*Math.atan(Math.exp(o.y/this.R))-Math.PI/2)*l,o.x*l/this.R)},bounds:function(){var o=Te*Math.PI;return new at([-o,-o],[o,o])}()};function Xi(o,l,u,g){if(x(o)){this._a=o[0],this._b=o[1],this._c=o[2],this._d=o[3];return}this._a=o,this._b=l,this._c=u,this._d=g}Xi.prototype={transform:function(o,l){return this._transform(o.clone(),l)},_transform:function(o,l){return l=l||1,o.x=l*(this._a*o.x+this._b),o.y=l*(this._c*o.y+this._d),o},untransform:function(o,l){return l=l||1,new U((o.x/l-this._b)/this._a,(o.y/l-this._d)/this._c)}};function Me(o,l,u,g){return new Xi(o,l,u,g)}var Yi=i({},Xt,{code:"EPSG:3857",projection:Qe,transformation:function(){var o=.5/(Math.PI*Qe.R);return Me(o,.5,-o,.5)}()}),$e=i({},Yi,{code:"EPSG:900913"});function Ki(o){return document.createElementNS("http://www.w3.org/2000/svg",o)}function Fe(o,l){var u="",g,_,w,P,A,D;for(g=0,w=o.length;g<w;g++){for(A=o[g],_=0,P=A.length;_<P;_++)D=A[_],u+=(_?"L":"M")+D.x+" "+D.y;u+=l?J.svg?"z":"x":""}return u||"M0 0"}var qi=document.documentElement.style,wi="ActiveXObject"in window,rr=wi&&!document.addEventListener,Ei="msLaunchUri"in navigator&&!("documentMode"in document),En=Bt("webkit"),qt=Bt("android"),ae=Bt("android 2")||Bt("android 3"),be=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),ze=qt&&Bt("Google")&&be<537&&!("AudioNode"in window),ti=!!window.opera,ei=!Ei&&Bt("chrome"),Ne=Bt("gecko")&&!En&&!ti&&!wi,Ji=!ei&&Bt("safari"),Ln=Bt("phantom"),Yt="OTransition"in qi,$r=navigator.platform.indexOf("Win")===0,jo=wi&&"transition"in qi,ts="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ae,es="MozPerspective"in qi,Zo=!window.L_DISABLE_3D&&(jo||ts||es)&&!Yt&&!Ln,Li=typeof orientation<"u"||Bt("mobile"),Wo=Li&&En,is=Li&&ts,Qi=!window.PointerEvent&&window.MSPointerEvent,$i=!!(window.PointerEvent||Qi),tn="ontouchstart"in window||!!window.TouchEvent,Ho=!window.L_NO_TOUCH&&(tn||$i),Vo=Li&&ti,le=Li&&Ne,en=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,pe=function(){var o=!1;try{var l=Object.defineProperty({},"passive",{get:function(){o=!0}});window.addEventListener("testPassiveEventSupport",p,l),window.removeEventListener("testPassiveEventSupport",p,l)}catch{}return o}(),Be=function(){return!!document.createElement("canvas").getContext}(),Jt=!!(document.createElementNS&&Ki("svg").createSVGRect),sr=!!Jt&&function(){var o=document.createElement("div");return o.innerHTML="<svg/>",(o.firstChild&&o.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),or=!Jt&&function(){try{var o=document.createElement("div");o.innerHTML='<v:shape adj="1"/>';var l=o.firstChild;return l.style.behavior="url(#default#VML)",l&&typeof l.adj=="object"}catch{return!1}}(),se=navigator.platform.indexOf("Mac")===0,_e=navigator.platform.indexOf("Linux")===0;function Bt(o){return navigator.userAgent.toLowerCase().indexOf(o)>=0}var J={ie:wi,ielt9:rr,edge:Ei,webkit:En,android:qt,android23:ae,androidStock:ze,opera:ti,chrome:ei,gecko:Ne,safari:Ji,phantom:Ln,opera12:Yt,win:$r,ie3d:jo,webkit3d:ts,gecko3d:es,any3d:Zo,mobile:Li,mobileWebkit:Wo,mobileWebkit3d:is,msPointer:Qi,pointer:$i,touch:Ho,touchNative:tn,mobileOpera:Vo,mobileGecko:le,retina:en,passiveEvents:pe,canvas:Be,svg:Jt,vml:or,inlineSvg:sr,mac:se,linux:_e},bf=J.msPointer?"MSPointerDown":"pointerdown",Cf=J.msPointer?"MSPointerMove":"pointermove",Tf=J.msPointer?"MSPointerUp":"pointerup",Mf=J.msPointer?"MSPointerCancel":"pointercancel",hh={touchstart:bf,touchmove:Cf,touchend:Tf,touchcancel:Mf},Sf={touchstart:KE,touchmove:Xo,touchend:Xo,touchcancel:Xo},ar={},Pf=!1;function WE(o,l,u){return l==="touchstart"&&YE(),Sf[l]?(u=Sf[l].bind(this,u),o.addEventListener(hh[l],u,!1),u):(console.warn("wrong event specified:",l),p)}function HE(o,l,u){if(!hh[l]){console.warn("wrong event specified:",l);return}o.removeEventListener(hh[l],u,!1)}function VE(o){ar[o.pointerId]=o}function XE(o){ar[o.pointerId]&&(ar[o.pointerId]=o)}function kf(o){delete ar[o.pointerId]}function YE(){Pf||(document.addEventListener(bf,VE,!0),document.addEventListener(Cf,XE,!0),document.addEventListener(Tf,kf,!0),document.addEventListener(Mf,kf,!0),Pf=!0)}function Xo(o,l){if(l.pointerType!==(l.MSPOINTER_TYPE_MOUSE||"mouse")){l.touches=[];for(var u in ar)l.touches.push(ar[u]);l.changedTouches=[l],o(l)}}function KE(o,l){l.MSPOINTER_TYPE_TOUCH&&l.pointerType===l.MSPOINTER_TYPE_TOUCH&&Qt(l),Xo(o,l)}function qE(o){var l={},u,g;for(g in o)u=o[g],l[g]=u&&u.bind?u.bind(o):u;return o=l,l.type="dblclick",l.detail=2,l.isTrusted=!1,l._simulated=!0,l}var JE=200;function QE(o,l){o.addEventListener("dblclick",l);var u=0,g;function _(w){if(w.detail!==1){g=w.detail;return}if(!(w.pointerType==="mouse"||w.sourceCapabilities&&!w.sourceCapabilities.firesTouchEvents)){var P=Of(w);if(!(P.some(function(D){return D instanceof HTMLLabelElement&&D.attributes.for})&&!P.some(function(D){return D instanceof HTMLInputElement||D instanceof HTMLSelectElement}))){var A=Date.now();A-u<=JE?(g++,g===2&&l(qE(w))):g=1,u=A}}}return o.addEventListener("click",_),{dblclick:l,simDblclick:_}}function $E(o,l){o.removeEventListener("dblclick",l.dblclick),o.removeEventListener("click",l.simDblclick)}var ch=qo(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ns=qo(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Rf=ns==="webkitTransition"||ns==="OTransition"?ns+"End":"transitionend";function Af(o){return typeof o=="string"?document.getElementById(o):o}function rs(o,l){var u=o.style[l]||o.currentStyle&&o.currentStyle[l];if((!u||u==="auto")&&document.defaultView){var g=document.defaultView.getComputedStyle(o,null);u=g?g[l]:null}return u==="auto"?null:u}function Et(o,l,u){var g=document.createElement(o);return g.className=l||"",u&&u.appendChild(g),g}function At(o){var l=o.parentNode;l&&l.removeChild(o)}function Yo(o){for(;o.firstChild;)o.removeChild(o.firstChild)}function lr(o){var l=o.parentNode;l&&l.lastChild!==o&&l.appendChild(o)}function hr(o){var l=o.parentNode;l&&l.firstChild!==o&&l.insertBefore(o,l.firstChild)}function uh(o,l){if(o.classList!==void 0)return o.classList.contains(l);var u=Ko(o);return u.length>0&&new RegExp("(^|\\s)"+l+"(\\s|$)").test(u)}function ft(o,l){if(o.classList!==void 0)for(var u=E(l),g=0,_=u.length;g<_;g++)o.classList.add(u[g]);else if(!uh(o,l)){var w=Ko(o);dh(o,(w?w+" ":"")+l)}}function Ft(o,l){o.classList!==void 0?o.classList.remove(l):dh(o,v((" "+Ko(o)+" ").replace(" "+l+" "," ")))}function dh(o,l){o.className.baseVal===void 0?o.className=l:o.className.baseVal=l}function Ko(o){return o.correspondingElement&&(o=o.correspondingElement),o.className.baseVal===void 0?o.className:o.className.baseVal}function Se(o,l){"opacity"in o.style?o.style.opacity=l:"filter"in o.style&&tL(o,l)}function tL(o,l){var u=!1,g="DXImageTransform.Microsoft.Alpha";try{u=o.filters.item(g)}catch{if(l===1)return}l=Math.round(l*100),u?(u.Enabled=l!==100,u.Opacity=l):o.style.filter+=" progid:"+g+"(opacity="+l+")"}function qo(o){for(var l=document.documentElement.style,u=0;u<o.length;u++)if(o[u]in l)return o[u];return!1}function bn(o,l,u){var g=l||new U(0,0);o.style[ch]=(J.ie3d?"translate("+g.x+"px,"+g.y+"px)":"translate3d("+g.x+"px,"+g.y+"px,0)")+(u?" scale("+u+")":"")}function Gt(o,l){o._leaflet_pos=l,J.any3d?bn(o,l):(o.style.left=l.x+"px",o.style.top=l.y+"px")}function Cn(o){return o._leaflet_pos||new U(0,0)}var ss,os,fh;if("onselectstart"in document)ss=function(){ut(window,"selectstart",Qt)},os=function(){Pt(window,"selectstart",Qt)};else{var as=qo(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);ss=function(){if(as){var o=document.documentElement.style;fh=o[as],o[as]="none"}},os=function(){as&&(document.documentElement.style[as]=fh,fh=void 0)}}function gh(){ut(window,"dragstart",Qt)}function ph(){Pt(window,"dragstart",Qt)}var Jo,_h;function mh(o){for(;o.tabIndex===-1;)o=o.parentNode;o.style&&(Qo(),Jo=o,_h=o.style.outlineStyle,o.style.outlineStyle="none",ut(window,"keydown",Qo))}function Qo(){Jo&&(Jo.style.outlineStyle=_h,Jo=void 0,_h=void 0,Pt(window,"keydown",Qo))}function If(o){do o=o.parentNode;while((!o.offsetWidth||!o.offsetHeight)&&o!==document.body);return o}function yh(o){var l=o.getBoundingClientRect();return{x:l.width/o.offsetWidth||1,y:l.height/o.offsetHeight||1,boundingClientRect:l}}var eL={__proto__:null,TRANSFORM:ch,TRANSITION:ns,TRANSITION_END:Rf,get:Af,getStyle:rs,create:Et,remove:At,empty:Yo,toFront:lr,toBack:hr,hasClass:uh,addClass:ft,removeClass:Ft,setClass:dh,getClass:Ko,setOpacity:Se,testProp:qo,setTransform:bn,setPosition:Gt,getPosition:Cn,get disableTextSelection(){return ss},get enableTextSelection(){return os},disableImageDrag:gh,enableImageDrag:ph,preventOutline:mh,restoreOutline:Qo,getSizedParentNode:If,getScale:yh};function ut(o,l,u,g){if(l&&typeof l=="object")for(var _ in l)xh(o,_,l[_],u);else{l=E(l);for(var w=0,P=l.length;w<P;w++)xh(o,l[w],u,g)}return this}var ii="_leaflet_events";function Pt(o,l,u,g){if(arguments.length===1)Df(o),delete o[ii];else if(l&&typeof l=="object")for(var _ in l)wh(o,_,l[_],u);else if(l=E(l),arguments.length===2)Df(o,function(A){return b(l,A)!==-1});else for(var w=0,P=l.length;w<P;w++)wh(o,l[w],u,g);return this}function Df(o,l){for(var u in o[ii]){var g=u.split(/\d/)[0];(!l||l(g))&&wh(o,g,null,null,u)}}var vh={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function xh(o,l,u,g){var _=l+c(u)+(g?"_"+c(g):"");if(o[ii]&&o[ii][_])return this;var w=function(A){return u.call(g||o,A||window.event)},P=w;!J.touchNative&&J.pointer&&l.indexOf("touch")===0?w=WE(o,l,w):J.touch&&l==="dblclick"?w=QE(o,w):"addEventListener"in o?l==="touchstart"||l==="touchmove"||l==="wheel"||l==="mousewheel"?o.addEventListener(vh[l]||l,w,J.passiveEvents?{passive:!1}:!1):l==="mouseenter"||l==="mouseleave"?(w=function(A){A=A||window.event,Lh(o,A)&&P(A)},o.addEventListener(vh[l],w,!1)):o.addEventListener(l,P,!1):o.attachEvent("on"+l,w),o[ii]=o[ii]||{},o[ii][_]=w}function wh(o,l,u,g,_){_=_||l+c(u)+(g?"_"+c(g):"");var w=o[ii]&&o[ii][_];if(!w)return this;!J.touchNative&&J.pointer&&l.indexOf("touch")===0?HE(o,l,w):J.touch&&l==="dblclick"?$E(o,w):"removeEventListener"in o?o.removeEventListener(vh[l]||l,w,!1):o.detachEvent("on"+l,w),o[ii][_]=null}function Tn(o){return o.stopPropagation?o.stopPropagation():o.originalEvent?o.originalEvent._stopped=!0:o.cancelBubble=!0,this}function Eh(o){return xh(o,"wheel",Tn),this}function ls(o){return ut(o,"mousedown touchstart dblclick contextmenu",Tn),o._leaflet_disable_click=!0,this}function Qt(o){return o.preventDefault?o.preventDefault():o.returnValue=!1,this}function Mn(o){return Qt(o),Tn(o),this}function Of(o){if(o.composedPath)return o.composedPath();for(var l=[],u=o.target;u;)l.push(u),u=u.parentNode;return l}function Ff(o,l){if(!l)return new U(o.clientX,o.clientY);var u=yh(l),g=u.boundingClientRect;return new U((o.clientX-g.left)/u.x-l.clientLeft,(o.clientY-g.top)/u.y-l.clientTop)}var iL=J.linux&&J.chrome?window.devicePixelRatio:J.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function zf(o){return J.edge?o.wheelDeltaY/2:o.deltaY&&o.deltaMode===0?-o.deltaY/iL:o.deltaY&&o.deltaMode===1?-o.deltaY*20:o.deltaY&&o.deltaMode===2?-o.deltaY*60:o.deltaX||o.deltaZ?0:o.wheelDelta?(o.wheelDeltaY||o.wheelDelta)/2:o.detail&&Math.abs(o.detail)<32765?-o.detail*20:o.detail?o.detail/-32765*60:0}function Lh(o,l){var u=l.relatedTarget;if(!u)return!0;try{for(;u&&u!==o;)u=u.parentNode}catch{return!1}return u!==o}var nL={__proto__:null,on:ut,off:Pt,stopPropagation:Tn,disableScrollPropagation:Eh,disableClickPropagation:ls,preventDefault:Qt,stop:Mn,getPropagationPath:Of,getMousePosition:Ff,getWheelDelta:zf,isExternalTarget:Lh,addListener:ut,removeListener:Pt},Nf=Z.extend({run:function(o,l,u,g){this.stop(),this._el=o,this._inProgress=!0,this._duration=u||.25,this._easeOutPower=1/Math.max(g||.5,.2),this._startPos=Cn(o),this._offset=l.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=j(this._animate,this),this._step()},_step:function(o){var l=+new Date-this._startTime,u=this._duration*1e3;l<u?this._runFrame(this._easeOut(l/u),o):(this._runFrame(1),this._complete())},_runFrame:function(o,l){var u=this._startPos.add(this._offset.multiplyBy(o));l&&u._round(),Gt(this._el,u),this.fire("step")},_complete:function(){W(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(o){return 1-Math.pow(1-o,this._easeOutPower)}}),yt=Z.extend({options:{crs:Yi,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(o,l){l=C(this,l),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(o),this._initLayout(),this._onResize=a(this._onResize,this),this._initEvents(),l.maxBounds&&this.setMaxBounds(l.maxBounds),l.zoom!==void 0&&(this._zoom=this._limitZoom(l.zoom)),l.center&&l.zoom!==void 0&&this.setView(ht(l.center),l.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ns&&J.any3d&&!J.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ut(this._proxy,Rf,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(o,l,u){if(l=l===void 0?this._zoom:this._limitZoom(l),o=this._limitCenter(ht(o),l,this.options.maxBounds),u=u||{},this._stop(),this._loaded&&!u.reset&&u!==!0){u.animate!==void 0&&(u.zoom=i({animate:u.animate},u.zoom),u.pan=i({animate:u.animate,duration:u.duration},u.pan));var g=this._zoom!==l?this._tryAnimatedZoom&&this._tryAnimatedZoom(o,l,u.zoom):this._tryAnimatedPan(o,u.pan);if(g)return clearTimeout(this._sizeTimer),this}return this._resetView(o,l,u.pan&&u.pan.noMoveStart),this},setZoom:function(o,l){return this._loaded?this.setView(this.getCenter(),o,{zoom:l}):(this._zoom=o,this)},zoomIn:function(o,l){return o=o||(J.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+o,l)},zoomOut:function(o,l){return o=o||(J.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-o,l)},setZoomAround:function(o,l,u){var g=this.getZoomScale(l),_=this.getSize().divideBy(2),w=o instanceof U?o:this.latLngToContainerPoint(o),P=w.subtract(_).multiplyBy(1-1/g),A=this.containerPointToLatLng(_.add(P));return this.setView(A,l,{zoom:u})},_getBoundsCenterZoom:function(o,l){l=l||{},o=o.getBounds?o.getBounds():et(o);var u=H(l.paddingTopLeft||l.padding||[0,0]),g=H(l.paddingBottomRight||l.padding||[0,0]),_=this.getBoundsZoom(o,!1,u.add(g));if(_=typeof l.maxZoom=="number"?Math.min(l.maxZoom,_):_,_===1/0)return{center:o.getCenter(),zoom:_};var w=g.subtract(u).divideBy(2),P=this.project(o.getSouthWest(),_),A=this.project(o.getNorthEast(),_),D=this.unproject(P.add(A).divideBy(2).add(w),_);return{center:D,zoom:_}},fitBounds:function(o,l){if(o=et(o),!o.isValid())throw new Error("Bounds are not valid.");var u=this._getBoundsCenterZoom(o,l);return this.setView(u.center,u.zoom,l)},fitWorld:function(o){return this.fitBounds([[-90,-180],[90,180]],o)},panTo:function(o,l){return this.setView(o,this._zoom,{pan:l})},panBy:function(o,l){if(o=H(o).round(),l=l||{},!o.x&&!o.y)return this.fire("moveend");if(l.animate!==!0&&!this.getSize().contains(o))return this._resetView(this.unproject(this.project(this.getCenter()).add(o)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Nf,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),l.noMoveStart||this.fire("movestart"),l.animate!==!1){ft(this._mapPane,"leaflet-pan-anim");var u=this._getMapPanePos().subtract(o).round();this._panAnim.run(this._mapPane,u,l.duration||.25,l.easeLinearity)}else this._rawPanBy(o),this.fire("move").fire("moveend");return this},flyTo:function(o,l,u){if(u=u||{},u.animate===!1||!J.any3d)return this.setView(o,l,u);this._stop();var g=this.project(this.getCenter()),_=this.project(o),w=this.getSize(),P=this._zoom;o=ht(o),l=l===void 0?P:l;var A=Math.max(w.x,w.y),D=A*this.getZoomScale(P,l),B=_.distanceTo(g)||1,q=1.42,st=q*q;function _t(Ut){var ca=Ut?-1:1,HL=Ut?D:A,VL=D*D-A*A+ca*st*st*B*B,XL=2*HL*st*B,Dh=VL/XL,yg=Math.sqrt(Dh*Dh+1)-Dh,YL=yg<1e-9?-18:Math.log(yg);return YL}function he(Ut){return(Math.exp(Ut)-Math.exp(-Ut))/2}function Kt(Ut){return(Math.exp(Ut)+Math.exp(-Ut))/2}function ke(Ut){return he(Ut)/Kt(Ut)}var me=_t(0);function pr(Ut){return A*(Kt(me)/Kt(me+q*Ut))}function UL(Ut){return A*(Kt(me)*ke(me+q*Ut)-he(me))/st}function jL(Ut){return 1-Math.pow(1-Ut,1.5)}var ZL=Date.now(),_g=(_t(1)-me)/q,WL=u.duration?1e3*u.duration:1e3*_g*.8;function mg(){var Ut=(Date.now()-ZL)/WL,ca=jL(Ut)*_g;Ut<=1?(this._flyToFrame=j(mg,this),this._move(this.unproject(g.add(_.subtract(g).multiplyBy(UL(ca)/B)),P),this.getScaleZoom(A/pr(ca),P),{flyTo:!0})):this._move(o,l)._moveEnd(!0)}return this._moveStart(!0,u.noMoveStart),mg.call(this),this},flyToBounds:function(o,l){var u=this._getBoundsCenterZoom(o,l);return this.flyTo(u.center,u.zoom,l)},setMaxBounds:function(o){return o=et(o),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),o.isValid()?(this.options.maxBounds=o,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(o){var l=this.options.minZoom;return this.options.minZoom=o,this._loaded&&l!==o&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(o):this},setMaxZoom:function(o){var l=this.options.maxZoom;return this.options.maxZoom=o,this._loaded&&l!==o&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(o):this},panInsideBounds:function(o,l){this._enforcingBounds=!0;var u=this.getCenter(),g=this._limitCenter(u,this._zoom,et(o));return u.equals(g)||this.panTo(g,l),this._enforcingBounds=!1,this},panInside:function(o,l){l=l||{};var u=H(l.paddingTopLeft||l.padding||[0,0]),g=H(l.paddingBottomRight||l.padding||[0,0]),_=this.project(this.getCenter()),w=this.project(o),P=this.getPixelBounds(),A=F([P.min.add(u),P.max.subtract(g)]),D=A.getSize();if(!A.contains(w)){this._enforcingBounds=!0;var B=w.subtract(A.getCenter()),q=A.extend(w).getSize().subtract(D);_.x+=B.x<0?-q.x:q.x,_.y+=B.y<0?-q.y:q.y,this.panTo(this.unproject(_),l),this._enforcingBounds=!1}return this},invalidateSize:function(o){if(!this._loaded)return this;o=i({animate:!1,pan:!0},o===!0?{animate:!0}:o);var l=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var u=this.getSize(),g=l.divideBy(2).round(),_=u.divideBy(2).round(),w=g.subtract(_);return!w.x&&!w.y?this:(o.animate&&o.pan?this.panBy(w):(o.pan&&this._rawPanBy(w),this.fire("move"),o.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(a(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:l,newSize:u}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(o){if(o=this._locateOptions=i({timeout:1e4,watch:!1},o),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var l=a(this._handleGeolocationResponse,this),u=a(this._handleGeolocationError,this);return o.watch?this._locationWatchId=navigator.geolocation.watchPosition(l,u,o):navigator.geolocation.getCurrentPosition(l,u,o),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(o){if(this._container._leaflet_id){var l=o.code,u=o.message||(l===1?"permission denied":l===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:l,message:"Geolocation error: "+u+"."})}},_handleGeolocationResponse:function(o){if(this._container._leaflet_id){var l=o.coords.latitude,u=o.coords.longitude,g=new it(l,u),_=g.toBounds(o.coords.accuracy*2),w=this._locateOptions;if(w.setView){var P=this.getBoundsZoom(_);this.setView(g,w.maxZoom?Math.min(P,w.maxZoom):P)}var A={latlng:g,bounds:_,timestamp:o.timestamp};for(var D in o.coords)typeof o.coords[D]=="number"&&(A[D]=o.coords[D]);this.fire("locationfound",A)}},addHandler:function(o,l){if(!l)return this;var u=this[o]=new l(this);return this._handlers.push(u),this.options[o]&&u.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),At(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(W(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var o;for(o in this._layers)this._layers[o].remove();for(o in this._panes)At(this._panes[o]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(o,l){var u="leaflet-pane"+(o?" leaflet-"+o.replace("Pane","")+"-pane":""),g=Et("div",u,l||this._mapPane);return o&&(this._panes[o]=g),g},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var o=this.getPixelBounds(),l=this.unproject(o.getBottomLeft()),u=this.unproject(o.getTopRight());return new wt(l,u)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(o,l,u){o=et(o),u=H(u||[0,0]);var g=this.getZoom()||0,_=this.getMinZoom(),w=this.getMaxZoom(),P=o.getNorthWest(),A=o.getSouthEast(),D=this.getSize().subtract(u),B=F(this.project(A,g),this.project(P,g)).getSize(),q=J.any3d?this.options.zoomSnap:1,st=D.x/B.x,_t=D.y/B.y,he=l?Math.max(st,_t):Math.min(st,_t);return g=this.getScaleZoom(he,g),q&&(g=Math.round(g/(q/100))*(q/100),g=l?Math.ceil(g/q)*q:Math.floor(g/q)*q),Math.max(_,Math.min(w,g))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new U(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(o,l){var u=this._getTopLeftPoint(o,l);return new at(u,u.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(o){return this.options.crs.getProjectedBounds(o===void 0?this.getZoom():o)},getPane:function(o){return typeof o=="string"?this._panes[o]:o},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(o,l){var u=this.options.crs;return l=l===void 0?this._zoom:l,u.scale(o)/u.scale(l)},getScaleZoom:function(o,l){var u=this.options.crs;l=l===void 0?this._zoom:l;var g=u.zoom(o*u.scale(l));return isNaN(g)?1/0:g},project:function(o,l){return l=l===void 0?this._zoom:l,this.options.crs.latLngToPoint(ht(o),l)},unproject:function(o,l){return l=l===void 0?this._zoom:l,this.options.crs.pointToLatLng(H(o),l)},layerPointToLatLng:function(o){var l=H(o).add(this.getPixelOrigin());return this.unproject(l)},latLngToLayerPoint:function(o){var l=this.project(ht(o))._round();return l._subtract(this.getPixelOrigin())},wrapLatLng:function(o){return this.options.crs.wrapLatLng(ht(o))},wrapLatLngBounds:function(o){return this.options.crs.wrapLatLngBounds(et(o))},distance:function(o,l){return this.options.crs.distance(ht(o),ht(l))},containerPointToLayerPoint:function(o){return H(o).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(o){return H(o).add(this._getMapPanePos())},containerPointToLatLng:function(o){var l=this.containerPointToLayerPoint(H(o));return this.layerPointToLatLng(l)},latLngToContainerPoint:function(o){return this.layerPointToContainerPoint(this.latLngToLayerPoint(ht(o)))},mouseEventToContainerPoint:function(o){return Ff(o,this._container)},mouseEventToLayerPoint:function(o){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(o))},mouseEventToLatLng:function(o){return this.layerPointToLatLng(this.mouseEventToLayerPoint(o))},_initContainer:function(o){var l=this._container=Af(o);if(l){if(l._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ut(l,"scroll",this._onScroll,this),this._containerId=c(l)},_initLayout:function(){var o=this._container;this._fadeAnimated=this.options.fadeAnimation&&J.any3d,ft(o,"leaflet-container"+(J.touch?" leaflet-touch":"")+(J.retina?" leaflet-retina":"")+(J.ielt9?" leaflet-oldie":"")+(J.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var l=rs(o,"position");l!=="absolute"&&l!=="relative"&&l!=="fixed"&&l!=="sticky"&&(o.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var o=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Gt(this._mapPane,new U(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ft(o.markerPane,"leaflet-zoom-hide"),ft(o.shadowPane,"leaflet-zoom-hide"))},_resetView:function(o,l,u){Gt(this._mapPane,new U(0,0));var g=!this._loaded;this._loaded=!0,l=this._limitZoom(l),this.fire("viewprereset");var _=this._zoom!==l;this._moveStart(_,u)._move(o,l)._moveEnd(_),this.fire("viewreset"),g&&this.fire("load")},_moveStart:function(o,l){return o&&this.fire("zoomstart"),l||this.fire("movestart"),this},_move:function(o,l,u,g){l===void 0&&(l=this._zoom);var _=this._zoom!==l;return this._zoom=l,this._lastCenter=o,this._pixelOrigin=this._getNewPixelOrigin(o),g?u&&u.pinch&&this.fire("zoom",u):((_||u&&u.pinch)&&this.fire("zoom",u),this.fire("move",u)),this},_moveEnd:function(o){return o&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return W(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(o){Gt(this._mapPane,this._getMapPanePos().subtract(o))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(o){this._targets={},this._targets[c(this._container)]=this;var l=o?Pt:ut;l(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&l(window,"resize",this._onResize,this),J.any3d&&this.options.transform3DLimit&&(o?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){W(this._resizeRequest),this._resizeRequest=j(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var o=this._getMapPanePos();Math.max(Math.abs(o.x),Math.abs(o.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(o,l){for(var u=[],g,_=l==="mouseout"||l==="mouseover",w=o.target||o.srcElement,P=!1;w;){if(g=this._targets[c(w)],g&&(l==="click"||l==="preclick")&&this._draggableMoved(g)){P=!0;break}if(g&&g.listens(l,!0)&&(_&&!Lh(w,o)||(u.push(g),_))||w===this._container)break;w=w.parentNode}return!u.length&&!P&&!_&&this.listens(l,!0)&&(u=[this]),u},_isClickDisabled:function(o){for(;o&&o!==this._container;){if(o._leaflet_disable_click)return!0;o=o.parentNode}},_handleDOMEvent:function(o){var l=o.target||o.srcElement;if(!(!this._loaded||l._leaflet_disable_events||o.type==="click"&&this._isClickDisabled(l))){var u=o.type;u==="mousedown"&&mh(l),this._fireDOMEvent(o,u)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(o,l,u){if(o.type==="click"){var g=i({},o);g.type="preclick",this._fireDOMEvent(g,g.type,u)}var _=this._findEventTargets(o,l);if(u){for(var w=[],P=0;P<u.length;P++)u[P].listens(l,!0)&&w.push(u[P]);_=w.concat(_)}if(_.length){l==="contextmenu"&&Qt(o);var A=_[0],D={originalEvent:o};if(o.type!=="keypress"&&o.type!=="keydown"&&o.type!=="keyup"){var B=A.getLatLng&&(!A._radius||A._radius<=10);D.containerPoint=B?this.latLngToContainerPoint(A.getLatLng()):this.mouseEventToContainerPoint(o),D.layerPoint=this.containerPointToLayerPoint(D.containerPoint),D.latlng=B?A.getLatLng():this.layerPointToLatLng(D.layerPoint)}for(P=0;P<_.length;P++)if(_[P].fire(l,D,!0),D.originalEvent._stopped||_[P].options.bubblingMouseEvents===!1&&b(this._mouseEvents,l)!==-1)return}},_draggableMoved:function(o){return o=o.dragging&&o.dragging.enabled()?o:this,o.dragging&&o.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var o=0,l=this._handlers.length;o<l;o++)this._handlers[o].disable()},whenReady:function(o,l){return this._loaded?o.call(l||this,{target:this}):this.on("load",o,l),this},_getMapPanePos:function(){return Cn(this._mapPane)||new U(0,0)},_moved:function(){var o=this._getMapPanePos();return o&&!o.equals([0,0])},_getTopLeftPoint:function(o,l){var u=o&&l!==void 0?this._getNewPixelOrigin(o,l):this.getPixelOrigin();return u.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(o,l){var u=this.getSize()._divideBy(2);return this.project(o,l)._subtract(u)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(o,l,u){var g=this._getNewPixelOrigin(u,l);return this.project(o,l)._subtract(g)},_latLngBoundsToNewLayerBounds:function(o,l,u){var g=this._getNewPixelOrigin(u,l);return F([this.project(o.getSouthWest(),l)._subtract(g),this.project(o.getNorthWest(),l)._subtract(g),this.project(o.getSouthEast(),l)._subtract(g),this.project(o.getNorthEast(),l)._subtract(g)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(o){return this.latLngToLayerPoint(o).subtract(this._getCenterLayerPoint())},_limitCenter:function(o,l,u){if(!u)return o;var g=this.project(o,l),_=this.getSize().divideBy(2),w=new at(g.subtract(_),g.add(_)),P=this._getBoundsOffset(w,u,l);return Math.abs(P.x)<=1&&Math.abs(P.y)<=1?o:this.unproject(g.add(P),l)},_limitOffset:function(o,l){if(!l)return o;var u=this.getPixelBounds(),g=new at(u.min.add(o),u.max.add(o));return o.add(this._getBoundsOffset(g,l))},_getBoundsOffset:function(o,l,u){var g=F(this.project(l.getNorthEast(),u),this.project(l.getSouthWest(),u)),_=g.min.subtract(o.min),w=g.max.subtract(o.max),P=this._rebound(_.x,-w.x),A=this._rebound(_.y,-w.y);return new U(P,A)},_rebound:function(o,l){return o+l>0?Math.round(o-l)/2:Math.max(0,Math.ceil(o))-Math.max(0,Math.floor(l))},_limitZoom:function(o){var l=this.getMinZoom(),u=this.getMaxZoom(),g=J.any3d?this.options.zoomSnap:1;return g&&(o=Math.round(o/g)*g),Math.max(l,Math.min(u,o))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ft(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(o,l){var u=this._getCenterOffset(o)._trunc();return(l&&l.animate)!==!0&&!this.getSize().contains(u)?!1:(this.panBy(u,l),!0)},_createAnimProxy:function(){var o=this._proxy=Et("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(o),this.on("zoomanim",function(l){var u=ch,g=this._proxy.style[u];bn(this._proxy,this.project(l.center,l.zoom),this.getZoomScale(l.zoom,1)),g===this._proxy.style[u]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){At(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var o=this.getCenter(),l=this.getZoom();bn(this._proxy,this.project(o,l),this.getZoomScale(l,1))},_catchTransitionEnd:function(o){this._animatingZoom&&o.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(o,l,u){if(this._animatingZoom)return!0;if(u=u||{},!this._zoomAnimated||u.animate===!1||this._nothingToAnimate()||Math.abs(l-this._zoom)>this.options.zoomAnimationThreshold)return!1;var g=this.getZoomScale(l),_=this._getCenterOffset(o)._divideBy(1-1/g);return u.animate!==!0&&!this.getSize().contains(_)?!1:(j(function(){this._moveStart(!0,u.noMoveStart||!1)._animateZoom(o,l,!0)},this),!0)},_animateZoom:function(o,l,u,g){this._mapPane&&(u&&(this._animatingZoom=!0,this._animateToCenter=o,this._animateToZoom=l,ft(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:o,zoom:l,noUpdate:g}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(a(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ft(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function rL(o,l){return new yt(o,l)}var Ge=$.extend({options:{position:"topright"},initialize:function(o){C(this,o)},getPosition:function(){return this.options.position},setPosition:function(o){var l=this._map;return l&&l.removeControl(this),this.options.position=o,l&&l.addControl(this),this},getContainer:function(){return this._container},addTo:function(o){this.remove(),this._map=o;var l=this._container=this.onAdd(o),u=this.getPosition(),g=o._controlCorners[u];return ft(l,"leaflet-control"),u.indexOf("bottom")!==-1?g.insertBefore(l,g.firstChild):g.appendChild(l),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(At(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(o){this._map&&o&&o.screenX>0&&o.screenY>0&&this._map.getContainer().focus()}}),hs=function(o){return new Ge(o)};yt.include({addControl:function(o){return o.addTo(this),this},removeControl:function(o){return o.remove(),this},_initControlPos:function(){var o=this._controlCorners={},l="leaflet-",u=this._controlContainer=Et("div",l+"control-container",this._container);function g(_,w){var P=l+_+" "+l+w;o[_+w]=Et("div",P,u)}g("top","left"),g("top","right"),g("bottom","left"),g("bottom","right")},_clearControlPos:function(){for(var o in this._controlCorners)At(this._controlCorners[o]);At(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Bf=Ge.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(o,l,u,g){return u<g?-1:g<u?1:0}},initialize:function(o,l,u){C(this,u),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var g in o)this._addLayer(o[g],g);for(g in l)this._addLayer(l[g],g,!0)},onAdd:function(o){this._initLayout(),this._update(),this._map=o,o.on("zoomend",this._checkDisabledLayers,this);for(var l=0;l<this._layers.length;l++)this._layers[l].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(o){return Ge.prototype.addTo.call(this,o),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var o=0;o<this._layers.length;o++)this._layers[o].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(o,l){return this._addLayer(o,l),this._map?this._update():this},addOverlay:function(o,l){return this._addLayer(o,l,!0),this._map?this._update():this},removeLayer:function(o){o.off("add remove",this._onLayerChange,this);var l=this._getLayer(c(o));return l&&this._layers.splice(this._layers.indexOf(l),1),this._map?this._update():this},expand:function(){ft(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var o=this._map.getSize().y-(this._container.offsetTop+50);return o<this._section.clientHeight?(ft(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=o+"px"):Ft(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Ft(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var o="leaflet-control-layers",l=this._container=Et("div",o),u=this.options.collapsed;l.setAttribute("aria-haspopup",!0),ls(l),Eh(l);var g=this._section=Et("section",o+"-list");u&&(this._map.on("click",this.collapse,this),ut(l,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var _=this._layersLink=Et("a",o+"-toggle",l);_.href="#",_.title="Layers",_.setAttribute("role","button"),ut(_,{keydown:function(w){w.keyCode===13&&this._expandSafely()},click:function(w){Qt(w),this._expandSafely()}},this),u||this.expand(),this._baseLayersList=Et("div",o+"-base",g),this._separator=Et("div",o+"-separator",g),this._overlaysList=Et("div",o+"-overlays",g),l.appendChild(g)},_getLayer:function(o){for(var l=0;l<this._layers.length;l++)if(this._layers[l]&&c(this._layers[l].layer)===o)return this._layers[l]},_addLayer:function(o,l,u){this._map&&o.on("add remove",this._onLayerChange,this),this._layers.push({layer:o,name:l,overlay:u}),this.options.sortLayers&&this._layers.sort(a(function(g,_){return this.options.sortFunction(g.layer,_.layer,g.name,_.name)},this)),this.options.autoZIndex&&o.setZIndex&&(this._lastZIndex++,o.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Yo(this._baseLayersList),Yo(this._overlaysList),this._layerControlInputs=[];var o,l,u,g,_=0;for(u=0;u<this._layers.length;u++)g=this._layers[u],this._addItem(g),l=l||g.overlay,o=o||!g.overlay,_+=g.overlay?0:1;return this.options.hideSingleBase&&(o=o&&_>1,this._baseLayersList.style.display=o?"":"none"),this._separator.style.display=l&&o?"":"none",this},_onLayerChange:function(o){this._handlingClick||this._update();var l=this._getLayer(c(o.target)),u=l.overlay?o.type==="add"?"overlayadd":"overlayremove":o.type==="add"?"baselayerchange":null;u&&this._map.fire(u,l)},_createRadioElement:function(o,l){var u='<input type="radio" class="leaflet-control-layers-selector" name="'+o+'"'+(l?' checked="checked"':"")+"/>",g=document.createElement("div");return g.innerHTML=u,g.firstChild},_addItem:function(o){var l=document.createElement("label"),u=this._map.hasLayer(o.layer),g;o.overlay?(g=document.createElement("input"),g.type="checkbox",g.className="leaflet-control-layers-selector",g.defaultChecked=u):g=this._createRadioElement("leaflet-base-layers_"+c(this),u),this._layerControlInputs.push(g),g.layerId=c(o.layer),ut(g,"click",this._onInputClick,this);var _=document.createElement("span");_.innerHTML=" "+o.name;var w=document.createElement("span");l.appendChild(w),w.appendChild(g),w.appendChild(_);var P=o.overlay?this._overlaysList:this._baseLayersList;return P.appendChild(l),this._checkDisabledLayers(),l},_onInputClick:function(){if(!this._preventClick){var o=this._layerControlInputs,l,u,g=[],_=[];this._handlingClick=!0;for(var w=o.length-1;w>=0;w--)l=o[w],u=this._getLayer(l.layerId).layer,l.checked?g.push(u):l.checked||_.push(u);for(w=0;w<_.length;w++)this._map.hasLayer(_[w])&&this._map.removeLayer(_[w]);for(w=0;w<g.length;w++)this._map.hasLayer(g[w])||this._map.addLayer(g[w]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var o=this._layerControlInputs,l,u,g=this._map.getZoom(),_=o.length-1;_>=0;_--)l=o[_],u=this._getLayer(l.layerId).layer,l.disabled=u.options.minZoom!==void 0&&g<u.options.minZoom||u.options.maxZoom!==void 0&&g>u.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var o=this._section;this._preventClick=!0,ut(o,"click",Qt),this.expand();var l=this;setTimeout(function(){Pt(o,"click",Qt),l._preventClick=!1})}}),sL=function(o,l,u){return new Bf(o,l,u)},bh=Ge.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(o){var l="leaflet-control-zoom",u=Et("div",l+" leaflet-bar"),g=this.options;return this._zoomInButton=this._createButton(g.zoomInText,g.zoomInTitle,l+"-in",u,this._zoomIn),this._zoomOutButton=this._createButton(g.zoomOutText,g.zoomOutTitle,l+"-out",u,this._zoomOut),this._updateDisabled(),o.on("zoomend zoomlevelschange",this._updateDisabled,this),u},onRemove:function(o){o.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(o){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(o.shiftKey?3:1))},_zoomOut:function(o){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(o.shiftKey?3:1))},_createButton:function(o,l,u,g,_){var w=Et("a",u,g);return w.innerHTML=o,w.href="#",w.title=l,w.setAttribute("role","button"),w.setAttribute("aria-label",l),ls(w),ut(w,"click",Mn),ut(w,"click",_,this),ut(w,"click",this._refocusOnMap,this),w},_updateDisabled:function(){var o=this._map,l="leaflet-disabled";Ft(this._zoomInButton,l),Ft(this._zoomOutButton,l),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||o._zoom===o.getMinZoom())&&(ft(this._zoomOutButton,l),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||o._zoom===o.getMaxZoom())&&(ft(this._zoomInButton,l),this._zoomInButton.setAttribute("aria-disabled","true"))}});yt.mergeOptions({zoomControl:!0}),yt.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new bh,this.addControl(this.zoomControl))});var oL=function(o){return new bh(o)},Gf=Ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(o){var l="leaflet-control-scale",u=Et("div",l),g=this.options;return this._addScales(g,l+"-line",u),o.on(g.updateWhenIdle?"moveend":"move",this._update,this),o.whenReady(this._update,this),u},onRemove:function(o){o.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(o,l,u){o.metric&&(this._mScale=Et("div",l,u)),o.imperial&&(this._iScale=Et("div",l,u))},_update:function(){var o=this._map,l=o.getSize().y/2,u=o.distance(o.containerPointToLatLng([0,l]),o.containerPointToLatLng([this.options.maxWidth,l]));this._updateScales(u)},_updateScales:function(o){this.options.metric&&o&&this._updateMetric(o),this.options.imperial&&o&&this._updateImperial(o)},_updateMetric:function(o){var l=this._getRoundNum(o),u=l<1e3?l+" m":l/1e3+" km";this._updateScale(this._mScale,u,l/o)},_updateImperial:function(o){var l=o*3.2808399,u,g,_;l>5280?(u=l/5280,g=this._getRoundNum(u),this._updateScale(this._iScale,g+" mi",g/u)):(_=this._getRoundNum(l),this._updateScale(this._iScale,_+" ft",_/l))},_updateScale:function(o,l,u){o.style.width=Math.round(this.options.maxWidth*u)+"px",o.innerHTML=l},_getRoundNum:function(o){var l=Math.pow(10,(Math.floor(o)+"").length-1),u=o/l;return u=u>=10?10:u>=5?5:u>=3?3:u>=2?2:1,l*u}}),aL=function(o){return new Gf(o)},lL='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ch=Ge.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(J.inlineSvg?lL+" ":"")+"Leaflet</a>"},initialize:function(o){C(this,o),this._attributions={}},onAdd:function(o){o.attributionControl=this,this._container=Et("div","leaflet-control-attribution"),ls(this._container);for(var l in o._layers)o._layers[l].getAttribution&&this.addAttribution(o._layers[l].getAttribution());return this._update(),o.on("layeradd",this._addAttribution,this),this._container},onRemove:function(o){o.off("layeradd",this._addAttribution,this)},_addAttribution:function(o){o.layer.getAttribution&&(this.addAttribution(o.layer.getAttribution()),o.layer.once("remove",function(){this.removeAttribution(o.layer.getAttribution())},this))},setPrefix:function(o){return this.options.prefix=o,this._update(),this},addAttribution:function(o){return o?(this._attributions[o]||(this._attributions[o]=0),this._attributions[o]++,this._update(),this):this},removeAttribution:function(o){return o?(this._attributions[o]&&(this._attributions[o]--,this._update()),this):this},_update:function(){if(this._map){var o=[];for(var l in this._attributions)this._attributions[l]&&o.push(l);var u=[];this.options.prefix&&u.push(this.options.prefix),o.length&&u.push(o.join(", ")),this._container.innerHTML=u.join(' <span aria-hidden="true">|</span> ')}}});yt.mergeOptions({attributionControl:!0}),yt.addInitHook(function(){this.options.attributionControl&&new Ch().addTo(this)});var hL=function(o){return new Ch(o)};Ge.Layers=Bf,Ge.Zoom=bh,Ge.Scale=Gf,Ge.Attribution=Ch,hs.layers=sL,hs.zoom=oL,hs.scale=aL,hs.attribution=hL;var ni=$.extend({initialize:function(o){this._map=o},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});ni.addTo=function(o,l){return o.addHandler(l,this),this};var cL={Events:V},Uf=J.touch?"touchstart mousedown":"mousedown",nn=Z.extend({options:{clickTolerance:3},initialize:function(o,l,u,g){C(this,g),this._element=o,this._dragStartTarget=l||o,this._preventOutline=u},enable:function(){this._enabled||(ut(this._dragStartTarget,Uf,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(nn._dragging===this&&this.finishDrag(!0),Pt(this._dragStartTarget,Uf,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(o){if(this._enabled&&(this._moved=!1,!uh(this._element,"leaflet-zoom-anim"))){if(o.touches&&o.touches.length!==1){nn._dragging===this&&this.finishDrag();return}if(!(nn._dragging||o.shiftKey||o.which!==1&&o.button!==1&&!o.touches)&&(nn._dragging=this,this._preventOutline&&mh(this._element),gh(),ss(),!this._moving)){this.fire("down");var l=o.touches?o.touches[0]:o,u=If(this._element);this._startPoint=new U(l.clientX,l.clientY),this._startPos=Cn(this._element),this._parentScale=yh(u);var g=o.type==="mousedown";ut(document,g?"mousemove":"touchmove",this._onMove,this),ut(document,g?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(o){if(this._enabled){if(o.touches&&o.touches.length>1){this._moved=!0;return}var l=o.touches&&o.touches.length===1?o.touches[0]:o,u=new U(l.clientX,l.clientY)._subtract(this._startPoint);!u.x&&!u.y||Math.abs(u.x)+Math.abs(u.y)<this.options.clickTolerance||(u.x/=this._parentScale.x,u.y/=this._parentScale.y,Qt(o),this._moved||(this.fire("dragstart"),this._moved=!0,ft(document.body,"leaflet-dragging"),this._lastTarget=o.target||o.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ft(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(u),this._moving=!0,this._lastEvent=o,this._updatePosition())}},_updatePosition:function(){var o={originalEvent:this._lastEvent};this.fire("predrag",o),Gt(this._element,this._newPos),this.fire("drag",o)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(o){Ft(document.body,"leaflet-dragging"),this._lastTarget&&(Ft(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Pt(document,"mousemove touchmove",this._onMove,this),Pt(document,"mouseup touchend touchcancel",this._onUp,this),ph(),os();var l=this._moved&&this._moving;this._moving=!1,nn._dragging=!1,l&&this.fire("dragend",{noInertia:o,distance:this._newPos.distanceTo(this._startPos)})}});function jf(o,l,u){var g,_=[1,4,2,8],w,P,A,D,B,q,st,_t;for(w=0,q=o.length;w<q;w++)o[w]._code=Sn(o[w],l);for(A=0;A<4;A++){for(st=_[A],g=[],w=0,q=o.length,P=q-1;w<q;P=w++)D=o[w],B=o[P],D._code&st?B._code&st||(_t=$o(B,D,st,l,u),_t._code=Sn(_t,l),g.push(_t)):(B._code&st&&(_t=$o(B,D,st,l,u),_t._code=Sn(_t,l),g.push(_t)),g.push(D));o=g}return o}function Zf(o,l){var u,g,_,w,P,A,D,B,q;if(!o||o.length===0)throw new Error("latlngs not passed");Pe(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var st=ht([0,0]),_t=et(o),he=_t.getNorthWest().distanceTo(_t.getSouthWest())*_t.getNorthEast().distanceTo(_t.getNorthWest());he<1700&&(st=Th(o));var Kt=o.length,ke=[];for(u=0;u<Kt;u++){var me=ht(o[u]);ke.push(l.project(ht([me.lat-st.lat,me.lng-st.lng])))}for(A=D=B=0,u=0,g=Kt-1;u<Kt;g=u++)_=ke[u],w=ke[g],P=_.y*w.x-w.y*_.x,D+=(_.x+w.x)*P,B+=(_.y+w.y)*P,A+=P*3;A===0?q=ke[0]:q=[D/A,B/A];var pr=l.unproject(H(q));return ht([pr.lat+st.lat,pr.lng+st.lng])}function Th(o){for(var l=0,u=0,g=0,_=0;_<o.length;_++){var w=ht(o[_]);l+=w.lat,u+=w.lng,g++}return ht([l/g,u/g])}var uL={__proto__:null,clipPolygon:jf,polygonCenter:Zf,centroid:Th};function Wf(o,l){if(!l||!o.length)return o.slice();var u=l*l;return o=gL(o,u),o=fL(o,u),o}function Hf(o,l,u){return Math.sqrt(cs(o,l,u,!0))}function dL(o,l,u){return cs(o,l,u)}function fL(o,l){var u=o.length,g=typeof Uint8Array!=void 0+""?Uint8Array:Array,_=new g(u);_[0]=_[u-1]=1,Mh(o,_,l,0,u-1);var w,P=[];for(w=0;w<u;w++)_[w]&&P.push(o[w]);return P}function Mh(o,l,u,g,_){var w=0,P,A,D;for(A=g+1;A<=_-1;A++)D=cs(o[A],o[g],o[_],!0),D>w&&(P=A,w=D);w>u&&(l[P]=1,Mh(o,l,u,g,P),Mh(o,l,u,P,_))}function gL(o,l){for(var u=[o[0]],g=1,_=0,w=o.length;g<w;g++)pL(o[g],o[_])>l&&(u.push(o[g]),_=g);return _<w-1&&u.push(o[w-1]),u}var Vf;function Xf(o,l,u,g,_){var w=g?Vf:Sn(o,u),P=Sn(l,u),A,D,B;for(Vf=P;;){if(!(w|P))return[o,l];if(w&P)return!1;A=w||P,D=$o(o,l,A,u,_),B=Sn(D,u),A===w?(o=D,w=B):(l=D,P=B)}}function $o(o,l,u,g,_){var w=l.x-o.x,P=l.y-o.y,A=g.min,D=g.max,B,q;return u&8?(B=o.x+w*(D.y-o.y)/P,q=D.y):u&4?(B=o.x+w*(A.y-o.y)/P,q=A.y):u&2?(B=D.x,q=o.y+P*(D.x-o.x)/w):u&1&&(B=A.x,q=o.y+P*(A.x-o.x)/w),new U(B,q,_)}function Sn(o,l){var u=0;return o.x<l.min.x?u|=1:o.x>l.max.x&&(u|=2),o.y<l.min.y?u|=4:o.y>l.max.y&&(u|=8),u}function pL(o,l){var u=l.x-o.x,g=l.y-o.y;return u*u+g*g}function cs(o,l,u,g){var _=l.x,w=l.y,P=u.x-_,A=u.y-w,D=P*P+A*A,B;return D>0&&(B=((o.x-_)*P+(o.y-w)*A)/D,B>1?(_=u.x,w=u.y):B>0&&(_+=P*B,w+=A*B)),P=o.x-_,A=o.y-w,g?P*P+A*A:new U(_,w)}function Pe(o){return!x(o[0])||typeof o[0][0]!="object"&&typeof o[0][0]<"u"}function Yf(o){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Pe(o)}function Kf(o,l){var u,g,_,w,P,A,D,B;if(!o||o.length===0)throw new Error("latlngs not passed");Pe(o)||(console.warn("latlngs are not flat! Only the first ring will be used"),o=o[0]);var q=ht([0,0]),st=et(o),_t=st.getNorthWest().distanceTo(st.getSouthWest())*st.getNorthEast().distanceTo(st.getNorthWest());_t<1700&&(q=Th(o));var he=o.length,Kt=[];for(u=0;u<he;u++){var ke=ht(o[u]);Kt.push(l.project(ht([ke.lat-q.lat,ke.lng-q.lng])))}for(u=0,g=0;u<he-1;u++)g+=Kt[u].distanceTo(Kt[u+1])/2;if(g===0)B=Kt[0];else for(u=0,w=0;u<he-1;u++)if(P=Kt[u],A=Kt[u+1],_=P.distanceTo(A),w+=_,w>g){D=(w-g)/_,B=[A.x-D*(A.x-P.x),A.y-D*(A.y-P.y)];break}var me=l.unproject(H(B));return ht([me.lat+q.lat,me.lng+q.lng])}var _L={__proto__:null,simplify:Wf,pointToSegmentDistance:Hf,closestPointOnSegment:dL,clipSegment:Xf,_getEdgeIntersection:$o,_getBitCode:Sn,_sqClosestPointOnSegment:cs,isFlat:Pe,_flat:Yf,polylineCenter:Kf},Sh={project:function(o){return new U(o.lng,o.lat)},unproject:function(o){return new it(o.y,o.x)},bounds:new at([-180,-90],[180,90])},Ph={R:6378137,R_MINOR:6356752314245179e-9,bounds:new at([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(o){var l=Math.PI/180,u=this.R,g=o.lat*l,_=this.R_MINOR/u,w=Math.sqrt(1-_*_),P=w*Math.sin(g),A=Math.tan(Math.PI/4-g/2)/Math.pow((1-P)/(1+P),w/2);return g=-u*Math.log(Math.max(A,1e-10)),new U(o.lng*l*u,g)},unproject:function(o){for(var l=180/Math.PI,u=this.R,g=this.R_MINOR/u,_=Math.sqrt(1-g*g),w=Math.exp(-o.y/u),P=Math.PI/2-2*Math.atan(w),A=0,D=.1,B;A<15&&Math.abs(D)>1e-7;A++)B=_*Math.sin(P),B=Math.pow((1-B)/(1+B),_/2),D=Math.PI/2-2*Math.atan(w*B)-P,P+=D;return new it(P*l,o.x*l/u)}},mL={__proto__:null,LonLat:Sh,Mercator:Ph,SphericalMercator:Qe},yL=i({},Xt,{code:"EPSG:3395",projection:Ph,transformation:function(){var o=.5/(Math.PI*Ph.R);return Me(o,.5,-o,.5)}()}),qf=i({},Xt,{code:"EPSG:4326",projection:Sh,transformation:Me(1/180,1,-1/180,.5)}),vL=i({},kt,{projection:Sh,transformation:Me(1,0,-1,0),scale:function(o){return Math.pow(2,o)},zoom:function(o){return Math.log(o)/Math.LN2},distance:function(o,l){var u=l.lng-o.lng,g=l.lat-o.lat;return Math.sqrt(u*u+g*g)},infinite:!0});kt.Earth=Xt,kt.EPSG3395=yL,kt.EPSG3857=Yi,kt.EPSG900913=$e,kt.EPSG4326=qf,kt.Simple=vL;var Ue=Z.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(o){return o.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(o){return o&&o.removeLayer(this),this},getPane:function(o){return this._map.getPane(o?this.options[o]||o:this.options.pane)},addInteractiveTarget:function(o){return this._map._targets[c(o)]=this,this},removeInteractiveTarget:function(o){return delete this._map._targets[c(o)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(o){var l=o.target;if(l.hasLayer(this)){if(this._map=l,this._zoomAnimated=l._zoomAnimated,this.getEvents){var u=this.getEvents();l.on(u,this),this.once("remove",function(){l.off(u,this)},this)}this.onAdd(l),this.fire("add"),l.fire("layeradd",{layer:this})}}});yt.include({addLayer:function(o){if(!o._layerAdd)throw new Error("The provided object is not a Layer.");var l=c(o);return this._layers[l]?this:(this._layers[l]=o,o._mapToAdd=this,o.beforeAdd&&o.beforeAdd(this),this.whenReady(o._layerAdd,o),this)},removeLayer:function(o){var l=c(o);return this._layers[l]?(this._loaded&&o.onRemove(this),delete this._layers[l],this._loaded&&(this.fire("layerremove",{layer:o}),o.fire("remove")),o._map=o._mapToAdd=null,this):this},hasLayer:function(o){return c(o)in this._layers},eachLayer:function(o,l){for(var u in this._layers)o.call(l,this._layers[u]);return this},_addLayers:function(o){o=o?x(o)?o:[o]:[];for(var l=0,u=o.length;l<u;l++)this.addLayer(o[l])},_addZoomLimit:function(o){(!isNaN(o.options.maxZoom)||!isNaN(o.options.minZoom))&&(this._zoomBoundLayers[c(o)]=o,this._updateZoomLevels())},_removeZoomLimit:function(o){var l=c(o);this._zoomBoundLayers[l]&&(delete this._zoomBoundLayers[l],this._updateZoomLevels())},_updateZoomLevels:function(){var o=1/0,l=-1/0,u=this._getZoomSpan();for(var g in this._zoomBoundLayers){var _=this._zoomBoundLayers[g].options;o=_.minZoom===void 0?o:Math.min(o,_.minZoom),l=_.maxZoom===void 0?l:Math.max(l,_.maxZoom)}this._layersMaxZoom=l===-1/0?void 0:l,this._layersMinZoom=o===1/0?void 0:o,u!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var cr=Ue.extend({initialize:function(o,l){C(this,l),this._layers={};var u,g;if(o)for(u=0,g=o.length;u<g;u++)this.addLayer(o[u])},addLayer:function(o){var l=this.getLayerId(o);return this._layers[l]=o,this._map&&this._map.addLayer(o),this},removeLayer:function(o){var l=o in this._layers?o:this.getLayerId(o);return this._map&&this._layers[l]&&this._map.removeLayer(this._layers[l]),delete this._layers[l],this},hasLayer:function(o){var l=typeof o=="number"?o:this.getLayerId(o);return l in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(o){var l=Array.prototype.slice.call(arguments,1),u,g;for(u in this._layers)g=this._layers[u],g[o]&&g[o].apply(g,l);return this},onAdd:function(o){this.eachLayer(o.addLayer,o)},onRemove:function(o){this.eachLayer(o.removeLayer,o)},eachLayer:function(o,l){for(var u in this._layers)o.call(l,this._layers[u]);return this},getLayer:function(o){return this._layers[o]},getLayers:function(){var o=[];return this.eachLayer(o.push,o),o},setZIndex:function(o){return this.invoke("setZIndex",o)},getLayerId:function(o){return c(o)}}),xL=function(o,l){return new cr(o,l)},bi=cr.extend({addLayer:function(o){return this.hasLayer(o)?this:(o.addEventParent(this),cr.prototype.addLayer.call(this,o),this.fire("layeradd",{layer:o}))},removeLayer:function(o){return this.hasLayer(o)?(o in this._layers&&(o=this._layers[o]),o.removeEventParent(this),cr.prototype.removeLayer.call(this,o),this.fire("layerremove",{layer:o})):this},setStyle:function(o){return this.invoke("setStyle",o)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var o=new wt;for(var l in this._layers){var u=this._layers[l];o.extend(u.getBounds?u.getBounds():u.getLatLng())}return o}}),wL=function(o,l){return new bi(o,l)},ur=$.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(o){C(this,o)},createIcon:function(o){return this._createIcon("icon",o)},createShadow:function(o){return this._createIcon("shadow",o)},_createIcon:function(o,l){var u=this._getIconUrl(o);if(!u){if(o==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var g=this._createImg(u,l&&l.tagName==="IMG"?l:null);return this._setIconStyles(g,o),(this.options.crossOrigin||this.options.crossOrigin==="")&&(g.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),g},_setIconStyles:function(o,l){var u=this.options,g=u[l+"Size"];typeof g=="number"&&(g=[g,g]);var _=H(g),w=H(l==="shadow"&&u.shadowAnchor||u.iconAnchor||_&&_.divideBy(2,!0));o.className="leaflet-marker-"+l+" "+(u.className||""),w&&(o.style.marginLeft=-w.x+"px",o.style.marginTop=-w.y+"px"),_&&(o.style.width=_.x+"px",o.style.height=_.y+"px")},_createImg:function(o,l){return l=l||document.createElement("img"),l.src=o,l},_getIconUrl:function(o){return J.retina&&this.options[o+"RetinaUrl"]||this.options[o+"Url"]}});function EL(o){return new ur(o)}var us=ur.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(o){return typeof us.imagePath!="string"&&(us.imagePath=this._detectIconPath()),(this.options.imagePath||us.imagePath)+ur.prototype._getIconUrl.call(this,o)},_stripUrl:function(o){var l=function(u,g,_){var w=g.exec(u);return w&&w[_]};return o=l(o,/^url\((['"])?(.+)\1\)$/,2),o&&l(o,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var o=Et("div","leaflet-default-icon-path",document.body),l=rs(o,"background-image")||rs(o,"backgroundImage");if(document.body.removeChild(o),l=this._stripUrl(l),l)return l;var u=document.querySelector('link[href$="leaflet.css"]');return u?u.href.substring(0,u.href.length-11-1):""}}),Jf=ni.extend({initialize:function(o){this._marker=o},addHooks:function(){var o=this._marker._icon;this._draggable||(this._draggable=new nn(o,o,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ft(o,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Ft(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(o){var l=this._marker,u=l._map,g=this._marker.options.autoPanSpeed,_=this._marker.options.autoPanPadding,w=Cn(l._icon),P=u.getPixelBounds(),A=u.getPixelOrigin(),D=F(P.min._subtract(A).add(_),P.max._subtract(A).subtract(_));if(!D.contains(w)){var B=H((Math.max(D.max.x,w.x)-D.max.x)/(P.max.x-D.max.x)-(Math.min(D.min.x,w.x)-D.min.x)/(P.min.x-D.min.x),(Math.max(D.max.y,w.y)-D.max.y)/(P.max.y-D.max.y)-(Math.min(D.min.y,w.y)-D.min.y)/(P.min.y-D.min.y)).multiplyBy(g);u.panBy(B,{animate:!1}),this._draggable._newPos._add(B),this._draggable._startPos._add(B),Gt(l._icon,this._draggable._newPos),this._onDrag(o),this._panRequest=j(this._adjustPan.bind(this,o))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(o){this._marker.options.autoPan&&(W(this._panRequest),this._panRequest=j(this._adjustPan.bind(this,o)))},_onDrag:function(o){var l=this._marker,u=l._shadow,g=Cn(l._icon),_=l._map.layerPointToLatLng(g);u&&Gt(u,g),l._latlng=_,o.latlng=_,o.oldLatLng=this._oldLatLng,l.fire("move",o).fire("drag",o)},_onDragEnd:function(o){W(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",o)}}),ta=Ue.extend({options:{icon:new us,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(o,l){C(this,l),this._latlng=ht(o)},onAdd:function(o){this._zoomAnimated=this._zoomAnimated&&o.options.markerZoomAnimation,this._zoomAnimated&&o.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(o){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&o.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(o){var l=this._latlng;return this._latlng=ht(o),this.update(),this.fire("move",{oldLatLng:l,latlng:this._latlng})},setZIndexOffset:function(o){return this.options.zIndexOffset=o,this.update()},getIcon:function(){return this.options.icon},setIcon:function(o){return this.options.icon=o,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var o=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(o)}return this},_initIcon:function(){var o=this.options,l="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),u=o.icon.createIcon(this._icon),g=!1;u!==this._icon&&(this._icon&&this._removeIcon(),g=!0,o.title&&(u.title=o.title),u.tagName==="IMG"&&(u.alt=o.alt||"")),ft(u,l),o.keyboard&&(u.tabIndex="0",u.setAttribute("role","button")),this._icon=u,o.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ut(u,"focus",this._panOnFocus,this);var _=o.icon.createShadow(this._shadow),w=!1;_!==this._shadow&&(this._removeShadow(),w=!0),_&&(ft(_,l),_.alt=""),this._shadow=_,o.opacity<1&&this._updateOpacity(),g&&this.getPane().appendChild(this._icon),this._initInteraction(),_&&w&&this.getPane(o.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Pt(this._icon,"focus",this._panOnFocus,this),At(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&At(this._shadow),this._shadow=null},_setPos:function(o){this._icon&&Gt(this._icon,o),this._shadow&&Gt(this._shadow,o),this._zIndex=o.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(o){this._icon&&(this._icon.style.zIndex=this._zIndex+o)},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center).round();this._setPos(l)},_initInteraction:function(){if(this.options.interactive&&(ft(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Jf)){var o=this.options.draggable;this.dragging&&(o=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Jf(this),o&&this.dragging.enable()}},setOpacity:function(o){return this.options.opacity=o,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var o=this.options.opacity;this._icon&&Se(this._icon,o),this._shadow&&Se(this._shadow,o)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var o=this._map;if(o){var l=this.options.icon.options,u=l.iconSize?H(l.iconSize):H(0,0),g=l.iconAnchor?H(l.iconAnchor):H(0,0);o.panInside(this._latlng,{paddingTopLeft:g,paddingBottomRight:u.subtract(g)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function LL(o,l){return new ta(o,l)}var rn=Ue.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(o){this._renderer=o.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(o){return C(this,o),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&o&&Object.prototype.hasOwnProperty.call(o,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),ea=rn.extend({options:{fill:!0,radius:10},initialize:function(o,l){C(this,l),this._latlng=ht(o),this._radius=this.options.radius},setLatLng:function(o){var l=this._latlng;return this._latlng=ht(o),this.redraw(),this.fire("move",{oldLatLng:l,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(o){return this.options.radius=this._radius=o,this.redraw()},getRadius:function(){return this._radius},setStyle:function(o){var l=o&&o.radius||this._radius;return rn.prototype.setStyle.call(this,o),this.setRadius(l),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var o=this._radius,l=this._radiusY||o,u=this._clickTolerance(),g=[o+u,l+u];this._pxBounds=new at(this._point.subtract(g),this._point.add(g))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(o){return o.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function bL(o,l){return new ea(o,l)}var kh=ea.extend({initialize:function(o,l,u){if(typeof l=="number"&&(l=i({},u,{radius:l})),C(this,l),this._latlng=ht(o),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(o){return this._mRadius=o,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var o=[this._radius,this._radiusY||this._radius];return new wt(this._map.layerPointToLatLng(this._point.subtract(o)),this._map.layerPointToLatLng(this._point.add(o)))},setStyle:rn.prototype.setStyle,_project:function(){var o=this._latlng.lng,l=this._latlng.lat,u=this._map,g=u.options.crs;if(g.distance===Xt.distance){var _=Math.PI/180,w=this._mRadius/Xt.R/_,P=u.project([l+w,o]),A=u.project([l-w,o]),D=P.add(A).divideBy(2),B=u.unproject(D).lat,q=Math.acos((Math.cos(w*_)-Math.sin(l*_)*Math.sin(B*_))/(Math.cos(l*_)*Math.cos(B*_)))/_;(isNaN(q)||q===0)&&(q=w/Math.cos(Math.PI/180*l)),this._point=D.subtract(u.getPixelOrigin()),this._radius=isNaN(q)?0:D.x-u.project([B,o-q]).x,this._radiusY=D.y-P.y}else{var st=g.unproject(g.project(this._latlng).subtract([this._mRadius,0]));this._point=u.latLngToLayerPoint(this._latlng),this._radius=this._point.x-u.latLngToLayerPoint(st).x}this._updateBounds()}});function CL(o,l,u){return new kh(o,l,u)}var Ci=rn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(o,l){C(this,l),this._setLatLngs(o)},getLatLngs:function(){return this._latlngs},setLatLngs:function(o){return this._setLatLngs(o),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(o){for(var l=1/0,u=null,g=cs,_,w,P=0,A=this._parts.length;P<A;P++)for(var D=this._parts[P],B=1,q=D.length;B<q;B++){_=D[B-1],w=D[B];var st=g(o,_,w,!0);st<l&&(l=st,u=g(o,_,w))}return u&&(u.distance=Math.sqrt(l)),u},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Kf(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(o,l){return l=l||this._defaultShape(),o=ht(o),l.push(o),this._bounds.extend(o),this.redraw()},_setLatLngs:function(o){this._bounds=new wt,this._latlngs=this._convertLatLngs(o)},_defaultShape:function(){return Pe(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(o){for(var l=[],u=Pe(o),g=0,_=o.length;g<_;g++)u?(l[g]=ht(o[g]),this._bounds.extend(l[g])):l[g]=this._convertLatLngs(o[g]);return l},_project:function(){var o=new at;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,o),this._bounds.isValid()&&o.isValid()&&(this._rawPxBounds=o,this._updateBounds())},_updateBounds:function(){var o=this._clickTolerance(),l=new U(o,o);this._rawPxBounds&&(this._pxBounds=new at([this._rawPxBounds.min.subtract(l),this._rawPxBounds.max.add(l)]))},_projectLatlngs:function(o,l,u){var g=o[0]instanceof it,_=o.length,w,P;if(g){for(P=[],w=0;w<_;w++)P[w]=this._map.latLngToLayerPoint(o[w]),u.extend(P[w]);l.push(P)}else for(w=0;w<_;w++)this._projectLatlngs(o[w],l,u)},_clipPoints:function(){var o=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}var l=this._parts,u,g,_,w,P,A,D;for(u=0,_=0,w=this._rings.length;u<w;u++)for(D=this._rings[u],g=0,P=D.length;g<P-1;g++)A=Xf(D[g],D[g+1],o,g,!0),A&&(l[_]=l[_]||[],l[_].push(A[0]),(A[1]!==D[g+1]||g===P-2)&&(l[_].push(A[1]),_++))}},_simplifyPoints:function(){for(var o=this._parts,l=this.options.smoothFactor,u=0,g=o.length;u<g;u++)o[u]=Wf(o[u],l)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(o,l){var u,g,_,w,P,A,D=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(o))return!1;for(u=0,w=this._parts.length;u<w;u++)for(A=this._parts[u],g=0,P=A.length,_=P-1;g<P;_=g++)if(!(!l&&g===0)&&Hf(o,A[_],A[g])<=D)return!0;return!1}});function TL(o,l){return new Ci(o,l)}Ci._flat=Yf;var dr=Ci.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Zf(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(o){var l=Ci.prototype._convertLatLngs.call(this,o),u=l.length;return u>=2&&l[0]instanceof it&&l[0].equals(l[u-1])&&l.pop(),l},_setLatLngs:function(o){Ci.prototype._setLatLngs.call(this,o),Pe(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Pe(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var o=this._renderer._bounds,l=this.options.weight,u=new U(l,l);if(o=new at(o.min.subtract(u),o.max.add(u)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(o))){if(this.options.noClip){this._parts=this._rings;return}for(var g=0,_=this._rings.length,w;g<_;g++)w=jf(this._rings[g],o,!0),w.length&&this._parts.push(w)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(o){var l=!1,u,g,_,w,P,A,D,B;if(!this._pxBounds||!this._pxBounds.contains(o))return!1;for(w=0,D=this._parts.length;w<D;w++)for(u=this._parts[w],P=0,B=u.length,A=B-1;P<B;A=P++)g=u[P],_=u[A],g.y>o.y!=_.y>o.y&&o.x<(_.x-g.x)*(o.y-g.y)/(_.y-g.y)+g.x&&(l=!l);return l||Ci.prototype._containsPoint.call(this,o,!0)}});function ML(o,l){return new dr(o,l)}var Ti=bi.extend({initialize:function(o,l){C(this,l),this._layers={},o&&this.addData(o)},addData:function(o){var l=x(o)?o:o.features,u,g,_;if(l){for(u=0,g=l.length;u<g;u++)_=l[u],(_.geometries||_.geometry||_.features||_.coordinates)&&this.addData(_);return this}var w=this.options;if(w.filter&&!w.filter(o))return this;var P=ia(o,w);return P?(P.feature=sa(o),P.defaultOptions=P.options,this.resetStyle(P),w.onEachFeature&&w.onEachFeature(o,P),this.addLayer(P)):this},resetStyle:function(o){return o===void 0?this.eachLayer(this.resetStyle,this):(o.options=i({},o.defaultOptions),this._setLayerStyle(o,this.options.style),this)},setStyle:function(o){return this.eachLayer(function(l){this._setLayerStyle(l,o)},this)},_setLayerStyle:function(o,l){o.setStyle&&(typeof l=="function"&&(l=l(o.feature)),o.setStyle(l))}});function ia(o,l){var u=o.type==="Feature"?o.geometry:o,g=u?u.coordinates:null,_=[],w=l&&l.pointToLayer,P=l&&l.coordsToLatLng||Rh,A,D,B,q;if(!g&&!u)return null;switch(u.type){case"Point":return A=P(g),Qf(w,o,A,l);case"MultiPoint":for(B=0,q=g.length;B<q;B++)A=P(g[B]),_.push(Qf(w,o,A,l));return new bi(_);case"LineString":case"MultiLineString":return D=na(g,u.type==="LineString"?0:1,P),new Ci(D,l);case"Polygon":case"MultiPolygon":return D=na(g,u.type==="Polygon"?1:2,P),new dr(D,l);case"GeometryCollection":for(B=0,q=u.geometries.length;B<q;B++){var st=ia({geometry:u.geometries[B],type:"Feature",properties:o.properties},l);st&&_.push(st)}return new bi(_);case"FeatureCollection":for(B=0,q=u.features.length;B<q;B++){var _t=ia(u.features[B],l);_t&&_.push(_t)}return new bi(_);default:throw new Error("Invalid GeoJSON object.")}}function Qf(o,l,u,g){return o?o(l,u):new ta(u,g&&g.markersInheritOptions&&g)}function Rh(o){return new it(o[1],o[0],o[2])}function na(o,l,u){for(var g=[],_=0,w=o.length,P;_<w;_++)P=l?na(o[_],l-1,u):(u||Rh)(o[_]),g.push(P);return g}function Ah(o,l){return o=ht(o),o.alt!==void 0?[m(o.lng,l),m(o.lat,l),m(o.alt,l)]:[m(o.lng,l),m(o.lat,l)]}function ra(o,l,u,g){for(var _=[],w=0,P=o.length;w<P;w++)_.push(l?ra(o[w],Pe(o[w])?0:l-1,u,g):Ah(o[w],g));return!l&&u&&_.length>0&&_.push(_[0].slice()),_}function fr(o,l){return o.feature?i({},o.feature,{geometry:l}):sa(l)}function sa(o){return o.type==="Feature"||o.type==="FeatureCollection"?o:{type:"Feature",properties:{},geometry:o}}var Ih={toGeoJSON:function(o){return fr(this,{type:"Point",coordinates:Ah(this.getLatLng(),o)})}};ta.include(Ih),kh.include(Ih),ea.include(Ih),Ci.include({toGeoJSON:function(o){var l=!Pe(this._latlngs),u=ra(this._latlngs,l?1:0,!1,o);return fr(this,{type:(l?"Multi":"")+"LineString",coordinates:u})}}),dr.include({toGeoJSON:function(o){var l=!Pe(this._latlngs),u=l&&!Pe(this._latlngs[0]),g=ra(this._latlngs,u?2:l?1:0,!0,o);return l||(g=[g]),fr(this,{type:(u?"Multi":"")+"Polygon",coordinates:g})}}),cr.include({toMultiPoint:function(o){var l=[];return this.eachLayer(function(u){l.push(u.toGeoJSON(o).geometry.coordinates)}),fr(this,{type:"MultiPoint",coordinates:l})},toGeoJSON:function(o){var l=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(l==="MultiPoint")return this.toMultiPoint(o);var u=l==="GeometryCollection",g=[];return this.eachLayer(function(_){if(_.toGeoJSON){var w=_.toGeoJSON(o);if(u)g.push(w.geometry);else{var P=sa(w);P.type==="FeatureCollection"?g.push.apply(g,P.features):g.push(P)}}}),u?fr(this,{geometries:g,type:"GeometryCollection"}):{type:"FeatureCollection",features:g}}});function $f(o,l){return new Ti(o,l)}var SL=$f,oa=Ue.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(o,l,u){this._url=o,this._bounds=et(l),C(this,u)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ft(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){At(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(o){return this.options.opacity=o,this._image&&this._updateOpacity(),this},setStyle:function(o){return o.opacity&&this.setOpacity(o.opacity),this},bringToFront:function(){return this._map&&lr(this._image),this},bringToBack:function(){return this._map&&hr(this._image),this},setUrl:function(o){return this._url=o,this._image&&(this._image.src=o),this},setBounds:function(o){return this._bounds=et(o),this._map&&this._reset(),this},getEvents:function(){var o={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var o=this._url.tagName==="IMG",l=this._image=o?this._url:Et("img");if(ft(l,"leaflet-image-layer"),this._zoomAnimated&&ft(l,"leaflet-zoom-animated"),this.options.className&&ft(l,this.options.className),l.onselectstart=p,l.onmousemove=p,l.onload=a(this.fire,this,"load"),l.onerror=a(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(l.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),o){this._url=l.src;return}l.src=this._url,l.alt=this.options.alt},_animateZoom:function(o){var l=this._map.getZoomScale(o.zoom),u=this._map._latLngBoundsToNewLayerBounds(this._bounds,o.zoom,o.center).min;bn(this._image,u,l)},_reset:function(){var o=this._image,l=new at(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),u=l.getSize();Gt(o,l.min),o.style.width=u.x+"px",o.style.height=u.y+"px"},_updateOpacity:function(){Se(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var o=this.options.errorOverlayUrl;o&&this._url!==o&&(this._url=o,this._image.src=o)},getCenter:function(){return this._bounds.getCenter()}}),PL=function(o,l,u){return new oa(o,l,u)},tg=oa.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var o=this._url.tagName==="VIDEO",l=this._image=o?this._url:Et("video");if(ft(l,"leaflet-image-layer"),this._zoomAnimated&&ft(l,"leaflet-zoom-animated"),this.options.className&&ft(l,this.options.className),l.onselectstart=p,l.onmousemove=p,l.onloadeddata=a(this.fire,this,"load"),o){for(var u=l.getElementsByTagName("source"),g=[],_=0;_<u.length;_++)g.push(u[_].src);this._url=u.length>0?g:[l.src];return}x(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(l.style,"objectFit")&&(l.style.objectFit="fill"),l.autoplay=!!this.options.autoplay,l.loop=!!this.options.loop,l.muted=!!this.options.muted,l.playsInline=!!this.options.playsInline;for(var w=0;w<this._url.length;w++){var P=Et("source");P.src=this._url[w],l.appendChild(P)}}});function kL(o,l,u){return new tg(o,l,u)}var eg=oa.extend({_initImage:function(){var o=this._image=this._url;ft(o,"leaflet-image-layer"),this._zoomAnimated&&ft(o,"leaflet-zoom-animated"),this.options.className&&ft(o,this.options.className),o.onselectstart=p,o.onmousemove=p}});function RL(o,l,u){return new eg(o,l,u)}var ri=Ue.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(o,l){o&&(o instanceof it||x(o))?(this._latlng=ht(o),C(this,l)):(C(this,o),this._source=l),this.options.content&&(this._content=this.options.content)},openOn:function(o){return o=arguments.length?o:this._source._map,o.hasLayer(this)||o.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(o){return this._map?this.close():(arguments.length?this._source=o:o=this._source,this._prepareOpen(),this.openOn(o._map)),this},onAdd:function(o){this._zoomAnimated=o._zoomAnimated,this._container||this._initLayout(),o._fadeAnimated&&Se(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),o._fadeAnimated&&Se(this._container,1),this.bringToFront(),this.options.interactive&&(ft(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(o){o._fadeAnimated?(Se(this._container,0),this._removeTimeout=setTimeout(a(At,void 0,this._container),200)):At(this._container),this.options.interactive&&(Ft(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(o){return this._latlng=ht(o),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(o){return this._content=o,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var o={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&lr(this._container),this},bringToBack:function(){return this._map&&hr(this._container),this},_prepareOpen:function(o){var l=this._source;if(!l._map)return!1;if(l instanceof bi){l=null;var u=this._source._layers;for(var g in u)if(u[g]._map){l=u[g];break}if(!l)return!1;this._source=l}if(!o)if(l.getCenter)o=l.getCenter();else if(l.getLatLng)o=l.getLatLng();else if(l.getBounds)o=l.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(o),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var o=this._contentNode,l=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof l=="string")o.innerHTML=l;else{for(;o.hasChildNodes();)o.removeChild(o.firstChild);o.appendChild(l)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var o=this._map.latLngToLayerPoint(this._latlng),l=H(this.options.offset),u=this._getAnchor();this._zoomAnimated?Gt(this._container,o.add(u)):l=l.add(o).add(u);var g=this._containerBottom=-l.y,_=this._containerLeft=-Math.round(this._containerWidth/2)+l.x;this._container.style.bottom=g+"px",this._container.style.left=_+"px"}},_getAnchor:function(){return[0,0]}});yt.include({_initOverlay:function(o,l,u,g){var _=l;return _ instanceof o||(_=new o(g).setContent(l)),u&&_.setLatLng(u),_}}),Ue.include({_initOverlay:function(o,l,u,g){var _=u;return _ instanceof o?(C(_,g),_._source=this):(_=l&&!g?l:new o(g,this),_.setContent(u)),_}});var aa=ri.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(o){return o=arguments.length?o:this._source._map,!o.hasLayer(this)&&o._popup&&o._popup.options.autoClose&&o.removeLayer(o._popup),o._popup=this,ri.prototype.openOn.call(this,o)},onAdd:function(o){ri.prototype.onAdd.call(this,o),o.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof rn||this._source.on("preclick",Tn))},onRemove:function(o){ri.prototype.onRemove.call(this,o),o.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof rn||this._source.off("preclick",Tn))},getEvents:function(){var o=ri.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(o.preclick=this.close),this.options.keepInView&&(o.moveend=this._adjustPan),o},_initLayout:function(){var o="leaflet-popup",l=this._container=Et("div",o+" "+(this.options.className||"")+" leaflet-zoom-animated"),u=this._wrapper=Et("div",o+"-content-wrapper",l);if(this._contentNode=Et("div",o+"-content",u),ls(l),Eh(this._contentNode),ut(l,"contextmenu",Tn),this._tipContainer=Et("div",o+"-tip-container",l),this._tip=Et("div",o+"-tip",this._tipContainer),this.options.closeButton){var g=this._closeButton=Et("a",o+"-close-button",l);g.setAttribute("role","button"),g.setAttribute("aria-label","Close popup"),g.href="#close",g.innerHTML='<span aria-hidden="true">&#215;</span>',ut(g,"click",function(_){Qt(_),this.close()},this)}},_updateLayout:function(){var o=this._contentNode,l=o.style;l.width="",l.whiteSpace="nowrap";var u=o.offsetWidth;u=Math.min(u,this.options.maxWidth),u=Math.max(u,this.options.minWidth),l.width=u+1+"px",l.whiteSpace="",l.height="";var g=o.offsetHeight,_=this.options.maxHeight,w="leaflet-popup-scrolled";_&&g>_?(l.height=_+"px",ft(o,w)):Ft(o,w),this._containerWidth=this._container.offsetWidth},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center),u=this._getAnchor();Gt(this._container,l.add(u))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var o=this._map,l=parseInt(rs(this._container,"marginBottom"),10)||0,u=this._container.offsetHeight+l,g=this._containerWidth,_=new U(this._containerLeft,-u-this._containerBottom);_._add(Cn(this._container));var w=o.layerPointToContainerPoint(_),P=H(this.options.autoPanPadding),A=H(this.options.autoPanPaddingTopLeft||P),D=H(this.options.autoPanPaddingBottomRight||P),B=o.getSize(),q=0,st=0;w.x+g+D.x>B.x&&(q=w.x+g-B.x+D.x),w.x-q-A.x<0&&(q=w.x-A.x),w.y+u+D.y>B.y&&(st=w.y+u-B.y+D.y),w.y-st-A.y<0&&(st=w.y-A.y),(q||st)&&(this.options.keepInView&&(this._autopanning=!0),o.fire("autopanstart").panBy([q,st]))}},_getAnchor:function(){return H(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),AL=function(o,l){return new aa(o,l)};yt.mergeOptions({closePopupOnClick:!0}),yt.include({openPopup:function(o,l,u){return this._initOverlay(aa,o,l,u).openOn(this),this},closePopup:function(o){return o=arguments.length?o:this._popup,o&&o.close(),this}}),Ue.include({bindPopup:function(o,l){return this._popup=this._initOverlay(aa,this._popup,o,l),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(o){return this._popup&&(this instanceof bi||(this._popup._source=this),this._popup._prepareOpen(o||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(o){return this._popup&&this._popup.setContent(o),this},getPopup:function(){return this._popup},_openPopup:function(o){if(!(!this._popup||!this._map)){Mn(o);var l=o.layer||o.target;if(this._popup._source===l&&!(l instanceof rn)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(o.latlng);return}this._popup._source=l,this.openPopup(o.latlng)}},_movePopup:function(o){this._popup.setLatLng(o.latlng)},_onKeyPress:function(o){o.originalEvent.keyCode===13&&this._openPopup(o)}});var la=ri.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(o){ri.prototype.onAdd.call(this,o),this.setOpacity(this.options.opacity),o.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(o){ri.prototype.onRemove.call(this,o),o.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var o=ri.prototype.getEvents.call(this);return this.options.permanent||(o.preclick=this.close),o},_initLayout:function(){var o="leaflet-tooltip",l=o+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=Et("div",l),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+c(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(o){var l,u,g=this._map,_=this._container,w=g.latLngToContainerPoint(g.getCenter()),P=g.layerPointToContainerPoint(o),A=this.options.direction,D=_.offsetWidth,B=_.offsetHeight,q=H(this.options.offset),st=this._getAnchor();A==="top"?(l=D/2,u=B):A==="bottom"?(l=D/2,u=0):A==="center"?(l=D/2,u=B/2):A==="right"?(l=0,u=B/2):A==="left"?(l=D,u=B/2):P.x<w.x?(A="right",l=0,u=B/2):(A="left",l=D+(q.x+st.x)*2,u=B/2),o=o.subtract(H(l,u,!0)).add(q).add(st),Ft(_,"leaflet-tooltip-right"),Ft(_,"leaflet-tooltip-left"),Ft(_,"leaflet-tooltip-top"),Ft(_,"leaflet-tooltip-bottom"),ft(_,"leaflet-tooltip-"+A),Gt(_,o)},_updatePosition:function(){var o=this._map.latLngToLayerPoint(this._latlng);this._setPosition(o)},setOpacity:function(o){this.options.opacity=o,this._container&&Se(this._container,o)},_animateZoom:function(o){var l=this._map._latLngToNewLayerPoint(this._latlng,o.zoom,o.center);this._setPosition(l)},_getAnchor:function(){return H(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),IL=function(o,l){return new la(o,l)};yt.include({openTooltip:function(o,l,u){return this._initOverlay(la,o,l,u).openOn(this),this},closeTooltip:function(o){return o.close(),this}}),Ue.include({bindTooltip:function(o,l){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(la,this._tooltip,o,l),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(o){if(!(!o&&this._tooltipHandlersAdded)){var l=o?"off":"on",u={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?u.add=this._openTooltip:(u.mouseover=this._openTooltip,u.mouseout=this.closeTooltip,u.click=this._openTooltip,this._map?this._addFocusListeners():u.add=this._addFocusListeners),this._tooltip.options.sticky&&(u.mousemove=this._moveTooltip),this[l](u),this._tooltipHandlersAdded=!o}},openTooltip:function(o){return this._tooltip&&(this instanceof bi||(this._tooltip._source=this),this._tooltip._prepareOpen(o)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(o){return this._tooltip&&this._tooltip.setContent(o),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(o){var l=typeof o.getElement=="function"&&o.getElement();l&&(ut(l,"focus",function(){this._tooltip._source=o,this.openTooltip()},this),ut(l,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(o){var l=typeof o.getElement=="function"&&o.getElement();l&&l.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(o){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var l=this;this._map.once("moveend",function(){l._openOnceFlag=!1,l._openTooltip(o)});return}this._tooltip._source=o.layer||o.target,this.openTooltip(this._tooltip.options.sticky?o.latlng:void 0)}},_moveTooltip:function(o){var l=o.latlng,u,g;this._tooltip.options.sticky&&o.originalEvent&&(u=this._map.mouseEventToContainerPoint(o.originalEvent),g=this._map.containerPointToLayerPoint(u),l=this._map.layerPointToLatLng(g)),this._tooltip.setLatLng(l)}});var ig=ur.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(o){var l=o&&o.tagName==="DIV"?o:document.createElement("div"),u=this.options;if(u.html instanceof Element?(Yo(l),l.appendChild(u.html)):l.innerHTML=u.html!==!1?u.html:"",u.bgPos){var g=H(u.bgPos);l.style.backgroundPosition=-g.x+"px "+-g.y+"px"}return this._setIconStyles(l,"icon"),l},createShadow:function(){return null}});function DL(o){return new ig(o)}ur.Default=us;var ds=Ue.extend({options:{tileSize:256,opacity:1,updateWhenIdle:J.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(o){C(this,o)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(o){o._addZoomLimit(this)},onRemove:function(o){this._removeAllTiles(),At(this._container),o._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(lr(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(hr(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(o){return this.options.opacity=o,this._updateOpacity(),this},setZIndex:function(o){return this.options.zIndex=o,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var o=this._clampZoom(this._map.getZoom());o!==this._tileZoom&&(this._tileZoom=o,this._updateLevels()),this._update()}return this},getEvents:function(){var o={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=d(this._onMoveEnd,this.options.updateInterval,this)),o.move=this._onMove),this._zoomAnimated&&(o.zoomanim=this._animateZoom),o},createTile:function(){return document.createElement("div")},getTileSize:function(){var o=this.options.tileSize;return o instanceof U?o:new U(o,o)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(o){for(var l=this.getPane().children,u=-o(-1/0,1/0),g=0,_=l.length,w;g<_;g++)w=l[g].style.zIndex,l[g]!==this._container&&w&&(u=o(u,+w));isFinite(u)&&(this.options.zIndex=u+o(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!J.ielt9){Se(this._container,this.options.opacity);var o=+new Date,l=!1,u=!1;for(var g in this._tiles){var _=this._tiles[g];if(!(!_.current||!_.loaded)){var w=Math.min(1,(o-_.loaded)/200);Se(_.el,w),w<1?l=!0:(_.active?u=!0:this._onOpaqueTile(_),_.active=!0)}}u&&!this._noPrune&&this._pruneTiles(),l&&(W(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this))}},_onOpaqueTile:p,_initContainer:function(){this._container||(this._container=Et("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var o=this._tileZoom,l=this.options.maxZoom;if(o!==void 0){for(var u in this._levels)u=Number(u),this._levels[u].el.children.length||u===o?(this._levels[u].el.style.zIndex=l-Math.abs(o-u),this._onUpdateLevel(u)):(At(this._levels[u].el),this._removeTilesAtZoom(u),this._onRemoveLevel(u),delete this._levels[u]);var g=this._levels[o],_=this._map;return g||(g=this._levels[o]={},g.el=Et("div","leaflet-tile-container leaflet-zoom-animated",this._container),g.el.style.zIndex=l,g.origin=_.project(_.unproject(_.getPixelOrigin()),o).round(),g.zoom=o,this._setZoomTransform(g,_.getCenter(),_.getZoom()),p(g.el.offsetWidth),this._onCreateLevel(g)),this._level=g,g}},_onUpdateLevel:p,_onRemoveLevel:p,_onCreateLevel:p,_pruneTiles:function(){if(this._map){var o,l,u=this._map.getZoom();if(u>this.options.maxZoom||u<this.options.minZoom){this._removeAllTiles();return}for(o in this._tiles)l=this._tiles[o],l.retain=l.current;for(o in this._tiles)if(l=this._tiles[o],l.current&&!l.active){var g=l.coords;this._retainParent(g.x,g.y,g.z,g.z-5)||this._retainChildren(g.x,g.y,g.z,g.z+2)}for(o in this._tiles)this._tiles[o].retain||this._removeTile(o)}},_removeTilesAtZoom:function(o){for(var l in this._tiles)this._tiles[l].coords.z===o&&this._removeTile(l)},_removeAllTiles:function(){for(var o in this._tiles)this._removeTile(o)},_invalidateAll:function(){for(var o in this._levels)At(this._levels[o].el),this._onRemoveLevel(Number(o)),delete this._levels[o];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(o,l,u,g){var _=Math.floor(o/2),w=Math.floor(l/2),P=u-1,A=new U(+_,+w);A.z=+P;var D=this._tileCoordsToKey(A),B=this._tiles[D];return B&&B.active?(B.retain=!0,!0):(B&&B.loaded&&(B.retain=!0),P>g?this._retainParent(_,w,P,g):!1)},_retainChildren:function(o,l,u,g){for(var _=2*o;_<2*o+2;_++)for(var w=2*l;w<2*l+2;w++){var P=new U(_,w);P.z=u+1;var A=this._tileCoordsToKey(P),D=this._tiles[A];if(D&&D.active){D.retain=!0;continue}else D&&D.loaded&&(D.retain=!0);u+1<g&&this._retainChildren(_,w,u+1,g)}},_resetView:function(o){var l=o&&(o.pinch||o.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),l,l)},_animateZoom:function(o){this._setView(o.center,o.zoom,!0,o.noUpdate)},_clampZoom:function(o){var l=this.options;return l.minNativeZoom!==void 0&&o<l.minNativeZoom?l.minNativeZoom:l.maxNativeZoom!==void 0&&l.maxNativeZoom<o?l.maxNativeZoom:o},_setView:function(o,l,u,g){var _=Math.round(l);this.options.maxZoom!==void 0&&_>this.options.maxZoom||this.options.minZoom!==void 0&&_<this.options.minZoom?_=void 0:_=this._clampZoom(_);var w=this.options.updateWhenZooming&&_!==this._tileZoom;(!g||w)&&(this._tileZoom=_,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),_!==void 0&&this._update(o),u||this._pruneTiles(),this._noPrune=!!u),this._setZoomTransforms(o,l)},_setZoomTransforms:function(o,l){for(var u in this._levels)this._setZoomTransform(this._levels[u],o,l)},_setZoomTransform:function(o,l,u){var g=this._map.getZoomScale(u,o.zoom),_=o.origin.multiplyBy(g).subtract(this._map._getNewPixelOrigin(l,u)).round();J.any3d?bn(o.el,_,g):Gt(o.el,_)},_resetGrid:function(){var o=this._map,l=o.options.crs,u=this._tileSize=this.getTileSize(),g=this._tileZoom,_=this._map.getPixelWorldBounds(this._tileZoom);_&&(this._globalTileRange=this._pxBoundsToTileRange(_)),this._wrapX=l.wrapLng&&!this.options.noWrap&&[Math.floor(o.project([0,l.wrapLng[0]],g).x/u.x),Math.ceil(o.project([0,l.wrapLng[1]],g).x/u.y)],this._wrapY=l.wrapLat&&!this.options.noWrap&&[Math.floor(o.project([l.wrapLat[0],0],g).y/u.x),Math.ceil(o.project([l.wrapLat[1],0],g).y/u.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(o){var l=this._map,u=l._animatingZoom?Math.max(l._animateToZoom,l.getZoom()):l.getZoom(),g=l.getZoomScale(u,this._tileZoom),_=l.project(o,this._tileZoom).floor(),w=l.getSize().divideBy(g*2);return new at(_.subtract(w),_.add(w))},_update:function(o){var l=this._map;if(l){var u=this._clampZoom(l.getZoom());if(o===void 0&&(o=l.getCenter()),this._tileZoom!==void 0){var g=this._getTiledPixelBounds(o),_=this._pxBoundsToTileRange(g),w=_.getCenter(),P=[],A=this.options.keepBuffer,D=new at(_.getBottomLeft().subtract([A,-A]),_.getTopRight().add([A,-A]));if(!(isFinite(_.min.x)&&isFinite(_.min.y)&&isFinite(_.max.x)&&isFinite(_.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var B in this._tiles){var q=this._tiles[B].coords;(q.z!==this._tileZoom||!D.contains(new U(q.x,q.y)))&&(this._tiles[B].current=!1)}if(Math.abs(u-this._tileZoom)>1){this._setView(o,u);return}for(var st=_.min.y;st<=_.max.y;st++)for(var _t=_.min.x;_t<=_.max.x;_t++){var he=new U(_t,st);if(he.z=this._tileZoom,!!this._isValidTile(he)){var Kt=this._tiles[this._tileCoordsToKey(he)];Kt?Kt.current=!0:P.push(he)}}if(P.sort(function(me,pr){return me.distanceTo(w)-pr.distanceTo(w)}),P.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var ke=document.createDocumentFragment();for(_t=0;_t<P.length;_t++)this._addTile(P[_t],ke);this._level.el.appendChild(ke)}}}},_isValidTile:function(o){var l=this._map.options.crs;if(!l.infinite){var u=this._globalTileRange;if(!l.wrapLng&&(o.x<u.min.x||o.x>u.max.x)||!l.wrapLat&&(o.y<u.min.y||o.y>u.max.y))return!1}if(!this.options.bounds)return!0;var g=this._tileCoordsToBounds(o);return et(this.options.bounds).overlaps(g)},_keyToBounds:function(o){return this._tileCoordsToBounds(this._keyToTileCoords(o))},_tileCoordsToNwSe:function(o){var l=this._map,u=this.getTileSize(),g=o.scaleBy(u),_=g.add(u),w=l.unproject(g,o.z),P=l.unproject(_,o.z);return[w,P]},_tileCoordsToBounds:function(o){var l=this._tileCoordsToNwSe(o),u=new wt(l[0],l[1]);return this.options.noWrap||(u=this._map.wrapLatLngBounds(u)),u},_tileCoordsToKey:function(o){return o.x+":"+o.y+":"+o.z},_keyToTileCoords:function(o){var l=o.split(":"),u=new U(+l[0],+l[1]);return u.z=+l[2],u},_removeTile:function(o){var l=this._tiles[o];l&&(At(l.el),delete this._tiles[o],this.fire("tileunload",{tile:l.el,coords:this._keyToTileCoords(o)}))},_initTile:function(o){ft(o,"leaflet-tile");var l=this.getTileSize();o.style.width=l.x+"px",o.style.height=l.y+"px",o.onselectstart=p,o.onmousemove=p,J.ielt9&&this.options.opacity<1&&Se(o,this.options.opacity)},_addTile:function(o,l){var u=this._getTilePos(o),g=this._tileCoordsToKey(o),_=this.createTile(this._wrapCoords(o),a(this._tileReady,this,o));this._initTile(_),this.createTile.length<2&&j(a(this._tileReady,this,o,null,_)),Gt(_,u),this._tiles[g]={el:_,coords:o,current:!0},l.appendChild(_),this.fire("tileloadstart",{tile:_,coords:o})},_tileReady:function(o,l,u){l&&this.fire("tileerror",{error:l,tile:u,coords:o});var g=this._tileCoordsToKey(o);u=this._tiles[g],u&&(u.loaded=+new Date,this._map._fadeAnimated?(Se(u.el,0),W(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this)):(u.active=!0,this._pruneTiles()),l||(ft(u.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:u.el,coords:o})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),J.ielt9||!this._map._fadeAnimated?j(this._pruneTiles,this):setTimeout(a(this._pruneTiles,this),250)))},_getTilePos:function(o){return o.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(o){var l=new U(this._wrapX?f(o.x,this._wrapX):o.x,this._wrapY?f(o.y,this._wrapY):o.y);return l.z=o.z,l},_pxBoundsToTileRange:function(o){var l=this.getTileSize();return new at(o.min.unscaleBy(l).floor(),o.max.unscaleBy(l).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var o in this._tiles)if(!this._tiles[o].loaded)return!1;return!0}});function OL(o){return new ds(o)}var gr=ds.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(o,l){this._url=o,l=C(this,l),l.detectRetina&&J.retina&&l.maxZoom>0?(l.tileSize=Math.floor(l.tileSize/2),l.zoomReverse?(l.zoomOffset--,l.minZoom=Math.min(l.maxZoom,l.minZoom+1)):(l.zoomOffset++,l.maxZoom=Math.max(l.minZoom,l.maxZoom-1)),l.minZoom=Math.max(0,l.minZoom)):l.zoomReverse?l.minZoom=Math.min(l.maxZoom,l.minZoom):l.maxZoom=Math.max(l.minZoom,l.maxZoom),typeof l.subdomains=="string"&&(l.subdomains=l.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(o,l){return this._url===o&&l===void 0&&(l=!0),this._url=o,l||this.redraw(),this},createTile:function(o,l){var u=document.createElement("img");return ut(u,"load",a(this._tileOnLoad,this,l,u)),ut(u,"error",a(this._tileOnError,this,l,u)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(u.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(u.referrerPolicy=this.options.referrerPolicy),u.alt="",u.src=this.getTileUrl(o),u},getTileUrl:function(o){var l={r:J.retina?"@2x":"",s:this._getSubdomain(o),x:o.x,y:o.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var u=this._globalTileRange.max.y-o.y;this.options.tms&&(l.y=u),l["-y"]=u}return y(this._url,i(l,this.options))},_tileOnLoad:function(o,l){J.ielt9?setTimeout(a(o,this,null,l),0):o(null,l)},_tileOnError:function(o,l,u){var g=this.options.errorTileUrl;g&&l.getAttribute("src")!==g&&(l.src=g),o(u,l)},_onTileRemove:function(o){o.tile.onload=null},_getZoomForUrl:function(){var o=this._tileZoom,l=this.options.maxZoom,u=this.options.zoomReverse,g=this.options.zoomOffset;return u&&(o=l-o),o+g},_getSubdomain:function(o){var l=Math.abs(o.x+o.y)%this.options.subdomains.length;return this.options.subdomains[l]},_abortLoading:function(){var o,l;for(o in this._tiles)if(this._tiles[o].coords.z!==this._tileZoom&&(l=this._tiles[o].el,l.onload=p,l.onerror=p,!l.complete)){l.src=T;var u=this._tiles[o].coords;At(l),delete this._tiles[o],this.fire("tileabort",{tile:l,coords:u})}},_removeTile:function(o){var l=this._tiles[o];if(l)return l.el.setAttribute("src",T),ds.prototype._removeTile.call(this,o)},_tileReady:function(o,l,u){if(!(!this._map||u&&u.getAttribute("src")===T))return ds.prototype._tileReady.call(this,o,l,u)}});function ng(o,l){return new gr(o,l)}var rg=gr.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(o,l){this._url=o;var u=i({},this.defaultWmsParams);for(var g in l)g in this.options||(u[g]=l[g]);l=C(this,l);var _=l.detectRetina&&J.retina?2:1,w=this.getTileSize();u.width=w.x*_,u.height=w.y*_,this.wmsParams=u},onAdd:function(o){this._crs=this.options.crs||o.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var l=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[l]=this._crs.code,gr.prototype.onAdd.call(this,o)},getTileUrl:function(o){var l=this._tileCoordsToNwSe(o),u=this._crs,g=F(u.project(l[0]),u.project(l[1])),_=g.min,w=g.max,P=(this._wmsVersion>=1.3&&this._crs===qf?[_.y,_.x,w.y,w.x]:[_.x,_.y,w.x,w.y]).join(","),A=gr.prototype.getTileUrl.call(this,o);return A+M(this.wmsParams,A,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+P},setParams:function(o,l){return i(this.wmsParams,o),l||this.redraw(),this}});function FL(o,l){return new rg(o,l)}gr.WMS=rg,ng.wms=FL;var Mi=Ue.extend({options:{padding:.1},initialize:function(o){C(this,o),c(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ft(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var o={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(o.zoomanim=this._onAnimZoom),o},_onAnimZoom:function(o){this._updateTransform(o.center,o.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(o,l){var u=this._map.getZoomScale(l,this._zoom),g=this._map.getSize().multiplyBy(.5+this.options.padding),_=this._map.project(this._center,l),w=g.multiplyBy(-u).add(_).subtract(this._map._getNewPixelOrigin(o,l));J.any3d?bn(this._container,w,u):Gt(this._container,w)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var o in this._layers)this._layers[o]._reset()},_onZoomEnd:function(){for(var o in this._layers)this._layers[o]._project()},_updatePaths:function(){for(var o in this._layers)this._layers[o]._update()},_update:function(){var o=this.options.padding,l=this._map.getSize(),u=this._map.containerPointToLayerPoint(l.multiplyBy(-o)).round();this._bounds=new at(u,u.add(l.multiplyBy(1+o*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sg=Mi.extend({options:{tolerance:0},getEvents:function(){var o=Mi.prototype.getEvents.call(this);return o.viewprereset=this._onViewPreReset,o},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Mi.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var o=this._container=document.createElement("canvas");ut(o,"mousemove",this._onMouseMove,this),ut(o,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ut(o,"mouseout",this._handleMouseOut,this),o._leaflet_disable_events=!0,this._ctx=o.getContext("2d")},_destroyContainer:function(){W(this._redrawRequest),delete this._ctx,At(this._container),Pt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var o;this._redrawBounds=null;for(var l in this._layers)o=this._layers[l],o._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mi.prototype._update.call(this);var o=this._bounds,l=this._container,u=o.getSize(),g=J.retina?2:1;Gt(l,o.min),l.width=g*u.x,l.height=g*u.y,l.style.width=u.x+"px",l.style.height=u.y+"px",J.retina&&this._ctx.scale(2,2),this._ctx.translate(-o.min.x,-o.min.y),this.fire("update")}},_reset:function(){Mi.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(o){this._updateDashArray(o),this._layers[c(o)]=o;var l=o._order={layer:o,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=l),this._drawLast=l,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(o){this._requestRedraw(o)},_removePath:function(o){var l=o._order,u=l.next,g=l.prev;u?u.prev=g:this._drawLast=g,g?g.next=u:this._drawFirst=u,delete o._order,delete this._layers[c(o)],this._requestRedraw(o)},_updatePath:function(o){this._extendRedrawBounds(o),o._project(),o._update(),this._requestRedraw(o)},_updateStyle:function(o){this._updateDashArray(o),this._requestRedraw(o)},_updateDashArray:function(o){if(typeof o.options.dashArray=="string"){var l=o.options.dashArray.split(/[, ]+/),u=[],g,_;for(_=0;_<l.length;_++){if(g=Number(l[_]),isNaN(g))return;u.push(g)}o.options._dashArray=u}else o.options._dashArray=o.options.dashArray},_requestRedraw:function(o){this._map&&(this._extendRedrawBounds(o),this._redrawRequest=this._redrawRequest||j(this._redraw,this))},_extendRedrawBounds:function(o){if(o._pxBounds){var l=(o.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new at,this._redrawBounds.extend(o._pxBounds.min.subtract([l,l])),this._redrawBounds.extend(o._pxBounds.max.add([l,l]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var o=this._redrawBounds;if(o){var l=o.getSize();this._ctx.clearRect(o.min.x,o.min.y,l.x,l.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var o,l=this._redrawBounds;if(this._ctx.save(),l){var u=l.getSize();this._ctx.beginPath(),this._ctx.rect(l.min.x,l.min.y,u.x,u.y),this._ctx.clip()}this._drawing=!0;for(var g=this._drawFirst;g;g=g.next)o=g.layer,(!l||o._pxBounds&&o._pxBounds.intersects(l))&&o._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(o,l){if(this._drawing){var u,g,_,w,P=o._parts,A=P.length,D=this._ctx;if(A){for(D.beginPath(),u=0;u<A;u++){for(g=0,_=P[u].length;g<_;g++)w=P[u][g],D[g?"lineTo":"moveTo"](w.x,w.y);l&&D.closePath()}this._fillStroke(D,o)}}},_updateCircle:function(o){if(!(!this._drawing||o._empty())){var l=o._point,u=this._ctx,g=Math.max(Math.round(o._radius),1),_=(Math.max(Math.round(o._radiusY),1)||g)/g;_!==1&&(u.save(),u.scale(1,_)),u.beginPath(),u.arc(l.x,l.y/_,g,0,Math.PI*2,!1),_!==1&&u.restore(),this._fillStroke(u,o)}},_fillStroke:function(o,l){var u=l.options;u.fill&&(o.globalAlpha=u.fillOpacity,o.fillStyle=u.fillColor||u.color,o.fill(u.fillRule||"evenodd")),u.stroke&&u.weight!==0&&(o.setLineDash&&o.setLineDash(l.options&&l.options._dashArray||[]),o.globalAlpha=u.opacity,o.lineWidth=u.weight,o.strokeStyle=u.color,o.lineCap=u.lineCap,o.lineJoin=u.lineJoin,o.stroke())},_onClick:function(o){for(var l=this._map.mouseEventToLayerPoint(o),u,g,_=this._drawFirst;_;_=_.next)u=_.layer,u.options.interactive&&u._containsPoint(l)&&(!(o.type==="click"||o.type==="preclick")||!this._map._draggableMoved(u))&&(g=u);this._fireEvent(g?[g]:!1,o)},_onMouseMove:function(o){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var l=this._map.mouseEventToLayerPoint(o);this._handleMouseHover(o,l)}},_handleMouseOut:function(o){var l=this._hoveredLayer;l&&(Ft(this._container,"leaflet-interactive"),this._fireEvent([l],o,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(o,l){if(!this._mouseHoverThrottled){for(var u,g,_=this._drawFirst;_;_=_.next)u=_.layer,u.options.interactive&&u._containsPoint(l)&&(g=u);g!==this._hoveredLayer&&(this._handleMouseOut(o),g&&(ft(this._container,"leaflet-interactive"),this._fireEvent([g],o,"mouseover"),this._hoveredLayer=g)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,o),this._mouseHoverThrottled=!0,setTimeout(a(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(o,l,u){this._map._fireDOMEvent(l,u||l.type,o)},_bringToFront:function(o){var l=o._order;if(l){var u=l.next,g=l.prev;if(u)u.prev=g;else return;g?g.next=u:u&&(this._drawFirst=u),l.prev=this._drawLast,this._drawLast.next=l,l.next=null,this._drawLast=l,this._requestRedraw(o)}},_bringToBack:function(o){var l=o._order;if(l){var u=l.next,g=l.prev;if(g)g.next=u;else return;u?u.prev=g:g&&(this._drawLast=g),l.prev=null,l.next=this._drawFirst,this._drawFirst.prev=l,this._drawFirst=l,this._requestRedraw(o)}}});function og(o){return J.canvas?new sg(o):null}var fs=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(o){return document.createElement("<lvml:"+o+' class="lvml">')}}catch{}return function(o){return document.createElement("<"+o+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),zL={_initContainer:function(){this._container=Et("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Mi.prototype._update.call(this),this.fire("update"))},_initPath:function(o){var l=o._container=fs("shape");ft(l,"leaflet-vml-shape "+(this.options.className||"")),l.coordsize="1 1",o._path=fs("path"),l.appendChild(o._path),this._updateStyle(o),this._layers[c(o)]=o},_addPath:function(o){var l=o._container;this._container.appendChild(l),o.options.interactive&&o.addInteractiveTarget(l)},_removePath:function(o){var l=o._container;At(l),o.removeInteractiveTarget(l),delete this._layers[c(o)]},_updateStyle:function(o){var l=o._stroke,u=o._fill,g=o.options,_=o._container;_.stroked=!!g.stroke,_.filled=!!g.fill,g.stroke?(l||(l=o._stroke=fs("stroke")),_.appendChild(l),l.weight=g.weight+"px",l.color=g.color,l.opacity=g.opacity,g.dashArray?l.dashStyle=x(g.dashArray)?g.dashArray.join(" "):g.dashArray.replace(/( *, *)/g," "):l.dashStyle="",l.endcap=g.lineCap.replace("butt","flat"),l.joinstyle=g.lineJoin):l&&(_.removeChild(l),o._stroke=null),g.fill?(u||(u=o._fill=fs("fill")),_.appendChild(u),u.color=g.fillColor||g.color,u.opacity=g.fillOpacity):u&&(_.removeChild(u),o._fill=null)},_updateCircle:function(o){var l=o._point.round(),u=Math.round(o._radius),g=Math.round(o._radiusY||u);this._setPath(o,o._empty()?"M0 0":"AL "+l.x+","+l.y+" "+u+","+g+" 0,"+65535*360)},_setPath:function(o,l){o._path.v=l},_bringToFront:function(o){lr(o._container)},_bringToBack:function(o){hr(o._container)}},ha=J.vml?fs:Ki,gs=Mi.extend({_initContainer:function(){this._container=ha("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=ha("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){At(this._container),Pt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Mi.prototype._update.call(this);var o=this._bounds,l=o.getSize(),u=this._container;(!this._svgSize||!this._svgSize.equals(l))&&(this._svgSize=l,u.setAttribute("width",l.x),u.setAttribute("height",l.y)),Gt(u,o.min),u.setAttribute("viewBox",[o.min.x,o.min.y,l.x,l.y].join(" ")),this.fire("update")}},_initPath:function(o){var l=o._path=ha("path");o.options.className&&ft(l,o.options.className),o.options.interactive&&ft(l,"leaflet-interactive"),this._updateStyle(o),this._layers[c(o)]=o},_addPath:function(o){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(o._path),o.addInteractiveTarget(o._path)},_removePath:function(o){At(o._path),o.removeInteractiveTarget(o._path),delete this._layers[c(o)]},_updatePath:function(o){o._project(),o._update()},_updateStyle:function(o){var l=o._path,u=o.options;l&&(u.stroke?(l.setAttribute("stroke",u.color),l.setAttribute("stroke-opacity",u.opacity),l.setAttribute("stroke-width",u.weight),l.setAttribute("stroke-linecap",u.lineCap),l.setAttribute("stroke-linejoin",u.lineJoin),u.dashArray?l.setAttribute("stroke-dasharray",u.dashArray):l.removeAttribute("stroke-dasharray"),u.dashOffset?l.setAttribute("stroke-dashoffset",u.dashOffset):l.removeAttribute("stroke-dashoffset")):l.setAttribute("stroke","none"),u.fill?(l.setAttribute("fill",u.fillColor||u.color),l.setAttribute("fill-opacity",u.fillOpacity),l.setAttribute("fill-rule",u.fillRule||"evenodd")):l.setAttribute("fill","none"))},_updatePoly:function(o,l){this._setPath(o,Fe(o._parts,l))},_updateCircle:function(o){var l=o._point,u=Math.max(Math.round(o._radius),1),g=Math.max(Math.round(o._radiusY),1)||u,_="a"+u+","+g+" 0 1,0 ",w=o._empty()?"M0 0":"M"+(l.x-u)+","+l.y+_+u*2+",0 "+_+-u*2+",0 ";this._setPath(o,w)},_setPath:function(o,l){o._path.setAttribute("d",l)},_bringToFront:function(o){lr(o._path)},_bringToBack:function(o){hr(o._path)}});J.vml&&gs.include(zL);function ag(o){return J.svg||J.vml?new gs(o):null}yt.include({getRenderer:function(o){var l=o.options.renderer||this._getPaneRenderer(o.options.pane)||this.options.renderer||this._renderer;return l||(l=this._renderer=this._createRenderer()),this.hasLayer(l)||this.addLayer(l),l},_getPaneRenderer:function(o){if(o==="overlayPane"||o===void 0)return!1;var l=this._paneRenderers[o];return l===void 0&&(l=this._createRenderer({pane:o}),this._paneRenderers[o]=l),l},_createRenderer:function(o){return this.options.preferCanvas&&og(o)||ag(o)}});var lg=dr.extend({initialize:function(o,l){dr.prototype.initialize.call(this,this._boundsToLatLngs(o),l)},setBounds:function(o){return this.setLatLngs(this._boundsToLatLngs(o))},_boundsToLatLngs:function(o){return o=et(o),[o.getSouthWest(),o.getNorthWest(),o.getNorthEast(),o.getSouthEast()]}});function NL(o,l){return new lg(o,l)}gs.create=ha,gs.pointsToPath=Fe,Ti.geometryToLayer=ia,Ti.coordsToLatLng=Rh,Ti.coordsToLatLngs=na,Ti.latLngToCoords=Ah,Ti.latLngsToCoords=ra,Ti.getFeature=fr,Ti.asFeature=sa,yt.mergeOptions({boxZoom:!0});var hg=ni.extend({initialize:function(o){this._map=o,this._container=o._container,this._pane=o._panes.overlayPane,this._resetStateTimeout=0,o.on("unload",this._destroy,this)},addHooks:function(){ut(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Pt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){At(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(o){if(!o.shiftKey||o.which!==1&&o.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ss(),gh(),this._startPoint=this._map.mouseEventToContainerPoint(o),ut(document,{contextmenu:Mn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(o){this._moved||(this._moved=!0,this._box=Et("div","leaflet-zoom-box",this._container),ft(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(o);var l=new at(this._point,this._startPoint),u=l.getSize();Gt(this._box,l.min),this._box.style.width=u.x+"px",this._box.style.height=u.y+"px"},_finish:function(){this._moved&&(At(this._box),Ft(this._container,"leaflet-crosshair")),os(),ph(),Pt(document,{contextmenu:Mn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(o){if(!(o.which!==1&&o.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(a(this._resetState,this),0);var l=new wt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(l).fire("boxzoomend",{boxZoomBounds:l})}},_onKeyDown:function(o){o.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});yt.addInitHook("addHandler","boxZoom",hg),yt.mergeOptions({doubleClickZoom:!0});var cg=ni.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(o){var l=this._map,u=l.getZoom(),g=l.options.zoomDelta,_=o.originalEvent.shiftKey?u-g:u+g;l.options.doubleClickZoom==="center"?l.setZoom(_):l.setZoomAround(o.containerPoint,_)}});yt.addInitHook("addHandler","doubleClickZoom",cg),yt.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ug=ni.extend({addHooks:function(){if(!this._draggable){var o=this._map;this._draggable=new nn(o._mapPane,o._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),o.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),o.on("zoomend",this._onZoomEnd,this),o.whenReady(this._onZoomEnd,this))}ft(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ft(this._map._container,"leaflet-grab"),Ft(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var o=this._map;if(o._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var l=et(this._map.options.maxBounds);this._offsetLimit=F(this._map.latLngToContainerPoint(l.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(l.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;o.fire("movestart").fire("dragstart"),o.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(o){if(this._map.options.inertia){var l=this._lastTime=+new Date,u=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(u),this._times.push(l),this._prunePositions(l)}this._map.fire("move",o).fire("drag",o)},_prunePositions:function(o){for(;this._positions.length>1&&o-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var o=this._map.getSize().divideBy(2),l=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=l.subtract(o).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(o,l){return o-(o-l)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var o=this._draggable._newPos.subtract(this._draggable._startPos),l=this._offsetLimit;o.x<l.min.x&&(o.x=this._viscousLimit(o.x,l.min.x)),o.y<l.min.y&&(o.y=this._viscousLimit(o.y,l.min.y)),o.x>l.max.x&&(o.x=this._viscousLimit(o.x,l.max.x)),o.y>l.max.y&&(o.y=this._viscousLimit(o.y,l.max.y)),this._draggable._newPos=this._draggable._startPos.add(o)}},_onPreDragWrap:function(){var o=this._worldWidth,l=Math.round(o/2),u=this._initialWorldOffset,g=this._draggable._newPos.x,_=(g-l+u)%o+l-u,w=(g+l+u)%o-l-u,P=Math.abs(_+u)<Math.abs(w+u)?_:w;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=P},_onDragEnd:function(o){var l=this._map,u=l.options,g=!u.inertia||o.noInertia||this._times.length<2;if(l.fire("dragend",o),g)l.fire("moveend");else{this._prunePositions(+new Date);var _=this._lastPos.subtract(this._positions[0]),w=(this._lastTime-this._times[0])/1e3,P=u.easeLinearity,A=_.multiplyBy(P/w),D=A.distanceTo([0,0]),B=Math.min(u.inertiaMaxSpeed,D),q=A.multiplyBy(B/D),st=B/(u.inertiaDeceleration*P),_t=q.multiplyBy(-st/2).round();!_t.x&&!_t.y?l.fire("moveend"):(_t=l._limitOffset(_t,l.options.maxBounds),j(function(){l.panBy(_t,{duration:st,easeLinearity:P,noMoveStart:!0,animate:!0})}))}}});yt.addInitHook("addHandler","dragging",ug),yt.mergeOptions({keyboard:!0,keyboardPanDelta:80});var dg=ni.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(o){this._map=o,this._setPanDelta(o.options.keyboardPanDelta),this._setZoomDelta(o.options.zoomDelta)},addHooks:function(){var o=this._map._container;o.tabIndex<=0&&(o.tabIndex="0"),ut(o,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Pt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var o=document.body,l=document.documentElement,u=o.scrollTop||l.scrollTop,g=o.scrollLeft||l.scrollLeft;this._map._container.focus(),window.scrollTo(g,u)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(o){var l=this._panKeys={},u=this.keyCodes,g,_;for(g=0,_=u.left.length;g<_;g++)l[u.left[g]]=[-1*o,0];for(g=0,_=u.right.length;g<_;g++)l[u.right[g]]=[o,0];for(g=0,_=u.down.length;g<_;g++)l[u.down[g]]=[0,o];for(g=0,_=u.up.length;g<_;g++)l[u.up[g]]=[0,-1*o]},_setZoomDelta:function(o){var l=this._zoomKeys={},u=this.keyCodes,g,_;for(g=0,_=u.zoomIn.length;g<_;g++)l[u.zoomIn[g]]=o;for(g=0,_=u.zoomOut.length;g<_;g++)l[u.zoomOut[g]]=-o},_addHooks:function(){ut(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Pt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(o){if(!(o.altKey||o.ctrlKey||o.metaKey)){var l=o.keyCode,u=this._map,g;if(l in this._panKeys){if(!u._panAnim||!u._panAnim._inProgress)if(g=this._panKeys[l],o.shiftKey&&(g=H(g).multiplyBy(3)),u.options.maxBounds&&(g=u._limitOffset(H(g),u.options.maxBounds)),u.options.worldCopyJump){var _=u.wrapLatLng(u.unproject(u.project(u.getCenter()).add(g)));u.panTo(_)}else u.panBy(g)}else if(l in this._zoomKeys)u.setZoom(u.getZoom()+(o.shiftKey?3:1)*this._zoomKeys[l]);else if(l===27&&u._popup&&u._popup.options.closeOnEscapeKey)u.closePopup();else return;Mn(o)}}});yt.addInitHook("addHandler","keyboard",dg),yt.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var fg=ni.extend({addHooks:function(){ut(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Pt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(o){var l=zf(o),u=this._map.options.wheelDebounceTime;this._delta+=l,this._lastMousePos=this._map.mouseEventToContainerPoint(o),this._startTime||(this._startTime=+new Date);var g=Math.max(u-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(a(this._performZoom,this),g),Mn(o)},_performZoom:function(){var o=this._map,l=o.getZoom(),u=this._map.options.zoomSnap||0;o._stop();var g=this._delta/(this._map.options.wheelPxPerZoomLevel*4),_=4*Math.log(2/(1+Math.exp(-Math.abs(g))))/Math.LN2,w=u?Math.ceil(_/u)*u:_,P=o._limitZoom(l+(this._delta>0?w:-w))-l;this._delta=0,this._startTime=null,P&&(o.options.scrollWheelZoom==="center"?o.setZoom(l+P):o.setZoomAround(this._lastMousePos,l+P))}});yt.addInitHook("addHandler","scrollWheelZoom",fg);var BL=600;yt.mergeOptions({tapHold:J.touchNative&&J.safari&&J.mobile,tapTolerance:15});var gg=ni.extend({addHooks:function(){ut(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Pt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(o){if(clearTimeout(this._holdTimeout),o.touches.length===1){var l=o.touches[0];this._startPos=this._newPos=new U(l.clientX,l.clientY),this._holdTimeout=setTimeout(a(function(){this._cancel(),this._isTapValid()&&(ut(document,"touchend",Qt),ut(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",l))},this),BL),ut(document,"touchend touchcancel contextmenu",this._cancel,this),ut(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function o(){Pt(document,"touchend",Qt),Pt(document,"touchend touchcancel",o)},_cancel:function(){clearTimeout(this._holdTimeout),Pt(document,"touchend touchcancel contextmenu",this._cancel,this),Pt(document,"touchmove",this._onMove,this)},_onMove:function(o){var l=o.touches[0];this._newPos=new U(l.clientX,l.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(o,l){var u=new MouseEvent(o,{bubbles:!0,cancelable:!0,view:window,screenX:l.screenX,screenY:l.screenY,clientX:l.clientX,clientY:l.clientY});u._simulated=!0,l.target.dispatchEvent(u)}});yt.addInitHook("addHandler","tapHold",gg),yt.mergeOptions({touchZoom:J.touch,bounceAtZoomLimits:!0});var pg=ni.extend({addHooks:function(){ft(this._map._container,"leaflet-touch-zoom"),ut(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ft(this._map._container,"leaflet-touch-zoom"),Pt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(o){var l=this._map;if(!(!o.touches||o.touches.length!==2||l._animatingZoom||this._zooming)){var u=l.mouseEventToContainerPoint(o.touches[0]),g=l.mouseEventToContainerPoint(o.touches[1]);this._centerPoint=l.getSize()._divideBy(2),this._startLatLng=l.containerPointToLatLng(this._centerPoint),l.options.touchZoom!=="center"&&(this._pinchStartLatLng=l.containerPointToLatLng(u.add(g)._divideBy(2))),this._startDist=u.distanceTo(g),this._startZoom=l.getZoom(),this._moved=!1,this._zooming=!0,l._stop(),ut(document,"touchmove",this._onTouchMove,this),ut(document,"touchend touchcancel",this._onTouchEnd,this),Qt(o)}},_onTouchMove:function(o){if(!(!o.touches||o.touches.length!==2||!this._zooming)){var l=this._map,u=l.mouseEventToContainerPoint(o.touches[0]),g=l.mouseEventToContainerPoint(o.touches[1]),_=u.distanceTo(g)/this._startDist;if(this._zoom=l.getScaleZoom(_,this._startZoom),!l.options.bounceAtZoomLimits&&(this._zoom<l.getMinZoom()&&_<1||this._zoom>l.getMaxZoom()&&_>1)&&(this._zoom=l._limitZoom(this._zoom)),l.options.touchZoom==="center"){if(this._center=this._startLatLng,_===1)return}else{var w=u._add(g)._divideBy(2)._subtract(this._centerPoint);if(_===1&&w.x===0&&w.y===0)return;this._center=l.unproject(l.project(this._pinchStartLatLng,this._zoom).subtract(w),this._zoom)}this._moved||(l._moveStart(!0,!1),this._moved=!0),W(this._animRequest);var P=a(l._move,l,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=j(P,this,!0),Qt(o)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,W(this._animRequest),Pt(document,"touchmove",this._onTouchMove,this),Pt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});yt.addInitHook("addHandler","touchZoom",pg),yt.BoxZoom=hg,yt.DoubleClickZoom=cg,yt.Drag=ug,yt.Keyboard=dg,yt.ScrollWheelZoom=fg,yt.TapHold=gg,yt.TouchZoom=pg,e.Bounds=at,e.Browser=J,e.CRS=kt,e.Canvas=sg,e.Circle=kh,e.CircleMarker=ea,e.Class=$,e.Control=Ge,e.DivIcon=ig,e.DivOverlay=ri,e.DomEvent=nL,e.DomUtil=eL,e.Draggable=nn,e.Evented=Z,e.FeatureGroup=bi,e.GeoJSON=Ti,e.GridLayer=ds,e.Handler=ni,e.Icon=ur,e.ImageOverlay=oa,e.LatLng=it,e.LatLngBounds=wt,e.Layer=Ue,e.LayerGroup=cr,e.LineUtil=_L,e.Map=yt,e.Marker=ta,e.Mixin=cL,e.Path=rn,e.Point=U,e.PolyUtil=uL,e.Polygon=dr,e.Polyline=Ci,e.Popup=aa,e.PosAnimation=Nf,e.Projection=mL,e.Rectangle=lg,e.Renderer=Mi,e.SVG=gs,e.SVGOverlay=eg,e.TileLayer=gr,e.Tooltip=la,e.Transformation=Xi,e.Util=Y,e.VideoOverlay=tg,e.bind=a,e.bounds=F,e.canvas=og,e.circle=CL,e.circleMarker=bL,e.control=hs,e.divIcon=DL,e.extend=i,e.featureGroup=wL,e.geoJSON=$f,e.geoJson=SL,e.gridLayer=OL,e.icon=EL,e.imageOverlay=PL,e.latLng=ht,e.latLngBounds=et,e.layerGroup=xL,e.map=rL,e.marker=LL,e.point=H,e.polygon=ML,e.polyline=TL,e.popup=AL,e.rectangle=NL,e.setOptions=C,e.stamp=c,e.svg=ag,e.svgOverlay=RL,e.tileLayer=ng,e.tooltip=IL,e.transformation=Me,e.version=n,e.videoOverlay=kL;var GL=window.L;e.noConflict=function(){return window.L=GL,this},window.L=e})}(ys,ys.exports)),ys.exports}var tt=Zh();const JL="";function Wh(r,t,e){e===void 0&&(e={});var n={type:"Feature"};return(e.id===0||e.id)&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.properties=t||{},n.geometry=r,n}function Pg(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("coordinates is required");if(!Array.isArray(r))throw new Error("coordinates must be an Array");if(r.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!Hh(r[0])||!Hh(r[1]))throw new Error("coordinates must contain numbers");var n={type:"Point",coordinates:r};return Wh(n,t,e)}function kg(r,t,e){e===void 0&&(e={});for(var n=0,i=r;n<i.length;n++){var s=i[n];if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var a=0;a<s[s.length-1].length;a++)if(s[s.length-1][a]!==s[0][a])throw new Error("First and last Position are not equivalent.")}var h={type:"Polygon",coordinates:r};return Wh(h,t,e)}function Hh(r){return!isNaN(r)&&r!==null&&!Array.isArray(r)}function Rg(r){if(!r)throw new Error("coord is required");if(!Array.isArray(r)){if(r.type==="Feature"&&r.geometry!==null&&r.geometry.type==="Point")return r.geometry.coordinates;if(r.type==="Point")return r.coordinates}if(Array.isArray(r)&&r.length>=2&&!Array.isArray(r[0])&&!Array.isArray(r[1]))return r;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Ag(r){return r.type==="Feature"?r.geometry:r}var Vh={exports:{}};(function(r,t){(function(e,n){r.exports=n()})(je,function(){function e(y,x,b,T,k){(function R(I,z,G,j,W){for(;j>G;){if(j-G>600){var Y=j-G+1,$=z-G+1,K=Math.log(Y),V=.5*Math.exp(2*K/3),Z=.5*Math.sqrt(K*V*(Y-V)/Y)*($-Y/2<0?-1:1),U=Math.max(G,Math.floor(z-$*V/Y+Z)),xt=Math.min(j,Math.floor(z+(Y-$)*V/Y+Z));R(I,z,U,xt,W)}var H=I[z],at=G,F=j;for(n(I,G,z),W(I[j],H)>0&&n(I,G,j);at<F;){for(n(I,at,F),at++,F--;W(I[at],H)<0;)at++;for(;W(I[F],H)>0;)F--}W(I[G],H)===0?n(I,G,F):n(I,++F,j),F<=z&&(G=F+1),z<=F&&(j=F-1)}})(y,x,b||0,T||y.length-1,k||i)}function n(y,x,b){var T=y[x];y[x]=y[b],y[b]=T}function i(y,x){return y<x?-1:y>x?1:0}var s=function(y){y===void 0&&(y=9),this._maxEntries=Math.max(4,y),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function a(y,x,b){if(!b)return x.indexOf(y);for(var T=0;T<x.length;T++)if(b(y,x[T]))return T;return-1}function h(y,x){c(y,0,y.children.length,x,y)}function c(y,x,b,T,k){k||(k=M(null)),k.minX=1/0,k.minY=1/0,k.maxX=-1/0,k.maxY=-1/0;for(var R=x;R<b;R++){var I=y.children[R];d(k,y.leaf?T(I):I)}return k}function d(y,x){return y.minX=Math.min(y.minX,x.minX),y.minY=Math.min(y.minY,x.minY),y.maxX=Math.max(y.maxX,x.maxX),y.maxY=Math.max(y.maxY,x.maxY),y}function f(y,x){return y.minX-x.minX}function p(y,x){return y.minY-x.minY}function m(y){return(y.maxX-y.minX)*(y.maxY-y.minY)}function v(y){return y.maxX-y.minX+(y.maxY-y.minY)}function E(y,x){return y.minX<=x.minX&&y.minY<=x.minY&&x.maxX<=y.maxX&&x.maxY<=y.maxY}function C(y,x){return x.minX<=y.maxX&&x.minY<=y.maxY&&x.maxX>=y.minX&&x.maxY>=y.minY}function M(y){return{children:y,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function S(y,x,b,T,k){for(var R=[x,b];R.length;)if(!((b=R.pop())-(x=R.pop())<=T)){var I=x+Math.ceil((b-x)/T/2)*T;e(y,I,x,b,k),R.push(x,I,I,b)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(y){var x=this.data,b=[];if(!C(y,x))return b;for(var T=this.toBBox,k=[];x;){for(var R=0;R<x.children.length;R++){var I=x.children[R],z=x.leaf?T(I):I;C(y,z)&&(x.leaf?b.push(I):E(y,z)?this._all(I,b):k.push(I))}x=k.pop()}return b},s.prototype.collides=function(y){var x=this.data;if(!C(y,x))return!1;for(var b=[];x;){for(var T=0;T<x.children.length;T++){var k=x.children[T],R=x.leaf?this.toBBox(k):k;if(C(y,R)){if(x.leaf||E(y,R))return!0;b.push(k)}}x=b.pop()}return!1},s.prototype.load=function(y){if(!y||!y.length)return this;if(y.length<this._minEntries){for(var x=0;x<y.length;x++)this.insert(y[x]);return this}var b=this._build(y.slice(),0,y.length-1,0);if(this.data.children.length)if(this.data.height===b.height)this._splitRoot(this.data,b);else{if(this.data.height<b.height){var T=this.data;this.data=b,b=T}this._insert(b,this.data.height-b.height-1,!0)}else this.data=b;return this},s.prototype.insert=function(y){return y&&this._insert(y,this.data.height-1),this},s.prototype.clear=function(){return this.data=M([]),this},s.prototype.remove=function(y,x){if(!y)return this;for(var b,T,k,R=this.data,I=this.toBBox(y),z=[],G=[];R||z.length;){if(R||(R=z.pop(),T=z[z.length-1],b=G.pop(),k=!0),R.leaf){var j=a(y,R.children,x);if(j!==-1)return R.children.splice(j,1),z.push(R),this._condense(z),this}k||R.leaf||!E(R,I)?T?(b++,R=T.children[b],k=!1):R=null:(z.push(R),G.push(b),b=0,T=R,R=R.children[0])}return this},s.prototype.toBBox=function(y){return y},s.prototype.compareMinX=function(y,x){return y.minX-x.minX},s.prototype.compareMinY=function(y,x){return y.minY-x.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(y){return this.data=y,this},s.prototype._all=function(y,x){for(var b=[];y;)y.leaf?x.push.apply(x,y.children):b.push.apply(b,y.children),y=b.pop();return x},s.prototype._build=function(y,x,b,T){var k,R=b-x+1,I=this._maxEntries;if(R<=I)return h(k=M(y.slice(x,b+1)),this.toBBox),k;T||(T=Math.ceil(Math.log(R)/Math.log(I)),I=Math.ceil(R/Math.pow(I,T-1))),(k=M([])).leaf=!1,k.height=T;var z=Math.ceil(R/I),G=z*Math.ceil(Math.sqrt(I));S(y,x,b,G,this.compareMinX);for(var j=x;j<=b;j+=G){var W=Math.min(j+G-1,b);S(y,j,W,z,this.compareMinY);for(var Y=j;Y<=W;Y+=z){var $=Math.min(Y+z-1,W);k.children.push(this._build(y,Y,$,T-1))}}return h(k,this.toBBox),k},s.prototype._chooseSubtree=function(y,x,b,T){for(;T.push(x),!x.leaf&&T.length-1!==b;){for(var k=1/0,R=1/0,I=void 0,z=0;z<x.children.length;z++){var G=x.children[z],j=m(G),W=(Y=y,$=G,(Math.max($.maxX,Y.maxX)-Math.min($.minX,Y.minX))*(Math.max($.maxY,Y.maxY)-Math.min($.minY,Y.minY))-j);W<R?(R=W,k=j<k?j:k,I=G):W===R&&j<k&&(k=j,I=G)}x=I||x.children[0]}var Y,$;return x},s.prototype._insert=function(y,x,b){var T=b?y:this.toBBox(y),k=[],R=this._chooseSubtree(T,this.data,x,k);for(R.children.push(y),d(R,T);x>=0&&k[x].children.length>this._maxEntries;)this._split(k,x),x--;this._adjustParentBBoxes(T,k,x)},s.prototype._split=function(y,x){var b=y[x],T=b.children.length,k=this._minEntries;this._chooseSplitAxis(b,k,T);var R=this._chooseSplitIndex(b,k,T),I=M(b.children.splice(R,b.children.length-R));I.height=b.height,I.leaf=b.leaf,h(b,this.toBBox),h(I,this.toBBox),x?y[x-1].children.push(I):this._splitRoot(b,I)},s.prototype._splitRoot=function(y,x){this.data=M([y,x]),this.data.height=y.height+1,this.data.leaf=!1,h(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(y,x,b){for(var T,k,R,I,z,G,j,W=1/0,Y=1/0,$=x;$<=b-x;$++){var K=c(y,0,$,this.toBBox),V=c(y,$,b,this.toBBox),Z=(k=K,R=V,I=void 0,z=void 0,G=void 0,j=void 0,I=Math.max(k.minX,R.minX),z=Math.max(k.minY,R.minY),G=Math.min(k.maxX,R.maxX),j=Math.min(k.maxY,R.maxY),Math.max(0,G-I)*Math.max(0,j-z)),U=m(K)+m(V);Z<W?(W=Z,T=$,Y=U<Y?U:Y):Z===W&&U<Y&&(Y=U,T=$)}return T||b-x},s.prototype._chooseSplitAxis=function(y,x,b){var T=y.leaf?this.compareMinX:f,k=y.leaf?this.compareMinY:p;this._allDistMargin(y,x,b,T)<this._allDistMargin(y,x,b,k)&&y.children.sort(T)},s.prototype._allDistMargin=function(y,x,b,T){y.children.sort(T);for(var k=this.toBBox,R=c(y,0,x,k),I=c(y,b-x,b,k),z=v(R)+v(I),G=x;G<b-x;G++){var j=y.children[G];d(R,y.leaf?k(j):j),z+=v(R)}for(var W=b-x-1;W>=x;W--){var Y=y.children[W];d(I,y.leaf?k(Y):Y),z+=v(I)}return z},s.prototype._adjustParentBBoxes=function(y,x,b){for(var T=b;T>=0;T--)d(x[T],y)},s.prototype._condense=function(y){for(var x=y.length-1,b=void 0;x>=0;x--)y[x].children.length===0?x>0?(b=y[x-1].children).splice(b.indexOf(y[x]),1):this.clear():h(y[x],this.toBBox)},s})})(Vh);var Ig=Vh.exports;const Xh=ua(Ig);function Dg(r,t,e){if(e===void 0&&(e={}),!r)throw new Error("point is required");if(!t)throw new Error("polygon is required");var n=Rg(r),i=Ag(t),s=i.type,a=t.bbox,h=i.coordinates;if(a&&Og(n,a)===!1)return!1;s==="Polygon"&&(h=[h]);for(var c=!1,d=0;d<h.length&&!c;d++)if(Yh(n,h[d][0],e.ignoreBoundary)){for(var f=!1,p=1;p<h[d].length&&!f;)Yh(n,h[d][p],!e.ignoreBoundary)&&(f=!0),p++;f||(c=!0)}return c}function Yh(r,t,e){var n=!1;t[0][0]===t[t.length-1][0]&&t[0][1]===t[t.length-1][1]&&(t=t.slice(0,t.length-1));for(var i=0,s=t.length-1;i<t.length;s=i++){var a=t[i][0],h=t[i][1],c=t[s][0],d=t[s][1],f=r[1]*(a-c)+h*(c-r[0])+d*(r[0]-a)===0&&(a-r[0])*(c-r[0])<=0&&(h-r[1])*(d-r[1])<=0;if(f)return!e;var p=h>r[1]!=d>r[1]&&r[0]<(c-a)*(r[1]-h)/(d-h)+a;p&&(n=!n)}return n}function Og(r,t){return t[0]<=r[0]&&t[1]<=r[1]&&t[2]>=r[0]&&t[3]>=r[1]}var Kh={exports:{}};Kh.exports=vs,Kh.exports.default=vs;function vs(r,t,e){e=e||2;var n=t&&t.length,i=n?t[0]*e:r.length,s=qh(r,0,i,e,!0),a=[];if(!s||s.next===s.prev)return a;var h,c,d,f,p,m,v;if(n&&(s=Gg(r,t,s,e)),r.length>80*e){h=d=r[0],c=f=r[1];for(var E=e;E<i;E+=e)p=r[E],m=r[E+1],p<h&&(h=p),m<c&&(c=m),p>d&&(d=p),m>f&&(f=m);v=Math.max(d-h,f-c),v=v!==0?32767/v:0}return _r(s,a,e,h,c,v,0),a}function qh(r,t,e,n,i){var s,a;if(i===_a(r,t,e,n)>0)for(s=t;s<e;s+=n)a=$h(s,r[s],r[s+1],a);else for(s=e-n;s>=t;s-=n)a=$h(s,r[s],r[s+1],a);return a&&xs(a,a.next)&&(yr(a),a=a.next),a}function sn(r,t){if(!r)return r;t||(t=r);var e=r,n;do if(n=!1,!e.steiner&&(xs(e,e.next)||Rt(e.prev,e,e.next)===0)){if(yr(e),e=t=e.prev,e===e.next)break;n=!0}else e=e.next;while(n||e!==t);return t}function _r(r,t,e,n,i,s,a){if(r){!a&&s&&Hg(r,n,i,s);for(var h=r,c,d;r.prev!==r.next;){if(c=r.prev,d=r.next,s?zg(r,n,i,s):Fg(r)){t.push(c.i/e|0),t.push(r.i/e|0),t.push(d.i/e|0),yr(r),r=d.next,h=d.next;continue}if(r=d,r===h){a?a===1?(r=Ng(sn(r),t,e),_r(r,t,e,n,i,s,2)):a===2&&Bg(r,t,e,n,i,s):_r(sn(r),t,e,n,i,s,1);break}}}}function Fg(r){var t=r.prev,e=r,n=r.next;if(Rt(t,e,n)>=0)return!1;for(var i=t.x,s=e.x,a=n.x,h=t.y,c=e.y,d=n.y,f=i<s?i<a?i:a:s<a?s:a,p=h<c?h<d?h:d:c<d?c:d,m=i>s?i>a?i:a:s>a?s:a,v=h>c?h>d?h:d:c>d?c:d,E=n.next;E!==t;){if(E.x>=f&&E.x<=m&&E.y>=p&&E.y<=v&&Pn(i,h,s,c,a,d,E.x,E.y)&&Rt(E.prev,E,E.next)>=0)return!1;E=E.next}return!0}function zg(r,t,e,n){var i=r.prev,s=r,a=r.next;if(Rt(i,s,a)>=0)return!1;for(var h=i.x,c=s.x,d=a.x,f=i.y,p=s.y,m=a.y,v=h<c?h<d?h:d:c<d?c:d,E=f<p?f<m?f:m:p<m?p:m,C=h>c?h>d?h:d:c>d?c:d,M=f>p?f>m?f:m:p>m?p:m,S=ga(v,E,t,e,n),y=ga(C,M,t,e,n),x=r.prevZ,b=r.nextZ;x&&x.z>=S&&b&&b.z<=y;){if(x.x>=v&&x.x<=C&&x.y>=E&&x.y<=M&&x!==i&&x!==a&&Pn(h,f,c,p,d,m,x.x,x.y)&&Rt(x.prev,x,x.next)>=0||(x=x.prevZ,b.x>=v&&b.x<=C&&b.y>=E&&b.y<=M&&b!==i&&b!==a&&Pn(h,f,c,p,d,m,b.x,b.y)&&Rt(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;x&&x.z>=S;){if(x.x>=v&&x.x<=C&&x.y>=E&&x.y<=M&&x!==i&&x!==a&&Pn(h,f,c,p,d,m,x.x,x.y)&&Rt(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;b&&b.z<=y;){if(b.x>=v&&b.x<=C&&b.y>=E&&b.y<=M&&b!==i&&b!==a&&Pn(h,f,c,p,d,m,b.x,b.y)&&Rt(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Ng(r,t,e){var n=r;do{var i=n.prev,s=n.next.next;!xs(i,s)&&Jh(i,n,n.next,s)&&mr(i,s)&&mr(s,i)&&(t.push(i.i/e|0),t.push(n.i/e|0),t.push(s.i/e|0),yr(n),yr(n.next),n=r=s),n=n.next}while(n!==r);return sn(n)}function Bg(r,t,e,n,i,s){var a=r;do{for(var h=a.next.next;h!==a.prev;){if(a.i!==h.i&&Yg(a,h)){var c=Qh(a,h);a=sn(a,a.next),c=sn(c,c.next),_r(a,t,e,n,i,s,0),_r(c,t,e,n,i,s,0);return}h=h.next}a=a.next}while(a!==r)}function Gg(r,t,e,n){var i=[],s,a,h,c,d;for(s=0,a=t.length;s<a;s++)h=t[s]*n,c=s<a-1?t[s+1]*n:r.length,d=qh(r,h,c,n,!1),d===d.next&&(d.steiner=!0),i.push(Xg(d));for(i.sort(Ug),s=0;s<i.length;s++)e=jg(i[s],e);return e}function Ug(r,t){return r.x-t.x}function jg(r,t){var e=Zg(r,t);if(!e)return t;var n=Qh(e,r);return sn(n,n.next),sn(e,e.next)}function Zg(r,t){var e=t,n=r.x,i=r.y,s=-1/0,a;do{if(i<=e.y&&i>=e.next.y&&e.next.y!==e.y){var h=e.x+(i-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(h<=n&&h>s&&(s=h,a=e.x<e.next.x?e:e.next,h===n))return a}e=e.next}while(e!==t);if(!a)return null;var c=a,d=a.x,f=a.y,p=1/0,m;e=a;do n>=e.x&&e.x>=d&&n!==e.x&&Pn(i<f?n:s,i,d,f,i<f?s:n,i,e.x,e.y)&&(m=Math.abs(i-e.y)/(n-e.x),mr(e,r)&&(m<p||m===p&&(e.x>a.x||e.x===a.x&&Wg(a,e)))&&(a=e,p=m)),e=e.next;while(e!==c);return a}function Wg(r,t){return Rt(r.prev,r,t.prev)<0&&Rt(t.next,r,r.next)<0}function Hg(r,t,e,n){var i=r;do i.z===0&&(i.z=ga(i.x,i.y,t,e,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,Vg(i)}function Vg(r){var t,e,n,i,s,a,h,c,d=1;do{for(e=r,r=null,s=null,a=0;e;){for(a++,n=e,h=0,t=0;t<d&&(h++,n=n.nextZ,!!n);t++);for(c=d;h>0||c>0&&n;)h!==0&&(c===0||!n||e.z<=n.z)?(i=e,e=e.nextZ,h--):(i=n,n=n.nextZ,c--),s?s.nextZ=i:r=i,i.prevZ=s,s=i;e=n}s.nextZ=null,d*=2}while(a>1);return r}function ga(r,t,e,n,i){return r=(r-e)*i|0,t=(t-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,r|t<<1}function Xg(r){var t=r,e=r;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==r);return e}function Pn(r,t,e,n,i,s,a,h){return(i-a)*(t-h)>=(r-a)*(s-h)&&(r-a)*(n-h)>=(e-a)*(t-h)&&(e-a)*(s-h)>=(i-a)*(n-h)}function Yg(r,t){return r.next.i!==t.i&&r.prev.i!==t.i&&!Kg(r,t)&&(mr(r,t)&&mr(t,r)&&qg(r,t)&&(Rt(r.prev,r,t.prev)||Rt(r,t.prev,t))||xs(r,t)&&Rt(r.prev,r,r.next)>0&&Rt(t.prev,t,t.next)>0)}function Rt(r,t,e){return(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y)}function xs(r,t){return r.x===t.x&&r.y===t.y}function Jh(r,t,e,n){var i=Es(Rt(r,t,e)),s=Es(Rt(r,t,n)),a=Es(Rt(e,n,r)),h=Es(Rt(e,n,t));return!!(i!==s&&a!==h||i===0&&ws(r,e,t)||s===0&&ws(r,n,t)||a===0&&ws(e,r,n)||h===0&&ws(e,t,n))}function ws(r,t,e){return t.x<=Math.max(r.x,e.x)&&t.x>=Math.min(r.x,e.x)&&t.y<=Math.max(r.y,e.y)&&t.y>=Math.min(r.y,e.y)}function Es(r){return r>0?1:r<0?-1:0}function Kg(r,t){var e=r;do{if(e.i!==r.i&&e.next.i!==r.i&&e.i!==t.i&&e.next.i!==t.i&&Jh(e,e.next,r,t))return!0;e=e.next}while(e!==r);return!1}function mr(r,t){return Rt(r.prev,r,r.next)<0?Rt(r,t,r.next)>=0&&Rt(r,r.prev,t)>=0:Rt(r,t,r.prev)<0||Rt(r,r.next,t)<0}function qg(r,t){var e=r,n=!1,i=(r.x+t.x)/2,s=(r.y+t.y)/2;do e.y>s!=e.next.y>s&&e.next.y!==e.y&&i<(e.next.x-e.x)*(s-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next;while(e!==r);return n}function Qh(r,t){var e=new pa(r.i,r.x,r.y),n=new pa(t.i,t.x,t.y),i=r.next,s=t.prev;return r.next=t,t.prev=r,e.next=i,i.prev=e,n.next=e,e.prev=n,s.next=n,n.prev=s,n}function $h(r,t,e,n){var i=new pa(r,t,e);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function yr(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function pa(r,t,e){this.i=r,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}vs.deviation=function(r,t,e,n){var i=t&&t.length,s=i?t[0]*e:r.length,a=Math.abs(_a(r,0,s,e));if(i)for(var h=0,c=t.length;h<c;h++){var d=t[h]*e,f=h<c-1?t[h+1]*e:r.length;a-=Math.abs(_a(r,d,f,e))}var p=0;for(h=0;h<n.length;h+=3){var m=n[h]*e,v=n[h+1]*e,E=n[h+2]*e;p+=Math.abs((r[m]-r[E])*(r[v+1]-r[m+1])-(r[m]-r[v])*(r[E+1]-r[m+1]))}return a===0&&p===0?0:Math.abs((p-a)/a)};function _a(r,t,e,n){for(var i=0,s=t,a=e-n;s<e;s+=n)i+=(r[a]-r[s])*(r[s+1]+r[a+1]),a=s;return i}vs.flatten=function(r){for(var t=r[0][0].length,e={vertices:[],holes:[],dimensions:t},n=0,i=0;i<r.length;i++){for(var s=0;s<r[i].length;s++)for(var a=0;a<t;a++)e.vertices.push(r[i][s][a]);i>0&&(n+=r[i-1].length,e.holes.push(n))}return e};const QL="";var Jg={exports:{}};const tc=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],si=(()=>{if(typeof document>"u")return!1;const r=tc[0],t={};for(const e of tc)if((e==null?void 0:e[1])in document){for(const[i,s]of e.entries())t[r[i]]=s;return t}return!1})(),ec={change:si.fullscreenchange,error:si.fullscreenerror};let ve={request(r=document.documentElement,t){return new Promise((e,n)=>{const i=()=>{ve.off("change",i),e()};ve.on("change",i);const s=r[si.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(n)})},exit(){return new Promise((r,t)=>{if(!ve.isFullscreen){r();return}const e=()=>{ve.off("change",e),r()};ve.on("change",e);const n=document[si.exitFullscreen]();n instanceof Promise&&n.then(e).catch(t)})},toggle(r,t){return ve.isFullscreen?ve.exit():ve.request(r,t)},onchange(r){ve.on("change",r)},onerror(r){ve.on("error",r)},on(r,t){const e=ec[r];e&&document.addEventListener(e,t,!1)},off(r,t){const e=ec[r];e&&document.removeEventListener(e,t,!1)},raw:si};Object.defineProperties(ve,{isFullscreen:{get:()=>!!document[si.fullscreenElement]},element:{enumerable:!0,get:()=>document[si.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[si.fullscreenEnabled]}}),si||(ve={isEnabled:!1});const Qg=Oh(Object.freeze(Object.defineProperty({__proto__:null,default:ve},Symbol.toStringTag,{value:"Module"})));/*!
5
5
  * Based on package 'screenfull'
6
6
  * v5.2.0 - 2021-11-03
7
7
  * (c) Sindre Sorhus; MIT License
@@ -10,14 +10,14 @@
10
10
  * as it is required by that
11
11
  */(function(r){(function(t,e){r.exports?r.exports.screenfull=e():t.screenfull=e()})(typeof self<"u"?self:je,function(){var t=typeof window<"u"&&typeof window.document<"u"?window.document:{},e=function(){for(var s,a=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],h=0,c=a.length,d={};h<c;h++)if(s=a[h],s&&s[1]in t){for(h=0;h<s.length;h++)d[a[0][h]]=s[h];return d}return!1}(),n={change:e.fullscreenchange,error:e.fullscreenerror},i={request:function(s,a){return new Promise((function(h,c){var d=(function(){this.off("change",d),h()}).bind(this);this.on("change",d),s=s||t.documentElement;var f=s[e.requestFullscreen](a);f instanceof Promise&&f.then(d).catch(c)}).bind(this))},exit:function(){return new Promise((function(s,a){if(!this.isFullscreen){s();return}var h=(function(){this.off("change",h),s()}).bind(this);this.on("change",h);var c=t[e.exitFullscreen]();c instanceof Promise&&c.then(h).catch(a)}).bind(this))},toggle:function(s,a){return this.isFullscreen?this.exit():this.request(s,a)},onchange:function(s){this.on("change",s)},onerror:function(s){this.on("error",s)},on:function(s,a){var h=n[s];h&&t.addEventListener(h,a,!1)},off:function(s,a){var h=n[s];h&&t.removeEventListener(h,a,!1)},raw:e};return e?(Object.defineProperties(i,{isFullscreen:{get:function(){return!!t[e.fullscreenElement]}},element:{enumerable:!0,get:function(){return t[e.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!t[e.fullscreenEnabled]}}}),i):{isEnabled:!1}});/*!
12
12
  * leaflet.fullscreen
13
- */(function(t,e){r.exports?r.exports=e(Zh(),Qg):e(t.L,t.screenfull)})(typeof self<"u"?self:je,function(t,e){return t.Control.FullScreen=t.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},_screenfull:e,onAdd:function(n){var i="leaflet-control-zoom-fullscreen",s,a="";return n.zoomControl&&!this.options.forceSeparateButton?s=n.zoomControl._container:s=t.DomUtil.create("div","leaflet-bar"),this.options.content?a=this.options.content:i+=" fullscreen-icon",this._createButton(this.options.title,i,a,s,this.toggleFullScreen,this),this._map.fullscreenControl=this,this._map.on("enterFullscreen exitFullscreen",this._toggleState,this),s},onRemove:function(){t.DomEvent.off(this.link,"click",t.DomEvent.stop).off(this.link,"click",this.toggleFullScreen,this),this._screenfull.isEnabled&&(t.DomEvent.off(this._container,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).off(this._container,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this),t.DomEvent.off(document,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).off(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this))},_createButton:function(n,i,s,a,h,c){return this.link=t.DomUtil.create("a",i,a),this.link.href="#",this.link.title=n,this.link.innerHTML=s,this.link.setAttribute("role","button"),this.link.setAttribute("aria-label",n),L.DomEvent.disableClickPropagation(a),t.DomEvent.on(this.link,"click",t.DomEvent.stop).on(this.link,"click",h,c),this._screenfull.isEnabled&&(t.DomEvent.on(a,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).on(a,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,c),t.DomEvent.on(document,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).on(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,c)),this.link},toggleFullScreen:function(){var n=this._map;n._exitFired=!1,n._isFullscreen?(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.exit():(t.DomUtil.removeClass(this.options.fullscreenElement?this.options.fullscreenElement:n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize()),n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1):(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.request(this.options.fullscreenElement?this.options.fullscreenElement:n._container):(t.DomUtil.addClass(this.options.fullscreenElement?this.options.fullscreenElement:n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize()),n.fire("enterFullscreen"),n._isFullscreen=!0)},_toggleState:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel,this._map._isFullscreen?L.DomUtil.removeClass(this.link,"leaflet-fullscreen-on"):L.DomUtil.addClass(this.link,"leaflet-fullscreen-on")},_handleFullscreenChange:function(){var n=this._map;n.invalidateSize(),!this._screenfull.isFullscreen&&!n._exitFired&&(n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1)}}),t.Map.include({toggleFullscreen:function(){this.fullscreenControl.toggleFullScreen()}}),t.Map.addInitHook(function(){this.options.fullscreenControl&&this.addControl(t.control.fullscreen(this.options.fullscreenControlOptions))}),t.control.fullscreen=function(n){return new t.Control.FullScreen(n)},{leaflet:t,screenfull:e}})})(Jg);const $g=X.defineComponent({name:"CoordinatesVerifyPolygon",props:{dataPolygon:Object,iconMarker:Object,coordinatesMap:Array,checkPointInPolygon:Function},data(){return{markerIconDefault:{iconUrl:ms,iconSize:[25,41],iconAnchor:[12,41]}}},mounted(){this.verificarPuntoEnPoligono()},methods:{verificarPuntoEnPoligono(){var f;const r=this.iconMarker?this.iconMarker:this.markerIconDefault,t=(f=this.dataPolygon)==null?void 0:f.geometry.coordinates[0].map(p=>[p[1],p[0]]),e=JSON.parse(JSON.stringify(t)),n=[this.coordinatesMap?this.coordinatesMap[0]:0,this.coordinatesMap?this.coordinatesMap[1]:0],i=tt.map("maps",{fullscreenControl:!0}).setView([this.coordinatesMap?this.coordinatesMap[0]:0,this.coordinatesMap?this.coordinatesMap[1]:0],this.coordinatesMap?this.coordinatesMap[2]:0);tt.tileLayer("https://tile.openstreetmaps.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(i),tt.polygon(e).addTo(i);const s=[this.coordinatesMap?this.coordinatesMap[0]:0,this.coordinatesMap?this.coordinatesMap[1]:0],a=tt.icon(r);tt.marker(s,{icon:a}).addTo(i);const h=Pg(n),c=kg([t]),d=Dg(h,c);this.checkPointInPolygon&&this.checkPointInPolygon(d)}}}),eb="",ma=(r,t)=>{const e=r.__vccOpts||r;for(const[n,i]of t)e[n]=i;return e},tp={ref:"maps",id:"maps"};function ep(r,t,e,n,i,s){return X.openBlock(),X.createElementBlock("div",tp,null,512)}const ip=ma($g,[["render",ep]]),np="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAANHElEQVR4nOWbe3BUVZ7HP/fefiSdTtKEJsggBHnYBqVgwBKNyjiC4ojLw5Wt0t2ZcX2sU1SN1G7t1DijjlU66oiOO85ooazM1uBjRpQRJhAFh4criEEIUcRwI+EVyfOa3KQ7nX7de/eP7gSSe7tzO+ngH/utoiqce87v/M73/n6/8zu/c1swDIP/z3CMpnC/L5APLAMWAfOBywAx9VhI/RsMA6gH9gE7gEpFlcOjpaMwGhbg9wUCwL8BK4FxQByIleh+90RtcrRYH+Mo0oscDlwOwBEjKvaIIboFVWiWztIhtZMg0SeuHXgLeFlR5aO51jWnBPh9ge8AvwDuIfkmI5O0svby2GzfJG2Kb7w2wSEiZbQ6HYOg2GmccjQIXzhrOen46vzHfwQeU1T561zpnDMC/L7A/cCjgA/Qro5dd3pu9FpK9LGzs1IIgQQaAA4k2qQmvcZ1gMOuajFlFRHgIUWVX8iF3iMmwO8LFAJrgbuArvL4nCNLe+/wOw1XuYG1k2epImAQFkLa9vxK/ajzsCPVuA24U1Hl4Iikj4QAvy8wA9gEzBirl554MPiz1gja98XUsoUcLP98aOhExO74tvx3pXpHnQicAW5SVLl+uDKHTYDfF5gNfAi458TmNS/uXTlRwHC5cKAzOltrn3voGFS7d+t78naIQC9wjaLKnw1L5nAI8PsCU4HDAPOjCw7eFLntRrtjDQw0dJxI/TQJCMTREAEJCcMmgfvdu42dee8JJOPC5Yoqn8huJcMgwO8LuIETgK8ieuPB70duWWDH0Asn5TN2TjET5ozholnFuKe4yC9xIQgCkWCc6OkYHXUhzhxqo+tYGOVItx31qXbvMz7I2ywArUCZosrRbNYzHAI+AK5bFLm5dn500dVJNdKjdJ6Pqx6+lOkrJmQ1T/P+Tg4+U0/DlpaM/QQkap3VVHo2AuxUVHlRNvNkRYDfF1gF/LYsMf3MHT33XJo/RCJZ8UQ5Vz1yaTb6mFC/8Sy7HzxCb6v1i026lIuP8jazz/0hwCpFldfalW+bAL8vUEIyK/v60a41/ghxjxvngD4iAkEilE4rZvk7VzNuTrFdPTIiFkyw/YeHOLblLA4kk8UlSCDi4vmiR4gIEYASRZU77cgWh+7Sjz8A4WsiCzUd3ZOPy9ShlziLls3i3i9vsrX4E5WtHF1/esh+rkIH/7B5PteuLkcCU4h04kTEYGF4+fm62oItAvy+wGTgTq9RpC6MLr5EQLTY6gw8Mz3M31yO6BpabO2LDVQu/YQP7qtlx49rbSlb8btyLr+3zGQByV3D4LuJucyMzwb4Z78vMMmOTLsW8BAQuy28Mm2EFZ0i9+9daEvYwUcb2P3TI/0U1m1o5K8/2Gtr7MJX53DRlb60z2/pXd7350N25A1JgN8XcAE/8hre0PTEZdPSiVm6eT55Y8xuMRjv/+QQu3/92YAs0UCj8f1ONl67Dy2mDylj2XvXILmtVS8wPExPzAS42+8LOC07DdB8aNwGSDdEbo6bvQ9A4PL7LmbKreOHFLR9SQ1fvHIaJ5JJhoFO08ff8D+BHajHQxnl5Ptd/ODNKy2fGQgs7l0G4AGWDKWTHQKWArFAfHah1fIll8iC567IKCDWneD1ebs4WnUGZ8at0yB0Ksbrs/bQvD9zEJ9++wTGBAotn5XoY/DpYyBZjMkIOwRUlGllMYfhKrCygInfK8FdnN7Sws1RXrtiJ0pNEBHBRpprkIhobKzYx5ldrRl7Tr7Rn0YCzEi6wQK/L+DJJMMOAaUXJ6Y5nEiWp7uJ149NO7C1RuUv8z8i2BixMc1AGOhsWrSf+r+kr31MXZre7crjswCmAnMyzWOHgNDExGTJKt0VMLj45lLLQac3t/HGvF10NWb25/QwEAyRqjtr+PiROsseZbeMx+1zWtpUygUgWYdMCzsEuHzGGGHwJAk0nPlOLrrCnPAcfaWRyhUHEBBHWBNI7u8Hnqxn5301lj3GzfUimoIq59cUJ2eawQ4B4XyjwBS5JES8l3iQCgaKOPLyaap+coAYiZwWRL5c38TeX5ktoXhqIWDeOp24+/60DhQp2CEg5jJcZooRKfCbI3rjzlZcOBBzXA1KkKDtow5Te1FpHpqFE0hGv8oZg6Cde4Fe0px4BdHc/L0/zKZoeiExNcbJba0EG3ttTJEekluk/IeTkPIl5q4252GCaJ2dOM8d1DJuO3YIKIkT093kDWgUMYj0aKbOBRe5ue7pcgC2/uOBERPg9DpY9N9z0j7vCWo4MDDSW1zGyoodAvLCYk/cqxUNyHMNBEKnw0l+08wdD5kJ6kP+ODeSKznQMKCnyXqrNDSDeI+Gs8DCC4FwYxg9lWEMmJt4358Z7xDsEKCflc5GS7UJBYMf9LbFaP9CZdwsnw0x5zDvP6dR8eRMJGcyBBmGwfG/NrPtnz4dwmDNaP6kk8GDBASCQn+1/Fim8XaCYHuH1IRuOgAnc7qze2zVHQag/F8mIbnE/ttBQRSYccd3cHqs33I6KEe6CTVFTAYYJ4HqaAXoAD7NJMMOATXHHF86tdSebFKiVrWn7Xno/SZuaouHEpZBNRNOVrVa6hQnwQlHA8D/KqrclkmGHQL+3il2aEGxs9FqXz9Z1YqhZ2e3Vv0NPRkLssHJLS2YA5CAWxD5zHkQkrdHGWGHgEogsdf9gWEVaXtaohxcc9yGmNyivbaLpv3mvEBA53Pn532Z4Kah5AxJQKq4+P4RV22JiB62ekn7H60jbrElalHr4oYeN7cbumHZX4vqlhaz/ceH0+pc7foIoMpOYdRuSWydgeHa49qtamhIg4bpCdh6e7VpkJXiAuA0Z9ZILhHDghitV0sGzPNw8DcNtH+uDpKbdNAGsZF2qQng+aEWBdmVxfdLSPOe7nop2kKb1zMoMRIwmHFXGbe+8d3+to5jIQ78ph4tlAyhIjC+YgxzV09DsDhfNvythboNZ+jza1EUuOyeSUy95dyx97Pf1/P31fVIDLQ4DQ0Dkbe962iQGk4pqnxJrglYAfzphuiC2JWRJWPzBsWD5AIFbnzqCmb9Yqotmdmi+Z12/rxyP4JF3hciStDRyPqCdQA/UlT5NTsybd8LKKr8LlDzseuTggKL80XyFt+g6peHqX5q2LfVaXGqqoXXVn6Y9sMiL4Vsy9sK0Gp38ZDdxQjAizEh1lPj2hlL18GNg08erqNyxQFaqrNPkgaj+1SYvT//kneXVOPEaUp5kxDoFptoSfr+6mzkD+dytBqY/e/dj0sFRt6QqfTMuydx1S8vxTfDm9U80a44Nc83UP24PGRfHZG1hU/SKXbWK6ocyGae4RAwH9g+NXFZ9K6eu0vtGtElS8Yz/fYJlC0uxTsx37JPpDPG2Q87OFHZzFdvNxELJiz7Dcanrn1sz98CcLWiyubtKAOG+4HEJmDxvaFV7aXalCnZZPCCKFA83UNRmQePP1m1iQYTdJ/uoftED/GeoS9G+mAAMSHOs0UPA7yjqPLKLFRJ6jNMArxAl4QUXN39sDPf8Hqyy+KTIRPOP033SbCvj4HOOu/vaJdaNKBYUeWerNQg+yAIgKLKIeBfNbTidzxvugSLmlxmnFukMKAtm5chcMC9l3apBeCe4SwehkkAgKLKG4DdZxzHHfUOGXDkuAqYHgYQEmLsynsPYFdKl2Fh2ASksBxIbCrYQI+okL7+kzv0ZZRvF6xFQ0sAt49E3ogIUFS5G1ipofFH70uA+ZyfWxgYSGz0bOCs9DXASkWVu0YicaQWgKLKm4H1XUIXW/O2ESGGY+RiTZAQiQIHnbuQnV8ArE/NPSLkRFNFle8Dvvrc/TG6o5MuRvT1qiW66MEhJtjh2QbwVWrOESOXr2ohwO8LXqBDNNfpRgaBBDFe8j4zYK5cIGcEKKrcCCxPkOBPhc+gC9nfCGfCW4Wv0i10A6xIzZUT5NRZFVXeAjwOsL5gLSqxEV2RORCJEmNT/pu0i60AT+TC789HzqOVosqPAZUtUjOH83cQJmH729/B6CTMGVcdda7DAFsVVf5VLnWFUfrJDIDfF6gHZtwQuZWK6PWWV9hD4ZDjEO8VvAXJoDeyT07TIPf71TlUAME9eVUcdx7FyIIAAWiTWvoWH0zJGhWMGgGKKivA9QAbPa9zQjpOmGjGbwYkRGLEaRXbWOftr2len5I1KhhNCyD1I4alAH/2rsWQetEzJMxR4kiCwbrC5/qalg33hxB2MaoEACiqXAncD/Bf3qdQxG/QLE6PAgYtQhdPFz3S1/SAosp/G239Rp0AAEWVXwV+DvBK4bOEhZDJFRLEeKOw3+wfUlR53YXQ7YIQAKCo8hpgDcALRb8mLJw7vifQeK7oCeJCDGCNosrPWEvJPUZtG0wHvy/wAvAgwH90P4aAyMuFz9GTvM9/UVHln15IfS44AQB+X+AlYJWQqvIbyZiwVlHlVRdal2+FAAC/L/Ay8EDqv+sUVX4gU//RwrdGAIDfF3gWQFHln31bOvwfX7MkK809f/0AAAAASUVORK5CYII=",rp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPI0lEQVR4nMWbe3RU1b3HP/uceWXymoRJQgiIEDGiolARWx/XFz56W7Raq9d6XeqqVltb8d1aqtfWKmpRsFitovVZH3i92qVYpMq1YrHVoghCOEh4hIS8TpKTZPKYmXP2vn/MZMIwk8zkxf2ulbWyf3vv3/79vmefvX+/vc8IpRTjiWCgaipwAjAXOBooB8oAf7xJGGgFGoBtwBfA303L2DKuhsUhxouAYKDqEuAa4DRAH4GKdcALwErTMjrG0LQkjDkBwUDVdcBPgKP6Zb7pXnKOd5NfmUtOuQ+9XEfP0RCAjCrsNgfZKumsCdG9Kay6P+8Vslf2G9YCPAk8bFpG+5gayxgSEAxUnQ08AMwG0As0yhYUU3hGHt5KD7rjwtEclJAIJZL6KhRSKtzChdQkdpcdsT9XzXVrGrtCH/XmAEEgBNxjWsZjY2JwHGNCQDBQ9QhwQ0wjTLpmAhPOL0L4BZoQMNwhNIHjOACodvVxwxMtG1rXdM4CjgE+Aa42LaNu1IYzSgKCgapy4E1gHkDwO0WUXBTAO8mDAJQYHblCCRAghcKxnJU776iv7anuuxAIABeblvH+qAZgFAQEA1UzgQ+AUi1PMOO/DsE/14ca9uPOHkrJvtBfe5+vWVx/KnA4cJlpGS+PRueICAgGqmYAnwF5vmkeDl0yEX9RLlI4o7ElIxQKTWi0r+l8bvd9DecAE4FLTct4ZaQ6h01AMFBVCHwFlOj5GrNWHobm0XF0O2VxGwrx2Q0q9qq4HBdKKBzNGVJPv73tq7rW1j7UOBcoAE43LeODYTkSx0gI+BSYm1PpZco9ZfjLfVn1O8I/g9n5x1LhLSfflU8uflAQ0aOEot20qBaMnq/4R8unREU0C8MF7a+Gqnc/UT+D2DJbYVpGy7CcAVzDaRwMVD1ALKJjxqOTwZPhSWlwUsHXuaBkAXPyj808wAQwy1pZ0/Y+T+97HiTouo5EprYVUPK9wMyG6sa94Q+dycA7wPHD8QeGMQOCgapZwCaAiT8qliXfK9Zcmk66/rrU8bl83Db1Bk4OnDhcmwBoiDTyx6YXWNO0Frfmir8vyVACfL25csPFX4TsLlkALDQt43fDGWc4BGwCZvln5TDjkQo0oaVd74USHFF4OL+auohiV1FKva1szGgrTZFmpJLku/Kp8JaTo+WkHffJlqd5o3YVUW2w10IQqYl0bL16VwExmgpNy+jMyimyJCAYqPo28Jaep3H065VKeETK8xBA1HGYX3Qav6y8PUXH6y1/Zp21nn3hRtqibUl1eXouQXeQWXlHcUnZhUz0lCXV/6vzc241fonLpaW1T0rBrtv3Wl0begLA46Zl/DijU/12Z0nAVmDmxCuCzsQrAzokGyIQ2NLhxKITuHf6XUl1W7qqWV7/B3b07YIsxtLQuGzixVxRflmSfEPX59y6fRG6lppXKSDaEu3YevEuP+AGirPNG9JTuh+CgarjgZkARefmOZrjTmnjSIdc4U9x/q+N73PzjkXs6N2ZlfMAEskLDa9wX+1DSfLj8ufwzSnnEHGiKaG1BuQW5RX6TnC3xkXXZTUYWRAAXAuQc4w76irTPUpLdaQvEuGuI3+WJFsdepflO1fgZLGlpUDA38yPuG37oiTx7aULKRUlSD3ZBgU4IkrFzSUasfOFH2Q7VDYEXABQ+f2pEk2gxAFbkoJvlMxjnm9uQrSu5SOW7XyK7tzQ8BOhOBxhs7FvK0tqHkmS3z/zbkSaLcF22RSWFZYWzMhtByqDgaqKbMYZkoBgoGoeUKz5NMRc5XGlO9cQcP3ka5JES/c9huOEETL7yDAdlGPzbtdaNnZuSsgO81dSrpeltNWUhqNscuZ5mgAJVGYzRqYZ8G8Avtle6RWe1AVTQKV7OtN9hyZE6zv/SacMjVlSpJRkyb7lSbKTCk+IBQEHQHdc5Mz29G8xX8tGfyYCZgPknKA5mkwNGjWlMX/SaUmyJ/Y+xYjnPfAfZRcxr+C4JFlDbyPr2tcnyvNLT0MJlZIz6Gi4j3QFgQiQrGQQZCKgEqC0okT2+npTKoXUODbv6ER5S2gb9ZHGbMZN1QX858RLuXrSFdxXeTdlB8QCfzbfTvw/wzuDUm8QoZLNj7gi5PvypxM7PRqTV6AMQFQIqdupTW09SqEqTJQ3dH4GqTFSRghgQfBbXFn+/YTsxaNW4I9Hh0JBi92a1Odw32E4up2sRwmkkDqxc8TSbMbOREABoPQCPW07N258ujdRrgvXD7rfD0aLAM6dcDY3TEneuv/U+DIRFU006rF7cNTAeUOJuwQtvfk24InbnhGZCPACSnhESjslFV7di1cbIKDdsVIUzM2fw9MzH+M7pedzYAghgLOK53PLIT9Nkq/Y9xzPNryMrQaecFiGCctIojzBV4jtpM0SFdBDLCLMiEzpsASUEGlWNQFImVQhDuBzfvHp/HzqzQBcX3E1jrJ5q3lV4jBkQfBbKU/+d3V/4O3mVYNPmTgyhPCR+F9GZJoBPYCSUWUfWCGEIKyiRPZ7KgF38qw7OvfIpPINk6/j+MK5aMDc/Lkpzq9seZO3m1eRLnzwal68midRbg934kr/ZkKMvq6hHOtHJgJaAWSvk5ZNW9n0yoHdYapvMmq/rWnZ3t/zbuvapD53TvsZ55cs4M5pyRnju23vs6Lu6bTOKwV+PQddDARiTdFmZPpZ4CZGgDW0azFkIqAO0MKN0XC6OalLF02qOVE+ueCklE1gSe3S2OlOHDmaj+sn/xC/PpD/P9XwAg/tWTaoEULAtJxpSbLqnm1IKQ9oJ5CO7AaKiN01ZkQmAqoBEdkSRempC47UbYyOHYny1JxDmOabktRGAa80vZYyE/rxbvtaXm1YGVtsBjFCAP8+4ZxEeVuPQXu0A11LNj9q23ikp4bY9r0tg29AZgI+BYS1MeRLd8ehlOK91g+SZFdMujwlFlDEZsKatmQS1rT/L0t2L00X1Q5AQIm/jHkFA5Ht+60fpm2qC4G1OdRNbPf61xBaE8hEwFqA7i/6/EoKqeSBLAh29u1kW8/2hOTkwq9TIooQaUj47Z6lfNzxCQAfd37Kb3c9nDloVvDz8huTRB91/j19UwG9W/qK48XqTKohAwGmZTQCG5wex9W5trsbdxpzBSyuXZIkuu+wX6HrHqSW/Noo4M6d9/BQ7XLurPn1kE9eKLBzFFdNvJxjCgbC7XXWeswDjtQgdrcghEbbaiuf2Pa9cyjf+pHNecDzgGh5tc2b/mgWarp288F+03Ja7qHcMX0h+d35pDtAWd26JuOg0gXz9NlcVn5xkvyBmqVpYwAhBLLD2di7L+IFVpuWEco4CNkR8CxAaHuvJ7JX2inhHOAWLh5pfCJJdmruKdw89SdIJFKppEOMTNNeaYozgqfy4IzfJMmXNC6nS4bShttKwr5nze3ErtKXZeEXkAUB8SPmFQAtr5launnr0l1YfRa31dxJVA4cgZ1acTKPVT7MGaWnIONxfCbnK/3TuLbsKhZNujVJvrrtPVbV/QW3y5V2kXXa7G2tb3YcB9QN59Y421PhEqAZYNYbh0mVrzSXnnw6JADbcSj3lPPSMU+n6Kju3s7a9g/4tHMDdeF9SXWFrgJm+o/g9KJTOLP4tJS+rzW9wfI9T+Bxp4b3Simi0qHhppZ17Zu7TgQuMC3jrYxO9ds9jIuR3wCL8o7yUfnoVIRSg8brs/KP5K5D76DIFUhb3xhpSroYOcQ7Gc9+Ye7+eKl1JSt2P5ey5/dDKYjW9jZvvXJvLlBtWsawrseGdTkaDFTVARWTf1qiSi4qFqnbYgyOlBS48rht6o2cHPjGcOxJoD7cwIr6Z/jQWo+AlG0VQAiFQldfnr8jZHfY+UClaRlZrf4JHcMkYA6x7wI44oXp+Ka4B83/VXyGfC1/DsflH8uZRadS4ikZUr9C8bf2j/isayOr297DURKUSut83Hy2/2h3b8+2cA5wk2kZy7J2pl/DCK7HbwSW6kUaM146hJwcb6bUNAYlmF14NEf6j2CKdwpF7kIEgj4Zpq6vnj3hPWzq3kpDb+MQDvcbDVKDhudaZPMz7RrwlmkZ5w3LkYSukX0h8jpwYekpxZTeXYQutIxGA0gpEULE/uILiCL2hB3HiddpZNorpEsR/iyKsXA3xJKeCtMyRnQSO5pvhGqBKcE78imfX4bb5UrJzsYDCohIm+0LduP0SICjTMvYOlJ92QRCg+FMAHNxF2KvTl84PApV2UEJEJqi9qr6fud/MBrnYRQEmJbxFXA5wJbrvkIzddRo6MwATWjYMsqeJ1vorg0DPGdaxh9HrXc0nU3LeBF40umT7HyqFrf0ZuwzUkSiEcQmjfY/WQDbTMu4ciz0jvqZmZZxLbC5Z22E0FshvLYPeeAF6iighAIlEO1uttyyE2LLwPyx0j9Wk/YswNn28C7qv2zAa4/dTNCljoODce8OlKMALjQto36s9I8JAaZlNAHnAdTd2oKv15+hR3ZQKLyRHJofbSXyhQOxL8bfHBPlcYzZsmVaxjvA/Tjw5e+r0bWs7iWGhCY1GjY30vQ/7QD/NC3jllErPXCMsVRmWsYdwLr21SEaXmmJJUwjhECgt7vZs7gBYvcTZ4+RmUkYj43rm0DnvsebCX3Zi8p0xTMINOFi8y3bULHTr3OH8+nbsMYZa4WmZXQD5wDsurcJpeyswuT9oRDsur+W8B4b4BemZawbazv7MS6hi2kZ/wAetJuitDzYQaivJ+u+0qXo+zJM2+ougL+YlrF4PGzsxzjGbvwCaGxYbWI+1YbQspsFkYYINYv2QizJGVGGNxyMGwGmZTjEF672/+6md6eNbafcsQ5AgNIlu67bh93pQOxnMUN0GBuM5wzAtIzNwA8Bam7ag78vN+2X35rQkMpm96PNhNuiEPup3DvjaVti7PEewLSMFcCLUcvm88Vb8Nn+lHS/NxxGVWt0rOwE2G1axiXjbVc/xp0AANMyLge2R9dLGp9pwSNj+YJCoRSIao3NP05csp5xMGzqx0EhII6zAGpfaqCppgV/JBdd6SCh+v6a/jaXmpax6yDadPAIMC2jFvguQO3CBpy+KJ6oj85nQqjYl3WPj+bHTyPFuP12eDAEA1XLgIXF5xWQe0YOe29sAthoWsacg2pIHAedAIBgoOoTBn7fEyF2qGkedEM4uGvA/tg/sVnw/+U8wP8BirtMKB0OWwYAAAAASUVORK5CYII=",sp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPDElEQVR4nMWbeZyUxZnHv/W+b3dPz9kwjYKoC4pOUNF4g3hsDIrBAOpKjEfcKJFNVtd4xGvXuCresuvGENe4q0ZX+BDXZI26XjEBjcixHjAgwwvI6SDDvDPzTs/0Md3vW7V/dE8f0z3MO0MP/v5636rnfep5fl1VT9VT1UIpxXAiHGqoAr4NnApMAg4DxgKVGZEEsBtoBtYBnwDvWLYZGVbDMhDDRUA41PAt4ApgNjBqkJ+3A/8LLLZs8+1y25aPshMQDjWcB9wHTOktGyl8TPHVcrJRq47RK8Vo4ade86EjcFDYyqFF9qgNbkysdrpY6XTSJlO9n38M3GHZ5p/LamgGZSMgHGqoBx4HruktO8NXo+b4R6sZvnoRFJrwqiuqXN5y2nk50cJKJzsSXgJutWxzb1kMzqAsBIRDDZcCzwAjAM4UdVwbOEROq6zTUNrQlCpAwLtOB/8Ra2aVGwGIAPMs2/ztfhudwX4TEA413AU8BKixWkA+XjWBqb4aHWEgpCLtyf5jqdOhbuzeLDqVA3C9ZZtPlUPvfhEQDjXcCjwG9Jyq17ovVk+sqNJ0A0G5/M5CCWiVydS1kSbZKKN+4BbLNv9tf/UOmYBwqOE24H7AutY/1rmvctw4JYY3pCohEFIyL2pG3k61+4E7Ldv8xf7oHBIB4VDDVcCTwPa7q8bVzguMORLlYY4TvV1DUSCfT9xAejLVD8W/3PV0fOcI4BrLNl8ZlAP56gZLQDjUMAlYBnRcZhzU/tjIo08VKTnAV+k2jLMmoZ3xDbSJ4yBcg6gKoCJxaO3CbdyKXN6E++nGgUkApB5kdseKdWvd2HjgRMs2twzKkQyGQsB6QB9HMLis/riDNeWr2Nd4FwfXYcw+C+OyMxFHHDygfrl+F86S93FfW47qSvQrp4SBK3rap7St3tWCarZs88JBOdJr32AICIcapgOLqoTuaxw5FUMka4WjZbtlXxj/MBP/9TMh4Bu0YcqO4jz6MqklH/QjIJGGj4jytx7f9qcu4GrLNpcPtp3BErAVGPOrim+surC25hwt6e8zfkHpAjRJ4MG5GN87q6Qe2bgN9WUbMhpFq6lFHB5GO+awkrKpZ94m+ejLCBS4FJKtQAYcft62e/l/OV/WWLZ5gmdnMvBMQDjUMA9YUIeINo46p1Y4qcqiWCdAS4H/pdvRzplYUCU/34n78kc4yz5B7bIyhYCW1qEdMRbjvBPRLp2KduSYgm/dJctI3vECSqdEeNVIGXRMbP0wmYSbLNtc4smhXpMHQUAzUPemb2LLMSNHHKEli2Ucv0HNL65HXPDNXGE8Sc8NC3GXNqJQiH2sDJUGQoI+83QCT/64oE6+9Bei9z+Lnuo73gTSr/PG3i+23KCapWWbDZ4cysDTOjUcapgBjKwVvo5ja+uP0JLFpEmlqPy7aQXOq72dJGbch7O0EZRIOy8oWh2rzDZBZIKJ+/oqEnMehp7shgjtqrPwnzkJKfu2rdBSMK3ukFHA2HCoofS46wdeF+rzAOOiyvo4UtJ31lNCoI2ow7jhklxZNEHPzHuRO5oRvWFNgKirJHDtBQQW30HFnx4m8NxN+K88F/r0RPl/m4hf9nBBWeDB66CmBlSfsCuTBLWKusm+kUngRx59Sps00BAIhxoqgDbA/2HtSa2H6xVj+spIw6Fq4Z2I6cdmyxKz7kOu214oWBcg+NbDiDEjitqRa7cRn/MQIuVkyxTgO+8U/M9cnyt79k1ij7yCcHolcliWau++untjCghbtjnQ4gTw1gPOBowRwtd9uBEoch4h0MeOKXDeff6PyMbtBWJKdwg+fWdJ5wG0E8YTXDAX5eacEkDPn5uQ767Ilc2dgagLFUafjPQU38igDiFgsge/0u16kDkDcC/QRrkl471S+K6eVlCUXPDfhYs5BcY3GxCTx+WK1jaRevF9VHNbzphZk9FqKsgfYpqM4iwsTAoZZx5dcrMVEJo+VauAvGTMQPBCwCRA++vK6hiyH/FJ47OP8oM1yFhRuEY7+tDce1uE+MX/QureF0nMvh/iuZCinXwU+cNSKEiu+wq1aVeu7LRjShihQLlMSo/QQzz4lW7Pg8w4QByrVSdL0S6EQD9idPbdff1D0PU+QoCeo0S1RzMPLqotgkrkCBA1lfRtR+g67qvLsu/6aRP6MVVQi1RA3YBeZWB4kBkFGKOEv6KoRoGYMBpRX5Mtcta0IJwYiBy3AlAd0ey7dtQYjGunIVc0YcyejBhRna1zm3YiROFYE04M57M9WWO18aMRdVWozih9UScMAVQXVfQDLwRUA4kKoVUV1QjgsFzCV3XFUTv2FDjfC2d5E/68d//d3y+SUa2dyC++oih9KDTU1t25d11DHB5GrSsmIJju1IF9u5SDlyFgkM7dF+1olC7QjTwOIzHIC2MFsh3dOP/03D4bcu5+PpMzKIFYDyRzuoXhzy6g8qGnZx+9qKIfeOkBvfG0eAJQoNy8cBvwgSagaLWW9qtn0fu4HSl8s09HTD4q3Y1bO1GrttCzaCnyo/XFv34vfDroeb+XdIsjYc5IT2sA8EZAAhAuShmIgrElXInsyB3giPoaxEEjUXssSu2RhdBw31kBhsA3/qA0ATssUn9Yjlq5D+chvX7II0C2dRatHgFS6QCcKqroB14IsIH6pJIJQ/TtWQK1bW/6F9cECIH2V9W4LRFQxTb4fnIhxnXTESNyk6Z2ypEETrkR1WyRevpNnEXvg+qz71XAhLw1WGcMtbu9pLEJ5QLEPfiVbt+DTDMQaIVu1bdnCaAjgms2Z4uM70xGGX1m8doggadvxHf7pQXOF8iMDeOffzX++d9DVeUHHAmGhu+752RLnNUbEW6JXq4UXeknz+eKXgj4HAh+HNvmoFcWVUo9CJty6Tj9sm8jkon0CkYBPqh4az769BMLbe2MIjc3Q6JwX21cOZ3g83egMrl1pVWgjfShn5db/KgPPkHqJaKyXsGeHgvSexdP8ELAB4DxB5moTnfNQggk7ntrcwUVPvTTjkfpoJQicNV3EIfU5+pbu0jc/AyJqbeSOP9u4lNvpefu3xRMnNqp4/FNPQ6lK5TuYFzwrYI2ZeOXCIptQUk+VEmAlR78SrflQeYtwF3mRMIRp8sumtxUiuTb62BrS7Yo8O8/AkeBpqHfcXFOdP0m4rMeRv7PClQ0/cur9ijOomX0zHwMtu7MyvoX/hhcHc0nMG6bldOxahPOhmaQfecYQaNjsVkmosAfvbnvgQDLNqPAy0DVU9FtUaX3WWMoEErSc/uiXFl9HcEH5mL8zRm5hGjCIX71c8iWXRkOVVaBQJDa9DmJGxfndIQqMS46neCvb4GaYLY4ftdvEG6KopyEHuCJ7m0AL1m2WXoxUgKeUmLhUMNEYEO98MU/HXFqsDj+arhCUf3KLYiTjiupw12+jp4fPFEydAEoJRGaj8rPfgl1wZIy8qUPiN3zLFqflJISgpjrMLFzFcA4yzZ3DOhU1nIPsGyzCXijTaWCi2N7Y0rrOwNLdCmJ3fV7aOksbfzG3fs8LxRCA1yclZ+XFti8k9gTi9BkiUWecFkQ+xLSFyo8Ow/eU2KQTotxV2JL0HJcJ5vAyxohUFu2k5wxv3RDRx0CQYN0XkxlokTeMyDqqtFG1xd/HImRmPHPCNstToRIxSa3h2dTzQA3DMKfdJuDPBe4B7hvdkW9Wlh5lFBF2c30/sA493gCv/5penGUX90WwX33M+TyJuTOVlRXN6KuFm38QWhnH4sx7cSC8Q6guuP0XP447oYdCNct3isIOL9rLRtT0ZuHclo8lKOxBBBYXDlJTa2oFqKfczwxbjT+e69AP2fSYG3KwnltFamHlqBa7JL1Sih+H2vl5sSWrZZtHjmUNoZCwFzgPwWwJnwSI9wA/Z6NAfqcs/D/7BLEQSHPbajtLSQf/C3ue5/1LyRgu+rh7I5PAGZatvmG5wby1QzxePwt4IKLfGGeqGtAdwfQEfBhXDwFY9ZktJMmlDwrVJEY6uNNOK+uwHl99cBGSMn06DqanOjvLNu8dNBOZDBUAgJAK1CzIDiBOcGDEQPpydz5ESNr0CYciqipQAV0RMJBdcaRG3egov2fBhcYLRULU7vVo7EdrcBoyzaHfDNjf26ITAE+AlgbOpmQqEgfYHprNRMSRW5W93LBIv0FK2W3O6ezUQdOsGyzcbC252OIV7jAss0VwN0Av+xpRvoc7/eClCA7byjh2XkAdMHN3aYG3Ly/zkN5boltBBqeMY7j/LpKNOklxTAUuEhfDTdZ63lV7llq2ea55dA65B6QhysB5jnr6VAuw3X1Vhq1vNixilflHoAflkvvfhNg2eYnwG0Af9u1Gemvy6z3y0SEAoWi3a8zP9UF8BPLNncO9JlXlPOq7GvAzO/7qnik9jg0GQA8b8r6hyZIJl3OjnzKbpFcYtnm5fuvNE99GXXNBr5akoryUbwHpZeHWIVgfnIbu0VyW7mdhzISkInF5wJcEVtDxLBzG56hQAGa4N1UOy/0tNCru9woZw/Ass2NwM8B5lk7UY4BRVtnb1C6oLknwXWRDQA/tGxze9kMzUNZCQCwbPMBYMMKp5OnkrtRPq3fJMi+IH0VzI1uBPjUss0Xym1nL8pOQAbnAu6jiS9YG2tHDWoYCCQaD7StYYOKxhmmrt+LYSHAss0W4EKAWV1NRANVKGEwcGhUoFew1LV5NtUGMN2yzdIppjJhuHoAlm2+A8wHuK5jNSoZZ8AzS6HTnrS5LvI5pG+C/2W47OvFsBEAYNnmPcDHy1OdLHZ2ICtKnwr1wg2M4PKuNTioNy3bfHQ4bevFsBKQwQ8A/jGxl13xCIpS1z0VUhgssNfTlD58ufIA2AUcAAIyofGnABdFVpNUMVSfCxRK01mR+IpfxbcBzLVs0x5uu3pxIHoAlm0+CfyuTaa4v3szyhfKqxUoo5q/j20GeMGyzX3foigzhu2Pk6UQDjXsAg7915qjuUQbiaZpCBTXdG/ivVTbZss2jz5gxmRwQHpAHqYB3NK1iXaRwtU0no7v5r10yJu270+HBweUAMs2TeBnAA/GdrIp1c1jiZ0AV5RzizsYHNAh0ItwqGEb6fuHAI1D+aNDuXCgh0Avzst7/u7XZAPwNfUAgHCo4V4gYdnmI1+LARn8P0TdSRGR8ht7AAAAAElFTkSuQmCC";(function(r,t,e){function n(i,s){for(;(i=i.parentElement)&&!i.classList.contains(s););return i}L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(i,s){this._map=i,this._container=i._container,this._overlayPane=i._panes.overlayPane,this._popupPane=i._panes.popupPane,s&&s.shapeOptions&&(s.shapeOptions=L.Util.extend({},this.options.shapeOptions,s.shapeOptions)),L.setOptions(this,s);var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(L.DomUtil.disableTextSelection(),i.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(i){L.setOptions(this,i)},_fireCreatedEvent:function(i){this._map.fire(L.Draw.Event.CREATED,{layer:i,layerType:this.type})},_cancelDrawing:function(i){i.keyCode===27&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(i,s){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,s&&s.drawError&&(s.drawError=L.Util.extend({},this.options.drawError,s.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,i,s)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var i=this._markers.pop(),s=this._poly,a=s.getLatLngs(),h=a.splice(-1,1)[0];this._poly.setLatLngs(a),this._markerGroup.removeLayer(i),s.getLatLngs().length<2&&this._map.removeLayer(s),this._vertexChanged(h,!1)}},addVertex:function(i){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(i))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(i)),this._poly.addLatLng(i),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(i,!0)},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var i=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),s=this._poly.newLatLngIntersects(i[i.length-1]);if(!this.options.allowIntersection&&s||!this._shapeIsValid())return void this._showErrorTooltip();this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._markers!==null&&this._updateGuide()},_onMouseMove:function(i){var s=this._map.mouseEventToLayerPoint(i.originalEvent),a=this._map.layerPointToLatLng(s);this._currentLatLng=a,this._updateTooltip(a),this._updateGuide(s),this._mouseMarker.setLatLng(a),L.DomEvent.preventDefault(i.originalEvent)},_vertexChanged:function(i,s){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(i,s),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(i){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(i),this._clickHandled=!0,this._disableNewMarkers();var s=i.originalEvent,a=s.clientX,h=s.clientY;this._startPoint.call(this,a,h)}},_startPoint:function(i,s){this._mouseDownOrigin=L.point(i,s)},_onMouseUp:function(i){var s=i.originalEvent,a=s.clientX,h=s.clientY;this._endPoint.call(this,a,h,i),this._clickHandled=null},_endPoint:function(i,s,a){if(this._mouseDownOrigin){var h=L.point(i,s).distanceTo(this._mouseDownOrigin),c=this._calculateFinishDistance(a.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(a.latlng),this._finishShape()):c<10&&L.Browser.touch?this._finishShape():Math.abs(h)<9*(r.devicePixelRatio||1)&&this.addVertex(a.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(i){var s,a,h=i.originalEvent;!h.touches||!h.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(s=h.touches[0].clientX,a=h.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,s,a),this._endPoint.call(this,s,a,i),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(i){var s;if(this._markers.length>0){var a;if(this.type===L.Draw.Polyline.TYPE)a=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;a=this._markers[0]}var h=this._map.latLngToContainerPoint(a.getLatLng()),c=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),d=this._map.latLngToContainerPoint(c.getLatLng());s=h.distanceTo(d)}else s=1/0;return s},_updateFinishHandler:function(){var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_createMarker:function(i){var s=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(s),s},_updateGuide:function(i){var s=this._markers?this._markers.length:0;s>0&&(i=i||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[s-1].getLatLng()),i))},_updateTooltip:function(i){var s=this._getTooltipText();i&&this._tooltip.updatePosition(i),this._errorShown||this._tooltip.updateContent(s)},_drawGuide:function(i,s){var a,h,c,d=Math.floor(Math.sqrt(Math.pow(s.x-i.x,2)+Math.pow(s.y-i.y,2))),f=this.options.guidelineDistance,p=this.options.maxGuideLineLength,m=d>p?d-p:f;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));m<d;m+=this.options.guidelineDistance)a=m/d,h={x:Math.floor(i.x*(1-a)+a*s.x),y:Math.floor(i.y*(1-a)+a*s.y)},c=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer),c.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(c,h)},_updateGuideColor:function(i){if(this._guidesContainer)for(var s=0,a=this._guidesContainer.childNodes.length;s<a;s++)this._guidesContainer.childNodes[s].style.backgroundColor=i},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var i,s,a=this.options.showLength;return this._markers.length===0?i={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(s=a?this._getMeasurementString():"",i=this._markers.length===1?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:s}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:s}),i},_updateRunningMeasure:function(i,s){var a,h,c=this._markers.length;this._markers.length===1?this._measurementRunningTotal=0:(a=c-(s?2:1),h=L.GeometryUtil.isVersion07x()?i.distanceTo(this._markers[a].getLatLng())*(this.options.factor||1):this._map.distance(i,this._markers[a].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=h*(s?1:-1))},_getMeasurementString:function(){var i,s=this._currentLatLng,a=this._markers[this._markers.length-1].getLatLng();return i=L.GeometryUtil.isVersion07x()?a&&s&&s.distanceTo?this._measurementRunningTotal+s.distanceTo(a)*(this.options.factor||1):this._measurementRunningTotal||0:a&&s?this._measurementRunningTotal+this._map.distance(s,a)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(i,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout((function(){this._disableMarkers=!1}).bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var i=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(i,s){L.Draw.Polyline.prototype.initialize.call(this,i,s),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var i=this._markers.length;i===1&&this._markers[0].on("click",this._finishShape,this),i>2&&(this._markers[i-1].on("dblclick",this._finishShape,this),i>3&&this._markers[i-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var i,s;return this._markers.length===0?i=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(i=L.drawLocal.draw.handlers.polygon.tooltip.cont,s=this._getMeasurementString()):(i=L.drawLocal.draw.handlers.polygon.tooltip.end,s=this._getMeasurementString()),{text:i,subtext:s}},_getMeasurementString:function(){var i=this._area,s="";return i||this.options.showLength?(this.options.showLength&&(s=L.Draw.Polyline.prototype._getMeasurementString.call(this)),i&&(s+="<br>"+L.GeometryUtil.readableArea(i,this.options.metric,this.options.precision)),s):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(i,s){var a;!this.options.allowIntersection&&this.options.showArea&&(a=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(a)),L.Draw.Polyline.prototype._vertexChanged.call(this,i,s)},_cleanUpShape:function(){var i=this._markers.length;i>0&&(this._markers[0].off("click",this._finishShape,this),i>2&&this._markers[i-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(i,s){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,i,s)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),t.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(t,"mouseup",this._onMouseUp,this),L.DomEvent.off(t,"touchend",this._onMouseUp,this),t.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(i){this._isDrawing=!0,this._startLatLng=i.latlng,L.DomEvent.on(t,"mouseup",this._onMouseUp,this).on(t,"touchend",this._onMouseUp,this).preventDefault(i.originalEvent)},_onMouseMove:function(i){var s=i.latlng;this._tooltip.updatePosition(s),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(s))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(i,s){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,s)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(i){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!n(i.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(i){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,i)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,i),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_getTooltipText:function(){var i,s,a,h=L.Draw.SimpleShape.prototype._getTooltipText.call(this),c=this._shape,d=this.options.showArea;return c&&(i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),s=L.GeometryUtil.geodesicArea(i),a=d?L.GeometryUtil.readableArea(s,this.options.metric):""),{text:h.text,subtext:a}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(i,s){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,s)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(i){var s=i.latlng;this._tooltip.updatePosition(s),this._mouseMarker.setLatLng(s),this._marker?(s=this._mouseMarker.getLatLng(),this._marker.setLatLng(s)):(this._marker=this._createMarker(s),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(i){return new L.Marker(i,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(i){this._onMouseMove(i),this._onClick()},_fireCreatedEvent:function(){var i=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(i,s){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,s)},_fireCreatedEvent:function(){var i=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)},_createMarker:function(i){return new L.CircleMarker(i,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(i,s){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,s)},_drawShape:function(i){if(L.GeometryUtil.isVersion07x())var s=this._startLatLng.distanceTo(i);else var s=this._map.distance(this._startLatLng,i);this._shape?this._shape.setRadius(s):(this._shape=new L.Circle(this._startLatLng,s,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_onMouseMove:function(i){var s,a=i.latlng,h=this.options.showRadius,c=this.options.metric;if(this._tooltip.updatePosition(a),this._isDrawing){this._drawShape(a),s=this._shape.getRadius().toFixed(1);var d="";h&&(d=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(s,c,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:d})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(i,s){this._marker=i,L.setOptions(this,s)},addHooks:function(){var i=this._marker;i.dragging.enable(),i.on("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},removeHooks:function(){var i=this._marker;i.dragging.disable(),i.off("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},_onDragEnd:function(i){var s=i.target;s.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:s})},_toggleMarkerHighlight:function(){var i=this._marker._icon;i&&(i.style.display="none",L.DomUtil.hasClass(i,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,-4)):(L.DomUtil.addClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,4)),i.style.display="")},_offsetMarker:function(i,s){var a=parseInt(i.style.marginTop,10)-s,h=parseInt(i.style.marginLeft,10)-s;i.style.marginTop=a+"px",i.style.marginLeft=h+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(i){this.latlngs=[i._latlngs],i._holes&&(this.latlngs=this.latlngs.concat(i._holes)),this._poly=i,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(i){for(var s=0;s<this._verticesHandlers.length;s++)i(this._verticesHandlers[s])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(i){i.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(i){i.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(i){i.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var i=0;i<this.latlngs.length;i++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[i],this._poly.options.poly))},_updateLatLngs:function(i){this.latlngs=[i.layer._latlngs],i.layer._holes&&(this.latlngs=this.latlngs.concat(i.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(i,s,a){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=i,a&&a.drawError&&(a.drawError=L.Util.extend({},this.options.drawError,a.drawError)),this._latlngs=s,L.setOptions(this,a)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var i=this._poly,s=i._path;i instanceof L.Polygon||(i.options.fill=!1,i.options.editing&&(i.options.editing.fill=!1)),s&&i.options.editing&&i.options.editing.className&&(i.options.original.className&&i.options.original.className.split(" ").forEach(function(a){L.DomUtil.removeClass(s,a)}),i.options.editing.className.split(" ").forEach(function(a){L.DomUtil.addClass(s,a)})),i.setStyle(i.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var i=this._poly,s=i._path;s&&i.options.editing&&i.options.editing.className&&(i.options.editing.className.split(" ").forEach(function(a){L.DomUtil.removeClass(s,a)}),i.options.original.className&&i.options.original.className.split(" ").forEach(function(a){L.DomUtil.addClass(s,a)})),i.setStyle(i.options.original),i._map&&(i._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var i,s,a,h,c=this._defaultShape();for(i=0,a=c.length;i<a;i++)h=this._createMarker(c[i],i),h.on("click",this._onMarkerClick,this),h.on("contextmenu",this._onContextMenu,this),this._markers.push(h);var d,f;for(i=0,s=a-1;i<a;s=i++)(i!==0||L.Polygon&&this._poly instanceof L.Polygon)&&(d=this._markers[s],f=this._markers[i],this._createMiddleMarker(d,f),this._updatePrevNext(d,f))},_createMarker:function(i,s){var a=new L.Marker.Touch(i,{draggable:!0,icon:this.options.icon});return a._origLatLng=i,a._index=s,a.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(a),a},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var i=this._defaultShape(),s=[].splice.apply(i,arguments);return this._poly._convertLatLngs(i,!0),this._poly.redraw(),s},_removeMarker:function(i){var s=i._index;this._markerGroup.removeLayer(i),this._markers.splice(s,1),this._spliceLatLngs(s,1),this._updateIndexes(s,-1),i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(i){var s=i.target,a=this._poly,h=L.LatLngUtil.cloneLatLng(s._origLatLng);if(L.extend(s._origLatLng,s._latlng),a.options.poly){var c=a._map._editTooltip;if(!a.options.poly.allowIntersection&&a.intersects()){L.extend(s._origLatLng,h),s.setLatLng(h);var d=a.options.color;a.setStyle({color:this.options.drawError.color}),c&&c.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){a.setStyle({color:d}),c&&c.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}s._middleLeft&&s._middleLeft.setLatLng(this._getMiddleLatLng(s._prev,s)),s._middleRight&&s._middleRight.setLatLng(this._getMiddleLatLng(s,s._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var f=this._poly.getLatLngs();this._poly._convertLatLngs(f,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(i){var s=L.Polygon&&this._poly instanceof L.Polygon?4:3,a=i.target;this._defaultShape().length<s||(this._removeMarker(a),this._updatePrevNext(a._prev,a._next),a._middleLeft&&this._markerGroup.removeLayer(a._middleLeft),a._middleRight&&this._markerGroup.removeLayer(a._middleRight),a._prev&&a._next?this._createMiddleMarker(a._prev,a._next):a._prev?a._next||(a._prev._middleRight=null):a._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(i){var s=i.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:s,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(i){var s=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),a=this._map.layerPointToLatLng(s),h=i.target;L.extend(h._origLatLng,a),h._middleLeft&&h._middleLeft.setLatLng(this._getMiddleLatLng(h._prev,h)),h._middleRight&&h._middleRight.setLatLng(this._getMiddleLatLng(h,h._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(i,s){this._markerGroup.eachLayer(function(a){a._index>i&&(a._index+=s)})},_createMiddleMarker:function(i,s){var a,h,c,d=this._getMiddleLatLng(i,s),f=this._createMarker(d);f.setOpacity(.6),i._middleRight=s._middleLeft=f,h=function(){f.off("touchmove",h,this);var p=s._index;f._index=p,f.off("click",a,this).on("click",this._onMarkerClick,this),d.lat=f.getLatLng().lat,d.lng=f.getLatLng().lng,this._spliceLatLngs(p,0,d),this._markers.splice(p,0,f),f.setOpacity(1),this._updateIndexes(p,1),s._index++,this._updatePrevNext(i,f),this._updatePrevNext(f,s),this._poly.fire("editstart")},c=function(){f.off("dragstart",h,this),f.off("dragend",c,this),f.off("touchmove",h,this),this._createMiddleMarker(i,f),this._createMiddleMarker(f,s)},a=function(){h.call(this),c.call(this),this._fireEdit()},f.on("click",a,this).on("dragstart",h,this).on("dragend",c,this).on("touchmove",h,this),this._markerGroup.addLayer(f)},_updatePrevNext:function(i,s){i&&(i._next=s),s&&(s._prev=i)},_getMiddleLatLng:function(i,s){var a=this._poly._map,h=a.project(i.getLatLng()),c=a.project(s.getLatLng());return a.unproject(h._add(c)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(i,s){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=i,L.Util.setOptions(this,s)},addHooks:function(){var i=this._shape;this._shape._map&&(this._map=this._shape._map,i.setStyle(i.options.editing),i._map&&(this._map=i._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var i=this._shape;if(i.setStyle(i.options.original),i._map){this._unbindMarker(this._moveMarker);for(var s=0,a=this._resizeMarkers.length;s<a;s++)this._unbindMarker(this._resizeMarkers[s]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(i,s){var a=new L.Marker.Touch(i,{draggable:!0,icon:s,zIndexOffset:10});return this._bindMarker(a),this._markerGroup.addLayer(a),a},_bindMarker:function(i){i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(i){i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(i){i.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(i){var s=i.target,a=s.getLatLng();s===this._moveMarker?this._move(a):this._resize(a),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(i){i.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(i){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i),typeof this._getCorners=="function"){var s=this._getCorners(),a=i.target,h=a._cornerIndex;a.setOpacity(0),this._oppositeCorner=s[(h+2)%4],this._toggleCornerMarkers(0,h)}this._shape.fire("editstart")},_onTouchMove:function(i){var s=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),a=this._map.layerPointToLatLng(s);return i.target===this._moveMarker?this._move(a):this._resize(a),this._shape.redraw(),!1},_onTouchEnd:function(i){i.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getBounds(),s=i.getCenter();this._moveMarker=this._createMarker(s,this.options.moveIcon)},_createResizeMarker:function(){var i=this._getCorners();this._resizeMarkers=[];for(var s=0,a=i.length;s<a;s++)this._resizeMarkers.push(this._createMarker(i[s],this.options.resizeIcon)),this._resizeMarkers[s]._cornerIndex=s},_onMarkerDragStart:function(i){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i);var s=this._getCorners(),a=i.target,h=a._cornerIndex;this._oppositeCorner=s[(h+2)%4],this._toggleCornerMarkers(0,h)},_onMarkerDragEnd:function(i){var s,a,h=i.target;h===this._moveMarker&&(s=this._shape.getBounds(),a=s.getCenter(),h.setLatLng(a)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,i)},_move:function(i){for(var s,a=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),h=this._shape.getBounds(),c=h.getCenter(),d=[],f=0,p=a.length;f<p;f++)s=[a[f].lat-c.lat,a[f].lng-c.lng],d.push([i.lat+s[0],i.lng+s[1]]);this._shape.setLatLngs(d),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(i){var s;this._shape.setBounds(L.latLngBounds(i,this._oppositeCorner)),s=this._shape.getBounds(),this._moveMarker.setLatLng(s.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var i=this._shape.getBounds();return[i.getNorthWest(),i.getNorthEast(),i.getSouthEast(),i.getSouthWest()]},_toggleCornerMarkers:function(i){for(var s=0,a=this._resizeMarkers.length;s<a;s++)this._resizeMarkers[s].setOpacity(i)},_repositionCornerMarkers:function(){for(var i=this._getCorners(),s=0,a=this._resizeMarkers.length;s<a;s++)this._resizeMarkers[s].setLatLng(i[s])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getLatLng();this._moveMarker=this._createMarker(i,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(i){if(this._resizeMarkers.length){var s=this._getResizeMarkerPoint(i);this._resizeMarkers[0].setLatLng(s)}this._shape.setLatLng(i),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var i=this._shape.getLatLng(),s=this._getResizeMarkerPoint(i);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(s,this.options.resizeIcon))},_getResizeMarkerPoint:function(i){var s=this._shape._radius*Math.cos(Math.PI/4),a=this._map.project(i);return this._map.unproject([a.x+s,a.y-s])},_resize:function(i){var s=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=s.distanceTo(i):radius=this._map.distance(s,i),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(i){this._map=i,this._container=i._container,this._pane=i._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(i,s){var a={};if(i.touches!==void 0){if(!i.touches.length)return;a=i.touches[0]}else if(i.pointerType!=="touch"||(a=i,!this._filterClick(i)))return;var h=this._map.mouseEventToContainerPoint(a),c=this._map.mouseEventToLayerPoint(a),d=this._map.layerPointToLatLng(c);this._map.fire(s,{latlng:d,layerPoint:c,containerPoint:h,pageX:a.pageX,pageY:a.pageY,originalEvent:i})},_filterClick:function(i){var s=i.timeStamp||i.originalEvent.timeStamp,a=L.DomEvent._lastClick&&s-L.DomEvent._lastClick;return a&&a>100&&a<500||i.target._simulatedClick&&!i._simulated?(L.DomEvent.stop(i),!1):(L.DomEvent._lastClick=s,!0)},_onTouchStart:function(i){this._map._loaded&&this._touchEvent(i,"touchstart")},_onTouchEnd:function(i){this._map._loaded&&this._touchEvent(i,"touchend")},_onTouchCancel:function(i){if(this._map._loaded){var s="touchcancel";this._detectIE()&&(s="pointercancel"),this._touchEvent(i,s)}},_onTouchLeave:function(i){this._map._loaded&&this._touchEvent(i,"touchleave")},_onTouchMove:function(i){this._map._loaded&&this._touchEvent(i,"touchmove")},_detectIE:function(){var i=r.navigator.userAgent,s=i.indexOf("MSIE ");if(s>0)return parseInt(i.substring(s+5,i.indexOf(".",s)),10);if(i.indexOf("Trident/")>0){var a=i.indexOf("rv:");return parseInt(i.substring(a+3,i.indexOf(".",a)),10)}var h=i.indexOf("Edge/");return h>0&&parseInt(i.substring(h+5,i.indexOf(".",h)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var i=this._icon,s=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?s.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):s.concat(["touchcancel"]),L.DomUtil.addClass(i,"leaflet-clickable"),L.DomEvent.on(i,"click",this._onMouseClick,this),L.DomEvent.on(i,"keypress",this._onKeyPress,this);for(var a=0;a<s.length;a++)L.DomEvent.on(i,s[a],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var i=r.navigator.userAgent,s=i.indexOf("MSIE ");if(s>0)return parseInt(i.substring(s+5,i.indexOf(".",s)),10);if(i.indexOf("Trident/")>0){var a=i.indexOf("rv:");return parseInt(i.substring(a+3,i.indexOf(".",a)),10)}var h=i.indexOf("Edge/");return h>0&&parseInt(i.substring(h+5,i.indexOf(".",h)),10)}}),L.LatLngUtil={cloneLatLngs:function(i){for(var s=[],a=0,h=i.length;a<h;a++)Array.isArray(i[a])?s.push(L.LatLngUtil.cloneLatLngs(i[a])):s.push(this.cloneLatLng(i[a]));return s},cloneLatLng:function(i){return L.latLng(i.lat,i.lng)}},function(){var i={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(s){var a,h,c=s.length,d=0,f=Math.PI/180;if(c>2){for(var p=0;p<c;p++)a=s[p],h=s[(p+1)%c],d+=(h.lng-a.lng)*f*(2+Math.sin(a.lat*f)+Math.sin(h.lat*f));d=6378137*d*6378137/2}return Math.abs(d)},formattedNumber:function(s,a){var h=parseFloat(s).toFixed(a),c=L.drawLocal.format&&L.drawLocal.format.numeric,d=c&&c.delimiters,f=d&&d.thousands,p=d&&d.decimal;if(f||p){var m=h.split(".");h=f?m[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f):m[0],p=p||".",m.length>1&&(h=h+p+m[1])}return h},readableArea:function(s,a,f){var c,d,f=L.Util.extend({},i,f);return a?(d=["ha","m"],type=typeof a,type==="string"?d=[a]:type!=="boolean"&&(d=a),c=s>=1e6&&d.indexOf("km")!==-1?L.GeometryUtil.formattedNumber(1e-6*s,f.km)+" km²":s>=1e4&&d.indexOf("ha")!==-1?L.GeometryUtil.formattedNumber(1e-4*s,f.ha)+" ha":L.GeometryUtil.formattedNumber(s,f.m)+" m²"):(s/=.836127,c=s>=3097600?L.GeometryUtil.formattedNumber(s/3097600,f.mi)+" mi²":s>=4840?L.GeometryUtil.formattedNumber(s/4840,f.ac)+" acres":L.GeometryUtil.formattedNumber(s,f.yd)+" yd²"),c},readableDistance:function(s,a,h,c,p){var f,p=L.Util.extend({},i,p);switch(a?typeof a=="string"?a:"metric":h?"feet":c?"nauticalMile":"yards"){case"metric":f=s>1e3?L.GeometryUtil.formattedNumber(s/1e3,p.km)+" km":L.GeometryUtil.formattedNumber(s,p.m)+" m";break;case"feet":s*=3.28083,f=L.GeometryUtil.formattedNumber(s,p.ft)+" ft";break;case"nauticalMile":s*=.53996,f=L.GeometryUtil.formattedNumber(s/1e3,p.nm)+" nm";break;case"yards":default:s*=1.09361,f=s>1760?L.GeometryUtil.formattedNumber(s/1760,p.mi)+" miles":L.GeometryUtil.formattedNumber(s,p.yd)+" yd"}return f},isVersion07x:function(){var s=L.version.split(".");return parseInt(s[0],10)===0&&parseInt(s[1],10)===7}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(i,s,a,h){return this._checkCounterclockwise(i,a,h)!==this._checkCounterclockwise(s,a,h)&&this._checkCounterclockwise(i,s,a)!==this._checkCounterclockwise(i,s,h)},_checkCounterclockwise:function(i,s,a){return(a.y-i.y)*(s.x-i.x)>(s.y-i.y)*(a.x-i.x)}}),L.Polyline.include({intersects:function(){var i,s,a,h=this._getProjectedPoints(),c=h?h.length:0;if(this._tooFewPointsForIntersection())return!1;for(i=c-1;i>=3;i--)if(s=h[i-1],a=h[i],this._lineSegmentsIntersectsRange(s,a,i-2))return!0;return!1},newLatLngIntersects:function(i,s){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(i),s)},newPointIntersects:function(i,s){var a=this._getProjectedPoints(),h=a?a.length:0,c=a?a[h-1]:null,d=h-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(c,i,d,s?1:0)},_tooFewPointsForIntersection:function(i){var s=this._getProjectedPoints(),a=s?s.length:0;return a+=i||0,!s||a<=3},_lineSegmentsIntersectsRange:function(i,s,a,h){var c,d,f=this._getProjectedPoints();h=h||0;for(var p=a;p>h;p--)if(c=f[p-1],d=f[p],L.LineUtil.segmentsIntersect(i,s,c,d))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var i=[],s=this._defaultShape(),a=0;a<s.length;a++)i.push(this._map.latLngToLayerPoint(s[a]));return i}}),L.Polygon.include({intersects:function(){var i,s,a,h,c=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(i=c.length,s=c[0],a=c[i-1],h=i-2,this._lineSegmentsIntersectsRange(a,s,h,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(i){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,i);var s;this._toolbars={},L.DrawToolbar&&this.options.draw&&(s=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=s,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(s=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=s,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(i){var s,a=L.DomUtil.create("div","leaflet-draw"),h=!1;for(var c in this._toolbars)this._toolbars.hasOwnProperty(c)&&(s=this._toolbars[c].addToolbar(i))&&(h||(L.DomUtil.hasClass(s,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(s.childNodes[0],"leaflet-draw-toolbar-top"),h=!0),a.appendChild(s));return a},onRemove:function(){for(var i in this._toolbars)this._toolbars.hasOwnProperty(i)&&this._toolbars[i].removeToolbar()},setDrawingOptions:function(i){for(var s in this._toolbars)this._toolbars[s]instanceof L.DrawToolbar&&this._toolbars[s].setOptions(i)},_toolbarEnabled:function(i){var s=i.target;for(var a in this._toolbars)this._toolbars[a]!==s&&this._toolbars[a].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(i){L.setOptions(this,i),this._modes={},this._actionButtons=[],this._activeMode=null;var s=L.version.split(".");parseInt(s[0],10)===1&&parseInt(s[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return this._activeMode!==null},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(i){var s,a=L.DomUtil.create("div","leaflet-draw-section"),h=0,c=this._toolbarClass||"",d=this.getModeHandlers(i);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=i,s=0;s<d.length;s++)d[s].enabled&&this._initModeHandler(d[s].handler,this._toolbarContainer,h++,c,d[s].title);if(h)return this._lastButtonIndex=--h,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),a.appendChild(this._toolbarContainer),a.appendChild(this._actionsContainer),a},removeToolbar:function(){for(var i in this._modes)this._modes.hasOwnProperty(i)&&(this._disposeButton(this._modes[i].button,this._modes[i].handler.enable,this._modes[i].handler),this._modes[i].handler.disable(),this._modes[i].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var s=0,a=this._actionButtons.length;s<a;s++)this._disposeButton(this._actionButtons[s].button,this._actionButtons[s].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(i,s,a,h,c){var d=i.type;this._modes[d]={},this._modes[d].handler=i,this._modes[d].button=this._createButton({type:d,title:c,className:h+"-"+d,container:s,callback:this._modes[d].handler.enable,context:this._modes[d].handler}),this._modes[d].buttonIndex=a,this._modes[d].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!r.MSStream},_createButton:function(i){var s=L.DomUtil.create("a",i.className||"",i.container),a=L.DomUtil.create("span","sr-only",i.container);s.href="#",s.appendChild(a),i.title&&(s.title=i.title,a.innerHTML=i.title),i.text&&(s.innerHTML=i.text,a.innerHTML=i.text);var h=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(s,"click",L.DomEvent.stopPropagation).on(s,"mousedown",L.DomEvent.stopPropagation).on(s,"dblclick",L.DomEvent.stopPropagation).on(s,"touchstart",L.DomEvent.stopPropagation).on(s,"click",L.DomEvent.preventDefault).on(s,h,i.callback,i.context),s},_disposeButton:function(i,s){var a=this._detectIOS()?"touchstart":"click";L.DomEvent.off(i,"click",L.DomEvent.stopPropagation).off(i,"mousedown",L.DomEvent.stopPropagation).off(i,"dblclick",L.DomEvent.stopPropagation).off(i,"touchstart",L.DomEvent.stopPropagation).off(i,"click",L.DomEvent.preventDefault).off(i,a,s)},_handlerActivated:function(i){this.disable(),this._activeMode=this._modes[i.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(i){var s,a,h,c,d=this._actionsContainer,f=this.getActions(i),p=f.length;for(a=0,h=this._actionButtons.length;a<h;a++)this._disposeButton(this._actionButtons[a].button,this._actionButtons[a].callback);for(this._actionButtons=[];d.firstChild;)d.removeChild(d.firstChild);for(var m=0;m<p;m++)"enabled"in f[m]&&!f[m].enabled||(s=L.DomUtil.create("li","",d),c=this._createButton({title:f[m].title,text:f[m].text,container:s,callback:f[m].callback,context:f[m].context}),this._actionButtons.push({button:c,callback:f[m].callback}))},_showActionsToolbar:function(){var i=this._activeMode.buttonIndex,s=this._lastButtonIndex,a=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=a+"px",i===0&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),i===s&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(i){this._map=i,this._popupPane=i._panes.popupPane,this._visible=!1,this._container=i.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(i){return this._container?(i.subtext=i.subtext||"",i.subtext.length!==0||this._singleLineLabel?i.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(i.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+i.subtext+"</span><br />":"")+"<span>"+i.text+"</span>",i.text||i.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(i){var s=this._map.latLngToLayerPoint(i),a=this._container;return this._container&&(this._visible&&(a.style.visibility="inherit"),L.DomUtil.setPosition(a,s)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(i){for(var s in this.options)this.options.hasOwnProperty(s)&&i[s]&&(i[s]=L.extend({},this.options[s],i[s]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,i)},getModeHandlers:function(i){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(i,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(i,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(i,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(i,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(i,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(i,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(i){return[{enabled:i.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:i.completeShape,context:i},{enabled:i.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:i.deleteLastVertex,context:i},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(i){L.setOptions(this,i);for(var s in this._modes)this._modes.hasOwnProperty(s)&&i.hasOwnProperty(s)&&this._modes[s].handler.setOptions(i[s])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(i){i.edit&&(i.edit.selectedPathOptions===void 0&&(i.edit.selectedPathOptions=this.options.edit.selectedPathOptions),i.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,i.edit.selectedPathOptions)),i.remove&&(i.remove=L.extend({},this.options.remove,i.remove)),i.poly&&(i.poly=L.extend({},this.options.poly,i.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,i),this._selectedFeatureCount=0},getModeHandlers:function(i){var s=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(i,{featureGroup:s,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(i,{featureGroup:s}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(i){var s=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return i.removeAllLayers&&s.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),s},addToolbar:function(i){var s=L.Toolbar.prototype.addToolbar.call(this,i);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),s},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var i,s=this.options.featureGroup,a=s.getLayers().length!==0;this.options.edit&&(i=this._modes[L.EditToolbar.Edit.TYPE].button,a?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",a?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(i=this._modes[L.EditToolbar.Delete.TYPE].button,a?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",a?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(i,s){if(L.Handler.prototype.initialize.call(this,i),L.setOptions(this,s),this._featureGroup=s.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),i._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(i){this._revertLayer(i)},this)},save:function(){var i=new L.LayerGroup;this._featureGroup.eachLayer(function(s){s.edited&&(i.addLayer(s),s.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:i})},_backupLayer:function(i){var s=L.Util.stamp(i);this._uneditedLayerProps[s]||(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?this._uneditedLayerProps[s]={latlngs:L.LatLngUtil.cloneLatLngs(i.getLatLngs())}:i instanceof L.Circle?this._uneditedLayerProps[s]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng()),radius:i.getRadius()}:(i instanceof L.Marker||i instanceof L.CircleMarker)&&(this._uneditedLayerProps[s]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(i){var s=L.Util.stamp(i);i.edited=!1,this._uneditedLayerProps.hasOwnProperty(s)&&(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?i.setLatLngs(this._uneditedLayerProps[s].latlngs):i instanceof L.Circle?(i.setLatLng(this._uneditedLayerProps[s].latlng),i.setRadius(this._uneditedLayerProps[s].radius)):(i instanceof L.Marker||i instanceof L.CircleMarker)&&i.setLatLng(this._uneditedLayerProps[s].latlng),i.fire("revert-edited",{layer:i}))},_enableLayerEdit:function(i){var s,a,h=i.layer||i.target||i;this._backupLayer(h),this.options.poly&&(a=L.Util.extend({},this.options.poly),h.options.poly=a),this.options.selectedPathOptions&&(s=L.Util.extend({},this.options.selectedPathOptions),s.maintainColor&&(s.color=h.options.color,s.fillColor=h.options.fillColor),h.options.original=L.extend({},h.options),h.options.editing=s),h instanceof L.Marker?(h.editing&&h.editing.enable(),h.dragging.enable(),h.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):h.editing.enable()},_disableLayerEdit:function(i){var s=i.layer||i.target||i;s.edited=!1,s.editing&&s.editing.disable(),delete s.options.editing,delete s.options.original,this._selectedPathOptions&&(s instanceof L.Marker?this._toggleMarkerHighlight(s):(s.setStyle(s.options.previousOptions),delete s.options.previousOptions)),s instanceof L.Marker?(s.dragging.disable(),s.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):s.editing.disable()},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_onMarkerDragEnd:function(i){var s=i.target;s.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:s})},_onTouchMove:function(i){var s=i.originalEvent.changedTouches[0],a=this._map.mouseEventToLayerPoint(s),h=this._map.layerPointToLatLng(a);i.target.setLatLng(h)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(i,s){if(L.Handler.prototype.initialize.call(this,i),L.Util.setOptions(this,s),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(i){this._deletableLayers.addLayer(i),i.fire("revert-deleted",{layer:i})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(i){this._removeLayer({layer:i})},this),this.save()},_enableLayerDelete:function(i){(i.layer||i.target||i).on("click",this._removeLayer,this)},_disableLayerDelete:function(i){var s=i.layer||i.target||i;s.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(s)},_removeLayer:function(i){var s=i.layer||i.target||i;this._deletableLayers.removeLayer(s),this._deletedLayers.addLayer(s),s.fire("deleted")},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document);const ib="";var op={draw:{toolbar:{actions:{title:"መሳል ተው",text:"ተው"},finish:{title:"መሳል ጨርስ",text:"ጨርስ"},undo:{title:"መጨረሻ የተሳለውን ነጥብ አጥፋ",text:"መጨረሻ የተሳለውን ነጥብ አጥፋ"},buttons:{polyline:"ፖሊላየን ሳል",polygon:"ፖሊጎን ሳል",rectangle:"አራት መአዘን ሳል",circle:"ክብ ሳል",marker:"ምልክት ሳል",circlemarker:"ክብ ምልክት ሳል"}},handlers:{circle:{tooltip:{start:"ክብ ለመሳል ተጭንው ይጎትቱ"},radius:"ራዲየስ"},circlemarker:{tooltip:{start:"ክብ ምልክት ለመሳል ካርታውን ይጫኑ ይጎትቱ"}},marker:{tooltip:{start:"ምልክት ለመሳል ካርታውን ይጫኑ ይጎትቱ"}},polygon:{tooltip:{start:"ቅርጽን ለመሳል ካርታውን ተጭነው ይጎትቱ",cont:"ቅርጽን መሳሎን ለመቀጠል ይጫኑ",end:"ቅርጽን ስሎ ለመጨረስ የመጀመሪያውን ነጥብ ይጫኑ"}},polyline:{error:"<strong>ስህተት:</strong> መስመሮች እርስ በእርስ መተላለፍ አይችሉም!",tooltip:{start:"መስመር ለመሳል ካርታውን ተጭነው ይጎትቱ",cont:"መስመር መሳሎን ለመቀጠል ይጫኑ",end:"መስመር ስሎ ለመጨረስ የመጨረሻውን ነጥብ ይጫኑ"}},rectangle:{tooltip:{start:"ዐራት መአዝን ለመሳል ካርታውን ይጫኑ ይጎትቱ"}},simpleshape:{tooltip:{end:"ስለው ለመጨረስ አይጤን ይልቀቁ"}}}},edit:{toolbar:{actions:{save:{title:"ለውጦቹን አኑር",text:"አኑር"},cancel:{title:"ማስተካከሉን ተው፣ ሁሉንም ለውጦች ሰርዝ",text:"ተው"},clearAll:{title:"ሁሉንም የካርታ ገጾች አጥፋ",text:"ሁሉንም አጥፋ"}},buttons:{edit:"የካርታ ገጽ አስተካክል",editDisabled:"የሚስተካከል የካርታ ገጽ የለም",remove:"የካርታ ገጽ ሰርዝ.",removeDisabled:"የሚሰረዝ የካርታ ገጽ የለም"}},handlers:{edit:{tooltip:{text:"ለማስተካከል ምልክቱን ወይም መያዣውን ይጎትቱ",subtext:"ለውጥጡን ለመተው ተው የሚለውን ይጫኑ"}},remove:{tooltip:{text:"ማጥፋት የፈለጉትን ይጫኑ"}}}}},ap={draw:{toolbar:{actions:{title:"Zrušit kreslení",text:"Zrušit"},finish:{title:"Dokončit kreslení",text:"Dokončit"},undo:{title:"Smazat poslední nakreslený bod",text:"Smazat poslední bod"},buttons:{polyline:"Nakreslit mnohoúhelník",polygon:"Nakreslit polygon",rectangle:"Nakreslit obdélník",circle:"Nakreslit kruh",marker:"Nakreslit značku",circlemarker:"Nakreslit kruhovou značku"}},handlers:{circle:{tooltip:{start:"Kliknout a táhnout pro nakreslení kruhu."},radius:"Poloměr"},circlemarker:{tooltip:{start:"Kliknout do mapy pro umístění kruhové značky."}},marker:{tooltip:{start:"Kliknout do mapy pro umístění značky."}},polygon:{tooltip:{start:"Kliknout pro začátek kreslení tvaru.",cont:"Kliknout pro pokračování v kreslení tvaru.",end:"Kliknout na pvní bod k uzavření tvaru."}},polyline:{error:"<strong>Chyba:</strong> hrany tvaru se nemohou protínat!",tooltip:{start:"Kliknout pro začátek kreslení úsečky.",cont:"Kliknout pro pokračování v kreslení úsečky.",end:"Kliknout na koncový bod k ukončení kreslení úsečky."}},rectangle:{tooltip:{start:"Kliknout a táhnout k nakreslení obdélníku."}},simpleshape:{tooltip:{end:"Pustit myš k dokončení kreslení."}}}},edit:{toolbar:{actions:{save:{title:"Uložit změny.",text:"Uložit"},cancel:{title:"Zrušit úpravu, zruší všechny změny.",text:"Zrušit"},clearAll:{title:"Vymazat všechny vrstvy.",text:"Vymazat vše"}},buttons:{edit:"Upravit vrstvy.",editDisabled:"Žádné vrstvy k úpravě.",remove:"Vymazat vrstvy.",removeDisabled:"Žádná vrstva k vymazání."}},handlers:{edit:{tooltip:{text:"Táhnout za úchopy pro editaci tvaru.",subtext:"Kliknutím na zrušit vrátite změny."}},remove:{tooltip:{text:"Kliknout na tvar pro smazání"}}}}},lp={draw:{toolbar:{actions:{title:"Zeichnung abbrechen",text:"Abbrechen"},finish:{title:"Zeichnung fertigstellen",text:"Fertigstellen"},undo:{title:"Lösche den zuletzt gezeichneten Punkt",text:"Letzter Punkt löschen"},buttons:{polyline:"Zeichne eine Linie",polygon:"Zeichne ein Polygon",rectangle:"Zeichne ein Rechteck",circle:"Zeichne einen Kreis",marker:"Zeichne einen Marker",circlemarker:"Zeichne einen Kreis-Marker"}},handlers:{circle:{tooltip:{start:"Klicken und ziehen um einen Kreis zu zeichnen."},radius:"Radius"},circlemarker:{tooltip:{start:"Karte anklicken um einen Kreis-Marker zu platzieren."}},marker:{tooltip:{start:"Karte anklicken um einen Marker zu platzieren."}},polygon:{tooltip:{start:"Klicken um mit dem Zeichnen einer Form zu beginnen.",cont:"Klicken um mit dem Zeichnen dieser Form fortzufahren.",end:"Erster Punkt anklicken um diese Form abzuschliessen."}},polyline:{error:"<strong>Fehler:</strong> Form-Ecken dürfen sich nicht überschneiden!",tooltip:{start:"Klicken um mit dem Zeichnen einer Linie zu beginnen.",cont:"Klicken um mit dem Zeichnen dieser Linie fortzufahren.",end:"Erster Punkt anklicken um diese Linie abzuschliessen."}},rectangle:{tooltip:{start:"Klicken und ziehen um ein Rechteck zu zeichnen."}},simpleshape:{tooltip:{end:"Maustaste loslassen um die Zeichnung fertigzustellen."}}}},edit:{toolbar:{actions:{save:{title:"Speichere Änderungen.",text:"Speichern"},cancel:{title:"Bearbeitung abbrechen, alle Änderungen verwerfen.",text:"Abbrechen"},clearAll:{title:"Alle Layer bereinigen.",text:"Alles bereinigen"}},buttons:{edit:"Layer bearbeiten.",editDisabled:"Keine Layer zum bearbeiten.",remove:"Layer löschen.",removeDisabled:"Keine Layer zum löschen."}},handlers:{edit:{tooltip:{text:"Ziehe den Griff oder den Marker um die Eigenschaft zu bearbeiten.",subtext:"Klicke abbrechen um Änderungen rückgängig zu machen."}},remove:{tooltip:{text:"Klicke auf eine Eigenschaft um diese zu entfernen."}}}}},ic={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes.",text:"Save"},cancel:{title:"Cancel editing, discards all changes.",text:"Cancel"},clearAll:{title:"Clear all layers.",text:"Clear All"}},buttons:{edit:"Edit layers.",editDisabled:"No layers to edit.",remove:"Delete layers.",removeDisabled:"No layers to delete."}},handlers:{edit:{tooltip:{text:"Drag handles, or marker to edit feature.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove"}}}}},hp={draw:{toolbar:{actions:{title:"Cancelar dibujo",text:"Cancelar"},finish:{title:"Terminar dibujo",text:"Terminar"},undo:{title:"Eliminar último punto dibujado",text:"Eliminar último punto"},buttons:{polyline:"Dibujar una polilínea",polygon:"Dibujar un polígono",rectangle:"Dibujar un rectángulo",circle:"Dibujar un círculo",marker:"Dibujar un marcador",circlemarker:"Dibujar un marcador circular"}},handlers:{circle:{tooltip:{start:"Haz click y arrastra para dibujar un círculo"},radius:"Radio"},circlemarker:{tooltip:{start:"Haz click en el mapa para situar el marcador circular"}},marker:{tooltip:{start:"Haz click en el mapa para situar el marcador"}},polygon:{tooltip:{start:"Haz click para empezar a dibujar la forma",cont:"Haz click para continuar dibujando la forma",end:"Haz click en el primer punto para cerrar la forma"}},polyline:{error:"<strong>Error:</strong> las líneas no deben cruzarse",tooltip:{start:"Haz click para empezar a dibujar la línea",cont:"Haz click para continuar dibujando la línea",end:"Haz click en el último punto para terminar la línea"}},rectangle:{tooltip:{start:"Haz click y arrastra para dibujar un rectángulo"}},simpleshape:{tooltip:{end:"Suelta el ratón para terminar de dibujar"}}}},edit:{toolbar:{actions:{save:{title:"Guardar los cambios",text:"Guardar"},cancel:{title:"Cancelar la edición, descarta todos los cambios",text:"Cancelar"},clearAll:{title:"Limpiar todas las capas",text:"Limpiar todo"}},buttons:{edit:"Editar capas",editDisabled:"No hay capas que editar",remove:"Eliminar capas",removeDisabled:"No hay capas que eliminar"}},handlers:{edit:{tooltip:{text:"Arrastra el marcador para editar la forma",subtext:"Haz click en cancelar para deshacer los cambios"}},remove:{tooltip:{text:"Haz click en una forma para eliminarla"}}}}},cp={draw:{toolbar:{actions:{title:"Peru piirustus",text:"Peru"},finish:{title:"Hyväksy piirustus",text:"Hyväksy"},undo:{title:"Poista viimeinen piirretty piste",text:"Poista viimeinen piste"},buttons:{polyline:"Piirrä murtoviiva",polygon:"Piirrä monikulmio",rectangle:"Piirrä suorakulmio",circle:"Piirrä ympyrä",marker:"Piirrä merkki",circlemarker:"Piirrä piirimerkki"}},handlers:{circle:{tooltip:{start:"Piirrä ympyrä pitämällä hiiri painettuna ja vetämällä."},radius:"Säde"},circlemarker:{tooltip:{start:"Aseta ympyrämerkki painamalla karttaa."}},marker:{tooltip:{start:"Aseta markkeri painamalla karttaa."}},polygon:{tooltip:{start:"Paina aloittaaksesi muodon piirtämisen.",cont:"Paina jatkaaksesi muodon piirtämistä.",end:"Sulje muoto painamalla ensimmäistä pistettä."}},polyline:{error:"<strong>Virhe:</strong> muodon reunaa ei voi ylittää!",tooltip:{start:"Paina aloittaaksesi viivan piirtämisen.",cont:"Paina jatkaaksesi viivan piirtämistä.",end:"Paina viimeistä pistettä päättäksesi viiva."}},rectangle:{tooltip:{start:"Piirrä suorakulmio pitämällä hiiri painettuna ja vetämällä."}},simpleshape:{tooltip:{end:"Vapauta hiiri päättääksesi piirtämisen."}}}},edit:{toolbar:{actions:{save:{title:"Hyväksy muutokset.",text:"Hyväksy"},cancel:{title:"Peru muokkaus, hylkää kaikki muutokset.",text:"Peru"},clearAll:{title:"Poista kaikki tasot.",text:"Poista kaikki"}},buttons:{edit:"Muokkaa tasoja.",editDisabled:"Ei muokattavia tasoja.",remove:"Poista tasot.",removeDisabled:"Ei poistettavia tasoja."}},handlers:{edit:{tooltip:{text:"Vedä pistettä tai markkeria muokataksesi piirrettyjä ominaisuuksia.",subtext:"Kumoa muutokset painamalla peruuta."}},remove:{tooltip:{text:"Paina piirrettyä ominaisuutta poistaaksesi"}}}}},up={draw:{toolbar:{actions:{title:"Annuler le dessin",text:"Annuler"},finish:{title:"Terminer le dessin",text:"Terminer"},undo:{title:"Supprimer le dernier point tiré",text:"Supprimer le dernier point"},buttons:{polyline:"Dessinez une polyligne",polygon:"Dessinez un polygone",rectangle:"Dessinez un rectangle",circle:"Dessiner un cercle",marker:"Dessinez un marqueur",circlemarker:"Dessinez un marqueur circulaire"}},handlers:{circle:{tooltip:{start:"Cliquez et faites glisser pour dessiner le cercle."},radius:"Rayon"},circlemarker:{tooltip:{start:"Cliquez sur la carte pour placer le marqueur circulaire."}},marker:{tooltip:{start:"Cliquez sur la carte pour placer le marqueur."}},polygon:{tooltip:{start:"Cliquez pour commencer à dessiner.",cont:"Cliquez pour continuer à dessiner.",end:"Cliquez sur le premier point pour fermer cette forme."}},polyline:{error:"<strong>Erreur:</strong> les polyligne ne peuvent pas traverser!",tooltip:{start:"Cliquez pour commencer à dessiner.",cont:"Cliquez pour continuer à dessiner.",end:"Cliquez sur le dernier point pour fermer cette forme."}},rectangle:{tooltip:{start:"Cliquez et faites glisser pour dessiner le rectangle."}},simpleshape:{tooltip:{end:"Relâchez la souris pour terminer le dessin."}}}},edit:{toolbar:{actions:{save:{title:"Sauvegarder les modifications.",text:"Sauvegarder"},cancel:{title:"Annuler l'édition, rejette toutes les modifications.",text:"Annuler"},clearAll:{title:"Effacez toutes les collections.",text:"Tout effacer"}},buttons:{edit:"Modifier les collections.",editDisabled:"Pas de collections à éditer.",remove:"Supprimez les collections.",removeDisabled:"Pas de collections à supprimer."}},handlers:{edit:{tooltip:{text:"Sélectionnez les poignées ou le marqueur pour modifier l'entité.",subtext:"Cliquez sur annuler pour rétablir les modifications."}},remove:{tooltip:{text:"Cliquez sur une entité pour supprimer"}}}}},dp={draw:{toolbar:{actions:{title:"Rajzolás elvetése",text:"Mégse"},finish:{title:"Rajzolás befejezése",text:"Befejezés"},undo:{title:"Legutóbbi pont törlése",text:"Legutóbbi pont törlése"},buttons:{polyline:"Útvonal rajzolása",polygon:"Sokszög rajzolása",rectangle:"Négyszög rajzolása",circle:"Kör rajzolása",marker:"Jelölő rajzolása",circlemarker:"Kör-jelölő rajzolása"}},handlers:{circle:{tooltip:{start:"Kattintson és tartsa nyomva a rajzoláshoz."},radius:"Sugár"},circlemarker:{tooltip:{start:"Kör-jelölő elhelyezéséhez kattintson a térképre."}},marker:{tooltip:{start:"Jelölő elhelyezéséhez kattintson a térképre."}},polygon:{tooltip:{start:"Alakzat rajzolásához kattintson a térképre.",cont:"Alakzat folytatásához kattintson a térképre.",end:"Alakzat befejezéséhez kattintson a kezdőpontra."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Útvonal rajzolásához kattintson a térképre.",cont:"Útvonal folytatásához kattintson a térképre.",end:"Útvonal befejezéséhez kattintson a végpontra."}},rectangle:{tooltip:{start:"Kattintson és tartsa nyomva négyszög rajzolásához."}},simpleshape:{tooltip:{end:"Ha elégedett az alakzattal, engedje fel az egér gombját."}}}},edit:{toolbar:{actions:{save:{title:"Változtatások elmentése.",text:"Mentés"},cancel:{title:"Változtatások elvetése.",text:"Mégse"},clearAll:{title:"Összes réteg törlése.",text:"Összes törlése"}},buttons:{edit:"Rétegek szerkesztése.",editDisabled:"Nem állnak rendelkezésre szerkeszthető rétegek.",remove:"Rétegek törlése.",removeDisabled:"Nem állnak rendelkezésre törölhető rétegek."}},handlers:{edit:{tooltip:{text:"Módosításhoz használja a jelölők, alakzatok kezelőit.",subtext:"Változások elvetéséhez kattintson a 'Mégse' gombra."}},remove:{tooltip:{text:"Kattintson a jelölőkre, alakzatokra az eltávolításukhoz."}}}}},fp={draw:{toolbar:{actions:{title:"Annulla disegno",text:"Annulla"},finish:{title:"Completa disegno",text:"Completa"},undo:{title:"Elimina l'ultimo punto disegnato",text:"Elimina l'ultimo punto"},buttons:{polyline:"Disegna una polilinea",polygon:"Disegna un poligono",rectangle:"Disegna un rettangolo",circle:"Disegna un cerchio",marker:"Disegna un marcatore",circlemarker:"Disegna un marker circolare"}},handlers:{circle:{tooltip:{start:"Clicca e trascina per disegnare un cerchio."},radius:"Raggio"},circlemarker:{tooltip:{start:"Clicca la mappa per posizionare un marcatore circolare."}},marker:{tooltip:{start:"Clicca la mappa per posizionare un marcatore."}},polygon:{tooltip:{start:"Clicca per iniziare a disegnare una figura.",cont:"Clicca per continuare a disegnare una figura.",end:"Clicca il primo punto per chiudere questa figura."}},polyline:{error:"<strong>Errore:</strong> i margini della figura non si possono incrociare!",tooltip:{start:"Clicca per iniziare a disegnare una linea.",cont:"Clicca per continuare a disegnare una linea",end:"Clicca l'ultimo punto per finire questa linea"}},rectangle:{tooltip:{start:"Clicca e trascina per disegnare un rettangolo."}},simpleshape:{tooltip:{end:"Rilascia il mouse per finire il disegno."}}}},edit:{toolbar:{actions:{save:{title:"Salva modifiche.",text:"Salva"},cancel:{title:"Annulla tutte le modifiche.",text:"Annulla"},clearAll:{title:"Pulisci tutti i livelli.",text:"Pulisci tutto"}},buttons:{edit:"Modifica i livelli.",editDisabled:"Nessun livello disponibile per la modifica.",remove:"Elimina livelli.",removeDisabled:"Nessun livello disponibile per l'eliminazione."}},handlers:{edit:{tooltip:{text:"Trascina le maniglie, o i marcatori per modificare l'elemento.",subtext:"Clicca annulla per annullare le modifiche."}},remove:{tooltip:{text:"Clicca un elemento per rimuoverlo"}}}}},gp={draw:{toolbar:{actions:{title:"ხატვის გაუქმება",text:"გაუქმება"},finish:{title:"ხატვის დასრულება",text:"დასრულება"},undo:{title:"ბოლო დახატული წერტილის წაშლა",text:"ბოლო წერტილის წაშლა"},buttons:{polyline:"პოლილაინის დახაზვა",polygon:"პოლიგონის დახაზვა",rectangle:"მართკუთხედის დახაზვა",circle:"წრის დახაზვა",marker:"ადგილმდებარეობის დატანა",circlemarker:"ადგილმდებარეობის დატანა(წრის სახით)"}},handlers:{circle:{tooltip:{start:"დააწკაპუნეთ და გადაიტანეთ იმისათვის, რომ წრე დახაზოთ."},radius:"რადიუსი"},circlemarker:{tooltip:{start:"დააწკაპუნეთ რუკაზე ადგილმდებარეობის შესაქმნელად."}},marker:{tooltip:{start:"დააწკაპუნეთ რუკაზე ადგილმდებარეობის შესაქმნელად."}},polygon:{tooltip:{start:"დააწკაპუნეთ, კონტურის ხაზვის დაწყებისთვის.",cont:"დააწკაპუნეთ, კონტრუსი ხაზვის დასრულებისთვის.",end:"დააწკაპუნეთ პირველ წერტილზე, რათა დაასრულოთ კონტურის ხაზვა."}},polyline:{error:"<strong>შეცდომა:</strong> ხაზი ვერ გადაკვეთავს თავის თავს",tooltip:{start:"დააწკაპუნეთ, ხაზის ხაზვის დაწყებისთვის.",cont:"დააწკაპუნეთ, ხაზის ხაზვის დასრულებისთვის.",end:"დააწკაპუნეთ ბოლო წერტილზე, რათა დაასრულოთ ხაზის ხაზვა."}},rectangle:{tooltip:{start:"დააწკაპუნეთ და გადაიტანეთ იმისათვის, რომ მართკუთხედი დახაზოთ."}},simpleshape:{tooltip:{end:"გაათავისუფლეთ თაგვის ღილაკი ხაზვის დასასრულებლად."}}}},edit:{toolbar:{actions:{save:{title:"ცვლილებების შენახვა.",text:"შენახვა"},cancel:{title:"რედაქტირების გაუქმება, დააბრუნე ყველა ცვლილება.",text:"გაუქმება"},clearAll:{title:"ყველა რედაქტირებული ფენის გასუფთავება.",text:"გასუფთავება"}},buttons:{edit:"რედაქტირება.",editDisabled:"ფენები არ არის რედაქტირებისთვის.",remove:"წაშლა.",removeDisabled:"ფენები არ არის წაშლისთვის."}},handlers:{edit:{tooltip:{text:"გადაიტანეთ წვერები ან წერტილები ობიექტის რედაქტირებისთვის.",subtext:'დააჭირეთ "გაუქმება", საწყის მდგომარეობაში დასაბრუნებლად.'}},remove:{tooltip:{text:"დააწკაპუნეთ ობიექტზე წაშლისთვის"}}}}},pp={draw:{toolbar:{actions:{title:"Tekening annuleren",text:"Annuleren"},finish:{title:"Tekening voltooien",text:"Voltooien"},undo:{title:"Laatst getekende punt verwijderen",text:"Verwijder laatst getekende punt"},buttons:{polyline:"Teken een polygonale lijn",polygon:"Teken een polygoon",rectangle:"Teken een rechthoek",circle:"Teken een cirkel",marker:"Plaats een marker",circlemarker:"Teken een cirkelmarkering"}},handlers:{circle:{tooltip:{start:"Klik en sleep om de cirkel te tekenen."},radius:"Radius"},circlemarker:{tooltip:{start:"Klik op de kaart om de cirkelmarkering te plaatsen."}},marker:{tooltip:{start:"Klik op de kaart om de markering te plaatsen."}},polygon:{tooltip:{start:"Klik om te beginnen met het tekenen van de polygoon.",cont:"Klik om door te gaan met het tekenen van de vorm.",end:"Klik op het eerste punt om dit polygoon te sluiten."}},polyline:{error:"<strong>Fout:</strong> vormranden kunnen niet kruisen!",tooltip:{start:"Klik om te beginnen met het tekenen van een lijn.",cont:"Klik om door te gaan met het tekenen van de lijn.",end:"Klik laatst getekende punt om deze lijn te voltooien."}},rectangle:{tooltip:{start:"Klik en sleep om een rechthoek te tekenen."}},simpleshape:{tooltip:{end:"Laat de muis los om de tekening te voltooien."}}}},edit:{toolbar:{actions:{save:{title:"Wijzigingen opslaan.",text:"Opslaan"},cancel:{title:"Annuleer bewerken en verwijder alle wijzigingen.",text:"Annuleren"},clearAll:{title:"Verwijder alle lagen.",text:"Verwijderd alles"}},buttons:{edit:"Lagen bewerken.",editDisabled:"Geen lagen om te bewerken.",remove:"Verwijder lagen.",removeDisabled:"Geen lagen om te verwijderen."}},handlers:{edit:{tooltip:{text:"Sleep hoeken om te schalen of middenpunt om te verplaatsen.",subtext:"Klik op annuleren om wijzigingen ongedaan te maken."}},remove:{tooltip:{text:"Klik op een vorm om die te verwijderen"}}}}},_p={draw:{toolbar:{actions:{title:"Avbryt markering",text:"Avbryt"},finish:{title:"Ferdiggjør markering",text:"Ferdiggjør"},undo:{title:"Ta bort siste punkt",text:"Slett siste punkt"},buttons:{polyline:"Tegn flere linjer",polygon:"Tegn en mangekant",rectangle:"Tegn et rektangel",circle:"Tegn en sirkel",marker:"Sett et markeringspunkt",circlemarker:"Tegn et sirkelpunkt"}},handlers:{circle:{tooltip:{start:"Klikk og dra for å tegne en sirkel."},radius:"Radius"},circlemarker:{tooltip:{start:"Klikk på kartet for å plassere et sirkelpunkt."}},marker:{tooltip:{start:"Klikk på kartet for å markere et punkt."}},polygon:{tooltip:{start:"Klikk for å tegne et område.",cont:"Klikk for å fortsette tegningen.",end:"Klikk på det første punktet for å lukke området."}},polyline:{error:"<strong>Error:</strong> kantene kan ikke krysses!",tooltip:{start:"Klikk for å tegne en linje.",cont:"Klikk for å fortsette å tegne linjen.",end:"Kikk siste punkt for å ferdiggjøre linjen."}},rectangle:{tooltip:{start:"Klikk og dra for å tegne et rektangel."}},simpleshape:{tooltip:{end:"Slipp museknappen for å gjøre tegningen ferdig."}}}},edit:{toolbar:{actions:{save:{title:"Lagre endringer.",text:"Lagre"},cancel:{title:"Avbryt redigering og forkast endringer.",text:"Avbryt"},clearAll:{title:"Nullstill alle figurer.",text:"Nullstill alt."}},buttons:{edit:"Rediger figur.",editDisabled:"Ingen figur å redigere.",remove:"Slett figur.",removeDisabled:"Ingen figur å slette."}},handlers:{edit:{tooltip:{text:"Dra markør for å redigere.",subtext:"Klikk avbryt for å angre endringer."}},remove:{tooltip:{text:"Klikk for å ta bort"}}}}},mp={draw:{toolbar:{actions:{title:"Anuluj wyznaczanie",text:"Anuluj"},finish:{title:"Zakończ wyznaczanie",text:"Zakończ"},undo:{title:"Usuń ostatnio wyznaczony punkt",text:"Usuń ostatni punkt"},buttons:{polyline:"Wyznacz wzór",polygon:"Wyznacz wielokąt",rectangle:"Wyznacz prostokąt",circle:"Wyznacz koło",marker:"Umieść znacznik",circlemarker:"Umieść okrągły znacznik"}},handlers:{circle:{tooltip:{start:"Kliknij i przeciągnij, aby wyznaczyć koło."},radius:"Promień"},circlemarker:{tooltip:{start:"Kliknij na mapę, aby umieścić okrągły znacznik."}},marker:{tooltip:{start:"Kliknij na mapę, aby umieścić znacznik."}},polygon:{tooltip:{start:"Kliknij, aby rozpocząć wyznaczanie kształtu.",cont:"Kliknij, aby kontynuować wyznaczanie kształtu.",end:"Kliknij pierwszy punkt, aby zakończyć ten kształt."}},polyline:{error:"<strong>Błąd:</strong> odcinki nie mogą się przecinać!",tooltip:{start:"Kliknij, aby rozpocząć wyznaczanie lini.",cont:"Kliknij, aby kontynuować wyznaczanie lini.",end:"Kliknij ostatni punkt, aby ukończyć linię."}},rectangle:{tooltip:{start:"Kliknij i przeciągnij, aby wyznaczyć prostokąt."}},simpleshape:{tooltip:{end:"Zwolnij przycisk myszy, aby ukończyć wyznaczanie."}}}},edit:{toolbar:{actions:{save:{title:"Zapisz zmiany.",text:"Zapisz"},cancel:{title:"Anuluj edytowanie i odrzuć zmiany.",text:"Anuluj"},clearAll:{title:"Wyczyść wszystkie warstwy.",text:"Wyczyść wszystko"}},buttons:{edit:"Edytuj warstwy.",editDisabled:"Brak warstw do edycji.",remove:"Usuń warstwy.",removeDisabled:"Brak warstw do usunięcia."}},handlers:{edit:{tooltip:{text:"Przeciągnij uchwyt lub znacznik, aby edytować.",subtext:"Kliknij anuluj, aby odrzucić zmiany."}},remove:{tooltip:{text:"Kliknij obiekt, aby go usunąć."}}}}},yp={draw:{toolbar:{actions:{title:"Cancelar desenho",text:"Cancelar"},finish:{title:"Terminar desenho",text:"Terminar"},undo:{title:"Eliminar último ponto desenhado",text:"Eliminar último ponto"},buttons:{polyline:"Desenhar uma polilinha",polygon:"Desenhar um polígono",rectangle:"Desenhar um retângulo",circle:"Desenhar um círculo",marker:"Desenhar un marcador",circlemarker:"Desenhar um marcador circular"}},handlers:{circle:{tooltip:{start:"Clique e arrastrar para desenhar o círculo."},radius:"Raio"},circlemarker:{tooltip:{start:"Clique no mapa para colocar o marcador circular."}},marker:{tooltip:{start:"Clique no mapa para colocar o marcador."}},polygon:{tooltip:{start:"Clique para começar a desenhar a figura.",cont:"Clique para continuar desenhando a figura.",end:"Clique no primeiro ponto para fechar esta figura."}},polyline:{error:"<strong>Erro:</strong> as bordas de uma forma não podem atravessar!",tooltip:{start:"Clique para começar a desenhar a linha.",cont:"Clique para continuar desenhando a linha.",end:"Clique no último ponto para terminar a linha."}},rectangle:{tooltip:{start:"Clique e arrastrar para desenhar o retângulo."}},simpleshape:{tooltip:{end:"Solte o mouse para terminar o desenho."}}}},edit:{toolbar:{actions:{save:{title:"Guardar alterações.",text:"Guardar"},cancel:{title:"Cancelar edição, descarta todas as alterações.",text:"Cancelar"},clearAll:{title:"Limpar todas as camadas.",text:"Limpar tudo"}},buttons:{edit:"Editar camadas.",editDisabled:"Nenhuma camada que editar.",remove:"Eliminar camadas.",removeDisabled:"Nenhuma camada que eliminar."}},handlers:{edit:{tooltip:{text:"Arraste os manipuladores ou marcadores para editar a figura.",subtext:"Clique em cancelar para desfazer as alterações."}},remove:{tooltip:{text:"Clique em uma figura para removê-la"}}}}},vp={draw:{toolbar:{actions:{title:"Отменить рисование",text:"Отмена"},finish:{title:"Завершить рисование",text:"Завершить"},undo:{title:"Удалить последнюю нарисованную точку",text:"Удалить последнюю точку"},buttons:{polyline:"Нарисовать полилинию",polygon:"Нарисовать полигон",rectangle:"Нарисовать прямоугольник",circle:"Нарисовать круг",marker:"Нарисовать точку",circlemarker:"Нарисовать точку(в виде круга)"}},handlers:{circle:{tooltip:{start:"Кликните и перетащите для того, чтобы нарисовать круг."},radius:"Радиус"},circlemarker:{tooltip:{start:"Кликните на карту для установки точки."}},marker:{tooltip:{start:"Кликните на карту для установки точки."}},polygon:{tooltip:{start:"Кликните, чтобы начать рисовать контур.",cont:"Кликните, чтобы завершить рисовать контур.",end:"Кликните на первую точку, чтобы завершить рисование контура."}},polyline:{error:"<strong>Ошибка:</strong> линия не может самопересекаться!",tooltip:{start:"Кликните, чтобы начать рисовать линию.",cont:"Кликните, чтобы завершить рисование линии.",end:"Кликните на последнюю точку, чтобы завершить рисование линии."}},rectangle:{tooltip:{start:"Кликните и перетащите, чтобы нарисовать прямоугольник."}},simpleshape:{tooltip:{end:"Отпустите кнопку мыши для завершения рисования."}}}},edit:{toolbar:{actions:{save:{title:"Сохранить изменения.",text:"Сохранить"},cancel:{title:"Отменить редактирование, откатить все изменения.",text:"Отмена"},clearAll:{title:"Очистить все редактируемые слои.",text:"Очистить всё"}},buttons:{edit:"Редактировать.",editDisabled:"Нет слоёв для редактирования.",remove:"Удалить.",removeDisabled:"Нет слоёв для удаления."}},handlers:{edit:{tooltip:{text:"Перетащите вершины или точки для редактирования фигуры.",subtext:'Нажмите "Отмена", чтобы откатить изменения.'}},remove:{tooltip:{text:"Кликните на фигуру для удаления"}}}}},xp={draw:{toolbar:{actions:{title:"Zrušiť kreslenie",text:"Zrušiť"},finish:{title:"Dokončiť kreslenie",text:"Dokončiť"},undo:{title:"Zmazať posledný nakreslený bod",text:"Zmazať posledný bod"},buttons:{polyline:"Nakresliť čiaru",polygon:"Nakresliť polygón",rectangle:"Nakresliť obdĺžnik",circle:"Nakresliť kruh",marker:"Nakresliť bod",circlemarker:"Nakresliť kruhový bod"}},handlers:{circle:{tooltip:{start:"Kliknite a potiahnite, aby ste nakreslili kruh."},radius:"Polomer"},circlemarker:{tooltip:{start:"Kliknite na mapu aby ste umiestnili kruhový bod."}},marker:{tooltip:{start:"Kliknite na mapu aby ste umiestnili bod."}},polygon:{tooltip:{start:"Kliknite, aby ste začali kresliť útvar.",cont:"Kliknite, aby ste nakreslili ďalší bod útvaru.",end:"Kliknite na prvý bod, aby ste uzavreli útvar."}},polyline:{error:"<strong>Chyba:</strong> čiary sa nesmú pretínať!",tooltip:{start:"Kliknite, aby ste začali kresliť čiaru.",cont:"Kliknite, aby ste nakreslili ďalší bod čiary.",end:"Kliknite posledný bod, aby ste dokončili čiaru."}},rectangle:{tooltip:{start:"Kliknite a potiahnite, aby ste nakreslili štvorec."}},simpleshape:{tooltip:{end:"Uvoľnením tlačidla myši ukončíte kreslenie."}}}},edit:{toolbar:{actions:{save:{title:"Uložiť zmeny.",text:"Uložiť"},cancel:{title:"Ukončiť úpravu, zrušiť všetky zmeny.",text:"Zrušiť"},clearAll:{title:"Zmazať všetky vrstvy.",text:"Zmazať všetko"}},buttons:{edit:"Upraviť vrstvy.",editDisabled:"Žiadne vrstvy pre úpravu",remove:"Zmazať vrstvy.",removeDisabled:"Žiadne vrstvy pre zmazanie."}},handlers:{edit:{tooltip:{text:"Potiahnutím vyznačených štvorčekov, alebo bodov upravíte útvar.",subtext:"Kliknite zrušiť, pre zrušenie zmien."}},remove:{tooltip:{text:"Kliknite na útvar pre jeho zmazanie."}}}}},wp={draw:{toolbar:{actions:{title:"Скасувати креслення",text:"Скасувати"},finish:{title:"Завершити креслення",text:"Завершити"},undo:{title:"Видалити останню нанесену точку",text:"Видалити останню точку"},buttons:{polyline:"Накреслити криву",polygon:"Накреслити многокутник",rectangle:"Накреслити прямокутник",circle:"Накреслити коло",marker:"Розмістити маркер",circlemarker:"Розмістити маркер-коло"}},handlers:{circle:{tooltip:{start:"Натисніть і перетягуйте вказівник, щоб накреслити коло."},radius:"Радіус"},circlemarker:{tooltip:{start:"Натисніть на мапу, щоб розмістити маркер-коло."}},marker:{tooltip:{start:"Натисніть на мапу, щоб розмістити маркер."}},polygon:{tooltip:{start:"Натисніть, щоб накреслити фігуру.",cont:"Натисніть, щоб продовжити креслення фігури.",end:"Натисніть на першу точку, щоб замкнути цю фігуру."}},polyline:{error:"<strong>Помилка:</strong> сторони фігури не мають перетинатись!",tooltip:{start:"Натисніть, щоб накреслити лінію.",cont:"Натисніть, щоб продовжити креслення лінії.",end:"Натисніть на останню точку, щоб завершити лінію."}},rectangle:{tooltip:{start:"Натисніть і перетягуйте вказівник, щоб накреслити прямокутник."}},simpleshape:{tooltip:{end:"Відпустіть мишку, щоб завершити рисування."}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни.",text:"Зберегти"},cancel:{title:"Припинити редагування, скасувати всі зміни.",text:"Скасувати"},clearAll:{title:"Очистити всі шари.",text:"Очистити все"}},buttons:{edit:"Редагувати шари.",editDisabled:"Немає шарів для редагування.",remove:"Видалити шари.",removeDisabled:"Немає шарів для видалення."}},handlers:{edit:{tooltip:{text:"Перетягуйте важелі або маркер для редагування фігури.",subtext:"Натисніть «Скасувати» для скасування змін."}},remove:{tooltip:{text:"Натисніть на фігуру для видалення"}}}}},Ep={draw:{toolbar:{actions:{title:"الغاء الرسم",text:"الغاء"},finish:{title:"انهاء الرسم",text:"انهاء"},undo:{title:"مسح اخر رسمة",text:"مسح اخر نقطة"},buttons:{polyline:"رسم خط",polygon:"رسم منطقة",rectangle:"رسم مستطيل",circle:"رسم دائرة",marker:"رسم علامة",circlemarker:"رسم علامة دائرة"}},handlers:{circle:{tooltip:{start:"اضغط واسحب لرسم دائرة"},radius:"القطر"},circlemarker:{tooltip:{start:"اضغط على الخريطة لرسم دائرة"}},marker:{tooltip:{start:"اضغط على الخريطة لرسم نقطة"}},polygon:{tooltip:{start:"اضغط لبدء رسم منطقة",cont:"اضغط لاستمرار رسم منطقة",end:"اضغط على اول نقطة لاكمال المنطقة"}},polyline:{error:"<strong>خطأ:</strong> لا يمكن تقاطع الخطوط",tooltip:{start:"اضغط لبدئ رسم الخط",cont:"اضغط لاستكمال رسم الخط",end:"اضغط على اخر نقطة للانهاء"}},rectangle:{tooltip:{start:"اضغط واسحب لرسم مستطيل"}},simpleshape:{tooltip:{end:"اترك الماوس للانهاء"}}}},edit:{toolbar:{actions:{save:{title:"حفظ التغييرات",text:"حفظ"},cancel:{title:"الغاء كل التعديلات",text:"الغاء"},clearAll:{title:"مسح كل الطبقات",text:"مسح الكل"}},buttons:{edit:"تعديل الطبقات",editDisabled:"لاتوجد طبقات للتعديل",remove:"مسح الطبقات",removeDisabled:"لا يوجد طبقات للمسح"}},handlers:{edit:{tooltip:{text:"اسحب للتعديل",subtext:"اضغط الغاء لمسح التعديلات"}},remove:{tooltip:{text:"اضغط على رسمة للمسح"}}}}},Lp={draw:{toolbar:{actions:{title:"取消绘制",text:"取消"},finish:{title:"结束绘制",text:"结束"},undo:{title:"删除最后一个绘制点",text:"删除最后一个点"},buttons:{polyline:"绘制折线",polygon:"绘制多边形",rectangle:"绘制矩形",circle:"绘制圆形",marker:"绘制标志物",circlemarker:"绘制圆形标志物"}},handlers:{circle:{tooltip:{start:"单击并拖拽绘制圆形"},radius:"半径"},circlemarker:{tooltip:{start:"单击地图放置圆形标志物"}},marker:{tooltip:{start:"单击地图放置标志物"}},polygon:{tooltip:{start:"单击地图绘制图形",cont:"继续单击绘制图形",end:"单击起始点结束绘制"}},polyline:{error:"<strong>错误:</strong> 图形边缘不能交叉!",tooltip:{start:"单击地图绘制折线",cont:"继续单击绘制下一段折线",end:"单击最后一个点结束绘制"}},rectangle:{tooltip:{start:"单击并拖拽绘制矩形"}},simpleshape:{tooltip:{end:"松开鼠标结束绘制"}}}},edit:{toolbar:{actions:{save:{title:"保存变更",text:"保存"},cancel:{title:"取消编辑,放弃所有变更",text:"取消"},clearAll:{title:"清除所有图形",text:"清除所有"}},buttons:{edit:"编辑图形",editDisabled:"无图形可编辑",remove:"删除图形",removeDisabled:"无图形可删除"}},handlers:{edit:{tooltip:{text:"拖拽线段或标志点以编辑图形",subtext:"点击<strong>取消</strong>按钮撤销变更"}},remove:{tooltip:{text:"单击图形以移除"}}}}},bp={draw:{toolbar:{actions:{title:"Çizimi iptal et",text:"İptal"},finish:{title:"Çizimi Bitir",text:"Bitir"},undo:{title:"Çizilen son noktayı sil",text:"Son noktayı sil"},buttons:{polyline:"Çoklu çizgi çiz",polygon:"Çokgen çiz",rectangle:"Dikdörtgen çiz",circle:"Yuvarlak çiz",marker:"İşaretçi çiz",circlemarker:"Yuvarlak işaretçi çiz"}},handlers:{circle:{tooltip:{start:"Yuvarlak çizmek için tıklayın ve sürükleyin."},radius:"Çap"},circlemarker:{tooltip:{start:"Yuvarlak işaretçi yerleştirmek için haritaya tıklayın."}},marker:{tooltip:{start:"İşaretçi yerleştirmek için haritaya tıklayın."}},polygon:{tooltip:{start:"Şekil çizmeye başlamak için tıklayın.",cont:"Şekil çizmeye devam etmek için tıklayın.",end:"Bu şekli tamamlamak için ilk noktayı tıklayın."}},polyline:{error:"<strong>Hata:</strong> şekil kenarları kesişemez!",tooltip:{start:"Hat çizmeye başlamak için tıklayın.",cont:"Hat çizmeye devam etmek için tıklayın.",end:"Bu hattı tamamlamak için ilk noktayı tıklayın."}},rectangle:{tooltip:{start:"Dikdörtgen çizmek için tıklayın ve sürükleyin."}},simpleshape:{tooltip:{end:"Çizimi bitirmek için fareyi bırakın."}}}},edit:{toolbar:{actions:{save:{title:"Değişiklikleri kaydet.",text:"Kaydet"},cancel:{title:"Düzenlemeyi iptal et, tüm değişiklikleri çıkar.",text:"İptal"},clearAll:{title:"Tüm katmanları temizle.",text:"Hepsini temizle"}},buttons:{edit:"Katmanları düzenle.",editDisabled:"Düzenlenecek katman bulunamadı.",remove:"Katmanları sil.",removeDisabled:"Silinecek katman bulunamadı."}},handlers:{edit:{tooltip:{text:"Çizimi düzenlemek için köşeleri veya işaretçiyi sürükleyin.",subtext:"Değişiklikleri geri almak için iptale tıklayın."}},remove:{tooltip:{text:"Çizimi silmek için tıklayın"}}}}},Cp={draw:{toolbar:{actions:{title:"Anulați desenul",text:"Anulare"},finish:{title:"Terminați desenul",text:"Termina"},undo:{title:"Șterge ultimul punct desenat",text:"Șterge ultimul punct"},buttons:{polyline:"Desenați o polilinie",polygon:"Desenați un poligon",rectangle:"Desenați un dreptunghi",circle:"Desenează un cerc",marker:"Desenați un marker",circlemarker:"Desenați un marcator de cerc"}},handlers:{circle:{tooltip:{start:"Dați clic și trageți pentru a desena cerc."},radius:"Rază"},circlemarker:{tooltip:{start:"Dați clic pe hartă pentru a plasa marcatorul cercului."}},marker:{tooltip:{start:"Dați clic pe hartă pentru a plasa marcatorul."}},polygon:{tooltip:{start:"Dați clic pentru a începe desenarea parcelei",cont:"Dați clic pentru a continua desenarea parcelei",end:"Dați clic pe primul punct pentru a închide această parcelei."}},polyline:{error:"<strong>Eroare:</strong> marginile formei nu se pot traversa!",tooltip:{start:"Daţi clic pentru a începe să desenezi o linie.",cont:"Daţi clic pentru a continua să desenezi linia.",end:"Dați clic pe ultimul punct pentru a ajunge la linia de sosire."}},rectangle:{tooltip:{start:"Dați clic și trageți pentru a desena dreptunghi."}},simpleshape:{tooltip:{end:"Eliberați mouse-ul pentru a termina desenul."}}}},edit:{toolbar:{actions:{save:{title:"Salvează modificările.",text:"Salvați"},cancel:{title:"Anulează editarea, anulează toate modificările.",text:"Anulare"},clearAll:{title:"Ștergeți toate straturile.",text:"Curata tot"}},buttons:{edit:"Editați straturi.",editDisabled:"Fără straturi de editat.",remove:"Ștergeți straturile.",removeDisabled:"Nu există straturi de șters."}},handlers:{edit:{tooltip:{text:"Trageți mânerele sau marcatorul pentru a edita caracteristica.",subtext:"Dați clic pe Anulare pentru a anula modificările."}},remove:{tooltip:{text:"Dați clic pe o caracteristică pentru a o elimina"}}}}},Tp=function(r){var t=ic;switch(r.toLocaleLowerCase()){case"de":case"de-at":case"de-be":case"de-ch":case"de-de":case"de-li":case"de-lu":case"de-de.utf-8":case"german":t=lp;break;case"en":case"en-us":case"en-ca":case"en-gb":case"en-us.utf-8":case"english":t=ic;break;case"ar":case"ar-ae":case"ar-eg":case"arabic":t=Ep;break;case"fi":case"fi-fi":case"fi-fi.utf-8":case"finnish":t=cp;break;case"fr":case"fr-us":case"fr-ca":case"fr-us.utf-8":case"french":t=up;break;case"es":case"es-us":case"es-ca":case"es-us.utf-8":case"spanish":t=hp;break;case"sk":case"sk-sk":case"sk-sk.utf-8":case"slovak":t=xp;break;case"pl":case"pl-pl":case"pl-pl.utf-8":case"polish":t=mp;break;case"pt":case"pt-pt":case"pt-pt.utf-8":case"portuguese":t=yp;break;case"uk":case"uk-ua":case"uk-ua.utf-8":case"ukrainian":t=wp;break;case"cs":case"cs-cz":case"cs-cz.utf-8":case"czech":t=ap;break;case"ru":case"ru-ru":case"ru-ru.utf-8":case"russian":t=vp;break;case"ka":case"ka-ka":case"ka-ka.utf-8":case"georgian":t=gp;break;case"no":case"no-no":case"no-no.utf-8":case"norwegian":t=_p;break;case"am":case"am-et":case"am-et.utf-8":case"amharic":t=op;break;case"nl":case"nl-nl":case"nl-nl.utf-8":case"nl-be":case"nl-be.utf-8":case"dutch":case"belgian":case"flemish":t=pp;break;case"it":case"it-it":case"it-ch":case"it-it.utf-8":case"it-ch.utf-8":case"italiano":case"italian":t=fp;break;case"hu":case"hu-HU":case"hu-hu":case"hu-HU.utf-8":case"hu-hu.utf-8":case"magyar":case"hungarian":t=dp;break;case"zh":case"zh-cn":case"zh-cn.utf-8":case"chinese":t=Lp;break;case"tr":case"tr-tr":case"tr-tr.utf-8":case"turkish":t=bp;break;case"ro":case"ro-ro":case"ro-RO":case"ro-ro.utf-8":case"romanian":t=Cp;break;default:throw new Error("[language] not found")}try{L&&L.drawLocal&&(L.drawLocal=t)}catch{}return t};function nc(r,t){return function(){return r.apply(t,arguments)}}const{toString:Mp}=Object.prototype,{getPrototypeOf:ya}=Object,Ls=(r=>t=>{const e=Mp.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ze=r=>(r=r.toLowerCase(),t=>Ls(t)===r),bs=r=>t=>typeof t===r,{isArray:kn}=Array,vr=bs("undefined");function Sp(r){return r!==null&&!vr(r)&&r.constructor!==null&&!vr(r.constructor)&&Ce(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const rc=Ze("ArrayBuffer");function Pp(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&rc(r.buffer),t}const kp=bs("string"),Ce=bs("function"),sc=bs("number"),Cs=r=>r!==null&&typeof r=="object",Rp=r=>r===!0||r===!1,Ts=r=>{if(Ls(r)!=="object")return!1;const t=ya(r);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Ap=Ze("Date"),Ip=Ze("File"),Dp=Ze("Blob"),Op=Ze("FileList"),Fp=r=>Cs(r)&&Ce(r.pipe),zp=r=>{let t;return r&&(typeof FormData=="function"&&r instanceof FormData||Ce(r.append)&&((t=Ls(r))==="formdata"||t==="object"&&Ce(r.toString)&&r.toString()==="[object FormData]"))},Np=Ze("URLSearchParams"),Bp=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xr(r,t,{allOwnKeys:e=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),kn(r))for(n=0,i=r.length;n<i;n++)t.call(null,r[n],n,r);else{const s=e?Object.getOwnPropertyNames(r):Object.keys(r),a=s.length;let h;for(n=0;n<a;n++)h=s[n],t.call(null,r[h],h,r)}}function oc(r,t){t=t.toLowerCase();const e=Object.keys(r);let n=e.length,i;for(;n-- >0;)if(i=e[n],t===i.toLowerCase())return i;return null}const ac=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),lc=r=>!vr(r)&&r!==ac;function va(){const{caseless:r}=lc(this)&&this||{},t={},e=(n,i)=>{const s=r&&oc(t,i)||i;Ts(t[s])&&Ts(n)?t[s]=va(t[s],n):Ts(n)?t[s]=va({},n):kn(n)?t[s]=n.slice():t[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&xr(arguments[n],e);return t}const Gp=(r,t,e,{allOwnKeys:n}={})=>(xr(t,(i,s)=>{e&&Ce(i)?r[s]=nc(i,e):r[s]=i},{allOwnKeys:n}),r),Up=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),jp=(r,t,e,n)=>{r.prototype=Object.create(t.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:t.prototype}),e&&Object.assign(r.prototype,e)},Zp=(r,t,e,n)=>{let i,s,a;const h={};if(t=t||{},r==null)return t;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)a=i[s],(!n||n(a,r,t))&&!h[a]&&(t[a]=r[a],h[a]=!0);r=e!==!1&&ya(r)}while(r&&(!e||e(r,t))&&r!==Object.prototype);return t},Wp=(r,t,e)=>{r=String(r),(e===void 0||e>r.length)&&(e=r.length),e-=t.length;const n=r.indexOf(t,e);return n!==-1&&n===e},Hp=r=>{if(!r)return null;if(kn(r))return r;let t=r.length;if(!sc(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=r[t];return e},Vp=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&ya(Uint8Array)),Xp=(r,t)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const s=i.value;t.call(r,s[0],s[1])}},Yp=(r,t)=>{let e;const n=[];for(;(e=r.exec(t))!==null;)n.push(e);return n},Kp=Ze("HTMLFormElement"),qp=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),hc=(({hasOwnProperty:r})=>(t,e)=>r.call(t,e))(Object.prototype),Jp=Ze("RegExp"),cc=(r,t)=>{const e=Object.getOwnPropertyDescriptors(r),n={};xr(e,(i,s)=>{t(i,s,r)!==!1&&(n[s]=i)}),Object.defineProperties(r,n)},Qp=r=>{cc(r,(t,e)=>{if(Ce(r)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=r[e];if(Ce(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},$p=(r,t)=>{const e={},n=i=>{i.forEach(s=>{e[s]=!0})};return kn(r)?n(r):n(String(r).split(t)),e},t_=()=>{},e_=(r,t)=>(r=+r,Number.isFinite(r)?r:t),xa="abcdefghijklmnopqrstuvwxyz",uc="0123456789",dc={DIGIT:uc,ALPHA:xa,ALPHA_DIGIT:xa+xa.toUpperCase()+uc},i_=(r=16,t=dc.ALPHA_DIGIT)=>{let e="";const{length:n}=t;for(;r--;)e+=t[Math.random()*n|0];return e};function n_(r){return!!(r&&Ce(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const r_=r=>{const t=new Array(10),e=(n,i)=>{if(Cs(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const s=kn(n)?[]:{};return xr(n,(a,h)=>{const c=e(a,i+1);!vr(c)&&(s[h]=c)}),t[i]=void 0,s}}return n};return e(r,0)},s_=Ze("AsyncFunction"),O={isArray:kn,isArrayBuffer:rc,isBuffer:Sp,isFormData:zp,isArrayBufferView:Pp,isString:kp,isNumber:sc,isBoolean:Rp,isObject:Cs,isPlainObject:Ts,isUndefined:vr,isDate:Ap,isFile:Ip,isBlob:Dp,isRegExp:Jp,isFunction:Ce,isStream:Fp,isURLSearchParams:Np,isTypedArray:Vp,isFileList:Op,forEach:xr,merge:va,extend:Gp,trim:Bp,stripBOM:Up,inherits:jp,toFlatObject:Zp,kindOf:Ls,kindOfTest:Ze,endsWith:Wp,toArray:Hp,forEachEntry:Xp,matchAll:Yp,isHTMLForm:Kp,hasOwnProperty:hc,hasOwnProp:hc,reduceDescriptors:cc,freezeMethods:Qp,toObjectSet:$p,toCamelCase:qp,noop:t_,toFiniteNumber:e_,findKey:oc,global:ac,isContextDefined:lc,ALPHABET:dc,generateString:i_,isSpecCompliantForm:n_,toJSONObject:r_,isAsyncFn:s_,isThenable:r=>r&&(Cs(r)||Ce(r))&&Ce(r.then)&&Ce(r.catch)};function vt(r,t,e,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),i&&(this.response=i)}O.inherits(vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const fc=vt.prototype,gc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{gc[r]={value:r}}),Object.defineProperties(vt,gc),Object.defineProperty(fc,"isAxiosError",{value:!0}),vt.from=(r,t,e,n,i,s)=>{const a=Object.create(fc);return O.toFlatObject(r,a,function(c){return c!==Error.prototype},h=>h!=="isAxiosError"),vt.call(a,r.message,t,e,n,i),a.cause=r,a.name=r.name,s&&Object.assign(a,s),a};const o_=null;function wa(r){return O.isPlainObject(r)||O.isArray(r)}function pc(r){return O.endsWith(r,"[]")?r.slice(0,-2):r}function _c(r,t,e){return r?r.concat(t).map(function(i,s){return i=pc(i),!e&&s?"["+i+"]":i}).join(e?".":""):t}function a_(r){return O.isArray(r)&&!r.some(wa)}const l_=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Ms(r,t,e){if(!O.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,e=O.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,M){return!O.isUndefined(M[b])});const n=e.metaTokens,i=e.visitor||f,s=e.dots,a=e.indexes,c=(e.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(t);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function d(E){if(E===null)return"";if(O.isDate(E))return E.toISOString();if(!c&&O.isBlob(E))throw new vt("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(E)||O.isTypedArray(E)?c&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function f(E,b,M){let S=E;if(E&&!M&&typeof E=="object"){if(O.endsWith(b,"{}"))b=n?b:b.slice(0,-2),E=JSON.stringify(E);else if(O.isArray(E)&&a_(E)||(O.isFileList(E)||O.endsWith(b,"[]"))&&(S=O.toArray(E)))return b=pc(b),S.forEach(function(x,C){!(O.isUndefined(x)||x===null)&&t.append(a===!0?_c([b],C,s):a===null?b:b+"[]",d(x))}),!1}return wa(E)?!0:(t.append(_c(M,b,s),d(E)),!1)}const p=[],m=Object.assign(l_,{defaultVisitor:f,convertValue:d,isVisitable:wa});function v(E,b){if(!O.isUndefined(E)){if(p.indexOf(E)!==-1)throw Error("Circular reference detected in "+b.join("."));p.push(E),O.forEach(E,function(S,y){(!(O.isUndefined(S)||S===null)&&i.call(t,S,O.isString(y)?y.trim():y,b,m))===!0&&v(S,b?b.concat(y):[y])}),p.pop()}}if(!O.isObject(r))throw new TypeError("data must be an object");return v(r),t}function mc(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ea(r,t){this._pairs=[],r&&Ms(r,this,t)}const yc=Ea.prototype;yc.append=function(t,e){this._pairs.push([t,e])},yc.toString=function(t){const e=t?function(n){return t.call(this,n,mc)}:mc;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function h_(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vc(r,t,e){if(!t)return r;const n=e&&e.encode||h_,i=e&&e.serialize;let s;if(i?s=i(t,e):s=O.isURLSearchParams(t)?t.toString():new Ea(t,e).toString(n),s){const a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class c_{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(n){n!==null&&t(n)})}}const xc=c_,wc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},u_=typeof URLSearchParams<"u"?URLSearchParams:Ea,d_=typeof FormData<"u"?FormData:null,f_=typeof Blob<"u"?Blob:null,g_=(()=>{let r;return typeof navigator<"u"&&((r=navigator.product)==="ReactNative"||r==="NativeScript"||r==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),p_=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),We={isBrowser:!0,classes:{URLSearchParams:u_,FormData:d_,Blob:f_},isStandardBrowserEnv:g_,isStandardBrowserWebWorkerEnv:p_,protocols:["http","https","file","blob","url","data"]};function __(r,t){return Ms(r,new We.classes.URLSearchParams,Object.assign({visitor:function(e,n,i,s){return We.isNode&&O.isBuffer(e)?(this.append(n,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function m_(r){return O.matchAll(/\w+|\[(\w*)]/g,r).map(t=>t[0]==="[]"?"":t[1]||t[0])}function y_(r){const t={},e=Object.keys(r);let n;const i=e.length;let s;for(n=0;n<i;n++)s=e[n],t[s]=r[s];return t}function Ec(r){function t(e,n,i,s){let a=e[s++];const h=Number.isFinite(+a),c=s>=e.length;return a=!a&&O.isArray(i)?i.length:a,c?(O.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!h):((!i[a]||!O.isObject(i[a]))&&(i[a]=[]),t(e,n,i[a],s)&&O.isArray(i[a])&&(i[a]=y_(i[a])),!h)}if(O.isFormData(r)&&O.isFunction(r.entries)){const e={};return O.forEachEntry(r,(n,i)=>{t(m_(n),i,e,0)}),e}return null}const v_={"Content-Type":void 0};function x_(r,t,e){if(O.isString(r))try{return(t||JSON.parse)(r),O.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(r)}const Ss={transitional:wc,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,s=O.isObject(t);if(s&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return i&&i?JSON.stringify(Ec(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return __(t,this.formSerializer).toString();if((h=O.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ms(h?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||i?(e.setContentType("application/json",!1),x_(t)):t}],transformResponse:[function(t){const e=this.transitional||Ss.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(t&&O.isString(t)&&(n&&!this.responseType||i)){const a=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(h){if(a)throw h.name==="SyntaxError"?vt.from(h,vt.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};O.forEach(["delete","get","head"],function(t){Ss.headers[t]={}}),O.forEach(["post","put","patch"],function(t){Ss.headers[t]=O.merge(v_)});const La=Ss,w_=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),E_=r=>{const t={};let e,n,i;return r&&r.split(`
13
+ */(function(t,e){r.exports?r.exports=e(Zh(),Qg):e(t.L,t.screenfull)})(typeof self<"u"?self:je,function(t,e){return t.Control.FullScreen=t.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},_screenfull:e,onAdd:function(n){var i="leaflet-control-zoom-fullscreen",s,a="";return n.zoomControl&&!this.options.forceSeparateButton?s=n.zoomControl._container:s=t.DomUtil.create("div","leaflet-bar"),this.options.content?a=this.options.content:i+=" fullscreen-icon",this._createButton(this.options.title,i,a,s,this.toggleFullScreen,this),this._map.fullscreenControl=this,this._map.on("enterFullscreen exitFullscreen",this._toggleState,this),s},onRemove:function(){t.DomEvent.off(this.link,"click",t.DomEvent.stop).off(this.link,"click",this.toggleFullScreen,this),this._screenfull.isEnabled&&(t.DomEvent.off(this._container,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).off(this._container,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this),t.DomEvent.off(document,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).off(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,this))},_createButton:function(n,i,s,a,h,c){return this.link=t.DomUtil.create("a",i,a),this.link.href="#",this.link.title=n,this.link.innerHTML=s,this.link.setAttribute("role","button"),this.link.setAttribute("aria-label",n),L.DomEvent.disableClickPropagation(a),t.DomEvent.on(this.link,"click",t.DomEvent.stop).on(this.link,"click",h,c),this._screenfull.isEnabled&&(t.DomEvent.on(a,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).on(a,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,c),t.DomEvent.on(document,this._screenfull.raw.fullscreenchange,t.DomEvent.stop).on(document,this._screenfull.raw.fullscreenchange,this._handleFullscreenChange,c)),this.link},toggleFullScreen:function(){var n=this._map;n._exitFired=!1,n._isFullscreen?(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.exit():(t.DomUtil.removeClass(this.options.fullscreenElement?this.options.fullscreenElement:n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize()),n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1):(this._screenfull.isEnabled&&!this.options.forcePseudoFullscreen?this._screenfull.request(this.options.fullscreenElement?this.options.fullscreenElement:n._container):(t.DomUtil.addClass(this.options.fullscreenElement?this.options.fullscreenElement:n._container,"leaflet-pseudo-fullscreen"),n.invalidateSize()),n.fire("enterFullscreen"),n._isFullscreen=!0)},_toggleState:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel,this._map._isFullscreen?L.DomUtil.removeClass(this.link,"leaflet-fullscreen-on"):L.DomUtil.addClass(this.link,"leaflet-fullscreen-on")},_handleFullscreenChange:function(){var n=this._map;n.invalidateSize(),!this._screenfull.isFullscreen&&!n._exitFired&&(n.fire("exitFullscreen"),n._exitFired=!0,n._isFullscreen=!1)}}),t.Map.include({toggleFullscreen:function(){this.fullscreenControl.toggleFullScreen()}}),t.Map.addInitHook(function(){this.options.fullscreenControl&&this.addControl(t.control.fullscreen(this.options.fullscreenControlOptions))}),t.control.fullscreen=function(n){return new t.Control.FullScreen(n)},{leaflet:t,screenfull:e}})})(Jg);const $g=X.defineComponent({name:"CoordinatesVerifyPolygon",props:{dataPolygon:Object,iconMarker:Object,coordinatesMap:Array,checkPointInPolygon:Function},data(){return{markerIconDefault:{iconUrl:ms,iconSize:[25,41],iconAnchor:[12,41]}}},mounted(){this.verificarPuntoEnPoligono()},methods:{verificarPuntoEnPoligono(){var f;const r=this.iconMarker?this.iconMarker:this.markerIconDefault,t=(f=this.dataPolygon)==null?void 0:f.geometry.coordinates[0].map(p=>[p[1],p[0]]),e=JSON.parse(JSON.stringify(t)),n=[this.coordinatesMap?this.coordinatesMap[0]:0,this.coordinatesMap?this.coordinatesMap[1]:0],i=tt.map("maps",{fullscreenControl:!0}).setView([this.coordinatesMap?this.coordinatesMap[0]:0,this.coordinatesMap?this.coordinatesMap[1]:0],this.coordinatesMap?this.coordinatesMap[2]:0);tt.tileLayer("https://tile.openstreetmaps.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}).addTo(i),tt.polygon(e).addTo(i);const s=[this.coordinatesMap?this.coordinatesMap[0]:0,this.coordinatesMap?this.coordinatesMap[1]:0],a=tt.icon(r);tt.marker(s,{icon:a}).addTo(i);const h=Pg(n),c=kg([t]),d=Dg(h,c);this.checkPointInPolygon&&this.checkPointInPolygon(d)}}}),eb="",ma=(r,t)=>{const e=r.__vccOpts||r;for(const[n,i]of t)e[n]=i;return e},tp={ref:"maps",id:"maps"};function ep(r,t,e,n,i,s){return X.openBlock(),X.createElementBlock("div",tp,null,512)}const ip=ma($g,[["render",ep]]),np="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAANHElEQVR4nOWbe3BUVZ7HP/fefiSdTtKEJsggBHnYBqVgwBKNyjiC4ojLw5Wt0t2ZcX2sU1SN1G7t1DijjlU66oiOO85ooazM1uBjRpQRJhAFh4criEEIUcRwI+EVyfOa3KQ7nX7de/eP7gSSe7tzO+ngH/utoiqce87v/M73/n6/8zu/c1swDIP/z3CMpnC/L5APLAMWAfOBywAx9VhI/RsMA6gH9gE7gEpFlcOjpaMwGhbg9wUCwL8BK4FxQByIleh+90RtcrRYH+Mo0oscDlwOwBEjKvaIIboFVWiWztIhtZMg0SeuHXgLeFlR5aO51jWnBPh9ge8AvwDuIfkmI5O0svby2GzfJG2Kb7w2wSEiZbQ6HYOg2GmccjQIXzhrOen46vzHfwQeU1T561zpnDMC/L7A/cCjgA/Qro5dd3pu9FpK9LGzs1IIgQQaAA4k2qQmvcZ1gMOuajFlFRHgIUWVX8iF3iMmwO8LFAJrgbuArvL4nCNLe+/wOw1XuYG1k2epImAQFkLa9vxK/ajzsCPVuA24U1Hl4Iikj4QAvy8wA9gEzBirl554MPiz1gja98XUsoUcLP98aOhExO74tvx3pXpHnQicAW5SVLl+uDKHTYDfF5gNfAi458TmNS/uXTlRwHC5cKAzOltrn3voGFS7d+t78naIQC9wjaLKnw1L5nAI8PsCU4HDAPOjCw7eFLntRrtjDQw0dJxI/TQJCMTREAEJCcMmgfvdu42dee8JJOPC5Yoqn8huJcMgwO8LuIETgK8ieuPB70duWWDH0Asn5TN2TjET5ozholnFuKe4yC9xIQgCkWCc6OkYHXUhzhxqo+tYGOVItx31qXbvMz7I2ywArUCZosrRbNYzHAI+AK5bFLm5dn500dVJNdKjdJ6Pqx6+lOkrJmQ1T/P+Tg4+U0/DlpaM/QQkap3VVHo2AuxUVHlRNvNkRYDfF1gF/LYsMf3MHT33XJo/RCJZ8UQ5Vz1yaTb6mFC/8Sy7HzxCb6v1i026lIuP8jazz/0hwCpFldfalW+bAL8vUEIyK/v60a41/ghxjxvngD4iAkEilE4rZvk7VzNuTrFdPTIiFkyw/YeHOLblLA4kk8UlSCDi4vmiR4gIEYASRZU77cgWh+7Sjz8A4WsiCzUd3ZOPy9ShlziLls3i3i9vsrX4E5WtHF1/esh+rkIH/7B5PteuLkcCU4h04kTEYGF4+fm62oItAvy+wGTgTq9RpC6MLr5EQLTY6gw8Mz3M31yO6BpabO2LDVQu/YQP7qtlx49rbSlb8btyLr+3zGQByV3D4LuJucyMzwb4Z78vMMmOTLsW8BAQuy28Mm2EFZ0i9+9daEvYwUcb2P3TI/0U1m1o5K8/2Gtr7MJX53DRlb60z2/pXd7350N25A1JgN8XcAE/8hre0PTEZdPSiVm6eT55Y8xuMRjv/+QQu3/92YAs0UCj8f1ONl67Dy2mDylj2XvXILmtVS8wPExPzAS42+8LOC07DdB8aNwGSDdEbo6bvQ9A4PL7LmbKreOHFLR9SQ1fvHIaJ5JJhoFO08ff8D+BHajHQxnl5Ptd/ODNKy2fGQgs7l0G4AGWDKWTHQKWArFAfHah1fIll8iC567IKCDWneD1ebs4WnUGZ8at0yB0Ksbrs/bQvD9zEJ9++wTGBAotn5XoY/DpYyBZjMkIOwRUlGllMYfhKrCygInfK8FdnN7Sws1RXrtiJ0pNEBHBRpprkIhobKzYx5ldrRl7Tr7Rn0YCzEi6wQK/L+DJJMMOAaUXJ6Y5nEiWp7uJ149NO7C1RuUv8z8i2BixMc1AGOhsWrSf+r+kr31MXZre7crjswCmAnMyzWOHgNDExGTJKt0VMLj45lLLQac3t/HGvF10NWb25/QwEAyRqjtr+PiROsseZbeMx+1zWtpUygUgWYdMCzsEuHzGGGHwJAk0nPlOLrrCnPAcfaWRyhUHEBBHWBNI7u8Hnqxn5301lj3GzfUimoIq59cUJ2eawQ4B4XyjwBS5JES8l3iQCgaKOPLyaap+coAYiZwWRL5c38TeX5ktoXhqIWDeOp24+/60DhQp2CEg5jJcZooRKfCbI3rjzlZcOBBzXA1KkKDtow5Te1FpHpqFE0hGv8oZg6Cde4Fe0px4BdHc/L0/zKZoeiExNcbJba0EG3ttTJEekluk/IeTkPIl5q4252GCaJ2dOM8d1DJuO3YIKIkT093kDWgUMYj0aKbOBRe5ue7pcgC2/uOBERPg9DpY9N9z0j7vCWo4MDDSW1zGyoodAvLCYk/cqxUNyHMNBEKnw0l+08wdD5kJ6kP+ODeSKznQMKCnyXqrNDSDeI+Gs8DCC4FwYxg9lWEMmJt4358Z7xDsEKCflc5GS7UJBYMf9LbFaP9CZdwsnw0x5zDvP6dR8eRMJGcyBBmGwfG/NrPtnz4dwmDNaP6kk8GDBASCQn+1/Fim8XaCYHuH1IRuOgAnc7qze2zVHQag/F8mIbnE/ttBQRSYccd3cHqs33I6KEe6CTVFTAYYJ4HqaAXoAD7NJMMOATXHHF86tdSebFKiVrWn7Xno/SZuaouHEpZBNRNOVrVa6hQnwQlHA8D/KqrclkmGHQL+3il2aEGxs9FqXz9Z1YqhZ2e3Vv0NPRkLssHJLS2YA5CAWxD5zHkQkrdHGWGHgEogsdf9gWEVaXtaohxcc9yGmNyivbaLpv3mvEBA53Pn532Z4Kah5AxJQKq4+P4RV22JiB62ekn7H60jbrElalHr4oYeN7cbumHZX4vqlhaz/ceH0+pc7foIoMpOYdRuSWydgeHa49qtamhIg4bpCdh6e7VpkJXiAuA0Z9ZILhHDghitV0sGzPNw8DcNtH+uDpKbdNAGsZF2qQng+aEWBdmVxfdLSPOe7nop2kKb1zMoMRIwmHFXGbe+8d3+to5jIQ78ph4tlAyhIjC+YgxzV09DsDhfNvythboNZ+jza1EUuOyeSUy95dyx97Pf1/P31fVIDLQ4DQ0Dkbe962iQGk4pqnxJrglYAfzphuiC2JWRJWPzBsWD5AIFbnzqCmb9Yqotmdmi+Z12/rxyP4JF3hciStDRyPqCdQA/UlT5NTsybd8LKKr8LlDzseuTggKL80XyFt+g6peHqX5q2LfVaXGqqoXXVn6Y9sMiL4Vsy9sK0Gp38ZDdxQjAizEh1lPj2hlL18GNg08erqNyxQFaqrNPkgaj+1SYvT//kneXVOPEaUp5kxDoFptoSfr+6mzkD+dytBqY/e/dj0sFRt6QqfTMuydx1S8vxTfDm9U80a44Nc83UP24PGRfHZG1hU/SKXbWK6ocyGae4RAwH9g+NXFZ9K6eu0vtGtElS8Yz/fYJlC0uxTsx37JPpDPG2Q87OFHZzFdvNxELJiz7Dcanrn1sz98CcLWiyubtKAOG+4HEJmDxvaFV7aXalCnZZPCCKFA83UNRmQePP1m1iQYTdJ/uoftED/GeoS9G+mAAMSHOs0UPA7yjqPLKLFRJ6jNMArxAl4QUXN39sDPf8Hqyy+KTIRPOP033SbCvj4HOOu/vaJdaNKBYUeWerNQg+yAIgKLKIeBfNbTidzxvugSLmlxmnFukMKAtm5chcMC9l3apBeCe4SwehkkAgKLKG4DdZxzHHfUOGXDkuAqYHgYQEmLsynsPYFdKl2Fh2ASksBxIbCrYQI+okL7+kzv0ZZRvF6xFQ0sAt49E3ogIUFS5G1ipofFH70uA+ZyfWxgYSGz0bOCs9DXASkWVu0YicaQWgKLKm4H1XUIXW/O2ESGGY+RiTZAQiQIHnbuQnV8ArE/NPSLkRFNFle8Dvvrc/TG6o5MuRvT1qiW66MEhJtjh2QbwVWrOESOXr2ohwO8LXqBDNNfpRgaBBDFe8j4zYK5cIGcEKKrcCCxPkOBPhc+gC9nfCGfCW4Wv0i10A6xIzZUT5NRZFVXeAjwOsL5gLSqxEV2RORCJEmNT/pu0i60AT+TC789HzqOVosqPAZUtUjOH83cQJmH729/B6CTMGVcdda7DAFsVVf5VLnWFUfrJDIDfF6gHZtwQuZWK6PWWV9hD4ZDjEO8VvAXJoDeyT07TIPf71TlUAME9eVUcdx7FyIIAAWiTWvoWH0zJGhWMGgGKKivA9QAbPa9zQjpOmGjGbwYkRGLEaRXbWOftr2len5I1KhhNCyD1I4alAH/2rsWQetEzJMxR4kiCwbrC5/qalg33hxB2MaoEACiqXAncD/Bf3qdQxG/QLE6PAgYtQhdPFz3S1/SAosp/G239Rp0AAEWVXwV+DvBK4bOEhZDJFRLEeKOw3+wfUlR53YXQ7YIQAKCo8hpgDcALRb8mLJw7vifQeK7oCeJCDGCNosrPWEvJPUZtG0wHvy/wAvAgwH90P4aAyMuFz9GTvM9/UVHln15IfS44AQB+X+AlYJWQqvIbyZiwVlHlVRdal2+FAAC/L/Ay8EDqv+sUVX4gU//RwrdGAIDfF3gWQFHln31bOvwfX7MkK809f/0AAAAASUVORK5CYII=",rp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPI0lEQVR4nMWbe3RU1b3HP/uceWXymoRJQgiIEDGiolARWx/XFz56W7Raq9d6XeqqVltb8d1aqtfWKmpRsFitovVZH3i92qVYpMq1YrHVoghCOEh4hIS8TpKTZPKYmXP2vn/MZMIwk8zkxf2ulbWyf3vv3/79vmefvX+/vc8IpRTjiWCgaipwAjAXOBooB8oAf7xJGGgFGoBtwBfA303L2DKuhsUhxouAYKDqEuAa4DRAH4GKdcALwErTMjrG0LQkjDkBwUDVdcBPgKP6Zb7pXnKOd5NfmUtOuQ+9XEfP0RCAjCrsNgfZKumsCdG9Kay6P+8Vslf2G9YCPAk8bFpG+5gayxgSEAxUnQ08AMwG0As0yhYUU3hGHt5KD7rjwtEclJAIJZL6KhRSKtzChdQkdpcdsT9XzXVrGrtCH/XmAEEgBNxjWsZjY2JwHGNCQDBQ9QhwQ0wjTLpmAhPOL0L4BZoQMNwhNIHjOACodvVxwxMtG1rXdM4CjgE+Aa42LaNu1IYzSgKCgapy4E1gHkDwO0WUXBTAO8mDAJQYHblCCRAghcKxnJU776iv7anuuxAIABeblvH+qAZgFAQEA1UzgQ+AUi1PMOO/DsE/14ca9uPOHkrJvtBfe5+vWVx/KnA4cJlpGS+PRueICAgGqmYAnwF5vmkeDl0yEX9RLlI4o7ElIxQKTWi0r+l8bvd9DecAE4FLTct4ZaQ6h01AMFBVCHwFlOj5GrNWHobm0XF0O2VxGwrx2Q0q9qq4HBdKKBzNGVJPv73tq7rW1j7UOBcoAE43LeODYTkSx0gI+BSYm1PpZco9ZfjLfVn1O8I/g9n5x1LhLSfflU8uflAQ0aOEot20qBaMnq/4R8unREU0C8MF7a+Gqnc/UT+D2DJbYVpGy7CcAVzDaRwMVD1ALKJjxqOTwZPhSWlwUsHXuaBkAXPyj808wAQwy1pZ0/Y+T+97HiTouo5EprYVUPK9wMyG6sa94Q+dycA7wPHD8QeGMQOCgapZwCaAiT8qliXfK9Zcmk66/rrU8bl83Db1Bk4OnDhcmwBoiDTyx6YXWNO0Frfmir8vyVACfL25csPFX4TsLlkALDQt43fDGWc4BGwCZvln5TDjkQo0oaVd74USHFF4OL+auohiV1FKva1szGgrTZFmpJLku/Kp8JaTo+WkHffJlqd5o3YVUW2w10IQqYl0bL16VwExmgpNy+jMyimyJCAYqPo28Jaep3H065VKeETK8xBA1HGYX3Qav6y8PUXH6y1/Zp21nn3hRtqibUl1eXouQXeQWXlHcUnZhUz0lCXV/6vzc241fonLpaW1T0rBrtv3Wl0begLA46Zl/DijU/12Z0nAVmDmxCuCzsQrAzokGyIQ2NLhxKITuHf6XUl1W7qqWV7/B3b07YIsxtLQuGzixVxRflmSfEPX59y6fRG6lppXKSDaEu3YevEuP+AGirPNG9JTuh+CgarjgZkARefmOZrjTmnjSIdc4U9x/q+N73PzjkXs6N2ZlfMAEskLDa9wX+1DSfLj8ufwzSnnEHGiKaG1BuQW5RX6TnC3xkXXZTUYWRAAXAuQc4w76irTPUpLdaQvEuGuI3+WJFsdepflO1fgZLGlpUDA38yPuG37oiTx7aULKRUlSD3ZBgU4IkrFzSUasfOFH2Q7VDYEXABQ+f2pEk2gxAFbkoJvlMxjnm9uQrSu5SOW7XyK7tzQ8BOhOBxhs7FvK0tqHkmS3z/zbkSaLcF22RSWFZYWzMhtByqDgaqKbMYZkoBgoGoeUKz5NMRc5XGlO9cQcP3ka5JES/c9huOEETL7yDAdlGPzbtdaNnZuSsgO81dSrpeltNWUhqNscuZ5mgAJVGYzRqYZ8G8Avtle6RWe1AVTQKV7OtN9hyZE6zv/SacMjVlSpJRkyb7lSbKTCk+IBQEHQHdc5Mz29G8xX8tGfyYCZgPknKA5mkwNGjWlMX/SaUmyJ/Y+xYjnPfAfZRcxr+C4JFlDbyPr2tcnyvNLT0MJlZIz6Gi4j3QFgQiQrGQQZCKgEqC0okT2+npTKoXUODbv6ER5S2gb9ZHGbMZN1QX858RLuXrSFdxXeTdlB8QCfzbfTvw/wzuDUm8QoZLNj7gi5PvypxM7PRqTV6AMQFQIqdupTW09SqEqTJQ3dH4GqTFSRghgQfBbXFn+/YTsxaNW4I9Hh0JBi92a1Odw32E4up2sRwmkkDqxc8TSbMbOREABoPQCPW07N258ujdRrgvXD7rfD0aLAM6dcDY3TEneuv/U+DIRFU006rF7cNTAeUOJuwQtvfk24InbnhGZCPACSnhESjslFV7di1cbIKDdsVIUzM2fw9MzH+M7pedzYAghgLOK53PLIT9Nkq/Y9xzPNryMrQaecFiGCctIojzBV4jtpM0SFdBDLCLMiEzpsASUEGlWNQFImVQhDuBzfvHp/HzqzQBcX3E1jrJ5q3lV4jBkQfBbKU/+d3V/4O3mVYNPmTgyhPCR+F9GZJoBPYCSUWUfWCGEIKyiRPZ7KgF38qw7OvfIpPINk6/j+MK5aMDc/Lkpzq9seZO3m1eRLnzwal68midRbg934kr/ZkKMvq6hHOtHJgJaAWSvk5ZNW9n0yoHdYapvMmq/rWnZ3t/zbuvapD53TvsZ55cs4M5pyRnju23vs6Lu6bTOKwV+PQddDARiTdFmZPpZ4CZGgDW0azFkIqAO0MKN0XC6OalLF02qOVE+ueCklE1gSe3S2OlOHDmaj+sn/xC/PpD/P9XwAg/tWTaoEULAtJxpSbLqnm1IKQ9oJ5CO7AaKiN01ZkQmAqoBEdkSRempC47UbYyOHYny1JxDmOabktRGAa80vZYyE/rxbvtaXm1YGVtsBjFCAP8+4ZxEeVuPQXu0A11LNj9q23ikp4bY9r0tg29AZgI+BYS1MeRLd8ehlOK91g+SZFdMujwlFlDEZsKatmQS1rT/L0t2L00X1Q5AQIm/jHkFA5Ht+60fpm2qC4G1OdRNbPf61xBaE8hEwFqA7i/6/EoKqeSBLAh29u1kW8/2hOTkwq9TIooQaUj47Z6lfNzxCQAfd37Kb3c9nDloVvDz8huTRB91/j19UwG9W/qK48XqTKohAwGmZTQCG5wex9W5trsbdxpzBSyuXZIkuu+wX6HrHqSW/Noo4M6d9/BQ7XLurPn1kE9eKLBzFFdNvJxjCgbC7XXWeswDjtQgdrcghEbbaiuf2Pa9cyjf+pHNecDzgGh5tc2b/mgWarp288F+03Ja7qHcMX0h+d35pDtAWd26JuOg0gXz9NlcVn5xkvyBmqVpYwAhBLLD2di7L+IFVpuWEco4CNkR8CxAaHuvJ7JX2inhHOAWLh5pfCJJdmruKdw89SdIJFKppEOMTNNeaYozgqfy4IzfJMmXNC6nS4bShttKwr5nze3ErtKXZeEXkAUB8SPmFQAtr5launnr0l1YfRa31dxJVA4cgZ1acTKPVT7MGaWnIONxfCbnK/3TuLbsKhZNujVJvrrtPVbV/QW3y5V2kXXa7G2tb3YcB9QN59Y421PhEqAZYNYbh0mVrzSXnnw6JADbcSj3lPPSMU+n6Kju3s7a9g/4tHMDdeF9SXWFrgJm+o/g9KJTOLP4tJS+rzW9wfI9T+Bxp4b3Simi0qHhppZ17Zu7TgQuMC3jrYxO9ds9jIuR3wCL8o7yUfnoVIRSg8brs/KP5K5D76DIFUhb3xhpSroYOcQ7Gc9+Ye7+eKl1JSt2P5ey5/dDKYjW9jZvvXJvLlBtWsawrseGdTkaDFTVARWTf1qiSi4qFqnbYgyOlBS48rht6o2cHPjGcOxJoD7cwIr6Z/jQWo+AlG0VQAiFQldfnr8jZHfY+UClaRlZrf4JHcMkYA6x7wI44oXp+Ka4B83/VXyGfC1/DsflH8uZRadS4ikZUr9C8bf2j/isayOr297DURKUSut83Hy2/2h3b8+2cA5wk2kZy7J2pl/DCK7HbwSW6kUaM146hJwcb6bUNAYlmF14NEf6j2CKdwpF7kIEgj4Zpq6vnj3hPWzq3kpDb+MQDvcbDVKDhudaZPMz7RrwlmkZ5w3LkYSukX0h8jpwYekpxZTeXYQutIxGA0gpEULE/uILiCL2hB3HiddpZNorpEsR/iyKsXA3xJKeCtMyRnQSO5pvhGqBKcE78imfX4bb5UrJzsYDCohIm+0LduP0SICjTMvYOlJ92QRCg+FMAHNxF2KvTl84PApV2UEJEJqi9qr6fud/MBrnYRQEmJbxFXA5wJbrvkIzddRo6MwATWjYMsqeJ1vorg0DPGdaxh9HrXc0nU3LeBF40umT7HyqFrf0ZuwzUkSiEcQmjfY/WQDbTMu4ciz0jvqZmZZxLbC5Z22E0FshvLYPeeAF6iighAIlEO1uttyyE2LLwPyx0j9Wk/YswNn28C7qv2zAa4/dTNCljoODce8OlKMALjQto36s9I8JAaZlNAHnAdTd2oKv15+hR3ZQKLyRHJofbSXyhQOxL8bfHBPlcYzZsmVaxjvA/Tjw5e+r0bWs7iWGhCY1GjY30vQ/7QD/NC3jllErPXCMsVRmWsYdwLr21SEaXmmJJUwjhECgt7vZs7gBYvcTZ4+RmUkYj43rm0DnvsebCX3Zi8p0xTMINOFi8y3bULHTr3OH8+nbsMYZa4WmZXQD5wDsurcJpeyswuT9oRDsur+W8B4b4BemZawbazv7MS6hi2kZ/wAetJuitDzYQaivJ+u+0qXo+zJM2+ougL+YlrF4PGzsxzjGbvwCaGxYbWI+1YbQspsFkYYINYv2QizJGVGGNxyMGwGmZTjEF672/+6md6eNbafcsQ5AgNIlu67bh93pQOxnMUN0GBuM5wzAtIzNwA8Bam7ag78vN+2X35rQkMpm96PNhNuiEPup3DvjaVti7PEewLSMFcCLUcvm88Vb8Nn+lHS/NxxGVWt0rOwE2G1axiXjbVc/xp0AANMyLge2R9dLGp9pwSNj+YJCoRSIao3NP05csp5xMGzqx0EhII6zAGpfaqCppgV/JBdd6SCh+v6a/jaXmpax6yDadPAIMC2jFvguQO3CBpy+KJ6oj85nQqjYl3WPj+bHTyPFuP12eDAEA1XLgIXF5xWQe0YOe29sAthoWsacg2pIHAedAIBgoOoTBn7fEyF2qGkedEM4uGvA/tg/sVnw/+U8wP8BirtMKB0OWwYAAAAASUVORK5CYII=",sp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAPDElEQVR4nMWbeZyUxZnHv/W+b3dPz9kwjYKoC4pOUNF4g3hsDIrBAOpKjEfcKJFNVtd4xGvXuCresuvGENe4q0ZX+BDXZI26XjEBjcixHjAgwwvI6SDDvDPzTs/0Md3vW7V/dE8f0z3MO0MP/v5636rnfep5fl1VT9VT1UIpxXAiHGqoAr4NnApMAg4DxgKVGZEEsBtoBtYBnwDvWLYZGVbDMhDDRUA41PAt4ApgNjBqkJ+3A/8LLLZs8+1y25aPshMQDjWcB9wHTOktGyl8TPHVcrJRq47RK8Vo4ade86EjcFDYyqFF9qgNbkysdrpY6XTSJlO9n38M3GHZ5p/LamgGZSMgHGqoBx4HruktO8NXo+b4R6sZvnoRFJrwqiuqXN5y2nk50cJKJzsSXgJutWxzb1kMzqAsBIRDDZcCzwAjAM4UdVwbOEROq6zTUNrQlCpAwLtOB/8Ra2aVGwGIAPMs2/ztfhudwX4TEA413AU8BKixWkA+XjWBqb4aHWEgpCLtyf5jqdOhbuzeLDqVA3C9ZZtPlUPvfhEQDjXcCjwG9Jyq17ovVk+sqNJ0A0G5/M5CCWiVydS1kSbZKKN+4BbLNv9tf/UOmYBwqOE24H7AutY/1rmvctw4JYY3pCohEFIyL2pG3k61+4E7Ldv8xf7oHBIB4VDDVcCTwPa7q8bVzguMORLlYY4TvV1DUSCfT9xAejLVD8W/3PV0fOcI4BrLNl8ZlAP56gZLQDjUMAlYBnRcZhzU/tjIo08VKTnAV+k2jLMmoZ3xDbSJ4yBcg6gKoCJxaO3CbdyKXN6E++nGgUkApB5kdseKdWvd2HjgRMs2twzKkQyGQsB6QB9HMLis/riDNeWr2Nd4FwfXYcw+C+OyMxFHHDygfrl+F86S93FfW47qSvQrp4SBK3rap7St3tWCarZs88JBOdJr32AICIcapgOLqoTuaxw5FUMka4WjZbtlXxj/MBP/9TMh4Bu0YcqO4jz6MqklH/QjIJGGj4jytx7f9qcu4GrLNpcPtp3BErAVGPOrim+surC25hwt6e8zfkHpAjRJ4MG5GN87q6Qe2bgN9WUbMhpFq6lFHB5GO+awkrKpZ94m+ejLCBS4FJKtQAYcft62e/l/OV/WWLZ5gmdnMvBMQDjUMA9YUIeINo46p1Y4qcqiWCdAS4H/pdvRzplYUCU/34n78kc4yz5B7bIyhYCW1qEdMRbjvBPRLp2KduSYgm/dJctI3vECSqdEeNVIGXRMbP0wmYSbLNtc4smhXpMHQUAzUPemb2LLMSNHHKEli2Ucv0HNL65HXPDNXGE8Sc8NC3GXNqJQiH2sDJUGQoI+83QCT/64oE6+9Bei9z+Lnuo73gTSr/PG3i+23KCapWWbDZ4cysDTOjUcapgBjKwVvo5ja+uP0JLFpEmlqPy7aQXOq72dJGbch7O0EZRIOy8oWh2rzDZBZIKJ+/oqEnMehp7shgjtqrPwnzkJKfu2rdBSMK3ukFHA2HCoofS46wdeF+rzAOOiyvo4UtJ31lNCoI2ow7jhklxZNEHPzHuRO5oRvWFNgKirJHDtBQQW30HFnx4m8NxN+K88F/r0RPl/m4hf9nBBWeDB66CmBlSfsCuTBLWKusm+kUngRx59Sps00BAIhxoqgDbA/2HtSa2H6xVj+spIw6Fq4Z2I6cdmyxKz7kOu214oWBcg+NbDiDEjitqRa7cRn/MQIuVkyxTgO+8U/M9cnyt79k1ij7yCcHolcliWau++untjCghbtjnQ4gTw1gPOBowRwtd9uBEoch4h0MeOKXDeff6PyMbtBWJKdwg+fWdJ5wG0E8YTXDAX5eacEkDPn5uQ767Ilc2dgagLFUafjPQU38igDiFgsge/0u16kDkDcC/QRrkl471S+K6eVlCUXPDfhYs5BcY3GxCTx+WK1jaRevF9VHNbzphZk9FqKsgfYpqM4iwsTAoZZx5dcrMVEJo+VauAvGTMQPBCwCRA++vK6hiyH/FJ47OP8oM1yFhRuEY7+tDce1uE+MX/QureF0nMvh/iuZCinXwU+cNSKEiu+wq1aVeu7LRjShihQLlMSo/QQzz4lW7Pg8w4QByrVSdL0S6EQD9idPbdff1D0PU+QoCeo0S1RzMPLqotgkrkCBA1lfRtR+g67qvLsu/6aRP6MVVQi1RA3YBeZWB4kBkFGKOEv6KoRoGYMBpRX5Mtcta0IJwYiBy3AlAd0ey7dtQYjGunIVc0YcyejBhRna1zm3YiROFYE04M57M9WWO18aMRdVWozih9UScMAVQXVfQDLwRUA4kKoVUV1QjgsFzCV3XFUTv2FDjfC2d5E/68d//d3y+SUa2dyC++oih9KDTU1t25d11DHB5GrSsmIJju1IF9u5SDlyFgkM7dF+1olC7QjTwOIzHIC2MFsh3dOP/03D4bcu5+PpMzKIFYDyRzuoXhzy6g8qGnZx+9qKIfeOkBvfG0eAJQoNy8cBvwgSagaLWW9qtn0fu4HSl8s09HTD4q3Y1bO1GrttCzaCnyo/XFv34vfDroeb+XdIsjYc5IT2sA8EZAAhAuShmIgrElXInsyB3giPoaxEEjUXssSu2RhdBw31kBhsA3/qA0ATssUn9Yjlq5D+chvX7II0C2dRatHgFS6QCcKqroB14IsIH6pJIJQ/TtWQK1bW/6F9cECIH2V9W4LRFQxTb4fnIhxnXTESNyk6Z2ypEETrkR1WyRevpNnEXvg+qz71XAhLw1WGcMtbu9pLEJ5QLEPfiVbt+DTDMQaIVu1bdnCaAjgms2Z4uM70xGGX1m8doggadvxHf7pQXOF8iMDeOffzX++d9DVeUHHAmGhu+752RLnNUbEW6JXq4UXeknz+eKXgj4HAh+HNvmoFcWVUo9CJty6Tj9sm8jkon0CkYBPqh4az769BMLbe2MIjc3Q6JwX21cOZ3g83egMrl1pVWgjfShn5db/KgPPkHqJaKyXsGeHgvSexdP8ELAB4DxB5moTnfNQggk7ntrcwUVPvTTjkfpoJQicNV3EIfU5+pbu0jc/AyJqbeSOP9u4lNvpefu3xRMnNqp4/FNPQ6lK5TuYFzwrYI2ZeOXCIptQUk+VEmAlR78SrflQeYtwF3mRMIRp8sumtxUiuTb62BrS7Yo8O8/AkeBpqHfcXFOdP0m4rMeRv7PClQ0/cur9ijOomX0zHwMtu7MyvoX/hhcHc0nMG6bldOxahPOhmaQfecYQaNjsVkmosAfvbnvgQDLNqPAy0DVU9FtUaX3WWMoEErSc/uiXFl9HcEH5mL8zRm5hGjCIX71c8iWXRkOVVaBQJDa9DmJGxfndIQqMS46neCvb4GaYLY4ftdvEG6KopyEHuCJ7m0AL1m2WXoxUgKeUmLhUMNEYEO98MU/HXFqsDj+arhCUf3KLYiTjiupw12+jp4fPFEydAEoJRGaj8rPfgl1wZIy8qUPiN3zLFqflJISgpjrMLFzFcA4yzZ3DOhU1nIPsGyzCXijTaWCi2N7Y0rrOwNLdCmJ3fV7aOksbfzG3fs8LxRCA1yclZ+XFti8k9gTi9BkiUWecFkQ+xLSFyo8Ow/eU2KQTotxV2JL0HJcJ5vAyxohUFu2k5wxv3RDRx0CQYN0XkxlokTeMyDqqtFG1xd/HImRmPHPCNstToRIxSa3h2dTzQA3DMKfdJuDPBe4B7hvdkW9Wlh5lFBF2c30/sA493gCv/5penGUX90WwX33M+TyJuTOVlRXN6KuFm38QWhnH4sx7cSC8Q6guuP0XP447oYdCNct3isIOL9rLRtT0ZuHclo8lKOxBBBYXDlJTa2oFqKfczwxbjT+e69AP2fSYG3KwnltFamHlqBa7JL1Sih+H2vl5sSWrZZtHjmUNoZCwFzgPwWwJnwSI9wA/Z6NAfqcs/D/7BLEQSHPbajtLSQf/C3ue5/1LyRgu+rh7I5PAGZatvmG5wby1QzxePwt4IKLfGGeqGtAdwfQEfBhXDwFY9ZktJMmlDwrVJEY6uNNOK+uwHl99cBGSMn06DqanOjvLNu8dNBOZDBUAgJAK1CzIDiBOcGDEQPpydz5ESNr0CYciqipQAV0RMJBdcaRG3egov2fBhcYLRULU7vVo7EdrcBoyzaHfDNjf26ITAE+AlgbOpmQqEgfYHprNRMSRW5W93LBIv0FK2W3O6ezUQdOsGyzcbC252OIV7jAss0VwN0Av+xpRvoc7/eClCA7byjh2XkAdMHN3aYG3Ly/zkN5boltBBqeMY7j/LpKNOklxTAUuEhfDTdZ63lV7llq2ea55dA65B6QhysB5jnr6VAuw3X1Vhq1vNixilflHoAflkvvfhNg2eYnwG0Af9u1Gemvy6z3y0SEAoWi3a8zP9UF8BPLNncO9JlXlPOq7GvAzO/7qnik9jg0GQA8b8r6hyZIJl3OjnzKbpFcYtnm5fuvNE99GXXNBr5akoryUbwHpZeHWIVgfnIbu0VyW7mdhzISkInF5wJcEVtDxLBzG56hQAGa4N1UOy/0tNCru9woZw/Ass2NwM8B5lk7UY4BRVtnb1C6oLknwXWRDQA/tGxze9kMzUNZCQCwbPMBYMMKp5OnkrtRPq3fJMi+IH0VzI1uBPjUss0Xym1nL8pOQAbnAu6jiS9YG2tHDWoYCCQaD7StYYOKxhmmrt+LYSHAss0W4EKAWV1NRANVKGEwcGhUoFew1LV5NtUGMN2yzdIppjJhuHoAlm2+A8wHuK5jNSoZZ8AzS6HTnrS5LvI5pG+C/2W47OvFsBEAYNnmPcDHy1OdLHZ2ICtKnwr1wg2M4PKuNTioNy3bfHQ4bevFsBKQwQ8A/jGxl13xCIpS1z0VUhgssNfTlD58ufIA2AUcAAIyofGnABdFVpNUMVSfCxRK01mR+IpfxbcBzLVs0x5uu3pxIHoAlm0+CfyuTaa4v3szyhfKqxUoo5q/j20GeMGyzX3foigzhu2Pk6UQDjXsAg7915qjuUQbiaZpCBTXdG/ivVTbZss2jz5gxmRwQHpAHqYB3NK1iXaRwtU0no7v5r10yJu270+HBweUAMs2TeBnAA/GdrIp1c1jiZ0AV5RzizsYHNAh0ItwqGEb6fuHAI1D+aNDuXCgh0Avzst7/u7XZAPwNfUAgHCo4V4gYdnmI1+LARn8P0TdSRGR8ht7AAAAAElFTkSuQmCC";(function(r,t,e){function n(i,s){for(;(i=i.parentElement)&&!i.classList.contains(s););return i}L.drawVersion="1.0.4",L.Draw={},L.drawLocal={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes",text:"Save"},cancel:{title:"Cancel editing, discards all changes",text:"Cancel"},clearAll:{title:"Clear all layers",text:"Clear All"}},buttons:{edit:"Edit layers",editDisabled:"No layers to edit",remove:"Delete layers",removeDisabled:"No layers to delete"}},handlers:{edit:{tooltip:{text:"Drag handles or markers to edit features.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove."}}}}},L.Draw.Event={},L.Draw.Event.CREATED="draw:created",L.Draw.Event.EDITED="draw:edited",L.Draw.Event.DELETED="draw:deleted",L.Draw.Event.DRAWSTART="draw:drawstart",L.Draw.Event.DRAWSTOP="draw:drawstop",L.Draw.Event.DRAWVERTEX="draw:drawvertex",L.Draw.Event.EDITSTART="draw:editstart",L.Draw.Event.EDITMOVE="draw:editmove",L.Draw.Event.EDITRESIZE="draw:editresize",L.Draw.Event.EDITVERTEX="draw:editvertex",L.Draw.Event.EDITSTOP="draw:editstop",L.Draw.Event.DELETESTART="draw:deletestart",L.Draw.Event.DELETESTOP="draw:deletestop",L.Draw.Event.TOOLBAROPENED="draw:toolbaropened",L.Draw.Event.TOOLBARCLOSED="draw:toolbarclosed",L.Draw.Event.MARKERCONTEXT="draw:markercontext",L.Draw=L.Draw||{},L.Draw.Feature=L.Handler.extend({initialize:function(i,s){this._map=i,this._container=i._container,this._overlayPane=i._panes.overlayPane,this._popupPane=i._panes.popupPane,s&&s.shapeOptions&&(s.shapeOptions=L.Util.extend({},this.options.shapeOptions,s.shapeOptions)),L.setOptions(this,s);var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.Draw.Feature.include(L.Evented.prototype):L.Draw.Feature.include(L.Mixin.Events)},enable:function(){this._enabled||(L.Handler.prototype.enable.call(this),this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DRAWSTART,{layerType:this.type}))},disable:function(){this._enabled&&(L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DRAWSTOP,{layerType:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(L.DomUtil.disableTextSelection(),i.getContainer().focus(),this._tooltip=new L.Draw.Tooltip(this._map),L.DomEvent.on(this._container,"keyup",this._cancelDrawing,this))},removeHooks:function(){this._map&&(L.DomUtil.enableTextSelection(),this._tooltip.dispose(),this._tooltip=null,L.DomEvent.off(this._container,"keyup",this._cancelDrawing,this))},setOptions:function(i){L.setOptions(this,i)},_fireCreatedEvent:function(i){this._map.fire(L.Draw.Event.CREATED,{layer:i,layerType:this.type})},_cancelDrawing:function(i){i.keyCode===27&&(this._map.fire("draw:canceled",{layerType:this.type}),this.disable())}}),L.Draw.Polyline=L.Draw.Feature.extend({statics:{TYPE:"polyline"},Poly:L.Polyline,options:{allowIntersection:!0,repeatMode:!1,drawError:{color:"#b00b00",timeout:2500},icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),guidelineDistance:20,maxGuideLineLength:4e3,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!1,clickable:!0},metric:!0,feet:!0,nautic:!1,showLength:!0,zIndexOffset:2e3,factor:1,maxPoints:0},initialize:function(i,s){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this.options.drawError.message=L.drawLocal.draw.handlers.polyline.error,s&&s.drawError&&(s.drawError=L.Util.extend({},this.options.drawError,s.drawError)),this.type=L.Draw.Polyline.TYPE,L.Draw.Feature.prototype.initialize.call(this,i,s)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._markers=[],this._markerGroup=new L.LayerGroup,this._map.addLayer(this._markerGroup),this._poly=new L.Polyline([],this.options.shapeOptions),this._tooltip.updateContent(this._getTooltipText()),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("mouseout",this._onMouseOut,this).on("mousemove",this._onMouseMove,this).on("mousedown",this._onMouseDown,this).on("mouseup",this._onMouseUp,this).addTo(this._map),this._map.on("mouseup",this._onMouseUp,this).on("mousemove",this._onMouseMove,this).on("zoomlevelschange",this._onZoomEnd,this).on("touchstart",this._onTouch,this).on("zoomend",this._onZoomEnd,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._clearHideErrorTimeout(),this._cleanUpShape(),this._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers,this._map.removeLayer(this._poly),delete this._poly,this._mouseMarker.off("mousedown",this._onMouseDown,this).off("mouseout",this._onMouseOut,this).off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._clearGuides(),this._map.off("mouseup",this._onMouseUp,this).off("mousemove",this._onMouseMove,this).off("zoomlevelschange",this._onZoomEnd,this).off("zoomend",this._onZoomEnd,this).off("touchstart",this._onTouch,this).off("click",this._onTouch,this)},deleteLastVertex:function(){if(!(this._markers.length<=1)){var i=this._markers.pop(),s=this._poly,a=s.getLatLngs(),h=a.splice(-1,1)[0];this._poly.setLatLngs(a),this._markerGroup.removeLayer(i),s.getLatLngs().length<2&&this._map.removeLayer(s),this._vertexChanged(h,!1)}},addVertex:function(i){if(this._markers.length>=2&&!this.options.allowIntersection&&this._poly.newLatLngIntersects(i))return void this._showErrorTooltip();this._errorShown&&this._hideErrorTooltip(),this._markers.push(this._createMarker(i)),this._poly.addLatLng(i),this._poly.getLatLngs().length===2&&this._map.addLayer(this._poly),this._vertexChanged(i,!0)},completeShape:function(){this._markers.length<=1||!this._shapeIsValid()||(this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable())},_finishShape:function(){var i=this._poly._defaultShape?this._poly._defaultShape():this._poly.getLatLngs(),s=this._poly.newLatLngIntersects(i[i.length-1]);if(!this.options.allowIntersection&&s||!this._shapeIsValid())return void this._showErrorTooltip();this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_shapeIsValid:function(){return!0},_onZoomEnd:function(){this._markers!==null&&this._updateGuide()},_onMouseMove:function(i){var s=this._map.mouseEventToLayerPoint(i.originalEvent),a=this._map.layerPointToLatLng(s);this._currentLatLng=a,this._updateTooltip(a),this._updateGuide(s),this._mouseMarker.setLatLng(a),L.DomEvent.preventDefault(i.originalEvent)},_vertexChanged:function(i,s){this._map.fire(L.Draw.Event.DRAWVERTEX,{layers:this._markerGroup}),this._updateFinishHandler(),this._updateRunningMeasure(i,s),this._clearGuides(),this._updateTooltip()},_onMouseDown:function(i){if(!this._clickHandled&&!this._touchHandled&&!this._disableMarkers){this._onMouseMove(i),this._clickHandled=!0,this._disableNewMarkers();var s=i.originalEvent,a=s.clientX,h=s.clientY;this._startPoint.call(this,a,h)}},_startPoint:function(i,s){this._mouseDownOrigin=L.point(i,s)},_onMouseUp:function(i){var s=i.originalEvent,a=s.clientX,h=s.clientY;this._endPoint.call(this,a,h,i),this._clickHandled=null},_endPoint:function(i,s,a){if(this._mouseDownOrigin){var h=L.point(i,s).distanceTo(this._mouseDownOrigin),c=this._calculateFinishDistance(a.latlng);this.options.maxPoints>1&&this.options.maxPoints==this._markers.length+1?(this.addVertex(a.latlng),this._finishShape()):c<10&&L.Browser.touch?this._finishShape():Math.abs(h)<9*(r.devicePixelRatio||1)&&this.addVertex(a.latlng),this._enableNewMarkers()}this._mouseDownOrigin=null},_onTouch:function(i){var s,a,h=i.originalEvent;!h.touches||!h.touches[0]||this._clickHandled||this._touchHandled||this._disableMarkers||(s=h.touches[0].clientX,a=h.touches[0].clientY,this._disableNewMarkers(),this._touchHandled=!0,this._startPoint.call(this,s,a),this._endPoint.call(this,s,a,i),this._touchHandled=null),this._clickHandled=null},_onMouseOut:function(){this._tooltip&&this._tooltip._onMouseOut.call(this._tooltip)},_calculateFinishDistance:function(i){var s;if(this._markers.length>0){var a;if(this.type===L.Draw.Polyline.TYPE)a=this._markers[this._markers.length-1];else{if(this.type!==L.Draw.Polygon.TYPE)return 1/0;a=this._markers[0]}var h=this._map.latLngToContainerPoint(a.getLatLng()),c=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset}),d=this._map.latLngToContainerPoint(c.getLatLng());s=h.distanceTo(d)}else s=1/0;return s},_updateFinishHandler:function(){var i=this._markers.length;i>1&&this._markers[i-1].on("click",this._finishShape,this),i>2&&this._markers[i-2].off("click",this._finishShape,this)},_createMarker:function(i){var s=new L.Marker(i,{icon:this.options.icon,zIndexOffset:2*this.options.zIndexOffset});return this._markerGroup.addLayer(s),s},_updateGuide:function(i){var s=this._markers?this._markers.length:0;s>0&&(i=i||this._map.latLngToLayerPoint(this._currentLatLng),this._clearGuides(),this._drawGuide(this._map.latLngToLayerPoint(this._markers[s-1].getLatLng()),i))},_updateTooltip:function(i){var s=this._getTooltipText();i&&this._tooltip.updatePosition(i),this._errorShown||this._tooltip.updateContent(s)},_drawGuide:function(i,s){var a,h,c,d=Math.floor(Math.sqrt(Math.pow(s.x-i.x,2)+Math.pow(s.y-i.y,2))),f=this.options.guidelineDistance,p=this.options.maxGuideLineLength,m=d>p?d-p:f;for(this._guidesContainer||(this._guidesContainer=L.DomUtil.create("div","leaflet-draw-guides",this._overlayPane));m<d;m+=this.options.guidelineDistance)a=m/d,h={x:Math.floor(i.x*(1-a)+a*s.x),y:Math.floor(i.y*(1-a)+a*s.y)},c=L.DomUtil.create("div","leaflet-draw-guide-dash",this._guidesContainer),c.style.backgroundColor=this._errorShown?this.options.drawError.color:this.options.shapeOptions.color,L.DomUtil.setPosition(c,h)},_updateGuideColor:function(i){if(this._guidesContainer)for(var s=0,a=this._guidesContainer.childNodes.length;s<a;s++)this._guidesContainer.childNodes[s].style.backgroundColor=i},_clearGuides:function(){if(this._guidesContainer)for(;this._guidesContainer.firstChild;)this._guidesContainer.removeChild(this._guidesContainer.firstChild)},_getTooltipText:function(){var i,s,a=this.options.showLength;return this._markers.length===0?i={text:L.drawLocal.draw.handlers.polyline.tooltip.start}:(s=a?this._getMeasurementString():"",i=this._markers.length===1?{text:L.drawLocal.draw.handlers.polyline.tooltip.cont,subtext:s}:{text:L.drawLocal.draw.handlers.polyline.tooltip.end,subtext:s}),i},_updateRunningMeasure:function(i,s){var a,h,c=this._markers.length;this._markers.length===1?this._measurementRunningTotal=0:(a=c-(s?2:1),h=L.GeometryUtil.isVersion07x()?i.distanceTo(this._markers[a].getLatLng())*(this.options.factor||1):this._map.distance(i,this._markers[a].getLatLng())*(this.options.factor||1),this._measurementRunningTotal+=h*(s?1:-1))},_getMeasurementString:function(){var i,s=this._currentLatLng,a=this._markers[this._markers.length-1].getLatLng();return i=L.GeometryUtil.isVersion07x()?a&&s&&s.distanceTo?this._measurementRunningTotal+s.distanceTo(a)*(this.options.factor||1):this._measurementRunningTotal||0:a&&s?this._measurementRunningTotal+this._map.distance(s,a)*(this.options.factor||1):this._measurementRunningTotal||0,L.GeometryUtil.readableDistance(i,this.options.metric,this.options.feet,this.options.nautic,this.options.precision)},_showErrorTooltip:function(){this._errorShown=!0,this._tooltip.showAsError().updateContent({text:this.options.drawError.message}),this._updateGuideColor(this.options.drawError.color),this._poly.setStyle({color:this.options.drawError.color}),this._clearHideErrorTimeout(),this._hideErrorTimeout=setTimeout(L.Util.bind(this._hideErrorTooltip,this),this.options.drawError.timeout)},_hideErrorTooltip:function(){this._errorShown=!1,this._clearHideErrorTimeout(),this._tooltip.removeError().updateContent(this._getTooltipText()),this._updateGuideColor(this.options.shapeOptions.color),this._poly.setStyle({color:this.options.shapeOptions.color})},_clearHideErrorTimeout:function(){this._hideErrorTimeout&&(clearTimeout(this._hideErrorTimeout),this._hideErrorTimeout=null)},_disableNewMarkers:function(){this._disableMarkers=!0},_enableNewMarkers:function(){setTimeout((function(){this._disableMarkers=!1}).bind(this),50)},_cleanUpShape:function(){this._markers.length>1&&this._markers[this._markers.length-1].off("click",this._finishShape,this)},_fireCreatedEvent:function(){var i=new this.Poly(this._poly.getLatLngs(),this.options.shapeOptions);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.Polygon=L.Draw.Polyline.extend({statics:{TYPE:"polygon"},Poly:L.Polygon,options:{showArea:!1,showLength:!1,shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},metric:!0,feet:!0,nautic:!1,precision:{}},initialize:function(i,s){L.Draw.Polyline.prototype.initialize.call(this,i,s),this.type=L.Draw.Polygon.TYPE},_updateFinishHandler:function(){var i=this._markers.length;i===1&&this._markers[0].on("click",this._finishShape,this),i>2&&(this._markers[i-1].on("dblclick",this._finishShape,this),i>3&&this._markers[i-2].off("dblclick",this._finishShape,this))},_getTooltipText:function(){var i,s;return this._markers.length===0?i=L.drawLocal.draw.handlers.polygon.tooltip.start:this._markers.length<3?(i=L.drawLocal.draw.handlers.polygon.tooltip.cont,s=this._getMeasurementString()):(i=L.drawLocal.draw.handlers.polygon.tooltip.end,s=this._getMeasurementString()),{text:i,subtext:s}},_getMeasurementString:function(){var i=this._area,s="";return i||this.options.showLength?(this.options.showLength&&(s=L.Draw.Polyline.prototype._getMeasurementString.call(this)),i&&(s+="<br>"+L.GeometryUtil.readableArea(i,this.options.metric,this.options.precision)),s):null},_shapeIsValid:function(){return this._markers.length>=3},_vertexChanged:function(i,s){var a;!this.options.allowIntersection&&this.options.showArea&&(a=this._poly.getLatLngs(),this._area=L.GeometryUtil.geodesicArea(a)),L.Draw.Polyline.prototype._vertexChanged.call(this,i,s)},_cleanUpShape:function(){var i=this._markers.length;i>0&&(this._markers[0].off("click",this._finishShape,this),i>2&&this._markers[i-1].off("dblclick",this._finishShape,this))}}),L.SimpleShape={},L.Draw.SimpleShape=L.Draw.Feature.extend({options:{repeatMode:!1},initialize:function(i,s){this._endLabelText=L.drawLocal.draw.handlers.simpleshape.tooltip.end,L.Draw.Feature.prototype.initialize.call(this,i,s)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._mapDraggable=this._map.dragging.enabled(),this._mapDraggable&&this._map.dragging.disable(),this._container.style.cursor="crosshair",this._tooltip.updateContent({text:this._initialLabelText}),this._map.on("mousedown",this._onMouseDown,this).on("mousemove",this._onMouseMove,this).on("touchstart",this._onMouseDown,this).on("touchmove",this._onMouseMove,this),t.addEventListener("touchstart",L.DomEvent.preventDefault,{passive:!1}))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._mapDraggable&&this._map.dragging.enable(),this._container.style.cursor="",this._map.off("mousedown",this._onMouseDown,this).off("mousemove",this._onMouseMove,this).off("touchstart",this._onMouseDown,this).off("touchmove",this._onMouseMove,this),L.DomEvent.off(t,"mouseup",this._onMouseUp,this),L.DomEvent.off(t,"touchend",this._onMouseUp,this),t.removeEventListener("touchstart",L.DomEvent.preventDefault),this._shape&&(this._map.removeLayer(this._shape),delete this._shape)),this._isDrawing=!1},_getTooltipText:function(){return{text:this._endLabelText}},_onMouseDown:function(i){this._isDrawing=!0,this._startLatLng=i.latlng,L.DomEvent.on(t,"mouseup",this._onMouseUp,this).on(t,"touchend",this._onMouseUp,this).preventDefault(i.originalEvent)},_onMouseMove:function(i){var s=i.latlng;this._tooltip.updatePosition(s),this._isDrawing&&(this._tooltip.updateContent(this._getTooltipText()),this._drawShape(s))},_onMouseUp:function(){this._shape&&this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()}}),L.Draw.Rectangle=L.Draw.SimpleShape.extend({statics:{TYPE:"rectangle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showArea:!0,metric:!0},initialize:function(i,s){this.type=L.Draw.Rectangle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.rectangle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,s)},disable:function(){this._enabled&&(this._isCurrentlyTwoClickDrawing=!1,L.Draw.SimpleShape.prototype.disable.call(this))},_onMouseUp:function(i){if(!this._shape&&!this._isCurrentlyTwoClickDrawing)return void(this._isCurrentlyTwoClickDrawing=!0);this._isCurrentlyTwoClickDrawing&&!n(i.target,"leaflet-pane")||L.Draw.SimpleShape.prototype._onMouseUp.call(this)},_drawShape:function(i){this._shape?this._shape.setBounds(new L.LatLngBounds(this._startLatLng,i)):(this._shape=new L.Rectangle(new L.LatLngBounds(this._startLatLng,i),this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Rectangle(this._shape.getBounds(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_getTooltipText:function(){var i,s,a,h=L.Draw.SimpleShape.prototype._getTooltipText.call(this),c=this._shape,d=this.options.showArea;return c&&(i=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),s=L.GeometryUtil.geodesicArea(i),a=d?L.GeometryUtil.readableArea(s,this.options.metric):""),{text:h.text,subtext:a}}}),L.Draw.Marker=L.Draw.Feature.extend({statics:{TYPE:"marker"},options:{icon:new L.Icon.Default,repeatMode:!1,zIndexOffset:2e3},initialize:function(i,s){this.type=L.Draw.Marker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.marker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,s)},addHooks:function(){L.Draw.Feature.prototype.addHooks.call(this),this._map&&(this._tooltip.updateContent({text:this._initialLabelText}),this._mouseMarker||(this._mouseMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"leaflet-mouse-marker",iconAnchor:[20,20],iconSize:[40,40]}),opacity:0,zIndexOffset:this.options.zIndexOffset})),this._mouseMarker.on("click",this._onClick,this).addTo(this._map),this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onTouch,this))},removeHooks:function(){L.Draw.Feature.prototype.removeHooks.call(this),this._map&&(this._map.off("click",this._onClick,this).off("click",this._onTouch,this),this._marker&&(this._marker.off("click",this._onClick,this),this._map.removeLayer(this._marker),delete this._marker),this._mouseMarker.off("click",this._onClick,this),this._map.removeLayer(this._mouseMarker),delete this._mouseMarker,this._map.off("mousemove",this._onMouseMove,this))},_onMouseMove:function(i){var s=i.latlng;this._tooltip.updatePosition(s),this._mouseMarker.setLatLng(s),this._marker?(s=this._mouseMarker.getLatLng(),this._marker.setLatLng(s)):(this._marker=this._createMarker(s),this._marker.on("click",this._onClick,this),this._map.on("click",this._onClick,this).addLayer(this._marker))},_createMarker:function(i){return new L.Marker(i,{icon:this.options.icon,zIndexOffset:this.options.zIndexOffset})},_onClick:function(){this._fireCreatedEvent(),this.disable(),this.options.repeatMode&&this.enable()},_onTouch:function(i){this._onMouseMove(i),this._onClick()},_fireCreatedEvent:function(){var i=new L.Marker.Touch(this._marker.getLatLng(),{icon:this.options.icon});L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)}}),L.Draw.CircleMarker=L.Draw.Marker.extend({statics:{TYPE:"circlemarker"},options:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0,zIndexOffset:2e3},initialize:function(i,s){this.type=L.Draw.CircleMarker.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circlemarker.tooltip.start,L.Draw.Feature.prototype.initialize.call(this,i,s)},_fireCreatedEvent:function(){var i=new L.CircleMarker(this._marker.getLatLng(),this.options);L.Draw.Feature.prototype._fireCreatedEvent.call(this,i)},_createMarker:function(i){return new L.CircleMarker(i,this.options)}}),L.Draw.Circle=L.Draw.SimpleShape.extend({statics:{TYPE:"circle"},options:{shapeOptions:{stroke:!0,color:"#3388ff",weight:4,opacity:.5,fill:!0,fillColor:null,fillOpacity:.2,clickable:!0},showRadius:!0,metric:!0,feet:!0,nautic:!1},initialize:function(i,s){this.type=L.Draw.Circle.TYPE,this._initialLabelText=L.drawLocal.draw.handlers.circle.tooltip.start,L.Draw.SimpleShape.prototype.initialize.call(this,i,s)},_drawShape:function(i){if(L.GeometryUtil.isVersion07x())var s=this._startLatLng.distanceTo(i);else var s=this._map.distance(this._startLatLng,i);this._shape?this._shape.setRadius(s):(this._shape=new L.Circle(this._startLatLng,s,this.options.shapeOptions),this._map.addLayer(this._shape))},_fireCreatedEvent:function(){var i=new L.Circle(this._startLatLng,this._shape.getRadius(),this.options.shapeOptions);L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this,i)},_onMouseMove:function(i){var s,a=i.latlng,h=this.options.showRadius,c=this.options.metric;if(this._tooltip.updatePosition(a),this._isDrawing){this._drawShape(a),s=this._shape.getRadius().toFixed(1);var d="";h&&(d=L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(s,c,this.options.feet,this.options.nautic)),this._tooltip.updateContent({text:this._endLabelText,subtext:d})}}}),L.Edit=L.Edit||{},L.Edit.Marker=L.Handler.extend({initialize:function(i,s){this._marker=i,L.setOptions(this,s)},addHooks:function(){var i=this._marker;i.dragging.enable(),i.on("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},removeHooks:function(){var i=this._marker;i.dragging.disable(),i.off("dragend",this._onDragEnd,i),this._toggleMarkerHighlight()},_onDragEnd:function(i){var s=i.target;s.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:s})},_toggleMarkerHighlight:function(){var i=this._marker._icon;i&&(i.style.display="none",L.DomUtil.hasClass(i,"leaflet-edit-marker-selected")?(L.DomUtil.removeClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,-4)):(L.DomUtil.addClass(i,"leaflet-edit-marker-selected"),this._offsetMarker(i,4)),i.style.display="")},_offsetMarker:function(i,s){var a=parseInt(i.style.marginTop,10)-s,h=parseInt(i.style.marginLeft,10)-s;i.style.marginTop=a+"px",i.style.marginLeft=h+"px"}}),L.Marker.addInitHook(function(){L.Edit.Marker&&(this.editing=new L.Edit.Marker(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.Poly=L.Handler.extend({initialize:function(i){this.latlngs=[i._latlngs],i._holes&&(this.latlngs=this.latlngs.concat(i._holes)),this._poly=i,this._poly.on("revert-edited",this._updateLatLngs,this)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._poly._latlngs)?this._poly._latlngs:this._poly._latlngs[0]:this._poly._latlngs},_eachVertexHandler:function(i){for(var s=0;s<this._verticesHandlers.length;s++)i(this._verticesHandlers[s])},addHooks:function(){this._initHandlers(),this._eachVertexHandler(function(i){i.addHooks()})},removeHooks:function(){this._eachVertexHandler(function(i){i.removeHooks()})},updateMarkers:function(){this._eachVertexHandler(function(i){i.updateMarkers()})},_initHandlers:function(){this._verticesHandlers=[];for(var i=0;i<this.latlngs.length;i++)this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly,this.latlngs[i],this._poly.options.poly))},_updateLatLngs:function(i){this.latlngs=[i.layer._latlngs],i.layer._holes&&(this.latlngs=this.latlngs.concat(i.layer._holes))}}),L.Edit.PolyVerticesEdit=L.Handler.extend({options:{icon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon"}),touchIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-touch-icon"}),drawError:{color:"#b00b00",timeout:1e3}},initialize:function(i,s,a){L.Browser.touch&&(this.options.icon=this.options.touchIcon),this._poly=i,a&&a.drawError&&(a.drawError=L.Util.extend({},this.options.drawError,a.drawError)),this._latlngs=s,L.setOptions(this,a)},_defaultShape:function(){return L.Polyline._flat?L.Polyline._flat(this._latlngs)?this._latlngs:this._latlngs[0]:this._latlngs},addHooks:function(){var i=this._poly,s=i._path;i instanceof L.Polygon||(i.options.fill=!1,i.options.editing&&(i.options.editing.fill=!1)),s&&i.options.editing&&i.options.editing.className&&(i.options.original.className&&i.options.original.className.split(" ").forEach(function(a){L.DomUtil.removeClass(s,a)}),i.options.editing.className.split(" ").forEach(function(a){L.DomUtil.addClass(s,a)})),i.setStyle(i.options.editing),this._poly._map&&(this._map=this._poly._map,this._markerGroup||this._initMarkers(),this._poly._map.addLayer(this._markerGroup))},removeHooks:function(){var i=this._poly,s=i._path;s&&i.options.editing&&i.options.editing.className&&(i.options.editing.className.split(" ").forEach(function(a){L.DomUtil.removeClass(s,a)}),i.options.original.className&&i.options.original.className.split(" ").forEach(function(a){L.DomUtil.addClass(s,a)})),i.setStyle(i.options.original),i._map&&(i._map.removeLayer(this._markerGroup),delete this._markerGroup,delete this._markers)},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._markers=[];var i,s,a,h,c=this._defaultShape();for(i=0,a=c.length;i<a;i++)h=this._createMarker(c[i],i),h.on("click",this._onMarkerClick,this),h.on("contextmenu",this._onContextMenu,this),this._markers.push(h);var d,f;for(i=0,s=a-1;i<a;s=i++)(i!==0||L.Polygon&&this._poly instanceof L.Polygon)&&(d=this._markers[s],f=this._markers[i],this._createMiddleMarker(d,f),this._updatePrevNext(d,f))},_createMarker:function(i,s){var a=new L.Marker.Touch(i,{draggable:!0,icon:this.options.icon});return a._origLatLng=i,a._index=s,a.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._fireEdit,this).on("touchmove",this._onTouchMove,this).on("touchend",this._fireEdit,this).on("MSPointerMove",this._onTouchMove,this).on("MSPointerUp",this._fireEdit,this),this._markerGroup.addLayer(a),a},_onMarkerDragStart:function(){this._poly.fire("editstart")},_spliceLatLngs:function(){var i=this._defaultShape(),s=[].splice.apply(i,arguments);return this._poly._convertLatLngs(i,!0),this._poly.redraw(),s},_removeMarker:function(i){var s=i._index;this._markerGroup.removeLayer(i),this._markers.splice(s,1),this._spliceLatLngs(s,1),this._updateIndexes(s,-1),i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._fireEdit,this).off("touchmove",this._onMarkerDrag,this).off("touchend",this._fireEdit,this).off("click",this._onMarkerClick,this).off("MSPointerMove",this._onTouchMove,this).off("MSPointerUp",this._fireEdit,this)},_fireEdit:function(){this._poly.edited=!0,this._poly.fire("edit"),this._poly._map.fire(L.Draw.Event.EDITVERTEX,{layers:this._markerGroup,poly:this._poly})},_onMarkerDrag:function(i){var s=i.target,a=this._poly,h=L.LatLngUtil.cloneLatLng(s._origLatLng);if(L.extend(s._origLatLng,s._latlng),a.options.poly){var c=a._map._editTooltip;if(!a.options.poly.allowIntersection&&a.intersects()){L.extend(s._origLatLng,h),s.setLatLng(h);var d=a.options.color;a.setStyle({color:this.options.drawError.color}),c&&c.updateContent({text:L.drawLocal.draw.handlers.polyline.error}),setTimeout(function(){a.setStyle({color:d}),c&&c.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext})},1e3)}}s._middleLeft&&s._middleLeft.setLatLng(this._getMiddleLatLng(s._prev,s)),s._middleRight&&s._middleRight.setLatLng(this._getMiddleLatLng(s,s._next)),this._poly._bounds._southWest=L.latLng(1/0,1/0),this._poly._bounds._northEast=L.latLng(-1/0,-1/0);var f=this._poly.getLatLngs();this._poly._convertLatLngs(f,!0),this._poly.redraw(),this._poly.fire("editdrag")},_onMarkerClick:function(i){var s=L.Polygon&&this._poly instanceof L.Polygon?4:3,a=i.target;this._defaultShape().length<s||(this._removeMarker(a),this._updatePrevNext(a._prev,a._next),a._middleLeft&&this._markerGroup.removeLayer(a._middleLeft),a._middleRight&&this._markerGroup.removeLayer(a._middleRight),a._prev&&a._next?this._createMiddleMarker(a._prev,a._next):a._prev?a._next||(a._prev._middleRight=null):a._next._middleLeft=null,this._fireEdit())},_onContextMenu:function(i){var s=i.target;this._poly,this._poly._map.fire(L.Draw.Event.MARKERCONTEXT,{marker:s,layers:this._markerGroup,poly:this._poly}),L.DomEvent.stopPropagation},_onTouchMove:function(i){var s=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),a=this._map.layerPointToLatLng(s),h=i.target;L.extend(h._origLatLng,a),h._middleLeft&&h._middleLeft.setLatLng(this._getMiddleLatLng(h._prev,h)),h._middleRight&&h._middleRight.setLatLng(this._getMiddleLatLng(h,h._next)),this._poly.redraw(),this.updateMarkers()},_updateIndexes:function(i,s){this._markerGroup.eachLayer(function(a){a._index>i&&(a._index+=s)})},_createMiddleMarker:function(i,s){var a,h,c,d=this._getMiddleLatLng(i,s),f=this._createMarker(d);f.setOpacity(.6),i._middleRight=s._middleLeft=f,h=function(){f.off("touchmove",h,this);var p=s._index;f._index=p,f.off("click",a,this).on("click",this._onMarkerClick,this),d.lat=f.getLatLng().lat,d.lng=f.getLatLng().lng,this._spliceLatLngs(p,0,d),this._markers.splice(p,0,f),f.setOpacity(1),this._updateIndexes(p,1),s._index++,this._updatePrevNext(i,f),this._updatePrevNext(f,s),this._poly.fire("editstart")},c=function(){f.off("dragstart",h,this),f.off("dragend",c,this),f.off("touchmove",h,this),this._createMiddleMarker(i,f),this._createMiddleMarker(f,s)},a=function(){h.call(this),c.call(this),this._fireEdit()},f.on("click",a,this).on("dragstart",h,this).on("dragend",c,this).on("touchmove",h,this),this._markerGroup.addLayer(f)},_updatePrevNext:function(i,s){i&&(i._next=s),s&&(s._prev=i)},_getMiddleLatLng:function(i,s){var a=this._poly._map,h=a.project(i.getLatLng()),c=a.project(s.getLatLng());return a.unproject(h._add(c)._divideBy(2))}}),L.Polyline.addInitHook(function(){this.editing||(L.Edit.Poly&&(this.editing=new L.Edit.Poly(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()}))}),L.Edit=L.Edit||{},L.Edit.SimpleShape=L.Handler.extend({options:{moveIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move"}),resizeIcon:new L.DivIcon({iconSize:new L.Point(8,8),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize"}),touchMoveIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon"}),touchResizeIcon:new L.DivIcon({iconSize:new L.Point(20,20),className:"leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon"})},initialize:function(i,s){L.Browser.touch&&(this.options.moveIcon=this.options.touchMoveIcon,this.options.resizeIcon=this.options.touchResizeIcon),this._shape=i,L.Util.setOptions(this,s)},addHooks:function(){var i=this._shape;this._shape._map&&(this._map=this._shape._map,i.setStyle(i.options.editing),i._map&&(this._map=i._map,this._markerGroup||this._initMarkers(),this._map.addLayer(this._markerGroup)))},removeHooks:function(){var i=this._shape;if(i.setStyle(i.options.original),i._map){this._unbindMarker(this._moveMarker);for(var s=0,a=this._resizeMarkers.length;s<a;s++)this._unbindMarker(this._resizeMarkers[s]);this._resizeMarkers=null,this._map.removeLayer(this._markerGroup),delete this._markerGroup}this._map=null},updateMarkers:function(){this._markerGroup.clearLayers(),this._initMarkers()},_initMarkers:function(){this._markerGroup||(this._markerGroup=new L.LayerGroup),this._createMoveMarker(),this._createResizeMarker()},_createMoveMarker:function(){},_createResizeMarker:function(){},_createMarker:function(i,s){var a=new L.Marker.Touch(i,{draggable:!0,icon:s,zIndexOffset:10});return this._bindMarker(a),this._markerGroup.addLayer(a),a},_bindMarker:function(i){i.on("dragstart",this._onMarkerDragStart,this).on("drag",this._onMarkerDrag,this).on("dragend",this._onMarkerDragEnd,this).on("touchstart",this._onTouchStart,this).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onTouchEnd,this).on("MSPointerUp",this._onTouchEnd,this)},_unbindMarker:function(i){i.off("dragstart",this._onMarkerDragStart,this).off("drag",this._onMarkerDrag,this).off("dragend",this._onMarkerDragEnd,this).off("touchstart",this._onTouchStart,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onTouchEnd,this).off("MSPointerUp",this._onTouchEnd,this)},_onMarkerDragStart:function(i){i.target.setOpacity(0),this._shape.fire("editstart")},_fireEdit:function(){this._shape.edited=!0,this._shape.fire("edit")},_onMarkerDrag:function(i){var s=i.target,a=s.getLatLng();s===this._moveMarker?this._move(a):this._resize(a),this._shape.redraw(),this._shape.fire("editdrag")},_onMarkerDragEnd:function(i){i.target.setOpacity(1),this._fireEdit()},_onTouchStart:function(i){if(L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i),typeof this._getCorners=="function"){var s=this._getCorners(),a=i.target,h=a._cornerIndex;a.setOpacity(0),this._oppositeCorner=s[(h+2)%4],this._toggleCornerMarkers(0,h)}this._shape.fire("editstart")},_onTouchMove:function(i){var s=this._map.mouseEventToLayerPoint(i.originalEvent.touches[0]),a=this._map.layerPointToLatLng(s);return i.target===this._moveMarker?this._move(a):this._resize(a),this._shape.redraw(),!1},_onTouchEnd:function(i){i.target.setOpacity(1),this.updateMarkers(),this._fireEdit()},_move:function(){},_resize:function(){}}),L.Edit=L.Edit||{},L.Edit.Rectangle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getBounds(),s=i.getCenter();this._moveMarker=this._createMarker(s,this.options.moveIcon)},_createResizeMarker:function(){var i=this._getCorners();this._resizeMarkers=[];for(var s=0,a=i.length;s<a;s++)this._resizeMarkers.push(this._createMarker(i[s],this.options.resizeIcon)),this._resizeMarkers[s]._cornerIndex=s},_onMarkerDragStart:function(i){L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this,i);var s=this._getCorners(),a=i.target,h=a._cornerIndex;this._oppositeCorner=s[(h+2)%4],this._toggleCornerMarkers(0,h)},_onMarkerDragEnd:function(i){var s,a,h=i.target;h===this._moveMarker&&(s=this._shape.getBounds(),a=s.getCenter(),h.setLatLng(a)),this._toggleCornerMarkers(1),this._repositionCornerMarkers(),L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this,i)},_move:function(i){for(var s,a=this._shape._defaultShape?this._shape._defaultShape():this._shape.getLatLngs(),h=this._shape.getBounds(),c=h.getCenter(),d=[],f=0,p=a.length;f<p;f++)s=[a[f].lat-c.lat,a[f].lng-c.lng],d.push([i.lat+s[0],i.lng+s[1]]);this._shape.setLatLngs(d),this._repositionCornerMarkers(),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(i){var s;this._shape.setBounds(L.latLngBounds(i,this._oppositeCorner)),s=this._shape.getBounds(),this._moveMarker.setLatLng(s.getCenter()),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})},_getCorners:function(){var i=this._shape.getBounds();return[i.getNorthWest(),i.getNorthEast(),i.getSouthEast(),i.getSouthWest()]},_toggleCornerMarkers:function(i){for(var s=0,a=this._resizeMarkers.length;s<a;s++)this._resizeMarkers[s].setOpacity(i)},_repositionCornerMarkers:function(){for(var i=this._getCorners(),s=0,a=this._resizeMarkers.length;s<a;s++)this._resizeMarkers[s].setLatLng(i[s])}}),L.Rectangle.addInitHook(function(){L.Edit.Rectangle&&(this.editing=new L.Edit.Rectangle(this),this.options.editable&&this.editing.enable())}),L.Edit=L.Edit||{},L.Edit.CircleMarker=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var i=this._shape.getLatLng();this._moveMarker=this._createMarker(i,this.options.moveIcon)},_createResizeMarker:function(){this._resizeMarkers=[]},_move:function(i){if(this._resizeMarkers.length){var s=this._getResizeMarkerPoint(i);this._resizeMarkers[0].setLatLng(s)}this._shape.setLatLng(i),this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})}}),L.CircleMarker.addInitHook(function(){L.Edit.CircleMarker&&(this.editing=new L.Edit.CircleMarker(this),this.options.editable&&this.editing.enable()),this.on("add",function(){this.editing&&this.editing.enabled()&&this.editing.addHooks()}),this.on("remove",function(){this.editing&&this.editing.enabled()&&this.editing.removeHooks()})}),L.Edit=L.Edit||{},L.Edit.Circle=L.Edit.CircleMarker.extend({_createResizeMarker:function(){var i=this._shape.getLatLng(),s=this._getResizeMarkerPoint(i);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(s,this.options.resizeIcon))},_getResizeMarkerPoint:function(i){var s=this._shape._radius*Math.cos(Math.PI/4),a=this._map.project(i);return this._map.unproject([a.x+s,a.y-s])},_resize:function(i){var s=this._moveMarker.getLatLng();L.GeometryUtil.isVersion07x()?radius=s.distanceTo(i):radius=this._map.distance(s,i),this._shape.setRadius(radius),this._map.editTooltip&&this._map._editTooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.subtext+"<br />"+L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.draw.handlers.circle.radius+": "+L.GeometryUtil.readableDistance(radius,!0,this.options.feet,this.options.nautic)}),this._shape.setRadius(radius),this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}}),L.Circle.addInitHook(function(){L.Edit.Circle&&(this.editing=new L.Edit.Circle(this),this.options.editable&&this.editing.enable())}),L.Map.mergeOptions({touchExtend:!0}),L.Map.TouchExtend=L.Handler.extend({initialize:function(i){this._map=i,this._container=i._container,this._pane=i._panes.overlayPane},addHooks:function(){L.DomEvent.on(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.on(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.on(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.on(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.on(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.on(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.on(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.on(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.on(this._container,"touchleave",this._onTouchLeave,this))},removeHooks:function(){L.DomEvent.off(this._container,"touchstart",this._onTouchStart,this),L.DomEvent.off(this._container,"touchend",this._onTouchEnd,this),L.DomEvent.off(this._container,"touchmove",this._onTouchMove,this),this._detectIE()?(L.DomEvent.off(this._container,"MSPointerDown",this._onTouchStart,this),L.DomEvent.off(this._container,"MSPointerUp",this._onTouchEnd,this),L.DomEvent.off(this._container,"MSPointerMove",this._onTouchMove,this),L.DomEvent.off(this._container,"MSPointerCancel",this._onTouchCancel,this)):(L.DomEvent.off(this._container,"touchcancel",this._onTouchCancel,this),L.DomEvent.off(this._container,"touchleave",this._onTouchLeave,this))},_touchEvent:function(i,s){var a={};if(i.touches!==void 0){if(!i.touches.length)return;a=i.touches[0]}else if(i.pointerType!=="touch"||(a=i,!this._filterClick(i)))return;var h=this._map.mouseEventToContainerPoint(a),c=this._map.mouseEventToLayerPoint(a),d=this._map.layerPointToLatLng(c);this._map.fire(s,{latlng:d,layerPoint:c,containerPoint:h,pageX:a.pageX,pageY:a.pageY,originalEvent:i})},_filterClick:function(i){var s=i.timeStamp||i.originalEvent.timeStamp,a=L.DomEvent._lastClick&&s-L.DomEvent._lastClick;return a&&a>100&&a<500||i.target._simulatedClick&&!i._simulated?(L.DomEvent.stop(i),!1):(L.DomEvent._lastClick=s,!0)},_onTouchStart:function(i){this._map._loaded&&this._touchEvent(i,"touchstart")},_onTouchEnd:function(i){this._map._loaded&&this._touchEvent(i,"touchend")},_onTouchCancel:function(i){if(this._map._loaded){var s="touchcancel";this._detectIE()&&(s="pointercancel"),this._touchEvent(i,s)}},_onTouchLeave:function(i){this._map._loaded&&this._touchEvent(i,"touchleave")},_onTouchMove:function(i){this._map._loaded&&this._touchEvent(i,"touchmove")},_detectIE:function(){var i=r.navigator.userAgent,s=i.indexOf("MSIE ");if(s>0)return parseInt(i.substring(s+5,i.indexOf(".",s)),10);if(i.indexOf("Trident/")>0){var a=i.indexOf("rv:");return parseInt(i.substring(a+3,i.indexOf(".",a)),10)}var h=i.indexOf("Edge/");return h>0&&parseInt(i.substring(h+5,i.indexOf(".",h)),10)}}),L.Map.addInitHook("addHandler","touchExtend",L.Map.TouchExtend),L.Marker.Touch=L.Marker.extend({_initInteraction:function(){return this.addInteractiveTarget?L.Marker.prototype._initInteraction.apply(this):this._initInteractionLegacy()},_initInteractionLegacy:function(){if(this.options.clickable){var i=this._icon,s=["dblclick","mousedown","mouseover","mouseout","contextmenu","touchstart","touchend","touchmove"];this._detectIE?s.concat(["MSPointerDown","MSPointerUp","MSPointerMove","MSPointerCancel"]):s.concat(["touchcancel"]),L.DomUtil.addClass(i,"leaflet-clickable"),L.DomEvent.on(i,"click",this._onMouseClick,this),L.DomEvent.on(i,"keypress",this._onKeyPress,this);for(var a=0;a<s.length;a++)L.DomEvent.on(i,s[a],this._fireMouseEvent,this);L.Handler.MarkerDrag&&(this.dragging=new L.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_detectIE:function(){var i=r.navigator.userAgent,s=i.indexOf("MSIE ");if(s>0)return parseInt(i.substring(s+5,i.indexOf(".",s)),10);if(i.indexOf("Trident/")>0){var a=i.indexOf("rv:");return parseInt(i.substring(a+3,i.indexOf(".",a)),10)}var h=i.indexOf("Edge/");return h>0&&parseInt(i.substring(h+5,i.indexOf(".",h)),10)}}),L.LatLngUtil={cloneLatLngs:function(i){for(var s=[],a=0,h=i.length;a<h;a++)Array.isArray(i[a])?s.push(L.LatLngUtil.cloneLatLngs(i[a])):s.push(this.cloneLatLng(i[a]));return s},cloneLatLng:function(i){return L.latLng(i.lat,i.lng)}},function(){var i={km:2,ha:2,m:0,mi:2,ac:2,yd:0,ft:0,nm:2};L.GeometryUtil=L.extend(L.GeometryUtil||{},{geodesicArea:function(s){var a,h,c=s.length,d=0,f=Math.PI/180;if(c>2){for(var p=0;p<c;p++)a=s[p],h=s[(p+1)%c],d+=(h.lng-a.lng)*f*(2+Math.sin(a.lat*f)+Math.sin(h.lat*f));d=6378137*d*6378137/2}return Math.abs(d)},formattedNumber:function(s,a){var h=parseFloat(s).toFixed(a),c=L.drawLocal.format&&L.drawLocal.format.numeric,d=c&&c.delimiters,f=d&&d.thousands,p=d&&d.decimal;if(f||p){var m=h.split(".");h=f?m[0].replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+f):m[0],p=p||".",m.length>1&&(h=h+p+m[1])}return h},readableArea:function(s,a,f){var c,d,f=L.Util.extend({},i,f);return a?(d=["ha","m"],type=typeof a,type==="string"?d=[a]:type!=="boolean"&&(d=a),c=s>=1e6&&d.indexOf("km")!==-1?L.GeometryUtil.formattedNumber(1e-6*s,f.km)+" km²":s>=1e4&&d.indexOf("ha")!==-1?L.GeometryUtil.formattedNumber(1e-4*s,f.ha)+" ha":L.GeometryUtil.formattedNumber(s,f.m)+" m²"):(s/=.836127,c=s>=3097600?L.GeometryUtil.formattedNumber(s/3097600,f.mi)+" mi²":s>=4840?L.GeometryUtil.formattedNumber(s/4840,f.ac)+" acres":L.GeometryUtil.formattedNumber(s,f.yd)+" yd²"),c},readableDistance:function(s,a,h,c,p){var f,p=L.Util.extend({},i,p);switch(a?typeof a=="string"?a:"metric":h?"feet":c?"nauticalMile":"yards"){case"metric":f=s>1e3?L.GeometryUtil.formattedNumber(s/1e3,p.km)+" km":L.GeometryUtil.formattedNumber(s,p.m)+" m";break;case"feet":s*=3.28083,f=L.GeometryUtil.formattedNumber(s,p.ft)+" ft";break;case"nauticalMile":s*=.53996,f=L.GeometryUtil.formattedNumber(s/1e3,p.nm)+" nm";break;case"yards":default:s*=1.09361,f=s>1760?L.GeometryUtil.formattedNumber(s/1760,p.mi)+" miles":L.GeometryUtil.formattedNumber(s,p.yd)+" yd"}return f},isVersion07x:function(){var s=L.version.split(".");return parseInt(s[0],10)===0&&parseInt(s[1],10)===7}})}(),L.Util.extend(L.LineUtil,{segmentsIntersect:function(i,s,a,h){return this._checkCounterclockwise(i,a,h)!==this._checkCounterclockwise(s,a,h)&&this._checkCounterclockwise(i,s,a)!==this._checkCounterclockwise(i,s,h)},_checkCounterclockwise:function(i,s,a){return(a.y-i.y)*(s.x-i.x)>(s.y-i.y)*(a.x-i.x)}}),L.Polyline.include({intersects:function(){var i,s,a,h=this._getProjectedPoints(),c=h?h.length:0;if(this._tooFewPointsForIntersection())return!1;for(i=c-1;i>=3;i--)if(s=h[i-1],a=h[i],this._lineSegmentsIntersectsRange(s,a,i-2))return!0;return!1},newLatLngIntersects:function(i,s){return!!this._map&&this.newPointIntersects(this._map.latLngToLayerPoint(i),s)},newPointIntersects:function(i,s){var a=this._getProjectedPoints(),h=a?a.length:0,c=a?a[h-1]:null,d=h-2;return!this._tooFewPointsForIntersection(1)&&this._lineSegmentsIntersectsRange(c,i,d,s?1:0)},_tooFewPointsForIntersection:function(i){var s=this._getProjectedPoints(),a=s?s.length:0;return a+=i||0,!s||a<=3},_lineSegmentsIntersectsRange:function(i,s,a,h){var c,d,f=this._getProjectedPoints();h=h||0;for(var p=a;p>h;p--)if(c=f[p-1],d=f[p],L.LineUtil.segmentsIntersect(i,s,c,d))return!0;return!1},_getProjectedPoints:function(){if(!this._defaultShape)return this._originalPoints;for(var i=[],s=this._defaultShape(),a=0;a<s.length;a++)i.push(this._map.latLngToLayerPoint(s[a]));return i}}),L.Polygon.include({intersects:function(){var i,s,a,h,c=this._getProjectedPoints();return!this._tooFewPointsForIntersection()&&(!!L.Polyline.prototype.intersects.call(this)||(i=c.length,s=c[0],a=c[i-1],h=i-2,this._lineSegmentsIntersectsRange(a,s,h,1)))}}),L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:!1},initialize:function(i){if(L.version<"0.7")throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/");L.Control.prototype.initialize.call(this,i);var s;this._toolbars={},L.DrawToolbar&&this.options.draw&&(s=new L.DrawToolbar(this.options.draw),this._toolbars[L.DrawToolbar.TYPE]=s,this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.EditToolbar&&this.options.edit&&(s=new L.EditToolbar(this.options.edit),this._toolbars[L.EditToolbar.TYPE]=s,this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)),L.toolbar=this},onAdd:function(i){var s,a=L.DomUtil.create("div","leaflet-draw"),h=!1;for(var c in this._toolbars)this._toolbars.hasOwnProperty(c)&&(s=this._toolbars[c].addToolbar(i))&&(h||(L.DomUtil.hasClass(s,"leaflet-draw-toolbar-top")||L.DomUtil.addClass(s.childNodes[0],"leaflet-draw-toolbar-top"),h=!0),a.appendChild(s));return a},onRemove:function(){for(var i in this._toolbars)this._toolbars.hasOwnProperty(i)&&this._toolbars[i].removeToolbar()},setDrawingOptions:function(i){for(var s in this._toolbars)this._toolbars[s]instanceof L.DrawToolbar&&this._toolbars[s].setOptions(i)},_toolbarEnabled:function(i){var s=i.target;for(var a in this._toolbars)this._toolbars[a]!==s&&this._toolbars[a].disable()}}),L.Map.mergeOptions({drawControlTooltips:!0,drawControl:!1}),L.Map.addInitHook(function(){this.options.drawControl&&(this.drawControl=new L.Control.Draw,this.addControl(this.drawControl))}),L.Toolbar=L.Class.extend({initialize:function(i){L.setOptions(this,i),this._modes={},this._actionButtons=[],this._activeMode=null;var s=L.version.split(".");parseInt(s[0],10)===1&&parseInt(s[1],10)>=2?L.Toolbar.include(L.Evented.prototype):L.Toolbar.include(L.Mixin.Events)},enabled:function(){return this._activeMode!==null},disable:function(){this.enabled()&&this._activeMode.handler.disable()},addToolbar:function(i){var s,a=L.DomUtil.create("div","leaflet-draw-section"),h=0,c=this._toolbarClass||"",d=this.getModeHandlers(i);for(this._toolbarContainer=L.DomUtil.create("div","leaflet-draw-toolbar leaflet-bar"),this._map=i,s=0;s<d.length;s++)d[s].enabled&&this._initModeHandler(d[s].handler,this._toolbarContainer,h++,c,d[s].title);if(h)return this._lastButtonIndex=--h,this._actionsContainer=L.DomUtil.create("ul","leaflet-draw-actions"),a.appendChild(this._toolbarContainer),a.appendChild(this._actionsContainer),a},removeToolbar:function(){for(var i in this._modes)this._modes.hasOwnProperty(i)&&(this._disposeButton(this._modes[i].button,this._modes[i].handler.enable,this._modes[i].handler),this._modes[i].handler.disable(),this._modes[i].handler.off("enabled",this._handlerActivated,this).off("disabled",this._handlerDeactivated,this));this._modes={};for(var s=0,a=this._actionButtons.length;s<a;s++)this._disposeButton(this._actionButtons[s].button,this._actionButtons[s].callback,this);this._actionButtons=[],this._actionsContainer=null},_initModeHandler:function(i,s,a,h,c){var d=i.type;this._modes[d]={},this._modes[d].handler=i,this._modes[d].button=this._createButton({type:d,title:c,className:h+"-"+d,container:s,callback:this._modes[d].handler.enable,context:this._modes[d].handler}),this._modes[d].buttonIndex=a,this._modes[d].handler.on("enabled",this._handlerActivated,this).on("disabled",this._handlerDeactivated,this)},_detectIOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!r.MSStream},_createButton:function(i){var s=L.DomUtil.create("a",i.className||"",i.container),a=L.DomUtil.create("span","sr-only",i.container);s.href="#",s.appendChild(a),i.title&&(s.title=i.title,a.innerHTML=i.title),i.text&&(s.innerHTML=i.text,a.innerHTML=i.text);var h=this._detectIOS()?"touchstart":"click";return L.DomEvent.on(s,"click",L.DomEvent.stopPropagation).on(s,"mousedown",L.DomEvent.stopPropagation).on(s,"dblclick",L.DomEvent.stopPropagation).on(s,"touchstart",L.DomEvent.stopPropagation).on(s,"click",L.DomEvent.preventDefault).on(s,h,i.callback,i.context),s},_disposeButton:function(i,s){var a=this._detectIOS()?"touchstart":"click";L.DomEvent.off(i,"click",L.DomEvent.stopPropagation).off(i,"mousedown",L.DomEvent.stopPropagation).off(i,"dblclick",L.DomEvent.stopPropagation).off(i,"touchstart",L.DomEvent.stopPropagation).off(i,"click",L.DomEvent.preventDefault).off(i,a,s)},_handlerActivated:function(i){this.disable(),this._activeMode=this._modes[i.handler],L.DomUtil.addClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._showActionsToolbar(),this.fire("enable")},_handlerDeactivated:function(){this._hideActionsToolbar(),L.DomUtil.removeClass(this._activeMode.button,"leaflet-draw-toolbar-button-enabled"),this._activeMode=null,this.fire("disable")},_createActions:function(i){var s,a,h,c,d=this._actionsContainer,f=this.getActions(i),p=f.length;for(a=0,h=this._actionButtons.length;a<h;a++)this._disposeButton(this._actionButtons[a].button,this._actionButtons[a].callback);for(this._actionButtons=[];d.firstChild;)d.removeChild(d.firstChild);for(var m=0;m<p;m++)"enabled"in f[m]&&!f[m].enabled||(s=L.DomUtil.create("li","",d),c=this._createButton({title:f[m].title,text:f[m].text,container:s,callback:f[m].callback,context:f[m].context}),this._actionButtons.push({button:c,callback:f[m].callback}))},_showActionsToolbar:function(){var i=this._activeMode.buttonIndex,s=this._lastButtonIndex,a=this._activeMode.button.offsetTop-1;this._createActions(this._activeMode.handler),this._actionsContainer.style.top=a+"px",i===0&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-top")),i===s&&(L.DomUtil.addClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.addClass(this._actionsContainer,"leaflet-draw-actions-bottom")),this._actionsContainer.style.display="block",this._map.fire(L.Draw.Event.TOOLBAROPENED)},_hideActionsToolbar:function(){this._actionsContainer.style.display="none",L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-notop"),L.DomUtil.removeClass(this._toolbarContainer,"leaflet-draw-toolbar-nobottom"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-top"),L.DomUtil.removeClass(this._actionsContainer,"leaflet-draw-actions-bottom"),this._map.fire(L.Draw.Event.TOOLBARCLOSED)}}),L.Draw=L.Draw||{},L.Draw.Tooltip=L.Class.extend({initialize:function(i){this._map=i,this._popupPane=i._panes.popupPane,this._visible=!1,this._container=i.options.drawControlTooltips?L.DomUtil.create("div","leaflet-draw-tooltip",this._popupPane):null,this._singleLineLabel=!1,this._map.on("mouseout",this._onMouseOut,this)},dispose:function(){this._map.off("mouseout",this._onMouseOut,this),this._container&&(this._popupPane.removeChild(this._container),this._container=null)},updateContent:function(i){return this._container?(i.subtext=i.subtext||"",i.subtext.length!==0||this._singleLineLabel?i.subtext.length>0&&this._singleLineLabel&&(L.DomUtil.removeClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!1):(L.DomUtil.addClass(this._container,"leaflet-draw-tooltip-single"),this._singleLineLabel=!0),this._container.innerHTML=(i.subtext.length>0?'<span class="leaflet-draw-tooltip-subtext">'+i.subtext+"</span><br />":"")+"<span>"+i.text+"</span>",i.text||i.subtext?(this._visible=!0,this._container.style.visibility="inherit"):(this._visible=!1,this._container.style.visibility="hidden"),this):this},updatePosition:function(i){var s=this._map.latLngToLayerPoint(i),a=this._container;return this._container&&(this._visible&&(a.style.visibility="inherit"),L.DomUtil.setPosition(a,s)),this},showAsError:function(){return this._container&&L.DomUtil.addClass(this._container,"leaflet-error-draw-tooltip"),this},removeError:function(){return this._container&&L.DomUtil.removeClass(this._container,"leaflet-error-draw-tooltip"),this},_onMouseOut:function(){this._container&&(this._container.style.visibility="hidden")}}),L.DrawToolbar=L.Toolbar.extend({statics:{TYPE:"draw"},options:{polyline:{},polygon:{},rectangle:{},circle:{},marker:{},circlemarker:{}},initialize:function(i){for(var s in this.options)this.options.hasOwnProperty(s)&&i[s]&&(i[s]=L.extend({},this.options[s],i[s]));this._toolbarClass="leaflet-draw-draw",L.Toolbar.prototype.initialize.call(this,i)},getModeHandlers:function(i){return[{enabled:this.options.polyline,handler:new L.Draw.Polyline(i,this.options.polyline),title:L.drawLocal.draw.toolbar.buttons.polyline},{enabled:this.options.polygon,handler:new L.Draw.Polygon(i,this.options.polygon),title:L.drawLocal.draw.toolbar.buttons.polygon},{enabled:this.options.rectangle,handler:new L.Draw.Rectangle(i,this.options.rectangle),title:L.drawLocal.draw.toolbar.buttons.rectangle},{enabled:this.options.circle,handler:new L.Draw.Circle(i,this.options.circle),title:L.drawLocal.draw.toolbar.buttons.circle},{enabled:this.options.marker,handler:new L.Draw.Marker(i,this.options.marker),title:L.drawLocal.draw.toolbar.buttons.marker},{enabled:this.options.circlemarker,handler:new L.Draw.CircleMarker(i,this.options.circlemarker),title:L.drawLocal.draw.toolbar.buttons.circlemarker}]},getActions:function(i){return[{enabled:i.completeShape,title:L.drawLocal.draw.toolbar.finish.title,text:L.drawLocal.draw.toolbar.finish.text,callback:i.completeShape,context:i},{enabled:i.deleteLastVertex,title:L.drawLocal.draw.toolbar.undo.title,text:L.drawLocal.draw.toolbar.undo.text,callback:i.deleteLastVertex,context:i},{title:L.drawLocal.draw.toolbar.actions.title,text:L.drawLocal.draw.toolbar.actions.text,callback:this.disable,context:this}]},setOptions:function(i){L.setOptions(this,i);for(var s in this._modes)this._modes.hasOwnProperty(s)&&i.hasOwnProperty(s)&&this._modes[s].handler.setOptions(i[s])}}),L.EditToolbar=L.Toolbar.extend({statics:{TYPE:"edit"},options:{edit:{selectedPathOptions:{dashArray:"10, 10",fill:!0,fillColor:"#fe57a1",fillOpacity:.1,maintainColor:!1}},remove:{},poly:null,featureGroup:null},initialize:function(i){i.edit&&(i.edit.selectedPathOptions===void 0&&(i.edit.selectedPathOptions=this.options.edit.selectedPathOptions),i.edit.selectedPathOptions=L.extend({},this.options.edit.selectedPathOptions,i.edit.selectedPathOptions)),i.remove&&(i.remove=L.extend({},this.options.remove,i.remove)),i.poly&&(i.poly=L.extend({},this.options.poly,i.poly)),this._toolbarClass="leaflet-draw-edit",L.Toolbar.prototype.initialize.call(this,i),this._selectedFeatureCount=0},getModeHandlers:function(i){var s=this.options.featureGroup;return[{enabled:this.options.edit,handler:new L.EditToolbar.Edit(i,{featureGroup:s,selectedPathOptions:this.options.edit.selectedPathOptions,poly:this.options.poly}),title:L.drawLocal.edit.toolbar.buttons.edit},{enabled:this.options.remove,handler:new L.EditToolbar.Delete(i,{featureGroup:s}),title:L.drawLocal.edit.toolbar.buttons.remove}]},getActions:function(i){var s=[{title:L.drawLocal.edit.toolbar.actions.save.title,text:L.drawLocal.edit.toolbar.actions.save.text,callback:this._save,context:this},{title:L.drawLocal.edit.toolbar.actions.cancel.title,text:L.drawLocal.edit.toolbar.actions.cancel.text,callback:this.disable,context:this}];return i.removeAllLayers&&s.push({title:L.drawLocal.edit.toolbar.actions.clearAll.title,text:L.drawLocal.edit.toolbar.actions.clearAll.text,callback:this._clearAllLayers,context:this}),s},addToolbar:function(i){var s=L.Toolbar.prototype.addToolbar.call(this,i);return this._checkDisabled(),this.options.featureGroup.on("layeradd layerremove",this._checkDisabled,this),s},removeToolbar:function(){this.options.featureGroup.off("layeradd layerremove",this._checkDisabled,this),L.Toolbar.prototype.removeToolbar.call(this)},disable:function(){this.enabled()&&(this._activeMode.handler.revertLayers(),L.Toolbar.prototype.disable.call(this))},_save:function(){this._activeMode.handler.save(),this._activeMode&&this._activeMode.handler.disable()},_clearAllLayers:function(){this._activeMode.handler.removeAllLayers(),this._activeMode&&this._activeMode.handler.disable()},_checkDisabled:function(){var i,s=this.options.featureGroup,a=s.getLayers().length!==0;this.options.edit&&(i=this._modes[L.EditToolbar.Edit.TYPE].button,a?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",a?L.drawLocal.edit.toolbar.buttons.edit:L.drawLocal.edit.toolbar.buttons.editDisabled)),this.options.remove&&(i=this._modes[L.EditToolbar.Delete.TYPE].button,a?L.DomUtil.removeClass(i,"leaflet-disabled"):L.DomUtil.addClass(i,"leaflet-disabled"),i.setAttribute("title",a?L.drawLocal.edit.toolbar.buttons.remove:L.drawLocal.edit.toolbar.buttons.removeDisabled))}}),L.EditToolbar.Edit=L.Handler.extend({statics:{TYPE:"edit"},initialize:function(i,s){if(L.Handler.prototype.initialize.call(this,i),L.setOptions(this,s),this._featureGroup=s.featureGroup,!(this._featureGroup instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this._uneditedLayerProps={},this.type=L.EditToolbar.Edit.TYPE;var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.EditToolbar.Edit.include(L.Evented.prototype):L.EditToolbar.Edit.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.EDITSTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._featureGroup.on("layeradd",this._enableLayerEdit,this).on("layerremove",this._disableLayerEdit,this))},disable:function(){this._enabled&&(this._featureGroup.off("layeradd",this._enableLayerEdit,this).off("layerremove",this._disableLayerEdit,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.EDITSTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._featureGroup.eachLayer(this._enableLayerEdit,this),this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}),i._editTooltip=this._tooltip,this._updateTooltip(),this._map.on("mousemove",this._onMouseMove,this).on("touchmove",this._onMouseMove,this).on("MSPointerMove",this._onMouseMove,this).on(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},removeHooks:function(){this._map&&(this._featureGroup.eachLayer(this._disableLayerEdit,this),this._uneditedLayerProps={},this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this).off("touchmove",this._onMouseMove,this).off("MSPointerMove",this._onMouseMove,this).off(L.Draw.Event.EDITVERTEX,this._updateTooltip,this))},revertLayers:function(){this._featureGroup.eachLayer(function(i){this._revertLayer(i)},this)},save:function(){var i=new L.LayerGroup;this._featureGroup.eachLayer(function(s){s.edited&&(i.addLayer(s),s.edited=!1)}),this._map.fire(L.Draw.Event.EDITED,{layers:i})},_backupLayer:function(i){var s=L.Util.stamp(i);this._uneditedLayerProps[s]||(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?this._uneditedLayerProps[s]={latlngs:L.LatLngUtil.cloneLatLngs(i.getLatLngs())}:i instanceof L.Circle?this._uneditedLayerProps[s]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng()),radius:i.getRadius()}:(i instanceof L.Marker||i instanceof L.CircleMarker)&&(this._uneditedLayerProps[s]={latlng:L.LatLngUtil.cloneLatLng(i.getLatLng())}))},_getTooltipText:function(){return{text:L.drawLocal.edit.handlers.edit.tooltip.text,subtext:L.drawLocal.edit.handlers.edit.tooltip.subtext}},_updateTooltip:function(){this._tooltip.updateContent(this._getTooltipText())},_revertLayer:function(i){var s=L.Util.stamp(i);i.edited=!1,this._uneditedLayerProps.hasOwnProperty(s)&&(i instanceof L.Polyline||i instanceof L.Polygon||i instanceof L.Rectangle?i.setLatLngs(this._uneditedLayerProps[s].latlngs):i instanceof L.Circle?(i.setLatLng(this._uneditedLayerProps[s].latlng),i.setRadius(this._uneditedLayerProps[s].radius)):(i instanceof L.Marker||i instanceof L.CircleMarker)&&i.setLatLng(this._uneditedLayerProps[s].latlng),i.fire("revert-edited",{layer:i}))},_enableLayerEdit:function(i){var s,a,h=i.layer||i.target||i;this._backupLayer(h),this.options.poly&&(a=L.Util.extend({},this.options.poly),h.options.poly=a),this.options.selectedPathOptions&&(s=L.Util.extend({},this.options.selectedPathOptions),s.maintainColor&&(s.color=h.options.color,s.fillColor=h.options.fillColor),h.options.original=L.extend({},h.options),h.options.editing=s),h instanceof L.Marker?(h.editing&&h.editing.enable(),h.dragging.enable(),h.on("dragend",this._onMarkerDragEnd).on("touchmove",this._onTouchMove,this).on("MSPointerMove",this._onTouchMove,this).on("touchend",this._onMarkerDragEnd,this).on("MSPointerUp",this._onMarkerDragEnd,this)):h.editing.enable()},_disableLayerEdit:function(i){var s=i.layer||i.target||i;s.edited=!1,s.editing&&s.editing.disable(),delete s.options.editing,delete s.options.original,this._selectedPathOptions&&(s instanceof L.Marker?this._toggleMarkerHighlight(s):(s.setStyle(s.options.previousOptions),delete s.options.previousOptions)),s instanceof L.Marker?(s.dragging.disable(),s.off("dragend",this._onMarkerDragEnd,this).off("touchmove",this._onTouchMove,this).off("MSPointerMove",this._onTouchMove,this).off("touchend",this._onMarkerDragEnd,this).off("MSPointerUp",this._onMarkerDragEnd,this)):s.editing.disable()},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_onMarkerDragEnd:function(i){var s=i.target;s.edited=!0,this._map.fire(L.Draw.Event.EDITMOVE,{layer:s})},_onTouchMove:function(i){var s=i.originalEvent.changedTouches[0],a=this._map.mouseEventToLayerPoint(s),h=this._map.layerPointToLatLng(a);i.target.setLatLng(h)},_hasAvailableLayers:function(){return this._featureGroup.getLayers().length!==0}}),L.EditToolbar.Delete=L.Handler.extend({statics:{TYPE:"remove"},initialize:function(i,s){if(L.Handler.prototype.initialize.call(this,i),L.Util.setOptions(this,s),this._deletableLayers=this.options.featureGroup,!(this._deletableLayers instanceof L.FeatureGroup))throw new Error("options.featureGroup must be a L.FeatureGroup");this.type=L.EditToolbar.Delete.TYPE;var a=L.version.split(".");parseInt(a[0],10)===1&&parseInt(a[1],10)>=2?L.EditToolbar.Delete.include(L.Evented.prototype):L.EditToolbar.Delete.include(L.Mixin.Events)},enable:function(){!this._enabled&&this._hasAvailableLayers()&&(this.fire("enabled",{handler:this.type}),this._map.fire(L.Draw.Event.DELETESTART,{handler:this.type}),L.Handler.prototype.enable.call(this),this._deletableLayers.on("layeradd",this._enableLayerDelete,this).on("layerremove",this._disableLayerDelete,this))},disable:function(){this._enabled&&(this._deletableLayers.off("layeradd",this._enableLayerDelete,this).off("layerremove",this._disableLayerDelete,this),L.Handler.prototype.disable.call(this),this._map.fire(L.Draw.Event.DELETESTOP,{handler:this.type}),this.fire("disabled",{handler:this.type}))},addHooks:function(){var i=this._map;i&&(i.getContainer().focus(),this._deletableLayers.eachLayer(this._enableLayerDelete,this),this._deletedLayers=new L.LayerGroup,this._tooltip=new L.Draw.Tooltip(this._map),this._tooltip.updateContent({text:L.drawLocal.edit.handlers.remove.tooltip.text}),this._map.on("mousemove",this._onMouseMove,this))},removeHooks:function(){this._map&&(this._deletableLayers.eachLayer(this._disableLayerDelete,this),this._deletedLayers=null,this._tooltip.dispose(),this._tooltip=null,this._map.off("mousemove",this._onMouseMove,this))},revertLayers:function(){this._deletedLayers.eachLayer(function(i){this._deletableLayers.addLayer(i),i.fire("revert-deleted",{layer:i})},this)},save:function(){this._map.fire(L.Draw.Event.DELETED,{layers:this._deletedLayers})},removeAllLayers:function(){this._deletableLayers.eachLayer(function(i){this._removeLayer({layer:i})},this),this.save()},_enableLayerDelete:function(i){(i.layer||i.target||i).on("click",this._removeLayer,this)},_disableLayerDelete:function(i){var s=i.layer||i.target||i;s.off("click",this._removeLayer,this),this._deletedLayers.removeLayer(s)},_removeLayer:function(i){var s=i.layer||i.target||i;this._deletableLayers.removeLayer(s),this._deletedLayers.addLayer(s),s.fire("deleted")},_onMouseMove:function(i){this._tooltip.updatePosition(i.latlng)},_hasAvailableLayers:function(){return this._deletableLayers.getLayers().length!==0}})})(window,document);const ib="";var op={draw:{toolbar:{actions:{title:"መሳል ተው",text:"ተው"},finish:{title:"መሳል ጨርስ",text:"ጨርስ"},undo:{title:"መጨረሻ የተሳለውን ነጥብ አጥፋ",text:"መጨረሻ የተሳለውን ነጥብ አጥፋ"},buttons:{polyline:"ፖሊላየን ሳል",polygon:"ፖሊጎን ሳል",rectangle:"አራት መአዘን ሳል",circle:"ክብ ሳል",marker:"ምልክት ሳል",circlemarker:"ክብ ምልክት ሳል"}},handlers:{circle:{tooltip:{start:"ክብ ለመሳል ተጭንው ይጎትቱ"},radius:"ራዲየስ"},circlemarker:{tooltip:{start:"ክብ ምልክት ለመሳል ካርታውን ይጫኑ ይጎትቱ"}},marker:{tooltip:{start:"ምልክት ለመሳል ካርታውን ይጫኑ ይጎትቱ"}},polygon:{tooltip:{start:"ቅርጽን ለመሳል ካርታውን ተጭነው ይጎትቱ",cont:"ቅርጽን መሳሎን ለመቀጠል ይጫኑ",end:"ቅርጽን ስሎ ለመጨረስ የመጀመሪያውን ነጥብ ይጫኑ"}},polyline:{error:"<strong>ስህተት:</strong> መስመሮች እርስ በእርስ መተላለፍ አይችሉም!",tooltip:{start:"መስመር ለመሳል ካርታውን ተጭነው ይጎትቱ",cont:"መስመር መሳሎን ለመቀጠል ይጫኑ",end:"መስመር ስሎ ለመጨረስ የመጨረሻውን ነጥብ ይጫኑ"}},rectangle:{tooltip:{start:"ዐራት መአዝን ለመሳል ካርታውን ይጫኑ ይጎትቱ"}},simpleshape:{tooltip:{end:"ስለው ለመጨረስ አይጤን ይልቀቁ"}}}},edit:{toolbar:{actions:{save:{title:"ለውጦቹን አኑር",text:"አኑር"},cancel:{title:"ማስተካከሉን ተው፣ ሁሉንም ለውጦች ሰርዝ",text:"ተው"},clearAll:{title:"ሁሉንም የካርታ ገጾች አጥፋ",text:"ሁሉንም አጥፋ"}},buttons:{edit:"የካርታ ገጽ አስተካክል",editDisabled:"የሚስተካከል የካርታ ገጽ የለም",remove:"የካርታ ገጽ ሰርዝ.",removeDisabled:"የሚሰረዝ የካርታ ገጽ የለም"}},handlers:{edit:{tooltip:{text:"ለማስተካከል ምልክቱን ወይም መያዣውን ይጎትቱ",subtext:"ለውጥጡን ለመተው ተው የሚለውን ይጫኑ"}},remove:{tooltip:{text:"ማጥፋት የፈለጉትን ይጫኑ"}}}}},ap={draw:{toolbar:{actions:{title:"Zrušit kreslení",text:"Zrušit"},finish:{title:"Dokončit kreslení",text:"Dokončit"},undo:{title:"Smazat poslední nakreslený bod",text:"Smazat poslední bod"},buttons:{polyline:"Nakreslit mnohoúhelník",polygon:"Nakreslit polygon",rectangle:"Nakreslit obdélník",circle:"Nakreslit kruh",marker:"Nakreslit značku",circlemarker:"Nakreslit kruhovou značku"}},handlers:{circle:{tooltip:{start:"Kliknout a táhnout pro nakreslení kruhu."},radius:"Poloměr"},circlemarker:{tooltip:{start:"Kliknout do mapy pro umístění kruhové značky."}},marker:{tooltip:{start:"Kliknout do mapy pro umístění značky."}},polygon:{tooltip:{start:"Kliknout pro začátek kreslení tvaru.",cont:"Kliknout pro pokračování v kreslení tvaru.",end:"Kliknout na pvní bod k uzavření tvaru."}},polyline:{error:"<strong>Chyba:</strong> hrany tvaru se nemohou protínat!",tooltip:{start:"Kliknout pro začátek kreslení úsečky.",cont:"Kliknout pro pokračování v kreslení úsečky.",end:"Kliknout na koncový bod k ukončení kreslení úsečky."}},rectangle:{tooltip:{start:"Kliknout a táhnout k nakreslení obdélníku."}},simpleshape:{tooltip:{end:"Pustit myš k dokončení kreslení."}}}},edit:{toolbar:{actions:{save:{title:"Uložit změny.",text:"Uložit"},cancel:{title:"Zrušit úpravu, zruší všechny změny.",text:"Zrušit"},clearAll:{title:"Vymazat všechny vrstvy.",text:"Vymazat vše"}},buttons:{edit:"Upravit vrstvy.",editDisabled:"Žádné vrstvy k úpravě.",remove:"Vymazat vrstvy.",removeDisabled:"Žádná vrstva k vymazání."}},handlers:{edit:{tooltip:{text:"Táhnout za úchopy pro editaci tvaru.",subtext:"Kliknutím na zrušit vrátite změny."}},remove:{tooltip:{text:"Kliknout na tvar pro smazání"}}}}},lp={draw:{toolbar:{actions:{title:"Zeichnung abbrechen",text:"Abbrechen"},finish:{title:"Zeichnung fertigstellen",text:"Fertigstellen"},undo:{title:"Lösche den zuletzt gezeichneten Punkt",text:"Letzter Punkt löschen"},buttons:{polyline:"Zeichne eine Linie",polygon:"Zeichne ein Polygon",rectangle:"Zeichne ein Rechteck",circle:"Zeichne einen Kreis",marker:"Zeichne einen Marker",circlemarker:"Zeichne einen Kreis-Marker"}},handlers:{circle:{tooltip:{start:"Klicken und ziehen um einen Kreis zu zeichnen."},radius:"Radius"},circlemarker:{tooltip:{start:"Karte anklicken um einen Kreis-Marker zu platzieren."}},marker:{tooltip:{start:"Karte anklicken um einen Marker zu platzieren."}},polygon:{tooltip:{start:"Klicken um mit dem Zeichnen einer Form zu beginnen.",cont:"Klicken um mit dem Zeichnen dieser Form fortzufahren.",end:"Erster Punkt anklicken um diese Form abzuschliessen."}},polyline:{error:"<strong>Fehler:</strong> Form-Ecken dürfen sich nicht überschneiden!",tooltip:{start:"Klicken um mit dem Zeichnen einer Linie zu beginnen.",cont:"Klicken um mit dem Zeichnen dieser Linie fortzufahren.",end:"Erster Punkt anklicken um diese Linie abzuschliessen."}},rectangle:{tooltip:{start:"Klicken und ziehen um ein Rechteck zu zeichnen."}},simpleshape:{tooltip:{end:"Maustaste loslassen um die Zeichnung fertigzustellen."}}}},edit:{toolbar:{actions:{save:{title:"Speichere Änderungen.",text:"Speichern"},cancel:{title:"Bearbeitung abbrechen, alle Änderungen verwerfen.",text:"Abbrechen"},clearAll:{title:"Alle Layer bereinigen.",text:"Alles bereinigen"}},buttons:{edit:"Layer bearbeiten.",editDisabled:"Keine Layer zum bearbeiten.",remove:"Layer löschen.",removeDisabled:"Keine Layer zum löschen."}},handlers:{edit:{tooltip:{text:"Ziehe den Griff oder den Marker um die Eigenschaft zu bearbeiten.",subtext:"Klicke abbrechen um Änderungen rückgängig zu machen."}},remove:{tooltip:{text:"Klicke auf eine Eigenschaft um diese zu entfernen."}}}}},ic={draw:{toolbar:{actions:{title:"Cancel drawing",text:"Cancel"},finish:{title:"Finish drawing",text:"Finish"},undo:{title:"Delete last point drawn",text:"Delete last point"},buttons:{polyline:"Draw a polyline",polygon:"Draw a polygon",rectangle:"Draw a rectangle",circle:"Draw a circle",marker:"Draw a marker",circlemarker:"Draw a circlemarker"}},handlers:{circle:{tooltip:{start:"Click and drag to draw circle."},radius:"Radius"},circlemarker:{tooltip:{start:"Click map to place circle marker."}},marker:{tooltip:{start:"Click map to place marker."}},polygon:{tooltip:{start:"Click to start drawing shape.",cont:"Click to continue drawing shape.",end:"Click first point to close this shape."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Click to start drawing line.",cont:"Click to continue drawing line.",end:"Click last point to finish line."}},rectangle:{tooltip:{start:"Click and drag to draw rectangle."}},simpleshape:{tooltip:{end:"Release mouse to finish drawing."}}}},edit:{toolbar:{actions:{save:{title:"Save changes.",text:"Save"},cancel:{title:"Cancel editing, discards all changes.",text:"Cancel"},clearAll:{title:"Clear all layers.",text:"Clear All"}},buttons:{edit:"Edit layers.",editDisabled:"No layers to edit.",remove:"Delete layers.",removeDisabled:"No layers to delete."}},handlers:{edit:{tooltip:{text:"Drag handles, or marker to edit feature.",subtext:"Click cancel to undo changes."}},remove:{tooltip:{text:"Click on a feature to remove"}}}}},hp={draw:{toolbar:{actions:{title:"Cancelar dibujo",text:"Cancelar"},finish:{title:"Terminar dibujo",text:"Terminar"},undo:{title:"Eliminar último punto dibujado",text:"Eliminar último punto"},buttons:{polyline:"Dibujar una polilínea",polygon:"Dibujar un polígono",rectangle:"Dibujar un rectángulo",circle:"Dibujar un círculo",marker:"Dibujar un marcador",circlemarker:"Dibujar un marcador circular"}},handlers:{circle:{tooltip:{start:"Haz click y arrastra para dibujar un círculo"},radius:"Radio"},circlemarker:{tooltip:{start:"Haz click en el mapa para situar el marcador circular"}},marker:{tooltip:{start:"Haz click en el mapa para situar el marcador"}},polygon:{tooltip:{start:"Haz click para empezar a dibujar la forma",cont:"Haz click para continuar dibujando la forma",end:"Haz click en el primer punto para cerrar la forma"}},polyline:{error:"<strong>Error:</strong> las líneas no deben cruzarse",tooltip:{start:"Haz click para empezar a dibujar la línea",cont:"Haz click para continuar dibujando la línea",end:"Haz click en el último punto para terminar la línea"}},rectangle:{tooltip:{start:"Haz click y arrastra para dibujar un rectángulo"}},simpleshape:{tooltip:{end:"Suelta el ratón para terminar de dibujar"}}}},edit:{toolbar:{actions:{save:{title:"Guardar los cambios",text:"Guardar"},cancel:{title:"Cancelar la edición, descarta todos los cambios",text:"Cancelar"},clearAll:{title:"Limpiar todas las capas",text:"Limpiar todo"}},buttons:{edit:"Editar capas",editDisabled:"No hay capas que editar",remove:"Eliminar capas",removeDisabled:"No hay capas que eliminar"}},handlers:{edit:{tooltip:{text:"Arrastra el marcador para editar la forma",subtext:"Haz click en cancelar para deshacer los cambios"}},remove:{tooltip:{text:"Haz click en una forma para eliminarla"}}}}},cp={draw:{toolbar:{actions:{title:"Peru piirustus",text:"Peru"},finish:{title:"Hyväksy piirustus",text:"Hyväksy"},undo:{title:"Poista viimeinen piirretty piste",text:"Poista viimeinen piste"},buttons:{polyline:"Piirrä murtoviiva",polygon:"Piirrä monikulmio",rectangle:"Piirrä suorakulmio",circle:"Piirrä ympyrä",marker:"Piirrä merkki",circlemarker:"Piirrä piirimerkki"}},handlers:{circle:{tooltip:{start:"Piirrä ympyrä pitämällä hiiri painettuna ja vetämällä."},radius:"Säde"},circlemarker:{tooltip:{start:"Aseta ympyrämerkki painamalla karttaa."}},marker:{tooltip:{start:"Aseta markkeri painamalla karttaa."}},polygon:{tooltip:{start:"Paina aloittaaksesi muodon piirtämisen.",cont:"Paina jatkaaksesi muodon piirtämistä.",end:"Sulje muoto painamalla ensimmäistä pistettä."}},polyline:{error:"<strong>Virhe:</strong> muodon reunaa ei voi ylittää!",tooltip:{start:"Paina aloittaaksesi viivan piirtämisen.",cont:"Paina jatkaaksesi viivan piirtämistä.",end:"Paina viimeistä pistettä päättäksesi viiva."}},rectangle:{tooltip:{start:"Piirrä suorakulmio pitämällä hiiri painettuna ja vetämällä."}},simpleshape:{tooltip:{end:"Vapauta hiiri päättääksesi piirtämisen."}}}},edit:{toolbar:{actions:{save:{title:"Hyväksy muutokset.",text:"Hyväksy"},cancel:{title:"Peru muokkaus, hylkää kaikki muutokset.",text:"Peru"},clearAll:{title:"Poista kaikki tasot.",text:"Poista kaikki"}},buttons:{edit:"Muokkaa tasoja.",editDisabled:"Ei muokattavia tasoja.",remove:"Poista tasot.",removeDisabled:"Ei poistettavia tasoja."}},handlers:{edit:{tooltip:{text:"Vedä pistettä tai markkeria muokataksesi piirrettyjä ominaisuuksia.",subtext:"Kumoa muutokset painamalla peruuta."}},remove:{tooltip:{text:"Paina piirrettyä ominaisuutta poistaaksesi"}}}}},up={draw:{toolbar:{actions:{title:"Annuler le dessin",text:"Annuler"},finish:{title:"Terminer le dessin",text:"Terminer"},undo:{title:"Supprimer le dernier point tiré",text:"Supprimer le dernier point"},buttons:{polyline:"Dessinez une polyligne",polygon:"Dessinez un polygone",rectangle:"Dessinez un rectangle",circle:"Dessiner un cercle",marker:"Dessinez un marqueur",circlemarker:"Dessinez un marqueur circulaire"}},handlers:{circle:{tooltip:{start:"Cliquez et faites glisser pour dessiner le cercle."},radius:"Rayon"},circlemarker:{tooltip:{start:"Cliquez sur la carte pour placer le marqueur circulaire."}},marker:{tooltip:{start:"Cliquez sur la carte pour placer le marqueur."}},polygon:{tooltip:{start:"Cliquez pour commencer à dessiner.",cont:"Cliquez pour continuer à dessiner.",end:"Cliquez sur le premier point pour fermer cette forme."}},polyline:{error:"<strong>Erreur:</strong> les polyligne ne peuvent pas traverser!",tooltip:{start:"Cliquez pour commencer à dessiner.",cont:"Cliquez pour continuer à dessiner.",end:"Cliquez sur le dernier point pour fermer cette forme."}},rectangle:{tooltip:{start:"Cliquez et faites glisser pour dessiner le rectangle."}},simpleshape:{tooltip:{end:"Relâchez la souris pour terminer le dessin."}}}},edit:{toolbar:{actions:{save:{title:"Sauvegarder les modifications.",text:"Sauvegarder"},cancel:{title:"Annuler l'édition, rejette toutes les modifications.",text:"Annuler"},clearAll:{title:"Effacez toutes les collections.",text:"Tout effacer"}},buttons:{edit:"Modifier les collections.",editDisabled:"Pas de collections à éditer.",remove:"Supprimez les collections.",removeDisabled:"Pas de collections à supprimer."}},handlers:{edit:{tooltip:{text:"Sélectionnez les poignées ou le marqueur pour modifier l'entité.",subtext:"Cliquez sur annuler pour rétablir les modifications."}},remove:{tooltip:{text:"Cliquez sur une entité pour supprimer"}}}}},dp={draw:{toolbar:{actions:{title:"Rajzolás elvetése",text:"Mégse"},finish:{title:"Rajzolás befejezése",text:"Befejezés"},undo:{title:"Legutóbbi pont törlése",text:"Legutóbbi pont törlése"},buttons:{polyline:"Útvonal rajzolása",polygon:"Sokszög rajzolása",rectangle:"Négyszög rajzolása",circle:"Kör rajzolása",marker:"Jelölő rajzolása",circlemarker:"Kör-jelölő rajzolása"}},handlers:{circle:{tooltip:{start:"Kattintson és tartsa nyomva a rajzoláshoz."},radius:"Sugár"},circlemarker:{tooltip:{start:"Kör-jelölő elhelyezéséhez kattintson a térképre."}},marker:{tooltip:{start:"Jelölő elhelyezéséhez kattintson a térképre."}},polygon:{tooltip:{start:"Alakzat rajzolásához kattintson a térképre.",cont:"Alakzat folytatásához kattintson a térképre.",end:"Alakzat befejezéséhez kattintson a kezdőpontra."}},polyline:{error:"<strong>Error:</strong> shape edges cannot cross!",tooltip:{start:"Útvonal rajzolásához kattintson a térképre.",cont:"Útvonal folytatásához kattintson a térképre.",end:"Útvonal befejezéséhez kattintson a végpontra."}},rectangle:{tooltip:{start:"Kattintson és tartsa nyomva négyszög rajzolásához."}},simpleshape:{tooltip:{end:"Ha elégedett az alakzattal, engedje fel az egér gombját."}}}},edit:{toolbar:{actions:{save:{title:"Változtatások elmentése.",text:"Mentés"},cancel:{title:"Változtatások elvetése.",text:"Mégse"},clearAll:{title:"Összes réteg törlése.",text:"Összes törlése"}},buttons:{edit:"Rétegek szerkesztése.",editDisabled:"Nem állnak rendelkezésre szerkeszthető rétegek.",remove:"Rétegek törlése.",removeDisabled:"Nem állnak rendelkezésre törölhető rétegek."}},handlers:{edit:{tooltip:{text:"Módosításhoz használja a jelölők, alakzatok kezelőit.",subtext:"Változások elvetéséhez kattintson a 'Mégse' gombra."}},remove:{tooltip:{text:"Kattintson a jelölőkre, alakzatokra az eltávolításukhoz."}}}}},fp={draw:{toolbar:{actions:{title:"Annulla disegno",text:"Annulla"},finish:{title:"Completa disegno",text:"Completa"},undo:{title:"Elimina l'ultimo punto disegnato",text:"Elimina l'ultimo punto"},buttons:{polyline:"Disegna una polilinea",polygon:"Disegna un poligono",rectangle:"Disegna un rettangolo",circle:"Disegna un cerchio",marker:"Disegna un marcatore",circlemarker:"Disegna un marker circolare"}},handlers:{circle:{tooltip:{start:"Clicca e trascina per disegnare un cerchio."},radius:"Raggio"},circlemarker:{tooltip:{start:"Clicca la mappa per posizionare un marcatore circolare."}},marker:{tooltip:{start:"Clicca la mappa per posizionare un marcatore."}},polygon:{tooltip:{start:"Clicca per iniziare a disegnare una figura.",cont:"Clicca per continuare a disegnare una figura.",end:"Clicca il primo punto per chiudere questa figura."}},polyline:{error:"<strong>Errore:</strong> i margini della figura non si possono incrociare!",tooltip:{start:"Clicca per iniziare a disegnare una linea.",cont:"Clicca per continuare a disegnare una linea",end:"Clicca l'ultimo punto per finire questa linea"}},rectangle:{tooltip:{start:"Clicca e trascina per disegnare un rettangolo."}},simpleshape:{tooltip:{end:"Rilascia il mouse per finire il disegno."}}}},edit:{toolbar:{actions:{save:{title:"Salva modifiche.",text:"Salva"},cancel:{title:"Annulla tutte le modifiche.",text:"Annulla"},clearAll:{title:"Pulisci tutti i livelli.",text:"Pulisci tutto"}},buttons:{edit:"Modifica i livelli.",editDisabled:"Nessun livello disponibile per la modifica.",remove:"Elimina livelli.",removeDisabled:"Nessun livello disponibile per l'eliminazione."}},handlers:{edit:{tooltip:{text:"Trascina le maniglie, o i marcatori per modificare l'elemento.",subtext:"Clicca annulla per annullare le modifiche."}},remove:{tooltip:{text:"Clicca un elemento per rimuoverlo"}}}}},gp={draw:{toolbar:{actions:{title:"ხატვის გაუქმება",text:"გაუქმება"},finish:{title:"ხატვის დასრულება",text:"დასრულება"},undo:{title:"ბოლო დახატული წერტილის წაშლა",text:"ბოლო წერტილის წაშლა"},buttons:{polyline:"პოლილაინის დახაზვა",polygon:"პოლიგონის დახაზვა",rectangle:"მართკუთხედის დახაზვა",circle:"წრის დახაზვა",marker:"ადგილმდებარეობის დატანა",circlemarker:"ადგილმდებარეობის დატანა(წრის სახით)"}},handlers:{circle:{tooltip:{start:"დააწკაპუნეთ და გადაიტანეთ იმისათვის, რომ წრე დახაზოთ."},radius:"რადიუსი"},circlemarker:{tooltip:{start:"დააწკაპუნეთ რუკაზე ადგილმდებარეობის შესაქმნელად."}},marker:{tooltip:{start:"დააწკაპუნეთ რუკაზე ადგილმდებარეობის შესაქმნელად."}},polygon:{tooltip:{start:"დააწკაპუნეთ, კონტურის ხაზვის დაწყებისთვის.",cont:"დააწკაპუნეთ, კონტრუსი ხაზვის დასრულებისთვის.",end:"დააწკაპუნეთ პირველ წერტილზე, რათა დაასრულოთ კონტურის ხაზვა."}},polyline:{error:"<strong>შეცდომა:</strong> ხაზი ვერ გადაკვეთავს თავის თავს",tooltip:{start:"დააწკაპუნეთ, ხაზის ხაზვის დაწყებისთვის.",cont:"დააწკაპუნეთ, ხაზის ხაზვის დასრულებისთვის.",end:"დააწკაპუნეთ ბოლო წერტილზე, რათა დაასრულოთ ხაზის ხაზვა."}},rectangle:{tooltip:{start:"დააწკაპუნეთ და გადაიტანეთ იმისათვის, რომ მართკუთხედი დახაზოთ."}},simpleshape:{tooltip:{end:"გაათავისუფლეთ თაგვის ღილაკი ხაზვის დასასრულებლად."}}}},edit:{toolbar:{actions:{save:{title:"ცვლილებების შენახვა.",text:"შენახვა"},cancel:{title:"რედაქტირების გაუქმება, დააბრუნე ყველა ცვლილება.",text:"გაუქმება"},clearAll:{title:"ყველა რედაქტირებული ფენის გასუფთავება.",text:"გასუფთავება"}},buttons:{edit:"რედაქტირება.",editDisabled:"ფენები არ არის რედაქტირებისთვის.",remove:"წაშლა.",removeDisabled:"ფენები არ არის წაშლისთვის."}},handlers:{edit:{tooltip:{text:"გადაიტანეთ წვერები ან წერტილები ობიექტის რედაქტირებისთვის.",subtext:'დააჭირეთ "გაუქმება", საწყის მდგომარეობაში დასაბრუნებლად.'}},remove:{tooltip:{text:"დააწკაპუნეთ ობიექტზე წაშლისთვის"}}}}},pp={draw:{toolbar:{actions:{title:"Tekening annuleren",text:"Annuleren"},finish:{title:"Tekening voltooien",text:"Voltooien"},undo:{title:"Laatst getekende punt verwijderen",text:"Verwijder laatst getekende punt"},buttons:{polyline:"Teken een polygonale lijn",polygon:"Teken een polygoon",rectangle:"Teken een rechthoek",circle:"Teken een cirkel",marker:"Plaats een marker",circlemarker:"Teken een cirkelmarkering"}},handlers:{circle:{tooltip:{start:"Klik en sleep om de cirkel te tekenen."},radius:"Radius"},circlemarker:{tooltip:{start:"Klik op de kaart om de cirkelmarkering te plaatsen."}},marker:{tooltip:{start:"Klik op de kaart om de markering te plaatsen."}},polygon:{tooltip:{start:"Klik om te beginnen met het tekenen van de polygoon.",cont:"Klik om door te gaan met het tekenen van de vorm.",end:"Klik op het eerste punt om dit polygoon te sluiten."}},polyline:{error:"<strong>Fout:</strong> vormranden kunnen niet kruisen!",tooltip:{start:"Klik om te beginnen met het tekenen van een lijn.",cont:"Klik om door te gaan met het tekenen van de lijn.",end:"Klik laatst getekende punt om deze lijn te voltooien."}},rectangle:{tooltip:{start:"Klik en sleep om een rechthoek te tekenen."}},simpleshape:{tooltip:{end:"Laat de muis los om de tekening te voltooien."}}}},edit:{toolbar:{actions:{save:{title:"Wijzigingen opslaan.",text:"Opslaan"},cancel:{title:"Annuleer bewerken en verwijder alle wijzigingen.",text:"Annuleren"},clearAll:{title:"Verwijder alle lagen.",text:"Verwijderd alles"}},buttons:{edit:"Lagen bewerken.",editDisabled:"Geen lagen om te bewerken.",remove:"Verwijder lagen.",removeDisabled:"Geen lagen om te verwijderen."}},handlers:{edit:{tooltip:{text:"Sleep hoeken om te schalen of middenpunt om te verplaatsen.",subtext:"Klik op annuleren om wijzigingen ongedaan te maken."}},remove:{tooltip:{text:"Klik op een vorm om die te verwijderen"}}}}},_p={draw:{toolbar:{actions:{title:"Avbryt markering",text:"Avbryt"},finish:{title:"Ferdiggjør markering",text:"Ferdiggjør"},undo:{title:"Ta bort siste punkt",text:"Slett siste punkt"},buttons:{polyline:"Tegn flere linjer",polygon:"Tegn en mangekant",rectangle:"Tegn et rektangel",circle:"Tegn en sirkel",marker:"Sett et markeringspunkt",circlemarker:"Tegn et sirkelpunkt"}},handlers:{circle:{tooltip:{start:"Klikk og dra for å tegne en sirkel."},radius:"Radius"},circlemarker:{tooltip:{start:"Klikk på kartet for å plassere et sirkelpunkt."}},marker:{tooltip:{start:"Klikk på kartet for å markere et punkt."}},polygon:{tooltip:{start:"Klikk for å tegne et område.",cont:"Klikk for å fortsette tegningen.",end:"Klikk på det første punktet for å lukke området."}},polyline:{error:"<strong>Error:</strong> kantene kan ikke krysses!",tooltip:{start:"Klikk for å tegne en linje.",cont:"Klikk for å fortsette å tegne linjen.",end:"Kikk siste punkt for å ferdiggjøre linjen."}},rectangle:{tooltip:{start:"Klikk og dra for å tegne et rektangel."}},simpleshape:{tooltip:{end:"Slipp museknappen for å gjøre tegningen ferdig."}}}},edit:{toolbar:{actions:{save:{title:"Lagre endringer.",text:"Lagre"},cancel:{title:"Avbryt redigering og forkast endringer.",text:"Avbryt"},clearAll:{title:"Nullstill alle figurer.",text:"Nullstill alt."}},buttons:{edit:"Rediger figur.",editDisabled:"Ingen figur å redigere.",remove:"Slett figur.",removeDisabled:"Ingen figur å slette."}},handlers:{edit:{tooltip:{text:"Dra markør for å redigere.",subtext:"Klikk avbryt for å angre endringer."}},remove:{tooltip:{text:"Klikk for å ta bort"}}}}},mp={draw:{toolbar:{actions:{title:"Anuluj wyznaczanie",text:"Anuluj"},finish:{title:"Zakończ wyznaczanie",text:"Zakończ"},undo:{title:"Usuń ostatnio wyznaczony punkt",text:"Usuń ostatni punkt"},buttons:{polyline:"Wyznacz wzór",polygon:"Wyznacz wielokąt",rectangle:"Wyznacz prostokąt",circle:"Wyznacz koło",marker:"Umieść znacznik",circlemarker:"Umieść okrągły znacznik"}},handlers:{circle:{tooltip:{start:"Kliknij i przeciągnij, aby wyznaczyć koło."},radius:"Promień"},circlemarker:{tooltip:{start:"Kliknij na mapę, aby umieścić okrągły znacznik."}},marker:{tooltip:{start:"Kliknij na mapę, aby umieścić znacznik."}},polygon:{tooltip:{start:"Kliknij, aby rozpocząć wyznaczanie kształtu.",cont:"Kliknij, aby kontynuować wyznaczanie kształtu.",end:"Kliknij pierwszy punkt, aby zakończyć ten kształt."}},polyline:{error:"<strong>Błąd:</strong> odcinki nie mogą się przecinać!",tooltip:{start:"Kliknij, aby rozpocząć wyznaczanie lini.",cont:"Kliknij, aby kontynuować wyznaczanie lini.",end:"Kliknij ostatni punkt, aby ukończyć linię."}},rectangle:{tooltip:{start:"Kliknij i przeciągnij, aby wyznaczyć prostokąt."}},simpleshape:{tooltip:{end:"Zwolnij przycisk myszy, aby ukończyć wyznaczanie."}}}},edit:{toolbar:{actions:{save:{title:"Zapisz zmiany.",text:"Zapisz"},cancel:{title:"Anuluj edytowanie i odrzuć zmiany.",text:"Anuluj"},clearAll:{title:"Wyczyść wszystkie warstwy.",text:"Wyczyść wszystko"}},buttons:{edit:"Edytuj warstwy.",editDisabled:"Brak warstw do edycji.",remove:"Usuń warstwy.",removeDisabled:"Brak warstw do usunięcia."}},handlers:{edit:{tooltip:{text:"Przeciągnij uchwyt lub znacznik, aby edytować.",subtext:"Kliknij anuluj, aby odrzucić zmiany."}},remove:{tooltip:{text:"Kliknij obiekt, aby go usunąć."}}}}},yp={draw:{toolbar:{actions:{title:"Cancelar desenho",text:"Cancelar"},finish:{title:"Terminar desenho",text:"Terminar"},undo:{title:"Eliminar último ponto desenhado",text:"Eliminar último ponto"},buttons:{polyline:"Desenhar uma polilinha",polygon:"Desenhar um polígono",rectangle:"Desenhar um retângulo",circle:"Desenhar um círculo",marker:"Desenhar un marcador",circlemarker:"Desenhar um marcador circular"}},handlers:{circle:{tooltip:{start:"Clique e arrastrar para desenhar o círculo."},radius:"Raio"},circlemarker:{tooltip:{start:"Clique no mapa para colocar o marcador circular."}},marker:{tooltip:{start:"Clique no mapa para colocar o marcador."}},polygon:{tooltip:{start:"Clique para começar a desenhar a figura.",cont:"Clique para continuar desenhando a figura.",end:"Clique no primeiro ponto para fechar esta figura."}},polyline:{error:"<strong>Erro:</strong> as bordas de uma forma não podem atravessar!",tooltip:{start:"Clique para começar a desenhar a linha.",cont:"Clique para continuar desenhando a linha.",end:"Clique no último ponto para terminar a linha."}},rectangle:{tooltip:{start:"Clique e arrastrar para desenhar o retângulo."}},simpleshape:{tooltip:{end:"Solte o mouse para terminar o desenho."}}}},edit:{toolbar:{actions:{save:{title:"Guardar alterações.",text:"Guardar"},cancel:{title:"Cancelar edição, descarta todas as alterações.",text:"Cancelar"},clearAll:{title:"Limpar todas as camadas.",text:"Limpar tudo"}},buttons:{edit:"Editar camadas.",editDisabled:"Nenhuma camada que editar.",remove:"Eliminar camadas.",removeDisabled:"Nenhuma camada que eliminar."}},handlers:{edit:{tooltip:{text:"Arraste os manipuladores ou marcadores para editar a figura.",subtext:"Clique em cancelar para desfazer as alterações."}},remove:{tooltip:{text:"Clique em uma figura para removê-la"}}}}},vp={draw:{toolbar:{actions:{title:"Отменить рисование",text:"Отмена"},finish:{title:"Завершить рисование",text:"Завершить"},undo:{title:"Удалить последнюю нарисованную точку",text:"Удалить последнюю точку"},buttons:{polyline:"Нарисовать полилинию",polygon:"Нарисовать полигон",rectangle:"Нарисовать прямоугольник",circle:"Нарисовать круг",marker:"Нарисовать точку",circlemarker:"Нарисовать точку(в виде круга)"}},handlers:{circle:{tooltip:{start:"Кликните и перетащите для того, чтобы нарисовать круг."},radius:"Радиус"},circlemarker:{tooltip:{start:"Кликните на карту для установки точки."}},marker:{tooltip:{start:"Кликните на карту для установки точки."}},polygon:{tooltip:{start:"Кликните, чтобы начать рисовать контур.",cont:"Кликните, чтобы завершить рисовать контур.",end:"Кликните на первую точку, чтобы завершить рисование контура."}},polyline:{error:"<strong>Ошибка:</strong> линия не может самопересекаться!",tooltip:{start:"Кликните, чтобы начать рисовать линию.",cont:"Кликните, чтобы завершить рисование линии.",end:"Кликните на последнюю точку, чтобы завершить рисование линии."}},rectangle:{tooltip:{start:"Кликните и перетащите, чтобы нарисовать прямоугольник."}},simpleshape:{tooltip:{end:"Отпустите кнопку мыши для завершения рисования."}}}},edit:{toolbar:{actions:{save:{title:"Сохранить изменения.",text:"Сохранить"},cancel:{title:"Отменить редактирование, откатить все изменения.",text:"Отмена"},clearAll:{title:"Очистить все редактируемые слои.",text:"Очистить всё"}},buttons:{edit:"Редактировать.",editDisabled:"Нет слоёв для редактирования.",remove:"Удалить.",removeDisabled:"Нет слоёв для удаления."}},handlers:{edit:{tooltip:{text:"Перетащите вершины или точки для редактирования фигуры.",subtext:'Нажмите "Отмена", чтобы откатить изменения.'}},remove:{tooltip:{text:"Кликните на фигуру для удаления"}}}}},xp={draw:{toolbar:{actions:{title:"Zrušiť kreslenie",text:"Zrušiť"},finish:{title:"Dokončiť kreslenie",text:"Dokončiť"},undo:{title:"Zmazať posledný nakreslený bod",text:"Zmazať posledný bod"},buttons:{polyline:"Nakresliť čiaru",polygon:"Nakresliť polygón",rectangle:"Nakresliť obdĺžnik",circle:"Nakresliť kruh",marker:"Nakresliť bod",circlemarker:"Nakresliť kruhový bod"}},handlers:{circle:{tooltip:{start:"Kliknite a potiahnite, aby ste nakreslili kruh."},radius:"Polomer"},circlemarker:{tooltip:{start:"Kliknite na mapu aby ste umiestnili kruhový bod."}},marker:{tooltip:{start:"Kliknite na mapu aby ste umiestnili bod."}},polygon:{tooltip:{start:"Kliknite, aby ste začali kresliť útvar.",cont:"Kliknite, aby ste nakreslili ďalší bod útvaru.",end:"Kliknite na prvý bod, aby ste uzavreli útvar."}},polyline:{error:"<strong>Chyba:</strong> čiary sa nesmú pretínať!",tooltip:{start:"Kliknite, aby ste začali kresliť čiaru.",cont:"Kliknite, aby ste nakreslili ďalší bod čiary.",end:"Kliknite posledný bod, aby ste dokončili čiaru."}},rectangle:{tooltip:{start:"Kliknite a potiahnite, aby ste nakreslili štvorec."}},simpleshape:{tooltip:{end:"Uvoľnením tlačidla myši ukončíte kreslenie."}}}},edit:{toolbar:{actions:{save:{title:"Uložiť zmeny.",text:"Uložiť"},cancel:{title:"Ukončiť úpravu, zrušiť všetky zmeny.",text:"Zrušiť"},clearAll:{title:"Zmazať všetky vrstvy.",text:"Zmazať všetko"}},buttons:{edit:"Upraviť vrstvy.",editDisabled:"Žiadne vrstvy pre úpravu",remove:"Zmazať vrstvy.",removeDisabled:"Žiadne vrstvy pre zmazanie."}},handlers:{edit:{tooltip:{text:"Potiahnutím vyznačených štvorčekov, alebo bodov upravíte útvar.",subtext:"Kliknite zrušiť, pre zrušenie zmien."}},remove:{tooltip:{text:"Kliknite na útvar pre jeho zmazanie."}}}}},wp={draw:{toolbar:{actions:{title:"Скасувати креслення",text:"Скасувати"},finish:{title:"Завершити креслення",text:"Завершити"},undo:{title:"Видалити останню нанесену точку",text:"Видалити останню точку"},buttons:{polyline:"Накреслити криву",polygon:"Накреслити многокутник",rectangle:"Накреслити прямокутник",circle:"Накреслити коло",marker:"Розмістити маркер",circlemarker:"Розмістити маркер-коло"}},handlers:{circle:{tooltip:{start:"Натисніть і перетягуйте вказівник, щоб накреслити коло."},radius:"Радіус"},circlemarker:{tooltip:{start:"Натисніть на мапу, щоб розмістити маркер-коло."}},marker:{tooltip:{start:"Натисніть на мапу, щоб розмістити маркер."}},polygon:{tooltip:{start:"Натисніть, щоб накреслити фігуру.",cont:"Натисніть, щоб продовжити креслення фігури.",end:"Натисніть на першу точку, щоб замкнути цю фігуру."}},polyline:{error:"<strong>Помилка:</strong> сторони фігури не мають перетинатись!",tooltip:{start:"Натисніть, щоб накреслити лінію.",cont:"Натисніть, щоб продовжити креслення лінії.",end:"Натисніть на останню точку, щоб завершити лінію."}},rectangle:{tooltip:{start:"Натисніть і перетягуйте вказівник, щоб накреслити прямокутник."}},simpleshape:{tooltip:{end:"Відпустіть мишку, щоб завершити рисування."}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни.",text:"Зберегти"},cancel:{title:"Припинити редагування, скасувати всі зміни.",text:"Скасувати"},clearAll:{title:"Очистити всі шари.",text:"Очистити все"}},buttons:{edit:"Редагувати шари.",editDisabled:"Немає шарів для редагування.",remove:"Видалити шари.",removeDisabled:"Немає шарів для видалення."}},handlers:{edit:{tooltip:{text:"Перетягуйте важелі або маркер для редагування фігури.",subtext:"Натисніть «Скасувати» для скасування змін."}},remove:{tooltip:{text:"Натисніть на фігуру для видалення"}}}}},Ep={draw:{toolbar:{actions:{title:"الغاء الرسم",text:"الغاء"},finish:{title:"انهاء الرسم",text:"انهاء"},undo:{title:"مسح اخر رسمة",text:"مسح اخر نقطة"},buttons:{polyline:"رسم خط",polygon:"رسم منطقة",rectangle:"رسم مستطيل",circle:"رسم دائرة",marker:"رسم علامة",circlemarker:"رسم علامة دائرة"}},handlers:{circle:{tooltip:{start:"اضغط واسحب لرسم دائرة"},radius:"القطر"},circlemarker:{tooltip:{start:"اضغط على الخريطة لرسم دائرة"}},marker:{tooltip:{start:"اضغط على الخريطة لرسم نقطة"}},polygon:{tooltip:{start:"اضغط لبدء رسم منطقة",cont:"اضغط لاستمرار رسم منطقة",end:"اضغط على اول نقطة لاكمال المنطقة"}},polyline:{error:"<strong>خطأ:</strong> لا يمكن تقاطع الخطوط",tooltip:{start:"اضغط لبدئ رسم الخط",cont:"اضغط لاستكمال رسم الخط",end:"اضغط على اخر نقطة للانهاء"}},rectangle:{tooltip:{start:"اضغط واسحب لرسم مستطيل"}},simpleshape:{tooltip:{end:"اترك الماوس للانهاء"}}}},edit:{toolbar:{actions:{save:{title:"حفظ التغييرات",text:"حفظ"},cancel:{title:"الغاء كل التعديلات",text:"الغاء"},clearAll:{title:"مسح كل الطبقات",text:"مسح الكل"}},buttons:{edit:"تعديل الطبقات",editDisabled:"لاتوجد طبقات للتعديل",remove:"مسح الطبقات",removeDisabled:"لا يوجد طبقات للمسح"}},handlers:{edit:{tooltip:{text:"اسحب للتعديل",subtext:"اضغط الغاء لمسح التعديلات"}},remove:{tooltip:{text:"اضغط على رسمة للمسح"}}}}},Lp={draw:{toolbar:{actions:{title:"取消绘制",text:"取消"},finish:{title:"结束绘制",text:"结束"},undo:{title:"删除最后一个绘制点",text:"删除最后一个点"},buttons:{polyline:"绘制折线",polygon:"绘制多边形",rectangle:"绘制矩形",circle:"绘制圆形",marker:"绘制标志物",circlemarker:"绘制圆形标志物"}},handlers:{circle:{tooltip:{start:"单击并拖拽绘制圆形"},radius:"半径"},circlemarker:{tooltip:{start:"单击地图放置圆形标志物"}},marker:{tooltip:{start:"单击地图放置标志物"}},polygon:{tooltip:{start:"单击地图绘制图形",cont:"继续单击绘制图形",end:"单击起始点结束绘制"}},polyline:{error:"<strong>错误:</strong> 图形边缘不能交叉!",tooltip:{start:"单击地图绘制折线",cont:"继续单击绘制下一段折线",end:"单击最后一个点结束绘制"}},rectangle:{tooltip:{start:"单击并拖拽绘制矩形"}},simpleshape:{tooltip:{end:"松开鼠标结束绘制"}}}},edit:{toolbar:{actions:{save:{title:"保存变更",text:"保存"},cancel:{title:"取消编辑,放弃所有变更",text:"取消"},clearAll:{title:"清除所有图形",text:"清除所有"}},buttons:{edit:"编辑图形",editDisabled:"无图形可编辑",remove:"删除图形",removeDisabled:"无图形可删除"}},handlers:{edit:{tooltip:{text:"拖拽线段或标志点以编辑图形",subtext:"点击<strong>取消</strong>按钮撤销变更"}},remove:{tooltip:{text:"单击图形以移除"}}}}},bp={draw:{toolbar:{actions:{title:"Çizimi iptal et",text:"İptal"},finish:{title:"Çizimi Bitir",text:"Bitir"},undo:{title:"Çizilen son noktayı sil",text:"Son noktayı sil"},buttons:{polyline:"Çoklu çizgi çiz",polygon:"Çokgen çiz",rectangle:"Dikdörtgen çiz",circle:"Yuvarlak çiz",marker:"İşaretçi çiz",circlemarker:"Yuvarlak işaretçi çiz"}},handlers:{circle:{tooltip:{start:"Yuvarlak çizmek için tıklayın ve sürükleyin."},radius:"Çap"},circlemarker:{tooltip:{start:"Yuvarlak işaretçi yerleştirmek için haritaya tıklayın."}},marker:{tooltip:{start:"İşaretçi yerleştirmek için haritaya tıklayın."}},polygon:{tooltip:{start:"Şekil çizmeye başlamak için tıklayın.",cont:"Şekil çizmeye devam etmek için tıklayın.",end:"Bu şekli tamamlamak için ilk noktayı tıklayın."}},polyline:{error:"<strong>Hata:</strong> şekil kenarları kesişemez!",tooltip:{start:"Hat çizmeye başlamak için tıklayın.",cont:"Hat çizmeye devam etmek için tıklayın.",end:"Bu hattı tamamlamak için ilk noktayı tıklayın."}},rectangle:{tooltip:{start:"Dikdörtgen çizmek için tıklayın ve sürükleyin."}},simpleshape:{tooltip:{end:"Çizimi bitirmek için fareyi bırakın."}}}},edit:{toolbar:{actions:{save:{title:"Değişiklikleri kaydet.",text:"Kaydet"},cancel:{title:"Düzenlemeyi iptal et, tüm değişiklikleri çıkar.",text:"İptal"},clearAll:{title:"Tüm katmanları temizle.",text:"Hepsini temizle"}},buttons:{edit:"Katmanları düzenle.",editDisabled:"Düzenlenecek katman bulunamadı.",remove:"Katmanları sil.",removeDisabled:"Silinecek katman bulunamadı."}},handlers:{edit:{tooltip:{text:"Çizimi düzenlemek için köşeleri veya işaretçiyi sürükleyin.",subtext:"Değişiklikleri geri almak için iptale tıklayın."}},remove:{tooltip:{text:"Çizimi silmek için tıklayın"}}}}},Cp={draw:{toolbar:{actions:{title:"Anulați desenul",text:"Anulare"},finish:{title:"Terminați desenul",text:"Termina"},undo:{title:"Șterge ultimul punct desenat",text:"Șterge ultimul punct"},buttons:{polyline:"Desenați o polilinie",polygon:"Desenați un poligon",rectangle:"Desenați un dreptunghi",circle:"Desenează un cerc",marker:"Desenați un marker",circlemarker:"Desenați un marcator de cerc"}},handlers:{circle:{tooltip:{start:"Dați clic și trageți pentru a desena cerc."},radius:"Rază"},circlemarker:{tooltip:{start:"Dați clic pe hartă pentru a plasa marcatorul cercului."}},marker:{tooltip:{start:"Dați clic pe hartă pentru a plasa marcatorul."}},polygon:{tooltip:{start:"Dați clic pentru a începe desenarea parcelei",cont:"Dați clic pentru a continua desenarea parcelei",end:"Dați clic pe primul punct pentru a închide această parcelei."}},polyline:{error:"<strong>Eroare:</strong> marginile formei nu se pot traversa!",tooltip:{start:"Daţi clic pentru a începe să desenezi o linie.",cont:"Daţi clic pentru a continua să desenezi linia.",end:"Dați clic pe ultimul punct pentru a ajunge la linia de sosire."}},rectangle:{tooltip:{start:"Dați clic și trageți pentru a desena dreptunghi."}},simpleshape:{tooltip:{end:"Eliberați mouse-ul pentru a termina desenul."}}}},edit:{toolbar:{actions:{save:{title:"Salvează modificările.",text:"Salvați"},cancel:{title:"Anulează editarea, anulează toate modificările.",text:"Anulare"},clearAll:{title:"Ștergeți toate straturile.",text:"Curata tot"}},buttons:{edit:"Editați straturi.",editDisabled:"Fără straturi de editat.",remove:"Ștergeți straturile.",removeDisabled:"Nu există straturi de șters."}},handlers:{edit:{tooltip:{text:"Trageți mânerele sau marcatorul pentru a edita caracteristica.",subtext:"Dați clic pe Anulare pentru a anula modificările."}},remove:{tooltip:{text:"Dați clic pe o caracteristică pentru a o elimina"}}}}},Tp=function(r){var t=ic;switch(r.toLocaleLowerCase()){case"de":case"de-at":case"de-be":case"de-ch":case"de-de":case"de-li":case"de-lu":case"de-de.utf-8":case"german":t=lp;break;case"en":case"en-us":case"en-ca":case"en-gb":case"en-us.utf-8":case"english":t=ic;break;case"ar":case"ar-ae":case"ar-eg":case"arabic":t=Ep;break;case"fi":case"fi-fi":case"fi-fi.utf-8":case"finnish":t=cp;break;case"fr":case"fr-us":case"fr-ca":case"fr-us.utf-8":case"french":t=up;break;case"es":case"es-us":case"es-ca":case"es-us.utf-8":case"spanish":t=hp;break;case"sk":case"sk-sk":case"sk-sk.utf-8":case"slovak":t=xp;break;case"pl":case"pl-pl":case"pl-pl.utf-8":case"polish":t=mp;break;case"pt":case"pt-pt":case"pt-pt.utf-8":case"portuguese":t=yp;break;case"uk":case"uk-ua":case"uk-ua.utf-8":case"ukrainian":t=wp;break;case"cs":case"cs-cz":case"cs-cz.utf-8":case"czech":t=ap;break;case"ru":case"ru-ru":case"ru-ru.utf-8":case"russian":t=vp;break;case"ka":case"ka-ka":case"ka-ka.utf-8":case"georgian":t=gp;break;case"no":case"no-no":case"no-no.utf-8":case"norwegian":t=_p;break;case"am":case"am-et":case"am-et.utf-8":case"amharic":t=op;break;case"nl":case"nl-nl":case"nl-nl.utf-8":case"nl-be":case"nl-be.utf-8":case"dutch":case"belgian":case"flemish":t=pp;break;case"it":case"it-it":case"it-ch":case"it-it.utf-8":case"it-ch.utf-8":case"italiano":case"italian":t=fp;break;case"hu":case"hu-HU":case"hu-hu":case"hu-HU.utf-8":case"hu-hu.utf-8":case"magyar":case"hungarian":t=dp;break;case"zh":case"zh-cn":case"zh-cn.utf-8":case"chinese":t=Lp;break;case"tr":case"tr-tr":case"tr-tr.utf-8":case"turkish":t=bp;break;case"ro":case"ro-ro":case"ro-RO":case"ro-ro.utf-8":case"romanian":t=Cp;break;default:throw new Error("[language] not found")}try{L&&L.drawLocal&&(L.drawLocal=t)}catch{}return t};function nc(r,t){return function(){return r.apply(t,arguments)}}const{toString:Mp}=Object.prototype,{getPrototypeOf:ya}=Object,Ls=(r=>t=>{const e=Mp.call(t);return r[e]||(r[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ze=r=>(r=r.toLowerCase(),t=>Ls(t)===r),bs=r=>t=>typeof t===r,{isArray:kn}=Array,vr=bs("undefined");function Sp(r){return r!==null&&!vr(r)&&r.constructor!==null&&!vr(r.constructor)&&Ce(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const rc=Ze("ArrayBuffer");function Pp(r){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(r):t=r&&r.buffer&&rc(r.buffer),t}const kp=bs("string"),Ce=bs("function"),sc=bs("number"),Cs=r=>r!==null&&typeof r=="object",Rp=r=>r===!0||r===!1,Ts=r=>{if(Ls(r)!=="object")return!1;const t=ya(r);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Ap=Ze("Date"),Ip=Ze("File"),Dp=Ze("Blob"),Op=Ze("FileList"),Fp=r=>Cs(r)&&Ce(r.pipe),zp=r=>{let t;return r&&(typeof FormData=="function"&&r instanceof FormData||Ce(r.append)&&((t=Ls(r))==="formdata"||t==="object"&&Ce(r.toString)&&r.toString()==="[object FormData]"))},Np=Ze("URLSearchParams"),Bp=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xr(r,t,{allOwnKeys:e=!1}={}){if(r===null||typeof r>"u")return;let n,i;if(typeof r!="object"&&(r=[r]),kn(r))for(n=0,i=r.length;n<i;n++)t.call(null,r[n],n,r);else{const s=e?Object.getOwnPropertyNames(r):Object.keys(r),a=s.length;let h;for(n=0;n<a;n++)h=s[n],t.call(null,r[h],h,r)}}function oc(r,t){t=t.toLowerCase();const e=Object.keys(r);let n=e.length,i;for(;n-- >0;)if(i=e[n],t===i.toLowerCase())return i;return null}const ac=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),lc=r=>!vr(r)&&r!==ac;function va(){const{caseless:r}=lc(this)&&this||{},t={},e=(n,i)=>{const s=r&&oc(t,i)||i;Ts(t[s])&&Ts(n)?t[s]=va(t[s],n):Ts(n)?t[s]=va({},n):kn(n)?t[s]=n.slice():t[s]=n};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&xr(arguments[n],e);return t}const Gp=(r,t,e,{allOwnKeys:n}={})=>(xr(t,(i,s)=>{e&&Ce(i)?r[s]=nc(i,e):r[s]=i},{allOwnKeys:n}),r),Up=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),jp=(r,t,e,n)=>{r.prototype=Object.create(t.prototype,n),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:t.prototype}),e&&Object.assign(r.prototype,e)},Zp=(r,t,e,n)=>{let i,s,a;const h={};if(t=t||{},r==null)return t;do{for(i=Object.getOwnPropertyNames(r),s=i.length;s-- >0;)a=i[s],(!n||n(a,r,t))&&!h[a]&&(t[a]=r[a],h[a]=!0);r=e!==!1&&ya(r)}while(r&&(!e||e(r,t))&&r!==Object.prototype);return t},Wp=(r,t,e)=>{r=String(r),(e===void 0||e>r.length)&&(e=r.length),e-=t.length;const n=r.indexOf(t,e);return n!==-1&&n===e},Hp=r=>{if(!r)return null;if(kn(r))return r;let t=r.length;if(!sc(t))return null;const e=new Array(t);for(;t-- >0;)e[t]=r[t];return e},Vp=(r=>t=>r&&t instanceof r)(typeof Uint8Array<"u"&&ya(Uint8Array)),Xp=(r,t)=>{const n=(r&&r[Symbol.iterator]).call(r);let i;for(;(i=n.next())&&!i.done;){const s=i.value;t.call(r,s[0],s[1])}},Yp=(r,t)=>{let e;const n=[];for(;(e=r.exec(t))!==null;)n.push(e);return n},Kp=Ze("HTMLFormElement"),qp=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,n,i){return n.toUpperCase()+i}),hc=(({hasOwnProperty:r})=>(t,e)=>r.call(t,e))(Object.prototype),Jp=Ze("RegExp"),cc=(r,t)=>{const e=Object.getOwnPropertyDescriptors(r),n={};xr(e,(i,s)=>{t(i,s,r)!==!1&&(n[s]=i)}),Object.defineProperties(r,n)},Qp=r=>{cc(r,(t,e)=>{if(Ce(r)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const n=r[e];if(Ce(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},$p=(r,t)=>{const e={},n=i=>{i.forEach(s=>{e[s]=!0})};return kn(r)?n(r):n(String(r).split(t)),e},t_=()=>{},e_=(r,t)=>(r=+r,Number.isFinite(r)?r:t),xa="abcdefghijklmnopqrstuvwxyz",uc="0123456789",dc={DIGIT:uc,ALPHA:xa,ALPHA_DIGIT:xa+xa.toUpperCase()+uc},i_=(r=16,t=dc.ALPHA_DIGIT)=>{let e="";const{length:n}=t;for(;r--;)e+=t[Math.random()*n|0];return e};function n_(r){return!!(r&&Ce(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const r_=r=>{const t=new Array(10),e=(n,i)=>{if(Cs(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[i]=n;const s=kn(n)?[]:{};return xr(n,(a,h)=>{const c=e(a,i+1);!vr(c)&&(s[h]=c)}),t[i]=void 0,s}}return n};return e(r,0)},s_=Ze("AsyncFunction"),O={isArray:kn,isArrayBuffer:rc,isBuffer:Sp,isFormData:zp,isArrayBufferView:Pp,isString:kp,isNumber:sc,isBoolean:Rp,isObject:Cs,isPlainObject:Ts,isUndefined:vr,isDate:Ap,isFile:Ip,isBlob:Dp,isRegExp:Jp,isFunction:Ce,isStream:Fp,isURLSearchParams:Np,isTypedArray:Vp,isFileList:Op,forEach:xr,merge:va,extend:Gp,trim:Bp,stripBOM:Up,inherits:jp,toFlatObject:Zp,kindOf:Ls,kindOfTest:Ze,endsWith:Wp,toArray:Hp,forEachEntry:Xp,matchAll:Yp,isHTMLForm:Kp,hasOwnProperty:hc,hasOwnProp:hc,reduceDescriptors:cc,freezeMethods:Qp,toObjectSet:$p,toCamelCase:qp,noop:t_,toFiniteNumber:e_,findKey:oc,global:ac,isContextDefined:lc,ALPHABET:dc,generateString:i_,isSpecCompliantForm:n_,toJSONObject:r_,isAsyncFn:s_,isThenable:r=>r&&(Cs(r)||Ce(r))&&Ce(r.then)&&Ce(r.catch)};function vt(r,t,e,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",t&&(this.code=t),e&&(this.config=e),n&&(this.request=n),i&&(this.response=i)}O.inherits(vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const fc=vt.prototype,gc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{gc[r]={value:r}}),Object.defineProperties(vt,gc),Object.defineProperty(fc,"isAxiosError",{value:!0}),vt.from=(r,t,e,n,i,s)=>{const a=Object.create(fc);return O.toFlatObject(r,a,function(c){return c!==Error.prototype},h=>h!=="isAxiosError"),vt.call(a,r.message,t,e,n,i),a.cause=r,a.name=r.name,s&&Object.assign(a,s),a};const o_=null;function wa(r){return O.isPlainObject(r)||O.isArray(r)}function pc(r){return O.endsWith(r,"[]")?r.slice(0,-2):r}function _c(r,t,e){return r?r.concat(t).map(function(i,s){return i=pc(i),!e&&s?"["+i+"]":i}).join(e?".":""):t}function a_(r){return O.isArray(r)&&!r.some(wa)}const l_=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Ms(r,t,e){if(!O.isObject(r))throw new TypeError("target must be an object");t=t||new FormData,e=O.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,M){return!O.isUndefined(M[C])});const n=e.metaTokens,i=e.visitor||f,s=e.dots,a=e.indexes,c=(e.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(t);if(!O.isFunction(i))throw new TypeError("visitor must be a function");function d(E){if(E===null)return"";if(O.isDate(E))return E.toISOString();if(!c&&O.isBlob(E))throw new vt("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(E)||O.isTypedArray(E)?c&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function f(E,C,M){let S=E;if(E&&!M&&typeof E=="object"){if(O.endsWith(C,"{}"))C=n?C:C.slice(0,-2),E=JSON.stringify(E);else if(O.isArray(E)&&a_(E)||(O.isFileList(E)||O.endsWith(C,"[]"))&&(S=O.toArray(E)))return C=pc(C),S.forEach(function(x,b){!(O.isUndefined(x)||x===null)&&t.append(a===!0?_c([C],b,s):a===null?C:C+"[]",d(x))}),!1}return wa(E)?!0:(t.append(_c(M,C,s),d(E)),!1)}const p=[],m=Object.assign(l_,{defaultVisitor:f,convertValue:d,isVisitable:wa});function v(E,C){if(!O.isUndefined(E)){if(p.indexOf(E)!==-1)throw Error("Circular reference detected in "+C.join("."));p.push(E),O.forEach(E,function(S,y){(!(O.isUndefined(S)||S===null)&&i.call(t,S,O.isString(y)?y.trim():y,C,m))===!0&&v(S,C?C.concat(y):[y])}),p.pop()}}if(!O.isObject(r))throw new TypeError("data must be an object");return v(r),t}function mc(r){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ea(r,t){this._pairs=[],r&&Ms(r,this,t)}const yc=Ea.prototype;yc.append=function(t,e){this._pairs.push([t,e])},yc.toString=function(t){const e=t?function(n){return t.call(this,n,mc)}:mc;return this._pairs.map(function(i){return e(i[0])+"="+e(i[1])},"").join("&")};function h_(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function vc(r,t,e){if(!t)return r;const n=e&&e.encode||h_,i=e&&e.serialize;let s;if(i?s=i(t,e):s=O.isURLSearchParams(t)?t.toString():new Ea(t,e).toString(n),s){const a=r.indexOf("#");a!==-1&&(r=r.slice(0,a)),r+=(r.indexOf("?")===-1?"?":"&")+s}return r}class c_{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(n){n!==null&&t(n)})}}const xc=c_,wc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},u_=typeof URLSearchParams<"u"?URLSearchParams:Ea,d_=typeof FormData<"u"?FormData:null,f_=typeof Blob<"u"?Blob:null,g_=(()=>{let r;return typeof navigator<"u"&&((r=navigator.product)==="ReactNative"||r==="NativeScript"||r==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),p_=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),We={isBrowser:!0,classes:{URLSearchParams:u_,FormData:d_,Blob:f_},isStandardBrowserEnv:g_,isStandardBrowserWebWorkerEnv:p_,protocols:["http","https","file","blob","url","data"]};function __(r,t){return Ms(r,new We.classes.URLSearchParams,Object.assign({visitor:function(e,n,i,s){return We.isNode&&O.isBuffer(e)?(this.append(n,e.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function m_(r){return O.matchAll(/\w+|\[(\w*)]/g,r).map(t=>t[0]==="[]"?"":t[1]||t[0])}function y_(r){const t={},e=Object.keys(r);let n;const i=e.length;let s;for(n=0;n<i;n++)s=e[n],t[s]=r[s];return t}function Ec(r){function t(e,n,i,s){let a=e[s++];const h=Number.isFinite(+a),c=s>=e.length;return a=!a&&O.isArray(i)?i.length:a,c?(O.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!h):((!i[a]||!O.isObject(i[a]))&&(i[a]=[]),t(e,n,i[a],s)&&O.isArray(i[a])&&(i[a]=y_(i[a])),!h)}if(O.isFormData(r)&&O.isFunction(r.entries)){const e={};return O.forEachEntry(r,(n,i)=>{t(m_(n),i,e,0)}),e}return null}const v_={"Content-Type":void 0};function x_(r,t,e){if(O.isString(r))try{return(t||JSON.parse)(r),O.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(e||JSON.stringify)(r)}const Ss={transitional:wc,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",i=n.indexOf("application/json")>-1,s=O.isObject(t);if(s&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return i&&i?JSON.stringify(Ec(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let h;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return __(t,this.formSerializer).toString();if((h=O.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ms(h?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||i?(e.setContentType("application/json",!1),x_(t)):t}],transformResponse:[function(t){const e=this.transitional||Ss.transitional,n=e&&e.forcedJSONParsing,i=this.responseType==="json";if(t&&O.isString(t)&&(n&&!this.responseType||i)){const a=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(h){if(a)throw h.name==="SyntaxError"?vt.from(h,vt.ERR_BAD_RESPONSE,this,null,this.response):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};O.forEach(["delete","get","head"],function(t){Ss.headers[t]={}}),O.forEach(["post","put","patch"],function(t){Ss.headers[t]=O.merge(v_)});const La=Ss,w_=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),E_=r=>{const t={};let e,n,i;return r&&r.split(`
14
14
  `).forEach(function(a){i=a.indexOf(":"),e=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!e||t[e]&&w_[e])&&(e==="set-cookie"?t[e]?t[e].push(n):t[e]=[n]:t[e]=t[e]?t[e]+", "+n:n)}),t},Lc=Symbol("internals");function wr(r){return r&&String(r).trim().toLowerCase()}function Ps(r){return r===!1||r==null?r:O.isArray(r)?r.map(Ps):String(r)}function L_(r){const t=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=e.exec(r);)t[n[1]]=n[2];return t}const b_=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function ba(r,t,e,n,i){if(O.isFunction(n))return n.call(this,t,e);if(i&&(t=e),!!O.isString(t)){if(O.isString(n))return t.indexOf(n)!==-1;if(O.isRegExp(n))return n.test(t)}}function C_(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,e,n)=>e.toUpperCase()+n)}function T_(r,t){const e=O.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(r,n+e,{value:function(i,s,a){return this[n].call(this,t,i,s,a)},configurable:!0})})}class ks{constructor(t){t&&this.set(t)}set(t,e,n){const i=this;function s(h,c,d){const f=wr(c);if(!f)throw new Error("header name must be a non-empty string");const p=O.findKey(i,f);(!p||i[p]===void 0||d===!0||d===void 0&&i[p]!==!1)&&(i[p||c]=Ps(h))}const a=(h,c)=>O.forEach(h,(d,f)=>s(d,f,c));return O.isPlainObject(t)||t instanceof this.constructor?a(t,e):O.isString(t)&&(t=t.trim())&&!b_(t)?a(E_(t),e):t!=null&&s(e,t,n),this}get(t,e){if(t=wr(t),t){const n=O.findKey(this,t);if(n){const i=this[n];if(!e)return i;if(e===!0)return L_(i);if(O.isFunction(e))return e.call(this,i,n);if(O.isRegExp(e))return e.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=wr(t),t){const n=O.findKey(this,t);return!!(n&&this[n]!==void 0&&(!e||ba(this,this[n],n,e)))}return!1}delete(t,e){const n=this;let i=!1;function s(a){if(a=wr(a),a){const h=O.findKey(n,a);h&&(!e||ba(n,n[h],h,e))&&(delete n[h],i=!0)}}return O.isArray(t)?t.forEach(s):s(t),i}clear(t){const e=Object.keys(this);let n=e.length,i=!1;for(;n--;){const s=e[n];(!t||ba(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const e=this,n={};return O.forEach(this,(i,s)=>{const a=O.findKey(n,s);if(a){e[a]=Ps(i),delete e[s];return}const h=t?C_(s):String(s).trim();h!==s&&delete e[s],e[h]=Ps(i),n[h]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return O.forEach(this,(n,i)=>{n!=null&&n!==!1&&(e[i]=t&&O.isArray(n)?n.join(", "):n)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,e])=>t+": "+e).join(`
15
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Lc]=this[Lc]={accessors:{}}).accessors,i=this.prototype;function s(a){const h=wr(a);n[h]||(T_(i,a),n[h]=!0)}return O.isArray(t)?t.forEach(s):s(t),this}}ks.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),O.freezeMethods(ks.prototype),O.freezeMethods(ks);const oi=ks;function Ca(r,t){const e=this||La,n=t||e,i=oi.from(n.headers);let s=n.data;return O.forEach(r,function(h){s=h.call(e,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function bc(r){return!!(r&&r.__CANCEL__)}function Er(r,t,e){vt.call(this,r??"canceled",vt.ERR_CANCELED,t,e),this.name="CanceledError"}O.inherits(Er,vt,{__CANCEL__:!0});function M_(r,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?r(e):t(new vt("Request failed with status code "+e.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const S_=We.isStandardBrowserEnv?function(){return{write:function(e,n,i,s,a,h){const c=[];c.push(e+"="+encodeURIComponent(n)),O.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),O.isString(s)&&c.push("path="+s),O.isString(a)&&c.push("domain="+a),h===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function P_(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function k_(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r}function Cc(r,t){return r&&!P_(t)?k_(r,t):t}const R_=We.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(s){let a=s;return t&&(e.setAttribute("href",a),a=e.href),e.setAttribute("href",a),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(a){const h=O.isString(a)?i(a):a;return h.protocol===n.protocol&&h.host===n.host}}():function(){return function(){return!0}}();function A_(r){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}function I_(r,t){r=r||10;const e=new Array(r),n=new Array(r);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=n[s];a||(a=d),e[i]=c,n[i]=d;let p=s,m=0;for(;p!==i;)m+=e[p++],p=p%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),d-a<t)return;const v=f&&d-f;return v?Math.round(m*1e3/v):void 0}}function Tc(r,t){let e=0;const n=I_(50,250);return i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,h=s-e,c=n(h),d=s<=a;e=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:h,rate:c||void 0,estimated:c&&a&&d?(a-s)/c:void 0,event:i};f[t?"download":"upload"]=!0,r(f)}}const Rs={http:o_,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(e,n){let i=r.data;const s=oi.from(r.headers).normalize(),a=r.responseType;let h;function c(){r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}O.isFormData(i)&&(We.isStandardBrowserEnv||We.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.setContentType("multipart/form-data;",!1));let d=new XMLHttpRequest;if(r.auth){const v=r.auth.username||"",E=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.set("Authorization","Basic "+btoa(v+":"+E))}const f=Cc(r.baseURL,r.url);d.open(r.method.toUpperCase(),vc(f,r.params,r.paramsSerializer),!0),d.timeout=r.timeout;function p(){if(!d)return;const v=oi.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),b={data:!a||a==="text"||a==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:r,request:d};M_(function(S){e(S),c()},function(S){n(S),c()},b),d=null}if("onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(n(new vt("Request aborted",vt.ECONNABORTED,r,d)),d=null)},d.onerror=function(){n(new vt("Network Error",vt.ERR_NETWORK,r,d)),d=null},d.ontimeout=function(){let E=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const b=r.transitional||wc;r.timeoutErrorMessage&&(E=r.timeoutErrorMessage),n(new vt(E,b.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,r,d)),d=null},We.isStandardBrowserEnv){const v=(r.withCredentials||R_(f))&&r.xsrfCookieName&&S_.read(r.xsrfCookieName);v&&s.set(r.xsrfHeaderName,v)}i===void 0&&s.setContentType(null),"setRequestHeader"in d&&O.forEach(s.toJSON(),function(E,b){d.setRequestHeader(b,E)}),O.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),a&&a!=="json"&&(d.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&d.addEventListener("progress",Tc(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Tc(r.onUploadProgress)),(r.cancelToken||r.signal)&&(h=v=>{d&&(n(!v||v.type?new Er(null,r,d):v),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const m=A_(f);if(m&&We.protocols.indexOf(m)===-1){n(new vt("Unsupported protocol "+m+":",vt.ERR_BAD_REQUEST,r));return}d.send(i||null)})}};O.forEach(Rs,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});const D_={getAdapter:r=>{r=O.isArray(r)?r:[r];const{length:t}=r;let e,n;for(let i=0;i<t&&(e=r[i],!(n=O.isString(e)?Rs[e.toLowerCase()]:e));i++);if(!n)throw n===!1?new vt(`Adapter ${e} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(O.hasOwnProp(Rs,e)?`Adapter '${e}' is not available in the build`:`Unknown adapter '${e}'`);if(!O.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Rs};function Ta(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Er(null,r)}function Mc(r){return Ta(r),r.headers=oi.from(r.headers),r.data=Ca.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),D_.getAdapter(r.adapter||La.adapter)(r).then(function(n){return Ta(r),n.data=Ca.call(r,r.transformResponse,n),n.headers=oi.from(n.headers),n},function(n){return bc(n)||(Ta(r),n&&n.response&&(n.response.data=Ca.call(r,r.transformResponse,n.response),n.response.headers=oi.from(n.response.headers))),Promise.reject(n)})}const Sc=r=>r instanceof oi?r.toJSON():r;function Rn(r,t){t=t||{};const e={};function n(d,f,p){return O.isPlainObject(d)&&O.isPlainObject(f)?O.merge.call({caseless:p},d,f):O.isPlainObject(f)?O.merge({},f):O.isArray(f)?f.slice():f}function i(d,f,p){if(O.isUndefined(f)){if(!O.isUndefined(d))return n(void 0,d,p)}else return n(d,f,p)}function s(d,f){if(!O.isUndefined(f))return n(void 0,f)}function a(d,f){if(O.isUndefined(f)){if(!O.isUndefined(d))return n(void 0,d)}else return n(void 0,f)}function h(d,f,p){if(p in t)return n(d,f);if(p in r)return n(void 0,d)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:h,headers:(d,f)=>i(Sc(d),Sc(f),!0)};return O.forEach(Object.keys(Object.assign({},r,t)),function(f){const p=c[f]||i,m=p(r[f],t[f],f);O.isUndefined(m)&&p!==h||(e[f]=m)}),e}const Pc="1.4.0",Ma={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{Ma[r]=function(n){return typeof n===r||"a"+(t<1?"n ":" ")+r}});const kc={};Ma.transitional=function(t,e,n){function i(s,a){return"[Axios v"+Pc+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,h)=>{if(t===!1)throw new vt(i(a," has been removed"+(e?" in "+e:"")),vt.ERR_DEPRECATED);return e&&!kc[a]&&(kc[a]=!0,console.warn(i(a," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(s,a,h):!0}};function O_(r,t,e){if(typeof r!="object")throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],a=t[s];if(a){const h=r[s],c=h===void 0||a(h,s,r);if(c!==!0)throw new vt("option "+s+" must be "+c,vt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new vt("Unknown option "+s,vt.ERR_BAD_OPTION)}}const Sa={assertOptions:O_,validators:Ma},Si=Sa.validators;class As{constructor(t){this.defaults=t,this.interceptors={request:new xc,response:new xc}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Rn(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:s}=e;n!==void 0&&Sa.assertOptions(n,{silentJSONParsing:Si.transitional(Si.boolean),forcedJSONParsing:Si.transitional(Si.boolean),clarifyTimeoutError:Si.transitional(Si.boolean)},!1),i!=null&&(O.isFunction(i)?e.paramsSerializer={serialize:i}:Sa.assertOptions(i,{encode:Si.function,serialize:Si.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a;a=s&&O.merge(s.common,s[e.method]),a&&O.forEach(["delete","get","head","post","put","patch","common"],E=>{delete s[E]}),e.headers=oi.concat(a,s);const h=[];let c=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(e)===!1||(c=c&&b.synchronous,h.unshift(b.fulfilled,b.rejected))});const d=[];this.interceptors.response.forEach(function(b){d.push(b.fulfilled,b.rejected)});let f,p=0,m;if(!c){const E=[Mc.bind(this),void 0];for(E.unshift.apply(E,h),E.push.apply(E,d),m=E.length,f=Promise.resolve(e);p<m;)f=f.then(E[p++],E[p++]);return f}m=h.length;let v=e;for(p=0;p<m;){const E=h[p++],b=h[p++];try{v=E(v)}catch(M){b.call(this,M);break}}try{f=Mc.call(this,v)}catch(E){return Promise.reject(E)}for(p=0,m=d.length;p<m;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=Rn(this.defaults,t);const e=Cc(t.baseURL,t.url);return vc(e,t.params,t.paramsSerializer)}}O.forEach(["delete","get","head","options"],function(t){As.prototype[t]=function(e,n){return this.request(Rn(n||{},{method:t,url:e,data:(n||{}).data}))}}),O.forEach(["post","put","patch"],function(t){function e(n){return function(s,a,h){return this.request(Rn(h||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}As.prototype[t]=e(),As.prototype[t+"Form"]=e(!0)});const Is=As;class Pa{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(s){e=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(h=>{n.subscribe(h),s=h}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,h){n.reason||(n.reason=new Er(s,a,h),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}static source(){let t;return{token:new Pa(function(i){t=i}),cancel:t}}}const F_=Pa;function z_(r){return function(e){return r.apply(null,e)}}function N_(r){return O.isObject(r)&&r.isAxiosError===!0}const ka={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ka).forEach(([r,t])=>{ka[t]=r});const B_=ka;function Rc(r){const t=new Is(r),e=nc(Is.prototype.request,t);return O.extend(e,Is.prototype,t,{allOwnKeys:!0}),O.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return Rc(Rn(r,i))},e}const jt=Rc(La);jt.Axios=Is,jt.CanceledError=Er,jt.CancelToken=F_,jt.isCancel=bc,jt.VERSION=Pc,jt.toFormData=Ms,jt.AxiosError=vt,jt.Cancel=jt.CanceledError,jt.all=function(t){return Promise.all(t)},jt.spread=z_,jt.isAxiosError=N_,jt.mergeConfig=Rn,jt.AxiosHeaders=oi,jt.formToJSON=r=>Ec(O.isHTMLForm(r)?new FormData(r):r),jt.HttpStatusCode=B_,jt.default=jt;const Ac=jt,Ds="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBVcGxvYWRlZCB0bzogU1ZHIFJlcG8sIHd3dy5zdmdyZXBvLmNvbSwgR2VuZXJhdG9yOiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4NCjxzdmcgZmlsbD0iIzAwMDAwMCIgaGVpZ2h0PSI4MDBweCIgd2lkdGg9IjgwMHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiANCgkgdmlld0JveD0iMCAwIDUwMS4zMzcgNTAxLjMzNyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8Zz4NCgkJPHBhdGggZD0iTTQ5Ni45NjIsMi4wMzFjLTIuNzczLTIuMDI3LTYuNC0yLjU2LTkuNi0xLjQ5M0wzMzAuNjY5LDUyLjgwNEwxNzMuOTc1LDAuNTM3Yy0xLjA2Ny0wLjMyLTIuMTMzLTAuNTMzLTMuMi0wLjUzM2gtMC4xMDcNCgkJCWgtMC4xMDdjLTEuMDY3LDAtMi4xMzMsMC4yMTMtMy4yLDAuNTMzbC0xNjAsNTMuMzMzYy00LjM3MywxLjM4Ny03LjM2LDUuNTQ3LTcuMzYsMTAuMTMzdjQyNi4yNGMwLDMuMzA3LDEuMzg3LDYuNjEzLDMuOTQ3LDguNjQNCgkJCWMyLjk4NywyLjQ1Myw2LjgyNywyLjk4NywxMC4xMzMsMS45MmwxNTYuNjkzLTUyLjI2N2wxNTYuNjkzLDUyLjI2N2MxLjA2NywwLjMyLDIuMTMzLDAuNTMzLDMuMiwwLjUzM2gwLjEwN2gwLjEwNw0KCQkJYzEuMDY3LDAsMi4xMzMtMC4yMTMsMy4yLTAuNTMzbDE2MC01My4zMzNjNC4zNzMtMS40OTMsNy4yNTMtNS41NDcsNy4yNTMtMTAuMTMzVjEwLjY3MQ0KCQkJQzUwMS4zMzUsNy4yNTcsNDk5LjczNSw0LjA1Nyw0OTYuOTYyLDIuMDMxeiBNNzQuNjY5LDQ1OC4xMzdsLTUzLjMzMywxNy44MTNWMjg1LjAxN2w1My4zMzMtMTcuODEzVjQ1OC4xMzd6IE0xNjAuMDAyLDQyOS42NTcNCgkJCWwtNjQsMjEuMzMzVjI2MC4xNjRsNjQtMjEuMzMzVjQyOS42NTd6IE0xNjAuMDAyLDIxNi4zMjRsLTY0LDIxLjMzM3YtODUuMjI3bDY0LTE4LjQ1M1YyMTYuMzI0eiBNMTYwLjAwMiwxMTEuODk3bC03Ny42NTMsMjIuNA0KCQkJYy00LjU4NywxLjI4LTcuNjgsNS41NDctNy42OCwxMC4yNHYxMDAuMjY3bC01My4zMzMsMTcuODEzVjcxLjY4NGwxMzguNjY3LTQ2LjE4N1YxMTEuODk3eiBNMzIwLjAwMiw0NzUuOTUxbC01My4zMzMtMTcuNzA3DQoJCQlWMzQxLjAxN2w1My4zMzMsMjEuNzZWNDc1Ljk1MXogTTMyMC4wMDIsMzM5LjczN2wtNTkuOTQ3LTI0LjQyN2MtNS40NC0yLjI0LTExLjczMywwLjQyNy0xMy44NjcsNS44NjcNCgkJCWMtMC41MzMsMS4yOC0wLjc0NywyLjY2Ny0wLjc0Nyw0LjA1M3YxMjUuODY3bC02NC0yMS4zMzNWMjM4Ljg2NmwxMzguNTYsNDYuMTUxVjMzOS43Mzd6IE0zMjAuMDAyLDI2Mi41MTFsLTEzOC42NjctNDYuMTg3DQoJCQlWMjUuNDk3bDEzOC42NjcsNDYuMTg3VjI2Mi41MTF6IE0zNDEuMzM1LDE3OS4wOTdsNjQtMjEuNjUzdjgzLjczM2wtNjQsMjEuMzMzVjE3OS4wOTd6IE00ODAuMDAyLDQyOS42NTdsLTEzOC42NjcsNDYuMTg3DQoJCQlWMjg1LjAxN2wxMzguNjY3LTQ2LjE4N1Y0MjkuNjU3eiBNNDgwLjAwMiwyMTYuMzI0bC01My4zMzMsMTcuODEzdi04My44NGw1My4zMzMtMTguMDI3VjIxNi4zMjR6IE00ODAuMDAyLDEwOS43NjQNCgkJCWwtMTM4LjY2Nyw0Ni44MjdWNzEuNjg0bDEzOC42NjctNDYuMTg3VjEwOS43NjR6Ii8+DQoJPC9nPg0KPC9nPg0KPC9zdmc+",Os="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBVcGxvYWRlZCB0bzogU1ZHIFJlcG8sIHd3dy5zdmdyZXBvLmNvbSwgR2VuZXJhdG9yOiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4NCjxzdmcgaGVpZ2h0PSI4MDBweCIgd2lkdGg9IjgwMHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIA0KCSB2aWV3Qm94PSIwIDAgNTMgNTMiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6IzQzQjA1QzsiIHBvaW50cz0iMTgsMjMuMjQzIDIuMjU2LDcuNDk5IDAsOCAwLDUxIDIuMDk5LDUwLjUzNCAxOCwzNC42MzIgIi8+DQo8cG9seWdvbiBzdHlsZT0iZmlsbDojNDhBMERDOyIgcG9pbnRzPSI5LjM3Miw0OC45MTcgMTgsNDcgMTgsNDAuMjg5ICIvPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6IzQzQjA1QzsiIHBvaW50cz0iMTgsNCA2Ljg4NCw2LjQ3IDE4LDE3LjU4NiAiLz4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiM0M0IwNUM7IiBwb2ludHM9IjQ5LjQ0OSwzLjE4NCAzNSw4IDM1LDE3LjYzMiAiLz4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiM0OEEwREM7IiBwb2ludHM9IjM1LDIzLjI4OSAzNSw1MCA1Myw0MyA1Myw1LjI4OSAiLz4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiMzRDk5NEY7IiBwb2ludHM9IjI2LjUyMywyNi4xMDkgMzUsMTcuNjMyIDM1LDggMTgsNCAxOCwxNy41ODYgIi8+DQo8cG9seWdvbiBzdHlsZT0iZmlsbDojM0Q5OTRGOyIgcG9pbnRzPSIxOCwyMy4yNDMgMTgsMzQuNjMyIDIzLjY5NSwyOC45MzggIi8+DQo8cG9seWdvbiBzdHlsZT0iZmlsbDojNDM5M0JGOyIgcG9pbnRzPSIxOCw0MC4yODkgMTgsNDcgMzUsNTAgMzUsMjMuMjg5ICIvPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6I0VGQ0U0QTsiIHBvaW50cz0iMTgsMTcuNTg2IDYuODg0LDYuNDcgMi4yNTYsNy40OTkgMTgsMjMuMjQzICIvPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6I0VGQ0U0QTsiIHBvaW50cz0iMTgsMzQuNjMyIDIuMDk5LDUwLjUzNCA5LjM3Miw0OC45MTcgMTgsNDAuMjg5ICIvPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6I0VGQ0U0QTsiIHBvaW50cz0iMzUsMjMuMjg5IDUzLDUuMjg5IDUzLDIgNDkuNDQ5LDMuMTg0IDM1LDE3LjYzMiAiLz4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiNENkI0NDU7IiBwb2ludHM9IjI2LjUyMywyNi4xMDkgMTgsMTcuNTg2IDE4LDIzLjI0MyAyMy42OTUsMjguOTM4IDE4LDM0LjYzMiAxOCw0MC4yODkgMzUsMjMuMjg5IDM1LDE3LjYzMiANCgkiLz4NCjwvc3ZnPg==";tt.Edit.Circle=tt.Edit.CircleMarker.extend({_createResizeMarker:function(){var r=this._shape.getLatLng(),t=this._getResizeMarkerPoint(r);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(t,this.options.resizeIcon))},_getResizeMarkerPoint:function(r){var t=this._shape._radius*Math.cos(Math.PI/4),e=this._map.project(r);return this._map.unproject([e.x+t,e.y-t])},_resize:function(r){var t=this._moveMarker.getLatLng(),e;tt.GeometryUtil.isVersion07x()?e=t.distanceTo(r):e=this._map.distance(t,r),this._shape.setRadius(e),this._map.fire(tt.Draw.Event.EDITRESIZE,{layer:this._shape})}});const G_=X.defineComponent({name:"MapView",props:{loadPolygon:Boolean,reverseCoordinatesPolygon:Boolean,dataPolygon:Object,configurationMap:Object,coordinatesMap:Array,getGeoJSON:Function,getCoodMarker:Function,isSatelite:Boolean},data(){return{idMap:"",mapRender:null,markerRender:null,renderCoordinates:this.coordinatesMap,renderGeojson:this.dataPolygon,markerIcon:{iconUrl:ms,iconSize:[25,41],iconAnchor:[12,41]},layersFeatureGroup:null,featuresData:null,currentTileLayer:null,isSatelliteView:!1}},mounted(){this.makeid(10),this.renderMap()},methods:{createSatelliteControl(){const r=tt.Control.extend({onAdd:t=>{const e=tt.DomUtil.create("div","leaflet-control-draw leaflet-bar leaflet-control"),n=tt.DomUtil.create("a","leaflet-draw-draw-satellite",e);return n.href="#",n.title=this.isSatelliteView?"Vista Normal":"Vista Satélite",n.style.backgroundImage=this.isSatelliteView?`url(${Ds})`:`url(${Os})`,n.style.backgroundPosition="center",n.style.backgroundRepeat="no-repeat",n.style.backgroundSize="20px 20px",tt.DomEvent.disableClickPropagation(n),tt.DomEvent.on(n,"click",this.toggleSatelliteView,this),e}});return new r({position:"topleft"})},toggleSatelliteView(){if(!this.mapRender||!this.currentTileLayer)return;this.isSatelliteView=!this.isSatelliteView,this.mapRender.removeLayer(this.currentTileLayer),this.isSatelliteView?this.currentTileLayer=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):this.currentTileLayer=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),this.currentTileLayer.addTo(this.mapRender),document.querySelectorAll(".leaflet-draw-draw-satellite").forEach(t=>{const e=t;e.style.backgroundImage=this.isSatelliteView?`url(${Ds})`:`url(${Os})`,e.title=this.isSatelliteView?"Vista Normal":"Vista Satélite"})},getLayersFeaturesInGeoJson(){const r=tt.geoJSON().addTo(this.mapRender);return this.featuresData.eachLayer(e=>{r.addLayer(e)}),[r.toGeoJSON()]},triggerSaveEdit(){var t,e,n;(n=(e=(t=(document.getElementsByClassName("leaflet-draw-actions leaflet-draw-actions-top")||document.getElementsByClassName("leaflet-draw-actions leaflet-draw-actions-top leaflet-draw-actions-bottom"))[0])==null?void 0:t.querySelector("li"))==null?void 0:e.querySelector("a"))==null||n.click()},makeid(r){let t="";const e="abcdefghijklmnopqrstuvwxyz",n=e.length;let i=0;for(;i<r;)t+=e.charAt(Math.floor(Math.random()*n)),i+=1;this.idMap=t},renderMap(){Tp("es"),setTimeout(()=>{this.loadPolygon?this.viewMap():this.createMap()},500)},createMap(){var a,h,c,d,f,p,m,v,E,b;const r=this.configurationMap?this.configurationMap.iconMarker?this.configurationMap.iconMarker:this.markerIcon:this.markerIcon;window.type=!0;const t=tt.map(this.idMap,{fullscreenControl:!0}).setView([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],this.renderCoordinates?this.renderCoordinates[2]:0);if(this.mapRender=t,this.isSatelliteView=this.isSatelite||!1,this.isSatelliteView?this.currentTileLayer=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):this.currentTileLayer=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),this.currentTileLayer.addTo(t),this.isSatelite!==void 0){const M=this.createSatelliteControl();t.addControl(M)}if(t.setZoom((a=this.configurationMap)==null?void 0:a.maxZoom),this.configurationMap.renderMarker){const M=tt.marker([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],{icon:tt.icon(r),draggable:this.configurationMap.dragMarker}).addTo(t);this.markerRender=M,this.getCoodMarker&&M.on("dragend",S=>{const y=S.target.getLatLng(),x=y.lat,C=y.lng;this.getCoodMarker&&this.getCoodMarker(x,C)})}const e=tt.featureGroup();this.featuresData=e;const n=e.addTo(t);let i={featureGroup:n,edit:!1,remove:(h=this.configurationMap)==null?void 0:h.editFigures.remove};(c=this.configurationMap)!=null&&c.editFigures.edit&&(i={featureGroup:n,...(d=this.configurationMap)==null?void 0:d.editFigures.edit,remove:(f=this.configurationMap)==null?void 0:f.editFigures.remove});const s=new tt.Control.Draw({position:"topleft",draw:{polygon:(p=this.configurationMap)==null?void 0:p.createFigures.polygon,circle:!1,rectangle:(m=this.configurationMap)!=null&&m.createFigures.rectangle?{shapeOptions:{color:"blue"}}:!1,marker:(v=this.configurationMap)!=null&&v.createFigures.marker?{icon:tt.icon(r)}:!1,polyline:(E=this.configurationMap)!=null&&E.createFigures.polyline?{shapeOptions:{color:"blue"}}:!1,circlemarker:(b=this.configurationMap)==null?void 0:b.createFigures.multipoint},edit:i});t.addControl(s),t.on("draw:created",M=>{var x,C,T,k,R,I,z,G,j,W,Y,$,K,V,Z;const S=M.layer;n.addLayer(S);let y=S.toGeoJSON();M.layerType==="circlemarker"&&(y={type:"Feature",geometry:{type:"MultiPoint",coordinates:[y.geometry.coordinates]},properties:{...y.properties,pointType:"multipoint",style:{color:((T=(C=(x=this.configurationMap)==null?void 0:x.createFigures)==null?void 0:C.multipoint)==null?void 0:T.color)||"green",fillColor:((I=(R=(k=this.configurationMap)==null?void 0:k.createFigures)==null?void 0:R.multipoint)==null?void 0:I.fillColor)||"green",fillOpacity:((j=(G=(z=this.configurationMap)==null?void 0:z.createFigures)==null?void 0:G.multipoint)==null?void 0:j.fillOpacity)||.8,radius:(($=(Y=(W=this.configurationMap)==null?void 0:W.createFigures)==null?void 0:Y.multipoint)==null?void 0:$.radius)||6,weight:((Z=(V=(K=this.configurationMap)==null?void 0:K.createFigures)==null?void 0:V.multipoint)==null?void 0:Z.weight)||2}}}),this.getGeoJSON&&this.getGeoJSON([y])}),t.on("draw:edited",M=>{M.layers.eachLayer(y=>{const x=y.toGeoJSON();this.getGeoJSON&&this.getGeoJSON([x])})})},viewMap(){var h,c,d,f,p,m,v,E,b,M;const r=this.configurationMap?this.configurationMap.iconMarker?this.configurationMap.iconMarker:this.markerIcon:this.markerIcon;window.type=!0;const t=tt.map(this.idMap,{fullscreenControl:!0}).setView([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],this.renderCoordinates?this.renderCoordinates[2]:0);if(this.mapRender=t,this.isSatelliteView=this.isSatelite||!1,this.isSatelliteView?this.currentTileLayer=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):this.currentTileLayer=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),this.currentTileLayer.addTo(t),this.isSatelite!==void 0){const S=this.createSatelliteControl();t.addControl(S)}t.setZoom((h=this.configurationMap)==null?void 0:h.maxZoom);const e=tt.featureGroup();this.featuresData=e;const n=e.addTo(t);let i={featureGroup:n,edit:!1,remove:(c=this.configurationMap)==null?void 0:c.editFigures.remove};(d=this.configurationMap)!=null&&d.editFigures.edit&&(i={featureGroup:n,...(f=this.configurationMap)==null?void 0:f.editFigures.edit,remove:(p=this.configurationMap)==null?void 0:p.editFigures.remove});const s=this.renderGeojson;if(s&&s.length){s.forEach(y=>{if(y.type==="FeatureCollection")y.features.forEach(x=>{if(x.geometry.type==="Polygon"||x.geometry.type==="MultiPolygon"||x.geometry.type==="LineString"||x.geometry.type==="MultiLineString"||x.geometry.type==="Point"){const C=this;tt.geoJson(x,{pointToLayer:this.getPointToLayer.bind(this),onEachFeature:function(T,k){if(n.addLayer(k),T.geometry.type==="Point"){var R=C.getPopupContent(T);k.bindPopup(R)}}})}});else if(y.type==="Feature"&&(y.geometry.type==="Polygon"||y.geometry.type==="MultiPolygon"||y.geometry.type==="LineString"||y.geometry.type==="MultiLineString"||y.geometry.type==="Point"||y.geometry.type==="MultiPoint")){const x=this;tt.geoJson(y,{onEachFeature:function(C,T){if(n.addLayer(T),C.geometry.type==="Point"){var k=x.getPopupContent(C);T.bindPopup(k)}}})}});const S=n.getBounds();t.fitBounds(S)}const a=new tt.Control.Draw({position:"topleft",draw:{polygon:(m=this.configurationMap)==null?void 0:m.createFigures.polygon,circle:!1,rectangle:(v=this.configurationMap)!=null&&v.createFigures.rectangle?{shapeOptions:{color:"blue"}}:!1,marker:(E=this.configurationMap)!=null&&E.createFigures.marker?{icon:tt.icon(r)}:!1,polyline:(b=this.configurationMap)!=null&&b.createFigures.polyline?{shapeOptions:{color:"blue"}}:!1,circlemarker:(M=this.configurationMap)==null?void 0:M.createFigures.multipoint},edit:i});t.addControl(a),t.on("draw:created",S=>{var C,T,k,R,I,z,G,j,W,Y,$,K,V,Z,U;const y=S.layer;n.addLayer(y);let x=y.toGeoJSON();S.layerType==="circlemarker"&&(x={type:"Feature",geometry:{type:"MultiPoint",coordinates:[x.geometry.coordinates]},properties:{...x.properties,pointType:"multipoint",style:{color:((k=(T=(C=this.configurationMap)==null?void 0:C.createFigures)==null?void 0:T.multipoint)==null?void 0:k.color)||"green",fillColor:((z=(I=(R=this.configurationMap)==null?void 0:R.createFigures)==null?void 0:I.multipoint)==null?void 0:z.fillColor)||"green",fillOpacity:((W=(j=(G=this.configurationMap)==null?void 0:G.createFigures)==null?void 0:j.multipoint)==null?void 0:W.fillOpacity)||.8,radius:((K=($=(Y=this.configurationMap)==null?void 0:Y.createFigures)==null?void 0:$.multipoint)==null?void 0:K.radius)||6,weight:((U=(Z=(V=this.configurationMap)==null?void 0:V.createFigures)==null?void 0:Z.multipoint)==null?void 0:U.weight)||2}}}),this.getGeoJSON&&this.getGeoJSON(x)}),t.on("draw:edited",S=>{S.layers.eachLayer(x=>{const C=x.toGeoJSON();this.getGeoJSON&&this.getGeoJSON(C)})})},getPointToLayer(r,t){var n,i;if(((n=r.geometry)==null?void 0:n.type)==="Point"){const s=(i=r.properties)==null?void 0:i.tipo,a=tt.icon({iconUrl:np,iconSize:[38,38],iconAnchor:[16,41]}),h=tt.icon({iconUrl:rp,iconSize:[38,38],iconAnchor:[16,41]});let d=tt.icon({iconUrl:sp,iconSize:[38,38],iconAnchor:[16,41]});return s===0?d=a:s===1&&(d=h),tt.marker(t,{icon:d})}return tt.marker(t)},async searchAddress(r){const t=await Ac.get(location.protocol+"//nominatim.openstreetmap.org/search?",{params:{q:r,limit:1,format:"json"}});if(t.data.length===1){const e=parseFloat(t.data[0].lat),i={lng:parseFloat(t.data[0].lon),lat:e};return this.setCoordinates({...i,moveMarker:!0}),t.data[0]}return t.data},setCoordinates({lat:r,lng:t}){if(this.mapRender){const e=tt.latLng(r,t);this.mapRender.panTo(e,{animate:!0,duration:.5})}},getPopupContent(r){const t=r.properties||{},e=t.descripcion||"",n=t.fechaHoraLlegada||"",i=t.fotoId||"";let s="";if(n){const h=new Date(n),c=d=>d.toString().padStart(2,"0");s=`${c(h.getDate())}-${c(h.getMonth()+1)}-${h.getFullYear()} ${c(h.getHours())}:${c(h.getMinutes())}:${c(h.getSeconds())}`}let a="<div>";return i&&(a+=`<img src="${i}" style="width: 200px; height: auto; margin-bottom: 5px;"><br>`),a+=`<b>Descripción:</b> ${e}<br>`,s&&(a+=`<b>Fecha Hora Llegada:</b> ${s}<br>`),a+="</div>",a}},watch:{coordinatesMap(r){if(this.renderCoordinates=r,this.mapRender&&this.markerRender){const t=tt.latLng([r[0],r[1]]);this.mapRender.setView([r[0],r[1]],r[2]),this.markerRender.setLatLng(t)}},dataPolygon(r){this.renderGeojson=r}}}),U_=["id"];function j_(r,t,e,n,i,s){var a;return X.openBlock(),X.createElementBlock("div",{class:"map-container",style:X.normalizeStyle(`height:${(a=r.configurationMap)==null?void 0:a.height}`)},[X.createElementVNode("div",{id:r.idMap,style:{height:"100%"}},null,8,U_)],4)}const Z_=ma(G_,[["render",j_]]),W_=["id"],H_=X.defineComponent({__name:"MapSearchAddress",props:{configurationMap:{default:()=>({height:"250px",maxZoom:20,iconMarker:{iconUrl:ms,iconSize:[25,41],iconAnchor:[12,41],class:"",type:"image"},dragMarker:!0})},coordinatesMap:{default:()=>({lat:-19.0429,lng:-65.2554,zoom:12})},isSatelite:{type:Boolean}},emits:["updated:coordsMarker"],setup(r,{expose:t,emit:e}){const n=r,i=X.ref(),s=X.ref(n.coordinatesMap),a=X.ref(),h=X.ref(),c=X.ref(null),d=X.ref(!1);X.onMounted(async()=>{await f(10),await p()});const f=async y=>{let x="";const C="abcdefghijklmnopqrstuvwxyz",T=C.length;let k=0;for(;k<y;)x+=C.charAt(Math.floor(Math.random()*T)),k+=1;i.value=x},p=async()=>{await m()},m=async()=>{var C,T;const y=(C=n.configurationMap)==null?void 0:C.iconMarker,x=tt.map(i.value,{fullscreenControl:!0}).setView([s.value.lat,s.value.lng],s.value.zoom);if(x.invalidateSize(),a.value=x,d.value=n.isSatelite||!1,d.value?c.value=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):c.value=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:(T=n.configurationMap)==null?void 0:T.maxZoom,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),c.value.addTo(x),n.isSatelite!==void 0){const k=v();x.addControl(k)}if(y.type==="image"){const k=tt.marker([s.value.lat,s.value.lng],{icon:tt.icon({iconUrl:y.iconUrl,iconAnchor:y.iconAnchor,iconSize:y.iconSize,className:y.class}),draggable:n.configurationMap.dragMarker}).addTo(x);h.value=k,k.on("dragend",R=>{const I=R.target.getLatLng(),z=I.lat,G=I.lng;M({lat:z,lng:G})})}else if(y.type==="svg"){const k=tt.marker([s.value.lat,s.value.lng],{icon:tt.divIcon({html:y.iconUrl,iconAnchor:y.iconAnchor,iconSize:y.iconSize,className:y.class}),draggable:n.configurationMap.dragMarker}).addTo(x);h.value=k,k.on("dragend",R=>{const I=R.target.getLatLng(),z=I.lat,G=I.lng;M({lat:z,lng:G})})}},v=()=>{const y=tt.Control.extend({onAdd:x=>{const C=tt.DomUtil.create("div","leaflet-control-draw leaflet-bar leaflet-control"),T=tt.DomUtil.create("a","leaflet-draw-draw-satellite",C);return T.href="#",T.title=d.value?"Vista Normal":"Vista Satélite",T.style.backgroundImage=d.value?`url(${Ds})`:`url(${Os})`,T.style.backgroundPosition="center",T.style.backgroundRepeat="no-repeat",T.style.backgroundSize="20px 20px",tt.DomEvent.disableClickPropagation(T),tt.DomEvent.on(T,"click",E),C}});return new y({position:"topleft"})},E=()=>{if(!a.value||!c.value)return;d.value=!d.value,a.value.removeLayer(c.value),d.value?c.value=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):c.value=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),c.value.addTo(a.value),document.querySelectorAll(".leaflet-draw-draw-satellite").forEach(x=>{const C=x;C.style.backgroundImage=d.value?`url(${Ds})`:`url(${Os})`,C.title=d.value?"Vista Normal":"Vista Satélite"})},b=async y=>{const x=await Ac.get(location.protocol+"//nominatim.openstreetmap.org/search?",{params:{q:y,limit:1,format:"json"}});if(x.data.length===1){const C=parseFloat(x.data[0].lat),k={lng:parseFloat(x.data[0].lon),lat:C};return M({...k,moveMarker:!0}),x.data[0]}return x.data},M=({lat:y,lng:x,moveMarker:C=!1})=>{var T;e("updated:coordsMarker",{lat:y,lng:x}),C&&((T=h.value)==null||T.setLatLng({lat:y,lng:x})),S({lat:y,lng:x})},S=({lat:y,lng:x})=>{const C=tt.latLng(y,x);a.value.panTo(C,{animate:!0,duration:.5})};return t({searchAddress:b}),(y,x)=>{var C;return X.openBlock(),X.createElementBlock("div",{class:"map-container",style:X.normalizeStyle(`height:${(C=y.configurationMap)==null?void 0:C.height}`)},[X.createElementVNode("div",{id:i.value,style:{height:"100%"}},null,8,W_)],4)}}}),ob="";class V_{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const ai=V_,An={PROPERTYCHANGE:"propertychange"};class X_{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const Fs=X_;function Y_(r,t,e){let n,i;e=e||Pi;let s=0,a=r.length,h=!1;for(;s<a;)n=s+(a-s>>1),i=+e(r[n],t),i<0?s=n+1:(a=n,h=!i);return h?s:~s}function Pi(r,t){return r>t?1:r<t?-1:0}function Ra(r,t,e){if(r[0]<=t)return 0;const n=r.length;if(t<=r[n-1])return n-1;if(typeof e=="function"){for(let i=1;i<n;++i){const s=r[i];if(s===t)return i;if(s<t)return e(t,r[i-1],s)>0?i-1:i}return n-1}if(e>0){for(let i=1;i<n;++i)if(r[i]<t)return i-1;return n-1}if(e<0){for(let i=1;i<n;++i)if(r[i]<=t)return i;return n-1}for(let i=1;i<n;++i){if(r[i]==t)return i;if(r[i]<t)return r[i-1]-t<t-r[i]?i-1:i}return n-1}function K_(r,t,e){for(;t<e;){const n=r[t];r[t]=r[e],r[e]=n,++t,--e}}function He(r,t){const e=Array.isArray(t)?t:[t],n=e.length;for(let i=0;i<n;i++)r[r.length]=e[i]}function li(r,t){const e=r.length;if(e!==t.length)return!1;for(let n=0;n<e;n++)if(r[n]!==t[n])return!1;return!0}function q_(r,t,e){const n=t||Pi;return r.every(function(i,s){if(s===0)return!0;const a=n(r[s-1],i);return!(a>0||e&&a===0)})}function Lr(){return!0}function zs(){return!1}function In(){}function Ic(r){let t=!1,e,n,i;return function(){const s=Array.prototype.slice.call(arguments);return(!t||this!==i||!li(s,n))&&(t=!0,i=this,n=s,e=r.apply(this,arguments)),e}}function Dn(r){for(const t in r)delete r[t]}function on(r){let t;for(t in r)return!1;return!t}class J_ extends Fs{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),i=n[t]||(n[t]=[]);i.includes(e)||i.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,i=this.listeners_&&this.listeners_[n];if(!i)return;const s=e?new ai(t):t;s.target||(s.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),h=this.pendingRemovals_||(this.pendingRemovals_={});n in a||(a[n]=0,h[n]=0),++a[n];let c;for(let d=0,f=i.length;d<f;++d)if("handleEvent"in i[d]?c=i[d].handleEvent(s):c=i[d].call(this,s),c===!1||s.propagationStopped){c=!1;break}if(--a[n]===0){let d=h[n];for(delete h[n];d--;)this.removeEventListener(n,In);delete a[n]}return c}disposeInternal(){this.listeners_&&Dn(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){if(!this.listeners_)return;const n=this.listeners_[t];if(!n)return;const i=n.indexOf(e);i!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=In,++this.pendingRemovals_[t]):(n.splice(i,1),n.length===0&&delete this.listeners_[t]))}}const Ns=J_,ct={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function gt(r,t,e,n,i){if(n&&n!==r&&(e=e.bind(n)),i){const a=e;e=function(){r.removeEventListener(t,e),a.apply(this,arguments)}}const s={target:r,type:t,listener:e};return r.addEventListener(t,e),s}function Bs(r,t,e,n){return gt(r,t,e,n,!0)}function Tt(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Dn(r))}class Gs extends Ns{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(ct.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,i=new Array(n);for(let s=0;s<n;++s)i[s]=gt(this,t[s],e);return i}return gt(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const i=t.length;n=new Array(i);for(let s=0;s<i;++s)n[s]=Bs(this,t[s],e)}else n=Bs(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Q_(n);else if(Array.isArray(t))for(let i=0,s=t.length;i<s;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}Gs.prototype.on,Gs.prototype.once,Gs.prototype.un;function Q_(r){if(Array.isArray(r))for(let t=0,e=r.length;t<e;++t)Tt(r[t]);else Tt(r)}const Dc=Gs;function ot(){throw new Error("Unimplemented abstract method.")}let $_=0;function dt(r){return r.ol_uid||(r.ol_uid=String(++$_))}class Oc extends ai{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class tm extends Dc{constructor(t){super(),this.on,this.once,this.un,dt(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let n;n=`change:${t}`,this.hasListener(n)&&this.dispatchEvent(new Oc(n,t,e)),n=An.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Oc(n,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,n){const i=this.values_||(this.values_={});if(n)i[t]=e;else{const s=i[t];i[t]=e,s!==e&&this.notify(t,s)}}setProperties(t,e){for(const n in t)this.set(n,t[n],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const n=this.values_[t];delete this.values_[t],on(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const Re=tm,Zt={ANIMATING:0,INTERACTING:1},Ae={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},em=42,Aa=256,br={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class im{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||br[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Fc=im,Cr=6378137,On=Math.PI*Cr,nm=[-On,-On,On,On],rm=[-180,-85,180,85],Us=Cr*Math.log(Math.tan(Math.PI/2));class Fn extends Fc{constructor(t){super({code:t,units:"m",extent:nm,global:!0,worldExtent:rm,getPointResolution:function(e,n){return e/Math.cosh(n[1]/Cr)}})}}const zc=[new Fn("EPSG:3857"),new Fn("EPSG:102100"),new Fn("EPSG:102113"),new Fn("EPSG:900913"),new Fn("http://www.opengis.net/def/crs/EPSG/0/3857"),new Fn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function sm(r,t,e){const n=r.length;e=e>1?e:2,t===void 0&&(e>2?t=r.slice():t=new Array(n));for(let i=0;i<n;i+=e){t[i]=On*r[i]/180;let s=Cr*Math.log(Math.tan(Math.PI*(+r[i+1]+90)/360));s>Us?s=Us:s<-Us&&(s=-Us),t[i+1]=s}return t}function om(r,t,e){const n=r.length;e=e>1?e:2,t===void 0&&(e>2?t=r.slice():t=new Array(n));for(let i=0;i<n;i+=e)t[i]=180*r[i]/On,t[i+1]=360*Math.atan(Math.exp(r[i+1]/Cr))/Math.PI-90;return t}const am=6378137,Nc=[-180,-90,180,90],lm=Math.PI*am/180;class an extends Fc{constructor(t,e){super({code:t,units:"degrees",extent:Nc,axisOrientation:e,global:!0,metersPerUnit:lm,worldExtent:Nc})}}const Bc=[new an("CRS:84"),new an("EPSG:4326","neu"),new an("urn:ogc:def:crs:OGC:1.3:CRS84"),new an("urn:ogc:def:crs:OGC:2:84"),new an("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new an("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new an("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Ia={};function hm(r){return Ia[r]||Ia[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function cm(r,t){Ia[r]=t}let zn={};function js(r,t,e){const n=r.getCode(),i=t.getCode();n in zn||(zn[n]={}),zn[n][i]=e}function um(r,t){let e;return r in zn&&t in zn[r]&&(e=zn[r][t]),e}const Wt={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Gc(r){const t=xe();for(let e=0,n=r.length;e<n;++e)Mr(t,r[e]);return t}function Zs(r,t,e){return e?(e[0]=r[0]-t,e[1]=r[1]-t,e[2]=r[2]+t,e[3]=r[3]+t,e):[r[0]-t,r[1]-t,r[2]+t,r[3]+t]}function Uc(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r.slice()}function ln(r,t,e){let n,i;return t<r[0]?n=r[0]-t:r[2]<t?n=t-r[2]:n=0,e<r[1]?i=r[1]-e:r[3]<e?i=e-r[3]:i=0,n*n+i*i}function Ws(r,t){return Da(r,t[0],t[1])}function hn(r,t){return r[0]<=t[0]&&t[2]<=r[2]&&r[1]<=t[1]&&t[3]<=r[3]}function Da(r,t,e){return r[0]<=t&&t<=r[2]&&r[1]<=e&&e<=r[3]}function Oa(r,t){const e=r[0],n=r[1],i=r[2],s=r[3],a=t[0],h=t[1];let c=Wt.UNKNOWN;return a<e?c=c|Wt.LEFT:a>i&&(c=c|Wt.RIGHT),h<n?c=c|Wt.BELOW:h>s&&(c=c|Wt.ABOVE),c===Wt.UNKNOWN&&(c=Wt.INTERSECTING),c}function xe(){return[1/0,1/0,-1/0,-1/0]}function ki(r,t,e,n,i){return i?(i[0]=r,i[1]=t,i[2]=e,i[3]=n,i):[r,t,e,n]}function Tr(r){return ki(1/0,1/0,-1/0,-1/0,r)}function jc(r,t){const e=r[0],n=r[1];return ki(e,n,e,n,t)}function Fa(r,t,e,n,i){const s=Tr(i);return Wc(s,r,t,e,n)}function Nn(r,t){return r[0]==t[0]&&r[2]==t[2]&&r[1]==t[1]&&r[3]==t[3]}function Zc(r,t){return t[0]<r[0]&&(r[0]=t[0]),t[2]>r[2]&&(r[2]=t[2]),t[1]<r[1]&&(r[1]=t[1]),t[3]>r[3]&&(r[3]=t[3]),r}function Mr(r,t){t[0]<r[0]&&(r[0]=t[0]),t[0]>r[2]&&(r[2]=t[0]),t[1]<r[1]&&(r[1]=t[1]),t[1]>r[3]&&(r[3]=t[1])}function Wc(r,t,e,n,i){for(;e<n;e+=i)dm(r,t[e],t[e+1]);return r}function dm(r,t,e){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}function Hc(r,t){let e;return e=t(Hs(r)),e||(e=t(Vs(r)),e)||(e=t(Xs(r)),e)||(e=t(cn(r)),e)?e:!1}function za(r){let t=0;return Ys(r)||(t=Mt(r)*we(r)),t}function Hs(r){return[r[0],r[1]]}function Vs(r){return[r[2],r[1]]}function Ri(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function fm(r,t){let e;if(t==="bottom-left")e=Hs(r);else if(t==="bottom-right")e=Vs(r);else if(t==="top-left")e=cn(r);else if(t==="top-right")e=Xs(r);else throw new Error("Invalid corner");return e}function Na(r,t,e,n,i){const[s,a,h,c,d,f,p,m]=Ba(r,t,e,n);return ki(Math.min(s,h,d,p),Math.min(a,c,f,m),Math.max(s,h,d,p),Math.max(a,c,f,m),i)}function Ba(r,t,e,n){const i=t*n[0]/2,s=t*n[1]/2,a=Math.cos(e),h=Math.sin(e),c=i*a,d=i*h,f=s*a,p=s*h,m=r[0],v=r[1];return[m-c+p,v-d-f,m-c-p,v-d+f,m+c-p,v+d+f,m+c+p,v+d-f,m-c+p,v-d-f]}function we(r){return r[3]-r[1]}function Sr(r,t,e){const n=e||xe();return ce(r,t)?(r[0]>t[0]?n[0]=r[0]:n[0]=t[0],r[1]>t[1]?n[1]=r[1]:n[1]=t[1],r[2]<t[2]?n[2]=r[2]:n[2]=t[2],r[3]<t[3]?n[3]=r[3]:n[3]=t[3]):Tr(n),n}function cn(r){return[r[0],r[3]]}function Xs(r){return[r[2],r[3]]}function Mt(r){return r[2]-r[0]}function ce(r,t){return r[0]<=t[2]&&r[2]>=t[0]&&r[1]<=t[3]&&r[3]>=t[1]}function Ys(r){return r[2]<r[0]||r[3]<r[1]}function gm(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r}function pm(r,t,e){let n=!1;const i=Oa(r,t),s=Oa(r,e);if(i===Wt.INTERSECTING||s===Wt.INTERSECTING)n=!0;else{const a=r[0],h=r[1],c=r[2],d=r[3],f=t[0],p=t[1],m=e[0],v=e[1],E=(v-p)/(m-f);let b,M;s&Wt.ABOVE&&!(i&Wt.ABOVE)&&(b=m-(v-d)/E,n=b>=a&&b<=c),!n&&s&Wt.RIGHT&&!(i&Wt.RIGHT)&&(M=v-(m-c)*E,n=M>=h&&M<=d),!n&&s&Wt.BELOW&&!(i&Wt.BELOW)&&(b=m-(v-h)/E,n=b>=a&&b<=c),!n&&s&Wt.LEFT&&!(i&Wt.LEFT)&&(M=v-(m-a)*E,n=M>=h&&M<=d)}return n}function Vc(r,t){const e=t.getExtent(),n=Ri(r);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const i=Mt(e),a=Math.floor((n[0]-e[0])/i)*i;r[0]-=a,r[2]-=a}return r}function _m(r,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(r[0])||!isFinite(r[2]))return[[e[0],r[1],e[2],r[3]]];Vc(r,t);const n=Mt(e);if(Mt(r)>n)return[[e[0],r[1],e[2],r[3]]];if(r[0]<e[0])return[[r[0]+n,r[1],e[2],r[3]],[e[0],r[1],r[2],r[3]]];if(r[2]>e[2])return[[r[0],r[1],e[2],r[3]],[e[0],r[1],r[2]-n,r[3]]]}return[r]}function Dt(r,t,e){return Math.min(Math.max(r,t),e)}function mm(r,t,e,n,i,s){const a=i-e,h=s-n;if(a!==0||h!==0){const c=((r-e)*a+(t-n)*h)/(a*a+h*h);c>1?(e=i,n=s):c>0&&(e+=a*c,n+=h*c)}return un(r,t,e,n)}function un(r,t,e,n){const i=e-r,s=n-t;return i*i+s*s}function ym(r){const t=r.length;for(let n=0;n<t;n++){let i=n,s=Math.abs(r[n][n]);for(let h=n+1;h<t;h++){const c=Math.abs(r[h][n]);c>s&&(s=c,i=h)}if(s===0)return null;const a=r[i];r[i]=r[n],r[n]=a;for(let h=n+1;h<t;h++){const c=-r[h][n]/r[n][n];for(let d=n;d<t+1;d++)n==d?r[h][d]=0:r[h][d]+=c*r[n][d]}}const e=new Array(t);for(let n=t-1;n>=0;n--){e[n]=r[n][t]/r[n][n];for(let i=n-1;i>=0;i--)r[i][t]-=r[i][n]*e[n]}return e}function Ks(r){return r*Math.PI/180}function Bn(r,t){const e=r%t;return e*t<0?e+t:e}function Ee(r,t,e){return r+e*(t-r)}function Ga(r,t){const e=Math.pow(10,t);return Math.round(r*e)/e}function qs(r,t){return Math.floor(Ga(r,t))}function Js(r,t){return Math.ceil(Ga(r,t))}function vm(r,t){return r[0]+=+t[0],r[1]+=+t[1],r}function Qs(r,t){let e=!0;for(let n=r.length-1;n>=0;--n)if(r[n]!=t[n]){e=!1;break}return e}function Ua(r,t){const e=Math.cos(t),n=Math.sin(t),i=r[0]*e-r[1]*n,s=r[1]*e+r[0]*n;return r[0]=i,r[1]=s,r}function xm(r,t){return r[0]*=t,r[1]*=t,r}function Xc(r,t){if(t.canWrapX()){const e=Mt(t.getExtent()),n=wm(r,t,e);n&&(r[0]-=n*e)}return r}function wm(r,t,e){const n=t.getExtent();let i=0;return t.canWrapX()&&(r[0]<n[0]||r[0]>n[2])&&(e=e||Mt(n),i=Math.floor((r[0]-n[0])/e)),i}const Em=63710088e-1;function Yc(r,t,e){e=e||Em;const n=Ks(r[1]),i=Ks(t[1]),s=(i-n)/2,a=Ks(t[0]-r[0])/2,h=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(i);return 2*e*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}const Kc={info:1,warn:2,error:3,none:4};let Lm=Kc.info;function qc(...r){Lm>Kc.warn||console.warn(...r)}let ja=!0;function Jc(r){ja=!(r===void 0?!0:r)}function Za(r,t){if(t!==void 0){for(let e=0,n=r.length;e<n;++e)t[e]=r[e];t=t}else t=r.slice();return t}function Qc(r,t){if(t!==void 0&&r!==t){for(let e=0,n=r.length;e<n;++e)t[e]=r[e];r=t}return r}function bm(r){cm(r.getCode(),r),js(r,r,Za)}function Cm(r){r.forEach(bm)}function zt(r){return typeof r=="string"?hm(r):r||null}function $c(r,t,e,n){r=zt(r);let i;const s=r.getPointResolutionFunc();if(s){if(i=s(t,e),n&&n!==r.getUnits()){const a=r.getMetersPerUnit();a&&(i=i*a/br[n])}}else{const a=r.getUnits();if(a=="degrees"&&!n||n=="degrees")i=t;else{const h=Ha(r,zt("EPSG:4326"));if(h===Qc&&a!=="degrees")i=t*r.getMetersPerUnit();else{let d=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];d=h(d,d,2);const f=Yc(d.slice(0,2),d.slice(2,4)),p=Yc(d.slice(4,6),d.slice(6,8));i=(f+p)/2}const c=n?br[n]:r.getMetersPerUnit();c!==void 0&&(i/=c)}}return i}function tu(r){Cm(r),r.forEach(function(t){r.forEach(function(e){t!==e&&js(t,e,Za)})})}function Tm(r,t,e,n){r.forEach(function(i){t.forEach(function(s){js(i,s,e),js(s,i,n)})})}function Wa(r,t){return r?typeof r=="string"?zt(r):r:zt(t)}function eu(r,t){return Jc(),iu(r,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function dn(r,t){if(r===t)return!0;const e=r.getUnits()===t.getUnits();return(r.getCode()===t.getCode()||Ha(r,t)===Za)&&e}function Ha(r,t){const e=r.getCode(),n=t.getCode();let i=um(e,n);return i||(i=Qc),i}function Pr(r,t){const e=zt(r),n=zt(t);return Ha(e,n)}function iu(r,t,e){return Pr(t,e)(r,void 0,r.length)}function Va(r,t){return r}function hi(r,t){return ja&&!Qs(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(ja=!1,qc("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function nu(r,t){return r}function fn(r,t){return r}function Mm(){tu(zc),tu(Bc),Tm(Bc,zc,sm,om)}Mm();function mt(r,t){if(!r)throw new Error(t)}function ru(r,t,e){return function(n,i,s,a,h){if(!n)return;if(!i&&!t)return n;const c=t?0:s[0]*i,d=t?0:s[1]*i,f=h?h[0]:0,p=h?h[1]:0;let m=r[0]+c/2+f,v=r[2]-c/2+f,E=r[1]+d/2+p,b=r[3]-d/2+p;m>v&&(m=(v+m)/2,v=m),E>b&&(E=(b+E)/2,b=E);let M=Dt(n[0],m,v),S=Dt(n[1],E,b);if(a&&e&&i){const y=30*i;M+=-y*Math.log(1+Math.max(0,m-n[0])/y)+y*Math.log(1+Math.max(0,n[0]-v)/y),S+=-y*Math.log(1+Math.max(0,E-n[1])/y)+y*Math.log(1+Math.max(0,n[1]-b)/y)}return[M,S]}}function Sm(r){return r}function Xa(r,t,e,n){const i=Mt(t)/e[0],s=we(t)/e[1];return n?Math.min(r,Math.max(i,s)):Math.min(r,Math.min(i,s))}function Ya(r,t,e){let n=Math.min(r,t);const i=50;return n*=Math.log(1+i*Math.max(0,r/t-1))/i+1,e&&(n=Math.max(n,e),n/=Math.log(1+i*Math.max(0,e/r-1))/i+1),Dt(n,e/2,t*2)}function Pm(r,t,e,n){return t=t!==void 0?t:!0,function(i,s,a,h){if(i!==void 0){const c=r[0],d=r[r.length-1],f=e?Xa(c,e,a,n):c;if(h)return t?Ya(i,f,d):Dt(i,d,f);const p=Math.min(f,i),m=Math.floor(Ra(r,p,s));return r[m]>f&&m<r.length-1?r[m+1]:r[m]}}}function km(r,t,e,n,i,s){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(a,h,c,d){if(a!==void 0){const f=i?Xa(t,i,c,s):t;if(d)return n?Ya(a,f,e):Dt(a,e,f);const p=1e-9,m=Math.ceil(Math.log(t/f)/Math.log(r)-p),v=-h*(.5-p)+.5,E=Math.min(f,a),b=Math.floor(Math.log(t/E)/Math.log(r)+v),M=Math.max(m,b),S=t/Math.pow(r,M);return Dt(S,e,f)}}}function su(r,t,e,n,i){return e=e!==void 0?e:!0,function(s,a,h,c){if(s!==void 0){const d=n?Xa(r,n,h,i):r;return!e||!c?Dt(s,t,d):Ya(s,d,t)}}}function Ka(r){if(r!==void 0)return 0}function ou(r){if(r!==void 0)return r}function Rm(r){const t=2*Math.PI/r;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function Am(r){const t=r===void 0?Ks(5):r;return function(e,n){return n||e===void 0?e:Math.abs(e)<=t?0:e}}function au(r){return Math.pow(r,3)}function Gn(r){return 1-au(1-r)}function Im(r){return 3*r*r-2*r*r*r}function Dm(r){return r}const Ai=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Om=Ai.includes("firefox"),Fm=Ai.includes("safari")&&!Ai.includes("chrom")&&(Ai.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Ai)),zm=Ai.includes("webkit")&&!Ai.includes("edge"),lu=Ai.includes("macintosh"),hu=typeof devicePixelRatio<"u"?devicePixelRatio:1,qa=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,cu=typeof Image<"u"&&Image.prototype.decode,uu=function(){let r=!1;try{const t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return r}(),Nm=new Array(6);function Ht(){return[1,0,0,1,0,0]}function du(r,t){const e=r[0],n=r[1],i=r[2],s=r[3],a=r[4],h=r[5],c=t[0],d=t[1],f=t[2],p=t[3],m=t[4],v=t[5];return r[0]=e*c+i*d,r[1]=n*c+s*d,r[2]=e*f+i*p,r[3]=n*f+s*p,r[4]=e*m+i*v+a,r[5]=n*m+s*v+h,r}function fu(r,t,e,n,i,s,a){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r[4]=s,r[5]=a,r}function Bm(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Nt(r,t){const e=t[0],n=t[1];return t[0]=r[0]*e+r[2]*n+r[4],t[1]=r[1]*e+r[3]*n+r[5],t}function Gm(r,t,e){return fu(r,t,0,0,e,0,0)}function Um(r,t,e){return du(r,fu(Nm,1,0,0,1,t,e))}function Ie(r,t,e,n,i,s,a,h){const c=Math.sin(s),d=Math.cos(s);return r[0]=n*d,r[1]=i*c,r[2]=-n*c,r[3]=i*d,r[4]=a*n*d-h*n*c+t,r[5]=a*i*c+h*i*d+e,r}function $s(r,t){const e=jm(t);mt(e!==0,"Transformation matrix cannot be inverted");const n=t[0],i=t[1],s=t[2],a=t[3],h=t[4],c=t[5];return r[0]=a/e,r[1]=-i/e,r[2]=-s/e,r[3]=n/e,r[4]=(s*c-a*h)/e,r[5]=-(n*c-i*h)/e,r}function jm(r){return r[0]*r[3]-r[1]*r[2]}let gu;function pu(r){const t="matrix("+r.join(", ")+")";if(qa)return t;const e=gu||(gu=document.createElement("div"));return e.style.transform=t,e.style.transform}function Ii(r,t,e,n,i,s){s=s||[];let a=0;for(let h=t;h<e;h+=n){const c=r[h],d=r[h+1];s[a++]=i[0]*c+i[2]*d+i[4],s[a++]=i[1]*c+i[3]*d+i[5]}return s&&s.length!=a&&(s.length=a),s}function _u(r,t,e,n,i,s,a){a=a||[];const h=Math.cos(i),c=Math.sin(i),d=s[0],f=s[1];let p=0;for(let m=t;m<e;m+=n){const v=r[m]-d,E=r[m+1]-f;a[p++]=d+v*h-E*c,a[p++]=f+v*c+E*h;for(let b=m+2;b<m+n;++b)a[p++]=r[b]}return a&&a.length!=p&&(a.length=p),a}function Zm(r,t,e,n,i,s,a,h){h=h||[];const c=a[0],d=a[1];let f=0;for(let p=t;p<e;p+=n){const m=r[p]-c,v=r[p+1]-d;h[f++]=c+i*m,h[f++]=d+s*v;for(let E=p+2;E<p+n;++E)h[f++]=r[E]}return h&&h.length!=f&&(h.length=f),h}function Wm(r,t,e,n,i,s,a){a=a||[];let h=0;for(let c=t;c<e;c+=n){a[h++]=r[c]+i,a[h++]=r[c+1]+s;for(let d=c+2;d<c+n;++d)a[h++]=r[d]}return a&&a.length!=h&&(a.length=h),a}const mu=Ht();class Hm extends Re{constructor(){super(),this.extent_=xe(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Ic((t,e,n)=>{if(!n)return this.getSimplifiedGeometry(e);const i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return ot()}closestPointXY(t,e,n,i){return ot()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return ot()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Tr(e),this.extentRevision_=this.getRevision()}return gm(this.extent_,t)}rotate(t,e){ot()}scale(t,e,n){ot()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return ot()}getType(){return ot()}applyTransform(t){ot()}intersectsExtent(t){return ot()}translate(t,e){ot()}transform(t,e){const n=zt(t),i=n.getUnits()=="tile-pixels"?function(s,a,h){const c=n.getExtent(),d=n.getWorldExtent(),f=we(d)/we(c);return Ie(mu,d[0],d[3],f,-f,0,0,0),Ii(s,0,s.length,h,mu,a),Pr(n,e)(s,a,h)}:Pr(n,e);return this.applyTransform(i),this}}const yu=Hm;class gn extends yu{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Fa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return ot()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=vu(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){ot()}setLayout(t,e,n){let i;if(t)i=vu(t);else{for(let s=0;s<n;++s){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}i=e.length,t=pn(i)}this.layout=t,this.stride=i}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const i=this.getStride();_u(n,0,n.length,i,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Ri(this.getExtent()));const i=this.getFlatCoordinates();if(i){const s=this.getStride();Zm(i,0,i.length,s,t,e,n,i),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const i=this.getStride();Wm(n,0,n.length,i,t,e,n),this.changed()}}}function pn(r){let t;return r==2?t="XY":r==3?t="XYZ":r==4&&(t="XYZM"),t}function vu(r){let t;return r=="XY"?t=2:r=="XYZ"||r=="XYM"?t=3:r=="XYZM"&&(t=4),t}function Vm(r,t,e){const n=r.getFlatCoordinates();if(!n)return null;const i=r.getStride();return Ii(n,0,n.length,i,t,e)}function xu(r,t,e,n,i,s,a){const h=r[t],c=r[t+1],d=r[e]-h,f=r[e+1]-c;let p;if(d===0&&f===0)p=t;else{const m=((i-h)*d+(s-c)*f)/(d*d+f*f);if(m>1)p=e;else if(m>0){for(let v=0;v<n;++v)a[v]=Ee(r[t+v],r[e+v],m);a.length=n;return}else p=t}for(let m=0;m<n;++m)a[m]=r[p+m];a.length=n}function Ja(r,t,e,n,i){let s=r[t],a=r[t+1];for(t+=n;t<e;t+=n){const h=r[t],c=r[t+1],d=un(s,a,h,c);d>i&&(i=d),s=h,a=c}return i}function Qa(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){const h=e[s];i=Ja(r,t,h,n,i),t=h}return i}function Xm(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){const h=e[s];i=Qa(r,t,h,n,i),t=h[h.length-1]}return i}function $a(r,t,e,n,i,s,a,h,c,d,f){if(t==e)return d;let p,m;if(i===0){if(m=un(a,h,r[t],r[t+1]),m<d){for(p=0;p<n;++p)c[p]=r[t+p];return c.length=n,m}return d}f=f||[NaN,NaN];let v=t+n;for(;v<e;)if(xu(r,v-n,v,n,a,h,f),m=un(a,h,f[0],f[1]),m<d){for(d=m,p=0;p<n;++p)c[p]=f[p];c.length=n,v+=n}else v+=n*Math.max((Math.sqrt(m)-Math.sqrt(d))/i|0,1);if(s&&(xu(r,e-n,t,n,a,h,f),m=un(a,h,f[0],f[1]),m<d)){for(d=m,p=0;p<n;++p)c[p]=f[p];c.length=n}return d}function tl(r,t,e,n,i,s,a,h,c,d,f){f=f||[NaN,NaN];for(let p=0,m=e.length;p<m;++p){const v=e[p];d=$a(r,t,v,n,i,s,a,h,c,d,f),t=v}return d}function Ym(r,t,e,n,i,s,a,h,c,d,f){f=f||[NaN,NaN];for(let p=0,m=e.length;p<m;++p){const v=e[p];d=tl(r,t,v,n,i,s,a,h,c,d,f),t=v[v.length-1]}return d}function Km(r,t,e,n){for(let i=0,s=e.length;i<s;++i)r[t++]=e[i];return t}function to(r,t,e,n){for(let i=0,s=e.length;i<s;++i){const a=e[i];for(let h=0;h<n;++h)r[t++]=a[h]}return t}function kr(r,t,e,n,i){i=i||[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=to(r,t,e[a],n);i[s++]=c,t=c}return i.length=s,i}function wu(r,t,e,n,i){i=i||[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=kr(r,t,e[a],n,i[s]);c.length===0&&(c[0]=t),i[s++]=c,t=c[c.length-1]}return i.length=s,i}function eo(r,t,e,n,i,s,a){const h=(e-t)/n;if(h<3){for(;t<e;t+=n)s[a++]=r[t],s[a++]=r[t+1];return a}const c=new Array(h);c[0]=1,c[h-1]=1;const d=[t,e-n];let f=0;for(;d.length>0;){const p=d.pop(),m=d.pop();let v=0;const E=r[m],b=r[m+1],M=r[p],S=r[p+1];for(let y=m+n;y<p;y+=n){const x=r[y],C=r[y+1],T=mm(x,C,E,b,M,S);T>v&&(f=y,v=T)}v>i&&(c[(f-t)/n]=1,m+n<f&&d.push(m,f),f+n<p&&d.push(f,p))}for(let p=0;p<h;++p)c[p]&&(s[a++]=r[t+p*n],s[a++]=r[t+p*n+1]);return a}function Eu(r,t,e,n,i,s,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c];a=eo(r,t,f,n,i,s,a),h.push(a),t=f}return a}function _n(r,t){return t*Math.round(r/t)}function qm(r,t,e,n,i,s,a){if(t==e)return a;let h=_n(r[t],i),c=_n(r[t+1],i);t+=n,s[a++]=h,s[a++]=c;let d,f;do if(d=_n(r[t],i),f=_n(r[t+1],i),t+=n,t==e)return s[a++]=d,s[a++]=f,a;while(d==h&&f==c);for(;t<e;){const p=_n(r[t],i),m=_n(r[t+1],i);if(t+=n,p==d&&m==f)continue;const v=d-h,E=f-c,b=p-h,M=m-c;if(v*M==E*b&&(v<0&&b<v||v==b||v>0&&b>v)&&(E<0&&M<E||E==M||E>0&&M>E)){d=p,f=m;continue}s[a++]=d,s[a++]=f,h=d,c=f,d=p,f=m}return s[a++]=d,s[a++]=f,a}function el(r,t,e,n,i,s,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c];a=qm(r,t,f,n,i,s,a),h.push(a),t=f}return a}function Jm(r,t,e,n,i,s,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c],p=[];a=el(r,t,f,n,i,s,a,p),h.push(p),t=f[f.length-1]}return a}function Di(r,t,e,n,i){i=i!==void 0?i:[];let s=0;for(let a=t;a<e;a+=n)i[s++]=r.slice(a,a+n);return i.length=s,i}function Rr(r,t,e,n,i){i=i!==void 0?i:[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=e[a];i[s++]=Di(r,t,c,n,i[s]),t=c}return i.length=s,i}function il(r,t,e,n,i){i=i!==void 0?i:[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=e[a];i[s++]=c.length===1&&c[0]===t?[]:Rr(r,t,c,n,i[s]),t=c[c.length-1]}return i.length=s,i}function Lu(r,t,e,n){let i=0,s=r[e-n],a=r[e-n+1];for(;t<e;t+=n){const h=r[t],c=r[t+1];i+=a*h-s*c,s=h,a=c}return i/2}function bu(r,t,e,n){let i=0;for(let s=0,a=e.length;s<a;++s){const h=e[s];i+=Lu(r,t,h,n),t=h}return i}function Qm(r,t,e,n){let i=0;for(let s=0,a=e.length;s<a;++s){const h=e[s];i+=bu(r,t,h,n),t=h[h.length-1]}return i}class io extends gn{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new io(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ja(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),$a(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,i))}getArea(){return Lu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Di(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=eo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new io(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=to(this.flatCoordinates,0,t,this.stride),this.changed()}}const Cu=io;class nl extends gn{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new nl(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,i){const s=this.flatCoordinates,a=un(t,e,s[0],s[1]);if(a<i){const h=this.stride;for(let c=0;c<h;++c)n[c]=s[c];return n.length=h,a}return i}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return jc(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Da(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Km(this.flatCoordinates,0,t,this.stride),this.changed()}}const no=nl;function $m(r,t,e,n,i){return!Hc(i,function(a){return!mn(r,t,e,n,a[0],a[1])})}function mn(r,t,e,n,i,s){let a=0,h=r[e-n],c=r[e-n+1];for(;t<e;t+=n){const d=r[t],f=r[t+1];c<=s?f>s&&(d-h)*(s-c)-(i-h)*(f-c)>0&&a++:f<=s&&(d-h)*(s-c)-(i-h)*(f-c)<0&&a--,h=d,c=f}return a!==0}function rl(r,t,e,n,i,s){if(e.length===0||!mn(r,t,e[0],n,i,s))return!1;for(let a=1,h=e.length;a<h;++a)if(mn(r,e[a-1],e[a],n,i,s))return!1;return!0}function ty(r,t,e,n,i,s){if(e.length===0)return!1;for(let a=0,h=e.length;a<h;++a){const c=e[a];if(rl(r,t,c,n,i,s))return!0;t=c[c.length-1]}return!1}function sl(r,t,e,n,i,s,a){let h,c,d,f,p,m,v;const E=i[s+1],b=[];for(let y=0,x=e.length;y<x;++y){const C=e[y];for(f=r[C-n],m=r[C-n+1],h=t;h<C;h+=n)p=r[h],v=r[h+1],(E<=m&&v<=E||m<=E&&E<=v)&&(d=(E-m)/(v-m)*(p-f)+f,b.push(d)),f=p,m=v}let M=NaN,S=-1/0;for(b.sort(Pi),f=b[0],h=1,c=b.length;h<c;++h){p=b[h];const y=Math.abs(p-f);y>S&&(d=(f+p)/2,rl(r,t,e,n,d,E)&&(M=d,S=y)),f=p}return isNaN(M)&&(M=i[s]),a?(a.push(M,E,S),a):[M,E,S]}function Tu(r,t,e,n,i){let s=[];for(let a=0,h=e.length;a<h;++a){const c=e[a];s=sl(r,t,c,n,i,2*a,s),t=c[c.length-1]}return s}function Mu(r,t,e,n,i){let s;for(t+=n;t<e;t+=n)if(s=i(r.slice(t-n,t),r.slice(t,t+n)),s)return s;return!1}function ro(r,t,e,n,i){const s=Wc(xe(),r,t,e,n);return ce(i,s)?hn(i,s)||s[0]>=i[0]&&s[2]<=i[2]||s[1]>=i[1]&&s[3]<=i[3]?!0:Mu(r,t,e,n,function(a,h){return pm(i,a,h)}):!1}function ey(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){if(ro(r,t,e[s],n,i))return!0;t=e[s]}return!1}function Su(r,t,e,n,i){return!!(ro(r,t,e,n,i)||mn(r,t,e,n,i[0],i[1])||mn(r,t,e,n,i[0],i[3])||mn(r,t,e,n,i[2],i[1])||mn(r,t,e,n,i[2],i[3]))}function Pu(r,t,e,n,i){if(!Su(r,t,e[0],n,i))return!1;if(e.length===1)return!0;for(let s=1,a=e.length;s<a;++s)if($m(r,e[s-1],e[s],n,i)&&!ro(r,e[s-1],e[s],n,i))return!1;return!0}function iy(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){const h=e[s];if(Pu(r,t,h,n,i))return!0;t=h[h.length-1]}return!1}function ny(r,t,e,n){for(;t<e-n;){for(let i=0;i<n;++i){const s=r[t+i];r[t+i]=r[e-n+i],r[e-n+i]=s}t+=n,e-=n}}function ol(r,t,e,n){let i=0,s=r[e-n],a=r[e-n+1];for(;t<e;t+=n){const h=r[t],c=r[t+1];i+=(h-s)*(c+a),s=h,a=c}return i===0?void 0:i>0}function al(r,t,e,n,i){i=i!==void 0?i:!1;for(let s=0,a=e.length;s<a;++s){const h=e[s],c=ol(r,t,h,n);if(s===0){if(i&&c||!i&&!c)return!1}else if(i&&!c||!i&&c)return!1;t=h}return!0}function ku(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){const h=e[s];if(!al(r,t,h,n,i))return!1;h.length&&(t=h[h.length-1])}return!0}function so(r,t,e,n,i){i=i!==void 0?i:!1;for(let s=0,a=e.length;s<a;++s){const h=e[s],c=ol(r,t,h,n);(s===0?i&&c||!i&&!c:i&&!c||!i&&c)&&ny(r,t,h,n),t=h}return t}function ll(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s)t=so(r,t,e[s],n,i);return t}function ry(r,t){const e=[];let n=0,i=0,s;for(let a=0,h=t.length;a<h;++a){const c=t[a],d=ol(r,n,c,2);if(s===void 0&&(s=d),d===s)e.push(t.slice(i,a+1));else{if(e.length===0)continue;e[e.length-1].push(t[i])}i=a+1,n=c}return e}class Oi extends gn{constructor(t,e,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&n?(this.setFlatCoordinates(e,t),this.ends_=n):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?He(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Oi(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qa(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),tl(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,i))}containsXY(t,e){return rl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return bu(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),so(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Rr(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Ri(this.getExtent());this.flatInteriorPoint_=sl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new no(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Cu(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,n=this.ends_,i=[];let s=0;for(let a=0,h=n.length;a<h;++a){const c=n[a],d=new Cu(e.slice(s,c),t);i.push(d),s=c}return i}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;al(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=so(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=el(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Oi(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Pu(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=kr(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}function Ru(r){if(Ys(r))throw new Error("Cannot create polygon from empty extent");const t=r[0],e=r[1],n=r[2],i=r[3],s=[t,e,t,i,n,i,n,e,t,e];return new Oi(s,"XY",[s.length])}const hl=0;class sy extends Re{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Wa(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&Jc(),t.center&&(t.center=hi(t.center,this.projection_)),t.extent&&(t.extent=fn(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const h in Ae)delete e[h];this.setProperties(e,!0);const n=ay(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;const i=oy(t),s=n.constraint,a=ly(t);this.constraints_={center:i,resolution:s,rotation:a},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const n=this.getCenterInternal();if(n){const i=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),a=s/2*(i[3]-e[3]+e[1]-i[1]),h=s/2*(i[0]-e[0]+e[2]-i[2]);this.setCenterInternal([n[0]+a,n[1]-h])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let n=0;n<e.length;++n){let i=arguments[n];i.center&&(i=Object.assign({},i),i.center=hi(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=hi(i.anchor,this.getProjection())),e[n]=i}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,n;e>1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let i=0;for(;i<e&&!this.isDef();++i){const f=arguments[i];f.center&&this.setCenterInternal(f.center),f.zoom!==void 0?this.setZoom(f.zoom):f.resolution&&this.setResolution(f.resolution),f.rotation!==void 0&&this.setRotation(f.rotation)}if(i===e){n&&oo(n,!0);return}let s=Date.now(),a=this.targetCenter_.slice(),h=this.targetResolution_,c=this.targetRotation_;const d=[];for(;i<e;++i){const f=arguments[i],p={start:s,complete:!1,anchor:f.anchor,duration:f.duration!==void 0?f.duration:1e3,easing:f.easing||Im,callback:n};if(f.center&&(p.sourceCenter=a,p.targetCenter=f.center.slice(),a=p.targetCenter),f.zoom!==void 0?(p.sourceResolution=h,p.targetResolution=this.getResolutionForZoom(f.zoom),h=p.targetResolution):f.resolution&&(p.sourceResolution=h,p.targetResolution=f.resolution,h=p.targetResolution),f.rotation!==void 0){p.sourceRotation=c;const m=Bn(f.rotation-c+Math.PI,2*Math.PI)-Math.PI;p.targetRotation=c+m,c=p.targetRotation}hy(p)?p.complete=!0:s+=p.duration,d.push(p)}this.animations_.push(d),this.setHint(Zt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Zt.ANIMATING]>0}getInteracting(){return this.hints_[Zt.INTERACTING]>0}cancelAnimations(){this.setHint(Zt.ANIMATING,-this.hints_[Zt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const i=this.animations_[e];if(i[0].callback&&oo(i[0].callback,!1),!t)for(let s=0,a=i.length;s<a;++s){const h=i[s];if(!h.complete){t=h.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let n=this.animations_.length-1;n>=0;--n){const i=this.animations_[n];let s=!0;for(let a=0,h=i.length;a<h;++a){const c=i[a];if(c.complete)continue;const d=t-c.start;let f=c.duration>0?d/c.duration:1;f>=1?(c.complete=!0,f=1):s=!1;const p=c.easing(f);if(c.sourceCenter){const m=c.sourceCenter[0],v=c.sourceCenter[1],E=c.targetCenter[0],b=c.targetCenter[1];this.nextCenter_=c.targetCenter;const M=m+p*(E-m),S=v+p*(b-v);this.targetCenter_=[M,S]}if(c.sourceResolution&&c.targetResolution){const m=p===1?c.targetResolution:c.sourceResolution+p*(c.targetResolution-c.sourceResolution);if(c.anchor){const v=this.getViewportSize_(this.getRotation()),E=this.constraints_.resolution(m,0,v,!0);this.targetCenter_=this.calculateCenterZoom(E,c.anchor)}this.nextResolution_=c.targetResolution,this.targetResolution_=m,this.applyTargetState_(!0)}if(c.sourceRotation!==void 0&&c.targetRotation!==void 0){const m=p===1?Bn(c.targetRotation+Math.PI,2*Math.PI)-Math.PI:c.sourceRotation+p*(c.targetRotation-c.sourceRotation);if(c.anchor){const v=this.constraints_.rotation(m,!0);this.targetCenter_=this.calculateCenterRotate(v,c.anchor)}this.nextRotation_=c.targetRotation,this.targetRotation_=m}if(this.applyTargetState_(!0),e=!0,!c.complete)break}if(s){this.animations_[n]=null,this.setHint(Zt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=i[0].callback;a&&oo(a,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const i=this.getCenterInternal();return i!==void 0&&(n=[i[0]-e[0],i[1]-e[1]],Ua(n,t-this.getRotation()),vm(n,e)),n}calculateCenterZoom(t,e){let n;const i=this.getCenterInternal(),s=this.getResolution();if(i!==void 0&&s!==void 0){const a=e[0]-t*(e[0]-i[0])/s,h=e[1]-t*(e[1]-i[1])/s;n=[a,h]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],i=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(i*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Va(t,this.getProjection())}getCenterInternal(){return this.get(Ae.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return nu(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();mt(e,"The view center is not defined");const n=this.getResolution();mt(n!==void 0,"The view resolution is not defined");const i=this.getRotation();return mt(i!==void 0,"The view rotation is not defined"),Na(e,n,i,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Ae.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(fn(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Mt(t)/e[0],i=we(t)/e[1];return Math.max(n,i)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(e/n)/Math.log(t);return function(s){return e/Math.pow(t,s*i)}}getRotation(){return this.get(Ae.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(n/i)/e;return function(a){return Math.log(n/a)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let i=this.getCenterInternal();const s=this.padding_;if(s){const a=this.getViewportSizeMinusPadding_();i=cl(i,this.getViewportSize_(),[a[0]/2+s[3],a[1]/2+s[0]],e,n)}return{center:i.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,i;if(this.resolutions_){const s=Ra(this.resolutions_,t,1);e=s,n=this.resolutions_[s],s==this.resolutions_.length-1?i=2:i=n/this.resolutions_[s+1]}else n=this.maxResolution_,i=this.zoomFactor_;return e+Math.log(n/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Dt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Dt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(mt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){mt(!Ys(t),"Cannot fit empty extent provided as `geometry`");const i=fn(t,this.getProjection());n=Ru(i)}else if(t.getType()==="Circle"){const i=fn(t.getExtent(),this.getProjection());n=Ru(i),n.rotate(this.getRotation(),Ri(i))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),i=Math.sin(-e),s=t.getFlatCoordinates(),a=t.getStride();let h=1/0,c=1/0,d=-1/0,f=-1/0;for(let p=0,m=s.length;p<m;p+=a){const v=s[p]*n-s[p+1]*i,E=s[p]*i+s[p+1]*n;h=Math.min(h,v),c=Math.min(c,E),d=Math.max(d,v),f=Math.max(f,E)}return[h,c,d,f]}fitInternal(t,e){e=e||{};let n=e.size;n||(n=this.getViewportSizeMinusPadding_());const i=e.padding!==void 0?e.padding:[0,0,0,0],s=e.nearest!==void 0?e.nearest:!1;let a;e.minResolution!==void 0?a=e.minResolution:e.maxZoom!==void 0?a=this.getResolutionForZoom(e.maxZoom):a=0;const h=this.rotatedExtentForGeometry(t);let c=this.getResolutionForExtentInternal(h,[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]);c=isNaN(c)?a:Math.max(c,a),c=this.getConstrainedResolution(c,s?0:1);const d=this.getRotation(),f=Math.sin(d),p=Math.cos(d),m=Ri(h);m[0]+=(i[1]-i[3])/2*c,m[1]+=(i[0]-i[2])/2*c;const v=m[0]*p-m[1]*f,E=m[1]*p+m[0]*f,b=this.getConstrainedCenter([v,E],c),M=e.callback?e.callback:In;e.duration!==void 0?this.animateInternal({resolution:c,center:b,duration:e.duration,easing:e.easing},M):(this.targetResolution_=c,this.targetCenter_=b,this.applyTargetState_(!1,!0),oo(M,!0))}centerOn(t,e,n){this.centerOnInternal(hi(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(cl(t,e,n,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,n,i){let s;const a=this.padding_;if(a&&t){const h=this.getViewportSizeMinusPadding_(-n),c=cl(t,i,[h[0]/2+a[3],h[1]/2+a[0]],e,n);s=[t[0]-c[0],t[1]-c[1]]}return s}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Va(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&hi(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const n=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,i,n);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=hi(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const n=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(i,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&hi(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const n=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,n),s=this.getViewportSize_(i),a=this.constraints_.resolution(this.targetResolution_,0,s,n),h=this.constraints_.center(this.targetCenter_,a,s,n,this.calculateCenterShift(this.targetCenter_,a,i,s));this.get(Ae.ROTATION)!==i&&this.set(Ae.ROTATION,i),this.get(Ae.RESOLUTION)!==a&&(this.set(Ae.RESOLUTION,a),this.set("zoom",this.getZoom(),!0)),(!h||!this.get(Ae.CENTER)||!Qs(this.get(Ae.CENTER),h))&&this.set(Ae.CENTER,h),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,n){t=t!==void 0?t:200;const i=e||0,s=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(s),h=this.constraints_.resolution(this.targetResolution_,i,a),c=this.constraints_.center(this.targetCenter_,h,a,!1,this.calculateCenterShift(this.targetCenter_,h,s,a));if(t===0&&!this.cancelAnchor_){this.targetResolution_=h,this.targetRotation_=s,this.targetCenter_=c,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==h||this.getRotation()!==s||!this.getCenterInternal()||!Qs(this.getCenterInternal(),c))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:c,resolution:h,duration:t,easing:Gn,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Zt.INTERACTING,1)}endInteraction(t,e,n){n=n&&hi(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.getInteracting()&&(this.setHint(Zt.INTERACTING,-1),this.resolveConstraints(t,e,n))}getConstrainedCenter(t,e){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)}getConstrainedZoom(t,e){const n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))}getConstrainedResolution(t,e){e=e||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,n)}}function oo(r,t){setTimeout(function(){r(t)},0)}function oy(r){if(r.extent!==void 0){const e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return ru(r.extent,r.constrainOnlyCenter,e)}const t=Wa(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,ru(e,!1,!1)}return Sm}function ay(r){let t,e,n,a=r.minZoom!==void 0?r.minZoom:hl,h=r.maxZoom!==void 0?r.maxZoom:28;const c=r.zoomFactor!==void 0?r.zoomFactor:2,d=r.multiWorld!==void 0?r.multiWorld:!1,f=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,p=r.showFullExtent!==void 0?r.showFullExtent:!1,m=Wa(r.projection,"EPSG:3857"),v=m.getExtent();let E=r.constrainOnlyCenter,b=r.extent;if(!d&&!b&&m.isGlobal()&&(E=!1,b=v),r.resolutions!==void 0){const M=r.resolutions;e=M[a],n=M[h]!==void 0?M[h]:M[M.length-1],r.constrainResolution?t=Pm(M,f,!E&&b,p):t=su(e,n,f,!E&&b,p)}else{const S=(v?Math.max(Mt(v),we(v)):360*br.degrees/m.getMetersPerUnit())/Aa/Math.pow(2,hl),y=S/Math.pow(2,28-hl);e=r.maxResolution,e!==void 0?a=0:e=S/Math.pow(c,a),n=r.minResolution,n===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?n=e/Math.pow(c,h):n=S/Math.pow(c,h):n=y),h=a+Math.floor(Math.log(e/n)/Math.log(c)),n=e/Math.pow(c,h-a),r.constrainResolution?t=km(c,e,n,f,!E&&b,p):t=su(e,n,f,!E&&b,p)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:a,zoomFactor:c}}function ly(r){if(r.enableRotation!==void 0?r.enableRotation:!0){const e=r.constrainRotation;return e===void 0||e===!0?Am():e===!1?ou:typeof e=="number"?Rm(e):ou}return Ka}function hy(r){return!(r.sourceCenter&&r.targetCenter&&!Qs(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function cl(r,t,e,n,i){const s=Math.cos(-i);let a=Math.sin(-i),h=r[0]*s-r[1]*a,c=r[1]*s+r[0]*a;h+=(t[0]/2-e[0])*n,c+=(e[1]-t[1]/2)*n,a=-a;const d=h*s-c*a,f=c*s+h*a;return[d,f]}const Ve=sy,ue={ADD:"add",REMOVE:"remove"},Au={LENGTH:"length"};class ao extends ai{constructor(t,e,n){super(t),this.element=e,this.index=n}}class cy extends Re{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,i=this.array_.length;n<i;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let n=0,i=e.length;n<i;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(Au.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new ao(ue.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,i=e.length;n<i;++n)if(e[n]===t)return this.removeAt(n)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new ao(ue.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new ao(ue.REMOVE,i,t)),this.dispatchEvent(new ao(ue.ADD,e,t))}updateLength_(){this.set(Au.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===t&&n!==e)throw new Error("Duplicate item added to a unique collection")}}const Xe=cy,Ar={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},$t={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};$t.max=$t.whitepoint[2].D65,$t.rgb=function(r,t){t=t||$t.whitepoint[2].E;var e=r[0]/t[0],n=r[1]/t[1],i=r[2]/t[2],s,a,h;return s=e*3.240969941904521+n*-1.537383177570093+i*-.498610760293,a=e*-.96924363628087+n*1.87596750150772+i*.041555057407175,h=e*.055630079696993+n*-.20397695888897+i*1.056971514242878,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s=s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:h=h*12.92,s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),h=Math.min(Math.max(0,h),1),[s*255,a*255,h*255]},Ar.xyz=function(r,t){var e=r[0]/255,n=r[1]/255,i=r[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var s=e*.41239079926595+n*.35758433938387+i*.18048078840183,a=e*.21263900587151+n*.71516867876775+i*.072192315360733,h=e*.019330818715591+n*.11919477979462+i*.95053215224966;return t=t||$t.whitepoint[2].E,[s*t[0],a*t[1],h*t[2]]};var ul={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(r,t,e){var n,i,s,a,h,c,d,f,p,m,v,E,b;if(s=r[0],a=r[1],h=r[2],s===0)return[0,0,0];var M=.0011070564598794539;return t=t||"D65",e=e||2,p=$t.whitepoint[e][t][0],m=$t.whitepoint[e][t][1],v=$t.whitepoint[e][t][2],E=4*p/(p+15*m+3*v),b=9*m/(p+15*m+3*v),n=a/(13*s)+E||0,i=h/(13*s)+b||0,d=s>8?m*Math.pow((s+16)/116,3):m*s*M,c=d*9*n/(4*i)||0,f=d*(12-3*n-20*i)/(4*i)||0,[c,d,f]}};$t.luv=function(r,t,e){var n,i,s,a,h,c,d,f,p,m,v,E,b,M=.008856451679035631,S=903.2962962962961;t=t||"D65",e=e||2,p=$t.whitepoint[e][t][0],m=$t.whitepoint[e][t][1],v=$t.whitepoint[e][t][2],E=4*p/(p+15*m+3*v),b=9*m/(p+15*m+3*v),c=r[0],d=r[1],f=r[2],n=4*c/(c+15*d+3*f)||0,i=9*d/(c+15*d+3*f)||0;var y=d/m;return s=y<=M?S*y:116*Math.pow(y,1/3)-16,a=13*s*(n-E),h=13*s*(i-b),[s,a,h]};var Iu={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(r){var t=r[0],e=r[1],n=r[2],i,s,a;return a=n/360*2*Math.PI,i=e*Math.cos(a),s=e*Math.sin(a),[t,i,s]},xyz:function(r){return ul.xyz(Iu.luv(r))}};ul.lchuv=function(r){var t=r[0],e=r[1],n=r[2],i=Math.sqrt(e*e+n*n),s=Math.atan2(n,e),a=s*360/2/Math.PI;return a<0&&(a+=360),[t,i,a]},$t.lchuv=function(r){return ul.lchuv($t.luv(r))};const Du={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var Ou={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function uy(r){var f,p;var t,e=[],n=1,i;if(typeof r=="number")return{space:"rgb",values:[r>>>16,(r&65280)>>>8,r&255],alpha:1};if(typeof r=="number")return{space:"rgb",values:[r>>>16,(r&65280)>>>8,r&255],alpha:1};if(r=String(r).toLowerCase(),Du[r])e=Du[r].slice(),i="rgb";else if(r==="transparent")n=0,i="rgb",e=[0,0,0];else if(r[0]==="#"){var s=r.slice(1),a=s.length,h=a<=4;n=1,h?(e=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],a===4&&(n=parseInt(s[3]+s[3],16)/255)):(e=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],a===8&&(n=parseInt(s[6]+s[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),i="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(r)){var c=t[1];i=c.replace(/a$/,"");var d=i==="cmyk"?4:i==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=e.shift()),e=e.map(function(m,v){if(m[m.length-1]==="%")return m=parseFloat(m)/100,v===3?m:i==="rgb"?m*255:i[0]==="h"||i[0]==="l"&&!v?m*100:i==="lab"?m*125:i==="lch"?v<2?m*150:m*360:i[0]==="o"&&!v?m:i==="oklab"?m*.4:i==="oklch"?v<2?m*.4:m*360:m;if(i[v]==="h"||v===2&&i[i.length-1]==="h"){if(Ou[m]!==void 0)return Ou[m];if(m.endsWith("deg"))return parseFloat(m);if(m.endsWith("turn"))return parseFloat(m)*360;if(m.endsWith("grad"))return parseFloat(m)*360/400;if(m.endsWith("rad"))return parseFloat(m)*180/Math.PI}return m==="none"?0:parseFloat(m)}),n=e.length>d?e.pop():1}else/[0-9](?:\s|\/|,)/.test(r)&&(e=r.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),i=((p=(f=r.match(/([a-z])/ig))==null?void 0:f.join(""))==null?void 0:p.toLowerCase())||"rgb");return{space:i,values:e,alpha:n}}var dl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(r){var t=r[0]/360,e=r[1]/100,n=r[2]/100,i,s,a,h,c,d=0;if(e===0)return c=n*255,[c,c,c];for(s=n<.5?n*(1+e):n+e-n*e,i=2*n-s,h=[0,0,0];d<3;)a=t+1/3*-(d-1),a<0?a++:a>1&&a--,c=6*a<1?i+(s-i)*6*a:2*a<1?s:3*a<2?i+(s-i)*(2/3-a)*6:i,h[d++]=c*255;return h}};Ar.hsl=function(r){var t=r[0]/255,e=r[1]/255,n=r[2]/255,i=Math.min(t,e,n),s=Math.max(t,e,n),a=s-i,h,c,d;return s===i?h=0:t===s?h=(e-n)/a:e===s?h=2+(n-t)/a:n===s&&(h=4+(t-e)/a),h=Math.min(h*60,360),h<0&&(h+=360),d=(i+s)/2,s===i?c=0:d<=.5?c=a/(s+i):c=a/(2-s-i),[h,c*100,d*100]};function dy(r){Array.isArray(r)&&r.raw&&(r=String.raw(...arguments)),r instanceof Number&&(r=+r);var t,e=uy(r);if(!e.space)return[];const n=e.space[0]==="h"?dl.min:Ar.min,i=e.space[0]==="h"?dl.max:Ar.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],n[0]),i[0]),t[1]=Math.min(Math.max(e.values[1],n[1]),i[1]),t[2]=Math.min(Math.max(e.values[2],n[2]),i[2]),e.space[0]==="h"&&(t=dl.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}function Fu(r){return typeof r=="string"?r:Bu(r)}const fy=1024,Ir={};let fl=0;function gy(r){if(r.length===4)return r;const t=r.slice();return t[3]=1,t}function zu(r){const t=$t.lchuv(Ar.xyz(r));return t[3]=r[3],t}function py(r){const t=$t.rgb(Iu.xyz(r));return t[3]=r[3],t}function gl(r){if(Ir.hasOwnProperty(r))return Ir[r];if(fl>=fy){let e=0;for(const n in Ir)e++&3||(delete Ir[n],--fl)}const t=dy(r);if(t.length!==4)throw new Error('Failed to parse "'+r+'" as color');for(const e of t)if(isNaN(e))throw new Error('Failed to parse "'+r+'" as color');return Nu(t),Ir[r]=t,++fl,t}function Dr(r){return Array.isArray(r)?r:gl(r)}function Nu(r){return r[0]=Dt(r[0]+.5|0,0,255),r[1]=Dt(r[1]+.5|0,0,255),r[2]=Dt(r[2]+.5|0,0,255),r[3]=Dt(r[3],0,1),r}function Bu(r){let t=r[0];t!=(t|0)&&(t=t+.5|0);let e=r[1];e!=(e|0)&&(e=e+.5|0);let n=r[2];n!=(n|0)&&(n=n+.5|0);const i=r[3]===void 0?1:Math.round(r[3]*100)/100;return"rgba("+t+","+e+","+n+","+i+")"}function _y(r){try{return gl(r),!0}catch{return!1}}class my{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];!(t++&3)&&!n.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,n){const i=Gu(t,e,n);return i in this.cache_?this.cache_[i]:null}set(t,e,n,i){const s=Gu(t,e,n);this.cache_[s]=i,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Gu(r,t,e){const n=e?Fu(e):"null";return t+":"+r+":"+n}const lo=new my,bt={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class yy extends Re{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[bt.OPACITY]=t.opacity!==void 0?t.opacity:1,mt(typeof e[bt.OPACITY]=="number","Layer opacity must be a number"),e[bt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[bt.Z_INDEX]=t.zIndex,e[bt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[bt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[bt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[bt.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=Dt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return ot()}getLayerStatesArray(t){return ot()}getExtent(){return this.get(bt.EXTENT)}getMaxResolution(){return this.get(bt.MAX_RESOLUTION)}getMinResolution(){return this.get(bt.MIN_RESOLUTION)}getMinZoom(){return this.get(bt.MIN_ZOOM)}getMaxZoom(){return this.get(bt.MAX_ZOOM)}getOpacity(){return this.get(bt.OPACITY)}getSourceState(){return ot()}getVisible(){return this.get(bt.VISIBLE)}getZIndex(){return this.get(bt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(bt.EXTENT,t)}setMaxResolution(t){this.set(bt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(bt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(bt.MAX_ZOOM,t)}setMinZoom(t){this.set(bt.MIN_ZOOM,t)}setOpacity(t){mt(typeof t=="number","Layer opacity must be a number"),this.set(bt.OPACITY,t)}setVisible(t){this.set(bt.VISIBLE,t)}setZIndex(t){this.set(bt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Uu=yy,te={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class vy extends Uu{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(bt.SOURCE,this.handleSourcePropertyChange_);const n=t.source?t.source:null;this.setSource(n)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(bt.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Tt(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=gt(t,ct.CHANGE,this.handleSourceChange_,this),t.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const n=this.getMapInternal();!t&&n&&(t=n.getView()),t instanceof Ve?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&n&&(e.layerStatesArray=n.getLayerGroup().getLayerStatesArray());let i;e.layerStatesArray?i=e.layerStatesArray.find(a=>a.layer===this):i=this.getLayerState();const s=this.getExtent();return pl(i,e.viewState)&&(!s||ce(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const n=this.getSource();if(n&&(e=n.getAttributions()),!e)return[];const i=t instanceof Ve?t.getViewStateAndExtent():t;let s=e(i);return Array.isArray(s)||(s=[s]),s}render(t,e){const n=this.getRenderer();return n.prepareFrame(t)?(this.rendered=!0,n.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(bt.MAP,t)}getMapInternal(){return this.get(bt.MAP)}setMap(t){this.mapPrecomposeKey_&&(Tt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Tt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=gt(t,te.PRECOMPOSE,function(e){const i=e.frameState.layerStatesArray,s=this.getLayerState(!1);mt(!i.some(function(a){return a.layer===s.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),i.push(s)},this),this.mapRenderKey_=gt(this,ct.CHANGE,t.render,t),this.changed())}setSource(t){this.set(bt.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function pl(r,t){if(!r.visible)return!1;const e=t.resolution;if(e<r.minResolution||e>=r.maxResolution)return!1;const n=t.zoom;return n>r.minZoom&&n<=r.maxZoom}const ho=vy;class xy extends Fs{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){ot()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;Ie(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),$s(i,n)}forEachFeatureAtCoordinate(t,e,n,i,s,a,h,c){let d;const f=e.viewState;function p(C,T,k,R){return s.call(a,T,C?k:null,R)}const m=f.projection,v=Xc(t.slice(),m),E=[[0,0]];if(m.canWrapX()&&i){const C=m.getExtent(),T=Mt(C);E.push([-T,0],[T,0])}const b=e.layerStatesArray,M=b.length,S=[],y=[];for(let C=0;C<E.length;C++)for(let T=M-1;T>=0;--T){const k=b[T],R=k.layer;if(R.hasRenderer()&&pl(k,f)&&h.call(c,R)){const I=R.getRenderer(),z=R.getSource();if(I&&z){const G=z.getWrapX()?v:t,j=p.bind(null,k.managed);y[0]=G[0]+E[C][0],y[1]=G[1]+E[C][1],d=I.forEachFeatureAtCoordinate(y,e,n,j,S)}if(d)return d}}if(S.length===0)return;const x=1/S.length;return S.forEach((C,T)=>C.distanceSq+=T*x),S.sort((C,T)=>C.distanceSq-T.distanceSq),S.some(C=>d=C.callback(C.feature,C.layer,C.geometry)),d}hasFeatureAtCoordinate(t,e,n,i,s,a){return this.forEachFeatureAtCoordinate(t,e,n,i,Lr,this,s,a)!==void 0}getMap(){return this.map_}renderFrame(t){ot()}flushDeclutterItems(t){}scheduleExpireIconCache(t){lo.canExpireCache()&&t.postRenderFunctions.push(wy)}}function wy(r,t){lo.expire()}const Ey=xy;class Ly extends ai{constructor(t,e,n,i){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=i}}const Or=Ly,co="ol-hidden",by="ol-selectable",Fr="ol-unselectable",ju="ol-unsupported",uo="ol-control",Zu="ol-collapsed",Cy=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),Wu=["style","variant","weight","size","lineHeight","family"],Hu=function(r){const t=r.match(Cy);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,i=Wu.length;n<i;++n){const s=t[n+1];s!==void 0&&(e[Wu[n]]=s)}return e.families=e.family.split(/,\s?/),e};function ee(r,t,e,n){let i;return e&&e.length?i=e.shift():qa?i=new OffscreenCanvas(r||300,t||300):i=document.createElement("canvas"),r&&(i.width=r),t&&(i.height=t),i.getContext("2d",n)}function fo(r){const t=r.canvas;t.width=1,t.height=1,r.clearRect(0,0,1,1)}function Ty(r){let t=r.offsetWidth;const e=getComputedStyle(r);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function My(r){let t=r.offsetHeight;const e=getComputedStyle(r);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function go(r,t){const e=t.parentNode;e&&e.replaceChild(r,t)}function po(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function Vu(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function Sy(r,t){const e=r.childNodes;for(let n=0;;++n){const i=e[n],s=t[n];if(!i&&!s)break;if(i!==s){if(!i){r.appendChild(s);continue}if(!s){r.removeChild(i),--n;continue}r.insertBefore(s,i)}}}const Xu="10px sans-serif",de="#000",Un="round",ci=[],ui=0,jn="round",zr=10,Nr="#000",Br="center",_o="middle",yn=[0,0,0,0],Gr=1,di=new Re;let Zn=null,_l;const ml={},Py=function(){const t="32px ",e=["monospace","serif"],n=e.length,i="wmytzilWMYTZIL@#/&?$%10";let s,a;function h(d,f,p){let m=!0;for(let v=0;v<n;++v){const E=e[v];if(a=mo(d+" "+f+" "+t+E,i),p!=E){const b=mo(d+" "+f+" "+t+p+","+E,i);m=m&&b!=a}}return!!m}function c(){let d=!0;const f=di.getKeys();for(let p=0,m=f.length;p<m;++p){const v=f[p];di.get(v)<100&&(h.apply(this,v.split(`
16
- `))?(Dn(ml),Zn=null,_l=void 0,di.set(v,100)):(di.set(v,di.get(v)+1,!0),d=!1))}d&&(clearInterval(s),s=void 0)}return function(d){const f=Hu(d);if(!f)return;const p=f.families;for(let m=0,v=p.length;m<v;++m){const E=p[m],b=f.style+`
15
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[Lc]=this[Lc]={accessors:{}}).accessors,i=this.prototype;function s(a){const h=wr(a);n[h]||(T_(i,a),n[h]=!0)}return O.isArray(t)?t.forEach(s):s(t),this}}ks.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),O.freezeMethods(ks.prototype),O.freezeMethods(ks);const oi=ks;function Ca(r,t){const e=this||La,n=t||e,i=oi.from(n.headers);let s=n.data;return O.forEach(r,function(h){s=h.call(e,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function bc(r){return!!(r&&r.__CANCEL__)}function Er(r,t,e){vt.call(this,r??"canceled",vt.ERR_CANCELED,t,e),this.name="CanceledError"}O.inherits(Er,vt,{__CANCEL__:!0});function M_(r,t,e){const n=e.config.validateStatus;!e.status||!n||n(e.status)?r(e):t(new vt("Request failed with status code "+e.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const S_=We.isStandardBrowserEnv?function(){return{write:function(e,n,i,s,a,h){const c=[];c.push(e+"="+encodeURIComponent(n)),O.isNumber(i)&&c.push("expires="+new Date(i).toGMTString()),O.isString(s)&&c.push("path="+s),O.isString(a)&&c.push("domain="+a),h===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(e){const n=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function P_(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function k_(r,t){return t?r.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):r}function Cc(r,t){return r&&!P_(t)?k_(r,t):t}const R_=We.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function i(s){let a=s;return t&&(e.setAttribute("href",a),a=e.href),e.setAttribute("href",a),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return n=i(window.location.href),function(a){const h=O.isString(a)?i(a):a;return h.protocol===n.protocol&&h.host===n.host}}():function(){return function(){return!0}}();function A_(r){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return t&&t[1]||""}function I_(r,t){r=r||10;const e=new Array(r),n=new Array(r);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),f=n[s];a||(a=d),e[i]=c,n[i]=d;let p=s,m=0;for(;p!==i;)m+=e[p++],p=p%r;if(i=(i+1)%r,i===s&&(s=(s+1)%r),d-a<t)return;const v=f&&d-f;return v?Math.round(m*1e3/v):void 0}}function Tc(r,t){let e=0;const n=I_(50,250);return i=>{const s=i.loaded,a=i.lengthComputable?i.total:void 0,h=s-e,c=n(h),d=s<=a;e=s;const f={loaded:s,total:a,progress:a?s/a:void 0,bytes:h,rate:c||void 0,estimated:c&&a&&d?(a-s)/c:void 0,event:i};f[t?"download":"upload"]=!0,r(f)}}const Rs={http:o_,xhr:typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(e,n){let i=r.data;const s=oi.from(r.headers).normalize(),a=r.responseType;let h;function c(){r.cancelToken&&r.cancelToken.unsubscribe(h),r.signal&&r.signal.removeEventListener("abort",h)}O.isFormData(i)&&(We.isStandardBrowserEnv||We.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.setContentType("multipart/form-data;",!1));let d=new XMLHttpRequest;if(r.auth){const v=r.auth.username||"",E=r.auth.password?unescape(encodeURIComponent(r.auth.password)):"";s.set("Authorization","Basic "+btoa(v+":"+E))}const f=Cc(r.baseURL,r.url);d.open(r.method.toUpperCase(),vc(f,r.params,r.paramsSerializer),!0),d.timeout=r.timeout;function p(){if(!d)return;const v=oi.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),C={data:!a||a==="text"||a==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:v,config:r,request:d};M_(function(S){e(S),c()},function(S){n(S),c()},C),d=null}if("onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(n(new vt("Request aborted",vt.ECONNABORTED,r,d)),d=null)},d.onerror=function(){n(new vt("Network Error",vt.ERR_NETWORK,r,d)),d=null},d.ontimeout=function(){let E=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||wc;r.timeoutErrorMessage&&(E=r.timeoutErrorMessage),n(new vt(E,C.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,r,d)),d=null},We.isStandardBrowserEnv){const v=(r.withCredentials||R_(f))&&r.xsrfCookieName&&S_.read(r.xsrfCookieName);v&&s.set(r.xsrfHeaderName,v)}i===void 0&&s.setContentType(null),"setRequestHeader"in d&&O.forEach(s.toJSON(),function(E,C){d.setRequestHeader(C,E)}),O.isUndefined(r.withCredentials)||(d.withCredentials=!!r.withCredentials),a&&a!=="json"&&(d.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&d.addEventListener("progress",Tc(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Tc(r.onUploadProgress)),(r.cancelToken||r.signal)&&(h=v=>{d&&(n(!v||v.type?new Er(null,r,d):v),d.abort(),d=null)},r.cancelToken&&r.cancelToken.subscribe(h),r.signal&&(r.signal.aborted?h():r.signal.addEventListener("abort",h)));const m=A_(f);if(m&&We.protocols.indexOf(m)===-1){n(new vt("Unsupported protocol "+m+":",vt.ERR_BAD_REQUEST,r));return}d.send(i||null)})}};O.forEach(Rs,(r,t)=>{if(r){try{Object.defineProperty(r,"name",{value:t})}catch{}Object.defineProperty(r,"adapterName",{value:t})}});const D_={getAdapter:r=>{r=O.isArray(r)?r:[r];const{length:t}=r;let e,n;for(let i=0;i<t&&(e=r[i],!(n=O.isString(e)?Rs[e.toLowerCase()]:e));i++);if(!n)throw n===!1?new vt(`Adapter ${e} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(O.hasOwnProp(Rs,e)?`Adapter '${e}' is not available in the build`:`Unknown adapter '${e}'`);if(!O.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Rs};function Ta(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new Er(null,r)}function Mc(r){return Ta(r),r.headers=oi.from(r.headers),r.data=Ca.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),D_.getAdapter(r.adapter||La.adapter)(r).then(function(n){return Ta(r),n.data=Ca.call(r,r.transformResponse,n),n.headers=oi.from(n.headers),n},function(n){return bc(n)||(Ta(r),n&&n.response&&(n.response.data=Ca.call(r,r.transformResponse,n.response),n.response.headers=oi.from(n.response.headers))),Promise.reject(n)})}const Sc=r=>r instanceof oi?r.toJSON():r;function Rn(r,t){t=t||{};const e={};function n(d,f,p){return O.isPlainObject(d)&&O.isPlainObject(f)?O.merge.call({caseless:p},d,f):O.isPlainObject(f)?O.merge({},f):O.isArray(f)?f.slice():f}function i(d,f,p){if(O.isUndefined(f)){if(!O.isUndefined(d))return n(void 0,d,p)}else return n(d,f,p)}function s(d,f){if(!O.isUndefined(f))return n(void 0,f)}function a(d,f){if(O.isUndefined(f)){if(!O.isUndefined(d))return n(void 0,d)}else return n(void 0,f)}function h(d,f,p){if(p in t)return n(d,f);if(p in r)return n(void 0,d)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:h,headers:(d,f)=>i(Sc(d),Sc(f),!0)};return O.forEach(Object.keys(Object.assign({},r,t)),function(f){const p=c[f]||i,m=p(r[f],t[f],f);O.isUndefined(m)&&p!==h||(e[f]=m)}),e}const Pc="1.4.0",Ma={};["object","boolean","number","function","string","symbol"].forEach((r,t)=>{Ma[r]=function(n){return typeof n===r||"a"+(t<1?"n ":" ")+r}});const kc={};Ma.transitional=function(t,e,n){function i(s,a){return"[Axios v"+Pc+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,h)=>{if(t===!1)throw new vt(i(a," has been removed"+(e?" in "+e:"")),vt.ERR_DEPRECATED);return e&&!kc[a]&&(kc[a]=!0,console.warn(i(a," has been deprecated since v"+e+" and will be removed in the near future"))),t?t(s,a,h):!0}};function O_(r,t,e){if(typeof r!="object")throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const n=Object.keys(r);let i=n.length;for(;i-- >0;){const s=n[i],a=t[s];if(a){const h=r[s],c=h===void 0||a(h,s,r);if(c!==!0)throw new vt("option "+s+" must be "+c,vt.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new vt("Unknown option "+s,vt.ERR_BAD_OPTION)}}const Sa={assertOptions:O_,validators:Ma},Si=Sa.validators;class As{constructor(t){this.defaults=t,this.interceptors={request:new xc,response:new xc}}request(t,e){typeof t=="string"?(e=e||{},e.url=t):e=t||{},e=Rn(this.defaults,e);const{transitional:n,paramsSerializer:i,headers:s}=e;n!==void 0&&Sa.assertOptions(n,{silentJSONParsing:Si.transitional(Si.boolean),forcedJSONParsing:Si.transitional(Si.boolean),clarifyTimeoutError:Si.transitional(Si.boolean)},!1),i!=null&&(O.isFunction(i)?e.paramsSerializer={serialize:i}:Sa.assertOptions(i,{encode:Si.function,serialize:Si.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let a;a=s&&O.merge(s.common,s[e.method]),a&&O.forEach(["delete","get","head","post","put","patch","common"],E=>{delete s[E]}),e.headers=oi.concat(a,s);const h=[];let c=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(e)===!1||(c=c&&C.synchronous,h.unshift(C.fulfilled,C.rejected))});const d=[];this.interceptors.response.forEach(function(C){d.push(C.fulfilled,C.rejected)});let f,p=0,m;if(!c){const E=[Mc.bind(this),void 0];for(E.unshift.apply(E,h),E.push.apply(E,d),m=E.length,f=Promise.resolve(e);p<m;)f=f.then(E[p++],E[p++]);return f}m=h.length;let v=e;for(p=0;p<m;){const E=h[p++],C=h[p++];try{v=E(v)}catch(M){C.call(this,M);break}}try{f=Mc.call(this,v)}catch(E){return Promise.reject(E)}for(p=0,m=d.length;p<m;)f=f.then(d[p++],d[p++]);return f}getUri(t){t=Rn(this.defaults,t);const e=Cc(t.baseURL,t.url);return vc(e,t.params,t.paramsSerializer)}}O.forEach(["delete","get","head","options"],function(t){As.prototype[t]=function(e,n){return this.request(Rn(n||{},{method:t,url:e,data:(n||{}).data}))}}),O.forEach(["post","put","patch"],function(t){function e(n){return function(s,a,h){return this.request(Rn(h||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}As.prototype[t]=e(),As.prototype[t+"Form"]=e(!0)});const Is=As;class Pa{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(s){e=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(h=>{n.subscribe(h),s=h}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,h){n.reason||(n.reason=new Er(s,a,h),e(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);e!==-1&&this._listeners.splice(e,1)}static source(){let t;return{token:new Pa(function(i){t=i}),cancel:t}}}const F_=Pa;function z_(r){return function(e){return r.apply(null,e)}}function N_(r){return O.isObject(r)&&r.isAxiosError===!0}const ka={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ka).forEach(([r,t])=>{ka[t]=r});const B_=ka;function Rc(r){const t=new Is(r),e=nc(Is.prototype.request,t);return O.extend(e,Is.prototype,t,{allOwnKeys:!0}),O.extend(e,t,null,{allOwnKeys:!0}),e.create=function(i){return Rc(Rn(r,i))},e}const jt=Rc(La);jt.Axios=Is,jt.CanceledError=Er,jt.CancelToken=F_,jt.isCancel=bc,jt.VERSION=Pc,jt.toFormData=Ms,jt.AxiosError=vt,jt.Cancel=jt.CanceledError,jt.all=function(t){return Promise.all(t)},jt.spread=z_,jt.isAxiosError=N_,jt.mergeConfig=Rn,jt.AxiosHeaders=oi,jt.formToJSON=r=>Ec(O.isHTMLForm(r)?new FormData(r):r),jt.HttpStatusCode=B_,jt.default=jt;const Ac=jt,Ds="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBVcGxvYWRlZCB0bzogU1ZHIFJlcG8sIHd3dy5zdmdyZXBvLmNvbSwgR2VuZXJhdG9yOiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4NCjxzdmcgZmlsbD0iIzAwMDAwMCIgaGVpZ2h0PSI4MDBweCIgd2lkdGg9IjgwMHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiANCgkgdmlld0JveD0iMCAwIDUwMS4zMzcgNTAxLjMzNyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8Zz4NCgk8Zz4NCgkJPHBhdGggZD0iTTQ5Ni45NjIsMi4wMzFjLTIuNzczLTIuMDI3LTYuNC0yLjU2LTkuNi0xLjQ5M0wzMzAuNjY5LDUyLjgwNEwxNzMuOTc1LDAuNTM3Yy0xLjA2Ny0wLjMyLTIuMTMzLTAuNTMzLTMuMi0wLjUzM2gtMC4xMDcNCgkJCWgtMC4xMDdjLTEuMDY3LDAtMi4xMzMsMC4yMTMtMy4yLDAuNTMzbC0xNjAsNTMuMzMzYy00LjM3MywxLjM4Ny03LjM2LDUuNTQ3LTcuMzYsMTAuMTMzdjQyNi4yNGMwLDMuMzA3LDEuMzg3LDYuNjEzLDMuOTQ3LDguNjQNCgkJCWMyLjk4NywyLjQ1Myw2LjgyNywyLjk4NywxMC4xMzMsMS45MmwxNTYuNjkzLTUyLjI2N2wxNTYuNjkzLDUyLjI2N2MxLjA2NywwLjMyLDIuMTMzLDAuNTMzLDMuMiwwLjUzM2gwLjEwN2gwLjEwNw0KCQkJYzEuMDY3LDAsMi4xMzMtMC4yMTMsMy4yLTAuNTMzbDE2MC01My4zMzNjNC4zNzMtMS40OTMsNy4yNTMtNS41NDcsNy4yNTMtMTAuMTMzVjEwLjY3MQ0KCQkJQzUwMS4zMzUsNy4yNTcsNDk5LjczNSw0LjA1Nyw0OTYuOTYyLDIuMDMxeiBNNzQuNjY5LDQ1OC4xMzdsLTUzLjMzMywxNy44MTNWMjg1LjAxN2w1My4zMzMtMTcuODEzVjQ1OC4xMzd6IE0xNjAuMDAyLDQyOS42NTcNCgkJCWwtNjQsMjEuMzMzVjI2MC4xNjRsNjQtMjEuMzMzVjQyOS42NTd6IE0xNjAuMDAyLDIxNi4zMjRsLTY0LDIxLjMzM3YtODUuMjI3bDY0LTE4LjQ1M1YyMTYuMzI0eiBNMTYwLjAwMiwxMTEuODk3bC03Ny42NTMsMjIuNA0KCQkJYy00LjU4NywxLjI4LTcuNjgsNS41NDctNy42OCwxMC4yNHYxMDAuMjY3bC01My4zMzMsMTcuODEzVjcxLjY4NGwxMzguNjY3LTQ2LjE4N1YxMTEuODk3eiBNMzIwLjAwMiw0NzUuOTUxbC01My4zMzMtMTcuNzA3DQoJCQlWMzQxLjAxN2w1My4zMzMsMjEuNzZWNDc1Ljk1MXogTTMyMC4wMDIsMzM5LjczN2wtNTkuOTQ3LTI0LjQyN2MtNS40NC0yLjI0LTExLjczMywwLjQyNy0xMy44NjcsNS44NjcNCgkJCWMtMC41MzMsMS4yOC0wLjc0NywyLjY2Ny0wLjc0Nyw0LjA1M3YxMjUuODY3bC02NC0yMS4zMzNWMjM4Ljg2NmwxMzguNTYsNDYuMTUxVjMzOS43Mzd6IE0zMjAuMDAyLDI2Mi41MTFsLTEzOC42NjctNDYuMTg3DQoJCQlWMjUuNDk3bDEzOC42NjcsNDYuMTg3VjI2Mi41MTF6IE0zNDEuMzM1LDE3OS4wOTdsNjQtMjEuNjUzdjgzLjczM2wtNjQsMjEuMzMzVjE3OS4wOTd6IE00ODAuMDAyLDQyOS42NTdsLTEzOC42NjcsNDYuMTg3DQoJCQlWMjg1LjAxN2wxMzguNjY3LTQ2LjE4N1Y0MjkuNjU3eiBNNDgwLjAwMiwyMTYuMzI0bC01My4zMzMsMTcuODEzdi04My44NGw1My4zMzMtMTguMDI3VjIxNi4zMjR6IE00ODAuMDAyLDEwOS43NjQNCgkJCWwtMTM4LjY2Nyw0Ni44MjdWNzEuNjg0bDEzOC42NjctNDYuMTg3VjEwOS43NjR6Ii8+DQoJPC9nPg0KPC9nPg0KPC9zdmc+",Os="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pg0KPCEtLSBVcGxvYWRlZCB0bzogU1ZHIFJlcG8sIHd3dy5zdmdyZXBvLmNvbSwgR2VuZXJhdG9yOiBTVkcgUmVwbyBNaXhlciBUb29scyAtLT4NCjxzdmcgaGVpZ2h0PSI4MDBweCIgd2lkdGg9IjgwMHB4IiB2ZXJzaW9uPSIxLjEiIGlkPSJDYXBhXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIA0KCSB2aWV3Qm94PSIwIDAgNTMgNTMiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6IzQzQjA1QzsiIHBvaW50cz0iMTgsMjMuMjQzIDIuMjU2LDcuNDk5IDAsOCAwLDUxIDIuMDk5LDUwLjUzNCAxOCwzNC42MzIgIi8+DQo8cG9seWdvbiBzdHlsZT0iZmlsbDojNDhBMERDOyIgcG9pbnRzPSI5LjM3Miw0OC45MTcgMTgsNDcgMTgsNDAuMjg5ICIvPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6IzQzQjA1QzsiIHBvaW50cz0iMTgsNCA2Ljg4NCw2LjQ3IDE4LDE3LjU4NiAiLz4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiM0M0IwNUM7IiBwb2ludHM9IjQ5LjQ0OSwzLjE4NCAzNSw4IDM1LDE3LjYzMiAiLz4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiM0OEEwREM7IiBwb2ludHM9IjM1LDIzLjI4OSAzNSw1MCA1Myw0MyA1Myw1LjI4OSAiLz4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiMzRDk5NEY7IiBwb2ludHM9IjI2LjUyMywyNi4xMDkgMzUsMTcuNjMyIDM1LDggMTgsNCAxOCwxNy41ODYgIi8+DQo8cG9seWdvbiBzdHlsZT0iZmlsbDojM0Q5OTRGOyIgcG9pbnRzPSIxOCwyMy4yNDMgMTgsMzQuNjMyIDIzLjY5NSwyOC45MzggIi8+DQo8cG9seWdvbiBzdHlsZT0iZmlsbDojNDM5M0JGOyIgcG9pbnRzPSIxOCw0MC4yODkgMTgsNDcgMzUsNTAgMzUsMjMuMjg5ICIvPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6I0VGQ0U0QTsiIHBvaW50cz0iMTgsMTcuNTg2IDYuODg0LDYuNDcgMi4yNTYsNy40OTkgMTgsMjMuMjQzICIvPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6I0VGQ0U0QTsiIHBvaW50cz0iMTgsMzQuNjMyIDIuMDk5LDUwLjUzNCA5LjM3Miw0OC45MTcgMTgsNDAuMjg5ICIvPg0KPHBvbHlnb24gc3R5bGU9ImZpbGw6I0VGQ0U0QTsiIHBvaW50cz0iMzUsMjMuMjg5IDUzLDUuMjg5IDUzLDIgNDkuNDQ5LDMuMTg0IDM1LDE3LjYzMiAiLz4NCjxwb2x5Z29uIHN0eWxlPSJmaWxsOiNENkI0NDU7IiBwb2ludHM9IjI2LjUyMywyNi4xMDkgMTgsMTcuNTg2IDE4LDIzLjI0MyAyMy42OTUsMjguOTM4IDE4LDM0LjYzMiAxOCw0MC4yODkgMzUsMjMuMjg5IDM1LDE3LjYzMiANCgkiLz4NCjwvc3ZnPg==";tt.Edit.Circle=tt.Edit.CircleMarker.extend({_createResizeMarker:function(){var r=this._shape.getLatLng(),t=this._getResizeMarkerPoint(r);this._resizeMarkers=[],this._resizeMarkers.push(this._createMarker(t,this.options.resizeIcon))},_getResizeMarkerPoint:function(r){var t=this._shape._radius*Math.cos(Math.PI/4),e=this._map.project(r);return this._map.unproject([e.x+t,e.y-t])},_resize:function(r){var t=this._moveMarker.getLatLng(),e;tt.GeometryUtil.isVersion07x()?e=t.distanceTo(r):e=this._map.distance(t,r),this._shape.setRadius(e),this._map.fire(tt.Draw.Event.EDITRESIZE,{layer:this._shape})}});const G_=X.defineComponent({name:"MapView",props:{loadPolygon:Boolean,reverseCoordinatesPolygon:Boolean,dataPolygon:Object,configurationMap:Object,coordinatesMap:Array,getGeoJSON:Function,getCoodMarker:Function,isSatelite:Boolean},data(){return{idMap:"",mapRender:null,markerRender:null,renderCoordinates:this.coordinatesMap,renderGeojson:this.dataPolygon,markerIcon:{iconUrl:ms,iconSize:[25,41],iconAnchor:[12,41]},layersFeatureGroup:null,featuresData:null,currentTileLayer:null,isSatelliteView:!1}},mounted(){this.makeid(10),this.renderMap()},methods:{createSatelliteControl(){const r=tt.Control.extend({onAdd:t=>{const e=tt.DomUtil.create("div","leaflet-control-draw leaflet-bar leaflet-control"),n=tt.DomUtil.create("a","leaflet-draw-draw-satellite",e);return n.href="#",n.title=this.isSatelliteView?"Vista Normal":"Vista Satélite",n.style.backgroundImage=this.isSatelliteView?`url(${Ds})`:`url(${Os})`,n.style.backgroundPosition="center",n.style.backgroundRepeat="no-repeat",n.style.backgroundSize="20px 20px",tt.DomEvent.disableClickPropagation(n),tt.DomEvent.on(n,"click",this.toggleSatelliteView,this),e}});return new r({position:"topleft"})},toggleSatelliteView(){if(!this.mapRender||!this.currentTileLayer)return;this.isSatelliteView=!this.isSatelliteView,this.mapRender.removeLayer(this.currentTileLayer),this.isSatelliteView?this.currentTileLayer=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):this.currentTileLayer=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),this.currentTileLayer.addTo(this.mapRender),document.querySelectorAll(".leaflet-draw-draw-satellite").forEach(t=>{const e=t;e.style.backgroundImage=this.isSatelliteView?`url(${Ds})`:`url(${Os})`,e.title=this.isSatelliteView?"Vista Normal":"Vista Satélite"})},getLayersFeaturesInGeoJson(){const r=tt.geoJSON().addTo(this.mapRender);return this.featuresData.eachLayer(e=>{r.addLayer(e)}),[r.toGeoJSON()]},triggerSaveEdit(){var t,e,n;(n=(e=(t=(document.getElementsByClassName("leaflet-draw-actions leaflet-draw-actions-top")||document.getElementsByClassName("leaflet-draw-actions leaflet-draw-actions-top leaflet-draw-actions-bottom"))[0])==null?void 0:t.querySelector("li"))==null?void 0:e.querySelector("a"))==null||n.click()},makeid(r){let t="";const e="abcdefghijklmnopqrstuvwxyz",n=e.length;let i=0;for(;i<r;)t+=e.charAt(Math.floor(Math.random()*n)),i+=1;this.idMap=t},renderMap(){Tp("es"),setTimeout(()=>{this.loadPolygon?this.viewMap():this.createMap()},500)},createMap(){var a,h,c,d,f,p,m,v,E,C;const r=this.configurationMap?this.configurationMap.iconMarker?this.configurationMap.iconMarker:this.markerIcon:this.markerIcon;window.type=!0;const t=tt.map(this.idMap,{fullscreenControl:!0}).setView([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],this.renderCoordinates?this.renderCoordinates[2]:0);if(this.mapRender=t,this.isSatelliteView=this.isSatelite||!1,this.isSatelliteView?this.currentTileLayer=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):this.currentTileLayer=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),this.currentTileLayer.addTo(t),this.isSatelite!==void 0){const M=this.createSatelliteControl();t.addControl(M)}if(t.setZoom((a=this.configurationMap)==null?void 0:a.maxZoom),this.configurationMap.renderMarker){const M=tt.marker([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],{icon:tt.icon(r),draggable:this.configurationMap.dragMarker}).addTo(t);this.markerRender=M,this.getCoodMarker&&M.on("dragend",S=>{const y=S.target.getLatLng(),x=y.lat,b=y.lng;this.getCoodMarker&&this.getCoodMarker(x,b)})}const e=tt.featureGroup();this.featuresData=e;const n=e.addTo(t);let i={featureGroup:n,edit:!1,remove:(h=this.configurationMap)==null?void 0:h.editFigures.remove};(c=this.configurationMap)!=null&&c.editFigures.edit&&(i={featureGroup:n,...(d=this.configurationMap)==null?void 0:d.editFigures.edit,remove:(f=this.configurationMap)==null?void 0:f.editFigures.remove});const s=new tt.Control.Draw({position:"topleft",draw:{polygon:(p=this.configurationMap)==null?void 0:p.createFigures.polygon,circle:!1,rectangle:(m=this.configurationMap)!=null&&m.createFigures.rectangle?{shapeOptions:{color:"blue"}}:!1,marker:(v=this.configurationMap)!=null&&v.createFigures.marker?{icon:tt.icon(r)}:!1,polyline:(E=this.configurationMap)!=null&&E.createFigures.polyline?{shapeOptions:{color:"blue"}}:!1,circlemarker:(C=this.configurationMap)==null?void 0:C.createFigures.multipoint},edit:i});t.addControl(s),t.on("draw:created",M=>{var x,b,T,k,R,I,z,G,j,W,Y,$,K,V,Z;const S=M.layer;n.addLayer(S);let y=S.toGeoJSON();M.layerType==="circlemarker"&&(y={type:"Feature",geometry:{type:"MultiPoint",coordinates:[y.geometry.coordinates]},properties:{...y.properties,pointType:"multipoint",style:{color:((T=(b=(x=this.configurationMap)==null?void 0:x.createFigures)==null?void 0:b.multipoint)==null?void 0:T.color)||"green",fillColor:((I=(R=(k=this.configurationMap)==null?void 0:k.createFigures)==null?void 0:R.multipoint)==null?void 0:I.fillColor)||"green",fillOpacity:((j=(G=(z=this.configurationMap)==null?void 0:z.createFigures)==null?void 0:G.multipoint)==null?void 0:j.fillOpacity)||.8,radius:(($=(Y=(W=this.configurationMap)==null?void 0:W.createFigures)==null?void 0:Y.multipoint)==null?void 0:$.radius)||6,weight:((Z=(V=(K=this.configurationMap)==null?void 0:K.createFigures)==null?void 0:V.multipoint)==null?void 0:Z.weight)||2}}}),this.getGeoJSON&&this.getGeoJSON([y])}),t.on("draw:edited",M=>{M.layers.eachLayer(y=>{const x=y.toGeoJSON();this.getGeoJSON&&this.getGeoJSON([x])})})},viewMap(){var h,c,d,f,p,m,v,E,C,M;const r=this.configurationMap?this.configurationMap.iconMarker?this.configurationMap.iconMarker:this.markerIcon:this.markerIcon;window.type=!0;const t=tt.map(this.idMap,{fullscreenControl:!0}).setView([this.renderCoordinates?this.renderCoordinates[0]:0,this.renderCoordinates?this.renderCoordinates[1]:0],this.renderCoordinates?this.renderCoordinates[2]:0);if(this.mapRender=t,this.isSatelliteView=this.isSatelite||!1,this.isSatelliteView?this.currentTileLayer=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):this.currentTileLayer=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),this.currentTileLayer.addTo(t),this.isSatelite!==void 0){const S=this.createSatelliteControl();t.addControl(S)}t.setZoom((h=this.configurationMap)==null?void 0:h.maxZoom);const e=tt.featureGroup();this.featuresData=e;const n=e.addTo(t);let i={featureGroup:n,edit:!1,remove:(c=this.configurationMap)==null?void 0:c.editFigures.remove};(d=this.configurationMap)!=null&&d.editFigures.edit&&(i={featureGroup:n,...(f=this.configurationMap)==null?void 0:f.editFigures.edit,remove:(p=this.configurationMap)==null?void 0:p.editFigures.remove});const s=this.renderGeojson;if(s&&s.length){s.forEach(y=>{if(y.type==="FeatureCollection")y.features.forEach(x=>{if(x.geometry.type==="Polygon"||x.geometry.type==="MultiPolygon"||x.geometry.type==="LineString"||x.geometry.type==="MultiLineString"||x.geometry.type==="Point"){const b=this;tt.geoJson(x,{pointToLayer:this.getPointToLayer.bind(this),onEachFeature:function(T,k){if(n.addLayer(k),T.geometry.type==="Point"){var R=b.getPopupContent(T);k.bindPopup(R)}else if(T.geometry.type==="Polygon"||T.geometry.type==="MultiPolygon"){var I=b.getPolygonTooltipContent(T);k.bindPopup(I)}}})}});else if(y.type==="Feature"&&(y.geometry.type==="Polygon"||y.geometry.type==="MultiPolygon"||y.geometry.type==="LineString"||y.geometry.type==="MultiLineString"||y.geometry.type==="Point"||y.geometry.type==="MultiPoint")){const x=this;tt.geoJson(y,{onEachFeature:function(b,T){if(n.addLayer(T),b.geometry.type==="Point"){var k=x.getPopupContent(b);T.bindPopup(k)}else if(b.geometry.type==="Polygon"||b.geometry.type==="MultiPolygon"){var R=x.getPolygonTooltipContent(b);T.bindPopup(R)}}})}});const S=n.getBounds();t.fitBounds(S)}const a=new tt.Control.Draw({position:"topleft",draw:{polygon:(m=this.configurationMap)==null?void 0:m.createFigures.polygon,circle:!1,rectangle:(v=this.configurationMap)!=null&&v.createFigures.rectangle?{shapeOptions:{color:"blue"}}:!1,marker:(E=this.configurationMap)!=null&&E.createFigures.marker?{icon:tt.icon(r)}:!1,polyline:(C=this.configurationMap)!=null&&C.createFigures.polyline?{shapeOptions:{color:"blue"}}:!1,circlemarker:(M=this.configurationMap)==null?void 0:M.createFigures.multipoint},edit:i});t.addControl(a),t.on("draw:created",S=>{var b,T,k,R,I,z,G,j,W,Y,$,K,V,Z,U;const y=S.layer;n.addLayer(y);let x=y.toGeoJSON();S.layerType==="circlemarker"&&(x={type:"Feature",geometry:{type:"MultiPoint",coordinates:[x.geometry.coordinates]},properties:{...x.properties,pointType:"multipoint",style:{color:((k=(T=(b=this.configurationMap)==null?void 0:b.createFigures)==null?void 0:T.multipoint)==null?void 0:k.color)||"green",fillColor:((z=(I=(R=this.configurationMap)==null?void 0:R.createFigures)==null?void 0:I.multipoint)==null?void 0:z.fillColor)||"green",fillOpacity:((W=(j=(G=this.configurationMap)==null?void 0:G.createFigures)==null?void 0:j.multipoint)==null?void 0:W.fillOpacity)||.8,radius:((K=($=(Y=this.configurationMap)==null?void 0:Y.createFigures)==null?void 0:$.multipoint)==null?void 0:K.radius)||6,weight:((U=(Z=(V=this.configurationMap)==null?void 0:V.createFigures)==null?void 0:Z.multipoint)==null?void 0:U.weight)||2}}}),this.getGeoJSON&&this.getGeoJSON(x)}),t.on("draw:edited",S=>{S.layers.eachLayer(x=>{const b=x.toGeoJSON();this.getGeoJSON&&this.getGeoJSON(b)})})},getPointToLayer(r,t){var n,i;if(((n=r.geometry)==null?void 0:n.type)==="Point"){const s=(i=r.properties)==null?void 0:i.tipo,a=tt.icon({iconUrl:np,iconSize:[38,38],iconAnchor:[16,41]}),h=tt.icon({iconUrl:rp,iconSize:[38,38],iconAnchor:[16,41]});let d=tt.icon({iconUrl:sp,iconSize:[38,38],iconAnchor:[16,41]});return s===0?d=a:s===1&&(d=h),tt.marker(t,{icon:d})}return tt.marker(t)},async searchAddress(r){const t=await Ac.get(location.protocol+"//nominatim.openstreetmap.org/search?",{params:{q:r,limit:1,format:"json"}});if(t.data.length===1){const e=parseFloat(t.data[0].lat),i={lng:parseFloat(t.data[0].lon),lat:e};return this.setCoordinates({...i,moveMarker:!0}),t.data[0]}return t.data},setCoordinates({lat:r,lng:t}){if(this.mapRender){const e=tt.latLng(r,t);this.mapRender.panTo(e,{animate:!0,duration:.5})}},getPopupContent(r){const t=r.properties||{},e=t.descripcion||"",n=t.fechaHoraLlegada||"",i=t.fotoId||"";let s="";if(n){const h=new Date(n),c=d=>d.toString().padStart(2,"0");s=`${c(h.getDate())}-${c(h.getMonth()+1)}-${h.getFullYear()} ${c(h.getHours())}:${c(h.getMinutes())}:${c(h.getSeconds())}`}let a="<div>";return i&&(a+=`<img src="${i}" style="width: 200px; height: auto; margin-bottom: 5px;"><br>`),a+=`<b>Descripción:</b> ${e}<br>`,s&&(a+=`<b>Fecha Hora Llegada:</b> ${s}<br>`),a+="</div>",a},getPolygonTooltipContent(r){const t=r.properties||{};return`<div style="font-weight: bold; padding: 5px;">${t.descripcion||t.name||"Sin descripción"}</div>`}},watch:{coordinatesMap(r){if(this.renderCoordinates=r,this.mapRender&&this.markerRender){const t=tt.latLng([r[0],r[1]]);this.mapRender.setView([r[0],r[1]],r[2]),this.markerRender.setLatLng(t)}},dataPolygon(r){this.renderGeojson=r}}}),U_=["id"];function j_(r,t,e,n,i,s){var a;return X.openBlock(),X.createElementBlock("div",{class:"map-container",style:X.normalizeStyle(`height:${(a=r.configurationMap)==null?void 0:a.height}`)},[X.createElementVNode("div",{id:r.idMap,style:{height:"100%"}},null,8,U_)],4)}const Z_=ma(G_,[["render",j_]]),W_=["id"],H_=X.defineComponent({__name:"MapSearchAddress",props:{configurationMap:{default:()=>({height:"250px",maxZoom:20,iconMarker:{iconUrl:ms,iconSize:[25,41],iconAnchor:[12,41],class:"",type:"image"},dragMarker:!0})},coordinatesMap:{default:()=>({lat:-19.0429,lng:-65.2554,zoom:12})},isSatelite:{type:Boolean}},emits:["updated:coordsMarker"],setup(r,{expose:t,emit:e}){const n=r,i=X.ref(),s=X.ref(n.coordinatesMap),a=X.ref(),h=X.ref(),c=X.ref(null),d=X.ref(!1);X.onMounted(async()=>{await f(10),await p()});const f=async y=>{let x="";const b="abcdefghijklmnopqrstuvwxyz",T=b.length;let k=0;for(;k<y;)x+=b.charAt(Math.floor(Math.random()*T)),k+=1;i.value=x},p=async()=>{await m()},m=async()=>{var b,T;const y=(b=n.configurationMap)==null?void 0:b.iconMarker,x=tt.map(i.value,{fullscreenControl:!0}).setView([s.value.lat,s.value.lng],s.value.zoom);if(x.invalidateSize(),a.value=x,d.value=n.isSatelite||!1,d.value?c.value=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):c.value=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:(T=n.configurationMap)==null?void 0:T.maxZoom,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),c.value.addTo(x),n.isSatelite!==void 0){const k=v();x.addControl(k)}if(y.type==="image"){const k=tt.marker([s.value.lat,s.value.lng],{icon:tt.icon({iconUrl:y.iconUrl,iconAnchor:y.iconAnchor,iconSize:y.iconSize,className:y.class}),draggable:n.configurationMap.dragMarker}).addTo(x);h.value=k,k.on("dragend",R=>{const I=R.target.getLatLng(),z=I.lat,G=I.lng;M({lat:z,lng:G})})}else if(y.type==="svg"){const k=tt.marker([s.value.lat,s.value.lng],{icon:tt.divIcon({html:y.iconUrl,iconAnchor:y.iconAnchor,iconSize:y.iconSize,className:y.class}),draggable:n.configurationMap.dragMarker}).addTo(x);h.value=k,k.on("dragend",R=>{const I=R.target.getLatLng(),z=I.lat,G=I.lng;M({lat:z,lng:G})})}},v=()=>{const y=tt.Control.extend({onAdd:x=>{const b=tt.DomUtil.create("div","leaflet-control-draw leaflet-bar leaflet-control"),T=tt.DomUtil.create("a","leaflet-draw-draw-satellite",b);return T.href="#",T.title=d.value?"Vista Normal":"Vista Satélite",T.style.backgroundImage=d.value?`url(${Ds})`:`url(${Os})`,T.style.backgroundPosition="center",T.style.backgroundRepeat="no-repeat",T.style.backgroundSize="20px 20px",tt.DomEvent.disableClickPropagation(T),tt.DomEvent.on(T,"click",E),b}});return new y({position:"topleft"})},E=()=>{if(!a.value||!c.value)return;d.value=!d.value,a.value.removeLayer(c.value),d.value?c.value=tt.tileLayer("https://api.maptiler.com/maps/satellite/{z}/{x}/{y}.jpg?key=t8mWT2ozs1JWBqMZOnZr",{attribution:'&copy; <a href="https://www.maptiler.com/">MapTiler</a> &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}):c.value=tt.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'}),c.value.addTo(a.value),document.querySelectorAll(".leaflet-draw-draw-satellite").forEach(x=>{const b=x;b.style.backgroundImage=d.value?`url(${Ds})`:`url(${Os})`,b.title=d.value?"Vista Normal":"Vista Satélite"})},C=async y=>{const x=await Ac.get(location.protocol+"//nominatim.openstreetmap.org/search?",{params:{q:y,limit:1,format:"json"}});if(x.data.length===1){const b=parseFloat(x.data[0].lat),k={lng:parseFloat(x.data[0].lon),lat:b};return M({...k,moveMarker:!0}),x.data[0]}return x.data},M=({lat:y,lng:x,moveMarker:b=!1})=>{var T;e("updated:coordsMarker",{lat:y,lng:x}),b&&((T=h.value)==null||T.setLatLng({lat:y,lng:x})),S({lat:y,lng:x})},S=({lat:y,lng:x})=>{const b=tt.latLng(y,x);a.value.panTo(b,{animate:!0,duration:.5})};return t({searchAddress:C}),(y,x)=>{var b;return X.openBlock(),X.createElementBlock("div",{class:"map-container",style:X.normalizeStyle(`height:${(b=y.configurationMap)==null?void 0:b.height}`)},[X.createElementVNode("div",{id:i.value,style:{height:"100%"}},null,8,W_)],4)}}}),ob="";class V_{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}}const ai=V_,An={PROPERTYCHANGE:"propertychange"};class X_{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}}const Fs=X_;function Y_(r,t,e){let n,i;e=e||Pi;let s=0,a=r.length,h=!1;for(;s<a;)n=s+(a-s>>1),i=+e(r[n],t),i<0?s=n+1:(a=n,h=!i);return h?s:~s}function Pi(r,t){return r>t?1:r<t?-1:0}function Ra(r,t,e){if(r[0]<=t)return 0;const n=r.length;if(t<=r[n-1])return n-1;if(typeof e=="function"){for(let i=1;i<n;++i){const s=r[i];if(s===t)return i;if(s<t)return e(t,r[i-1],s)>0?i-1:i}return n-1}if(e>0){for(let i=1;i<n;++i)if(r[i]<t)return i-1;return n-1}if(e<0){for(let i=1;i<n;++i)if(r[i]<=t)return i;return n-1}for(let i=1;i<n;++i){if(r[i]==t)return i;if(r[i]<t)return r[i-1]-t<t-r[i]?i-1:i}return n-1}function K_(r,t,e){for(;t<e;){const n=r[t];r[t]=r[e],r[e]=n,++t,--e}}function He(r,t){const e=Array.isArray(t)?t:[t],n=e.length;for(let i=0;i<n;i++)r[r.length]=e[i]}function li(r,t){const e=r.length;if(e!==t.length)return!1;for(let n=0;n<e;n++)if(r[n]!==t[n])return!1;return!0}function q_(r,t,e){const n=t||Pi;return r.every(function(i,s){if(s===0)return!0;const a=n(r[s-1],i);return!(a>0||e&&a===0)})}function Lr(){return!0}function zs(){return!1}function In(){}function Ic(r){let t=!1,e,n,i;return function(){const s=Array.prototype.slice.call(arguments);return(!t||this!==i||!li(s,n))&&(t=!0,i=this,n=s,e=r.apply(this,arguments)),e}}function Dn(r){for(const t in r)delete r[t]}function on(r){let t;for(t in r)return!1;return!t}class J_ extends Fs{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const n=this.listeners_||(this.listeners_={}),i=n[t]||(n[t]=[]);i.includes(e)||i.push(e)}dispatchEvent(t){const e=typeof t=="string",n=e?t:t.type,i=this.listeners_&&this.listeners_[n];if(!i)return;const s=e?new ai(t):t;s.target||(s.target=this.eventTarget_||this);const a=this.dispatching_||(this.dispatching_={}),h=this.pendingRemovals_||(this.pendingRemovals_={});n in a||(a[n]=0,h[n]=0),++a[n];let c;for(let d=0,f=i.length;d<f;++d)if("handleEvent"in i[d]?c=i[d].handleEvent(s):c=i[d].call(this,s),c===!1||s.propagationStopped){c=!1;break}if(--a[n]===0){let d=h[n];for(delete h[n];d--;)this.removeEventListener(n,In);delete a[n]}return c}disposeInternal(){this.listeners_&&Dn(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!1}removeEventListener(t,e){if(!this.listeners_)return;const n=this.listeners_[t];if(!n)return;const i=n.indexOf(e);i!==-1&&(this.pendingRemovals_&&t in this.pendingRemovals_?(n[i]=In,++this.pendingRemovals_[t]):(n.splice(i,1),n.length===0&&delete this.listeners_[t]))}}const Ns=J_,ct={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function gt(r,t,e,n,i){if(n&&n!==r&&(e=e.bind(n)),i){const a=e;e=function(){r.removeEventListener(t,e),a.apply(this,arguments)}}const s={target:r,type:t,listener:e};return r.addEventListener(t,e),s}function Bs(r,t,e,n){return gt(r,t,e,n,!0)}function Tt(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Dn(r))}class Gs extends Ns{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(ct.CHANGE)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const n=t.length,i=new Array(n);for(let s=0;s<n;++s)i[s]=gt(this,t[s],e);return i}return gt(this,t,e)}onceInternal(t,e){let n;if(Array.isArray(t)){const i=t.length;n=new Array(i);for(let s=0;s<i;++s)n[s]=Bs(this,t[s],e)}else n=Bs(this,t,e);return e.ol_key=n,n}unInternal(t,e){const n=e.ol_key;if(n)Q_(n);else if(Array.isArray(t))for(let i=0,s=t.length;i<s;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}Gs.prototype.on,Gs.prototype.once,Gs.prototype.un;function Q_(r){if(Array.isArray(r))for(let t=0,e=r.length;t<e;++t)Tt(r[t]);else Tt(r)}const Dc=Gs;function ot(){throw new Error("Unimplemented abstract method.")}let $_=0;function dt(r){return r.ol_uid||(r.ol_uid=String(++$_))}class Oc extends ai{constructor(t,e,n){super(t),this.key=e,this.oldValue=n}}class tm extends Dc{constructor(t){super(),this.on,this.once,this.un,dt(this),this.values_=null,t!==void 0&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}hasProperties(){return!!this.values_}notify(t,e){let n;n=`change:${t}`,this.hasListener(n)&&this.dispatchEvent(new Oc(n,t,e)),n=An.PROPERTYCHANGE,this.hasListener(n)&&this.dispatchEvent(new Oc(n,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,n){const i=this.values_||(this.values_={});if(n)i[t]=e;else{const s=i[t];i[t]=e,s!==e&&this.notify(t,s)}}setProperties(t,e){for(const n in t)this.set(n,t[n],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const n=this.values_[t];delete this.values_[t],on(this.values_)&&(this.values_=null),e||this.notify(t,n)}}}const Re=tm,Zt={ANIMATING:0,INTERACTING:1},Ae={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},em=42,Aa=256,br={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};class im{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||br[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}}const Fc=im,Cr=6378137,On=Math.PI*Cr,nm=[-On,-On,On,On],rm=[-180,-85,180,85],Us=Cr*Math.log(Math.tan(Math.PI/2));class Fn extends Fc{constructor(t){super({code:t,units:"m",extent:nm,global:!0,worldExtent:rm,getPointResolution:function(e,n){return e/Math.cosh(n[1]/Cr)}})}}const zc=[new Fn("EPSG:3857"),new Fn("EPSG:102100"),new Fn("EPSG:102113"),new Fn("EPSG:900913"),new Fn("http://www.opengis.net/def/crs/EPSG/0/3857"),new Fn("http://www.opengis.net/gml/srs/epsg.xml#3857")];function sm(r,t,e){const n=r.length;e=e>1?e:2,t===void 0&&(e>2?t=r.slice():t=new Array(n));for(let i=0;i<n;i+=e){t[i]=On*r[i]/180;let s=Cr*Math.log(Math.tan(Math.PI*(+r[i+1]+90)/360));s>Us?s=Us:s<-Us&&(s=-Us),t[i+1]=s}return t}function om(r,t,e){const n=r.length;e=e>1?e:2,t===void 0&&(e>2?t=r.slice():t=new Array(n));for(let i=0;i<n;i+=e)t[i]=180*r[i]/On,t[i+1]=360*Math.atan(Math.exp(r[i+1]/Cr))/Math.PI-90;return t}const am=6378137,Nc=[-180,-90,180,90],lm=Math.PI*am/180;class an extends Fc{constructor(t,e){super({code:t,units:"degrees",extent:Nc,axisOrientation:e,global:!0,metersPerUnit:lm,worldExtent:Nc})}}const Bc=[new an("CRS:84"),new an("EPSG:4326","neu"),new an("urn:ogc:def:crs:OGC:1.3:CRS84"),new an("urn:ogc:def:crs:OGC:2:84"),new an("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new an("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new an("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let Ia={};function hm(r){return Ia[r]||Ia[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function cm(r,t){Ia[r]=t}let zn={};function js(r,t,e){const n=r.getCode(),i=t.getCode();n in zn||(zn[n]={}),zn[n][i]=e}function um(r,t){let e;return r in zn&&t in zn[r]&&(e=zn[r][t]),e}const Wt={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Gc(r){const t=xe();for(let e=0,n=r.length;e<n;++e)Mr(t,r[e]);return t}function Zs(r,t,e){return e?(e[0]=r[0]-t,e[1]=r[1]-t,e[2]=r[2]+t,e[3]=r[3]+t,e):[r[0]-t,r[1]-t,r[2]+t,r[3]+t]}function Uc(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r.slice()}function ln(r,t,e){let n,i;return t<r[0]?n=r[0]-t:r[2]<t?n=t-r[2]:n=0,e<r[1]?i=r[1]-e:r[3]<e?i=e-r[3]:i=0,n*n+i*i}function Ws(r,t){return Da(r,t[0],t[1])}function hn(r,t){return r[0]<=t[0]&&t[2]<=r[2]&&r[1]<=t[1]&&t[3]<=r[3]}function Da(r,t,e){return r[0]<=t&&t<=r[2]&&r[1]<=e&&e<=r[3]}function Oa(r,t){const e=r[0],n=r[1],i=r[2],s=r[3],a=t[0],h=t[1];let c=Wt.UNKNOWN;return a<e?c=c|Wt.LEFT:a>i&&(c=c|Wt.RIGHT),h<n?c=c|Wt.BELOW:h>s&&(c=c|Wt.ABOVE),c===Wt.UNKNOWN&&(c=Wt.INTERSECTING),c}function xe(){return[1/0,1/0,-1/0,-1/0]}function ki(r,t,e,n,i){return i?(i[0]=r,i[1]=t,i[2]=e,i[3]=n,i):[r,t,e,n]}function Tr(r){return ki(1/0,1/0,-1/0,-1/0,r)}function jc(r,t){const e=r[0],n=r[1];return ki(e,n,e,n,t)}function Fa(r,t,e,n,i){const s=Tr(i);return Wc(s,r,t,e,n)}function Nn(r,t){return r[0]==t[0]&&r[2]==t[2]&&r[1]==t[1]&&r[3]==t[3]}function Zc(r,t){return t[0]<r[0]&&(r[0]=t[0]),t[2]>r[2]&&(r[2]=t[2]),t[1]<r[1]&&(r[1]=t[1]),t[3]>r[3]&&(r[3]=t[3]),r}function Mr(r,t){t[0]<r[0]&&(r[0]=t[0]),t[0]>r[2]&&(r[2]=t[0]),t[1]<r[1]&&(r[1]=t[1]),t[1]>r[3]&&(r[3]=t[1])}function Wc(r,t,e,n,i){for(;e<n;e+=i)dm(r,t[e],t[e+1]);return r}function dm(r,t,e){r[0]=Math.min(r[0],t),r[1]=Math.min(r[1],e),r[2]=Math.max(r[2],t),r[3]=Math.max(r[3],e)}function Hc(r,t){let e;return e=t(Hs(r)),e||(e=t(Vs(r)),e)||(e=t(Xs(r)),e)||(e=t(cn(r)),e)?e:!1}function za(r){let t=0;return Ys(r)||(t=Mt(r)*we(r)),t}function Hs(r){return[r[0],r[1]]}function Vs(r){return[r[2],r[1]]}function Ri(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function fm(r,t){let e;if(t==="bottom-left")e=Hs(r);else if(t==="bottom-right")e=Vs(r);else if(t==="top-left")e=cn(r);else if(t==="top-right")e=Xs(r);else throw new Error("Invalid corner");return e}function Na(r,t,e,n,i){const[s,a,h,c,d,f,p,m]=Ba(r,t,e,n);return ki(Math.min(s,h,d,p),Math.min(a,c,f,m),Math.max(s,h,d,p),Math.max(a,c,f,m),i)}function Ba(r,t,e,n){const i=t*n[0]/2,s=t*n[1]/2,a=Math.cos(e),h=Math.sin(e),c=i*a,d=i*h,f=s*a,p=s*h,m=r[0],v=r[1];return[m-c+p,v-d-f,m-c-p,v-d+f,m+c-p,v+d+f,m+c+p,v+d-f,m-c+p,v-d-f]}function we(r){return r[3]-r[1]}function Sr(r,t,e){const n=e||xe();return ce(r,t)?(r[0]>t[0]?n[0]=r[0]:n[0]=t[0],r[1]>t[1]?n[1]=r[1]:n[1]=t[1],r[2]<t[2]?n[2]=r[2]:n[2]=t[2],r[3]<t[3]?n[3]=r[3]:n[3]=t[3]):Tr(n),n}function cn(r){return[r[0],r[3]]}function Xs(r){return[r[2],r[3]]}function Mt(r){return r[2]-r[0]}function ce(r,t){return r[0]<=t[2]&&r[2]>=t[0]&&r[1]<=t[3]&&r[3]>=t[1]}function Ys(r){return r[2]<r[0]||r[3]<r[1]}function gm(r,t){return t?(t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t):r}function pm(r,t,e){let n=!1;const i=Oa(r,t),s=Oa(r,e);if(i===Wt.INTERSECTING||s===Wt.INTERSECTING)n=!0;else{const a=r[0],h=r[1],c=r[2],d=r[3],f=t[0],p=t[1],m=e[0],v=e[1],E=(v-p)/(m-f);let C,M;s&Wt.ABOVE&&!(i&Wt.ABOVE)&&(C=m-(v-d)/E,n=C>=a&&C<=c),!n&&s&Wt.RIGHT&&!(i&Wt.RIGHT)&&(M=v-(m-c)*E,n=M>=h&&M<=d),!n&&s&Wt.BELOW&&!(i&Wt.BELOW)&&(C=m-(v-h)/E,n=C>=a&&C<=c),!n&&s&Wt.LEFT&&!(i&Wt.LEFT)&&(M=v-(m-a)*E,n=M>=h&&M<=d)}return n}function Vc(r,t){const e=t.getExtent(),n=Ri(r);if(t.canWrapX()&&(n[0]<e[0]||n[0]>=e[2])){const i=Mt(e),a=Math.floor((n[0]-e[0])/i)*i;r[0]-=a,r[2]-=a}return r}function _m(r,t){if(t.canWrapX()){const e=t.getExtent();if(!isFinite(r[0])||!isFinite(r[2]))return[[e[0],r[1],e[2],r[3]]];Vc(r,t);const n=Mt(e);if(Mt(r)>n)return[[e[0],r[1],e[2],r[3]]];if(r[0]<e[0])return[[r[0]+n,r[1],e[2],r[3]],[e[0],r[1],r[2],r[3]]];if(r[2]>e[2])return[[r[0],r[1],e[2],r[3]],[e[0],r[1],r[2]-n,r[3]]]}return[r]}function Dt(r,t,e){return Math.min(Math.max(r,t),e)}function mm(r,t,e,n,i,s){const a=i-e,h=s-n;if(a!==0||h!==0){const c=((r-e)*a+(t-n)*h)/(a*a+h*h);c>1?(e=i,n=s):c>0&&(e+=a*c,n+=h*c)}return un(r,t,e,n)}function un(r,t,e,n){const i=e-r,s=n-t;return i*i+s*s}function ym(r){const t=r.length;for(let n=0;n<t;n++){let i=n,s=Math.abs(r[n][n]);for(let h=n+1;h<t;h++){const c=Math.abs(r[h][n]);c>s&&(s=c,i=h)}if(s===0)return null;const a=r[i];r[i]=r[n],r[n]=a;for(let h=n+1;h<t;h++){const c=-r[h][n]/r[n][n];for(let d=n;d<t+1;d++)n==d?r[h][d]=0:r[h][d]+=c*r[n][d]}}const e=new Array(t);for(let n=t-1;n>=0;n--){e[n]=r[n][t]/r[n][n];for(let i=n-1;i>=0;i--)r[i][t]-=r[i][n]*e[n]}return e}function Ks(r){return r*Math.PI/180}function Bn(r,t){const e=r%t;return e*t<0?e+t:e}function Ee(r,t,e){return r+e*(t-r)}function Ga(r,t){const e=Math.pow(10,t);return Math.round(r*e)/e}function qs(r,t){return Math.floor(Ga(r,t))}function Js(r,t){return Math.ceil(Ga(r,t))}function vm(r,t){return r[0]+=+t[0],r[1]+=+t[1],r}function Qs(r,t){let e=!0;for(let n=r.length-1;n>=0;--n)if(r[n]!=t[n]){e=!1;break}return e}function Ua(r,t){const e=Math.cos(t),n=Math.sin(t),i=r[0]*e-r[1]*n,s=r[1]*e+r[0]*n;return r[0]=i,r[1]=s,r}function xm(r,t){return r[0]*=t,r[1]*=t,r}function Xc(r,t){if(t.canWrapX()){const e=Mt(t.getExtent()),n=wm(r,t,e);n&&(r[0]-=n*e)}return r}function wm(r,t,e){const n=t.getExtent();let i=0;return t.canWrapX()&&(r[0]<n[0]||r[0]>n[2])&&(e=e||Mt(n),i=Math.floor((r[0]-n[0])/e)),i}const Em=63710088e-1;function Yc(r,t,e){e=e||Em;const n=Ks(r[1]),i=Ks(t[1]),s=(i-n)/2,a=Ks(t[0]-r[0])/2,h=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(i);return 2*e*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}const Kc={info:1,warn:2,error:3,none:4};let Lm=Kc.info;function qc(...r){Lm>Kc.warn||console.warn(...r)}let ja=!0;function Jc(r){ja=!(r===void 0?!0:r)}function Za(r,t){if(t!==void 0){for(let e=0,n=r.length;e<n;++e)t[e]=r[e];t=t}else t=r.slice();return t}function Qc(r,t){if(t!==void 0&&r!==t){for(let e=0,n=r.length;e<n;++e)t[e]=r[e];r=t}return r}function bm(r){cm(r.getCode(),r),js(r,r,Za)}function Cm(r){r.forEach(bm)}function zt(r){return typeof r=="string"?hm(r):r||null}function $c(r,t,e,n){r=zt(r);let i;const s=r.getPointResolutionFunc();if(s){if(i=s(t,e),n&&n!==r.getUnits()){const a=r.getMetersPerUnit();a&&(i=i*a/br[n])}}else{const a=r.getUnits();if(a=="degrees"&&!n||n=="degrees")i=t;else{const h=Ha(r,zt("EPSG:4326"));if(h===Qc&&a!=="degrees")i=t*r.getMetersPerUnit();else{let d=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];d=h(d,d,2);const f=Yc(d.slice(0,2),d.slice(2,4)),p=Yc(d.slice(4,6),d.slice(6,8));i=(f+p)/2}const c=n?br[n]:r.getMetersPerUnit();c!==void 0&&(i/=c)}}return i}function tu(r){Cm(r),r.forEach(function(t){r.forEach(function(e){t!==e&&js(t,e,Za)})})}function Tm(r,t,e,n){r.forEach(function(i){t.forEach(function(s){js(i,s,e),js(s,i,n)})})}function Wa(r,t){return r?typeof r=="string"?zt(r):r:zt(t)}function eu(r,t){return Jc(),iu(r,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function dn(r,t){if(r===t)return!0;const e=r.getUnits()===t.getUnits();return(r.getCode()===t.getCode()||Ha(r,t)===Za)&&e}function Ha(r,t){const e=r.getCode(),n=t.getCode();let i=um(e,n);return i||(i=Qc),i}function Pr(r,t){const e=zt(r),n=zt(t);return Ha(e,n)}function iu(r,t,e){return Pr(t,e)(r,void 0,r.length)}function Va(r,t){return r}function hi(r,t){return ja&&!Qs(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(ja=!1,qc("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function nu(r,t){return r}function fn(r,t){return r}function Mm(){tu(zc),tu(Bc),Tm(Bc,zc,sm,om)}Mm();function mt(r,t){if(!r)throw new Error(t)}function ru(r,t,e){return function(n,i,s,a,h){if(!n)return;if(!i&&!t)return n;const c=t?0:s[0]*i,d=t?0:s[1]*i,f=h?h[0]:0,p=h?h[1]:0;let m=r[0]+c/2+f,v=r[2]-c/2+f,E=r[1]+d/2+p,C=r[3]-d/2+p;m>v&&(m=(v+m)/2,v=m),E>C&&(E=(C+E)/2,C=E);let M=Dt(n[0],m,v),S=Dt(n[1],E,C);if(a&&e&&i){const y=30*i;M+=-y*Math.log(1+Math.max(0,m-n[0])/y)+y*Math.log(1+Math.max(0,n[0]-v)/y),S+=-y*Math.log(1+Math.max(0,E-n[1])/y)+y*Math.log(1+Math.max(0,n[1]-C)/y)}return[M,S]}}function Sm(r){return r}function Xa(r,t,e,n){const i=Mt(t)/e[0],s=we(t)/e[1];return n?Math.min(r,Math.max(i,s)):Math.min(r,Math.min(i,s))}function Ya(r,t,e){let n=Math.min(r,t);const i=50;return n*=Math.log(1+i*Math.max(0,r/t-1))/i+1,e&&(n=Math.max(n,e),n/=Math.log(1+i*Math.max(0,e/r-1))/i+1),Dt(n,e/2,t*2)}function Pm(r,t,e,n){return t=t!==void 0?t:!0,function(i,s,a,h){if(i!==void 0){const c=r[0],d=r[r.length-1],f=e?Xa(c,e,a,n):c;if(h)return t?Ya(i,f,d):Dt(i,d,f);const p=Math.min(f,i),m=Math.floor(Ra(r,p,s));return r[m]>f&&m<r.length-1?r[m+1]:r[m]}}}function km(r,t,e,n,i,s){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(a,h,c,d){if(a!==void 0){const f=i?Xa(t,i,c,s):t;if(d)return n?Ya(a,f,e):Dt(a,e,f);const p=1e-9,m=Math.ceil(Math.log(t/f)/Math.log(r)-p),v=-h*(.5-p)+.5,E=Math.min(f,a),C=Math.floor(Math.log(t/E)/Math.log(r)+v),M=Math.max(m,C),S=t/Math.pow(r,M);return Dt(S,e,f)}}}function su(r,t,e,n,i){return e=e!==void 0?e:!0,function(s,a,h,c){if(s!==void 0){const d=n?Xa(r,n,h,i):r;return!e||!c?Dt(s,t,d):Ya(s,d,t)}}}function Ka(r){if(r!==void 0)return 0}function ou(r){if(r!==void 0)return r}function Rm(r){const t=2*Math.PI/r;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function Am(r){const t=r===void 0?Ks(5):r;return function(e,n){return n||e===void 0?e:Math.abs(e)<=t?0:e}}function au(r){return Math.pow(r,3)}function Gn(r){return 1-au(1-r)}function Im(r){return 3*r*r-2*r*r*r}function Dm(r){return r}const Ai=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",Om=Ai.includes("firefox"),Fm=Ai.includes("safari")&&!Ai.includes("chrom")&&(Ai.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(Ai)),zm=Ai.includes("webkit")&&!Ai.includes("edge"),lu=Ai.includes("macintosh"),hu=typeof devicePixelRatio<"u"?devicePixelRatio:1,qa=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,cu=typeof Image<"u"&&Image.prototype.decode,uu=function(){let r=!1;try{const t=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,t),window.removeEventListener("_",null,t)}catch{}return r}(),Nm=new Array(6);function Ht(){return[1,0,0,1,0,0]}function du(r,t){const e=r[0],n=r[1],i=r[2],s=r[3],a=r[4],h=r[5],c=t[0],d=t[1],f=t[2],p=t[3],m=t[4],v=t[5];return r[0]=e*c+i*d,r[1]=n*c+s*d,r[2]=e*f+i*p,r[3]=n*f+s*p,r[4]=e*m+i*v+a,r[5]=n*m+s*v+h,r}function fu(r,t,e,n,i,s,a){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r[4]=s,r[5]=a,r}function Bm(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function Nt(r,t){const e=t[0],n=t[1];return t[0]=r[0]*e+r[2]*n+r[4],t[1]=r[1]*e+r[3]*n+r[5],t}function Gm(r,t,e){return fu(r,t,0,0,e,0,0)}function Um(r,t,e){return du(r,fu(Nm,1,0,0,1,t,e))}function Ie(r,t,e,n,i,s,a,h){const c=Math.sin(s),d=Math.cos(s);return r[0]=n*d,r[1]=i*c,r[2]=-n*c,r[3]=i*d,r[4]=a*n*d-h*n*c+t,r[5]=a*i*c+h*i*d+e,r}function $s(r,t){const e=jm(t);mt(e!==0,"Transformation matrix cannot be inverted");const n=t[0],i=t[1],s=t[2],a=t[3],h=t[4],c=t[5];return r[0]=a/e,r[1]=-i/e,r[2]=-s/e,r[3]=n/e,r[4]=(s*c-a*h)/e,r[5]=-(n*c-i*h)/e,r}function jm(r){return r[0]*r[3]-r[1]*r[2]}let gu;function pu(r){const t="matrix("+r.join(", ")+")";if(qa)return t;const e=gu||(gu=document.createElement("div"));return e.style.transform=t,e.style.transform}function Ii(r,t,e,n,i,s){s=s||[];let a=0;for(let h=t;h<e;h+=n){const c=r[h],d=r[h+1];s[a++]=i[0]*c+i[2]*d+i[4],s[a++]=i[1]*c+i[3]*d+i[5]}return s&&s.length!=a&&(s.length=a),s}function _u(r,t,e,n,i,s,a){a=a||[];const h=Math.cos(i),c=Math.sin(i),d=s[0],f=s[1];let p=0;for(let m=t;m<e;m+=n){const v=r[m]-d,E=r[m+1]-f;a[p++]=d+v*h-E*c,a[p++]=f+v*c+E*h;for(let C=m+2;C<m+n;++C)a[p++]=r[C]}return a&&a.length!=p&&(a.length=p),a}function Zm(r,t,e,n,i,s,a,h){h=h||[];const c=a[0],d=a[1];let f=0;for(let p=t;p<e;p+=n){const m=r[p]-c,v=r[p+1]-d;h[f++]=c+i*m,h[f++]=d+s*v;for(let E=p+2;E<p+n;++E)h[f++]=r[E]}return h&&h.length!=f&&(h.length=f),h}function Wm(r,t,e,n,i,s,a){a=a||[];let h=0;for(let c=t;c<e;c+=n){a[h++]=r[c]+i,a[h++]=r[c+1]+s;for(let d=c+2;d<c+n;++d)a[h++]=r[d]}return a&&a.length!=h&&(a.length=h),a}const mu=Ht();class Hm extends Re{constructor(){super(),this.extent_=xe(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Ic((t,e,n)=>{if(!n)return this.getSimplifiedGeometry(e);const i=this.clone();return i.applyTransform(n),i.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return ot()}closestPointXY(t,e,n,i){return ot()}containsXY(t,e){const n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return ot()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&Tr(e),this.extentRevision_=this.getRevision()}return gm(this.extent_,t)}rotate(t,e){ot()}scale(t,e,n){ot()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return ot()}getType(){return ot()}applyTransform(t){ot()}intersectsExtent(t){return ot()}translate(t,e){ot()}transform(t,e){const n=zt(t),i=n.getUnits()=="tile-pixels"?function(s,a,h){const c=n.getExtent(),d=n.getWorldExtent(),f=we(d)/we(c);return Ie(mu,d[0],d[3],f,-f,0,0,0),Ii(s,0,s.length,h,mu,a),Pr(n,e)(s,a,h)}:Pr(n,e);return this.applyTransform(i),this}}const yu=Hm;class gn extends yu{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Fa(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return ot()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=vu(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){ot()}setLayout(t,e,n){let i;if(t)i=vu(t);else{for(let s=0;s<n;++s){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}i=e.length,t=pn(i)}this.layout=t,this.stride=i}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){const n=this.getFlatCoordinates();if(n){const i=this.getStride();_u(n,0,n.length,i,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Ri(this.getExtent()));const i=this.getFlatCoordinates();if(i){const s=this.getStride();Zm(i,0,i.length,s,t,e,n,i),this.changed()}}translate(t,e){const n=this.getFlatCoordinates();if(n){const i=this.getStride();Wm(n,0,n.length,i,t,e,n),this.changed()}}}function pn(r){let t;return r==2?t="XY":r==3?t="XYZ":r==4&&(t="XYZM"),t}function vu(r){let t;return r=="XY"?t=2:r=="XYZ"||r=="XYM"?t=3:r=="XYZM"&&(t=4),t}function Vm(r,t,e){const n=r.getFlatCoordinates();if(!n)return null;const i=r.getStride();return Ii(n,0,n.length,i,t,e)}function xu(r,t,e,n,i,s,a){const h=r[t],c=r[t+1],d=r[e]-h,f=r[e+1]-c;let p;if(d===0&&f===0)p=t;else{const m=((i-h)*d+(s-c)*f)/(d*d+f*f);if(m>1)p=e;else if(m>0){for(let v=0;v<n;++v)a[v]=Ee(r[t+v],r[e+v],m);a.length=n;return}else p=t}for(let m=0;m<n;++m)a[m]=r[p+m];a.length=n}function Ja(r,t,e,n,i){let s=r[t],a=r[t+1];for(t+=n;t<e;t+=n){const h=r[t],c=r[t+1],d=un(s,a,h,c);d>i&&(i=d),s=h,a=c}return i}function Qa(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){const h=e[s];i=Ja(r,t,h,n,i),t=h}return i}function Xm(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){const h=e[s];i=Qa(r,t,h,n,i),t=h[h.length-1]}return i}function $a(r,t,e,n,i,s,a,h,c,d,f){if(t==e)return d;let p,m;if(i===0){if(m=un(a,h,r[t],r[t+1]),m<d){for(p=0;p<n;++p)c[p]=r[t+p];return c.length=n,m}return d}f=f||[NaN,NaN];let v=t+n;for(;v<e;)if(xu(r,v-n,v,n,a,h,f),m=un(a,h,f[0],f[1]),m<d){for(d=m,p=0;p<n;++p)c[p]=f[p];c.length=n,v+=n}else v+=n*Math.max((Math.sqrt(m)-Math.sqrt(d))/i|0,1);if(s&&(xu(r,e-n,t,n,a,h,f),m=un(a,h,f[0],f[1]),m<d)){for(d=m,p=0;p<n;++p)c[p]=f[p];c.length=n}return d}function tl(r,t,e,n,i,s,a,h,c,d,f){f=f||[NaN,NaN];for(let p=0,m=e.length;p<m;++p){const v=e[p];d=$a(r,t,v,n,i,s,a,h,c,d,f),t=v}return d}function Ym(r,t,e,n,i,s,a,h,c,d,f){f=f||[NaN,NaN];for(let p=0,m=e.length;p<m;++p){const v=e[p];d=tl(r,t,v,n,i,s,a,h,c,d,f),t=v[v.length-1]}return d}function Km(r,t,e,n){for(let i=0,s=e.length;i<s;++i)r[t++]=e[i];return t}function to(r,t,e,n){for(let i=0,s=e.length;i<s;++i){const a=e[i];for(let h=0;h<n;++h)r[t++]=a[h]}return t}function kr(r,t,e,n,i){i=i||[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=to(r,t,e[a],n);i[s++]=c,t=c}return i.length=s,i}function wu(r,t,e,n,i){i=i||[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=kr(r,t,e[a],n,i[s]);c.length===0&&(c[0]=t),i[s++]=c,t=c[c.length-1]}return i.length=s,i}function eo(r,t,e,n,i,s,a){const h=(e-t)/n;if(h<3){for(;t<e;t+=n)s[a++]=r[t],s[a++]=r[t+1];return a}const c=new Array(h);c[0]=1,c[h-1]=1;const d=[t,e-n];let f=0;for(;d.length>0;){const p=d.pop(),m=d.pop();let v=0;const E=r[m],C=r[m+1],M=r[p],S=r[p+1];for(let y=m+n;y<p;y+=n){const x=r[y],b=r[y+1],T=mm(x,b,E,C,M,S);T>v&&(f=y,v=T)}v>i&&(c[(f-t)/n]=1,m+n<f&&d.push(m,f),f+n<p&&d.push(f,p))}for(let p=0;p<h;++p)c[p]&&(s[a++]=r[t+p*n],s[a++]=r[t+p*n+1]);return a}function Eu(r,t,e,n,i,s,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c];a=eo(r,t,f,n,i,s,a),h.push(a),t=f}return a}function _n(r,t){return t*Math.round(r/t)}function qm(r,t,e,n,i,s,a){if(t==e)return a;let h=_n(r[t],i),c=_n(r[t+1],i);t+=n,s[a++]=h,s[a++]=c;let d,f;do if(d=_n(r[t],i),f=_n(r[t+1],i),t+=n,t==e)return s[a++]=d,s[a++]=f,a;while(d==h&&f==c);for(;t<e;){const p=_n(r[t],i),m=_n(r[t+1],i);if(t+=n,p==d&&m==f)continue;const v=d-h,E=f-c,C=p-h,M=m-c;if(v*M==E*C&&(v<0&&C<v||v==C||v>0&&C>v)&&(E<0&&M<E||E==M||E>0&&M>E)){d=p,f=m;continue}s[a++]=d,s[a++]=f,h=d,c=f,d=p,f=m}return s[a++]=d,s[a++]=f,a}function el(r,t,e,n,i,s,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c];a=qm(r,t,f,n,i,s,a),h.push(a),t=f}return a}function Jm(r,t,e,n,i,s,a,h){for(let c=0,d=e.length;c<d;++c){const f=e[c],p=[];a=el(r,t,f,n,i,s,a,p),h.push(p),t=f[f.length-1]}return a}function Di(r,t,e,n,i){i=i!==void 0?i:[];let s=0;for(let a=t;a<e;a+=n)i[s++]=r.slice(a,a+n);return i.length=s,i}function Rr(r,t,e,n,i){i=i!==void 0?i:[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=e[a];i[s++]=Di(r,t,c,n,i[s]),t=c}return i.length=s,i}function il(r,t,e,n,i){i=i!==void 0?i:[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=e[a];i[s++]=c.length===1&&c[0]===t?[]:Rr(r,t,c,n,i[s]),t=c[c.length-1]}return i.length=s,i}function Lu(r,t,e,n){let i=0,s=r[e-n],a=r[e-n+1];for(;t<e;t+=n){const h=r[t],c=r[t+1];i+=a*h-s*c,s=h,a=c}return i/2}function bu(r,t,e,n){let i=0;for(let s=0,a=e.length;s<a;++s){const h=e[s];i+=Lu(r,t,h,n),t=h}return i}function Qm(r,t,e,n){let i=0;for(let s=0,a=e.length;s<a;++s){const h=e[s];i+=bu(r,t,h,n),t=h[h.length-1]}return i}class io extends gn{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new io(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ja(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),$a(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,i))}getArea(){return Lu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Di(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=eo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new io(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=to(this.flatCoordinates,0,t,this.stride),this.changed()}}const Cu=io;class nl extends gn{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new nl(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,i){const s=this.flatCoordinates,a=un(t,e,s[0],s[1]);if(a<i){const h=this.stride;for(let c=0;c<h;++c)n[c]=s[c];return n.length=h,a}return i}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return jc(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Da(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Km(this.flatCoordinates,0,t,this.stride),this.changed()}}const no=nl;function $m(r,t,e,n,i){return!Hc(i,function(a){return!mn(r,t,e,n,a[0],a[1])})}function mn(r,t,e,n,i,s){let a=0,h=r[e-n],c=r[e-n+1];for(;t<e;t+=n){const d=r[t],f=r[t+1];c<=s?f>s&&(d-h)*(s-c)-(i-h)*(f-c)>0&&a++:f<=s&&(d-h)*(s-c)-(i-h)*(f-c)<0&&a--,h=d,c=f}return a!==0}function rl(r,t,e,n,i,s){if(e.length===0||!mn(r,t,e[0],n,i,s))return!1;for(let a=1,h=e.length;a<h;++a)if(mn(r,e[a-1],e[a],n,i,s))return!1;return!0}function ty(r,t,e,n,i,s){if(e.length===0)return!1;for(let a=0,h=e.length;a<h;++a){const c=e[a];if(rl(r,t,c,n,i,s))return!0;t=c[c.length-1]}return!1}function sl(r,t,e,n,i,s,a){let h,c,d,f,p,m,v;const E=i[s+1],C=[];for(let y=0,x=e.length;y<x;++y){const b=e[y];for(f=r[b-n],m=r[b-n+1],h=t;h<b;h+=n)p=r[h],v=r[h+1],(E<=m&&v<=E||m<=E&&E<=v)&&(d=(E-m)/(v-m)*(p-f)+f,C.push(d)),f=p,m=v}let M=NaN,S=-1/0;for(C.sort(Pi),f=C[0],h=1,c=C.length;h<c;++h){p=C[h];const y=Math.abs(p-f);y>S&&(d=(f+p)/2,rl(r,t,e,n,d,E)&&(M=d,S=y)),f=p}return isNaN(M)&&(M=i[s]),a?(a.push(M,E,S),a):[M,E,S]}function Tu(r,t,e,n,i){let s=[];for(let a=0,h=e.length;a<h;++a){const c=e[a];s=sl(r,t,c,n,i,2*a,s),t=c[c.length-1]}return s}function Mu(r,t,e,n,i){let s;for(t+=n;t<e;t+=n)if(s=i(r.slice(t-n,t),r.slice(t,t+n)),s)return s;return!1}function ro(r,t,e,n,i){const s=Wc(xe(),r,t,e,n);return ce(i,s)?hn(i,s)||s[0]>=i[0]&&s[2]<=i[2]||s[1]>=i[1]&&s[3]<=i[3]?!0:Mu(r,t,e,n,function(a,h){return pm(i,a,h)}):!1}function ey(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){if(ro(r,t,e[s],n,i))return!0;t=e[s]}return!1}function Su(r,t,e,n,i){return!!(ro(r,t,e,n,i)||mn(r,t,e,n,i[0],i[1])||mn(r,t,e,n,i[0],i[3])||mn(r,t,e,n,i[2],i[1])||mn(r,t,e,n,i[2],i[3]))}function Pu(r,t,e,n,i){if(!Su(r,t,e[0],n,i))return!1;if(e.length===1)return!0;for(let s=1,a=e.length;s<a;++s)if($m(r,e[s-1],e[s],n,i)&&!ro(r,e[s-1],e[s],n,i))return!1;return!0}function iy(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){const h=e[s];if(Pu(r,t,h,n,i))return!0;t=h[h.length-1]}return!1}function ny(r,t,e,n){for(;t<e-n;){for(let i=0;i<n;++i){const s=r[t+i];r[t+i]=r[e-n+i],r[e-n+i]=s}t+=n,e-=n}}function ol(r,t,e,n){let i=0,s=r[e-n],a=r[e-n+1];for(;t<e;t+=n){const h=r[t],c=r[t+1];i+=(h-s)*(c+a),s=h,a=c}return i===0?void 0:i>0}function al(r,t,e,n,i){i=i!==void 0?i:!1;for(let s=0,a=e.length;s<a;++s){const h=e[s],c=ol(r,t,h,n);if(s===0){if(i&&c||!i&&!c)return!1}else if(i&&!c||!i&&c)return!1;t=h}return!0}function ku(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s){const h=e[s];if(!al(r,t,h,n,i))return!1;h.length&&(t=h[h.length-1])}return!0}function so(r,t,e,n,i){i=i!==void 0?i:!1;for(let s=0,a=e.length;s<a;++s){const h=e[s],c=ol(r,t,h,n);(s===0?i&&c||!i&&!c:i&&!c||!i&&c)&&ny(r,t,h,n),t=h}return t}function ll(r,t,e,n,i){for(let s=0,a=e.length;s<a;++s)t=so(r,t,e[s],n,i);return t}function ry(r,t){const e=[];let n=0,i=0,s;for(let a=0,h=t.length;a<h;++a){const c=t[a],d=ol(r,n,c,2);if(s===void 0&&(s=d),d===s)e.push(t.slice(i,a+1));else{if(e.length===0)continue;e[e.length-1].push(t[i])}i=a+1,n=c}return e}class Oi extends gn{constructor(t,e,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&n?(this.setFlatCoordinates(e,t),this.ends_=n):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?He(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Oi(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qa(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),tl(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,n,i))}containsXY(t,e){return rl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return bu(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),so(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Rr(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=Ri(this.getExtent());this.flatInteriorPoint_=sl(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new no(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new Cu(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,n=this.ends_,i=[];let s=0;for(let a=0,h=n.length;a<h;++a){const c=n[a],d=new Cu(e.slice(s,c),t);i.push(d),s=c}return i}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;al(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=so(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=el(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,n),new Oi(e,"XY",n)}getType(){return"Polygon"}intersectsExtent(t){return Pu(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=kr(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}function Ru(r){if(Ys(r))throw new Error("Cannot create polygon from empty extent");const t=r[0],e=r[1],n=r[2],i=r[3],s=[t,e,t,i,n,i,n,e,t,e];return new Oi(s,"XY",[s.length])}const hl=0;class sy extends Re{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=Wa(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&Jc(),t.center&&(t.center=hi(t.center,this.projection_)),t.extent&&(t.extent=fn(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const h in Ae)delete e[h];this.setProperties(e,!0);const n=ay(t);this.maxResolution_=n.maxResolution,this.minResolution_=n.minResolution,this.zoomFactor_=n.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=n.minZoom;const i=oy(t),s=n.constraint,a=ly(t);this.constraints_={center:i,resolution:s,rotation:a},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const n=this.getCenterInternal();if(n){const i=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),a=s/2*(i[3]-e[3]+e[1]-i[1]),h=s/2*(i[0]-e[0]+e[2]-i[2]);this.setCenterInternal([n[0]+a,n[1]-h])}}getUpdatedOptions_(t){const e=this.getProperties();return e.resolution!==void 0?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let n=0;n<e.length;++n){let i=arguments[n];i.center&&(i=Object.assign({},i),i.center=hi(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=hi(i.anchor,this.getProjection())),e[n]=i}this.animateInternal.apply(this,e)}animateInternal(t){let e=arguments.length,n;e>1&&typeof arguments[e-1]=="function"&&(n=arguments[e-1],--e);let i=0;for(;i<e&&!this.isDef();++i){const f=arguments[i];f.center&&this.setCenterInternal(f.center),f.zoom!==void 0?this.setZoom(f.zoom):f.resolution&&this.setResolution(f.resolution),f.rotation!==void 0&&this.setRotation(f.rotation)}if(i===e){n&&oo(n,!0);return}let s=Date.now(),a=this.targetCenter_.slice(),h=this.targetResolution_,c=this.targetRotation_;const d=[];for(;i<e;++i){const f=arguments[i],p={start:s,complete:!1,anchor:f.anchor,duration:f.duration!==void 0?f.duration:1e3,easing:f.easing||Im,callback:n};if(f.center&&(p.sourceCenter=a,p.targetCenter=f.center.slice(),a=p.targetCenter),f.zoom!==void 0?(p.sourceResolution=h,p.targetResolution=this.getResolutionForZoom(f.zoom),h=p.targetResolution):f.resolution&&(p.sourceResolution=h,p.targetResolution=f.resolution,h=p.targetResolution),f.rotation!==void 0){p.sourceRotation=c;const m=Bn(f.rotation-c+Math.PI,2*Math.PI)-Math.PI;p.targetRotation=c+m,c=p.targetRotation}hy(p)?p.complete=!0:s+=p.duration,d.push(p)}this.animations_.push(d),this.setHint(Zt.ANIMATING,1),this.updateAnimations_()}getAnimating(){return this.hints_[Zt.ANIMATING]>0}getInteracting(){return this.hints_[Zt.INTERACTING]>0}cancelAnimations(){this.setHint(Zt.ANIMATING,-this.hints_[Zt.ANIMATING]);let t;for(let e=0,n=this.animations_.length;e<n;++e){const i=this.animations_[e];if(i[0].callback&&oo(i[0].callback,!1),!t)for(let s=0,a=i.length;s<a;++s){const h=i[s];if(!h.complete){t=h.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let n=this.animations_.length-1;n>=0;--n){const i=this.animations_[n];let s=!0;for(let a=0,h=i.length;a<h;++a){const c=i[a];if(c.complete)continue;const d=t-c.start;let f=c.duration>0?d/c.duration:1;f>=1?(c.complete=!0,f=1):s=!1;const p=c.easing(f);if(c.sourceCenter){const m=c.sourceCenter[0],v=c.sourceCenter[1],E=c.targetCenter[0],C=c.targetCenter[1];this.nextCenter_=c.targetCenter;const M=m+p*(E-m),S=v+p*(C-v);this.targetCenter_=[M,S]}if(c.sourceResolution&&c.targetResolution){const m=p===1?c.targetResolution:c.sourceResolution+p*(c.targetResolution-c.sourceResolution);if(c.anchor){const v=this.getViewportSize_(this.getRotation()),E=this.constraints_.resolution(m,0,v,!0);this.targetCenter_=this.calculateCenterZoom(E,c.anchor)}this.nextResolution_=c.targetResolution,this.targetResolution_=m,this.applyTargetState_(!0)}if(c.sourceRotation!==void 0&&c.targetRotation!==void 0){const m=p===1?Bn(c.targetRotation+Math.PI,2*Math.PI)-Math.PI:c.sourceRotation+p*(c.targetRotation-c.sourceRotation);if(c.anchor){const v=this.constraints_.rotation(m,!0);this.targetCenter_=this.calculateCenterRotate(v,c.anchor)}this.nextRotation_=c.targetRotation,this.targetRotation_=m}if(this.applyTargetState_(!0),e=!0,!c.complete)break}if(s){this.animations_[n]=null,this.setHint(Zt.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const a=i[0].callback;a&&oo(a,!0)}}this.animations_=this.animations_.filter(Boolean),e&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let n;const i=this.getCenterInternal();return i!==void 0&&(n=[i[0]-e[0],i[1]-e[1]],Ua(n,t-this.getRotation()),vm(n,e)),n}calculateCenterZoom(t,e){let n;const i=this.getCenterInternal(),s=this.getResolution();if(i!==void 0&&s!==void 0){const a=e[0]-t*(e[0]-i[0])/s,h=e[1]-t*(e[1]-i[1])/s;n=[a,h]}return n}getViewportSize_(t){const e=this.viewportSize_;if(t){const n=e[0],i=e[1];return[Math.abs(n*Math.cos(t))+Math.abs(i*Math.sin(t)),Math.abs(n*Math.sin(t))+Math.abs(i*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t&&Va(t,this.getProjection())}getCenterInternal(){return this.get(Ae.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){const e=this.calculateExtentInternal(t);return nu(e,this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();mt(e,"The view center is not defined");const n=this.getResolution();mt(n!==void 0,"The view resolution is not defined");const i=this.getRotation();return mt(i!==void 0,"The view rotation is not defined"),Na(e,n,i,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Ae.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(fn(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const n=Mt(t)/e[0],i=we(t)/e[1];return Math.max(n,i)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,i=Math.log(e/n)/Math.log(t);return function(s){return e/Math.pow(t,s*i)}}getRotation(){return this.get(Ae.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),n=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,s=Math.log(n/i)/e;return function(a){return Math.log(n/a)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const n=this.padding_;return n&&(e=[e[0]-n[1]-n[3],e[1]-n[0]-n[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),n=this.getRotation();let i=this.getCenterInternal();const s=this.padding_;if(s){const a=this.getViewportSizeMinusPadding_();i=cl(i,this.getViewportSize_(),[a[0]/2+s[3],a[1]/2+s[0]],e,n)}return{center:i.slice(0),projection:t!==void 0?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:n,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return e!==void 0&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e=this.minZoom_||0,n,i;if(this.resolutions_){const s=Ra(this.resolutions_,t,1);e=s,n=this.resolutions_[s],s==this.resolutions_.length-1?i=2:i=n/this.resolutions_[s+1]}else n=this.maxResolution_,i=this.zoomFactor_;return e+Math.log(n/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;const e=Dt(Math.floor(t),0,this.resolutions_.length-2),n=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(n,Dt(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let n;if(mt(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function","Invalid extent or geometry provided as `geometry`"),Array.isArray(t)){mt(!Ys(t),"Cannot fit empty extent provided as `geometry`");const i=fn(t,this.getProjection());n=Ru(i)}else if(t.getType()==="Circle"){const i=fn(t.getExtent(),this.getProjection());n=Ru(i),n.rotate(this.getRotation(),Ri(i))}else n=t;this.fitInternal(n,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),n=Math.cos(e),i=Math.sin(-e),s=t.getFlatCoordinates(),a=t.getStride();let h=1/0,c=1/0,d=-1/0,f=-1/0;for(let p=0,m=s.length;p<m;p+=a){const v=s[p]*n-s[p+1]*i,E=s[p]*i+s[p+1]*n;h=Math.min(h,v),c=Math.min(c,E),d=Math.max(d,v),f=Math.max(f,E)}return[h,c,d,f]}fitInternal(t,e){e=e||{};let n=e.size;n||(n=this.getViewportSizeMinusPadding_());const i=e.padding!==void 0?e.padding:[0,0,0,0],s=e.nearest!==void 0?e.nearest:!1;let a;e.minResolution!==void 0?a=e.minResolution:e.maxZoom!==void 0?a=this.getResolutionForZoom(e.maxZoom):a=0;const h=this.rotatedExtentForGeometry(t);let c=this.getResolutionForExtentInternal(h,[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]);c=isNaN(c)?a:Math.max(c,a),c=this.getConstrainedResolution(c,s?0:1);const d=this.getRotation(),f=Math.sin(d),p=Math.cos(d),m=Ri(h);m[0]+=(i[1]-i[3])/2*c,m[1]+=(i[0]-i[2])/2*c;const v=m[0]*p-m[1]*f,E=m[1]*p+m[0]*f,C=this.getConstrainedCenter([v,E],c),M=e.callback?e.callback:In;e.duration!==void 0?this.animateInternal({resolution:c,center:C,duration:e.duration,easing:e.easing},M):(this.targetResolution_=c,this.targetCenter_=C,this.applyTargetState_(!1,!0),oo(M,!0))}centerOn(t,e,n){this.centerOnInternal(hi(t,this.getProjection()),e,n)}centerOnInternal(t,e,n){this.setCenterInternal(cl(t,e,n,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,n,i){let s;const a=this.padding_;if(a&&t){const h=this.getViewportSizeMinusPadding_(-n),c=cl(t,i,[h[0]/2+a[3],h[1]/2+a[0]],e,n);s=[t[0]-c[0],t[1]-c[1]]}return s}isDef(){return!!this.getCenterInternal()&&this.getResolution()!==void 0}adjustCenter(t){const e=Va(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&hi(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const n=this.getAnimating()||this.getInteracting(),i=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,i,n);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=hi(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const n=this.getAnimating()||this.getInteracting(),i=this.constraints_.rotation(this.targetRotation_+t,n);e&&(this.targetCenter_=this.calculateCenterRotate(i,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t&&hi(t,this.getProjection()))}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const n=this.getAnimating()||this.getInteracting()||e,i=this.constraints_.rotation(this.targetRotation_,n),s=this.getViewportSize_(i),a=this.constraints_.resolution(this.targetResolution_,0,s,n),h=this.constraints_.center(this.targetCenter_,a,s,n,this.calculateCenterShift(this.targetCenter_,a,i,s));this.get(Ae.ROTATION)!==i&&this.set(Ae.ROTATION,i),this.get(Ae.RESOLUTION)!==a&&(this.set(Ae.RESOLUTION,a),this.set("zoom",this.getZoom(),!0)),(!h||!this.get(Ae.CENTER)||!Qs(this.get(Ae.CENTER),h))&&this.set(Ae.CENTER,h),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,n){t=t!==void 0?t:200;const i=e||0,s=this.constraints_.rotation(this.targetRotation_),a=this.getViewportSize_(s),h=this.constraints_.resolution(this.targetResolution_,i,a),c=this.constraints_.center(this.targetCenter_,h,a,!1,this.calculateCenterShift(this.targetCenter_,h,s,a));if(t===0&&!this.cancelAnchor_){this.targetResolution_=h,this.targetRotation_=s,this.targetCenter_=c,this.applyTargetState_();return}n=n||(t===0?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,(this.getResolution()!==h||this.getRotation()!==s||!this.getCenterInternal()||!Qs(this.getCenterInternal(),c))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:c,resolution:h,duration:t,easing:Gn,anchor:n}))}beginInteraction(){this.resolveConstraints(0),this.setHint(Zt.INTERACTING,1)}endInteraction(t,e,n){n=n&&hi(n,this.getProjection()),this.endInteractionInternal(t,e,n)}endInteractionInternal(t,e,n){this.getInteracting()&&(this.setHint(Zt.INTERACTING,-1),this.resolveConstraints(t,e,n))}getConstrainedCenter(t,e){const n=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),n)}getConstrainedZoom(t,e){const n=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(n,e))}getConstrainedResolution(t,e){e=e||0;const n=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,n)}}function oo(r,t){setTimeout(function(){r(t)},0)}function oy(r){if(r.extent!==void 0){const e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return ru(r.extent,r.constrainOnlyCenter,e)}const t=Wa(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){const e=t.getExtent().slice();return e[0]=-1/0,e[2]=1/0,ru(e,!1,!1)}return Sm}function ay(r){let t,e,n,a=r.minZoom!==void 0?r.minZoom:hl,h=r.maxZoom!==void 0?r.maxZoom:28;const c=r.zoomFactor!==void 0?r.zoomFactor:2,d=r.multiWorld!==void 0?r.multiWorld:!1,f=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,p=r.showFullExtent!==void 0?r.showFullExtent:!1,m=Wa(r.projection,"EPSG:3857"),v=m.getExtent();let E=r.constrainOnlyCenter,C=r.extent;if(!d&&!C&&m.isGlobal()&&(E=!1,C=v),r.resolutions!==void 0){const M=r.resolutions;e=M[a],n=M[h]!==void 0?M[h]:M[M.length-1],r.constrainResolution?t=Pm(M,f,!E&&C,p):t=su(e,n,f,!E&&C,p)}else{const S=(v?Math.max(Mt(v),we(v)):360*br.degrees/m.getMetersPerUnit())/Aa/Math.pow(2,hl),y=S/Math.pow(2,28-hl);e=r.maxResolution,e!==void 0?a=0:e=S/Math.pow(c,a),n=r.minResolution,n===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?n=e/Math.pow(c,h):n=S/Math.pow(c,h):n=y),h=a+Math.floor(Math.log(e/n)/Math.log(c)),n=e/Math.pow(c,h-a),r.constrainResolution?t=km(c,e,n,f,!E&&C,p):t=su(e,n,f,!E&&C,p)}return{constraint:t,maxResolution:e,minResolution:n,minZoom:a,zoomFactor:c}}function ly(r){if(r.enableRotation!==void 0?r.enableRotation:!0){const e=r.constrainRotation;return e===void 0||e===!0?Am():e===!1?ou:typeof e=="number"?Rm(e):ou}return Ka}function hy(r){return!(r.sourceCenter&&r.targetCenter&&!Qs(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function cl(r,t,e,n,i){const s=Math.cos(-i);let a=Math.sin(-i),h=r[0]*s-r[1]*a,c=r[1]*s+r[0]*a;h+=(t[0]/2-e[0])*n,c+=(e[1]-t[1]/2)*n,a=-a;const d=h*s-c*a,f=c*s+h*a;return[d,f]}const Ve=sy,ue={ADD:"add",REMOVE:"remove"},Au={LENGTH:"length"};class ao extends ai{constructor(t,e,n){super(t),this.element=e,this.index=n}}class cy extends Re{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,i=this.array_.length;n<i;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let n=0,i=e.length;n<i;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(Au.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new ao(ue.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let n=0,i=e.length;n<i;++n)if(e[n]===t)return this.removeAt(n)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new ao(ue.REMOVE,e,t)),e}setAt(t,e){const n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new ao(ue.REMOVE,i,t)),this.dispatchEvent(new ao(ue.ADD,e,t))}updateLength_(){this.set(Au.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,i=this.array_.length;n<i;++n)if(this.array_[n]===t&&n!==e)throw new Error("Duplicate item added to a unique collection")}}const Xe=cy,Ar={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},$t={name:"xyz",min:[0,0,0],channel:["X","Y","Z"],alias:["XYZ","ciexyz","cie1931"],whitepoint:{2:{A:[109.85,100,35.585],C:[98.074,100,118.232],D50:[96.422,100,82.521],D55:[95.682,100,92.149],D65:[95.045592705167,100,108.9057750759878],D75:[94.972,100,122.638],F2:[99.187,100,67.395],F7:[95.044,100,108.755],F11:[100.966,100,64.37],E:[100,100,100]},10:{A:[111.144,100,35.2],C:[97.285,100,116.145],D50:[96.72,100,81.427],D55:[95.799,100,90.926],D65:[94.811,100,107.304],D75:[94.416,100,120.641],F2:[103.28,100,69.026],F7:[95.792,100,107.687],F11:[103.866,100,65.627],E:[100,100,100]}}};$t.max=$t.whitepoint[2].D65,$t.rgb=function(r,t){t=t||$t.whitepoint[2].E;var e=r[0]/t[0],n=r[1]/t[1],i=r[2]/t[2],s,a,h;return s=e*3.240969941904521+n*-1.537383177570093+i*-.498610760293,a=e*-.96924363628087+n*1.87596750150772+i*.041555057407175,h=e*.055630079696993+n*-.20397695888897+i*1.056971514242878,s=s>.0031308?1.055*Math.pow(s,1/2.4)-.055:s=s*12.92,a=a>.0031308?1.055*Math.pow(a,1/2.4)-.055:a=a*12.92,h=h>.0031308?1.055*Math.pow(h,1/2.4)-.055:h=h*12.92,s=Math.min(Math.max(0,s),1),a=Math.min(Math.max(0,a),1),h=Math.min(Math.max(0,h),1),[s*255,a*255,h*255]},Ar.xyz=function(r,t){var e=r[0]/255,n=r[1]/255,i=r[2]/255;e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92;var s=e*.41239079926595+n*.35758433938387+i*.18048078840183,a=e*.21263900587151+n*.71516867876775+i*.072192315360733,h=e*.019330818715591+n*.11919477979462+i*.95053215224966;return t=t||$t.whitepoint[2].E,[s*t[0],a*t[1],h*t[2]]};var ul={name:"luv",min:[0,-134,-140],max:[100,224,122],channel:["lightness","u","v"],alias:["LUV","cieluv","cie1976"],xyz:function(r,t,e){var n,i,s,a,h,c,d,f,p,m,v,E,C;if(s=r[0],a=r[1],h=r[2],s===0)return[0,0,0];var M=.0011070564598794539;return t=t||"D65",e=e||2,p=$t.whitepoint[e][t][0],m=$t.whitepoint[e][t][1],v=$t.whitepoint[e][t][2],E=4*p/(p+15*m+3*v),C=9*m/(p+15*m+3*v),n=a/(13*s)+E||0,i=h/(13*s)+C||0,d=s>8?m*Math.pow((s+16)/116,3):m*s*M,c=d*9*n/(4*i)||0,f=d*(12-3*n-20*i)/(4*i)||0,[c,d,f]}};$t.luv=function(r,t,e){var n,i,s,a,h,c,d,f,p,m,v,E,C,M=.008856451679035631,S=903.2962962962961;t=t||"D65",e=e||2,p=$t.whitepoint[e][t][0],m=$t.whitepoint[e][t][1],v=$t.whitepoint[e][t][2],E=4*p/(p+15*m+3*v),C=9*m/(p+15*m+3*v),c=r[0],d=r[1],f=r[2],n=4*c/(c+15*d+3*f)||0,i=9*d/(c+15*d+3*f)||0;var y=d/m;return s=y<=M?S*y:116*Math.pow(y,1/3)-16,a=13*s*(n-E),h=13*s*(i-C),[s,a,h]};var Iu={name:"lchuv",channel:["lightness","chroma","hue"],alias:["LCHuv","cielchuv"],min:[0,0,0],max:[100,100,360],luv:function(r){var t=r[0],e=r[1],n=r[2],i,s,a;return a=n/360*2*Math.PI,i=e*Math.cos(a),s=e*Math.sin(a),[t,i,s]},xyz:function(r){return ul.xyz(Iu.luv(r))}};ul.lchuv=function(r){var t=r[0],e=r[1],n=r[2],i=Math.sqrt(e*e+n*n),s=Math.atan2(n,e),a=s*360/2/Math.PI;return a<0&&(a+=360),[t,i,a]},$t.lchuv=function(r){return ul.lchuv($t.luv(r))};const Du={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var Ou={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function uy(r){var f,p;var t,e=[],n=1,i;if(typeof r=="number")return{space:"rgb",values:[r>>>16,(r&65280)>>>8,r&255],alpha:1};if(typeof r=="number")return{space:"rgb",values:[r>>>16,(r&65280)>>>8,r&255],alpha:1};if(r=String(r).toLowerCase(),Du[r])e=Du[r].slice(),i="rgb";else if(r==="transparent")n=0,i="rgb",e=[0,0,0];else if(r[0]==="#"){var s=r.slice(1),a=s.length,h=a<=4;n=1,h?(e=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],a===4&&(n=parseInt(s[3]+s[3],16)/255)):(e=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],a===8&&(n=parseInt(s[6]+s[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),i="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(r)){var c=t[1];i=c.replace(/a$/,"");var d=i==="cmyk"?4:i==="gray"?1:3;e=t[2].trim().split(/\s*[,\/]\s*|\s+/),i==="color"&&(i=e.shift()),e=e.map(function(m,v){if(m[m.length-1]==="%")return m=parseFloat(m)/100,v===3?m:i==="rgb"?m*255:i[0]==="h"||i[0]==="l"&&!v?m*100:i==="lab"?m*125:i==="lch"?v<2?m*150:m*360:i[0]==="o"&&!v?m:i==="oklab"?m*.4:i==="oklch"?v<2?m*.4:m*360:m;if(i[v]==="h"||v===2&&i[i.length-1]==="h"){if(Ou[m]!==void 0)return Ou[m];if(m.endsWith("deg"))return parseFloat(m);if(m.endsWith("turn"))return parseFloat(m)*360;if(m.endsWith("grad"))return parseFloat(m)*360/400;if(m.endsWith("rad"))return parseFloat(m)*180/Math.PI}return m==="none"?0:parseFloat(m)}),n=e.length>d?e.pop():1}else/[0-9](?:\s|\/|,)/.test(r)&&(e=r.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),i=((p=(f=r.match(/([a-z])/ig))==null?void 0:f.join(""))==null?void 0:p.toLowerCase())||"rgb");return{space:i,values:e,alpha:n}}var dl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(r){var t=r[0]/360,e=r[1]/100,n=r[2]/100,i,s,a,h,c,d=0;if(e===0)return c=n*255,[c,c,c];for(s=n<.5?n*(1+e):n+e-n*e,i=2*n-s,h=[0,0,0];d<3;)a=t+1/3*-(d-1),a<0?a++:a>1&&a--,c=6*a<1?i+(s-i)*6*a:2*a<1?s:3*a<2?i+(s-i)*(2/3-a)*6:i,h[d++]=c*255;return h}};Ar.hsl=function(r){var t=r[0]/255,e=r[1]/255,n=r[2]/255,i=Math.min(t,e,n),s=Math.max(t,e,n),a=s-i,h,c,d;return s===i?h=0:t===s?h=(e-n)/a:e===s?h=2+(n-t)/a:n===s&&(h=4+(t-e)/a),h=Math.min(h*60,360),h<0&&(h+=360),d=(i+s)/2,s===i?c=0:d<=.5?c=a/(s+i):c=a/(2-s-i),[h,c*100,d*100]};function dy(r){Array.isArray(r)&&r.raw&&(r=String.raw(...arguments)),r instanceof Number&&(r=+r);var t,e=uy(r);if(!e.space)return[];const n=e.space[0]==="h"?dl.min:Ar.min,i=e.space[0]==="h"?dl.max:Ar.max;return t=Array(3),t[0]=Math.min(Math.max(e.values[0],n[0]),i[0]),t[1]=Math.min(Math.max(e.values[1],n[1]),i[1]),t[2]=Math.min(Math.max(e.values[2],n[2]),i[2]),e.space[0]==="h"&&(t=dl.rgb(t)),t.push(Math.min(Math.max(e.alpha,0),1)),t}function Fu(r){return typeof r=="string"?r:Bu(r)}const fy=1024,Ir={};let fl=0;function gy(r){if(r.length===4)return r;const t=r.slice();return t[3]=1,t}function zu(r){const t=$t.lchuv(Ar.xyz(r));return t[3]=r[3],t}function py(r){const t=$t.rgb(Iu.xyz(r));return t[3]=r[3],t}function gl(r){if(Ir.hasOwnProperty(r))return Ir[r];if(fl>=fy){let e=0;for(const n in Ir)e++&3||(delete Ir[n],--fl)}const t=dy(r);if(t.length!==4)throw new Error('Failed to parse "'+r+'" as color');for(const e of t)if(isNaN(e))throw new Error('Failed to parse "'+r+'" as color');return Nu(t),Ir[r]=t,++fl,t}function Dr(r){return Array.isArray(r)?r:gl(r)}function Nu(r){return r[0]=Dt(r[0]+.5|0,0,255),r[1]=Dt(r[1]+.5|0,0,255),r[2]=Dt(r[2]+.5|0,0,255),r[3]=Dt(r[3],0,1),r}function Bu(r){let t=r[0];t!=(t|0)&&(t=t+.5|0);let e=r[1];e!=(e|0)&&(e=e+.5|0);let n=r[2];n!=(n|0)&&(n=n+.5|0);const i=r[3]===void 0?1:Math.round(r[3]*100)/100;return"rgba("+t+","+e+","+n+","+i+")"}function _y(r){try{return gl(r),!0}catch{return!1}}class my{constructor(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}clear(){this.cache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const n=this.cache_[e];!(t++&3)&&!n.hasListener()&&(delete this.cache_[e],--this.cacheSize_)}}}get(t,e,n){const i=Gu(t,e,n);return i in this.cache_?this.cache_[i]:null}set(t,e,n,i){const s=Gu(t,e,n);this.cache_[s]=i,++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}}function Gu(r,t,e){const n=e?Fu(e):"null";return t+":"+r+":"+n}const lo=new my,bt={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"};class yy extends Re{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[bt.OPACITY]=t.opacity!==void 0?t.opacity:1,mt(typeof e[bt.OPACITY]=="number","Layer opacity must be a number"),e[bt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[bt.Z_INDEX]=t.zIndex,e[bt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[bt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[bt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[bt.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=Dt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return ot()}getLayerStatesArray(t){return ot()}getExtent(){return this.get(bt.EXTENT)}getMaxResolution(){return this.get(bt.MAX_RESOLUTION)}getMinResolution(){return this.get(bt.MIN_RESOLUTION)}getMinZoom(){return this.get(bt.MIN_ZOOM)}getMaxZoom(){return this.get(bt.MAX_ZOOM)}getOpacity(){return this.get(bt.OPACITY)}getSourceState(){return ot()}getVisible(){return this.get(bt.VISIBLE)}getZIndex(){return this.get(bt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(bt.EXTENT,t)}setMaxResolution(t){this.set(bt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(bt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(bt.MAX_ZOOM,t)}setMinZoom(t){this.set(bt.MIN_ZOOM,t)}setOpacity(t){mt(typeof t=="number","Layer opacity must be a number"),this.set(bt.OPACITY,t)}setVisible(t){this.set(bt.VISIBLE,t)}setZIndex(t){this.set(bt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}}const Uu=yy,te={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};class vy extends Uu{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(bt.SOURCE,this.handleSourcePropertyChange_);const n=t.source?t.source:null;this.setSource(n)}getLayersArray(t){return t=t||[],t.push(this),t}getLayerStatesArray(t){return t=t||[],t.push(this.getLayerState()),t}getSource(){return this.get(bt.SOURCE)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),!(this.sourceReady_||this.getSource().getState()!=="ready")&&(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(Tt(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=gt(t,ct.CHANGE,this.handleSourceChange_,this),t.getState()==="ready"&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)}isVisible(t){let e;const n=this.getMapInternal();!t&&n&&(t=n.getView()),t instanceof Ve?e={viewState:t.getState(),extent:t.calculateExtent()}:e=t,!e.layerStatesArray&&n&&(e.layerStatesArray=n.getLayerGroup().getLayerStatesArray());let i;e.layerStatesArray?i=e.layerStatesArray.find(a=>a.layer===this):i=this.getLayerState();const s=this.getExtent();return pl(i,e.viewState)&&(!s||ce(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];let e;const n=this.getSource();if(n&&(e=n.getAttributions()),!e)return[];const i=t instanceof Ve?t.getViewStateAndExtent():t;let s=e(i);return Array.isArray(s)||(s=[s]),s}render(t,e){const n=this.getRenderer();return n.prepareFrame(t)?(this.rendered=!0,n.renderFrame(t,e)):null}unrender(){this.rendered=!1}setMapInternal(t){t||this.unrender(),this.set(bt.MAP,t)}getMapInternal(){return this.get(bt.MAP)}setMap(t){this.mapPrecomposeKey_&&(Tt(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Tt(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=gt(t,te.PRECOMPOSE,function(e){const i=e.frameState.layerStatesArray,s=this.getLayerState(!1);mt(!i.some(function(a){return a.layer===s.layer}),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),i.push(s)},this),this.mapRenderKey_=gt(this,ct.CHANGE,t.render,t),this.changed())}setSource(t){this.set(bt.SOURCE,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}disposeInternal(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),super.disposeInternal()}}function pl(r,t){if(!r.visible)return!1;const e=t.resolution;if(e<r.minResolution||e>=r.maxResolution)return!1;const n=t.zoom;return n>r.minZoom&&n<=r.maxZoom}const ho=vy;class xy extends Fs{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){ot()}calculateMatrices2D(t){const e=t.viewState,n=t.coordinateToPixelTransform,i=t.pixelToCoordinateTransform;Ie(n,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),$s(i,n)}forEachFeatureAtCoordinate(t,e,n,i,s,a,h,c){let d;const f=e.viewState;function p(b,T,k,R){return s.call(a,T,b?k:null,R)}const m=f.projection,v=Xc(t.slice(),m),E=[[0,0]];if(m.canWrapX()&&i){const b=m.getExtent(),T=Mt(b);E.push([-T,0],[T,0])}const C=e.layerStatesArray,M=C.length,S=[],y=[];for(let b=0;b<E.length;b++)for(let T=M-1;T>=0;--T){const k=C[T],R=k.layer;if(R.hasRenderer()&&pl(k,f)&&h.call(c,R)){const I=R.getRenderer(),z=R.getSource();if(I&&z){const G=z.getWrapX()?v:t,j=p.bind(null,k.managed);y[0]=G[0]+E[b][0],y[1]=G[1]+E[b][1],d=I.forEachFeatureAtCoordinate(y,e,n,j,S)}if(d)return d}}if(S.length===0)return;const x=1/S.length;return S.forEach((b,T)=>b.distanceSq+=T*x),S.sort((b,T)=>b.distanceSq-T.distanceSq),S.some(b=>d=b.callback(b.feature,b.layer,b.geometry)),d}hasFeatureAtCoordinate(t,e,n,i,s,a){return this.forEachFeatureAtCoordinate(t,e,n,i,Lr,this,s,a)!==void 0}getMap(){return this.map_}renderFrame(t){ot()}flushDeclutterItems(t){}scheduleExpireIconCache(t){lo.canExpireCache()&&t.postRenderFunctions.push(wy)}}function wy(r,t){lo.expire()}const Ey=xy;class Ly extends ai{constructor(t,e,n,i){super(t),this.inversePixelTransform=e,this.frameState=n,this.context=i}}const Or=Ly,co="ol-hidden",by="ol-selectable",Fr="ol-unselectable",ju="ol-unsupported",uo="ol-control",Zu="ol-collapsed",Cy=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),Wu=["style","variant","weight","size","lineHeight","family"],Hu=function(r){const t=r.match(Cy);if(!t)return null;const e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"};for(let n=0,i=Wu.length;n<i;++n){const s=t[n+1];s!==void 0&&(e[Wu[n]]=s)}return e.families=e.family.split(/,\s?/),e};function ee(r,t,e,n){let i;return e&&e.length?i=e.shift():qa?i=new OffscreenCanvas(r||300,t||300):i=document.createElement("canvas"),r&&(i.width=r),t&&(i.height=t),i.getContext("2d",n)}function fo(r){const t=r.canvas;t.width=1,t.height=1,r.clearRect(0,0,1,1)}function Ty(r){let t=r.offsetWidth;const e=getComputedStyle(r);return t+=parseInt(e.marginLeft,10)+parseInt(e.marginRight,10),t}function My(r){let t=r.offsetHeight;const e=getComputedStyle(r);return t+=parseInt(e.marginTop,10)+parseInt(e.marginBottom,10),t}function go(r,t){const e=t.parentNode;e&&e.replaceChild(r,t)}function po(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function Vu(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function Sy(r,t){const e=r.childNodes;for(let n=0;;++n){const i=e[n],s=t[n];if(!i&&!s)break;if(i!==s){if(!i){r.appendChild(s);continue}if(!s){r.removeChild(i),--n;continue}r.insertBefore(s,i)}}}const Xu="10px sans-serif",de="#000",Un="round",ci=[],ui=0,jn="round",zr=10,Nr="#000",Br="center",_o="middle",yn=[0,0,0,0],Gr=1,di=new Re;let Zn=null,_l;const ml={},Py=function(){const t="32px ",e=["monospace","serif"],n=e.length,i="wmytzilWMYTZIL@#/&?$%10";let s,a;function h(d,f,p){let m=!0;for(let v=0;v<n;++v){const E=e[v];if(a=mo(d+" "+f+" "+t+E,i),p!=E){const C=mo(d+" "+f+" "+t+p+","+E,i);m=m&&C!=a}}return!!m}function c(){let d=!0;const f=di.getKeys();for(let p=0,m=f.length;p<m;++p){const v=f[p];di.get(v)<100&&(h.apply(this,v.split(`
16
+ `))?(Dn(ml),Zn=null,_l=void 0,di.set(v,100)):(di.set(v,di.get(v)+1,!0),d=!1))}d&&(clearInterval(s),s=void 0)}return function(d){const f=Hu(d);if(!f)return;const p=f.families;for(let m=0,v=p.length;m<v;++m){const E=p[m],C=f.style+`
17
17
  `+f.weight+`
18
- `+E;di.get(b)===void 0&&(di.set(b,100,!0),h(f.style,f.weight,E)||(di.set(b,0,!0),s===void 0&&(s=setInterval(c,32))))}}}(),ky=function(){let r;return function(t){let e=ml[t];if(e==null){if(qa){const n=Hu(t),i=Yu(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else r||(r=document.createElement("div"),r.innerHTML="M",r.style.minHeight="0",r.style.maxHeight="none",r.style.height="auto",r.style.padding="0",r.style.border="none",r.style.position="absolute",r.style.display="block",r.style.left="-99999px"),r.style.font=t,document.body.appendChild(r),e=r.offsetHeight,document.body.removeChild(r);ml[t]=e}return e}}();function Yu(r,t){return Zn||(Zn=ee(1,1)),r!=_l&&(Zn.font=r,_l=Zn.font),Zn.measureText(t)}function mo(r,t){return Yu(r,t).width}function Ku(r,t,e){if(t in e)return e[t];const n=t.split(`
18
+ `+E;di.get(C)===void 0&&(di.set(C,100,!0),h(f.style,f.weight,E)||(di.set(C,0,!0),s===void 0&&(s=setInterval(c,32))))}}}(),ky=function(){let r;return function(t){let e=ml[t];if(e==null){if(qa){const n=Hu(t),i=Yu(t,"Žg");e=(isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight))*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else r||(r=document.createElement("div"),r.innerHTML="M",r.style.minHeight="0",r.style.maxHeight="none",r.style.height="auto",r.style.padding="0",r.style.border="none",r.style.position="absolute",r.style.display="block",r.style.left="-99999px"),r.style.font=t,document.body.appendChild(r),e=r.offsetHeight,document.body.removeChild(r);ml[t]=e}return e}}();function Yu(r,t){return Zn||(Zn=ee(1,1)),r!=_l&&(Zn.font=r,_l=Zn.font),Zn.measureText(t)}function mo(r,t){return Yu(r,t).width}function Ku(r,t,e){if(t in e)return e[t];const n=t.split(`
19
19
  `).reduce((i,s)=>Math.max(i,mo(r,s)),0);return e[t]=n,n}function Ry(r,t){const e=[],n=[],i=[];let s=0,a=0,h=0,c=0;for(let d=0,f=t.length;d<=f;d+=2){const p=t[d];if(p===`
20
- `||d===f){s=Math.max(s,a),i.push(a),a=0,h+=c;continue}const m=t[d+1]||r.font,v=mo(m,p);e.push(v),a+=v;const E=ky(m);n.push(E),c=Math.max(c,E)}return{width:s,height:h,widths:e,heights:n,lineWidths:i}}function Ay(r,t,e,n,i,s,a,h,c,d,f){r.save(),e!==1&&(r.globalAlpha*=e),t&&r.transform.apply(r,t),n.contextInstructions?(r.translate(c,d),r.scale(f[0],f[1]),Iy(n,r)):f[0]<0||f[1]<0?(r.translate(c,d),r.scale(f[0],f[1]),r.drawImage(n,i,s,a,h,0,0,a,h)):r.drawImage(n,i,s,a,h,c,d,a*f[0],h*f[1]),r.restore()}function Iy(r,t){const e=r.contextInstructions;for(let n=0,i=e.length;n<i;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}class Dy extends Ey{constructor(t){super(t),this.fontChangeListenerKey_=gt(di,An.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=Fr+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0,this.declutterLayers_=[]}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const i=new Or(t,void 0,e);n.dispatchEvent(i)}}disposeInternal(){Tt(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(te.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(a,h){return a.zIndex-h.zIndex}),n=t.viewState;this.children_.length=0;const i=this.declutterLayers_;i.length=0;let s=null;for(let a=0,h=e.length;a<h;++a){const c=e[a];t.layerIndex=a;const d=c.layer,f=d.getSourceState();if(!pl(c,n)||f!="ready"&&f!="undefined"){d.unrender();continue}const p=d.render(t,s);p&&(p!==s&&(this.children_.push(p),s=p),"getDeclutter"in d&&i.push(d))}this.flushDeclutterItems(t),Sy(this.element_,this.children_),this.dispatchRenderEvent(te.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}flushDeclutterItems(t){const e=this.declutterLayers_;for(let n=e.length-1;n>=0;--n)e[n].renderDeclutter(t);e.length=0}}const Oy=Dy;class Fi extends ai{constructor(t,e){super(t),this.layer=e}}const yl={LAYERS:"layers"};class vl extends Uu{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(yl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new Xe(n.slice(),{unique:!0}):mt(typeof n.getArray=="function","Expected `layers` to be an array or a `Collection`"):n=new Xe(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Tt),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(gt(t,ue.ADD,this.handleLayersAdd_,this),gt(t,ue.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Tt);Dn(this.listenerKeys_);const e=t.getArray();for(let n=0,i=e.length;n<i;n++){const s=e[n];this.registerLayerListeners_(s),this.dispatchEvent(new Fi("addlayer",s))}this.changed()}registerLayerListeners_(t){const e=[gt(t,An.PROPERTYCHANGE,this.handleLayerChange_,this),gt(t,ct.CHANGE,this.handleLayerChange_,this)];t instanceof vl&&e.push(gt(t,"addlayer",this.handleLayerGroupAdd_,this),gt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[dt(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Fi("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Fi("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Fi("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=dt(e);this.listenerKeys_[n].forEach(Tt),delete this.listenerKeys_[n],this.dispatchEvent(new Fi("removelayer",e)),this.changed()}getLayers(){return this.get(yl.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let i=0,s=n.length;i<s;++i)this.dispatchEvent(new Fi("removelayer",n[i]))}this.set(yl.LAYERS,t)}getLayersArray(t){return t=t!==void 0?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=t!==void 0?t:[],n=e.length;this.getLayers().forEach(function(a){a.getLayerStatesArray(e)});const i=this.getLayerState();let s=i.zIndex;!t&&i.zIndex===void 0&&(s=0);for(let a=n,h=e.length;a<h;a++){const c=e[a];c.opacity*=i.opacity,c.visible=c.visible&&i.visible,c.maxResolution=Math.min(c.maxResolution,i.maxResolution),c.minResolution=Math.max(c.minResolution,i.minResolution),c.minZoom=Math.max(c.minZoom,i.minZoom),c.maxZoom=Math.min(c.maxZoom,i.maxZoom),i.extent!==void 0&&(c.extent!==void 0?c.extent=Sr(c.extent,i.extent):c.extent=i.extent),c.zIndex===void 0&&(c.zIndex=s)}return e}getSourceState(){return"ready"}}const yo=vl;class Fy extends ai{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const Wn=Fy;class zy extends Wn{constructor(t,e,n,i,s,a){super(t,e,s),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=i!==void 0?i:!1,this.activePointers=a}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const zi=zy,It={SINGLECLICK:"singleclick",CLICK:ct.CLICK,DBLCLICK:ct.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},xl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class Ny extends Ns{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e===void 0?1:e,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=gt(n,xl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=gt(n,xl.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(ct.TOUCHMOVE,this.boundHandleTouchMove_,uu?{passive:!1}:!1)}emulateClick_(t){let e=new zi(It.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new zi(It.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const n=new zi(It.SINGLECLICK,this.map_,t);this.dispatchEvent(n)},250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==It.POINTERUP||e.type==It.POINTERCANCEL){delete this.trackedTouches_[n];for(const i in this.trackedTouches_)if(this.trackedTouches_[i].target!==e.target){delete this.trackedTouches_[i];break}}else(e.type==It.POINTERDOWN||e.type==It.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new zi(It.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Tt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new zi(It.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(gt(n,It.POINTERMOVE,this.handlePointerMove_,this),gt(n,It.POINTERUP,this.handlePointerUp_,this),gt(this.element_,It.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(gt(this.element_.getRootNode(),It.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new zi(It.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new zi(It.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Tt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(ct.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Tt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Tt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const By=Ny,fi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Vt={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},vo=1/0;class Gy{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Dn(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const i=this.keyFunction_(n);return delete this.queuedElements_[i],n}enqueue(t){mt(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=vo?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,i=e.length,s=e[t],a=n[t],h=t;for(;t<i>>1;){const c=this.getLeftChildIndex_(t),d=this.getRightChildIndex_(t),f=d<i&&n[d]<n[c]?d:c;e[t]=e[f],n[t]=n[f],t=f}e[t]=s,n[t]=a,this.siftDown_(h,t)}siftDown_(t,e){const n=this.elements_,i=this.priorities_,s=n[e],a=i[e];for(;e>t;){const h=this.getParentIndex_(e);if(i[h]>a)n[e]=n[h],i[e]=i[h],e=h;else break}n[e]=s,i[e]=a}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let i=0;const s=e.length;let a,h,c;for(h=0;h<s;++h)a=e[h],c=t(a),c==vo?delete this.queuedElements_[this.keyFunction_(a)]:(n[i]=c,e[i++]=a);e.length=i,n.length=i,this.heapify_()}}const Uy=Gy,nt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class jy extends Uy{constructor(t,e){super(function(n){return t.apply(null,n)},function(n){return n[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(ct.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,n=e.getState();if(n===nt.LOADED||n===nt.ERROR||n===nt.EMPTY){n!==nt.ERROR&&e.removeEventListener(ct.CHANGE,this.boundHandleTileChange_);const i=e.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,i,s,a;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)s=this.dequeue()[0],a=s.getKey(),i=s.getState(),i===nt.IDLE&&!(a in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[a]=!0,++this.tilesLoading_,++n,s.load())}}const Zy=jy;function Wy(r,t,e,n,i){if(!r||!(e in r.wantedTiles)||!r.wantedTiles[e][t.getKey()])return vo;const s=r.viewState.center,a=n[0]-s[0],h=n[1]-s[1];return 65536*Math.log(i)+Math.sqrt(a*a+h*h)/i}class Hy extends Re{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){po(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&po(this.element);for(let e=0,n=this.listenerKeys.length;e<n;++e)Tt(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==In&&this.listenerKeys.push(gt(t,fi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const xo=Hy;class Vy extends xo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=t.collapsible!==void 0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const e=t.className!==void 0?t.className:"ol-attribution",n=t.tipLabel!==void 0?t.tipLabel:"Attributions",i=t.expandClassName!==void 0?t.expandClassName:e+"-expand",s=t.collapseLabel!==void 0?t.collapseLabel:"›",a=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=a):this.collapseLabel_=s;const h=t.label!==void 0?t.label:"i";typeof h=="string"?(this.label_=document.createElement("span"),this.label_.textContent=h,this.label_.className=i):this.label_=h;const c=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=n,this.toggleButton_.appendChild(c),this.toggleButton_.addEventListener(ct.CLICK,this.handleClick_.bind(this),!1);const d=e+" "+Fr+" "+uo+(this.collapsed_&&this.collapsible_?" "+Zu:"")+(this.collapsible_?"":" ol-uncollapsible"),f=this.element;f.className=d,f.appendChild(this.toggleButton_),f.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap(i=>i.getAttributions(t)))),n=!this.getMap().getAllLayers().some(i=>i.getSource()&&i.getSource().getAttributionsCollapsible()===!1);return this.overrideCollapsible_||this.setCollapsible(n),e}updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!li(e,this.renderedAttributions_)){Vu(this.ulElement_);for(let i=0,s=e.length;i<s;++i){const a=document.createElement("li");a.innerHTML=e[i],this.ulElement_.appendChild(a)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Zu),this.collapsed_?go(this.collapseLabel_,this.label_):go(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}const qu=Vy;class Xy extends xo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=t.className!==void 0?t.className:"ol-rotate",n=t.label!==void 0?t.label:"⇧",i=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=i,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(i));const s=t.tipLabel?t.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=s,a.appendChild(this.label_),a.addEventListener(ct.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+Fr+" "+uo,c=this.element;c.className=h,c.appendChild(a),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=t.duration!==void 0?t.duration:250,this.autoHide_=t.autoHide!==void 0?t.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(co)}handleClick_(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const n=e.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Gn}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const i="rotate("+n+"rad)";if(this.autoHide_){const s=this.element.classList.contains(co);!s&&n===0?this.element.classList.add(co):s&&n!==0&&this.element.classList.remove(co)}this.label_.style.transform=i}this.rotation_=n}}const Yy=Xy;class Ky extends xo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,i=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",s=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",a=t.zoomInLabel!==void 0?t.zoomInLabel:"+",h=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",c=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",d=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=i,f.setAttribute("type","button"),f.title=c,f.appendChild(typeof a=="string"?document.createTextNode(a):a),f.addEventListener(ct.CLICK,this.handleClick_.bind(this,n),!1);const p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=d,p.appendChild(typeof h=="string"?document.createTextNode(h):h),p.addEventListener(ct.CLICK,this.handleClick_.bind(this,-n),!1);const m=e+" "+Fr+" "+uo,v=this.element;v.className=m,v.appendChild(f),v.appendChild(p),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const i=n.getZoom();if(i!==void 0){const s=n.getConstrainedZoom(i+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:s,duration:this.duration_,easing:Gn})):n.setZoom(s)}}}const qy=Ky;function Ju(r){r=r||{};const t=new Xe;return(r.zoom!==void 0?r.zoom:!0)&&t.push(new qy(r.zoomOptions)),(r.rotate!==void 0?r.rotate:!0)&&t.push(new Yy(r.rotateOptions)),(r.attribution!==void 0?r.attribution:!0)&&t.push(new qu(r.attributionOptions)),t}const Qu={ACTIVE:"active"};class Jy extends Re{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Qu.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Qu.ACTIVE,t)}setMap(t){this.map_=t}}function Qy(r,t,e){const n=r.getCenterInternal();if(n){const i=[n[0]+t[0],n[1]+t[1]];r.animateInternal({duration:e!==void 0?e:250,easing:Dm,center:r.getConstrainedCenter(i)})}}function wl(r,t,e,n){const i=r.getZoom();if(i===void 0)return;const s=r.getConstrainedZoom(i+t),a=r.getResolutionForZoom(s);r.getAnimating()&&r.cancelAnimations(),r.animate({resolution:a,anchor:e,duration:n!==void 0?n:250,easing:Gn})}const Ur=Jy;class $y extends Ur{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==It.DBLCLICK){const n=t.originalEvent,i=t.map,s=t.coordinate,a=n.shiftKey?-this.delta_:this.delta_,h=i.getView();wl(h,a,s,this.duration_),n.preventDefault(),e=!0}return!e}}const tv=$y;class ev extends Ur{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==It.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==It.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==It.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==It.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function El(r){const t=r.length;let e=0,n=0;for(let i=0;i<t;i++)e+=r[i].clientX,n+=r[i].clientY;return{clientX:e/t,clientY:n/t}}const jr=ev;function Ll(r){const t=arguments;return function(e){let n=!0;for(let i=0,s=t.length;i<s&&(n=n&&t[i](e),!!n);++i);return n}}const iv=function(r){const t=r.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},nv=function(r){const t=r.map.getTargetElement(),e=r.map.getOwnerDocument().activeElement;return t.contains(e)},$u=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?nv(r):!0},rv=Lr,td=function(r){const t=r.originalEvent;return t.button==0&&!(zm&&lu&&t.ctrlKey)},ed=function(r){const t=r.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},sv=function(r){const t=r.originalEvent;return lu?t.metaKey:t.ctrlKey},ov=function(r){const t=r.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},id=function(r){const t=r.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},bl=function(r){const t=r.originalEvent;return mt(t!==void 0,"mapBrowserEvent must originate from a pointer event"),t.pointerType=="mouse"},av=function(r){const t=r.originalEvent;return mt(t!==void 0,"mapBrowserEvent must originate from a pointer event"),t.isPrimary&&t.button===0};class lv extends jr{constructor(t){super({stopDown:zs}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:Ll(ed,av);this.condition_=t.onFocusOnly?Ll($u,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const n=this.targetPointers,i=e.getEventPixel(El(n));if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){const s=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],h=t.map.getView();xm(s,h.getResolution()),Ua(s,h.getRotation()),h.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,n=e.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const i=this.kinetic_.getDistance(),s=this.kinetic_.getAngle(),a=n.getCenterInternal(),h=e.getPixelFromCoordinateInternal(a),c=e.getCoordinateFromPixelInternal([h[0]-i*Math.cos(s),h[1]-i*Math.sin(s)]);n.animateInternal({center:n.getConstrainedCenter(c),duration:500,easing:Gn})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const hv=lv;class cv extends jr{constructor(t){t=t||{},super({stopDown:zs}),this.condition_=t.condition?t.condition:iv,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!bl(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===Ka)return;const i=e.getSize(),s=t.pixel,a=Math.atan2(i[1]/2-s[1],s[0]-i[0]/2);if(this.lastAngle_!==void 0){const h=a-this.lastAngle_;n.adjustRotationInternal(-h)}this.lastAngle_=a}handleUpEvent(t){return bl(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return bl(t)&&td(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const uv=cv;class dv extends Fs{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+n,i.top=Math.min(t[1],e[1])+n,i.width=Math.abs(e[0]-t[0])+n,i.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Oi([i])}getGeometry(){return this.geometry_}}const fv=dv,wo={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Cl extends ai{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class gv extends jr{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new fv(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:td,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const i=n[0]-e[0],s=n[1]-e[1];return i*i+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Cl(wo.BOXDRAG,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Cl(e?wo.BOXEND:wo.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Cl(wo.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const pv=gv;class _v extends pv{constructor(t){t=t||{};const e=t.condition?t.condition:ov;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let i=this.getGeometry();if(this.out_){const s=n.rotatedExtentForGeometry(i),a=n.getResolutionForExtentInternal(s),h=n.getResolution()/a;i=i.clone(),i.scale(h*h)}n.fitInternal(i,{duration:this.duration_,easing:Gn})}}const mv=_v,vn={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class yv extends Ur{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return ed(e)&&id(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==ct.KEYDOWN){const n=t.originalEvent,i=n.key;if(this.condition_(t)&&(i==vn.DOWN||i==vn.LEFT||i==vn.RIGHT||i==vn.UP)){const a=t.map.getView(),h=a.getResolution()*this.pixelDelta_;let c=0,d=0;i==vn.DOWN?d=-h:i==vn.LEFT?c=-h:i==vn.RIGHT?c=h:d=h;const f=[c,d];Ua(f,a.getRotation()),Qy(a,f,this.duration_),n.preventDefault(),e=!0}}return!e}}const vv=yv;class xv extends Ur{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!sv(e)&&id(e)},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==ct.KEYDOWN||t.type==ct.KEYPRESS){const n=t.originalEvent,i=n.key;if(this.condition_(t)&&(i==="+"||i==="-")){const s=t.map,a=i==="+"?this.delta_:-this.delta_,h=s.getView();wl(h,a,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const wv=xv;class Ev{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let n=e-3;for(;n>0&&this.points_[n+2]>t;)n-=3;const i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;const s=this.points_[e]-this.points_[n],a=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(a,s),this.initialVelocity_=Math.sqrt(s*s+a*a)/i,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const Lv=Ev;class bv extends Ur{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:rv;this.condition_=t.onFocusOnly?Ll($u,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==ct.WHEEL)return!0;const n=t.map,i=t.originalEvent;i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let s;if(t.type==ct.WHEEL&&(s=i.deltaY,Om&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=hu),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),s===0)return!1;this.lastDelta_=s;const a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const h=n.getView();if(this.mode_==="trackpad"&&!(h.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(h.getAnimating()&&h.cancelAnimations(),h.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),h.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=a,!1;this.totalDelta_+=s;const c=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),c),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-Dt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),wl(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const Cv=bv;class Tv extends jr{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=zs),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],i=this.targetPointers[1],s=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(this.lastAngle_!==void 0){const c=s-this.lastAngle_;this.rotationDelta_+=c,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=c}this.lastAngle_=s;const a=t.map,h=a.getView();h.getConstraints().rotation!==Ka&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(El(this.targetPointers))),this.rotating_&&(a.render(),h.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const Mv=Tv;class Sv extends jr{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=zs),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],i=this.targetPointers[1],s=n.clientX-i.clientX,a=n.clientY-i.clientY,h=Math.sqrt(s*s+a*a);this.lastDistance_!==void 0&&(e=this.lastDistance_/h),this.lastDistance_=h;const c=t.map,d=c.getView();e!=1&&(this.lastScaleDelta_=e),this.anchor_=c.getCoordinateFromPixelInternal(c.getEventPixel(El(this.targetPointers))),c.render(),d.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const Pv=Sv;function kv(r){r=r||{};const t=new Xe,e=new Lv(-.005,.05,100);return(r.altShiftDragRotate!==void 0?r.altShiftDragRotate:!0)&&t.push(new uv),(r.doubleClickZoom!==void 0?r.doubleClickZoom:!0)&&t.push(new tv({delta:r.zoomDelta,duration:r.zoomDuration})),(r.dragPan!==void 0?r.dragPan:!0)&&t.push(new hv({onFocusOnly:r.onFocusOnly,kinetic:e})),(r.pinchRotate!==void 0?r.pinchRotate:!0)&&t.push(new Mv),(r.pinchZoom!==void 0?r.pinchZoom:!0)&&t.push(new Pv({duration:r.zoomDuration})),(r.keyboard!==void 0?r.keyboard:!0)&&(t.push(new vv),t.push(new wv({delta:r.zoomDelta,duration:r.zoomDuration}))),(r.mouseWheelZoom!==void 0?r.mouseWheelZoom:!0)&&t.push(new Cv({onFocusOnly:r.onFocusOnly,duration:r.zoomDuration})),(r.shiftDragZoom!==void 0?r.shiftDragZoom:!0)&&t.push(new mv({duration:r.zoomDuration})),t}function nd(r){return r[0]>0&&r[1]>0}function Rv(r,t,e){return e===void 0&&(e=[0,0]),e[0]=r[0]*t+.5|0,e[1]=r[1]*t+.5|0,e}function Le(r,t){return Array.isArray(r)?r:(t===void 0?t=[r,r]:(t[0]=r,t[1]=r),t)}function rd(r){if(r instanceof ho){r.setMapInternal(null);return}r instanceof yo&&r.getLayers().forEach(rd)}function sd(r,t){if(r instanceof ho){r.setMapInternal(t);return}if(r instanceof yo){const e=r.getLayers().getArray();for(let n=0,i=e.length;n<i;++n)sd(e[n],t)}}class Av extends Re{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=Iv(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,this.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:hu,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ht(),this.pixelToCoordinateTransform_=Ht(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver(()=>this.updateSize()),this.controls=e.controls||Ju(),this.interactions=e.interactions||kv({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Zy(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Vt.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Vt.VIEW,this.handleViewChanged_),this.addChangeListener(Vt.SIZE,this.handleSizeChanged_),this.addChangeListener(Vt.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof Ve)&&t.view.then(function(i){n.setView(new Ve(i))}),this.controls.addEventListener(ue.ADD,i=>{i.element.setMap(this)}),this.controls.addEventListener(ue.REMOVE,i=>{i.element.setMap(null)}),this.interactions.addEventListener(ue.ADD,i=>{i.element.setMap(this)}),this.interactions.addEventListener(ue.REMOVE,i=>{i.element.setMap(null)}),this.overlays_.addEventListener(ue.ADD,i=>{this.addOverlayInternal_(i.element)}),this.overlays_.addEventListener(ue.REMOVE,i=>{const s=i.element.getId();s!==void 0&&delete this.overlayIdIndex_[s.toString()],i.element.setMap(null)}),this.controls.forEach(i=>{i.setMap(this)}),this.interactions.forEach(i=>{i.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){sd(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const i=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const s=n.hitTolerance!==void 0?n.hitTolerance:0,a=n.layerFilter!==void 0?n.layerFilter:Lr,h=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,s,h,e,null,a,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(i){n.push(i)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(i){i instanceof yo?e(i.getLayers()):t.push(i)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const i=e.layerFilter!==void 0?e.layerFilter:Lr,s=e.hitTolerance!==void 0?e.hitTolerance:0,a=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,s,a,i,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const n=this.viewport_.getBoundingClientRect(),i=this.getSize(),s=n.width/i[0],a=n.height/i[1],h="changedTouches"in t?t.changedTouches[0]:t;return[(h.clientX-n.left)/s,(h.clientY-n.top)/a]}getTarget(){return this.get(Vt.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Va(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Nt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Vt.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Xe){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const i=t[e];if(!i.visible)continue;const s=i.layer.getRenderer();if(s&&!s.ready)return!0;const a=i.layer.getSource();if(a&&a.loading)return!0}return!1}getPixelFromCoordinate(t){const e=hi(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Nt(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Vt.SIZE)}getView(){return this.get(Vt.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,n,i){return Wy(this.frameState_,t,e,n,i)}handleBrowserEvent(t,e){e=e||t.type;const n=new zi(e,this,t);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,n=e.type;if(n===xl.POINTERDOWN||n===ct.WHEEL||n===ct.KEYDOWN){const i=this.getOwnerDocument(),s=this.viewport_.getRootNode?this.viewport_.getRootNode():i,a=e.target;if(this.overlayContainerStopEvent_.contains(a)||!(s===i?i.documentElement:s).contains(a))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const i=this.getInteractions().getArray().slice();for(let s=i.length-1;s>=0;s--){const a=i[s];if(a.getMap()!==this||!a.getActive()||!this.getTargetElement())continue;if(!a.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,s=i;if(t){const a=t.viewHints;if(a[Zt.ANIMATING]||a[Zt.INTERACTING]){const h=Date.now()-t.time>8;i=h?0:8,s=h?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,s))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(te.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(te.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Wn(fi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Wn(fi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let i=0,s=n.length;i<s;++i)n[i](this,t);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let n=0,i=this.targetChangeHandlerKeys_.length;n<i;++n)Tt(this.targetChangeHandlerKeys_[n]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(ct.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(ct.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,po(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const n=this.targetElement_.getRootNode();n instanceof ShadowRoot&&this.resizeObserver_.unobserve(n.host),this.setSize(void 0)}const t=this.getTarget(),e=typeof t=="string"?document.getElementById(t):t;if(this.targetElement_=e,!e)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Oy(this)),this.mapBrowserEventHandler_=new By(this,this.moveTolerance_);for(const s in It)this.mapBrowserEventHandler_.addEventListener(It[s],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(ct.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(ct.WHEEL,this.boundHandleBrowserEvent_,uu?{passive:!1}:!1);const n=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[gt(n,ct.KEYDOWN,this.handleBrowserEvent,this),gt(n,ct.KEYPRESS,this.handleBrowserEvent,this)];const i=e.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(e)}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Tt(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Tt(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=gt(t,An.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=gt(t,ct.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Tt),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Fi("addlayer",t)),this.layerGroupPropertyListenerKeys_=[gt(t,An.PROPERTYCHANGE,this.render,this),gt(t,ct.CHANGE,this.render,this),gt(t,"addlayer",this.handleLayerAdd_,this),gt(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}flushDeclutterItems(){const t=this.frameState_;t&&this.renderer_.flushDeclutterItems(t)}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){rd(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),i=this.frameState_;let s=null;if(e!==void 0&&nd(e)&&n&&n.isDef()){const a=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),h=n.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Na(h.center,h.resolution,h.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:h,viewHints:a,wantedTiles:{},mapId:dt(this),renderTargets:{}},h.nextCenter&&h.nextResolution){const c=isNaN(h.nextRotation)?h.rotation:h.nextRotation;s.nextExtent=Na(h.nextCenter,h.nextResolution,c,e)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),i&&(!this.previousExtent_||!Ys(this.previousExtent_)&&!Nn(s.extent,this.previousExtent_))&&(this.dispatchEvent(new Wn(fi.MOVESTART,this,i)),this.previousExtent_=Tr(this.previousExtent_)),this.previousExtent_&&!s.viewHints[Zt.ANIMATING]&&!s.viewHints[Zt.INTERACTING]&&!Nn(s.extent,this.previousExtent_)&&(this.dispatchEvent(new Wn(fi.MOVEEND,this,s)),Uc(s.extent,this.previousExtent_))),this.dispatchEvent(new Wn(fi.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(fi.LOADSTART)||this.hasListener(fi.LOADEND)||this.hasListener(te.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Fi("removelayer",e)),this.set(Vt.LAYERGROUP,t)}setSize(t){this.set(Vt.SIZE,t)}setTarget(t){this.set(Vt.TARGET,t)}setView(t){if(!t||t instanceof Ve){this.set(Vt.VIEW,t);return}this.set(Vt.VIEW,new Ve);const e=this;t.then(function(n){e.setView(new Ve(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),s=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),a=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);!isNaN(s)&&!isNaN(a)&&(e=[s,a],!nd(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&qc("No map visible because the map container's width or height are 0."))}const n=this.getSize();e&&(!n||!li(e,n))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}function Iv(r){let t=null;r.keyboardEventTarget!==void 0&&(t=typeof r.keyboardEventTarget=="string"?document.getElementById(r.keyboardEventTarget):r.keyboardEventTarget);const e={},n=r.layers&&typeof r.layers.getLayers=="function"?r.layers:new yo({layers:r.layers});e[Vt.LAYERGROUP]=n,e[Vt.TARGET]=r.target,e[Vt.VIEW]=r.view instanceof Ve?r.view:new Ve;let i;r.controls!==void 0&&(Array.isArray(r.controls)?i=new Xe(r.controls.slice()):(mt(typeof r.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),i=r.controls));let s;r.interactions!==void 0&&(Array.isArray(r.interactions)?s=new Xe(r.interactions.slice()):(mt(typeof r.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),s=r.interactions));let a;return r.overlays!==void 0?Array.isArray(r.overlays)?a=new Xe(r.overlays.slice()):(mt(typeof r.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),a=r.overlays):a=new Xe,{controls:i,interactions:s,keyboardEventTarget:t,overlays:a,values:e}}const Dv=Av,St={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Tl{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Le(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Tl({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return ot()}getImage(t){return ot()}getHitDetectionImage(){return ot()}getPixelRatio(t){return 1}getImageState(){return ot()}getImageSize(){return ot()}getOrigin(){return ot()}getSize(){return ot()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Le(t)}listenImageChange(t){ot()}load(){ot()}unlistenImageChange(t){ot()}}const od=Tl;function Ye(r){return Array.isArray(r)?Bu(r):r}class Ml extends od{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_,this.renderOptions_,this.render()}clone(){const t=this.getScale(),e=new Ml({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const n=this.renderOptions_,i=ee(n.size*t,n.size*t);this.draw_(n,i,t),e=i.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return St.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let i=this.radius_,s=this.radius2_===void 0?i:this.radius2_;if(i<s){const k=i;i=s,s=k}const a=this.radius2_===void 0?this.points_:this.points_*2,h=2*Math.PI/a,c=s*Math.sin(h),d=Math.sqrt(s*s-c*c),f=i-d,p=Math.sqrt(c*c+f*f),m=p/c;if(t==="miter"&&m<=n)return m*e;const v=e/2/m,E=e/2*(f/p),M=Math.sqrt((i+v)*(i+v)+E*E)-i;if(this.radius2_===void 0||t==="bevel")return M*2;const S=i*Math.sin(h),y=Math.sqrt(i*i-S*S),x=s-y,T=Math.sqrt(S*S+x*x)/S;if(T<=n){const k=T*e/2-s-i;return 2*Math.max(M,k)}return M*2}createRenderOptions(){let t=Un,e=jn,n=0,i=null,s=0,a,h=0;this.stroke_&&(a=Ye(this.stroke_.getColor()??Nr),h=this.stroke_.getWidth()??Gr,i=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset()??0,e=this.stroke_.getLineJoin()??jn,t=this.stroke_.getLineCap()??Un,n=this.stroke_.getMiterLimit()??zr);const c=this.calculateLineJoinSize_(e,h,n),d=Math.max(this.radius_,this.radius2_||0),f=Math.ceil(2*d+c);return{strokeStyle:a,strokeWidth:h,size:f,lineCap:t,lineDash:i,lineDashOffset:s,lineJoin:e,miterLimit:n}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let i=this.fill_.getColor();i===null&&(i=de),e.fillStyle=Ye(i),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let n=this.fill_.getColor(),i=0;typeof n=="string"&&(n=Dr(n)),n===null?i=1:Array.isArray(n)&&(i=n.length===4?n[3]:1),i===0&&(e=ee(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const i=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const s=this.angle_-Math.PI/2,a=2*Math.PI/e;for(let h=0;h<e;h++){const c=s+h*a,d=h%2===0?n:i;t.lineTo(d*Math.cos(c),d*Math.sin(c))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=de,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const ad=Ml;class Sl extends ad{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new Sl({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const ld=Sl;class Pl{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Pl({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const Eo=Pl;class kl{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new kl({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const Lo=kl;class bo{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=hd,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new bo({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=hd,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Ov(r){let t;if(typeof r=="function")t=r;else{let e;Array.isArray(r)?e=r:(mt(typeof r.getZIndex=="function","Expected an `Style` or an array of `Style`"),e=[r]),t=function(){return e}}return t}let Rl=null;function Fv(r,t){if(!Rl){const e=new Eo({color:"rgba(255,255,255,0.4)"}),n=new Lo({color:"#3399CC",width:1.25});Rl=[new bo({image:new ld({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Rl}function hd(r){return r.getGeometry()}const Hn=bo;function zv(r,t,e){const n=r;let i=!0,s=!1,a=!1;const h=[Bs(n,ct.LOAD,function(){a=!0,s||t()})];return n.src&&cu?(s=!0,n.decode().then(function(){i&&t()}).catch(function(c){i&&(a?t():e())})):h.push(Bs(n,ct.ERROR,e)),function(){i=!1,h.forEach(Tt)}}function Nv(r,t){return new Promise((e,n)=>{function i(){a(),e(r)}function s(){a(),n(new Error("Image load error"))}function a(){r.removeEventListener("load",i),r.removeEventListener("error",s)}r.addEventListener("load",i),r.addEventListener("error",s),t&&(r.src=t)})}function Bv(r,t){return t&&(r.src=t),r.src&&cu?new Promise((e,n)=>r.decode().then(()=>e(r)).catch(i=>r.complete&&r.width?e(r):n(i))):Nv(r)}let Zr=null;class Gv extends Ns{constructor(t,e,n,i,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=s,this.imageState_=i===void 0?St.IDLE:i,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===St.LOADED){Zr||(Zr=ee(1,1,void 0,{willReadFrequently:!0})),Zr.drawImage(this.image_,0,0);try{Zr.getImageData(0,0,1,1),this.tainted_=!1}catch{Zr=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(ct.CHANGE)}handleImageError_(){this.imageState_=St.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=St.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=ee(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===St.IDLE){this.image_||this.initializeImage_(),this.imageState_=St.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Bv(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==St.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const i=n.getContext("2d");i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle=Fu(this.color_),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=n}}function Uv(r,t,e,n,i){let s=t===void 0?void 0:lo.get(t,e,i);return s||(s=new Gv(r,r instanceof HTMLImageElement?r.src||void 0:t,e,n,i),lo.set(t,e,i,s)),s}function cd(r,t,e,n){return e!==void 0&&n!==void 0?[e/r,n/t]:e!==void 0?e/r:n!==void 0?n/t:1}class Al extends od{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,i=t.scale!==void 0?t.scale:1,s=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:i,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const a=t.img!==void 0?t.img:null;let h=t.src;mt(!(h!==void 0&&a),"`image` and `src` cannot be provided at the same time"),(h===void 0||h.length===0)&&a&&(h=a.src||dt(a)),mt(h!==void 0&&h.length>0,"A defined and non-empty `src` or `image` must be provided"),mt(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let c;if(t.src!==void 0?c=St.IDLE:a!==void 0&&(a instanceof HTMLImageElement?a.complete?c=a.src?St.LOADED:St.IDLE:c=St.LOADING:c=St.LOADED),this.color_=t.color!==void 0?Dr(t.color):null,this.iconImage_=Uv(a,h,this.crossOrigin_,c,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let d,f;if(t.size)[d,f]=t.size;else{const p=this.getImage(1);if(p.width&&p.height)d=p.width,f=p.height;else if(p instanceof HTMLImageElement){this.initialOptions_=t;const m=()=>{if(this.unlistenImageChange(m),!this.initialOptions_)return;const v=this.iconImage_.getSize();this.setScale(cd(v[0],v[1],t.width,t.height))};this.listenImageChange(m);return}}d!==void 0&&this.setScale(cd(d,f,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Al({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const i=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!i)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=i[0]),this.anchorYUnits_=="fraction"&&(t[1]*=i[1])}if(this.anchorOrigin_!="top-left"){if(!i)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+i[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+i[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==St.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==St.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(ct.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(ct.CHANGE,t)}}const Il=Al,jv="#333";class Dl{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Le(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new Eo({color:jv}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Dl({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Le(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const ud=Dl;let Vn=0;const Xn=0,Ot=1<<Vn++,Q=1<<Vn++,De=1<<Vn++,ie=1<<Vn++,Ni=1<<Vn++,fe=Math.pow(2,Vn)-1,dd={[Ot]:"boolean",[Q]:"number",[De]:"string",[ie]:"color",[Ni]:"number[]"},Zv=Object.keys(dd).map(Number).sort(Pi);function ne(r){const t=[];for(const e of Zv)Wv(r,e)&&t.push(dd[e]);return t.length===0?"untyped":t.length<3?t.join(" or "):t.slice(0,-1).join(", ")+", or "+t[t.length-1]}function Wv(r,t){return(r&t)===t}function Ke(r,t){return!!(r&t)}function Co(r,t){return r===t}class Bi{constructor(t,e){this.type=t,this.value=e}}class Hv{constructor(t,e,...n){this.type=t,this.operator=e,this.args=n}}function fd(){return{variables:new Set,properties:new Set,featureId:!1,style:{}}}function Vv(r){switch(r){case"string":return De;case"color":return ie;case"number":return Q;case"boolean":return Ot;case"number[]":return Ni;default:throw new Error(`Unrecognized type hint: ${r}`)}}function Ct(r,t,e){switch(typeof r){case"boolean":return new Bi(Ot,r);case"number":return new Bi(Q,r);case"string":{let i=De;return _y(r)&&(i|=ie),Co(i&e,Xn)||(i&=e),new Bi(i,r)}}if(!Array.isArray(r))throw new Error("Expression must be an array or a primitive value");if(r.length===0)throw new Error("Empty expression");if(typeof r[0]=="string")return n0(r,t,e);for(const i of r)if(typeof i!="number")throw new Error("Expected an array of numbers");let n=Ni;return(r.length===3||r.length===4)&&(n|=ie),e&&(n&=e),new Bi(n,r)}const N={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette"},Xv={[N.Get]:lt(([r,t])=>t!==void 0?Vv(t.value):fe,pt(1,2),Yv),[N.Var]:lt(([r])=>r.type,pt(1,1),Kv),[N.Id]:lt(Q|De,Wr,qv),[N.Concat]:lt(De,pt(2,1/0),Lt(fe)),[N.GeometryType]:lt(De,Wr),[N.Resolution]:lt(Q,Wr),[N.Zoom]:lt(Q,Wr),[N.Time]:lt(Q,Wr),[N.Any]:lt(Ot,pt(2,1/0),Lt(Ot)),[N.All]:lt(Ot,pt(2,1/0),Lt(Ot)),[N.Not]:lt(Ot,pt(1,1),Lt(Ot)),[N.Equal]:lt(Ot,pt(2,2),Lt(fe),xn),[N.NotEqual]:lt(Ot,pt(2,2),Lt(fe),xn),[N.GreaterThan]:lt(Ot,pt(2,2),Lt(fe),xn),[N.GreaterThanOrEqualTo]:lt(Ot,pt(2,2),Lt(fe),xn),[N.LessThan]:lt(Ot,pt(2,2),Lt(fe),xn),[N.LessThanOrEqualTo]:lt(Ot,pt(2,2),Lt(fe),xn),[N.Multiply]:lt(r=>{let t=Q|ie;for(let e=0;e<r.length;e++)t&=r[e].type;return t},pt(2,1/0),Lt(Q|ie),xn),[N.Divide]:lt(Q,pt(2,2),Lt(Q)),[N.Add]:lt(Q,pt(2,1/0),Lt(Q)),[N.Subtract]:lt(Q,pt(2,2),Lt(Q)),[N.Clamp]:lt(Q,pt(3,3),Lt(Q)),[N.Mod]:lt(Q,pt(2,2),Lt(Q)),[N.Pow]:lt(Q,pt(2,2),Lt(Q)),[N.Abs]:lt(Q,pt(1,1),Lt(Q)),[N.Floor]:lt(Q,pt(1,1),Lt(Q)),[N.Ceil]:lt(Q,pt(1,1),Lt(Q)),[N.Round]:lt(Q,pt(1,1),Lt(Q)),[N.Sin]:lt(Q,pt(1,1),Lt(Q)),[N.Cos]:lt(Q,pt(1,1),Lt(Q)),[N.Atan]:lt(Q,pt(1,2),Lt(Q)),[N.Sqrt]:lt(Q,pt(1,1),Lt(Q)),[N.Match]:lt(r=>{let t=fe;for(let e=2;e<r.length;e+=2)t&=r[e].type;return t&=r[r.length-1].type,t},pt(4,1/0),gd,Qv),[N.Between]:lt(Ot,pt(3,3),Lt(Q)),[N.Interpolate]:lt(r=>{let t=ie|Q;for(let e=3;e<r.length;e+=2)t&=r[e].type;return t},pt(6,1/0),gd,$v),[N.Case]:lt(r=>{let t=fe;for(let e=1;e<r.length;e+=2)t&=r[e].type;return t&=r[r.length-1].type,t},pt(3,1/0),Jv,t0),[N.In]:lt(Ot,pt(2,2),e0),[N.Number]:lt(Q,pt(1,1/0),Lt(fe)),[N.String]:lt(De,pt(1,1/0),Lt(fe)),[N.Array]:lt(r=>r.length===3||r.length===4?Ni|ie:Ni,pt(1,1/0),Lt(Q)),[N.Color]:lt(ie,pt(3,4),Lt(Q)),[N.Band]:lt(Q,pt(1,3),Lt(Q)),[N.Palette]:lt(ie,pt(2,2),i0)};function Yv(r,t){const e=Ct(r[1],t);if(!(e instanceof Bi))throw new Error("Expected a literal argument for get operation");if(typeof e.value!="string")throw new Error("Expected a string argument for get operation");if(t.properties.add(e.value),r.length===3){const n=Ct(r[2],t);return[e,n]}return[e]}function Kv(r,t,e,n){const i=r[1];if(typeof i!="string")throw new Error("Expected a string argument for var operation");if(t.variables.add(i),!("variables"in t.style)||t.style.variables[i]===void 0)return[new Bi(fe,i)];const s=t.style.variables[i],a=Ct(s,t);if(a.value=i,n&&!Ke(n,a.type))throw new Error(`The variable ${i} has type ${ne(a.type)} but the following type was expected: ${ne(n)}`);return[a]}function qv(r,t){t.featureId=!0}function Wr(r,t){const e=r[0];if(r.length!==1)throw new Error(`Expected no arguments for ${e} operation`);return[]}function pt(r,t){return function(e,n){const i=e[0],s=e.length-1;if(r===t){if(s!==r){const a=r===1?"":"s";throw new Error(`Expected ${r} argument${a} for ${i}, got ${s}`)}}else if(s<r||s>t){const a=t===1/0?`${r} or more`:`${r} to ${t}`;throw new Error(`Expected ${a} arguments for ${i}, got ${s}`)}}}function Lt(r){return function(t,e){const n=t[0],i=t.length-1,s=new Array(i);for(let a=0;a<i;++a){const h=Ct(t[a+1],e);if(!Ke(r,h.type)){const c=ne(r),d=ne(h.type);throw new Error(`Unexpected type for argument ${a} of ${n} operation, got ${c} but expected ${d}`)}h.type&=r,s[a]=h}return s}}function xn(r,t,e){const n=r[0],i=r.length-1;let s=fe;for(let h=0;h<e.length;++h)s&=e[h].type;if(s===Xn)throw new Error(`No common type could be found for arguments of ${n} operation`);const a=new Array(i);for(let h=0;h<i;++h)a[h]=Ct(r[h+1],t,s);return a}function Jv(r,t){const e=r[0],n=r.length-1;if(n%2===0)throw new Error(`An odd amount of arguments was expected for operation ${e}, got ${JSON.stringify(n)} instead`)}function gd(r,t){const e=r[0],n=r.length-1;if(n%2===1)throw new Error(`An even amount of arguments was expected for operation ${e}, got ${JSON.stringify(n)} instead`)}function Qv(r,t,e,n){const i=r.length-1;let a=Ct(r[1],t).type;const h=Ct(r[r.length-1],t);let c=n!==void 0?n&h.type:h.type;const d=new Array(i-2);for(let p=0;p<i-2;p+=2){const m=Ct(r[p+2],t),v=Ct(r[p+3],t);a&=m.type,c&=v.type,d[p]=m,d[p+1]=v}const f=De|Q|Ot;if(!Ke(f,a))throw new Error(`Expected an input of type ${ne(f)} for the interpolate operation, got ${ne(a)} instead`);if(Co(c,Xn))throw new Error("Could not find a common output type for the following match operation: "+JSON.stringify(r));for(let p=0;p<i-2;p+=2){const m=Ct(r[p+2],t,a),v=Ct(r[p+3],t,c);d[p]=m,d[p+1]=v}return[Ct(r[1],t,a),...d,Ct(r[r.length-1],t,c)]}function $v(r,t,e,n){const i=r[1];let s;switch(i[0]){case"linear":s=1;break;case"exponential":if(s=i[1],typeof s!="number")throw new Error(`Expected a number base for exponential interpolation, got ${JSON.stringify(s)} instead`);break;default:s=null}if(!s)throw new Error(`Invalid interpolation type: ${JSON.stringify(i)}`);s=Ct(s,t);let a=Ct(r[2],t);if(!Ke(Q,a.type))throw new Error(`Expected an input of type number for the interpolate operation, got ${ne(a.type)} instead`);a=Ct(r[2],t,Q);const h=new Array(r.length-3);for(let c=0;c<h.length;c+=2){let d=Ct(r[c+3],t);if(!Ke(Q,d.type))throw new Error(`Expected all stop input values in the interpolate operation to be of type number, got ${ne(d.type)} at position ${c+2} instead`);let f=Ct(r[c+4],t);if(!Ke(Q|ie,f.type))throw new Error(`Expected all stop output values in the interpolate operation to be a number or color, got ${ne(f.type)} at position ${c+3} instead`);d=Ct(r[c+3],t,Q),f=Ct(r[c+4],t,Q|ie),h[c]=d,h[c+1]=f}return[s,a,...h]}function t0(r,t,e,n){const i=Ct(r[r.length-1],t);let s=n!==void 0?n&i.type:i.type;const a=new Array(r.length-1);for(let h=0;h<a.length-1;h+=2){const c=Ct(r[h+1],t),d=Ct(r[h+2],t);if(!Ke(Ot,c.type))throw new Error(`Expected all conditions in the case operation to be of type boolean, got ${ne(c.type)} at position ${h} instead`);s&=d.type,a[h]=c,a[h+1]=d}if(Co(s,Xn))throw new Error("Could not find a common output type for the following case operation: "+JSON.stringify(r));for(let h=0;h<a.length-1;h+=2)a[h+1]=Ct(r[h+2],t,s);return a[a.length-1]=Ct(r[r.length-1],t,s),a}function e0(r,t){let e=r[2];if(!Array.isArray(e))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');if(typeof e[0]=="string"){if(e[0]!=="literal")throw new Error('For the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions.');if(!Array.isArray(e[1]))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');e=e[1]}let n=De|Q;const i=new Array(e.length);for(let a=0;a<i.length;a++){const h=Ct(e[a],t);n&=h.type,i[a]=h}if(Co(n,Xn))throw new Error("Could not find a common type for the following in operation: "+JSON.stringify(r));return[Ct(r[1],t,n),...i]}function i0(r,t){const e=Ct(r[1],t,Q);if(e.type!==Q)throw new Error(`The first argument of palette must be an number, got ${ne(e.type)} instead`);const n=r[2];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const i=new Array(n.length);for(let s=0;s<i.length;s++){const a=Ct(n[s],t,ie);if(!(a instanceof Bi))throw new Error(`The palette color at index ${s} must be a literal value`);if(!Ke(a.type,ie))throw new Error(`The palette color at index ${s} should be of type color, got ${ne(a.type)} instead`);i[s]=a}return[e,...i]}function lt(r,...t){return function(e,n,i){const s=e[0];let a=[];for(let c=0;c<t.length;c++)a=t[c](e,n,a,i)||a;let h=typeof r=="function"?r(a):r;if(i!==void 0){if(!Ke(h,i))throw new Error(`The following expression was expected to return ${ne(i)}, but returns ${ne(h)} instead: ${JSON.stringify(e)}`);h&=i}if(h===Xn)throw new Error(`No matching type was found for the following expression: ${JSON.stringify(e)}`);return new Hv(h,s,...a)}}function n0(r,t,e){const n=r[0],i=Xv[n];if(!i)throw new Error(`Unknown operator: ${n}`);return i(r,t,e)}function pd(){return{variables:{},properties:{},resolution:NaN,featureId:null}}function Gi(r,t,e){const n=Ct(r,e);if(!Ke(t,n.type)){const i=ne(t),s=ne(n.type);throw new Error(`Expected expression to be of type ${i}, got ${s}`)}return gi(n)}function gi(r,t){if(r instanceof Bi){if(r.type===ie&&typeof r.value=="string"){const n=gl(r.value);return function(){return n}}return function(){return r.value}}const e=r.operator;switch(e){case N.Number:case N.String:return r0(r);case N.Get:case N.Var:return s0(r);case N.Id:return n=>n.featureId;case N.Concat:{const n=r.args.map(i=>gi(i));return i=>"".concat(...n.map(s=>s(i).toString()))}case N.Resolution:return n=>n.resolution;case N.Any:case N.All:case N.Not:return a0(r);case N.Equal:case N.NotEqual:case N.LessThan:case N.LessThanOrEqualTo:case N.GreaterThan:case N.GreaterThanOrEqualTo:return o0(r);case N.Multiply:case N.Divide:case N.Add:case N.Subtract:case N.Clamp:case N.Mod:case N.Pow:case N.Abs:case N.Floor:case N.Ceil:case N.Round:case N.Sin:case N.Cos:case N.Atan:case N.Sqrt:return l0(r);case N.Match:return h0(r);case N.Interpolate:return c0(r);default:throw new Error(`Unsupported operator ${e}`)}}function r0(r,t){const e=r.operator,n=r.args.length,i=new Array(n);for(let s=0;s<n;++s)i[s]=gi(r.args[s]);switch(e){case N.Number:case N.String:return s=>{for(let a=0;a<n;++a){const h=i[a](s);if(typeof h===e)return h}throw new Error(`Expected one of the values to be a ${e}`)};default:throw new Error(`Unsupported assertion operator ${e}`)}}function s0(r,t){const n=r.args[0].value;switch(r.operator){case N.Get:return i=>i.properties[n];case N.Var:return i=>i.variables[n];default:throw new Error(`Unsupported accessor operator ${r.operator}`)}}function o0(r,t){const e=r.operator,n=gi(r.args[0]),i=gi(r.args[1]);switch(e){case N.Equal:return s=>n(s)===i(s);case N.NotEqual:return s=>n(s)!==i(s);case N.LessThan:return s=>n(s)<i(s);case N.LessThanOrEqualTo:return s=>n(s)<=i(s);case N.GreaterThan:return s=>n(s)>i(s);case N.GreaterThanOrEqualTo:return s=>n(s)>=i(s);default:throw new Error(`Unsupported comparison operator ${e}`)}}function a0(r,t){const e=r.operator,n=r.args.length,i=new Array(n);for(let s=0;s<n;++s)i[s]=gi(r.args[s]);switch(e){case N.Any:return s=>{for(let a=0;a<n;++a)if(i[a](s))return!0;return!1};case N.All:return s=>{for(let a=0;a<n;++a)if(!i[a](s))return!1;return!0};case N.Not:return s=>!i[0](s);default:throw new Error(`Unsupported logical operator ${e}`)}}function l0(r,t){const e=r.operator,n=r.args.length,i=new Array(n);for(let s=0;s<n;++s)i[s]=gi(r.args[s]);switch(e){case N.Multiply:return s=>{let a=1;for(let h=0;h<n;++h)a*=i[h](s);return a};case N.Divide:return s=>i[0](s)/i[1](s);case N.Add:return s=>{let a=0;for(let h=0;h<n;++h)a+=i[h](s);return a};case N.Subtract:return s=>i[0](s)-i[1](s);case N.Clamp:return s=>{const a=i[0](s),h=i[1](s);if(a<h)return h;const c=i[2](s);return a>c?c:a};case N.Mod:return s=>i[0](s)%i[1](s);case N.Pow:return s=>Math.pow(i[0](s),i[1](s));case N.Abs:return s=>Math.abs(i[0](s));case N.Floor:return s=>Math.floor(i[0](s));case N.Ceil:return s=>Math.ceil(i[0](s));case N.Round:return s=>Math.round(i[0](s));case N.Sin:return s=>Math.sin(i[0](s));case N.Cos:return s=>Math.cos(i[0](s));case N.Atan:return n===2?s=>Math.atan2(i[0](s),i[1](s)):s=>Math.atan(i[0](s));case N.Sqrt:return s=>Math.sqrt(i[0](s));default:throw new Error(`Unsupported numeric operator ${e}`)}}function h0(r,t){const e=r.args.length,n=new Array(e);for(let i=0;i<e;++i)n[i]=gi(r.args[i]);return i=>{const s=n[0](i);for(let a=1;a<e;a+=2)if(s===n[a](i))return n[a+1](i);return n[e-1](i)}}function c0(r,t){const e=r.args.length,n=new Array(e);for(let i=0;i<e;++i)n[i]=gi(r.args[i]);return i=>{const s=n[0](i),a=n[1](i);let h,c;for(let d=2;d<e;d+=2){const f=n[d](i);let p=n[d+1](i);const m=Array.isArray(p);if(m&&(p=gy(p)),f>=a)return d===2?p:m?u0(s,a,h,c,f,p):Hr(s,a,h,c,f,p);h=f,c=p}return c}}function Hr(r,t,e,n,i,s){const a=i-e;if(a===0)return n;const h=t-e,c=r===1?h/a:(Math.pow(r,h)-1)/(Math.pow(r,a)-1);return n+c*(s-n)}function u0(r,t,e,n,i,s){if(i-e===0)return n;const h=zu(n),c=zu(s);let d=c[2]-h[2];d>180?d-=360:d<-180&&(d+=360);const f=[Hr(r,t,e,h[0],i,c[0]),Hr(r,t,e,h[1],i,c[1]),h[2]+Hr(r,t,e,0,i,d),Hr(r,t,e,n[3],i,s[3])];return Nu(py(f))}function d0(r){return!0}function f0(r){const t=fd(),e=g0(r,t),n=pd();return function(i,s){if(n.properties=i.getPropertiesInternal(),n.resolution=s,t.featureId){const a=i.getId();a!==void 0?n.featureId=a:n.featureId=null}return e(n)}}function _d(r){const t=fd(),e=r.length,n=new Array(e);for(let a=0;a<e;++a)n[a]=Ol(r[a],t);const i=pd(),s=new Array(e);return function(a,h){if(i.properties=a.getPropertiesInternal(),i.resolution=h,t.featureId){const d=a.getId();d!==void 0?i.featureId=d:i.featureId=null}let c=0;for(let d=0;d<e;++d){const f=n[d](i);f&&(s[c]=f,c+=1)}return s.length=c,s}}function g0(r,t){const e=r.length,n=new Array(e);for(let i=0;i<e;++i){const s=r[i],a="filter"in s?Gi(s.filter,Ot,t):d0;let h;if(Array.isArray(s.style)){const c=s.style.length;h=new Array(c);for(let d=0;d<c;++d)h[d]=Ol(s.style[d],t)}else h=[Ol(s.style,t)];n[i]={filter:a,styles:h}}return function(i){const s=[];let a=!1;for(let h=0;h<e;++h){const c=n[h].filter;if(c(i)&&!(r[h].else&&a)){a=!0;for(const d of n[h].styles){const f=d(i);f&&s.push(f)}}}return s}}function Ol(r,t){const e=Vr(r,"",t),n=Xr(r,"",t),i=p0(r,t),s=_0(r,t),a=ge(r,"z-index",t);if(!e&&!n&&!i&&!s&&!on(r))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(r));const h=new Hn;return function(c){let d=!0;if(e){const f=e(c);f&&(d=!1),h.setFill(f)}if(n){const f=n(c);f&&(d=!1),h.setStroke(f)}if(i){const f=i(c);f&&(d=!1),h.setText(f)}if(s){const f=s(c);f&&(d=!1),h.setImage(f)}return a&&h.setZIndex(a(c)),d?null:h}}function Vr(r,t,e){const n=md(r,t+"fill-color",e);if(!n)return null;const i=new Eo;return function(s){const a=n(s);return a==="none"?null:(i.setColor(a),i)}}function Xr(r,t,e){const n=ge(r,t+"stroke-width",e),i=md(r,t+"stroke-color",e);if(!n&&!i)return null;const s=Ui(r,t+"stroke-line-cap",e),a=Ui(r,t+"stroke-line-join",e),h=yd(r,t+"stroke-line-dash",e),c=ge(r,t+"stroke-line-dash-offset",e),d=ge(r,t+"stroke-miter-limit",e),f=new Lo;return function(p){if(i){const m=i(p);if(m==="none")return null;f.setColor(m)}if(n&&f.setWidth(n(p)),s){const m=s(p);if(m!=="butt"&&m!=="round"&&m!=="square")throw new Error("Expected butt, round, or square line cap");f.setLineCap(m)}if(a){const m=a(p);if(m!=="bevel"&&m!=="round"&&m!=="miter")throw new Error("Expected bevel, round, or miter line join");f.setLineJoin(m)}return h&&f.setLineDash(h(p)),c&&f.setLineDashOffset(c(p)),d&&f.setMiterLimit(d(p)),f}}function p0(r,t){const e="text-",n=Ui(r,e+"value",t);if(!n)return null;const i=Vr(r,e,t),s=Vr(r,e+"background-",t),a=Xr(r,e,t),h=Xr(r,e+"background-",t),c=Ui(r,e+"font",t),d=ge(r,e+"max-angle",t),f=ge(r,e+"offset-x",t),p=ge(r,e+"offset-y",t),m=Yr(r,e+"overflow",t),v=Ui(r,e+"placement",t),E=ge(r,e+"repeat",t),b=Mo(r,e+"scale",t),M=Yr(r,e+"rotate-with-view",t),S=ge(r,e+"rotation",t),y=Ui(r,e+"align",t),x=Ui(r,e+"justify",t),C=Ui(r,e+"baseline",t),T=yd(r,e+"padding",t),k=new ud({});return function(R){if(k.setText(n(R)),i&&k.setFill(i(R)),s&&k.setBackgroundFill(s(R)),a&&k.setStroke(a(R)),h&&k.setBackgroundStroke(h(R)),c&&k.setFont(c(R)),d&&k.setMaxAngle(d(R)),f&&k.setOffsetX(f(R)),p&&k.setOffsetY(p(R)),m&&k.setOverflow(m(R)),v){const I=v(R);if(I!=="point"&&I!=="line")throw new Error("Expected point or line for text-placement");k.setPlacement(I)}if(E&&k.setRepeat(E(R)),b&&k.setScale(b(R)),M&&k.setRotateWithView(M(R)),S&&k.setRotation(S(R)),y){const I=y(R);if(I!=="left"&&I!=="center"&&I!=="right"&&I!=="end"&&I!=="start")throw new Error("Expected left, right, center, start, or end for text-align");k.setTextAlign(I)}if(x){const I=x(R);if(I!=="left"&&I!=="right"&&I!=="center")throw new Error("Expected left, right, or center for text-justify");k.setJustify(I)}if(C){const I=C(R);if(I!=="bottom"&&I!=="top"&&I!=="middle"&&I!=="alphabetic"&&I!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");k.setTextBaseline(I)}return T&&k.setPadding(T(R)),k}}function _0(r,t){return"icon-src"in r?m0(r,t):"shape-points"in r?y0(r,t):"circle-radius"in r?v0(r,t):null}function m0(r,t){const e="icon-",n=e+"src",i=wd(r[n],n),s=To(r,e+"anchor",t),a=Mo(r,e+"scale",t),h=ge(r,e+"opacity",t),c=To(r,e+"displacement",t),d=ge(r,e+"rotation",t),f=Yr(r,e+"rotate-with-view",t),p=vd(r,e+"anchor-origin"),m=xd(r,e+"anchor-x-units"),v=xd(r,e+"anchor-y-units"),E=L0(r,e+"color"),b=w0(r,e+"cross-origin"),M=E0(r,e+"offset"),S=vd(r,e+"offset-origin"),y=Yn(r,e+"width"),x=Yn(r,e+"height"),C=x0(r,e+"size"),T=Fl(r,e+"declutter"),k=new Il({src:i,anchorOrigin:p,anchorXUnits:m,anchorYUnits:v,color:E,crossOrigin:b,offset:M,offsetOrigin:S,height:x,width:y,size:C,declutterMode:T});return function(R){return h&&k.setOpacity(h(R)),c&&k.setDisplacement(c(R)),d&&k.setRotation(d(R)),f&&k.setRotateWithView(f(R)),a&&k.setScale(a(R)),s&&k.setAnchor(s(R)),k}}function y0(r,t){const e="shape-",n=e+"points",i=Ed(r[n],n),s=Vr(r,e,t),a=Xr(r,e,t),h=Mo(r,e+"scale",t),c=To(r,e+"displacement",t),d=ge(r,e+"rotation",t),f=Yr(r,e+"rotate-with-view",t),p=Yn(r,e+"radius"),m=Yn(r,e+"radius1"),v=Yn(r,e+"radius2"),E=Yn(r,e+"angle"),b=Fl(r,e+"declutter-mode"),M=new ad({points:i,radius:p,radius1:m,radius2:v,angle:E,declutterMode:b});return function(S){return s&&M.setFill(s(S)),a&&M.setStroke(a(S)),c&&M.setDisplacement(c(S)),d&&M.setRotation(d(S)),f&&M.setRotateWithView(f(S)),h&&M.setScale(h(S)),M}}function v0(r,t){const e="circle-",n=Vr(r,e,t),i=Xr(r,e,t),s=ge(r,e+"radius",t),a=Mo(r,e+"scale",t),h=To(r,e+"displacement",t),c=ge(r,e+"rotation",t),d=Yr(r,e+"rotate-with-view",t),f=Fl(r,e+"declutter-mode"),p=new ld({radius:5,declutterMode:f});return function(m){return s&&p.setRadius(s(m)),n&&p.setFill(n(m)),i&&p.setStroke(i(m)),h&&p.setDisplacement(h(m)),c&&p.setRotation(c(m)),d&&p.setRotateWithView(d(m)),a&&p.setScale(a(m)),p}}function ge(r,t,e){if(!(t in r))return;const n=Gi(r[t],Q,e);return function(i){return Ed(n(i),t)}}function Ui(r,t,e){if(!(t in r))return null;const n=Gi(r[t],De,e);return function(i){return wd(n(i),t)}}function Yr(r,t,e){if(!(t in r))return null;const n=Gi(r[t],Ot,e);return function(i){const s=n(i);if(typeof s!="boolean")throw new Error(`Expected a boolean for ${t}`);return s}}function md(r,t,e){if(!(t in r))return null;const n=Gi(r[t],ie|De,e);return function(i){return Ld(n(i),t)}}function yd(r,t,e){if(!(t in r))return null;const n=Gi(r[t],Ni,e);return function(i){return Kr(n(i),t)}}function To(r,t,e){if(!(t in r))return null;const n=Gi(r[t],Ni,e);return function(i){const s=Kr(n(i),t);if(s.length!==2)throw new Error(`Expected two numbers for ${t}`);return s}}function Mo(r,t,e){if(!(t in r))return null;const n=Gi(r[t],Ni|Q,e);return function(i){return b0(n(i),t)}}function Yn(r,t){const e=r[t];if(e!==void 0){if(typeof e!="number")throw new Error(`Expected a number for ${t}`);return e}}function x0(r,t){const e=r[t];if(e!==void 0){if(typeof e=="number")return Le(e);if(!Array.isArray(e))throw new Error(`Expected a number or size array for ${t}`);if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw new Error(`Expected a number or size array for ${t}`);return e}}function w0(r,t){const e=r[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);return e}}function vd(r,t){const e=r[t];if(e!==void 0){if(e!=="bottom-left"&&e!=="bottom-right"&&e!=="top-left"&&e!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${t}`);return e}}function xd(r,t){const e=r[t];if(e!==void 0){if(e!=="pixels"&&e!=="fraction")throw new Error(`Expected pixels or fraction for ${t}`);return e}}function E0(r,t){const e=r[t];if(e!==void 0)return Kr(e,t)}function Fl(r,t){const e=r[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);if(e!=="declutter"&&e!=="obstacle"&&e!=="none")throw new Error(`Expected declutter, obstacle, or none for ${t}`);return e}}function L0(r,t){const e=r[t];if(e!==void 0)return Ld(e,t)}function Kr(r,t){if(!Array.isArray(r))throw new Error(`Expected an array for ${t}`);const e=r.length;for(let n=0;n<e;++n)if(typeof r[n]!="number")throw new Error(`Expected an array of numbers for ${t}`);return r}function wd(r,t){if(typeof r!="string")throw new Error(`Expected a string for ${t}`);return r}function Ed(r,t){if(typeof r!="number")throw new Error(`Expected a number for ${t}`);return r}function Ld(r,t){if(typeof r=="string")return r;const e=Kr(r,t),n=e.length;if(n<3||n>4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function b0(r,t){if(typeof r=="number")return r;const e=Kr(r,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}const bd={RENDER_ORDER:"renderOrder"};class C0 extends ho{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(bd.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new Xh(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(bd.RENDER_ORDER,t)}setStyle(t){this.style_=T0(t),this.styleFunction_=t===null?void 0:Ov(this.style_),this.changed()}}function T0(r){if(r===void 0)return Fv;if(!r)return null;if(typeof r=="function"||r instanceof Hn)return r;if(!Array.isArray(r))return _d([r]);if(r.length===0)return[];const t=r.length,e=r[0];if(e instanceof Hn){const i=new Array(t);for(let s=0;s<t;++s){const a=r[s];if(!(a instanceof Hn))throw new Error("Expected a list of style instances");i[s]=a}return i}if("style"in e){const i=new Array(t);for(let s=0;s<t;++s){const a=r[s];if(!("style"in a))throw new Error("Expected a list of rules with a style property");i[s]=a}return f0(i)}return _d(r)}const zl=C0,oe={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"},Nl=34962,Bl=34963,M0=35040,S0=35044,Gl=35048,P0=5121,k0=5123,R0=5125,Cd=5126,Td=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function A0(r,t){t=Object.assign({preserveDrawingBuffer:!0,antialias:!Fm},t);const e=Td.length;for(let n=0;n<e;++n)try{const i=r.getContext(Td[n],t);if(i)return i}catch{}return null}const I0={STATIC_DRAW:S0,STREAM_DRAW:M0,DYNAMIC_DRAW:Gl};class D0{constructor(t,e){this.array_=null,this.type_=t,mt(t===Nl||t===Bl,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=e!==void 0?e:I0.STATIC_DRAW}ofSize(t){return this.array_=new(Ul(this.type_))(t),this}fromArray(t){return this.array_=Ul(this.type_).from(t),this}fromArrayBuffer(t){return this.array_=new(Ul(this.type_))(t),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}function Ul(r){switch(r){case Nl:return Float32Array;case Bl:return Uint32Array;default:return Float32Array}}const Md=D0;class O0 extends Dc{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return ot()}getData(t){return null}prepareFrame(t){return ot()}renderFrame(t,e){return ot()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return(i,s)=>{const a=this.loadedTileCallback.bind(this,n,i);return t.forEachLoadedTile(e,i,s,a)}}forEachFeatureAtCoordinate(t,e,n,i,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===St.LOADED||e.getState()===St.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=St.LOADED&&e!=St.ERROR&&t.addEventListener(ct.CHANGE,this.boundHandleImageChange_),e==St.IDLE&&(t.load(),e=t.getState()),e==St.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const Sd=O0,So={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},F0=`
20
+ `||d===f){s=Math.max(s,a),i.push(a),a=0,h+=c;continue}const m=t[d+1]||r.font,v=mo(m,p);e.push(v),a+=v;const E=ky(m);n.push(E),c=Math.max(c,E)}return{width:s,height:h,widths:e,heights:n,lineWidths:i}}function Ay(r,t,e,n,i,s,a,h,c,d,f){r.save(),e!==1&&(r.globalAlpha*=e),t&&r.transform.apply(r,t),n.contextInstructions?(r.translate(c,d),r.scale(f[0],f[1]),Iy(n,r)):f[0]<0||f[1]<0?(r.translate(c,d),r.scale(f[0],f[1]),r.drawImage(n,i,s,a,h,0,0,a,h)):r.drawImage(n,i,s,a,h,c,d,a*f[0],h*f[1]),r.restore()}function Iy(r,t){const e=r.contextInstructions;for(let n=0,i=e.length;n<i;n+=2)Array.isArray(e[n+1])?t[e[n]].apply(t,e[n+1]):t[e[n]]=e[n+1]}class Dy extends Ey{constructor(t){super(t),this.fontChangeListenerKey_=gt(di,An.PROPERTYCHANGE,t.redrawText.bind(t)),this.element_=document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=Fr+" ol-layers";const n=t.getViewport();n.insertBefore(this.element_,n.firstChild||null),this.children_=[],this.renderedVisible_=!0,this.declutterLayers_=[]}dispatchRenderEvent(t,e){const n=this.getMap();if(n.hasListener(t)){const i=new Or(t,void 0,e);n.dispatchEvent(i)}}disposeInternal(){Tt(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),super.disposeInternal()}renderFrame(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(te.PRECOMPOSE,t);const e=t.layerStatesArray.sort(function(a,h){return a.zIndex-h.zIndex}),n=t.viewState;this.children_.length=0;const i=this.declutterLayers_;i.length=0;let s=null;for(let a=0,h=e.length;a<h;++a){const c=e[a];t.layerIndex=a;const d=c.layer,f=d.getSourceState();if(!pl(c,n)||f!="ready"&&f!="undefined"){d.unrender();continue}const p=d.render(t,s);p&&(p!==s&&(this.children_.push(p),s=p),"getDeclutter"in d&&i.push(d))}this.flushDeclutterItems(t),Sy(this.element_,this.children_),this.dispatchRenderEvent(te.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}flushDeclutterItems(t){const e=this.declutterLayers_;for(let n=e.length-1;n>=0;--n)e[n].renderDeclutter(t);e.length=0}}const Oy=Dy;class Fi extends ai{constructor(t,e){super(t),this.layer=e}}const yl={LAYERS:"layers"};class vl extends Uu{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let n=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener(yl.LAYERS,this.handleLayersChanged_),n?Array.isArray(n)?n=new Xe(n.slice(),{unique:!0}):mt(typeof n.getArray=="function","Expected `layers` to be an array or a `Collection`"):n=new Xe(void 0,{unique:!0}),this.setLayers(n)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(Tt),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(gt(t,ue.ADD,this.handleLayersAdd_,this),gt(t,ue.REMOVE,this.handleLayersRemove_,this));for(const n in this.listenerKeys_)this.listenerKeys_[n].forEach(Tt);Dn(this.listenerKeys_);const e=t.getArray();for(let n=0,i=e.length;n<i;n++){const s=e[n];this.registerLayerListeners_(s),this.dispatchEvent(new Fi("addlayer",s))}this.changed()}registerLayerListeners_(t){const e=[gt(t,An.PROPERTYCHANGE,this.handleLayerChange_,this),gt(t,ct.CHANGE,this.handleLayerChange_,this)];t instanceof vl&&e.push(gt(t,"addlayer",this.handleLayerGroupAdd_,this),gt(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[dt(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Fi("addlayer",t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Fi("removelayer",t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Fi("addlayer",e)),this.changed()}handleLayersRemove_(t){const e=t.element,n=dt(e);this.listenerKeys_[n].forEach(Tt),delete this.listenerKeys_[n],this.dispatchEvent(new Fi("removelayer",e)),this.changed()}getLayers(){return this.get(yl.LAYERS)}setLayers(t){const e=this.getLayers();if(e){const n=e.getArray();for(let i=0,s=n.length;i<s;++i)this.dispatchEvent(new Fi("removelayer",n[i]))}this.set(yl.LAYERS,t)}getLayersArray(t){return t=t!==void 0?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=t!==void 0?t:[],n=e.length;this.getLayers().forEach(function(a){a.getLayerStatesArray(e)});const i=this.getLayerState();let s=i.zIndex;!t&&i.zIndex===void 0&&(s=0);for(let a=n,h=e.length;a<h;a++){const c=e[a];c.opacity*=i.opacity,c.visible=c.visible&&i.visible,c.maxResolution=Math.min(c.maxResolution,i.maxResolution),c.minResolution=Math.max(c.minResolution,i.minResolution),c.minZoom=Math.max(c.minZoom,i.minZoom),c.maxZoom=Math.min(c.maxZoom,i.maxZoom),i.extent!==void 0&&(c.extent!==void 0?c.extent=Sr(c.extent,i.extent):c.extent=i.extent),c.zIndex===void 0&&(c.zIndex=s)}return e}getSourceState(){return"ready"}}const yo=vl;class Fy extends ai{constructor(t,e,n){super(t),this.map=e,this.frameState=n!==void 0?n:null}}const Wn=Fy;class zy extends Wn{constructor(t,e,n,i,s,a){super(t,e,s),this.originalEvent=n,this.pixel_=null,this.coordinate_=null,this.dragging=i!==void 0?i:!1,this.activePointers=a}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}}const zi=zy,It={SINGLECLICK:"singleclick",CLICK:ct.CLICK,DBLCLICK:ct.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},xl={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"};class Ny extends Ns{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=e===void 0?1:e,this.down_=null;const n=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=n,this.pointerdownListenerKey_=gt(n,xl.POINTERDOWN,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=gt(n,xl.POINTERMOVE,this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(ct.TOUCHMOVE,this.boundHandleTouchMove_,uu?{passive:!1}:!1)}emulateClick_(t){let e=new zi(It.CLICK,this.map_,t);this.dispatchEvent(e),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new zi(It.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const n=new zi(It.SINGLECLICK,this.map_,t);this.dispatchEvent(n)},250)}updateActivePointers_(t){const e=t,n=e.pointerId;if(e.type==It.POINTERUP||e.type==It.POINTERCANCEL){delete this.trackedTouches_[n];for(const i in this.trackedTouches_)if(this.trackedTouches_[i].target!==e.target){delete this.trackedTouches_[i];break}}else(e.type==It.POINTERDOWN||e.type==It.POINTERMOVE)&&(this.trackedTouches_[n]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new zi(It.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_.length===0&&(this.dragListenerKeys_.forEach(Tt),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return t.button===0}handlePointerDown_(t){this.emulateClicks_=this.activePointers_.length===0,this.updateActivePointers_(t);const e=new zi(It.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),this.dragListenerKeys_.length===0){const n=this.map_.getOwnerDocument();this.dragListenerKeys_.push(gt(n,It.POINTERMOVE,this.handlePointerMove_,this),gt(n,It.POINTERUP,this.handlePointerUp_,this),gt(this.element_,It.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==n&&this.dragListenerKeys_.push(gt(this.element_.getRootNode(),It.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new zi(It.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new zi(It.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;(!e||e.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(Tt(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(ct.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Tt(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Tt),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}}const By=Ny,fi={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Vt={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},vo=1/0;class Gy{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,Dn(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,n=t[0];t.length==1?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const i=this.keyFunction_(n);return delete this.queuedElements_[i],n}enqueue(t){mt(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=vo?(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1}getCount(){return this.elements_.length}getLeftChildIndex_(t){return t*2+1}getRightChildIndex_(t){return t*2+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return this.elements_.length===0}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,n=this.priorities_,i=e.length,s=e[t],a=n[t],h=t;for(;t<i>>1;){const c=this.getLeftChildIndex_(t),d=this.getRightChildIndex_(t),f=d<i&&n[d]<n[c]?d:c;e[t]=e[f],n[t]=n[f],t=f}e[t]=s,n[t]=a,this.siftDown_(h,t)}siftDown_(t,e){const n=this.elements_,i=this.priorities_,s=n[e],a=i[e];for(;e>t;){const h=this.getParentIndex_(e);if(i[h]>a)n[e]=n[h],i[e]=i[h],e=h;else break}n[e]=s,i[e]=a}reprioritize(){const t=this.priorityFunction_,e=this.elements_,n=this.priorities_;let i=0;const s=e.length;let a,h,c;for(h=0;h<s;++h)a=e[h],c=t(a),c==vo?delete this.queuedElements_[this.keyFunction_(a)]:(n[i]=c,e[i++]=a);e.length=i,n.length=i,this.heapify_()}}const Uy=Gy,nt={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class jy extends Uy{constructor(t,e){super(function(n){return t.apply(null,n)},function(n){return n[0].getKey()}),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(ct.CHANGE,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,n=e.getState();if(n===nt.LOADED||n===nt.ERROR||n===nt.EMPTY){n!==nt.ERROR&&e.removeEventListener(ct.CHANGE,this.boundHandleTileChange_);const i=e.getKey();i in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[i],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let n=0,i,s,a;for(;this.tilesLoading_<t&&n<e&&this.getCount()>0;)s=this.dequeue()[0],a=s.getKey(),i=s.getState(),i===nt.IDLE&&!(a in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[a]=!0,++this.tilesLoading_,++n,s.load())}}const Zy=jy;function Wy(r,t,e,n,i){if(!r||!(e in r.wantedTiles)||!r.wantedTiles[e][t.getKey()])return vo;const s=r.viewState.center,a=n[0]-s[0],h=n[1]-s[1];return 65536*Math.log(i)+Math.sqrt(a*a+h*h)/i}class Hy extends Re{constructor(t){super();const e=t.element;e&&!t.target&&!e.style.pointerEvents&&(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){po(this.element),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&po(this.element);for(let e=0,n=this.listenerKeys.length;e<n;++e)Tt(this.listenerKeys[e]);this.listenerKeys.length=0,this.map_=t,t&&((this.target_?this.target_:t.getOverlayContainerStopEvent()).appendChild(this.element),this.render!==In&&this.listenerKeys.push(gt(t,fi.POSTRENDER,this.render,this)),t.render())}render(t){}setTarget(t){this.target_=typeof t=="string"?document.getElementById(t):t}}const xo=Hy;class Vy extends xo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=t.collapsed!==void 0?t.collapsed:!0,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=t.collapsible!==void 0,this.collapsible_=t.collapsible!==void 0?t.collapsible:!0,this.collapsible_||(this.collapsed_=!1);const e=t.className!==void 0?t.className:"ol-attribution",n=t.tipLabel!==void 0?t.tipLabel:"Attributions",i=t.expandClassName!==void 0?t.expandClassName:e+"-expand",s=t.collapseLabel!==void 0?t.collapseLabel:"›",a=t.collapseClassName!==void 0?t.collapseClassName:e+"-collapse";typeof s=="string"?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=a):this.collapseLabel_=s;const h=t.label!==void 0?t.label:"i";typeof h=="string"?(this.label_=document.createElement("span"),this.label_.textContent=h,this.label_.className=i):this.label_=h;const c=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=n,this.toggleButton_.appendChild(c),this.toggleButton_.addEventListener(ct.CLICK,this.handleClick_.bind(this),!1);const d=e+" "+Fr+" "+uo+(this.collapsed_&&this.collapsible_?" "+Zu:"")+(this.collapsible_?"":" ol-uncollapsible"),f=this.element;f.className=d,f.appendChild(this.toggleButton_),f.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=Array.from(new Set(this.getMap().getAllLayers().flatMap(i=>i.getAttributions(t)))),n=!this.getMap().getAllLayers().some(i=>i.getSource()&&i.getSource().getAttributionsCollapsible()===!1);return this.overrideCollapsible_||this.setCollapsible(n),e}updateElement_(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}const e=this.collectSourceAttributions_(t),n=e.length>0;if(this.renderedVisible_!=n&&(this.element.style.display=n?"":"none",this.renderedVisible_=n),!li(e,this.renderedAttributions_)){Vu(this.ulElement_);for(let i=0,s=e.length;i<s;++i){const a=document.createElement("li");a.innerHTML=e[i],this.ulElement_.appendChild(a)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(Zu),this.collapsed_?go(this.collapseLabel_,this.label_):go(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}}const qu=Vy;class Xy extends xo{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=t.className!==void 0?t.className:"ol-rotate",n=t.label!==void 0?t.label:"⇧",i=t.compassClassName!==void 0?t.compassClassName:"ol-compass";this.label_=null,typeof n=="string"?(this.label_=document.createElement("span"),this.label_.className=i,this.label_.textContent=n):(this.label_=n,this.label_.classList.add(i));const s=t.tipLabel?t.tipLabel:"Reset rotation",a=document.createElement("button");a.className=e+"-reset",a.setAttribute("type","button"),a.title=s,a.appendChild(this.label_),a.addEventListener(ct.CLICK,this.handleClick_.bind(this),!1);const h=e+" "+Fr+" "+uo,c=this.element;c.className=h,c.appendChild(a),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=t.duration!==void 0?t.duration:250,this.autoHide_=t.autoHide!==void 0?t.autoHide:!0,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(co)}handleClick_(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const e=this.getMap().getView();if(!e)return;const n=e.getRotation();n!==void 0&&(this.duration_>0&&n%(2*Math.PI)!==0?e.animate({rotation:0,duration:this.duration_,easing:Gn}):e.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const n=e.viewState.rotation;if(n!=this.rotation_){const i="rotate("+n+"rad)";if(this.autoHide_){const s=this.element.classList.contains(co);!s&&n===0?this.element.classList.add(co):s&&n!==0&&this.element.classList.remove(co)}this.label_.style.transform=i}this.rotation_=n}}const Yy=Xy;class Ky extends xo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=t.className!==void 0?t.className:"ol-zoom",n=t.delta!==void 0?t.delta:1,i=t.zoomInClassName!==void 0?t.zoomInClassName:e+"-in",s=t.zoomOutClassName!==void 0?t.zoomOutClassName:e+"-out",a=t.zoomInLabel!==void 0?t.zoomInLabel:"+",h=t.zoomOutLabel!==void 0?t.zoomOutLabel:"–",c=t.zoomInTipLabel!==void 0?t.zoomInTipLabel:"Zoom in",d=t.zoomOutTipLabel!==void 0?t.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=i,f.setAttribute("type","button"),f.title=c,f.appendChild(typeof a=="string"?document.createTextNode(a):a),f.addEventListener(ct.CLICK,this.handleClick_.bind(this,n),!1);const p=document.createElement("button");p.className=s,p.setAttribute("type","button"),p.title=d,p.appendChild(typeof h=="string"?document.createTextNode(h):h),p.addEventListener(ct.CLICK,this.handleClick_.bind(this,-n),!1);const m=e+" "+Fr+" "+uo,v=this.element;v.className=m,v.appendChild(f),v.appendChild(p),this.duration_=t.duration!==void 0?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const n=this.getMap().getView();if(!n)return;const i=n.getZoom();if(i!==void 0){const s=n.getConstrainedZoom(i+t);this.duration_>0?(n.getAnimating()&&n.cancelAnimations(),n.animate({zoom:s,duration:this.duration_,easing:Gn})):n.setZoom(s)}}}const qy=Ky;function Ju(r){r=r||{};const t=new Xe;return(r.zoom!==void 0?r.zoom:!0)&&t.push(new qy(r.zoomOptions)),(r.rotate!==void 0?r.rotate:!0)&&t.push(new Yy(r.rotateOptions)),(r.attribution!==void 0?r.attribution:!0)&&t.push(new qu(r.attributionOptions)),t}const Qu={ACTIVE:"active"};class Jy extends Re{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(Qu.ACTIVE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(Qu.ACTIVE,t)}setMap(t){this.map_=t}}function Qy(r,t,e){const n=r.getCenterInternal();if(n){const i=[n[0]+t[0],n[1]+t[1]];r.animateInternal({duration:e!==void 0?e:250,easing:Dm,center:r.getConstrainedCenter(i)})}}function wl(r,t,e,n){const i=r.getZoom();if(i===void 0)return;const s=r.getConstrainedZoom(i+t),a=r.getResolutionForZoom(s);r.getAnimating()&&r.cancelAnimations(),r.animate({resolution:a,anchor:e,duration:n!==void 0?n:250,easing:Gn})}const Ur=Jy;class $y extends Ur{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:250}handleEvent(t){let e=!1;if(t.type==It.DBLCLICK){const n=t.originalEvent,i=t.map,s=t.coordinate,a=n.shiftKey?-this.delta_:this.delta_,h=i.getView();wl(h,a,s,this.duration_),n.preventDefault(),e=!0}return!e}}const tv=$y;class ev extends Ur{constructor(t){t=t||{},super(t),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==It.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==It.POINTERUP){const n=this.handleUpEvent(t);this.handlingDownUpSequence=n&&this.targetPointers.length>0}}else if(t.type==It.POINTERDOWN){const n=this.handleDownEvent(t);this.handlingDownUpSequence=n,e=this.stopDown(n)}else t.type==It.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}}function El(r){const t=r.length;let e=0,n=0;for(let i=0;i<t;i++)e+=r[i].clientX,n+=r[i].clientY;return{clientX:e/t,clientY:n/t}}const jr=ev;function Ll(r){const t=arguments;return function(e){let n=!0;for(let i=0,s=t.length;i<s&&(n=n&&t[i](e),!!n);++i);return n}}const iv=function(r){const t=r.originalEvent;return t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},nv=function(r){const t=r.map.getTargetElement(),e=r.map.getOwnerDocument().activeElement;return t.contains(e)},$u=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?nv(r):!0},rv=Lr,td=function(r){const t=r.originalEvent;return t.button==0&&!(zm&&lu&&t.ctrlKey)},ed=function(r){const t=r.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&!t.shiftKey},sv=function(r){const t=r.originalEvent;return lu?t.metaKey:t.ctrlKey},ov=function(r){const t=r.originalEvent;return!t.altKey&&!(t.metaKey||t.ctrlKey)&&t.shiftKey},id=function(r){const t=r.originalEvent,e=t.target.tagName;return e!=="INPUT"&&e!=="SELECT"&&e!=="TEXTAREA"&&!t.target.isContentEditable},bl=function(r){const t=r.originalEvent;return mt(t!==void 0,"mapBrowserEvent must originate from a pointer event"),t.pointerType=="mouse"},av=function(r){const t=r.originalEvent;return mt(t!==void 0,"mapBrowserEvent must originate from a pointer event"),t.isPrimary&&t.button===0};class lv extends jr{constructor(t){super({stopDown:zs}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:Ll(ed,av);this.condition_=t.onFocusOnly?Ll($u,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const n=this.targetPointers,i=e.getEventPixel(El(n));if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){const s=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],h=t.map.getView();xm(s,h.getResolution()),Ua(s,h.getRotation()),h.adjustCenterInternal(s)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,n=e.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const i=this.kinetic_.getDistance(),s=this.kinetic_.getAngle(),a=n.getCenterInternal(),h=e.getPixelFromCoordinateInternal(a),c=e.getCoordinateFromPixelInternal([h[0]-i*Math.cos(s),h[1]-i*Math.sin(s)]);n.animateInternal({center:n.getConstrainedCenter(c),duration:500,easing:Gn})}return this.panning_&&(this.panning_=!1,n.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const n=t.map.getView();return this.lastCentroid=null,n.getAnimating()&&n.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}}const hv=lv;class cv extends jr{constructor(t){t=t||{},super({stopDown:zs}),this.condition_=t.condition?t.condition:iv,this.lastAngle_=void 0,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){if(!bl(t))return;const e=t.map,n=e.getView();if(n.getConstraints().rotation===Ka)return;const i=e.getSize(),s=t.pixel,a=Math.atan2(i[1]/2-s[1],s[0]-i[0]/2);if(this.lastAngle_!==void 0){const h=a-this.lastAngle_;n.adjustRotationInternal(-h)}this.lastAngle_=a}handleUpEvent(t){return bl(t)?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){return bl(t)&&td(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0):!1}}const uv=cv;class dv extends Fs{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,n="px",i=this.element_.style;i.left=Math.min(t[0],e[0])+n,i.top=Math.min(t[1],e[1])+n,i.width=Math.abs(e[0]-t[0])+n,i.height=Math.abs(e[1]-t[1])+n}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const e=this.element_.style;e.left="inherit",e.top="inherit",e.width="inherit",e.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new Oi([i])}getGeometry(){return this.geometry_}}const fv=dv,wo={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"};class Cl extends ai{constructor(t,e,n){super(t),this.coordinate=e,this.mapBrowserEvent=n}}class gv extends jr{constructor(t){super(),this.on,this.once,this.un,t=t||{},this.box_=new fv(t.className||"ol-dragbox"),this.minArea_=t.minArea!==void 0?t.minArea:64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition?t.condition:td,this.boxEndCondition_=t.boxEndCondition?t.boxEndCondition:this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,n){const i=n[0]-e[0],s=n[1]-e[1];return i*i+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Cl(wo.BOXDRAG,t.coordinate,t))}handleUpEvent(t){this.box_.setMap(null);const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new Cl(e?wo.BOXEND:wo.BOXCANCEL,t.coordinate,t)),!1}handleDownEvent(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Cl(wo.BOXSTART,t.coordinate,t)),!0):!1}onBoxEnd(t){}}const pv=gv;class _v extends pv{constructor(t){t=t||{};const e=t.condition?t.condition:ov;super({condition:e,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=t.duration!==void 0?t.duration:200,this.out_=t.out!==void 0?t.out:!1}onBoxEnd(t){const n=this.getMap().getView();let i=this.getGeometry();if(this.out_){const s=n.rotatedExtentForGeometry(i),a=n.getResolutionForExtentInternal(s),h=n.getResolution()/a;i=i.clone(),i.scale(h*h)}n.fitInternal(i,{duration:this.duration_,easing:Gn})}}const mv=_v,vn={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown"};class yv extends Ur{constructor(t){super(),t=t||{},this.defaultCondition_=function(e){return ed(e)&&id(e)},this.condition_=t.condition!==void 0?t.condition:this.defaultCondition_,this.duration_=t.duration!==void 0?t.duration:100,this.pixelDelta_=t.pixelDelta!==void 0?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==ct.KEYDOWN){const n=t.originalEvent,i=n.key;if(this.condition_(t)&&(i==vn.DOWN||i==vn.LEFT||i==vn.RIGHT||i==vn.UP)){const a=t.map.getView(),h=a.getResolution()*this.pixelDelta_;let c=0,d=0;i==vn.DOWN?d=-h:i==vn.LEFT?c=-h:i==vn.RIGHT?c=h:d=h;const f=[c,d];Ua(f,a.getRotation()),Qy(a,f,this.duration_),n.preventDefault(),e=!0}}return!e}}const vv=yv;class xv extends Ur{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(e){return!sv(e)&&id(e)},this.delta_=t.delta?t.delta:1,this.duration_=t.duration!==void 0?t.duration:100}handleEvent(t){let e=!1;if(t.type==ct.KEYDOWN||t.type==ct.KEYPRESS){const n=t.originalEvent,i=n.key;if(this.condition_(t)&&(i==="+"||i==="-")){const s=t.map,a=i==="+"?this.delta_:-this.delta_,h=s.getView();wl(h,a,void 0,this.duration_),n.preventDefault(),e=!0}}return!e}}const wv=xv;class Ev{constructor(t,e,n){this.decay_=t,this.minVelocity_=e,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let n=e-3;for(;n>0&&this.points_[n+2]>t;)n-=3;const i=this.points_[e+2]-this.points_[n+2];if(i<1e3/60)return!1;const s=this.points_[e]-this.points_[n],a=this.points_[e+1]-this.points_[n+1];return this.angle_=Math.atan2(a,s),this.initialVelocity_=Math.sqrt(s*s+a*a)/i,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}}const Lv=Ev;class bv extends Ur{constructor(t){t=t||{},super(t),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=t.maxDelta!==void 0?t.maxDelta:1,this.duration_=t.duration!==void 0?t.duration:250,this.timeout_=t.timeout!==void 0?t.timeout:80,this.useAnchor_=t.useAnchor!==void 0?t.useAnchor:!0,this.constrainResolution_=t.constrainResolution!==void 0?t.constrainResolution:!1;const e=t.condition?t.condition:rv;this.condition_=t.onFocusOnly?Ll($u,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;t.getView().endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)}handleEvent(t){if(!this.condition_(t)||t.type!==ct.WHEEL)return!0;const n=t.map,i=t.originalEvent;i.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);let s;if(t.type==ct.WHEEL&&(s=i.deltaY,Om&&i.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(s/=hu),i.deltaMode===WheelEvent.DOM_DELTA_LINE&&(s*=40)),s===0)return!1;this.lastDelta_=s;const a=Date.now();this.startTime_===void 0&&(this.startTime_=a),(!this.mode_||a-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const h=n.getView();if(this.mode_==="trackpad"&&!(h.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(h.getAnimating()&&h.cancelAnimations(),h.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),h.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=a,!1;this.totalDelta_+=s;const c=Math.max(this.timeout_-(a-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,n),c),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let n=-Dt(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(n=n?n>0?1:-1:0),wl(e,n,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}}const Cv=bv;class Tv extends jr{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=zs),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=t.threshold!==void 0?t.threshold:.3,this.duration_=t.duration!==void 0?t.duration:250}handleDragEvent(t){let e=0;const n=this.targetPointers[0],i=this.targetPointers[1],s=Math.atan2(i.clientY-n.clientY,i.clientX-n.clientX);if(this.lastAngle_!==void 0){const c=s-this.lastAngle_;this.rotationDelta_+=c,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=c}this.lastAngle_=s;const a=t.map,h=a.getView();h.getConstraints().rotation!==Ka&&(this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(El(this.targetPointers))),this.rotating_&&(a.render(),h.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return this.targetPointers.length<2?(t.map.getView().endInteraction(this.duration_),!1):!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const Mv=Tv;class Sv extends jr{constructor(t){t=t||{};const e=t;e.stopDown||(e.stopDown=zs),super(e),this.anchor_=null,this.duration_=t.duration!==void 0?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const n=this.targetPointers[0],i=this.targetPointers[1],s=n.clientX-i.clientX,a=n.clientY-i.clientY,h=Math.sqrt(s*s+a*a);this.lastDistance_!==void 0&&(e=this.lastDistance_/h),this.lastDistance_=h;const c=t.map,d=c.getView();e!=1&&(this.lastScaleDelta_=e),this.anchor_=c.getCoordinateFromPixelInternal(c.getEventPixel(El(this.targetPointers))),c.render(),d.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const n=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return n.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}}const Pv=Sv;function kv(r){r=r||{};const t=new Xe,e=new Lv(-.005,.05,100);return(r.altShiftDragRotate!==void 0?r.altShiftDragRotate:!0)&&t.push(new uv),(r.doubleClickZoom!==void 0?r.doubleClickZoom:!0)&&t.push(new tv({delta:r.zoomDelta,duration:r.zoomDuration})),(r.dragPan!==void 0?r.dragPan:!0)&&t.push(new hv({onFocusOnly:r.onFocusOnly,kinetic:e})),(r.pinchRotate!==void 0?r.pinchRotate:!0)&&t.push(new Mv),(r.pinchZoom!==void 0?r.pinchZoom:!0)&&t.push(new Pv({duration:r.zoomDuration})),(r.keyboard!==void 0?r.keyboard:!0)&&(t.push(new vv),t.push(new wv({delta:r.zoomDelta,duration:r.zoomDuration}))),(r.mouseWheelZoom!==void 0?r.mouseWheelZoom:!0)&&t.push(new Cv({onFocusOnly:r.onFocusOnly,duration:r.zoomDuration})),(r.shiftDragZoom!==void 0?r.shiftDragZoom:!0)&&t.push(new mv({duration:r.zoomDuration})),t}function nd(r){return r[0]>0&&r[1]>0}function Rv(r,t,e){return e===void 0&&(e=[0,0]),e[0]=r[0]*t+.5|0,e[1]=r[1]*t+.5|0,e}function Le(r,t){return Array.isArray(r)?r:(t===void 0?t=[r,r]:(t[0]=r,t[1]=r),t)}function rd(r){if(r instanceof ho){r.setMapInternal(null);return}r instanceof yo&&r.getLayers().forEach(rd)}function sd(r,t){if(r instanceof ho){r.setMapInternal(t);return}if(r instanceof yo){const e=r.getLayers().getArray();for(let n=0,i=e.length;n<i;++n)sd(e[n],t)}}class Av extends Re{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=Iv(t);this.renderComplete_,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,this.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:hu,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Ht(),this.pixelToCoordinateTransform_=Ht(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,this.resizeObserver_=new ResizeObserver(()=>this.updateSize()),this.controls=e.controls||Ju(),this.interactions=e.interactions||kv({onFocusOnly:!0}),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new Zy(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Vt.LAYERGROUP,this.handleLayerGroupChanged_),this.addChangeListener(Vt.VIEW,this.handleViewChanged_),this.addChangeListener(Vt.SIZE,this.handleSizeChanged_),this.addChangeListener(Vt.TARGET,this.handleTargetChanged_),this.setProperties(e.values);const n=this;t.view&&!(t.view instanceof Ve)&&t.view.then(function(i){n.setView(new Ve(i))}),this.controls.addEventListener(ue.ADD,i=>{i.element.setMap(this)}),this.controls.addEventListener(ue.REMOVE,i=>{i.element.setMap(null)}),this.interactions.addEventListener(ue.ADD,i=>{i.element.setMap(this)}),this.interactions.addEventListener(ue.REMOVE,i=>{i.element.setMap(null)}),this.overlays_.addEventListener(ue.ADD,i=>{this.addOverlayInternal_(i.element)}),this.overlays_.addEventListener(ue.REMOVE,i=>{const s=i.element.getId();s!==void 0&&delete this.overlayIdIndex_[s.toString()],i.element.setMap(null)}),this.controls.forEach(i=>{i.setMap(this)}),this.interactions.forEach(i=>{i.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){sd(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();e!==void 0&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,n){if(!this.frameState_||!this.renderer_)return;const i=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};const s=n.hitTolerance!==void 0?n.hitTolerance:0,a=n.layerFilter!==void 0?n.layerFilter:Lr,h=n.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(i,this.frameState_,s,h,e,null,a,null)}getFeaturesAtPixel(t,e){const n=[];return this.forEachFeatureAtPixel(t,function(i){n.push(i)},e),n}getAllLayers(){const t=[];function e(n){n.forEach(function(i){i instanceof yo?e(i.getLayers()):t.push(i)})}return e(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const n=this.getCoordinateFromPixelInternal(t);e=e!==void 0?e:{};const i=e.layerFilter!==void 0?e.layerFilter:Lr,s=e.hitTolerance!==void 0?e.hitTolerance:0,a=e.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(n,this.frameState_,s,a,i,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const n=this.viewport_.getBoundingClientRect(),i=this.getSize(),s=n.width/i[0],a=n.height/i[1],h="changedTouches"in t?t.changedTouches[0]:t;return[(h.clientX-n.left)/s,(h.clientY-n.top)/a]}getTarget(){return this.get(Vt.TARGET)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Va(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?Nt(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return e!==void 0?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Vt.LAYERGROUP)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Xe){e.setLayers(t);return}const n=e.getLayers();n.clear(),n.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const i=t[e];if(!i.visible)continue;const s=i.layer.getRenderer();if(s&&!s.ready)return!0;const a=i.layer.getSource();if(a&&a.loading)return!0}return!1}getPixelFromCoordinate(t){const e=hi(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?Nt(e.coordinateToPixelTransform,t.slice(0,2)):null}getRenderer(){return this.renderer_}getSize(){return this.get(Vt.SIZE)}getView(){return this.get(Vt.VIEW)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,n,i){return Wy(this.frameState_,t,e,n,i)}handleBrowserEvent(t,e){e=e||t.type;const n=new zi(e,this,t);this.handleMapBrowserEvent(n)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,n=e.type;if(n===xl.POINTERDOWN||n===ct.WHEEL||n===ct.KEYDOWN){const i=this.getOwnerDocument(),s=this.viewport_.getRootNode?this.viewport_.getRootNode():i,a=e.target;if(this.overlayContainerStopEvent_.contains(a)||!(s===i?i.documentElement:s).contains(a))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1){const i=this.getInteractions().getArray().slice();for(let s=i.length-1;s>=0;s--){const a=i[s];if(a.getMap()!==this||!a.getActive()||!this.getTargetElement())continue;if(!a.handleEvent(t)||t.propagationStopped)break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,s=i;if(t){const a=t.viewHints;if(a[Zt.ANIMATING]||a[Zt.INTERACTING]){const h=Date.now()-t.time>8;i=h?0:8,s=h?0:2}}e.getTilesLoading()<i&&(e.reprioritize(),e.loadMoreTiles(i,s))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(te.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(te.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Wn(fi.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Wn(fi.LOADSTART,this,t))));const n=this.postRenderFunctions_;for(let i=0,s=n.length;i<s;++i)n[i](this,t);n.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let n=0,i=this.targetChangeHandlerKeys_.length;n<i;++n)Tt(this.targetChangeHandlerKeys_[n]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(ct.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(ct.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,po(this.viewport_)}if(this.targetElement_){this.resizeObserver_.unobserve(this.targetElement_);const n=this.targetElement_.getRootNode();n instanceof ShadowRoot&&this.resizeObserver_.unobserve(n.host),this.setSize(void 0)}const t=this.getTarget(),e=typeof t=="string"?document.getElementById(t):t;if(this.targetElement_=e,!e)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new Oy(this)),this.mapBrowserEventHandler_=new By(this,this.moveTolerance_);for(const s in It)this.mapBrowserEventHandler_.addEventListener(It[s],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(ct.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(ct.WHEEL,this.boundHandleBrowserEvent_,uu?{passive:!1}:!1);const n=this.keyboardEventTarget_?this.keyboardEventTarget_:e;this.targetChangeHandlerKeys_=[gt(n,ct.KEYDOWN,this.handleBrowserEvent,this),gt(n,ct.KEYPRESS,this.handleBrowserEvent,this)];const i=e.getRootNode();i instanceof ShadowRoot&&this.resizeObserver_.observe(i.host),this.resizeObserver_.observe(e)}this.updateSize()}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(Tt(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Tt(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=gt(t,An.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=gt(t,ct.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Tt),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Fi("addlayer",t)),this.layerGroupPropertyListenerKeys_=[gt(t,An.PROPERTYCHANGE,this.render,this),gt(t,ct.CHANGE,this.render,this),gt(t,"addlayer",this.handleLayerAdd_,this),gt(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,n=t.length;e<n;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}flushDeclutterItems(){const t=this.frameState_;t&&this.renderer_.flushDeclutterItems(t)}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){rd(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),n=this.getView(),i=this.frameState_;let s=null;if(e!==void 0&&nd(e)&&n&&n.isDef()){const a=n.getHints(this.frameState_?this.frameState_.viewHints:void 0),h=n.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:Na(h.center,h.resolution,h.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:h,viewHints:a,wantedTiles:{},mapId:dt(this),renderTargets:{}},h.nextCenter&&h.nextResolution){const c=isNaN(h.nextRotation)?h.rotation:h.nextRotation;s.nextExtent=Na(h.nextCenter,h.nextResolution,c,e)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),i&&(!this.previousExtent_||!Ys(this.previousExtent_)&&!Nn(s.extent,this.previousExtent_))&&(this.dispatchEvent(new Wn(fi.MOVESTART,this,i)),this.previousExtent_=Tr(this.previousExtent_)),this.previousExtent_&&!s.viewHints[Zt.ANIMATING]&&!s.viewHints[Zt.INTERACTING]&&!Nn(s.extent,this.previousExtent_)&&(this.dispatchEvent(new Wn(fi.MOVEEND,this,s)),Uc(s.extent,this.previousExtent_))),this.dispatchEvent(new Wn(fi.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(fi.LOADSTART)||this.hasListener(fi.LOADEND)||this.hasListener(te.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Fi("removelayer",e)),this.set(Vt.LAYERGROUP,t)}setSize(t){this.set(Vt.SIZE,t)}setTarget(t){this.set(Vt.TARGET,t)}setView(t){if(!t||t instanceof Ve){this.set(Vt.VIEW,t);return}this.set(Vt.VIEW,new Ve);const e=this;t.then(function(n){e.setView(new Ve(n))})}updateSize(){const t=this.getTargetElement();let e;if(t){const i=getComputedStyle(t),s=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),a=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);!isNaN(s)&&!isNaN(a)&&(e=[s,a],!nd(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&qc("No map visible because the map container's width or height are 0."))}const n=this.getSize();e&&(!n||!li(e,n))&&(this.setSize(e),this.updateViewportSize_(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}}function Iv(r){let t=null;r.keyboardEventTarget!==void 0&&(t=typeof r.keyboardEventTarget=="string"?document.getElementById(r.keyboardEventTarget):r.keyboardEventTarget);const e={},n=r.layers&&typeof r.layers.getLayers=="function"?r.layers:new yo({layers:r.layers});e[Vt.LAYERGROUP]=n,e[Vt.TARGET]=r.target,e[Vt.VIEW]=r.view instanceof Ve?r.view:new Ve;let i;r.controls!==void 0&&(Array.isArray(r.controls)?i=new Xe(r.controls.slice()):(mt(typeof r.controls.getArray=="function","Expected `controls` to be an array or an `ol/Collection.js`"),i=r.controls));let s;r.interactions!==void 0&&(Array.isArray(r.interactions)?s=new Xe(r.interactions.slice()):(mt(typeof r.interactions.getArray=="function","Expected `interactions` to be an array or an `ol/Collection.js`"),s=r.interactions));let a;return r.overlays!==void 0?Array.isArray(r.overlays)?a=new Xe(r.overlays.slice()):(mt(typeof r.overlays.getArray=="function","Expected `overlays` to be an array or an `ol/Collection.js`"),a=r.overlays):a=new Xe,{controls:i,interactions:s,keyboardEventTarget:t,overlays:a,values:e}}const Dv=Av,St={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4};class Tl{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=Le(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Tl({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return ot()}getImage(t){return ot()}getHitDetectionImage(){return ot()}getPixelRatio(t){return 1}getImageState(){return ot()}getImageSize(){return ot()}getOrigin(){return ot()}getSize(){return ot()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Le(t)}listenImageChange(t){ot()}load(){ot()}unlistenImageChange(t){ot()}}const od=Tl;function Ye(r){return Array.isArray(r)?Bu(r):r}class Ml extends od{constructor(t){const e=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:1,rotateWithView:e,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode}),this.canvases_,this.hitDetectionCanvas_=null,this.fill_=t.fill!==void 0?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius_=t.radius!==void 0?t.radius:t.radius1,this.radius2_=t.radius2,this.angle_=t.angle!==void 0?t.angle:0,this.stroke_=t.stroke!==void 0?t.stroke:null,this.size_,this.renderOptions_,this.render()}clone(){const t=this.getScale(),e=new Ml({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),n=this.getScaleArray();return[t[0]/2-e[0]/n[0],t[1]/2+e[1]/n[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){let e=this.canvases_[t];if(!e){const n=this.renderOptions_,i=ee(n.size*t,n.size*t);this.draw_(n,i,t),e=i.canvas,this.canvases_[t]=e}return e}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return St.LOADED}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius_}getRadius2(){return this.radius2_}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,n){if(e===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return e;let i=this.radius_,s=this.radius2_===void 0?i:this.radius2_;if(i<s){const k=i;i=s,s=k}const a=this.radius2_===void 0?this.points_:this.points_*2,h=2*Math.PI/a,c=s*Math.sin(h),d=Math.sqrt(s*s-c*c),f=i-d,p=Math.sqrt(c*c+f*f),m=p/c;if(t==="miter"&&m<=n)return m*e;const v=e/2/m,E=e/2*(f/p),M=Math.sqrt((i+v)*(i+v)+E*E)-i;if(this.radius2_===void 0||t==="bevel")return M*2;const S=i*Math.sin(h),y=Math.sqrt(i*i-S*S),x=s-y,T=Math.sqrt(S*S+x*x)/S;if(T<=n){const k=T*e/2-s-i;return 2*Math.max(M,k)}return M*2}createRenderOptions(){let t=Un,e=jn,n=0,i=null,s=0,a,h=0;this.stroke_&&(a=Ye(this.stroke_.getColor()??Nr),h=this.stroke_.getWidth()??Gr,i=this.stroke_.getLineDash(),s=this.stroke_.getLineDashOffset()??0,e=this.stroke_.getLineJoin()??jn,t=this.stroke_.getLineCap()??Un,n=this.stroke_.getMiterLimit()??zr);const c=this.calculateLineJoinSize_(e,h,n),d=Math.max(this.radius_,this.radius2_||0),f=Math.ceil(2*d+c);return{strokeStyle:a,strokeWidth:h,size:f,lineCap:t,lineDash:i,lineDashOffset:s,lineJoin:e,miterLimit:n}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.canvases_={},this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,n){if(e.scale(n,n),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let i=this.fill_.getColor();i===null&&(i=de),e.fillStyle=Ye(i),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let n=this.fill_.getColor(),i=0;typeof n=="string"&&(n=Dr(n)),n===null?i=1:Array.isArray(n)&&(i=n.length===4?n[3]:1),i===0&&(e=ee(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const n=this.radius_;if(e===1/0)t.arc(0,0,n,0,2*Math.PI);else{const i=this.radius2_===void 0?n:this.radius2_;this.radius2_!==void 0&&(e*=2);const s=this.angle_-Math.PI/2,a=2*Math.PI/e;for(let h=0;h<e;h++){const c=s+h*a,d=h%2===0?n:i;t.lineTo(d*Math.cos(c),d*Math.sin(c))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle=de,e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}}const ad=Ml;class Sl extends ad{constructor(t){t=t||{radius:5},super({points:1/0,fill:t.fill,radius:t.radius,stroke:t.stroke,scale:t.scale!==void 0?t.scale:1,rotation:t.rotation!==void 0?t.rotation:0,rotateWithView:t.rotateWithView!==void 0?t.rotateWithView:!1,displacement:t.displacement!==void 0?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new Sl({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}setRadius(t){this.radius_=t,this.render()}}const ld=Sl;class Pl{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null}clone(){const t=this.getColor();return new Pl({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){this.color_=t}}const Eo=Pl;class kl{constructor(t){t=t||{},this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}clone(){const t=this.getColor();return new kl({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setWidth(t){this.width_=t}}const Lo=kl;class bo{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=hd,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&typeof t=="object"&&(t=t.clone()),new bo({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){typeof t=="function"?this.geometryFunction_=t:typeof t=="string"?this.geometryFunction_=function(e){return e.get(t)}:t?t!==void 0&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=hd,this.geometry_=t}setZIndex(t){this.zIndex_=t}}function Ov(r){let t;if(typeof r=="function")t=r;else{let e;Array.isArray(r)?e=r:(mt(typeof r.getZIndex=="function","Expected an `Style` or an array of `Style`"),e=[r]),t=function(){return e}}return t}let Rl=null;function Fv(r,t){if(!Rl){const e=new Eo({color:"rgba(255,255,255,0.4)"}),n=new Lo({color:"#3399CC",width:1.25});Rl=[new bo({image:new ld({fill:e,stroke:n,radius:5}),fill:e,stroke:n})]}return Rl}function hd(r){return r.getGeometry()}const Hn=bo;function zv(r,t,e){const n=r;let i=!0,s=!1,a=!1;const h=[Bs(n,ct.LOAD,function(){a=!0,s||t()})];return n.src&&cu?(s=!0,n.decode().then(function(){i&&t()}).catch(function(c){i&&(a?t():e())})):h.push(Bs(n,ct.ERROR,e)),function(){i=!1,h.forEach(Tt)}}function Nv(r,t){return new Promise((e,n)=>{function i(){a(),e(r)}function s(){a(),n(new Error("Image load error"))}function a(){r.removeEventListener("load",i),r.removeEventListener("error",s)}r.addEventListener("load",i),r.addEventListener("error",s),t&&(r.src=t)})}function Bv(r,t){return t&&(r.src=t),r.src&&cu?new Promise((e,n)=>r.decode().then(()=>e(r)).catch(i=>r.complete&&r.width?e(r):n(i))):Nv(r)}let Zr=null;class Gv extends Ns{constructor(t,e,n,i,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=n,this.canvas_={},this.color_=s,this.imageState_=i===void 0?St.IDLE:i,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_}initializeImage_(){this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)}isTainted_(){if(this.tainted_===void 0&&this.imageState_===St.LOADED){Zr||(Zr=ee(1,1,void 0,{willReadFrequently:!0})),Zr.drawImage(this.image_,0,0);try{Zr.getImageData(0,0,1,1),this.tainted_=!1}catch{Zr=null,this.tainted_=!0}}return this.tainted_===!0}dispatchChangeEvent_(){this.dispatchEvent(ct.CHANGE)}handleImageError_(){this.imageState_=St.ERROR,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=St.LOADED,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],n=ee(t,e);n.fillRect(0,0,t,e),this.hitDetectionImage_=n.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(this.imageState_===St.IDLE){this.image_||this.initializeImage_(),this.imageState_=St.LOADING;try{this.src_!==void 0&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&Bv(this.image_,this.src_).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}}replaceColor_(t){if(!this.color_||this.canvas_[t]||this.imageState_!==St.LOADED)return;const e=this.image_,n=document.createElement("canvas");n.width=Math.ceil(e.width*t),n.height=Math.ceil(e.height*t);const i=n.getContext("2d");i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle=Fu(this.color_),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=n}}function Uv(r,t,e,n,i){let s=t===void 0?void 0:lo.get(t,e,i);return s||(s=new Gv(r,r instanceof HTMLImageElement?r.src||void 0:t,e,n,i),lo.set(t,e,i,s)),s}function cd(r,t,e,n){return e!==void 0&&n!==void 0?[e/r,n/t]:e!==void 0?e/r:n!==void 0?n/t:1}class Al extends od{constructor(t){t=t||{};const e=t.opacity!==void 0?t.opacity:1,n=t.rotation!==void 0?t.rotation:0,i=t.scale!==void 0?t.scale:1,s=t.rotateWithView!==void 0?t.rotateWithView:!1;super({opacity:e,rotation:n,scale:i,displacement:t.displacement!==void 0?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=t.anchor!==void 0?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=t.anchorOrigin!==void 0?t.anchorOrigin:"top-left",this.anchorXUnits_=t.anchorXUnits!==void 0?t.anchorXUnits:"fraction",this.anchorYUnits_=t.anchorYUnits!==void 0?t.anchorYUnits:"fraction",this.crossOrigin_=t.crossOrigin!==void 0?t.crossOrigin:null;const a=t.img!==void 0?t.img:null;let h=t.src;mt(!(h!==void 0&&a),"`image` and `src` cannot be provided at the same time"),(h===void 0||h.length===0)&&a&&(h=a.src||dt(a)),mt(h!==void 0&&h.length>0,"A defined and non-empty `src` or `image` must be provided"),mt(!((t.width!==void 0||t.height!==void 0)&&t.scale!==void 0),"`width` or `height` cannot be provided together with `scale`");let c;if(t.src!==void 0?c=St.IDLE:a!==void 0&&(a instanceof HTMLImageElement?a.complete?c=a.src?St.LOADED:St.IDLE:c=St.LOADING:c=St.LOADED),this.color_=t.color!==void 0?Dr(t.color):null,this.iconImage_=Uv(a,h,this.crossOrigin_,c,this.color_),this.offset_=t.offset!==void 0?t.offset:[0,0],this.offsetOrigin_=t.offsetOrigin!==void 0?t.offsetOrigin:"top-left",this.origin_=null,this.size_=t.size!==void 0?t.size:null,t.width!==void 0||t.height!==void 0){let d,f;if(t.size)[d,f]=t.size;else{const p=this.getImage(1);if(p.width&&p.height)d=p.width,f=p.height;else if(p instanceof HTMLImageElement){this.initialOptions_=t;const m=()=>{if(this.unlistenImageChange(m),!this.initialOptions_)return;const v=this.iconImage_.getSize();this.setScale(cd(v[0],v[1],t.width,t.height))};this.listenImageChange(m);return}}d!==void 0&&this.setScale(cd(d,f,t.width,t.height))}}clone(){let t,e,n;return this.initialOptions_?(e=this.initialOptions_.width,n=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new Al({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:n,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const i=this.getSize();if(this.anchorXUnits_=="fraction"||this.anchorYUnits_=="fraction"){if(!i)return null;t=this.anchor_.slice(),this.anchorXUnits_=="fraction"&&(t[0]*=i[0]),this.anchorYUnits_=="fraction"&&(t[1]*=i[1])}if(this.anchorOrigin_!="top-left"){if(!i)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_=="top-right"||this.anchorOrigin_=="bottom-right")&&(t[0]=-t[0]+i[0]),(this.anchorOrigin_=="bottom-left"||this.anchorOrigin_=="bottom-right")&&(t[1]=-t[1]+i[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),n=this.getScaleArray();return[t[0]-e[0]/n[0],t[1]+e[1]/n[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if(this.offsetOrigin_!="top-left"){const e=this.getSize(),n=this.iconImage_.getSize();if(!e||!n)return null;t=t.slice(),(this.offsetOrigin_=="top-right"||this.offsetOrigin_=="bottom-right")&&(t[0]=n[0]-e[0]-t[0]),(this.offsetOrigin_=="bottom-left"||this.offsetOrigin_=="bottom-right")&&(t[1]=n[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();if(this.size_)return this.size_[0]*t[0];if(this.iconImage_.getImageState()==St.LOADED)return this.iconImage_.getSize()[0]*t[0]}getHeight(){const t=this.getScaleArray();if(this.size_)return this.size_[1]*t[1];if(this.iconImage_.getImageState()==St.LOADED)return this.iconImage_.getSize()[1]*t[1]}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(ct.CHANGE,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(ct.CHANGE,t)}}const Il=Al,jv="#333";class Dl{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Le(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new Eo({color:jv}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}clone(){const t=this.getScale();return new Dl({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=Le(t!==void 0?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const ud=Dl;let Vn=0;const Xn=0,Ot=1<<Vn++,Q=1<<Vn++,De=1<<Vn++,ie=1<<Vn++,Ni=1<<Vn++,fe=Math.pow(2,Vn)-1,dd={[Ot]:"boolean",[Q]:"number",[De]:"string",[ie]:"color",[Ni]:"number[]"},Zv=Object.keys(dd).map(Number).sort(Pi);function ne(r){const t=[];for(const e of Zv)Wv(r,e)&&t.push(dd[e]);return t.length===0?"untyped":t.length<3?t.join(" or "):t.slice(0,-1).join(", ")+", or "+t[t.length-1]}function Wv(r,t){return(r&t)===t}function Ke(r,t){return!!(r&t)}function Co(r,t){return r===t}class Bi{constructor(t,e){this.type=t,this.value=e}}class Hv{constructor(t,e,...n){this.type=t,this.operator=e,this.args=n}}function fd(){return{variables:new Set,properties:new Set,featureId:!1,style:{}}}function Vv(r){switch(r){case"string":return De;case"color":return ie;case"number":return Q;case"boolean":return Ot;case"number[]":return Ni;default:throw new Error(`Unrecognized type hint: ${r}`)}}function Ct(r,t,e){switch(typeof r){case"boolean":return new Bi(Ot,r);case"number":return new Bi(Q,r);case"string":{let i=De;return _y(r)&&(i|=ie),Co(i&e,Xn)||(i&=e),new Bi(i,r)}}if(!Array.isArray(r))throw new Error("Expression must be an array or a primitive value");if(r.length===0)throw new Error("Empty expression");if(typeof r[0]=="string")return n0(r,t,e);for(const i of r)if(typeof i!="number")throw new Error("Expected an array of numbers");let n=Ni;return(r.length===3||r.length===4)&&(n|=ie),e&&(n&=e),new Bi(n,r)}const N={Get:"get",Var:"var",Concat:"concat",GeometryType:"geometry-type",Any:"any",All:"all",Not:"!",Resolution:"resolution",Zoom:"zoom",Time:"time",Equal:"==",NotEqual:"!=",GreaterThan:">",GreaterThanOrEqualTo:">=",LessThan:"<",LessThanOrEqualTo:"<=",Multiply:"*",Divide:"/",Add:"+",Subtract:"-",Clamp:"clamp",Mod:"%",Pow:"^",Abs:"abs",Floor:"floor",Ceil:"ceil",Round:"round",Sin:"sin",Cos:"cos",Atan:"atan",Sqrt:"sqrt",Match:"match",Between:"between",Interpolate:"interpolate",Case:"case",In:"in",Number:"number",String:"string",Array:"array",Color:"color",Id:"id",Band:"band",Palette:"palette"},Xv={[N.Get]:lt(([r,t])=>t!==void 0?Vv(t.value):fe,pt(1,2),Yv),[N.Var]:lt(([r])=>r.type,pt(1,1),Kv),[N.Id]:lt(Q|De,Wr,qv),[N.Concat]:lt(De,pt(2,1/0),Lt(fe)),[N.GeometryType]:lt(De,Wr),[N.Resolution]:lt(Q,Wr),[N.Zoom]:lt(Q,Wr),[N.Time]:lt(Q,Wr),[N.Any]:lt(Ot,pt(2,1/0),Lt(Ot)),[N.All]:lt(Ot,pt(2,1/0),Lt(Ot)),[N.Not]:lt(Ot,pt(1,1),Lt(Ot)),[N.Equal]:lt(Ot,pt(2,2),Lt(fe),xn),[N.NotEqual]:lt(Ot,pt(2,2),Lt(fe),xn),[N.GreaterThan]:lt(Ot,pt(2,2),Lt(fe),xn),[N.GreaterThanOrEqualTo]:lt(Ot,pt(2,2),Lt(fe),xn),[N.LessThan]:lt(Ot,pt(2,2),Lt(fe),xn),[N.LessThanOrEqualTo]:lt(Ot,pt(2,2),Lt(fe),xn),[N.Multiply]:lt(r=>{let t=Q|ie;for(let e=0;e<r.length;e++)t&=r[e].type;return t},pt(2,1/0),Lt(Q|ie),xn),[N.Divide]:lt(Q,pt(2,2),Lt(Q)),[N.Add]:lt(Q,pt(2,1/0),Lt(Q)),[N.Subtract]:lt(Q,pt(2,2),Lt(Q)),[N.Clamp]:lt(Q,pt(3,3),Lt(Q)),[N.Mod]:lt(Q,pt(2,2),Lt(Q)),[N.Pow]:lt(Q,pt(2,2),Lt(Q)),[N.Abs]:lt(Q,pt(1,1),Lt(Q)),[N.Floor]:lt(Q,pt(1,1),Lt(Q)),[N.Ceil]:lt(Q,pt(1,1),Lt(Q)),[N.Round]:lt(Q,pt(1,1),Lt(Q)),[N.Sin]:lt(Q,pt(1,1),Lt(Q)),[N.Cos]:lt(Q,pt(1,1),Lt(Q)),[N.Atan]:lt(Q,pt(1,2),Lt(Q)),[N.Sqrt]:lt(Q,pt(1,1),Lt(Q)),[N.Match]:lt(r=>{let t=fe;for(let e=2;e<r.length;e+=2)t&=r[e].type;return t&=r[r.length-1].type,t},pt(4,1/0),gd,Qv),[N.Between]:lt(Ot,pt(3,3),Lt(Q)),[N.Interpolate]:lt(r=>{let t=ie|Q;for(let e=3;e<r.length;e+=2)t&=r[e].type;return t},pt(6,1/0),gd,$v),[N.Case]:lt(r=>{let t=fe;for(let e=1;e<r.length;e+=2)t&=r[e].type;return t&=r[r.length-1].type,t},pt(3,1/0),Jv,t0),[N.In]:lt(Ot,pt(2,2),e0),[N.Number]:lt(Q,pt(1,1/0),Lt(fe)),[N.String]:lt(De,pt(1,1/0),Lt(fe)),[N.Array]:lt(r=>r.length===3||r.length===4?Ni|ie:Ni,pt(1,1/0),Lt(Q)),[N.Color]:lt(ie,pt(3,4),Lt(Q)),[N.Band]:lt(Q,pt(1,3),Lt(Q)),[N.Palette]:lt(ie,pt(2,2),i0)};function Yv(r,t){const e=Ct(r[1],t);if(!(e instanceof Bi))throw new Error("Expected a literal argument for get operation");if(typeof e.value!="string")throw new Error("Expected a string argument for get operation");if(t.properties.add(e.value),r.length===3){const n=Ct(r[2],t);return[e,n]}return[e]}function Kv(r,t,e,n){const i=r[1];if(typeof i!="string")throw new Error("Expected a string argument for var operation");if(t.variables.add(i),!("variables"in t.style)||t.style.variables[i]===void 0)return[new Bi(fe,i)];const s=t.style.variables[i],a=Ct(s,t);if(a.value=i,n&&!Ke(n,a.type))throw new Error(`The variable ${i} has type ${ne(a.type)} but the following type was expected: ${ne(n)}`);return[a]}function qv(r,t){t.featureId=!0}function Wr(r,t){const e=r[0];if(r.length!==1)throw new Error(`Expected no arguments for ${e} operation`);return[]}function pt(r,t){return function(e,n){const i=e[0],s=e.length-1;if(r===t){if(s!==r){const a=r===1?"":"s";throw new Error(`Expected ${r} argument${a} for ${i}, got ${s}`)}}else if(s<r||s>t){const a=t===1/0?`${r} or more`:`${r} to ${t}`;throw new Error(`Expected ${a} arguments for ${i}, got ${s}`)}}}function Lt(r){return function(t,e){const n=t[0],i=t.length-1,s=new Array(i);for(let a=0;a<i;++a){const h=Ct(t[a+1],e);if(!Ke(r,h.type)){const c=ne(r),d=ne(h.type);throw new Error(`Unexpected type for argument ${a} of ${n} operation, got ${c} but expected ${d}`)}h.type&=r,s[a]=h}return s}}function xn(r,t,e){const n=r[0],i=r.length-1;let s=fe;for(let h=0;h<e.length;++h)s&=e[h].type;if(s===Xn)throw new Error(`No common type could be found for arguments of ${n} operation`);const a=new Array(i);for(let h=0;h<i;++h)a[h]=Ct(r[h+1],t,s);return a}function Jv(r,t){const e=r[0],n=r.length-1;if(n%2===0)throw new Error(`An odd amount of arguments was expected for operation ${e}, got ${JSON.stringify(n)} instead`)}function gd(r,t){const e=r[0],n=r.length-1;if(n%2===1)throw new Error(`An even amount of arguments was expected for operation ${e}, got ${JSON.stringify(n)} instead`)}function Qv(r,t,e,n){const i=r.length-1;let a=Ct(r[1],t).type;const h=Ct(r[r.length-1],t);let c=n!==void 0?n&h.type:h.type;const d=new Array(i-2);for(let p=0;p<i-2;p+=2){const m=Ct(r[p+2],t),v=Ct(r[p+3],t);a&=m.type,c&=v.type,d[p]=m,d[p+1]=v}const f=De|Q|Ot;if(!Ke(f,a))throw new Error(`Expected an input of type ${ne(f)} for the interpolate operation, got ${ne(a)} instead`);if(Co(c,Xn))throw new Error("Could not find a common output type for the following match operation: "+JSON.stringify(r));for(let p=0;p<i-2;p+=2){const m=Ct(r[p+2],t,a),v=Ct(r[p+3],t,c);d[p]=m,d[p+1]=v}return[Ct(r[1],t,a),...d,Ct(r[r.length-1],t,c)]}function $v(r,t,e,n){const i=r[1];let s;switch(i[0]){case"linear":s=1;break;case"exponential":if(s=i[1],typeof s!="number")throw new Error(`Expected a number base for exponential interpolation, got ${JSON.stringify(s)} instead`);break;default:s=null}if(!s)throw new Error(`Invalid interpolation type: ${JSON.stringify(i)}`);s=Ct(s,t);let a=Ct(r[2],t);if(!Ke(Q,a.type))throw new Error(`Expected an input of type number for the interpolate operation, got ${ne(a.type)} instead`);a=Ct(r[2],t,Q);const h=new Array(r.length-3);for(let c=0;c<h.length;c+=2){let d=Ct(r[c+3],t);if(!Ke(Q,d.type))throw new Error(`Expected all stop input values in the interpolate operation to be of type number, got ${ne(d.type)} at position ${c+2} instead`);let f=Ct(r[c+4],t);if(!Ke(Q|ie,f.type))throw new Error(`Expected all stop output values in the interpolate operation to be a number or color, got ${ne(f.type)} at position ${c+3} instead`);d=Ct(r[c+3],t,Q),f=Ct(r[c+4],t,Q|ie),h[c]=d,h[c+1]=f}return[s,a,...h]}function t0(r,t,e,n){const i=Ct(r[r.length-1],t);let s=n!==void 0?n&i.type:i.type;const a=new Array(r.length-1);for(let h=0;h<a.length-1;h+=2){const c=Ct(r[h+1],t),d=Ct(r[h+2],t);if(!Ke(Ot,c.type))throw new Error(`Expected all conditions in the case operation to be of type boolean, got ${ne(c.type)} at position ${h} instead`);s&=d.type,a[h]=c,a[h+1]=d}if(Co(s,Xn))throw new Error("Could not find a common output type for the following case operation: "+JSON.stringify(r));for(let h=0;h<a.length-1;h+=2)a[h+1]=Ct(r[h+2],t,s);return a[a.length-1]=Ct(r[r.length-1],t,s),a}function e0(r,t){let e=r[2];if(!Array.isArray(e))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');if(typeof e[0]=="string"){if(e[0]!=="literal")throw new Error('For the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions.');if(!Array.isArray(e[1]))throw new Error('The "in" operator was provided a literal value which was not an array as second argument.');e=e[1]}let n=De|Q;const i=new Array(e.length);for(let a=0;a<i.length;a++){const h=Ct(e[a],t);n&=h.type,i[a]=h}if(Co(n,Xn))throw new Error("Could not find a common type for the following in operation: "+JSON.stringify(r));return[Ct(r[1],t,n),...i]}function i0(r,t){const e=Ct(r[1],t,Q);if(e.type!==Q)throw new Error(`The first argument of palette must be an number, got ${ne(e.type)} instead`);const n=r[2];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");const i=new Array(n.length);for(let s=0;s<i.length;s++){const a=Ct(n[s],t,ie);if(!(a instanceof Bi))throw new Error(`The palette color at index ${s} must be a literal value`);if(!Ke(a.type,ie))throw new Error(`The palette color at index ${s} should be of type color, got ${ne(a.type)} instead`);i[s]=a}return[e,...i]}function lt(r,...t){return function(e,n,i){const s=e[0];let a=[];for(let c=0;c<t.length;c++)a=t[c](e,n,a,i)||a;let h=typeof r=="function"?r(a):r;if(i!==void 0){if(!Ke(h,i))throw new Error(`The following expression was expected to return ${ne(i)}, but returns ${ne(h)} instead: ${JSON.stringify(e)}`);h&=i}if(h===Xn)throw new Error(`No matching type was found for the following expression: ${JSON.stringify(e)}`);return new Hv(h,s,...a)}}function n0(r,t,e){const n=r[0],i=Xv[n];if(!i)throw new Error(`Unknown operator: ${n}`);return i(r,t,e)}function pd(){return{variables:{},properties:{},resolution:NaN,featureId:null}}function Gi(r,t,e){const n=Ct(r,e);if(!Ke(t,n.type)){const i=ne(t),s=ne(n.type);throw new Error(`Expected expression to be of type ${i}, got ${s}`)}return gi(n)}function gi(r,t){if(r instanceof Bi){if(r.type===ie&&typeof r.value=="string"){const n=gl(r.value);return function(){return n}}return function(){return r.value}}const e=r.operator;switch(e){case N.Number:case N.String:return r0(r);case N.Get:case N.Var:return s0(r);case N.Id:return n=>n.featureId;case N.Concat:{const n=r.args.map(i=>gi(i));return i=>"".concat(...n.map(s=>s(i).toString()))}case N.Resolution:return n=>n.resolution;case N.Any:case N.All:case N.Not:return a0(r);case N.Equal:case N.NotEqual:case N.LessThan:case N.LessThanOrEqualTo:case N.GreaterThan:case N.GreaterThanOrEqualTo:return o0(r);case N.Multiply:case N.Divide:case N.Add:case N.Subtract:case N.Clamp:case N.Mod:case N.Pow:case N.Abs:case N.Floor:case N.Ceil:case N.Round:case N.Sin:case N.Cos:case N.Atan:case N.Sqrt:return l0(r);case N.Match:return h0(r);case N.Interpolate:return c0(r);default:throw new Error(`Unsupported operator ${e}`)}}function r0(r,t){const e=r.operator,n=r.args.length,i=new Array(n);for(let s=0;s<n;++s)i[s]=gi(r.args[s]);switch(e){case N.Number:case N.String:return s=>{for(let a=0;a<n;++a){const h=i[a](s);if(typeof h===e)return h}throw new Error(`Expected one of the values to be a ${e}`)};default:throw new Error(`Unsupported assertion operator ${e}`)}}function s0(r,t){const n=r.args[0].value;switch(r.operator){case N.Get:return i=>i.properties[n];case N.Var:return i=>i.variables[n];default:throw new Error(`Unsupported accessor operator ${r.operator}`)}}function o0(r,t){const e=r.operator,n=gi(r.args[0]),i=gi(r.args[1]);switch(e){case N.Equal:return s=>n(s)===i(s);case N.NotEqual:return s=>n(s)!==i(s);case N.LessThan:return s=>n(s)<i(s);case N.LessThanOrEqualTo:return s=>n(s)<=i(s);case N.GreaterThan:return s=>n(s)>i(s);case N.GreaterThanOrEqualTo:return s=>n(s)>=i(s);default:throw new Error(`Unsupported comparison operator ${e}`)}}function a0(r,t){const e=r.operator,n=r.args.length,i=new Array(n);for(let s=0;s<n;++s)i[s]=gi(r.args[s]);switch(e){case N.Any:return s=>{for(let a=0;a<n;++a)if(i[a](s))return!0;return!1};case N.All:return s=>{for(let a=0;a<n;++a)if(!i[a](s))return!1;return!0};case N.Not:return s=>!i[0](s);default:throw new Error(`Unsupported logical operator ${e}`)}}function l0(r,t){const e=r.operator,n=r.args.length,i=new Array(n);for(let s=0;s<n;++s)i[s]=gi(r.args[s]);switch(e){case N.Multiply:return s=>{let a=1;for(let h=0;h<n;++h)a*=i[h](s);return a};case N.Divide:return s=>i[0](s)/i[1](s);case N.Add:return s=>{let a=0;for(let h=0;h<n;++h)a+=i[h](s);return a};case N.Subtract:return s=>i[0](s)-i[1](s);case N.Clamp:return s=>{const a=i[0](s),h=i[1](s);if(a<h)return h;const c=i[2](s);return a>c?c:a};case N.Mod:return s=>i[0](s)%i[1](s);case N.Pow:return s=>Math.pow(i[0](s),i[1](s));case N.Abs:return s=>Math.abs(i[0](s));case N.Floor:return s=>Math.floor(i[0](s));case N.Ceil:return s=>Math.ceil(i[0](s));case N.Round:return s=>Math.round(i[0](s));case N.Sin:return s=>Math.sin(i[0](s));case N.Cos:return s=>Math.cos(i[0](s));case N.Atan:return n===2?s=>Math.atan2(i[0](s),i[1](s)):s=>Math.atan(i[0](s));case N.Sqrt:return s=>Math.sqrt(i[0](s));default:throw new Error(`Unsupported numeric operator ${e}`)}}function h0(r,t){const e=r.args.length,n=new Array(e);for(let i=0;i<e;++i)n[i]=gi(r.args[i]);return i=>{const s=n[0](i);for(let a=1;a<e;a+=2)if(s===n[a](i))return n[a+1](i);return n[e-1](i)}}function c0(r,t){const e=r.args.length,n=new Array(e);for(let i=0;i<e;++i)n[i]=gi(r.args[i]);return i=>{const s=n[0](i),a=n[1](i);let h,c;for(let d=2;d<e;d+=2){const f=n[d](i);let p=n[d+1](i);const m=Array.isArray(p);if(m&&(p=gy(p)),f>=a)return d===2?p:m?u0(s,a,h,c,f,p):Hr(s,a,h,c,f,p);h=f,c=p}return c}}function Hr(r,t,e,n,i,s){const a=i-e;if(a===0)return n;const h=t-e,c=r===1?h/a:(Math.pow(r,h)-1)/(Math.pow(r,a)-1);return n+c*(s-n)}function u0(r,t,e,n,i,s){if(i-e===0)return n;const h=zu(n),c=zu(s);let d=c[2]-h[2];d>180?d-=360:d<-180&&(d+=360);const f=[Hr(r,t,e,h[0],i,c[0]),Hr(r,t,e,h[1],i,c[1]),h[2]+Hr(r,t,e,0,i,d),Hr(r,t,e,n[3],i,s[3])];return Nu(py(f))}function d0(r){return!0}function f0(r){const t=fd(),e=g0(r,t),n=pd();return function(i,s){if(n.properties=i.getPropertiesInternal(),n.resolution=s,t.featureId){const a=i.getId();a!==void 0?n.featureId=a:n.featureId=null}return e(n)}}function _d(r){const t=fd(),e=r.length,n=new Array(e);for(let a=0;a<e;++a)n[a]=Ol(r[a],t);const i=pd(),s=new Array(e);return function(a,h){if(i.properties=a.getPropertiesInternal(),i.resolution=h,t.featureId){const d=a.getId();d!==void 0?i.featureId=d:i.featureId=null}let c=0;for(let d=0;d<e;++d){const f=n[d](i);f&&(s[c]=f,c+=1)}return s.length=c,s}}function g0(r,t){const e=r.length,n=new Array(e);for(let i=0;i<e;++i){const s=r[i],a="filter"in s?Gi(s.filter,Ot,t):d0;let h;if(Array.isArray(s.style)){const c=s.style.length;h=new Array(c);for(let d=0;d<c;++d)h[d]=Ol(s.style[d],t)}else h=[Ol(s.style,t)];n[i]={filter:a,styles:h}}return function(i){const s=[];let a=!1;for(let h=0;h<e;++h){const c=n[h].filter;if(c(i)&&!(r[h].else&&a)){a=!0;for(const d of n[h].styles){const f=d(i);f&&s.push(f)}}}return s}}function Ol(r,t){const e=Vr(r,"",t),n=Xr(r,"",t),i=p0(r,t),s=_0(r,t),a=ge(r,"z-index",t);if(!e&&!n&&!i&&!s&&!on(r))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(r));const h=new Hn;return function(c){let d=!0;if(e){const f=e(c);f&&(d=!1),h.setFill(f)}if(n){const f=n(c);f&&(d=!1),h.setStroke(f)}if(i){const f=i(c);f&&(d=!1),h.setText(f)}if(s){const f=s(c);f&&(d=!1),h.setImage(f)}return a&&h.setZIndex(a(c)),d?null:h}}function Vr(r,t,e){const n=md(r,t+"fill-color",e);if(!n)return null;const i=new Eo;return function(s){const a=n(s);return a==="none"?null:(i.setColor(a),i)}}function Xr(r,t,e){const n=ge(r,t+"stroke-width",e),i=md(r,t+"stroke-color",e);if(!n&&!i)return null;const s=Ui(r,t+"stroke-line-cap",e),a=Ui(r,t+"stroke-line-join",e),h=yd(r,t+"stroke-line-dash",e),c=ge(r,t+"stroke-line-dash-offset",e),d=ge(r,t+"stroke-miter-limit",e),f=new Lo;return function(p){if(i){const m=i(p);if(m==="none")return null;f.setColor(m)}if(n&&f.setWidth(n(p)),s){const m=s(p);if(m!=="butt"&&m!=="round"&&m!=="square")throw new Error("Expected butt, round, or square line cap");f.setLineCap(m)}if(a){const m=a(p);if(m!=="bevel"&&m!=="round"&&m!=="miter")throw new Error("Expected bevel, round, or miter line join");f.setLineJoin(m)}return h&&f.setLineDash(h(p)),c&&f.setLineDashOffset(c(p)),d&&f.setMiterLimit(d(p)),f}}function p0(r,t){const e="text-",n=Ui(r,e+"value",t);if(!n)return null;const i=Vr(r,e,t),s=Vr(r,e+"background-",t),a=Xr(r,e,t),h=Xr(r,e+"background-",t),c=Ui(r,e+"font",t),d=ge(r,e+"max-angle",t),f=ge(r,e+"offset-x",t),p=ge(r,e+"offset-y",t),m=Yr(r,e+"overflow",t),v=Ui(r,e+"placement",t),E=ge(r,e+"repeat",t),C=Mo(r,e+"scale",t),M=Yr(r,e+"rotate-with-view",t),S=ge(r,e+"rotation",t),y=Ui(r,e+"align",t),x=Ui(r,e+"justify",t),b=Ui(r,e+"baseline",t),T=yd(r,e+"padding",t),k=new ud({});return function(R){if(k.setText(n(R)),i&&k.setFill(i(R)),s&&k.setBackgroundFill(s(R)),a&&k.setStroke(a(R)),h&&k.setBackgroundStroke(h(R)),c&&k.setFont(c(R)),d&&k.setMaxAngle(d(R)),f&&k.setOffsetX(f(R)),p&&k.setOffsetY(p(R)),m&&k.setOverflow(m(R)),v){const I=v(R);if(I!=="point"&&I!=="line")throw new Error("Expected point or line for text-placement");k.setPlacement(I)}if(E&&k.setRepeat(E(R)),C&&k.setScale(C(R)),M&&k.setRotateWithView(M(R)),S&&k.setRotation(S(R)),y){const I=y(R);if(I!=="left"&&I!=="center"&&I!=="right"&&I!=="end"&&I!=="start")throw new Error("Expected left, right, center, start, or end for text-align");k.setTextAlign(I)}if(x){const I=x(R);if(I!=="left"&&I!=="right"&&I!=="center")throw new Error("Expected left, right, or center for text-justify");k.setJustify(I)}if(b){const I=b(R);if(I!=="bottom"&&I!=="top"&&I!=="middle"&&I!=="alphabetic"&&I!=="hanging")throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");k.setTextBaseline(I)}return T&&k.setPadding(T(R)),k}}function _0(r,t){return"icon-src"in r?m0(r,t):"shape-points"in r?y0(r,t):"circle-radius"in r?v0(r,t):null}function m0(r,t){const e="icon-",n=e+"src",i=wd(r[n],n),s=To(r,e+"anchor",t),a=Mo(r,e+"scale",t),h=ge(r,e+"opacity",t),c=To(r,e+"displacement",t),d=ge(r,e+"rotation",t),f=Yr(r,e+"rotate-with-view",t),p=vd(r,e+"anchor-origin"),m=xd(r,e+"anchor-x-units"),v=xd(r,e+"anchor-y-units"),E=L0(r,e+"color"),C=w0(r,e+"cross-origin"),M=E0(r,e+"offset"),S=vd(r,e+"offset-origin"),y=Yn(r,e+"width"),x=Yn(r,e+"height"),b=x0(r,e+"size"),T=Fl(r,e+"declutter"),k=new Il({src:i,anchorOrigin:p,anchorXUnits:m,anchorYUnits:v,color:E,crossOrigin:C,offset:M,offsetOrigin:S,height:x,width:y,size:b,declutterMode:T});return function(R){return h&&k.setOpacity(h(R)),c&&k.setDisplacement(c(R)),d&&k.setRotation(d(R)),f&&k.setRotateWithView(f(R)),a&&k.setScale(a(R)),s&&k.setAnchor(s(R)),k}}function y0(r,t){const e="shape-",n=e+"points",i=Ed(r[n],n),s=Vr(r,e,t),a=Xr(r,e,t),h=Mo(r,e+"scale",t),c=To(r,e+"displacement",t),d=ge(r,e+"rotation",t),f=Yr(r,e+"rotate-with-view",t),p=Yn(r,e+"radius"),m=Yn(r,e+"radius1"),v=Yn(r,e+"radius2"),E=Yn(r,e+"angle"),C=Fl(r,e+"declutter-mode"),M=new ad({points:i,radius:p,radius1:m,radius2:v,angle:E,declutterMode:C});return function(S){return s&&M.setFill(s(S)),a&&M.setStroke(a(S)),c&&M.setDisplacement(c(S)),d&&M.setRotation(d(S)),f&&M.setRotateWithView(f(S)),h&&M.setScale(h(S)),M}}function v0(r,t){const e="circle-",n=Vr(r,e,t),i=Xr(r,e,t),s=ge(r,e+"radius",t),a=Mo(r,e+"scale",t),h=To(r,e+"displacement",t),c=ge(r,e+"rotation",t),d=Yr(r,e+"rotate-with-view",t),f=Fl(r,e+"declutter-mode"),p=new ld({radius:5,declutterMode:f});return function(m){return s&&p.setRadius(s(m)),n&&p.setFill(n(m)),i&&p.setStroke(i(m)),h&&p.setDisplacement(h(m)),c&&p.setRotation(c(m)),d&&p.setRotateWithView(d(m)),a&&p.setScale(a(m)),p}}function ge(r,t,e){if(!(t in r))return;const n=Gi(r[t],Q,e);return function(i){return Ed(n(i),t)}}function Ui(r,t,e){if(!(t in r))return null;const n=Gi(r[t],De,e);return function(i){return wd(n(i),t)}}function Yr(r,t,e){if(!(t in r))return null;const n=Gi(r[t],Ot,e);return function(i){const s=n(i);if(typeof s!="boolean")throw new Error(`Expected a boolean for ${t}`);return s}}function md(r,t,e){if(!(t in r))return null;const n=Gi(r[t],ie|De,e);return function(i){return Ld(n(i),t)}}function yd(r,t,e){if(!(t in r))return null;const n=Gi(r[t],Ni,e);return function(i){return Kr(n(i),t)}}function To(r,t,e){if(!(t in r))return null;const n=Gi(r[t],Ni,e);return function(i){const s=Kr(n(i),t);if(s.length!==2)throw new Error(`Expected two numbers for ${t}`);return s}}function Mo(r,t,e){if(!(t in r))return null;const n=Gi(r[t],Ni|Q,e);return function(i){return b0(n(i),t)}}function Yn(r,t){const e=r[t];if(e!==void 0){if(typeof e!="number")throw new Error(`Expected a number for ${t}`);return e}}function x0(r,t){const e=r[t];if(e!==void 0){if(typeof e=="number")return Le(e);if(!Array.isArray(e))throw new Error(`Expected a number or size array for ${t}`);if(e.length!==2||typeof e[0]!="number"||typeof e[1]!="number")throw new Error(`Expected a number or size array for ${t}`);return e}}function w0(r,t){const e=r[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);return e}}function vd(r,t){const e=r[t];if(e!==void 0){if(e!=="bottom-left"&&e!=="bottom-right"&&e!=="top-left"&&e!=="top-right")throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${t}`);return e}}function xd(r,t){const e=r[t];if(e!==void 0){if(e!=="pixels"&&e!=="fraction")throw new Error(`Expected pixels or fraction for ${t}`);return e}}function E0(r,t){const e=r[t];if(e!==void 0)return Kr(e,t)}function Fl(r,t){const e=r[t];if(e!==void 0){if(typeof e!="string")throw new Error(`Expected a string for ${t}`);if(e!=="declutter"&&e!=="obstacle"&&e!=="none")throw new Error(`Expected declutter, obstacle, or none for ${t}`);return e}}function L0(r,t){const e=r[t];if(e!==void 0)return Ld(e,t)}function Kr(r,t){if(!Array.isArray(r))throw new Error(`Expected an array for ${t}`);const e=r.length;for(let n=0;n<e;++n)if(typeof r[n]!="number")throw new Error(`Expected an array of numbers for ${t}`);return r}function wd(r,t){if(typeof r!="string")throw new Error(`Expected a string for ${t}`);return r}function Ed(r,t){if(typeof r!="number")throw new Error(`Expected a number for ${t}`);return r}function Ld(r,t){if(typeof r=="string")return r;const e=Kr(r,t),n=e.length;if(n<3||n>4)throw new Error(`Expected a color with 3 or 4 values for ${t}`);return e}function b0(r,t){if(typeof r=="number")return r;const e=Kr(r,t);if(e.length!==2)throw new Error(`Expected an array of two numbers for ${t}`);return e}const bd={RENDER_ORDER:"renderOrder"};class C0 extends ho{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter!==void 0?t.declutter:!1,this.renderBuffer_=t.renderBuffer!==void 0?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=t.updateWhileAnimating!==void 0?t.updateWhileAnimating:!1,this.updateWhileInteracting_=t.updateWhileInteracting!==void 0?t.updateWhileInteracting:!1}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(bd.RENDER_ORDER)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t){t.declutterTree||(t.declutterTree=new Xh(9)),this.getRenderer().renderDeclutter(t)}setRenderOrder(t){this.set(bd.RENDER_ORDER,t)}setStyle(t){this.style_=T0(t),this.styleFunction_=t===null?void 0:Ov(this.style_),this.changed()}}function T0(r){if(r===void 0)return Fv;if(!r)return null;if(typeof r=="function"||r instanceof Hn)return r;if(!Array.isArray(r))return _d([r]);if(r.length===0)return[];const t=r.length,e=r[0];if(e instanceof Hn){const i=new Array(t);for(let s=0;s<t;++s){const a=r[s];if(!(a instanceof Hn))throw new Error("Expected a list of style instances");i[s]=a}return i}if("style"in e){const i=new Array(t);for(let s=0;s<t;++s){const a=r[s];if(!("style"in a))throw new Error("Expected a list of rules with a style property");i[s]=a}return f0(i)}return _d(r)}const zl=C0,oe={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"},Nl=34962,Bl=34963,M0=35040,S0=35044,Gl=35048,P0=5121,k0=5123,R0=5125,Cd=5126,Td=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function A0(r,t){t=Object.assign({preserveDrawingBuffer:!0,antialias:!Fm},t);const e=Td.length;for(let n=0;n<e;++n)try{const i=r.getContext(Td[n],t);if(i)return i}catch{}return null}const I0={STATIC_DRAW:S0,STREAM_DRAW:M0,DYNAMIC_DRAW:Gl};class D0{constructor(t,e){this.array_=null,this.type_=t,mt(t===Nl||t===Bl,"A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`"),this.usage_=e!==void 0?e:I0.STATIC_DRAW}ofSize(t){return this.array_=new(Ul(this.type_))(t),this}fromArray(t){return this.array_=Ul(this.type_).from(t),this}fromArrayBuffer(t){return this.array_=new(Ul(this.type_))(t),this}getType(){return this.type_}getArray(){return this.array_}getUsage(){return this.usage_}getSize(){return this.array_?this.array_.length:0}}function Ul(r){switch(r){case Nl:return Float32Array;case Bl:return Uint32Array;default:return Float32Array}}const Md=D0;class O0 extends Dc{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.declutterExecutorGroup=null}getFeatures(t){return ot()}getData(t){return null}prepareFrame(t){return ot()}renderFrame(t,e){return ot()}loadedTileCallback(t,e,n){t[e]||(t[e]={}),t[e][n.tileCoord.toString()]=n}createLoadedTileFinder(t,e,n){return(i,s)=>{const a=this.loadedTileCallback.bind(this,n,i);return t.forEachLoadedTile(e,i,s,a)}}forEachFeatureAtCoordinate(t,e,n,i,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;(e.getState()===St.LOADED||e.getState()===St.ERROR)&&this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return e!=St.LOADED&&e!=St.ERROR&&t.addEventListener(ct.CHANGE,this.boundHandleImageChange_),e==St.IDLE&&(t.load(),e=t.getState()),e==St.LOADED}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&t.getSourceState()==="ready"&&t.changed()}disposeInternal(){delete this.layer_,super.disposeInternal()}}const Sd=O0,So={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},F0=`
21
21
  precision mediump float;
22
22
 
23
23
  attribute vec2 a_position;
@@ -42,7 +42,7 @@
42
42
  void main() {
43
43
  gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;
44
44
  }
45
- `;class N0{constructor(t){this.gl_=t.webGlContext;const e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer(),this.depthBuffer_=e.createRenderbuffer();const n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,t.vertexShader||F0),e.compileShader(n);const i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,t.fragmentShader||z0),e.compileShader(i),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,n),e.attachShader(this.renderTargetProgram_,i),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer();const s=[-1,-1,1,-1,-1,1,1,-1,1,1,-1,1];e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array(s),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(a=>{this.uniforms_.push({value:t.uniforms[a],location:e.getUniformLocation(this.renderTargetProgram_,a)})})}getGL(){return this.gl_}init(t){const e=this.getGL(),n=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,n[0],n[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==n[0]||this.renderTargetTextureSize_[1]!==n[1]){this.renderTargetTextureSize_=n;const i=0,s=e.RGBA,a=0,h=e.RGBA,c=e.UNSIGNED_BYTE,d=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,i,s,n[0],n[1],a,h,c,d),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,n[0],n[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,n,i){const s=this.getGL(),a=t.size;if(s.bindFramebuffer(s.FRAMEBUFFER,e?e.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!e){const c=dt(s.canvas);if(!t.renderTargets[c]){const d=s.getContextAttributes();d&&d.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT)),t.renderTargets[c]=!0}}s.disable(s.DEPTH_TEST),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,a[0],a[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const h=t.layerStatesArray[t.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,h),this.applyUniforms(t),n&&n(s,t),s.drawArrays(s.TRIANGLES,0,6),i&&i(s,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let n,i=1;this.uniforms_.forEach(function(s){if(n=typeof s.value=="function"?s.value(t):s.value,n instanceof HTMLCanvasElement||n instanceof ImageData)s.texture||(s.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${i}`]),e.bindTexture(e.TEXTURE_2D,s.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,n.width,n.height,0,e.UNSIGNED_BYTE,new Uint8Array(n.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n),e.uniform1i(s.location,i++);else if(Array.isArray(n))switch(n.length){case 2:e.uniform2f(s.location,n[0],n[1]);return;case 3:e.uniform3f(s.location,n[0],n[1],n[2]);return;case 4:e.uniform4f(s.location,n[0],n[1],n[2],n[3]);return;default:return}else typeof n=="number"&&e.uniform1f(s.location,n)})}}const Pd=N0;function B0(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function G0(r,t){return r[0]=t[0],r[1]=t[1],r[4]=t[2],r[5]=t[3],r[12]=t[4],r[13]=t[5],r}const pi={PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},_i={UNSIGNED_BYTE:P0,UNSIGNED_SHORT:k0,UNSIGNED_INT:R0,FLOAT:Cd},Po={};function kd(r){return"shared/"+r}let Rd=0;function U0(){const r="unique/"+Rd;return Rd+=1,r}function j0(r){let t=Po[r];if(!t){const e=document.createElement("canvas");e.width=1,e.height=1,e.style.position="absolute",e.style.left="0",t={users:0,context:A0(e)},Po[r]=t}return t.users+=1,t.context}function Z0(r){const t=Po[r];if(!t||(t.users-=1,t.users>0))return;const e=t.context,n=e.getExtension("WEBGL_lose_context");n&&n.loseContext();const i=e.canvas;i.width=1,i.height=1,delete Po[r]}class W0 extends Fs{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?kd(t.canvasCacheKey):U0(),this.gl_=j0(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const e=this.gl_.canvas;e.addEventListener(So.LOST,this.boundHandleWebGLContextLost_),e.addEventListener(So.RESTORED,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=Ht(),this.offsetScaleMatrix_=Ht(),this.tmpMat4_=B0(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map(n=>new Pd({webGlContext:this.gl_,scaleRatio:n.scaleRatio,vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms})):[new Pd({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[],this.addUniforms(t)}addUniforms(t){for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===kd(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,n=dt(t);let i=this.bufferCache_[n];if(!i){const s=e.createBuffer();i={buffer:t,webGlBuffer:s},this.bufferCache_[n]=i}e.bindBuffer(t.getType(),i.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,n=dt(t),i=this.bufferCache_[n];i&&!e.isContextLost()&&e.deleteBuffer(i.webGlBuffer),delete this.bufferCache_[n]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(So.LOST,this.boundHandleWebGLContextLost_),t.removeEventListener(So.RESTORED,this.boundHandleWebGLContextRestored_),Z0(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,n){const i=this.gl_,s=this.getCanvas(),a=t.size,h=t.pixelRatio;(s.width!==a[0]*h||s.height!==a[1]*h)&&(s.width=a[0]*h,s.height=a[1]*h,s.style.width=a[0]+"px",s.style.height=a[1]+"px");for(let c=this.postProcessPasses_.length-1;c>=0;c--)this.postProcessPasses_[c].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.depthRange(0,1),i.clearDepth(1),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,e?i.ZERO:i.ONE_MINUS_SRC_ALPHA),n?(i.enable(i.DEPTH_TEST),i.depthFunc(i.LEQUAL)):i.disable(i.DEPTH_TEST)}bindTexture(t,e,n){const i=this.gl_;i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t),i.uniform1i(this.getUniformLocation(n),e)}prepareDrawToRenderTarget(t,e,n,i){const s=this.gl_,a=e.getSize();s.bindFramebuffer(s.FRAMEBUFFER,e.getFramebuffer()),s.bindRenderbuffer(s.RENDERBUFFER,e.getDepthbuffer()),s.viewport(0,0,a[0],a[1]),s.bindTexture(s.TEXTURE_2D,e.getTexture()),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,n?s.ZERO:s.ONE_MINUS_SRC_ALPHA),i?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}drawElements(t,e){const n=this.gl_;this.getExtension("OES_element_index_uint");const i=n.UNSIGNED_INT,s=4,a=e-t,h=t*s;n.drawElements(n.TRIANGLES,a,i,h)}finalizeDraw(t,e,n){for(let i=0,s=this.postProcessPasses_.length;i<s;i++)i===s-1?this.postProcessPasses_[i].apply(t,null,e,n):this.postProcessPasses_[i].apply(t,this.postProcessPasses_[i+1])}getCanvas(){return this.gl_.canvas}getGL(){return this.gl_}applyFrameState(t){const e=t.size,n=t.viewState.rotation,i=t.pixelRatio;this.setUniformFloatValue(pi.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(pi.ZOOM,t.viewState.zoom),this.setUniformFloatValue(pi.RESOLUTION,t.viewState.resolution),this.setUniformFloatValue(pi.PIXEL_RATIO,i),this.setUniformFloatVec2(pi.VIEWPORT_SIZE_PX,[e[0],e[1]]),this.setUniformFloatValue(pi.ROTATION,n)}applyHitDetectionUniform(t){const e=this.getUniformLocation(pi.HIT_DETECTION);this.getGL().uniform1i(e,t?1:0),t&&this.setUniformFloatValue(pi.PIXEL_RATIO,.5)}applyUniforms(t){const e=this.gl_;let n,i=0;this.uniforms_.forEach(s=>{if(n=typeof s.value=="function"?s.value(t):s.value,n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof ImageData)s.texture||(s.prevValue=void 0,s.texture=e.createTexture()),this.bindTexture(s.texture,i,s.name),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),(!(n instanceof HTMLImageElement)||n.complete)&&s.prevValue!==n&&(s.prevValue=n,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n)),i++;else if(Array.isArray(n)&&n.length===6)this.setUniformMatrixValue(s.name,G0(this.tmpMat4_,n));else if(Array.isArray(n)&&n.length<=4)switch(n.length){case 2:e.uniform2f(this.getUniformLocation(s.name),n[0],n[1]);return;case 3:e.uniform3f(this.getUniformLocation(s.name),n[0],n[1],n[2]);return;case 4:e.uniform4f(this.getUniformLocation(s.name),n[0],n[1],n[2],n[3]);return;default:return}else typeof n=="number"&&e.uniform1f(this.getUniformLocation(s.name),n)})}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const n=this.gl_,i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}getProgram(t,e){const n=this.gl_,i=this.compileShader(t,n.FRAGMENT_SHADER),s=this.compileShader(e,n.VERTEX_SHADER),a=n.createProgram();if(n.attachShader(a,i),n.attachShader(a,s),n.linkProgram(a),!n.getShaderParameter(i,n.COMPILE_STATUS)){const h=`Fragment shader compilation failed: ${n.getShaderInfoLog(i)}`;throw new Error(h)}if(n.deleteShader(i),!n.getShaderParameter(s,n.COMPILE_STATUS)){const h=`Vertex shader compilation failed: ${n.getShaderInfoLog(s)}`;throw new Error(h)}if(n.deleteShader(s),!n.getProgramParameter(a,n.LINK_STATUS)){const h=`GL program linking failed: ${n.getProgramInfoLog(a)}`;throw new Error(h)}return a}getUniformLocation(t){const e=dt(this.currentProgram_);return this.uniformLocationsByProgram_[e]===void 0&&(this.uniformLocationsByProgram_[e]={}),this.uniformLocationsByProgram_[e][t]===void 0&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=dt(this.currentProgram_);return this.attribLocationsByProgram_[e]===void 0&&(this.attribLocationsByProgram_[e]={}),this.attribLocationsByProgram_[e][t]===void 0&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const n=t.size,i=t.viewState.rotation,s=t.viewState.resolution,a=t.viewState.center;return Ie(e,0,0,2/(s*n[0]),2/(s*n[1]),-i,-a[0],-a[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,n,i,s){const a=this.getAttributeLocation(t);a<0||(this.gl_.enableVertexAttribArray(a),this.gl_.vertexAttribPointer(a,e,n,!1,i,s))}enableAttributes(t){const e=H0(t);let n=0;for(let i=0;i<t.length;i++){const s=t[i];this.enableAttributeArray_(s.name,s.size,s.type||Cd,e,n),n+=s.size*Ad(s.type)}}handleWebGLContextLost(t){Dn(this.bufferCache_),this.currentProgram_=null,t.preventDefault()}handleWebGLContextRestored(){this.needsToBeRecreated_=!0}needsToBeRecreated(){return this.needsToBeRecreated_}createTexture(t,e,n){const i=this.gl_;n=n||i.createTexture();const s=0,a=i.RGBA,h=0,c=i.RGBA,d=i.UNSIGNED_BYTE;return i.bindTexture(i.TEXTURE_2D,n),e?i.texImage2D(i.TEXTURE_2D,s,a,c,d,e):i.texImage2D(i.TEXTURE_2D,s,a,t[0],t[1],h,c,d,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),n}}function H0(r){let t=0;for(let e=0;e<r.length;e++){const n=r[e];t+=n.size*Ad(n.type)}return t}function Ad(r){switch(r){case _i.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case _i.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case _i.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case _i.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}class jl extends Sd{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=Ht(),this.pixelContext_=null,this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,t.addChangeListener(bt.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const n=this.getLayer();if(n.hasListener(te.PRECOMPOSE)){const i=new Or(te.PRECOMPOSE,void 0,e,t);n.dispatchEvent(i)}}dispatchPostComposeEvent(t,e){const n=this.getLayer();if(n.hasListener(te.POSTCOMPOSE)){const i=new Or(te.POSTCOMPOSE,void 0,e,t);n.dispatchEvent(i)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e=!0,n=-1,i;for(let a=0,h=t.layerStatesArray.length;a<h;a++){const c=t.layerStatesArray[a].layer,d=c.getRenderer();if(!(d instanceof jl)){e=!0;continue}const f=c.getClassName();if((e||f!==i)&&(n+=1,e=!1),i=f,d===this)break}const s="map/"+t.mapId+"/group/"+n;(!this.helper||!this.helper.canvasCacheKeyMatches(s)||this.helper.needsToBeRecreated())&&(this.removeHelper(),this.helper=new W0({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:s}),i&&(this.helper.getCanvas().className=i),this.afterHelperCreated())}return this.prepareFrameInternal(t)}afterHelperCreated(){}prepareFrameInternal(t){return!0}disposeInternal(){this.removeHelper(),super.disposeInternal()}dispatchRenderEvent_(t,e,n){const i=this.getLayer();if(i.hasListener(t)){Ie(this.inversePixelTransform_,0,0,n.pixelRatio,-n.pixelRatio,0,0,-n.size[1]);const s=new Or(t,this.inversePixelTransform_,n,e);i.dispatchEvent(s)}}preRender(t,e){this.dispatchRenderEvent_(te.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(te.POSTRENDER,t,e)}}const V0=jl,qe=new Uint8Array(4);class X0{constructor(t,e){this.helper_=t;const n=t.getGL();this.texture_=n.createTexture(),this.framebuffer_=n.createFramebuffer(),this.depthbuffer_=n.createRenderbuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(t){li(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return qe[0]=0,qe[1]=0,qe[2]=0,qe[3]=0,qe;this.readAll();const n=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return qe[0]=this.data_[n*4],qe[1]=this.data_[n*4+1],qe[2]=this.data_[n*4+2],qe[3]=this.data_[n*4+3],qe}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),e.bindRenderbuffer(e.RENDERBUFFER,this.depthbuffer_),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t[0],t[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(t[0]*t[1]*4)}}const Y0=X0,Id={GENERATE_POLYGON_BUFFERS:"GENERATE_POLYGON_BUFFERS",GENERATE_POINT_BUFFERS:"GENERATE_POINT_BUFFERS",GENERATE_LINE_STRING_BUFFERS:"GENERATE_LINE_STRING_BUFFERS"},Dd=.985;function K0(r,t){t=t||[];const e=256,n=e-1;return t[0]=Math.floor(r/e/e/e)/n,t[1]=Math.floor(r/e/e)%e/n,t[2]=Math.floor(r/e)%e/n,t[3]=r%e/n,t}function q0(r){let t=0;const e=256,n=e-1;return t+=Math.round(r[0]*e*e*e*n),t+=Math.round(r[1]*e*e*n),t+=Math.round(r[2]*e*n),t+=Math.round(r[3]*n),t}function J0(){const r='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function x(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new Error(t)}(0!==n,"Transformation matrix cannot be inverted");const x=t[0],i=t[1],u=t[2],o=t[3],f=t[4],s=t[5];return e[0]=o/n,e[1]=-i/n,e[2]=-u/n,e[3]=x/n,e[4]=(u*s-o*f)/n,e[5]=-(x*s-i*f)/n,e}function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}new Array(6);var u={exports:{}};function o(e,t,n){n=n||2;var r,x,i,u,o,s,l,v=t&&t.length,h=v?t[0]*n:e.length,c=f(e,0,h,n,!0),g=[];if(!c||c.next===c.prev)return g;if(v&&(c=function(e,t,n,r){var x,i,u,o=[];for(x=0,i=t.length;x<i;x++)(u=f(e,t[x]*r,x<i-1?t[x+1]*r:e.length,r,!1))===u.next&&(u.steiner=!0),o.push(d(u));for(o.sort(p),x=0;x<o.length;x++)n=y(o[x],n);return n}(e,t,c,n)),e.length>80*n){r=i=e[0],x=u=e[1];for(var b=n;b<h;b+=n)(o=e[b])<r&&(r=o),(s=e[b+1])<x&&(x=s),o>i&&(i=o),s>u&&(u=s);l=0!==(l=Math.max(i-r,u-x))?32767/l:0}return a(c,g,n,r,x,l,0),g}function f(e,t,n,r,x){var i,u;if(x===O(e,t,n,r)>0)for(i=t;i<n;i+=r)u=P(i,e[i],e[i+1],u);else for(i=n-r;i>=t;i-=r)u=P(i,e[i],e[i+1],u);return u&&m(u,u.next)&&(B(u),u=u.next),u}function s(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!m(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(B(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,x,i,u){if(e){!u&&i&&function(e,t,n,r){var x=e;do{0===x.z&&(x.z=b(x.x,x.y,t,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,function(e){var t,n,r,x,i,u,o,f,s=1;do{for(n=e,e=null,i=null,u=0;n;){for(u++,r=n,o=0,t=0;t<s&&(o++,r=r.nextZ);t++);for(f=s;o>0||f>0&&r;)0!==o&&(0===f||!r||n.z<=r.z)?(x=n,n=n.nextZ,o--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;n=r}i.nextZ=null,s*=2}while(u>1)}(x)}(e,r,x,i);for(var o,f,p=e;e.prev!==e.next;)if(o=e.prev,f=e.next,i?v(e,r,x,i):l(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(f.i/n|0),B(e),e=f.next,p=f.next;else if((e=f)===p){u?1===u?a(e=h(s(e),t,n),t,n,r,x,i,2):2===u&&c(e,t,n,r,x,i):a(s(e),t,n,r,x,i,1);break}}}function l(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var x=t.x,i=n.x,u=r.x,o=t.y,f=n.y,s=r.y,a=x<i?x<u?x:u:i<u?i:u,l=o<f?o<s?o:s:f<s?f:s,v=x>i?x>u?x:u:i>u?i:u,h=o>f?o>s?o:s:f>s?f:s,c=r.next;c!==t;){if(c.x>=a&&c.x<=v&&c.y>=l&&c.y<=h&&M(x,o,i,f,u,s,c.x,c.y)&&w(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function v(e,t,n,r){var x=e.prev,i=e,u=e.next;if(w(x,i,u)>=0)return!1;for(var o=x.x,f=i.x,s=u.x,a=x.y,l=i.y,v=u.y,h=o<f?o<s?o:s:f<s?f:s,c=a<l?a<v?a:v:l<v?l:v,p=o>f?o>s?o:s:f>s?f:s,y=a>l?a>v?a:v:l>v?l:v,g=b(h,c,t,n,r),d=b(p,y,t,n,r),Z=e.prevZ,m=e.nextZ;Z&&Z.z>=g&&m&&m.z<=d;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;Z&&Z.z>=g;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;m&&m.z<=d;){if(m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function h(e,t,n){var r=e;do{var x=r.prev,i=r.next.next;!m(x,i)&&A(x,r,r.next,i)&&z(x,i)&&z(i,x)&&(t.push(x.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),B(r),B(r.next),r=e=i),r=r.next}while(r!==e);return s(r)}function c(e,t,n,r,x,i){var u=e;do{for(var o=u.next.next;o!==u.prev;){if(u.i!==o.i&&Z(u,o)){var f=F(u,o);return u=s(u,u.next),f=s(f,f.next),a(u,t,n,r,x,i,0),void a(f,t,n,r,x,i,0)}o=o.next}u=u.next}while(u!==e)}function p(e,t){return e.x-t.x}function y(e,t){var n=function(e,t){var n,r=t,x=e.x,i=e.y,u=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=x&&o>u&&(u=o,n=r.x<r.next.x?r:r.next,o===x))return n}r=r.next}while(r!==t);if(!n)return null;var f,s=n,a=n.x,l=n.y,v=1/0;r=n;do{x>=r.x&&r.x>=a&&x!==r.x&&M(i<l?x:u,i,a,l,i<l?u:x,i,r.x,r.y)&&(f=Math.abs(i-r.y)/(x-r.x),z(r,e)&&(f<v||f===v&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,v=f)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;var r=F(n,e);return s(r,r.next),s(n,n.next)}function g(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}function b(e,t,n,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function M(e,t,n,r,x,i,u,o){return(x-u)*(t-o)>=(e-u)*(i-o)&&(e-u)*(r-o)>=(n-u)*(t-o)&&(n-u)*(i-o)>=(x-u)*(r-o)}function Z(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&A(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(z(e,t)&&z(t,e)&&function(e,t){var n=e,r=!1,x=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&x<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||m(e,t)&&w(e.prev,e,e.next)>0&&w(t.prev,t,t.next)>0)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function m(e,t){return e.x===t.x&&e.y===t.y}function A(e,t,n,r){var x=I(w(e,t,n)),i=I(w(e,t,r)),u=I(w(n,r,e)),o=I(w(n,r,t));return x!==i&&u!==o||(!(0!==x||!E(e,n,t))||(!(0!==i||!E(e,r,t))||(!(0!==u||!E(n,e,r))||!(0!==o||!E(n,t,r)))))}function E(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function I(e){return e>0?1:e<0?-1:0}function z(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}function F(e,t){var n=new _(e.i,e.x,e.y),r=new _(t.i,t.x,t.y),x=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=x,x.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function P(e,t,n,r){var x=new _(e,t,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(e,t,n,r){for(var x=0,i=t,u=n-r;i<n;i+=r)x+=(e[u]-e[i])*(e[i+1]+e[u+1]),u=i;return x}u.exports=o,u.exports.default=o,o.deviation=function(e,t,n,r){var x=t&&t.length,i=x?t[0]*n:e.length,u=Math.abs(O(e,0,i,n));if(x)for(var o=0,f=t.length;o<f;o++){var s=t[o]*n,a=o<f-1?t[o+1]*n:e.length;u-=Math.abs(O(e,s,a,n))}var l=0;for(o=0;o<r.length;o+=3){var v=r[o]*n,h=r[o+1]*n,c=r[o+2]*n;l+=Math.abs((e[v]-e[c])*(e[h+1]-e[v+1])-(e[v]-e[h])*(e[c+1]-e[v+1]))}return 0===u&&0===l?0:Math.abs((l-u)/u)},o.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,x=0;x<e.length;x++){for(var i=0;i<e[x].length;i++)for(var u=0;u<t;u++)n.vertices.push(e[x][i][u]);x>0&&(r+=e[x-1].length,n.holes.push(r))}return n};var N=i(u.exports);const R=[],S={vertexPosition:0,indexPosition:0};function T(e,t,n,r,x){e[t+0]=n,e[t+1]=r,e[t+2]=x}function U(e,t,n,r,x,i){const u=3+x,o=e[t+0],f=e[t+1],s=R;s.length=x;for(let n=0;n<s.length;n++)s[n]=e[t+2+n];let a=i?i.vertexPosition:0,l=i?i.indexPosition:0;const v=a/u;return T(n,a,o,f,0),s.length&&n.set(s,a+3),a+=u,T(n,a,o,f,1),s.length&&n.set(s,a+3),a+=u,T(n,a,o,f,2),s.length&&n.set(s,a+3),a+=u,T(n,a,o,f,3),s.length&&n.set(s,a+3),a+=u,r[l++]=v,r[l++]=v+1,r[l++]=v+3,r[l++]=v+1,r[l++]=v+2,r[l++]=v+3,S.vertexPosition=a,S.indexPosition=l,S}function k(e,t,n,x,i,u,o,f,s,a,l){const v=8+f.length,h=u.length/v,c=[e[t+0],e[t+1]],p=[e[n],e[n+1]],y=r(s,[...c]),g=r(s,[...p]);function b(e,t,n){const r=Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])),x=[(t[0]-e[0])/r,(t[1]-e[1])/r],i=[-x[1],x[0]],u=Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1])),o=[(n[0]-e[0])/u,(n[1]-e[1])/u],f=0===r||0===u?0:Math.acos((s=o[0]*x[0]+o[1]*x[1],a=-1,l=1,Math.min(Math.max(s,a),l)));var s,a,l;return o[0]*i[0]+o[1]*i[1]>0?f:2*Math.PI-f}let d=-1,M=-1,Z=l;const w=null!==i;if(null!==x){d=b(y,g,r(s,[...[e[x],e[x+1]]])),Math.cos(d)<=.985&&(Z+=Math.tan((d-Math.PI)/2))}if(w){M=b(g,y,r(s,[...[e[i],e[i+1]]])),Math.cos(M)<=.985&&(Z+=Math.tan((Math.PI-M)/2))}function m(e,t){return 0===t?1e4*e:Math.sign(t)*(1e4*e+Math.abs(t))}return u.push(c[0],c[1],p[0],p[1],d,M,a,m(0,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(1,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(2,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(3,l)),u.push(...f),o.push(h,h+1,h+2,h+1,h+3,h+2),{length:a+Math.sqrt((g[0]-y[0])*(g[0]-y[0])+(g[1]-y[1])*(g[1]-y[1])),angle:Z}}function G(e,t,n,r,x){const i=2+x;let u=t;const o=e.slice(u,u+x);u+=x;const f=e[u++];let s=0;const a=new Array(f-1);for(let t=0;t<f;t++)s+=e[u++],t<f-1&&(a[t]=s);const l=e.slice(u,u+2*s),v=N(l,a,2);for(let e=0;e<v.length;e++)r.push(v[e]+n.length/i);for(let e=0;e<l.length;e+=2)n.push(l[e],l[e+1],...o);return u+2*s}const j=self;j.onmessage=r=>{const i=r.data;switch(i.type){case t:{const e=3,t=2,n=i.customAttributesSize,r=t+n,x=new Float32Array(i.renderInstructions),u=x.length/r,o=4*u*(n+e),f=new Uint32Array(6*u),s=new Float32Array(o);let a;for(let e=0;e<x.length;e+=r)a=U(x,e,s,f,n,a);const l=Object.assign({vertexBuffer:s.buffer,indexBuffer:f.buffer,renderInstructions:x.buffer},i);j.postMessage(l,[s.buffer,f.buffer,x.buffer]);break}case n:{const e=[],t=[],n=i.customAttributesSize,r=2,u=new Float32Array(i.renderInstructions);let o=0;const f=[1,0,0,1,0,0];let s,a;for(x(f,i.renderInstructionsTransform);o<u.length;){a=Array.from(u.slice(o,o+n)),o+=n,s=u[o++];const x=o,i=o+(s-1)*r,l=u[x]===u[i]&&u[x+1]===u[i+1];let v=0,h=0;for(let n=0;n<s-1;n++){let c=null;n>0?c=o+(n-1)*r:l&&(c=i-r);let p=null;n<s-2?p=o+(n+2)*r:l&&(p=x+r);const y=k(u,o+n*r,o+(n+1)*r,c,p,e,t,a,f,v,h);v=y.length,h=y.angle}o+=s*r}const l=Uint32Array.from(t),v=Float32Array.from(e),h=Object.assign({vertexBuffer:v.buffer,indexBuffer:l.buffer,renderInstructions:u.buffer},i);j.postMessage(h,[v.buffer,l.buffer,u.buffer]);break}case e:{const e=[],t=[],n=i.customAttributesSize,r=new Float32Array(i.renderInstructions);let x=0;for(;x<r.length;)x=G(r,x,e,t,n);const u=Uint32Array.from(t),o=Float32Array.from(e),f=Object.assign({vertexBuffer:o.buffer,indexBuffer:u.buffer,renderInstructions:r.buffer},i);j.postMessage(f,[o.buffer,u.buffer,r.buffer]);break}}};';return new Worker(typeof Blob>"u"?"data:application/javascript;base64,"+Buffer.from(r,"binary").toString("base64"):URL.createObjectURL(new Blob([r],{type:"application/javascript"})))}function Q0(r,t){const e=r.viewState.projection,i=t.getSource().getWrapX()&&e.canWrapX(),s=e.getExtent(),a=r.extent,h=i?Mt(s):null,c=i?Math.ceil((a[2]-s[2])/h)+1:1;return[i?Math.floor((a[0]-s[0])/h):0,c,h]}class $0 extends V0{constructor(t,e){const n=e.uniforms||{},i=Ht();n[pi.PROJECTION_MATRIX]=i,super(t,{uniforms:n,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new Md(Nl,Gl),this.indicesBuffer_=new Md(Bl,Gl),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.program_,this.hitDetectionEnabled_=e.hitDetectionEnabled??!0;const s=e.attributes?e.attributes.map(function(h){return{name:"a_prop_"+h.name,size:1,type:_i.FLOAT}}):[];this.attributes=[{name:"a_position",size:2,type:_i.FLOAT},{name:"a_index",size:1,type:_i.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_hitColor",size:4,type:_i.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:_i.FLOAT})),this.attributes.push(...s),this.customAttributes=e.attributes?e.attributes:[],this.previousExtent_=xe(),this.currentTransform_=i,this.renderTransform_=Ht(),this.invertRenderTransform_=Ht(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=J0(),this.worker_.addEventListener("message",h=>{const c=h.data;if(c.type===Id.GENERATE_POINT_BUFFERS){const d=c.projectionTransform;this.verticesBuffer_.fromArrayBuffer(c.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(c.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=d,$s(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(h.data.renderInstructions),c.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}}),this.featureCache_={},this.featureCount_=0;const a=this.getLayer().getSource();this.sourceListenKeys_=[gt(a,oe.ADDFEATURE,this.handleSourceFeatureAdded_,this),gt(a,oe.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),gt(a,oe.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),gt(a,oe.CLEAR,this.handleSourceFeatureClear_,this)],a.forEachFeature(h=>{this.featureCache_[dt(h)]={feature:h,properties:h.getProperties(),geometry:h.getGeometry()},this.featureCount_++})}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new Y0(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[dt(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[dt(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[dt(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const[n,i,s]=Q0(t,this.getLayer());return this.renderWorlds(t,!1,n,i,s),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(t,!0,n,i,s),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),this.helper.getCanvas()}prepareFrameInternal(t){const e=this.getLayer(),n=e.getSource(),i=t.viewState,s=!t.viewHints[Zt.ANIMATING]&&!t.viewHints[Zt.INTERACTING],a=!Nn(this.previousExtent_,t.extent),h=this.sourceRevision_<n.getRevision();if(h&&(this.sourceRevision_=n.getRevision()),s&&(a||h)){const c=i.projection,d=i.resolution,f=e instanceof zl?e.getRenderBuffer():0,p=Zs(t.extent,f*d);n.loadFeatures(p,d,c),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.useProgram(this.program_,t),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}rebuildBuffers_(t){const e=Ht();this.helper.makeProjectionTransform(t,e);const i=(this.hitDetectionEnabled_?7:2)+this.customAttributes.length,s=i*this.featureCount_;(!this.renderInstructions_||this.renderInstructions_.length!==s)&&(this.renderInstructions_=new Float32Array(s));let a,h;const c=[],d=[];let f=-1;for(const m in this.featureCache_)if(a=this.featureCache_[m],h=a.geometry,!(!h||h.getType()!=="Point")){if(c[0]=h.getFlatCoordinates()[0],c[1]=h.getFlatCoordinates()[1],Nt(e,c),this.renderInstructions_[++f]=c[0],this.renderInstructions_[++f]=c[1],this.hitDetectionEnabled_){const v=K0(f+5,d);this.renderInstructions_[++f]=v[0],this.renderInstructions_[++f]=v[1],this.renderInstructions_[++f]=v[2],this.renderInstructions_[++f]=v[3],this.renderInstructions_[++f]=Number(m)}for(let v=0;v<this.customAttributes.length;v++){const E=this.customAttributes[v].callback(a.feature,a.properties);this.renderInstructions_[++f]=E}}const p={id:++this.lastSentId,type:Id.GENERATE_POINT_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesSize:i-2};p.projectionTransform=e,this.ready=!1,this.worker_.postMessage(p,[this.renderInstructions_.buffer]),this.renderInstructions_=null}forEachFeatureAtCoordinate(t,e,n,i,s){if(mt(this.hitDetectionEnabled_,"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has been disabled using the `disableHitDetection: true` option."),!this.renderInstructions_||!this.hitDetectionEnabled_)return;const a=Nt(e.coordinateToPixelTransform,t.slice()),h=this.hitRenderTarget_.readPixel(a[0]/2,a[1]/2),c=[h[0]/255,h[1]/255,h[2]/255,h[3]/255],d=q0(c),f=this.renderInstructions_[d],p=Math.floor(f).toString(),v=this.getLayer().getSource().getFeatureByUid(p);if(v)return i(v,this.getLayer(),null)}renderWorlds(t,e,n,i,s){let a=n;this.helper.useProgram(this.program_,t),e&&(this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0)),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes);do{this.helper.makeProjectionTransform(t,this.currentTransform_),Um(this.currentTransform_,a*s,0),du(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(t),this.helper.applyHitDetectionUniform(e);const h=this.indicesBuffer_.getSize();this.helper.drawElements(0,h)}while(++a<i)}disposeInternal(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(t){Tt(t)}),this.sourceListenKeys_=null,super.disposeInternal()}}const tx=$0,ex=.5;class ix extends Ns{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(ct.CHANGE)}release(){this.state===nt.ERROR&&this.setState(nt.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let t=this.interimTile;if(!t)return this;do{if(t.getState()==nt.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){let t=this.interimTile;if(!t)return;let e=this;do{if(t.getState()==nt.LOADED){t.interimTile=null;break}t.getState()==nt.LOADING?e=t:t.getState()==nt.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==nt.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){ot()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const i=e-n+1e3/60;return i>=this.transition_?1:au(i/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const Od=ix,nx=10,Fd=.25;class rx{constructor(t,e,n,i,s,a){this.sourceProj_=t,this.targetProj_=e;let h={};const c=Pr(this.targetProj_,this.sourceProj_);this.transformInv_=function(y){const x=y[0]+"/"+y[1];return h[x]||(h[x]=c(y)),h[x]},this.maxSourceExtent_=i,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Mt(i)>=Mt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Mt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Mt(this.targetProj_.getExtent()):null;const d=cn(n),f=Xs(n),p=Vs(n),m=Hs(n),v=this.transformInv_(d),E=this.transformInv_(f),b=this.transformInv_(p),M=this.transformInv_(m),S=nx+(a?Math.max(0,Math.ceil(Math.log2(za(n)/(a*a*256*256)))):0);if(this.addQuad_(d,f,p,m,v,E,b,M,S),this.wrapsXInSource_){let y=1/0;this.triangles_.forEach(function(x,C,T){y=Math.min(y,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-y>this.sourceWorldWidth_/2){const C=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];C[0][0]-y>this.sourceWorldWidth_/2&&(C[0][0]-=this.sourceWorldWidth_),C[1][0]-y>this.sourceWorldWidth_/2&&(C[1][0]-=this.sourceWorldWidth_),C[2][0]-y>this.sourceWorldWidth_/2&&(C[2][0]-=this.sourceWorldWidth_);const T=Math.min(C[0][0],C[1][0],C[2][0]);Math.max(C[0][0],C[1][0],C[2][0])-T<this.sourceWorldWidth_/2&&(x.source=C)}})}h={}}addTriangle_(t,e,n,i,s,a){this.triangles_.push({source:[i,s,a],target:[t,e,n]})}addQuad_(t,e,n,i,s,a,h,c,d){const f=Gc([s,a,h,c]),p=this.sourceWorldWidth_?Mt(f)/this.sourceWorldWidth_:null,m=this.sourceWorldWidth_,v=this.sourceProj_.canWrapX()&&p>.5&&p<1;let E=!1;if(d>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const M=Gc([t,e,n,i]);E=Mt(M)/this.targetWorldWidth_>Fd||E}!v&&this.sourceProj_.isGlobal()&&p&&(E=p>Fd||E)}if(!E&&this.maxSourceExtent_&&isFinite(f[0])&&isFinite(f[1])&&isFinite(f[2])&&isFinite(f[3])&&!ce(f,this.maxSourceExtent_))return;let b=0;if(!E&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(h[0])||!isFinite(h[1])||!isFinite(c[0])||!isFinite(c[1]))){if(d>0)E=!0;else if(b=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(h[0])||!isFinite(h[1])?2:0)+(!isFinite(c[0])||!isFinite(c[1])?1:0),b!=1&&b!=2&&b!=4&&b!=8)return}if(d>0){if(!E){const M=[(t[0]+n[0])/2,(t[1]+n[1])/2],S=this.transformInv_(M);let y;v?y=(Bn(s[0],m)+Bn(h[0],m))/2-Bn(S[0],m):y=(s[0]+h[0])/2-S[0];const x=(s[1]+h[1])/2-S[1];E=y*y+x*x>this.errorThresholdSquared_}if(E){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const M=[(e[0]+n[0])/2,(e[1]+n[1])/2],S=this.transformInv_(M),y=[(i[0]+t[0])/2,(i[1]+t[1])/2],x=this.transformInv_(y);this.addQuad_(t,e,M,y,s,a,S,x,d-1),this.addQuad_(y,M,n,i,x,S,h,c,d-1)}else{const M=[(t[0]+e[0])/2,(t[1]+e[1])/2],S=this.transformInv_(M),y=[(n[0]+i[0])/2,(n[1]+i[1])/2],x=this.transformInv_(y);this.addQuad_(t,M,y,i,s,S,x,c,d-1),this.addQuad_(M,e,n,y,S,a,h,x,d-1)}return}}if(v){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}b&11||this.addTriangle_(t,n,i,s,h,c),b&14||this.addTriangle_(t,n,e,s,h,a),b&&(b&13||this.addTriangle_(e,i,t,a,c,s),b&7||this.addTriangle_(e,i,n,a,c,h))}calculateSourceExtent(){const t=xe();return this.triangles_.forEach(function(e,n,i){const s=e.source;Mr(t,s[0]),Mr(t,s[1]),Mr(t,s[2])}),t}getTriangles(){return this.triangles_}}const sx=rx;let Zl;const Kn=[];function zd(r,t,e,n,i){r.beginPath(),r.moveTo(0,0),r.lineTo(t,e),r.lineTo(n,i),r.closePath(),r.save(),r.clip(),r.fillRect(0,0,Math.max(t,n)+1,Math.max(e,i)),r.restore()}function Wl(r,t){return Math.abs(r[t*4]-210)>2||Math.abs(r[t*4+3]-.75*255)>2}function ox(){if(Zl===void 0){const r=ee(6,6,Kn);r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",zd(r,4,5,4,0),zd(r,4,5,0,5);const t=r.getImageData(0,0,3,3).data;Zl=Wl(t,0)||Wl(t,4)||Wl(t,8),fo(r),Kn.push(r.canvas)}return Zl}function Nd(r,t,e,n){const i=iu(e,t,r);let s=$c(t,n,e);const a=t.getMetersPerUnit();a!==void 0&&(s*=a);const h=r.getMetersPerUnit();h!==void 0&&(s/=h);const c=r.getExtent();if(!c||Ws(c,i)){const d=$c(r,s,i)/s;isFinite(d)&&d>0&&(s/=d)}return s}function ax(r,t,e,n){const i=Ri(e);let s=Nd(r,t,i,n);return(!isFinite(s)||s<=0)&&Hc(e,function(a){return s=Nd(r,t,a,n),isFinite(s)&&s>0}),s}function lx(r,t,e,n,i,s,a,h,c,d,f,p,m){const v=ee(Math.round(e*r),Math.round(e*t),Kn);if(p||(v.imageSmoothingEnabled=!1),c.length===0)return v.canvas;v.scale(e,e);function E(y){return Math.round(y*e)/e}v.globalCompositeOperation="lighter";const b=xe();c.forEach(function(y,x,C){Zc(b,y.extent)});let M;if(!m||c.length!==1||d!==0){const y=Mt(b),x=we(b);M=ee(Math.round(e*y/n),Math.round(e*x/n),Kn),p||(M.imageSmoothingEnabled=!1);const C=e/n;c.forEach(function(T,k,R){const I=T.extent[0]-b[0],z=-(T.extent[3]-b[3]),G=Mt(T.extent),j=we(T.extent);T.image.width>0&&T.image.height>0&&M.drawImage(T.image,d,d,T.image.width-2*d,T.image.height-2*d,I*C,z*C,G*C,j*C)})}const S=cn(a);return h.getTriangles().forEach(function(y,x,C){const T=y.source,k=y.target;let R=T[0][0],I=T[0][1],z=T[1][0],G=T[1][1],j=T[2][0],W=T[2][1];const Y=E((k[0][0]-S[0])/s),$=E(-(k[0][1]-S[1])/s),K=E((k[1][0]-S[0])/s),V=E(-(k[1][1]-S[1])/s),Z=E((k[2][0]-S[0])/s),U=E(-(k[2][1]-S[1])/s),xt=R,H=I;R=0,I=0,z-=xt,G-=H,j-=xt,W-=H;const at=[[z,G,0,0,K-Y],[j,W,0,0,Z-Y],[0,0,z,G,V-$],[0,0,j,W,U-$]],F=ym(at);if(!F)return;if(v.save(),v.beginPath(),ox()||!p){v.moveTo(K,V);const et=4,it=Y-K,ht=$-V;for(let kt=0;kt<et;kt++)v.lineTo(K+E((kt+1)*it/et),V+E(kt*ht/(et-1))),kt!=et-1&&v.lineTo(K+E((kt+1)*it/et),V+E((kt+1)*ht/(et-1)));v.lineTo(Z,U)}else v.moveTo(K,V),v.lineTo(Y,$),v.lineTo(Z,U);v.clip(),v.transform(F[0],F[2],F[1],F[3],Y,$),v.translate(b[0]-xt,b[3]-H);let wt;if(M)wt=M.canvas,v.scale(n/e,-n/e);else{const et=c[0],it=et.extent;wt=et.image,v.scale(Mt(it)/wt.width,-we(it)/wt.height)}v.drawImage(wt,0,0),v.restore()}),M&&(fo(M),Kn.push(M.canvas)),f&&(v.save(),v.globalCompositeOperation="source-over",v.strokeStyle="black",v.lineWidth=1,h.getTriangles().forEach(function(y,x,C){const T=y.target,k=(T[0][0]-S[0])/s,R=-(T[0][1]-S[1])/s,I=(T[1][0]-S[0])/s,z=-(T[1][1]-S[1])/s,G=(T[2][0]-S[0])/s,j=-(T[2][1]-S[1])/s;v.beginPath(),v.moveTo(I,z),v.lineTo(k,R),v.lineTo(G,j),v.closePath(),v.stroke()}),v.restore()),v.canvas}class hx extends Od{constructor(t,e,n,i,s,a,h,c,d,f,p,m){super(s,nt.IDLE,m),this.renderEdges_=p!==void 0?p:!1,this.pixelRatio_=h,this.gutter_=c,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=i,this.wrappedTileCoord_=a||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const v=i.getTileCoordExtent(this.wrappedTileCoord_),E=this.targetTileGrid_.getExtent();let b=this.sourceTileGrid_.getExtent();const M=E?Sr(v,E):v;if(za(M)===0){this.state=nt.EMPTY;return}const S=t.getExtent();S&&(b?b=Sr(b,S):b=S);const y=i.getResolution(this.wrappedTileCoord_[0]),x=ax(t,n,M,y);if(!isFinite(x)||x<=0){this.state=nt.EMPTY;return}const C=f!==void 0?f:ex;if(this.triangulation_=new sx(t,n,M,b,x*C,y),this.triangulation_.getTriangles().length===0){this.state=nt.EMPTY;return}this.sourceZ_=e.getZForResolution(x);let T=this.triangulation_.calculateSourceExtent();if(b&&(t.canWrapX()?(T[1]=Dt(T[1],b[1],b[3]),T[3]=Dt(T[3],b[1],b[3])):T=Sr(T,b)),!za(T))this.state=nt.EMPTY;else{const k=e.getTileRangeForExtentAndZ(T,this.sourceZ_);for(let R=k.minX;R<=k.maxX;R++)for(let I=k.minY;I<=k.maxY;I++){const z=d(this.sourceZ_,R,I,h);z&&this.sourceTiles_.push(z)}this.sourceTiles_.length===0&&(this.state=nt.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{e&&e.getState()==nt.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}),this.sourceTiles_.length=0,t.length===0)this.state=nt.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),i=typeof n=="number"?n:n[0],s=typeof n=="number"?n:n[1],a=this.targetTileGrid_.getResolution(e),h=this.sourceTileGrid_.getResolution(this.sourceZ_),c=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=lx(i,s,this.pixelRatio_,h,this.sourceTileGrid_.getExtent(),a,c,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=nt.LOADED}this.changed()}load(){if(this.state==nt.IDLE){this.state=nt.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(e=>{const n=e.getState();if(n==nt.IDLE||n==nt.LOADING){t++;const i=gt(e,ct.CHANGE,function(s){const a=e.getState();(a==nt.LOADED||a==nt.ERROR||a==nt.EMPTY)&&(Tt(i),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(i)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,n,i){e.getState()==nt.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Tt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(fo(this.canvas_.getContext("2d")),Kn.push(this.canvas_),this.canvas_=null),super.release()}}const Hl=hx;class cx extends Od{constructor(t,e,n,i,s,a){super(t,e,a),this.crossOrigin_=i,this.src_=n,this.key=n,this.image_=new Image,i!==null&&(this.image_.crossOrigin=i),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=nt.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=nt.ERROR,this.unlistenImage_(),this.image_=ux(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=nt.LOADED:this.state=nt.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==nt.ERROR&&(this.state=nt.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==nt.IDLE&&(this.state=nt.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=zv(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function ux(){const r=ee(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}const Bd=cx;class dx{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return mt(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return mt(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){var e;return(e=this.entries_[t])==null?void 0:e.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){mt(!(t in this.entries_),"Tried to set a value for a key that is used already");const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}const fx=dx;class Gd{constructor(t,e,n,i){this.minX=t,this.maxX=e,this.minY=n,this.maxY=i}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function qn(r,t,e,n,i){return i!==void 0?(i.minX=r,i.maxX=t,i.minY=e,i.maxY=n,i):new Gd(r,t,e,n)}const Ud=Gd;function jd(r,t,e,n){return n!==void 0?(n[0]=r,n[1]=t,n[2]=e,n):[r,t,e]}function ko(r,t,e){return r+"/"+t+"/"+e}function Zd(r){return ko(r[0],r[1],r[2])}function gx(r){return r.split("/").map(Number)}function px(r){return(r[1]<<r[0])+r[2]}function _x(r,t){const e=r[0],n=r[1],i=r[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const s=t.getFullTileRange(e);return s?s.containsXY(n,i):!0}function qr(r){const t=r.toString();return t.includes(".")?t:t+".0"}function mx(r){if(r.length<2||r.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${r.length}(${r.map(qr).join(", ")})`}function Vl(r){const t=Dr(r),e=t.length>3?t[3]:1;return mx([t[0]/255*e,t[1]/255*e,t[2]/255*e,e])}const Xl={};let yx=0;function vx(r){return r in Xl||(Xl[r]=yx++),Xl[r]}function Jn(r){return qr(vx(r))}function xx(){return{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"#3399CC","stroke-width":1.25,"circle-radius":5,"circle-fill-color":"rgba(255,255,255,0.4)","circle-stroke-width":1.25,"circle-stroke-color":"#3399CC"}}const Qn=`#ifdef GL_FRAGMENT_PRECISION_HIGH
45
+ `;class N0{constructor(t){this.gl_=t.webGlContext;const e=this.gl_;this.scaleRatio_=t.scaleRatio||1,this.renderTargetTexture_=e.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=e.createFramebuffer(),this.depthBuffer_=e.createRenderbuffer();const n=e.createShader(e.VERTEX_SHADER);e.shaderSource(n,t.vertexShader||F0),e.compileShader(n);const i=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(i,t.fragmentShader||z0),e.compileShader(i),this.renderTargetProgram_=e.createProgram(),e.attachShader(this.renderTargetProgram_,n),e.attachShader(this.renderTargetProgram_,i),e.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=e.createBuffer();const s=[-1,-1,1,-1,-1,1,1,-1,1,1,-1,1];e.bindBuffer(e.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),e.bufferData(e.ARRAY_BUFFER,new Float32Array(s),e.STATIC_DRAW),this.renderTargetAttribLocation_=e.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=e.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],t.uniforms&&Object.keys(t.uniforms).forEach(a=>{this.uniforms_.push({value:t.uniforms[a],location:e.getUniformLocation(this.renderTargetProgram_,a)})})}getGL(){return this.gl_}init(t){const e=this.getGL(),n=[e.drawingBufferWidth*this.scaleRatio_,e.drawingBufferHeight*this.scaleRatio_];if(e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer()),e.bindRenderbuffer(e.RENDERBUFFER,this.getDepthBuffer()),e.viewport(0,0,n[0],n[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==n[0]||this.renderTargetTextureSize_[1]!==n[1]){this.renderTargetTextureSize_=n;const i=0,s=e.RGBA,a=0,h=e.RGBA,c=e.UNSIGNED_BYTE,d=null;e.bindTexture(e.TEXTURE_2D,this.renderTargetTexture_),e.texImage2D(e.TEXTURE_2D,i,s,n[0],n[1],a,h,c,d),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.renderTargetTexture_,0),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,n[0],n[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthBuffer_)}}apply(t,e,n,i){const s=this.getGL(),a=t.size;if(s.bindFramebuffer(s.FRAMEBUFFER,e?e.getFrameBuffer():null),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,this.renderTargetTexture_),!e){const c=dt(s.canvas);if(!t.renderTargets[c]){const d=s.getContextAttributes();d&&d.preserveDrawingBuffer&&(s.clearColor(0,0,0,0),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT)),t.renderTargets[c]=!0}}s.disable(s.DEPTH_TEST),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA),s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.bindBuffer(s.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),s.useProgram(this.renderTargetProgram_),s.enableVertexAttribArray(this.renderTargetAttribLocation_),s.vertexAttribPointer(this.renderTargetAttribLocation_,2,s.FLOAT,!1,0,0),s.uniform2f(this.renderTargetUniformLocation_,a[0],a[1]),s.uniform1i(this.renderTargetTextureLocation_,0);const h=t.layerStatesArray[t.layerIndex].opacity;s.uniform1f(this.renderTargetOpacityLocation_,h),this.applyUniforms(t),n&&n(s,t),s.drawArrays(s.TRIANGLES,0,6),i&&i(s,t)}getFrameBuffer(){return this.frameBuffer_}getDepthBuffer(){return this.depthBuffer_}applyUniforms(t){const e=this.getGL();let n,i=1;this.uniforms_.forEach(function(s){if(n=typeof s.value=="function"?s.value(t):s.value,n instanceof HTMLCanvasElement||n instanceof ImageData)s.texture||(s.texture=e.createTexture()),e.activeTexture(e[`TEXTURE${i}`]),e.bindTexture(e.TEXTURE_2D,s.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n instanceof ImageData?e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,n.width,n.height,0,e.UNSIGNED_BYTE,new Uint8Array(n.data)):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n),e.uniform1i(s.location,i++);else if(Array.isArray(n))switch(n.length){case 2:e.uniform2f(s.location,n[0],n[1]);return;case 3:e.uniform3f(s.location,n[0],n[1],n[2]);return;case 4:e.uniform4f(s.location,n[0],n[1],n[2],n[3]);return;default:return}else typeof n=="number"&&e.uniform1f(s.location,n)})}}const Pd=N0;function B0(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function G0(r,t){return r[0]=t[0],r[1]=t[1],r[4]=t[2],r[5]=t[3],r[12]=t[4],r[13]=t[5],r}const pi={PROJECTION_MATRIX:"u_projectionMatrix",SCREEN_TO_WORLD_MATRIX:"u_screenToWorldMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution",ROTATION:"u_rotation",VIEWPORT_SIZE_PX:"u_viewportSizePx",PIXEL_RATIO:"u_pixelRatio",HIT_DETECTION:"u_hitDetection"},_i={UNSIGNED_BYTE:P0,UNSIGNED_SHORT:k0,UNSIGNED_INT:R0,FLOAT:Cd},Po={};function kd(r){return"shared/"+r}let Rd=0;function U0(){const r="unique/"+Rd;return Rd+=1,r}function j0(r){let t=Po[r];if(!t){const e=document.createElement("canvas");e.width=1,e.height=1,e.style.position="absolute",e.style.left="0",t={users:0,context:A0(e)},Po[r]=t}return t.users+=1,t.context}function Z0(r){const t=Po[r];if(!t||(t.users-=1,t.users>0))return;const e=t.context,n=e.getExtension("WEBGL_lose_context");n&&n.loseContext();const i=e.canvas;i.width=1,i.height=1,delete Po[r]}class W0 extends Fs{constructor(t){super(),t=t||{},this.boundHandleWebGLContextLost_=this.handleWebGLContextLost.bind(this),this.boundHandleWebGLContextRestored_=this.handleWebGLContextRestored.bind(this),this.canvasCacheKey_=t.canvasCacheKey?kd(t.canvasCacheKey):U0(),this.gl_=j0(this.canvasCacheKey_),this.bufferCache_={},this.extensionCache_={},this.currentProgram_=null,this.needsToBeRecreated_=!1;const e=this.gl_.canvas;e.addEventListener(So.LOST,this.boundHandleWebGLContextLost_),e.addEventListener(So.RESTORED,this.boundHandleWebGLContextRestored_),this.offsetRotateMatrix_=Ht(),this.offsetScaleMatrix_=Ht(),this.tmpMat4_=B0(),this.uniformLocationsByProgram_={},this.attribLocationsByProgram_={},this.uniforms_=[],t.uniforms&&this.setUniforms(t.uniforms),this.postProcessPasses_=t.postProcesses?t.postProcesses.map(n=>new Pd({webGlContext:this.gl_,scaleRatio:n.scaleRatio,vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms})):[new Pd({webGlContext:this.gl_})],this.shaderCompileErrors_=null,this.startTime_=Date.now()}setUniforms(t){this.uniforms_=[],this.addUniforms(t)}addUniforms(t){for(const e in t)this.uniforms_.push({name:e,value:t[e]})}canvasCacheKeyMatches(t){return this.canvasCacheKey_===kd(t)}getExtension(t){if(t in this.extensionCache_)return this.extensionCache_[t];const e=this.gl_.getExtension(t);return this.extensionCache_[t]=e,e}bindBuffer(t){const e=this.gl_,n=dt(t);let i=this.bufferCache_[n];if(!i){const s=e.createBuffer();i={buffer:t,webGlBuffer:s},this.bufferCache_[n]=i}e.bindBuffer(t.getType(),i.webGlBuffer)}flushBufferData(t){const e=this.gl_;this.bindBuffer(t),e.bufferData(t.getType(),t.getArray(),t.getUsage())}deleteBuffer(t){const e=this.gl_,n=dt(t),i=this.bufferCache_[n];i&&!e.isContextLost()&&e.deleteBuffer(i.webGlBuffer),delete this.bufferCache_[n]}disposeInternal(){const t=this.gl_.canvas;t.removeEventListener(So.LOST,this.boundHandleWebGLContextLost_),t.removeEventListener(So.RESTORED,this.boundHandleWebGLContextRestored_),Z0(this.canvasCacheKey_),delete this.gl_}prepareDraw(t,e,n){const i=this.gl_,s=this.getCanvas(),a=t.size,h=t.pixelRatio;(s.width!==a[0]*h||s.height!==a[1]*h)&&(s.width=a[0]*h,s.height=a[1]*h,s.style.width=a[0]+"px",s.style.height=a[1]+"px");for(let c=this.postProcessPasses_.length-1;c>=0;c--)this.postProcessPasses_[c].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.depthRange(0,1),i.clearDepth(1),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,e?i.ZERO:i.ONE_MINUS_SRC_ALPHA),n?(i.enable(i.DEPTH_TEST),i.depthFunc(i.LEQUAL)):i.disable(i.DEPTH_TEST)}bindTexture(t,e,n){const i=this.gl_;i.activeTexture(i.TEXTURE0+e),i.bindTexture(i.TEXTURE_2D,t),i.uniform1i(this.getUniformLocation(n),e)}prepareDrawToRenderTarget(t,e,n,i){const s=this.gl_,a=e.getSize();s.bindFramebuffer(s.FRAMEBUFFER,e.getFramebuffer()),s.bindRenderbuffer(s.RENDERBUFFER,e.getDepthbuffer()),s.viewport(0,0,a[0],a[1]),s.bindTexture(s.TEXTURE_2D,e.getTexture()),s.clearColor(0,0,0,0),s.depthRange(0,1),s.clearDepth(1),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.enable(s.BLEND),s.blendFunc(s.ONE,n?s.ZERO:s.ONE_MINUS_SRC_ALPHA),i?(s.enable(s.DEPTH_TEST),s.depthFunc(s.LEQUAL)):s.disable(s.DEPTH_TEST)}drawElements(t,e){const n=this.gl_;this.getExtension("OES_element_index_uint");const i=n.UNSIGNED_INT,s=4,a=e-t,h=t*s;n.drawElements(n.TRIANGLES,a,i,h)}finalizeDraw(t,e,n){for(let i=0,s=this.postProcessPasses_.length;i<s;i++)i===s-1?this.postProcessPasses_[i].apply(t,null,e,n):this.postProcessPasses_[i].apply(t,this.postProcessPasses_[i+1])}getCanvas(){return this.gl_.canvas}getGL(){return this.gl_}applyFrameState(t){const e=t.size,n=t.viewState.rotation,i=t.pixelRatio;this.setUniformFloatValue(pi.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(pi.ZOOM,t.viewState.zoom),this.setUniformFloatValue(pi.RESOLUTION,t.viewState.resolution),this.setUniformFloatValue(pi.PIXEL_RATIO,i),this.setUniformFloatVec2(pi.VIEWPORT_SIZE_PX,[e[0],e[1]]),this.setUniformFloatValue(pi.ROTATION,n)}applyHitDetectionUniform(t){const e=this.getUniformLocation(pi.HIT_DETECTION);this.getGL().uniform1i(e,t?1:0),t&&this.setUniformFloatValue(pi.PIXEL_RATIO,.5)}applyUniforms(t){const e=this.gl_;let n,i=0;this.uniforms_.forEach(s=>{if(n=typeof s.value=="function"?s.value(t):s.value,n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof ImageData)s.texture||(s.prevValue=void 0,s.texture=e.createTexture()),this.bindTexture(s.texture,i,s.name),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),(!(n instanceof HTMLImageElement)||n.complete)&&s.prevValue!==n&&(s.prevValue=n,e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n)),i++;else if(Array.isArray(n)&&n.length===6)this.setUniformMatrixValue(s.name,G0(this.tmpMat4_,n));else if(Array.isArray(n)&&n.length<=4)switch(n.length){case 2:e.uniform2f(this.getUniformLocation(s.name),n[0],n[1]);return;case 3:e.uniform3f(this.getUniformLocation(s.name),n[0],n[1],n[2]);return;case 4:e.uniform4f(this.getUniformLocation(s.name),n[0],n[1],n[2],n[3]);return;default:return}else typeof n=="number"&&e.uniform1f(this.getUniformLocation(s.name),n)})}useProgram(t,e){this.gl_.useProgram(t),this.currentProgram_=t,this.applyFrameState(e),this.applyUniforms(e)}compileShader(t,e){const n=this.gl_,i=n.createShader(e);return n.shaderSource(i,t),n.compileShader(i),i}getProgram(t,e){const n=this.gl_,i=this.compileShader(t,n.FRAGMENT_SHADER),s=this.compileShader(e,n.VERTEX_SHADER),a=n.createProgram();if(n.attachShader(a,i),n.attachShader(a,s),n.linkProgram(a),!n.getShaderParameter(i,n.COMPILE_STATUS)){const h=`Fragment shader compilation failed: ${n.getShaderInfoLog(i)}`;throw new Error(h)}if(n.deleteShader(i),!n.getShaderParameter(s,n.COMPILE_STATUS)){const h=`Vertex shader compilation failed: ${n.getShaderInfoLog(s)}`;throw new Error(h)}if(n.deleteShader(s),!n.getProgramParameter(a,n.LINK_STATUS)){const h=`GL program linking failed: ${n.getProgramInfoLog(a)}`;throw new Error(h)}return a}getUniformLocation(t){const e=dt(this.currentProgram_);return this.uniformLocationsByProgram_[e]===void 0&&(this.uniformLocationsByProgram_[e]={}),this.uniformLocationsByProgram_[e][t]===void 0&&(this.uniformLocationsByProgram_[e][t]=this.gl_.getUniformLocation(this.currentProgram_,t)),this.uniformLocationsByProgram_[e][t]}getAttributeLocation(t){const e=dt(this.currentProgram_);return this.attribLocationsByProgram_[e]===void 0&&(this.attribLocationsByProgram_[e]={}),this.attribLocationsByProgram_[e][t]===void 0&&(this.attribLocationsByProgram_[e][t]=this.gl_.getAttribLocation(this.currentProgram_,t)),this.attribLocationsByProgram_[e][t]}makeProjectionTransform(t,e){const n=t.size,i=t.viewState.rotation,s=t.viewState.resolution,a=t.viewState.center;return Ie(e,0,0,2/(s*n[0]),2/(s*n[1]),-i,-a[0],-a[1]),e}setUniformFloatValue(t,e){this.gl_.uniform1f(this.getUniformLocation(t),e)}setUniformFloatVec2(t,e){this.gl_.uniform2fv(this.getUniformLocation(t),e)}setUniformFloatVec4(t,e){this.gl_.uniform4fv(this.getUniformLocation(t),e)}setUniformMatrixValue(t,e){this.gl_.uniformMatrix4fv(this.getUniformLocation(t),!1,e)}enableAttributeArray_(t,e,n,i,s){const a=this.getAttributeLocation(t);a<0||(this.gl_.enableVertexAttribArray(a),this.gl_.vertexAttribPointer(a,e,n,!1,i,s))}enableAttributes(t){const e=H0(t);let n=0;for(let i=0;i<t.length;i++){const s=t[i];this.enableAttributeArray_(s.name,s.size,s.type||Cd,e,n),n+=s.size*Ad(s.type)}}handleWebGLContextLost(t){Dn(this.bufferCache_),this.currentProgram_=null,t.preventDefault()}handleWebGLContextRestored(){this.needsToBeRecreated_=!0}needsToBeRecreated(){return this.needsToBeRecreated_}createTexture(t,e,n){const i=this.gl_;n=n||i.createTexture();const s=0,a=i.RGBA,h=0,c=i.RGBA,d=i.UNSIGNED_BYTE;return i.bindTexture(i.TEXTURE_2D,n),e?i.texImage2D(i.TEXTURE_2D,s,a,c,d,e):i.texImage2D(i.TEXTURE_2D,s,a,t[0],t[1],h,c,d,null),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),n}}function H0(r){let t=0;for(let e=0;e<r.length;e++){const n=r[e];t+=n.size*Ad(n.type)}return t}function Ad(r){switch(r){case _i.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case _i.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case _i.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case _i.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}class jl extends Sd{constructor(t,e){super(t),e=e||{},this.inversePixelTransform_=Ht(),this.pixelContext_=null,this.postProcesses_=e.postProcesses,this.uniforms_=e.uniforms,this.helper,t.addChangeListener(bt.MAP,this.removeHelper.bind(this)),this.dispatchPreComposeEvent=this.dispatchPreComposeEvent.bind(this),this.dispatchPostComposeEvent=this.dispatchPostComposeEvent.bind(this)}dispatchPreComposeEvent(t,e){const n=this.getLayer();if(n.hasListener(te.PRECOMPOSE)){const i=new Or(te.PRECOMPOSE,void 0,e,t);n.dispatchEvent(i)}}dispatchPostComposeEvent(t,e){const n=this.getLayer();if(n.hasListener(te.POSTCOMPOSE)){const i=new Or(te.POSTCOMPOSE,void 0,e,t);n.dispatchEvent(i)}}reset(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)}removeHelper(){this.helper&&(this.helper.dispose(),delete this.helper)}prepareFrame(t){if(this.getLayer().getRenderSource()){let e=!0,n=-1,i;for(let a=0,h=t.layerStatesArray.length;a<h;a++){const c=t.layerStatesArray[a].layer,d=c.getRenderer();if(!(d instanceof jl)){e=!0;continue}const f=c.getClassName();if((e||f!==i)&&(n+=1,e=!1),i=f,d===this)break}const s="map/"+t.mapId+"/group/"+n;(!this.helper||!this.helper.canvasCacheKeyMatches(s)||this.helper.needsToBeRecreated())&&(this.removeHelper(),this.helper=new W0({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:s}),i&&(this.helper.getCanvas().className=i),this.afterHelperCreated())}return this.prepareFrameInternal(t)}afterHelperCreated(){}prepareFrameInternal(t){return!0}disposeInternal(){this.removeHelper(),super.disposeInternal()}dispatchRenderEvent_(t,e,n){const i=this.getLayer();if(i.hasListener(t)){Ie(this.inversePixelTransform_,0,0,n.pixelRatio,-n.pixelRatio,0,0,-n.size[1]);const s=new Or(t,this.inversePixelTransform_,n,e);i.dispatchEvent(s)}}preRender(t,e){this.dispatchRenderEvent_(te.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(te.POSTRENDER,t,e)}}const V0=jl,qe=new Uint8Array(4);class X0{constructor(t,e){this.helper_=t;const n=t.getGL();this.texture_=n.createTexture(),this.framebuffer_=n.createFramebuffer(),this.depthbuffer_=n.createRenderbuffer(),this.size_=e||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}setSize(t){li(t,this.size_)||(this.size_[0]=t[0],this.size_[1]=t[1],this.updateSize_())}getSize(){return this.size_}clearCachedData(){this.dataCacheDirty_=!0}readAll(){if(this.dataCacheDirty_){const t=this.size_,e=this.helper_.getGL();e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.readPixels(0,0,t[0],t[1],e.RGBA,e.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_}readPixel(t,e){if(t<0||e<0||t>this.size_[0]||e>=this.size_[1])return qe[0]=0,qe[1]=0,qe[2]=0,qe[3]=0,qe;this.readAll();const n=Math.floor(t)+(this.size_[1]-Math.floor(e)-1)*this.size_[0];return qe[0]=this.data_[n*4],qe[1]=this.data_[n*4+1],qe[2]=this.data_[n*4+2],qe[3]=this.data_[n*4+3],qe}getTexture(){return this.texture_}getFramebuffer(){return this.framebuffer_}getDepthbuffer(){return this.depthbuffer_}updateSize_(){const t=this.size_,e=this.helper_.getGL();this.texture_=this.helper_.createTexture(t,null,this.texture_),e.bindFramebuffer(e.FRAMEBUFFER,this.framebuffer_),e.viewport(0,0,t[0],t[1]),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture_,0),e.bindRenderbuffer(e.RENDERBUFFER,this.depthbuffer_),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,t[0],t[1]),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,this.depthbuffer_),this.data_=new Uint8Array(t[0]*t[1]*4)}}const Y0=X0,Id={GENERATE_POLYGON_BUFFERS:"GENERATE_POLYGON_BUFFERS",GENERATE_POINT_BUFFERS:"GENERATE_POINT_BUFFERS",GENERATE_LINE_STRING_BUFFERS:"GENERATE_LINE_STRING_BUFFERS"},Dd=.985;function K0(r,t){t=t||[];const e=256,n=e-1;return t[0]=Math.floor(r/e/e/e)/n,t[1]=Math.floor(r/e/e)%e/n,t[2]=Math.floor(r/e)%e/n,t[3]=r%e/n,t}function q0(r){let t=0;const e=256,n=e-1;return t+=Math.round(r[0]*e*e*e*n),t+=Math.round(r[1]*e*e*n),t+=Math.round(r[2]*e*n),t+=Math.round(r[3]*n),t}function J0(){const r='const e="GENERATE_POLYGON_BUFFERS",t="GENERATE_POINT_BUFFERS",n="GENERATE_LINE_STRING_BUFFERS";function r(e,t){const n=t[0],r=t[1];return t[0]=e[0]*n+e[2]*r+e[4],t[1]=e[1]*n+e[3]*r+e[5],t}function x(e,t){const n=(r=t)[0]*r[3]-r[1]*r[2];var r;!function(e,t){if(!e)throw new Error(t)}(0!==n,"Transformation matrix cannot be inverted");const x=t[0],i=t[1],u=t[2],o=t[3],f=t[4],s=t[5];return e[0]=o/n,e[1]=-i/n,e[2]=-u/n,e[3]=x/n,e[4]=(u*s-o*f)/n,e[5]=-(x*s-i*f)/n,e}function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}new Array(6);var u={exports:{}};function o(e,t,n){n=n||2;var r,x,i,u,o,s,l,v=t&&t.length,h=v?t[0]*n:e.length,c=f(e,0,h,n,!0),g=[];if(!c||c.next===c.prev)return g;if(v&&(c=function(e,t,n,r){var x,i,u,o=[];for(x=0,i=t.length;x<i;x++)(u=f(e,t[x]*r,x<i-1?t[x+1]*r:e.length,r,!1))===u.next&&(u.steiner=!0),o.push(d(u));for(o.sort(p),x=0;x<o.length;x++)n=y(o[x],n);return n}(e,t,c,n)),e.length>80*n){r=i=e[0],x=u=e[1];for(var b=n;b<h;b+=n)(o=e[b])<r&&(r=o),(s=e[b+1])<x&&(x=s),o>i&&(i=o),s>u&&(u=s);l=0!==(l=Math.max(i-r,u-x))?32767/l:0}return a(c,g,n,r,x,l,0),g}function f(e,t,n,r,x){var i,u;if(x===O(e,t,n,r)>0)for(i=t;i<n;i+=r)u=P(i,e[i],e[i+1],u);else for(i=n-r;i>=t;i-=r)u=P(i,e[i],e[i+1],u);return u&&m(u,u.next)&&(B(u),u=u.next),u}function s(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!m(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(B(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function a(e,t,n,r,x,i,u){if(e){!u&&i&&function(e,t,n,r){var x=e;do{0===x.z&&(x.z=b(x.x,x.y,t,n,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,function(e){var t,n,r,x,i,u,o,f,s=1;do{for(n=e,e=null,i=null,u=0;n;){for(u++,r=n,o=0,t=0;t<s&&(o++,r=r.nextZ);t++);for(f=s;o>0||f>0&&r;)0!==o&&(0===f||!r||n.z<=r.z)?(x=n,n=n.nextZ,o--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;n=r}i.nextZ=null,s*=2}while(u>1)}(x)}(e,r,x,i);for(var o,f,p=e;e.prev!==e.next;)if(o=e.prev,f=e.next,i?v(e,r,x,i):l(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(f.i/n|0),B(e),e=f.next,p=f.next;else if((e=f)===p){u?1===u?a(e=h(s(e),t,n),t,n,r,x,i,2):2===u&&c(e,t,n,r,x,i):a(s(e),t,n,r,x,i,1);break}}}function l(e){var t=e.prev,n=e,r=e.next;if(w(t,n,r)>=0)return!1;for(var x=t.x,i=n.x,u=r.x,o=t.y,f=n.y,s=r.y,a=x<i?x<u?x:u:i<u?i:u,l=o<f?o<s?o:s:f<s?f:s,v=x>i?x>u?x:u:i>u?i:u,h=o>f?o>s?o:s:f>s?f:s,c=r.next;c!==t;){if(c.x>=a&&c.x<=v&&c.y>=l&&c.y<=h&&M(x,o,i,f,u,s,c.x,c.y)&&w(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function v(e,t,n,r){var x=e.prev,i=e,u=e.next;if(w(x,i,u)>=0)return!1;for(var o=x.x,f=i.x,s=u.x,a=x.y,l=i.y,v=u.y,h=o<f?o<s?o:s:f<s?f:s,c=a<l?a<v?a:v:l<v?l:v,p=o>f?o>s?o:s:f>s?f:s,y=a>l?a>v?a:v:l>v?l:v,g=b(h,c,t,n,r),d=b(p,y,t,n,r),Z=e.prevZ,m=e.nextZ;Z&&Z.z>=g&&m&&m.z<=d;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;if(Z=Z.prevZ,m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;Z&&Z.z>=g;){if(Z.x>=h&&Z.x<=p&&Z.y>=c&&Z.y<=y&&Z!==x&&Z!==u&&M(o,a,f,l,s,v,Z.x,Z.y)&&w(Z.prev,Z,Z.next)>=0)return!1;Z=Z.prevZ}for(;m&&m.z<=d;){if(m.x>=h&&m.x<=p&&m.y>=c&&m.y<=y&&m!==x&&m!==u&&M(o,a,f,l,s,v,m.x,m.y)&&w(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function h(e,t,n){var r=e;do{var x=r.prev,i=r.next.next;!m(x,i)&&A(x,r,r.next,i)&&z(x,i)&&z(i,x)&&(t.push(x.i/n|0),t.push(r.i/n|0),t.push(i.i/n|0),B(r),B(r.next),r=e=i),r=r.next}while(r!==e);return s(r)}function c(e,t,n,r,x,i){var u=e;do{for(var o=u.next.next;o!==u.prev;){if(u.i!==o.i&&Z(u,o)){var f=F(u,o);return u=s(u,u.next),f=s(f,f.next),a(u,t,n,r,x,i,0),void a(f,t,n,r,x,i,0)}o=o.next}u=u.next}while(u!==e)}function p(e,t){return e.x-t.x}function y(e,t){var n=function(e,t){var n,r=t,x=e.x,i=e.y,u=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var o=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(o<=x&&o>u&&(u=o,n=r.x<r.next.x?r:r.next,o===x))return n}r=r.next}while(r!==t);if(!n)return null;var f,s=n,a=n.x,l=n.y,v=1/0;r=n;do{x>=r.x&&r.x>=a&&x!==r.x&&M(i<l?x:u,i,a,l,i<l?u:x,i,r.x,r.y)&&(f=Math.abs(i-r.y)/(x-r.x),z(r,e)&&(f<v||f===v&&(r.x>n.x||r.x===n.x&&g(n,r)))&&(n=r,v=f)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;var r=F(n,e);return s(r,r.next),s(n,n.next)}function g(e,t){return w(e.prev,e,t.prev)<0&&w(t.next,e,e.next)<0}function b(e,t,n,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*x|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*x|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function d(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function M(e,t,n,r,x,i,u,o){return(x-u)*(t-o)>=(e-u)*(i-o)&&(e-u)*(r-o)>=(n-u)*(t-o)&&(n-u)*(i-o)>=(x-u)*(r-o)}function Z(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&A(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(z(e,t)&&z(t,e)&&function(e,t){var n=e,r=!1,x=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&x<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(w(e.prev,e,t.prev)||w(e,t.prev,t))||m(e,t)&&w(e.prev,e,e.next)>0&&w(t.prev,t,t.next)>0)}function w(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function m(e,t){return e.x===t.x&&e.y===t.y}function A(e,t,n,r){var x=I(w(e,t,n)),i=I(w(e,t,r)),u=I(w(n,r,e)),o=I(w(n,r,t));return x!==i&&u!==o||(!(0!==x||!E(e,n,t))||(!(0!==i||!E(e,r,t))||(!(0!==u||!E(n,e,r))||!(0!==o||!E(n,t,r)))))}function E(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function I(e){return e>0?1:e<0?-1:0}function z(e,t){return w(e.prev,e,e.next)<0?w(e,t,e.next)>=0&&w(e,e.prev,t)>=0:w(e,t,e.prev)<0||w(e,e.next,t)<0}function F(e,t){var n=new _(e.i,e.x,e.y),r=new _(t.i,t.x,t.y),x=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=x,x.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function P(e,t,n,r){var x=new _(e,t,n);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(e,t,n,r){for(var x=0,i=t,u=n-r;i<n;i+=r)x+=(e[u]-e[i])*(e[i+1]+e[u+1]),u=i;return x}u.exports=o,u.exports.default=o,o.deviation=function(e,t,n,r){var x=t&&t.length,i=x?t[0]*n:e.length,u=Math.abs(O(e,0,i,n));if(x)for(var o=0,f=t.length;o<f;o++){var s=t[o]*n,a=o<f-1?t[o+1]*n:e.length;u-=Math.abs(O(e,s,a,n))}var l=0;for(o=0;o<r.length;o+=3){var v=r[o]*n,h=r[o+1]*n,c=r[o+2]*n;l+=Math.abs((e[v]-e[c])*(e[h+1]-e[v+1])-(e[v]-e[h])*(e[c+1]-e[v+1]))}return 0===u&&0===l?0:Math.abs((l-u)/u)},o.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,x=0;x<e.length;x++){for(var i=0;i<e[x].length;i++)for(var u=0;u<t;u++)n.vertices.push(e[x][i][u]);x>0&&(r+=e[x-1].length,n.holes.push(r))}return n};var N=i(u.exports);const R=[],S={vertexPosition:0,indexPosition:0};function T(e,t,n,r,x){e[t+0]=n,e[t+1]=r,e[t+2]=x}function U(e,t,n,r,x,i){const u=3+x,o=e[t+0],f=e[t+1],s=R;s.length=x;for(let n=0;n<s.length;n++)s[n]=e[t+2+n];let a=i?i.vertexPosition:0,l=i?i.indexPosition:0;const v=a/u;return T(n,a,o,f,0),s.length&&n.set(s,a+3),a+=u,T(n,a,o,f,1),s.length&&n.set(s,a+3),a+=u,T(n,a,o,f,2),s.length&&n.set(s,a+3),a+=u,T(n,a,o,f,3),s.length&&n.set(s,a+3),a+=u,r[l++]=v,r[l++]=v+1,r[l++]=v+3,r[l++]=v+1,r[l++]=v+2,r[l++]=v+3,S.vertexPosition=a,S.indexPosition=l,S}function k(e,t,n,x,i,u,o,f,s,a,l){const v=8+f.length,h=u.length/v,c=[e[t+0],e[t+1]],p=[e[n],e[n+1]],y=r(s,[...c]),g=r(s,[...p]);function b(e,t,n){const r=Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])),x=[(t[0]-e[0])/r,(t[1]-e[1])/r],i=[-x[1],x[0]],u=Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1])),o=[(n[0]-e[0])/u,(n[1]-e[1])/u],f=0===r||0===u?0:Math.acos((s=o[0]*x[0]+o[1]*x[1],a=-1,l=1,Math.min(Math.max(s,a),l)));var s,a,l;return o[0]*i[0]+o[1]*i[1]>0?f:2*Math.PI-f}let d=-1,M=-1,Z=l;const w=null!==i;if(null!==x){d=b(y,g,r(s,[...[e[x],e[x+1]]])),Math.cos(d)<=.985&&(Z+=Math.tan((d-Math.PI)/2))}if(w){M=b(g,y,r(s,[...[e[i],e[i+1]]])),Math.cos(M)<=.985&&(Z+=Math.tan((Math.PI-M)/2))}function m(e,t){return 0===t?1e4*e:Math.sign(t)*(1e4*e+Math.abs(t))}return u.push(c[0],c[1],p[0],p[1],d,M,a,m(0,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(1,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(2,l)),u.push(...f),u.push(c[0],c[1],p[0],p[1],d,M,a,m(3,l)),u.push(...f),o.push(h,h+1,h+2,h+1,h+3,h+2),{length:a+Math.sqrt((g[0]-y[0])*(g[0]-y[0])+(g[1]-y[1])*(g[1]-y[1])),angle:Z}}function G(e,t,n,r,x){const i=2+x;let u=t;const o=e.slice(u,u+x);u+=x;const f=e[u++];let s=0;const a=new Array(f-1);for(let t=0;t<f;t++)s+=e[u++],t<f-1&&(a[t]=s);const l=e.slice(u,u+2*s),v=N(l,a,2);for(let e=0;e<v.length;e++)r.push(v[e]+n.length/i);for(let e=0;e<l.length;e+=2)n.push(l[e],l[e+1],...o);return u+2*s}const j=self;j.onmessage=r=>{const i=r.data;switch(i.type){case t:{const e=3,t=2,n=i.customAttributesSize,r=t+n,x=new Float32Array(i.renderInstructions),u=x.length/r,o=4*u*(n+e),f=new Uint32Array(6*u),s=new Float32Array(o);let a;for(let e=0;e<x.length;e+=r)a=U(x,e,s,f,n,a);const l=Object.assign({vertexBuffer:s.buffer,indexBuffer:f.buffer,renderInstructions:x.buffer},i);j.postMessage(l,[s.buffer,f.buffer,x.buffer]);break}case n:{const e=[],t=[],n=i.customAttributesSize,r=2,u=new Float32Array(i.renderInstructions);let o=0;const f=[1,0,0,1,0,0];let s,a;for(x(f,i.renderInstructionsTransform);o<u.length;){a=Array.from(u.slice(o,o+n)),o+=n,s=u[o++];const x=o,i=o+(s-1)*r,l=u[x]===u[i]&&u[x+1]===u[i+1];let v=0,h=0;for(let n=0;n<s-1;n++){let c=null;n>0?c=o+(n-1)*r:l&&(c=i-r);let p=null;n<s-2?p=o+(n+2)*r:l&&(p=x+r);const y=k(u,o+n*r,o+(n+1)*r,c,p,e,t,a,f,v,h);v=y.length,h=y.angle}o+=s*r}const l=Uint32Array.from(t),v=Float32Array.from(e),h=Object.assign({vertexBuffer:v.buffer,indexBuffer:l.buffer,renderInstructions:u.buffer},i);j.postMessage(h,[v.buffer,l.buffer,u.buffer]);break}case e:{const e=[],t=[],n=i.customAttributesSize,r=new Float32Array(i.renderInstructions);let x=0;for(;x<r.length;)x=G(r,x,e,t,n);const u=Uint32Array.from(t),o=Float32Array.from(e),f=Object.assign({vertexBuffer:o.buffer,indexBuffer:u.buffer,renderInstructions:r.buffer},i);j.postMessage(f,[o.buffer,u.buffer,r.buffer]);break}}};';return new Worker(typeof Blob>"u"?"data:application/javascript;base64,"+Buffer.from(r,"binary").toString("base64"):URL.createObjectURL(new Blob([r],{type:"application/javascript"})))}function Q0(r,t){const e=r.viewState.projection,i=t.getSource().getWrapX()&&e.canWrapX(),s=e.getExtent(),a=r.extent,h=i?Mt(s):null,c=i?Math.ceil((a[2]-s[2])/h)+1:1;return[i?Math.floor((a[0]-s[0])/h):0,c,h]}class $0 extends V0{constructor(t,e){const n=e.uniforms||{},i=Ht();n[pi.PROJECTION_MATRIX]=i,super(t,{uniforms:n,postProcesses:e.postProcesses}),this.sourceRevision_=-1,this.verticesBuffer_=new Md(Nl,Gl),this.indicesBuffer_=new Md(Bl,Gl),this.vertexShader_=e.vertexShader,this.fragmentShader_=e.fragmentShader,this.program_,this.hitDetectionEnabled_=e.hitDetectionEnabled??!0;const s=e.attributes?e.attributes.map(function(h){return{name:"a_prop_"+h.name,size:1,type:_i.FLOAT}}):[];this.attributes=[{name:"a_position",size:2,type:_i.FLOAT},{name:"a_index",size:1,type:_i.FLOAT}],this.hitDetectionEnabled_&&(this.attributes.push({name:"a_hitColor",size:4,type:_i.FLOAT}),this.attributes.push({name:"a_featureUid",size:1,type:_i.FLOAT})),this.attributes.push(...s),this.customAttributes=e.attributes?e.attributes:[],this.previousExtent_=xe(),this.currentTransform_=i,this.renderTransform_=Ht(),this.invertRenderTransform_=Ht(),this.renderInstructions_=new Float32Array(0),this.hitRenderTarget_,this.lastSentId=0,this.worker_=J0(),this.worker_.addEventListener("message",h=>{const c=h.data;if(c.type===Id.GENERATE_POINT_BUFFERS){const d=c.projectionTransform;this.verticesBuffer_.fromArrayBuffer(c.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_),this.indicesBuffer_.fromArrayBuffer(c.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=d,$s(this.invertRenderTransform_,this.renderTransform_),this.renderInstructions_=new Float32Array(h.data.renderInstructions),c.id===this.lastSentId&&(this.ready=!0),this.getLayer().changed()}}),this.featureCache_={},this.featureCount_=0;const a=this.getLayer().getSource();this.sourceListenKeys_=[gt(a,oe.ADDFEATURE,this.handleSourceFeatureAdded_,this),gt(a,oe.CHANGEFEATURE,this.handleSourceFeatureChanged_,this),gt(a,oe.REMOVEFEATURE,this.handleSourceFeatureDelete_,this),gt(a,oe.CLEAR,this.handleSourceFeatureClear_,this)],a.forEachFeature(h=>{this.featureCache_[dt(h)]={feature:h,properties:h.getProperties(),geometry:h.getGeometry()},this.featureCount_++})}afterHelperCreated(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitRenderTarget_=new Y0(this.helper))}handleSourceFeatureAdded_(t){const e=t.feature;this.featureCache_[dt(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()},this.featureCount_++}handleSourceFeatureChanged_(t){const e=t.feature;this.featureCache_[dt(e)]={feature:e,properties:e.getProperties(),geometry:e.getGeometry()}}handleSourceFeatureDelete_(t){const e=t.feature;delete this.featureCache_[dt(e)],this.featureCount_--}handleSourceFeatureClear_(){this.featureCache_={},this.featureCount_=0}renderFrame(t){const e=this.helper.getGL();this.preRender(e,t);const[n,i,s]=Q0(t,this.getLayer());return this.renderWorlds(t,!1,n,i,s),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent),this.hitDetectionEnabled_&&(this.renderWorlds(t,!0,n,i,s),this.hitRenderTarget_.clearCachedData()),this.postRender(e,t),this.helper.getCanvas()}prepareFrameInternal(t){const e=this.getLayer(),n=e.getSource(),i=t.viewState,s=!t.viewHints[Zt.ANIMATING]&&!t.viewHints[Zt.INTERACTING],a=!Nn(this.previousExtent_,t.extent),h=this.sourceRevision_<n.getRevision();if(h&&(this.sourceRevision_=n.getRevision()),s&&(a||h)){const c=i.projection,d=i.resolution,f=e instanceof zl?e.getRenderBuffer():0,p=Zs(t.extent,f*d);n.loadFeatures(p,d,c),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.useProgram(this.program_,t),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0}rebuildBuffers_(t){const e=Ht();this.helper.makeProjectionTransform(t,e);const i=(this.hitDetectionEnabled_?7:2)+this.customAttributes.length,s=i*this.featureCount_;(!this.renderInstructions_||this.renderInstructions_.length!==s)&&(this.renderInstructions_=new Float32Array(s));let a,h;const c=[],d=[];let f=-1;for(const m in this.featureCache_)if(a=this.featureCache_[m],h=a.geometry,!(!h||h.getType()!=="Point")){if(c[0]=h.getFlatCoordinates()[0],c[1]=h.getFlatCoordinates()[1],Nt(e,c),this.renderInstructions_[++f]=c[0],this.renderInstructions_[++f]=c[1],this.hitDetectionEnabled_){const v=K0(f+5,d);this.renderInstructions_[++f]=v[0],this.renderInstructions_[++f]=v[1],this.renderInstructions_[++f]=v[2],this.renderInstructions_[++f]=v[3],this.renderInstructions_[++f]=Number(m)}for(let v=0;v<this.customAttributes.length;v++){const E=this.customAttributes[v].callback(a.feature,a.properties);this.renderInstructions_[++f]=E}}const p={id:++this.lastSentId,type:Id.GENERATE_POINT_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesSize:i-2};p.projectionTransform=e,this.ready=!1,this.worker_.postMessage(p,[this.renderInstructions_.buffer]),this.renderInstructions_=null}forEachFeatureAtCoordinate(t,e,n,i,s){if(mt(this.hitDetectionEnabled_,"`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has been disabled using the `disableHitDetection: true` option."),!this.renderInstructions_||!this.hitDetectionEnabled_)return;const a=Nt(e.coordinateToPixelTransform,t.slice()),h=this.hitRenderTarget_.readPixel(a[0]/2,a[1]/2),c=[h[0]/255,h[1]/255,h[2]/255,h[3]/255],d=q0(c),f=this.renderInstructions_[d],p=Math.floor(f).toString(),v=this.getLayer().getSource().getFeatureByUid(p);if(v)return i(v,this.getLayer(),null)}renderWorlds(t,e,n,i,s){let a=n;this.helper.useProgram(this.program_,t),e&&(this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0)),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes);do{this.helper.makeProjectionTransform(t,this.currentTransform_),Um(this.currentTransform_,a*s,0),du(this.currentTransform_,this.invertRenderTransform_),this.helper.applyUniforms(t),this.helper.applyHitDetectionUniform(e);const h=this.indicesBuffer_.getSize();this.helper.drawElements(0,h)}while(++a<i)}disposeInternal(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(t){Tt(t)}),this.sourceListenKeys_=null,super.disposeInternal()}}const tx=$0,ex=.5;class ix extends Ns{constructor(t,e,n){super(),n=n||{},this.tileCoord=t,this.state=e,this.interimTile=null,this.key="",this.transition_=n.transition===void 0?250:n.transition,this.transitionStarts_={},this.interpolate=!!n.interpolate}changed(){this.dispatchEvent(ct.CHANGE)}release(){this.state===nt.ERROR&&this.setState(nt.EMPTY)}getKey(){return this.key+"/"+this.tileCoord}getInterimTile(){let t=this.interimTile;if(!t)return this;do{if(t.getState()==nt.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this}refreshInterimChain(){let t=this.interimTile;if(!t)return;let e=this;do{if(t.getState()==nt.LOADED){t.interimTile=null;break}t.getState()==nt.LOADING?e=t:t.getState()==nt.IDLE?e.interimTile=t.interimTile:e=t,t=e.interimTile}while(t)}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(this.state!==nt.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}load(){ot()}getAlpha(t,e){if(!this.transition_)return 1;let n=this.transitionStarts_[t];if(!n)n=e,this.transitionStarts_[t]=n;else if(n===-1)return 1;const i=e-n+1e3/60;return i>=this.transition_?1:au(i/this.transition_)}inTransition(t){return this.transition_?this.transitionStarts_[t]!==-1:!1}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}}const Od=ix,nx=10,Fd=.25;class rx{constructor(t,e,n,i,s,a){this.sourceProj_=t,this.targetProj_=e;let h={};const c=Pr(this.targetProj_,this.sourceProj_);this.transformInv_=function(y){const x=y[0]+"/"+y[1];return h[x]||(h[x]=c(y)),h[x]},this.maxSourceExtent_=i,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Mt(i)>=Mt(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Mt(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Mt(this.targetProj_.getExtent()):null;const d=cn(n),f=Xs(n),p=Vs(n),m=Hs(n),v=this.transformInv_(d),E=this.transformInv_(f),C=this.transformInv_(p),M=this.transformInv_(m),S=nx+(a?Math.max(0,Math.ceil(Math.log2(za(n)/(a*a*256*256)))):0);if(this.addQuad_(d,f,p,m,v,E,C,M,S),this.wrapsXInSource_){let y=1/0;this.triangles_.forEach(function(x,b,T){y=Math.min(y,x.source[0][0],x.source[1][0],x.source[2][0])}),this.triangles_.forEach(x=>{if(Math.max(x.source[0][0],x.source[1][0],x.source[2][0])-y>this.sourceWorldWidth_/2){const b=[[x.source[0][0],x.source[0][1]],[x.source[1][0],x.source[1][1]],[x.source[2][0],x.source[2][1]]];b[0][0]-y>this.sourceWorldWidth_/2&&(b[0][0]-=this.sourceWorldWidth_),b[1][0]-y>this.sourceWorldWidth_/2&&(b[1][0]-=this.sourceWorldWidth_),b[2][0]-y>this.sourceWorldWidth_/2&&(b[2][0]-=this.sourceWorldWidth_);const T=Math.min(b[0][0],b[1][0],b[2][0]);Math.max(b[0][0],b[1][0],b[2][0])-T<this.sourceWorldWidth_/2&&(x.source=b)}})}h={}}addTriangle_(t,e,n,i,s,a){this.triangles_.push({source:[i,s,a],target:[t,e,n]})}addQuad_(t,e,n,i,s,a,h,c,d){const f=Gc([s,a,h,c]),p=this.sourceWorldWidth_?Mt(f)/this.sourceWorldWidth_:null,m=this.sourceWorldWidth_,v=this.sourceProj_.canWrapX()&&p>.5&&p<1;let E=!1;if(d>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){const M=Gc([t,e,n,i]);E=Mt(M)/this.targetWorldWidth_>Fd||E}!v&&this.sourceProj_.isGlobal()&&p&&(E=p>Fd||E)}if(!E&&this.maxSourceExtent_&&isFinite(f[0])&&isFinite(f[1])&&isFinite(f[2])&&isFinite(f[3])&&!ce(f,this.maxSourceExtent_))return;let C=0;if(!E&&(!isFinite(s[0])||!isFinite(s[1])||!isFinite(a[0])||!isFinite(a[1])||!isFinite(h[0])||!isFinite(h[1])||!isFinite(c[0])||!isFinite(c[1]))){if(d>0)E=!0;else if(C=(!isFinite(s[0])||!isFinite(s[1])?8:0)+(!isFinite(a[0])||!isFinite(a[1])?4:0)+(!isFinite(h[0])||!isFinite(h[1])?2:0)+(!isFinite(c[0])||!isFinite(c[1])?1:0),C!=1&&C!=2&&C!=4&&C!=8)return}if(d>0){if(!E){const M=[(t[0]+n[0])/2,(t[1]+n[1])/2],S=this.transformInv_(M);let y;v?y=(Bn(s[0],m)+Bn(h[0],m))/2-Bn(S[0],m):y=(s[0]+h[0])/2-S[0];const x=(s[1]+h[1])/2-S[1];E=y*y+x*x>this.errorThresholdSquared_}if(E){if(Math.abs(t[0]-n[0])<=Math.abs(t[1]-n[1])){const M=[(e[0]+n[0])/2,(e[1]+n[1])/2],S=this.transformInv_(M),y=[(i[0]+t[0])/2,(i[1]+t[1])/2],x=this.transformInv_(y);this.addQuad_(t,e,M,y,s,a,S,x,d-1),this.addQuad_(y,M,n,i,x,S,h,c,d-1)}else{const M=[(t[0]+e[0])/2,(t[1]+e[1])/2],S=this.transformInv_(M),y=[(n[0]+i[0])/2,(n[1]+i[1])/2],x=this.transformInv_(y);this.addQuad_(t,M,y,i,s,S,x,c,d-1),this.addQuad_(M,e,n,y,S,a,h,x,d-1)}return}}if(v){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}C&11||this.addTriangle_(t,n,i,s,h,c),C&14||this.addTriangle_(t,n,e,s,h,a),C&&(C&13||this.addTriangle_(e,i,t,a,c,s),C&7||this.addTriangle_(e,i,n,a,c,h))}calculateSourceExtent(){const t=xe();return this.triangles_.forEach(function(e,n,i){const s=e.source;Mr(t,s[0]),Mr(t,s[1]),Mr(t,s[2])}),t}getTriangles(){return this.triangles_}}const sx=rx;let Zl;const Kn=[];function zd(r,t,e,n,i){r.beginPath(),r.moveTo(0,0),r.lineTo(t,e),r.lineTo(n,i),r.closePath(),r.save(),r.clip(),r.fillRect(0,0,Math.max(t,n)+1,Math.max(e,i)),r.restore()}function Wl(r,t){return Math.abs(r[t*4]-210)>2||Math.abs(r[t*4+3]-.75*255)>2}function ox(){if(Zl===void 0){const r=ee(6,6,Kn);r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",zd(r,4,5,4,0),zd(r,4,5,0,5);const t=r.getImageData(0,0,3,3).data;Zl=Wl(t,0)||Wl(t,4)||Wl(t,8),fo(r),Kn.push(r.canvas)}return Zl}function Nd(r,t,e,n){const i=iu(e,t,r);let s=$c(t,n,e);const a=t.getMetersPerUnit();a!==void 0&&(s*=a);const h=r.getMetersPerUnit();h!==void 0&&(s/=h);const c=r.getExtent();if(!c||Ws(c,i)){const d=$c(r,s,i)/s;isFinite(d)&&d>0&&(s/=d)}return s}function ax(r,t,e,n){const i=Ri(e);let s=Nd(r,t,i,n);return(!isFinite(s)||s<=0)&&Hc(e,function(a){return s=Nd(r,t,a,n),isFinite(s)&&s>0}),s}function lx(r,t,e,n,i,s,a,h,c,d,f,p,m){const v=ee(Math.round(e*r),Math.round(e*t),Kn);if(p||(v.imageSmoothingEnabled=!1),c.length===0)return v.canvas;v.scale(e,e);function E(y){return Math.round(y*e)/e}v.globalCompositeOperation="lighter";const C=xe();c.forEach(function(y,x,b){Zc(C,y.extent)});let M;if(!m||c.length!==1||d!==0){const y=Mt(C),x=we(C);M=ee(Math.round(e*y/n),Math.round(e*x/n),Kn),p||(M.imageSmoothingEnabled=!1);const b=e/n;c.forEach(function(T,k,R){const I=T.extent[0]-C[0],z=-(T.extent[3]-C[3]),G=Mt(T.extent),j=we(T.extent);T.image.width>0&&T.image.height>0&&M.drawImage(T.image,d,d,T.image.width-2*d,T.image.height-2*d,I*b,z*b,G*b,j*b)})}const S=cn(a);return h.getTriangles().forEach(function(y,x,b){const T=y.source,k=y.target;let R=T[0][0],I=T[0][1],z=T[1][0],G=T[1][1],j=T[2][0],W=T[2][1];const Y=E((k[0][0]-S[0])/s),$=E(-(k[0][1]-S[1])/s),K=E((k[1][0]-S[0])/s),V=E(-(k[1][1]-S[1])/s),Z=E((k[2][0]-S[0])/s),U=E(-(k[2][1]-S[1])/s),xt=R,H=I;R=0,I=0,z-=xt,G-=H,j-=xt,W-=H;const at=[[z,G,0,0,K-Y],[j,W,0,0,Z-Y],[0,0,z,G,V-$],[0,0,j,W,U-$]],F=ym(at);if(!F)return;if(v.save(),v.beginPath(),ox()||!p){v.moveTo(K,V);const et=4,it=Y-K,ht=$-V;for(let kt=0;kt<et;kt++)v.lineTo(K+E((kt+1)*it/et),V+E(kt*ht/(et-1))),kt!=et-1&&v.lineTo(K+E((kt+1)*it/et),V+E((kt+1)*ht/(et-1)));v.lineTo(Z,U)}else v.moveTo(K,V),v.lineTo(Y,$),v.lineTo(Z,U);v.clip(),v.transform(F[0],F[2],F[1],F[3],Y,$),v.translate(C[0]-xt,C[3]-H);let wt;if(M)wt=M.canvas,v.scale(n/e,-n/e);else{const et=c[0],it=et.extent;wt=et.image,v.scale(Mt(it)/wt.width,-we(it)/wt.height)}v.drawImage(wt,0,0),v.restore()}),M&&(fo(M),Kn.push(M.canvas)),f&&(v.save(),v.globalCompositeOperation="source-over",v.strokeStyle="black",v.lineWidth=1,h.getTriangles().forEach(function(y,x,b){const T=y.target,k=(T[0][0]-S[0])/s,R=-(T[0][1]-S[1])/s,I=(T[1][0]-S[0])/s,z=-(T[1][1]-S[1])/s,G=(T[2][0]-S[0])/s,j=-(T[2][1]-S[1])/s;v.beginPath(),v.moveTo(I,z),v.lineTo(k,R),v.lineTo(G,j),v.closePath(),v.stroke()}),v.restore()),v.canvas}class hx extends Od{constructor(t,e,n,i,s,a,h,c,d,f,p,m){super(s,nt.IDLE,m),this.renderEdges_=p!==void 0?p:!1,this.pixelRatio_=h,this.gutter_=c,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=i,this.wrappedTileCoord_=a||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0;const v=i.getTileCoordExtent(this.wrappedTileCoord_),E=this.targetTileGrid_.getExtent();let C=this.sourceTileGrid_.getExtent();const M=E?Sr(v,E):v;if(za(M)===0){this.state=nt.EMPTY;return}const S=t.getExtent();S&&(C?C=Sr(C,S):C=S);const y=i.getResolution(this.wrappedTileCoord_[0]),x=ax(t,n,M,y);if(!isFinite(x)||x<=0){this.state=nt.EMPTY;return}const b=f!==void 0?f:ex;if(this.triangulation_=new sx(t,n,M,C,x*b,y),this.triangulation_.getTriangles().length===0){this.state=nt.EMPTY;return}this.sourceZ_=e.getZForResolution(x);let T=this.triangulation_.calculateSourceExtent();if(C&&(t.canWrapX()?(T[1]=Dt(T[1],C[1],C[3]),T[3]=Dt(T[3],C[1],C[3])):T=Sr(T,C)),!za(T))this.state=nt.EMPTY;else{const k=e.getTileRangeForExtentAndZ(T,this.sourceZ_);for(let R=k.minX;R<=k.maxX;R++)for(let I=k.minY;I<=k.maxY;I++){const z=d(this.sourceZ_,R,I,h);z&&this.sourceTiles_.push(z)}this.sourceTiles_.length===0&&(this.state=nt.EMPTY)}}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{e&&e.getState()==nt.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(e.tileCoord),image:e.getImage()})}),this.sourceTiles_.length=0,t.length===0)this.state=nt.ERROR;else{const e=this.wrappedTileCoord_[0],n=this.targetTileGrid_.getTileSize(e),i=typeof n=="number"?n:n[0],s=typeof n=="number"?n:n[1],a=this.targetTileGrid_.getResolution(e),h=this.sourceTileGrid_.getResolution(this.sourceZ_),c=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=lx(i,s,this.pixelRatio_,h,this.sourceTileGrid_.getExtent(),a,c,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=nt.LOADED}this.changed()}load(){if(this.state==nt.IDLE){this.state=nt.LOADING,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(e=>{const n=e.getState();if(n==nt.IDLE||n==nt.LOADING){t++;const i=gt(e,ct.CHANGE,function(s){const a=e.getState();(a==nt.LOADED||a==nt.ERROR||a==nt.EMPTY)&&(Tt(i),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(i)}}),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(e,n,i){e.getState()==nt.IDLE&&e.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(Tt),this.sourcesListenerKeys_=null}release(){this.canvas_&&(fo(this.canvas_.getContext("2d")),Kn.push(this.canvas_),this.canvas_=null),super.release()}}const Hl=hx;class cx extends Od{constructor(t,e,n,i,s,a){super(t,e,a),this.crossOrigin_=i,this.src_=n,this.key=n,this.image_=new Image,i!==null&&(this.image_.crossOrigin=i),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=nt.LOADED,this.unlistenImage_(),this.changed()}handleImageError_(){this.state=nt.ERROR,this.unlistenImage_(),this.image_=ux(),this.changed()}handleImageLoad_(){const t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=nt.LOADED:this.state=nt.EMPTY,this.unlistenImage_(),this.changed()}load(){this.state==nt.ERROR&&(this.state=nt.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==nt.IDLE&&(this.state=nt.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=zv(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}}function ux(){const r=ee(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}const Bd=cx;class dx{constructor(t){this.highWaterMark=t!==void 0?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.pop()}clear(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const n=this.entries_[t];return mt(n!==void 0,"Tried to get a value for a key that does not exist in the cache"),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_}remove(t){const e=this.entries_[t];return mt(e!==void 0,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.key_;return t}getValues(){const t=new Array(this.count_);let e=0,n;for(n=this.newest_;n;n=n.older)t[e++]=n.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){var e;return(e=this.entries_[t])==null?void 0:e.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){mt(!(t in this.entries_),"Tried to set a value for a key that is used already");const n={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[t]=n,++this.count_}setSize(t){this.highWaterMark=t}}const fx=dx;class Gd{constructor(t,e,n,i){this.minX=t,this.maxX=e,this.minY=n,this.maxY=i}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function qn(r,t,e,n,i){return i!==void 0?(i.minX=r,i.maxX=t,i.minY=e,i.maxY=n,i):new Gd(r,t,e,n)}const Ud=Gd;function jd(r,t,e,n){return n!==void 0?(n[0]=r,n[1]=t,n[2]=e,n):[r,t,e]}function ko(r,t,e){return r+"/"+t+"/"+e}function Zd(r){return ko(r[0],r[1],r[2])}function gx(r){return r.split("/").map(Number)}function px(r){return(r[1]<<r[0])+r[2]}function _x(r,t){const e=r[0],n=r[1],i=r[2];if(t.getMinZoom()>e||e>t.getMaxZoom())return!1;const s=t.getFullTileRange(e);return s?s.containsXY(n,i):!0}function qr(r){const t=r.toString();return t.includes(".")?t:t+".0"}function mx(r){if(r.length<2||r.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return`vec${r.length}(${r.map(qr).join(", ")})`}function Vl(r){const t=Dr(r),e=t.length>3?t[3]:1;return mx([t[0]/255*e,t[1]/255*e,t[2]/255*e,e])}const Xl={};let yx=0;function vx(r){return r in Xl||(Xl[r]=yx++),Xl[r]}function Jn(r){return qr(vx(r))}function xx(){return{"fill-color":"rgba(255,255,255,0.4)","stroke-color":"#3399CC","stroke-width":1.25,"circle-radius":5,"circle-fill-color":"rgba(255,255,255,0.4)","circle-stroke-width":1.25,"circle-stroke-color":"#3399CC"}}const Qn=`#ifdef GL_FRAGMENT_PRECISION_HIGH
46
46
  precision highp float;
47
47
  #else
48
48
  precision mediump float;
@@ -458,7 +458,7 @@ void main(void) {
458
458
  gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;
459
459
  gl_FragColor.rgb *= gl_FragColor.a;
460
460
  }`,uniforms:{u_gradientTexture:()=>this.gradient_,u_opacity:()=>this.getOpacity()}}]})}renderDeclutter(){}}function bx(r){const n=ee(1,256),i=n.createLinearGradient(0,0,1,256),s=1/(r.length-1);for(let a=0,h=r.length;a<h;++a)i.addColorStop(a*s,r[a]);return n.fillStyle=i,n.fillRect(0,0,1,256),n.canvas}const Cx=Lx;class Tx extends fx{clear(){for(;this.getCount()>0;)this.pop().release();super.clear()}expireCache(t){for(;this.canExpireCache()&&!(this.peekLast().getKey()in t);)this.pop().release()}pruneExceptNewestZ(){if(this.getCount()===0)return;const t=this.peekFirstKey(),n=gx(t)[0];this.forEach(i=>{i.tileCoord[0]!==n&&(this.remove(Zd(i.tileCoord)),i.release())})}}const Wd=Tx,Yl={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"};class Mx extends Re{constructor(t){super(),this.projection=zt(t.projection),this.attributions_=Hd(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,this.loading=!1,this.state_=t.state!==void 0?t.state:"ready",this.wrapX_=t.wrapX!==void 0?t.wrapX:!1,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(n,i){e.viewResolver=n,e.viewRejector=i})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=Hd(t),this.changed()}setState(t){this.state_=t,this.changed()}}function Hd(r){return r?Array.isArray(r)?function(t){return r}:typeof r=="function"?r:function(t){return[r]}:null}const Vd=Mx,tr=[0,0,0],ji=5;class Sx{constructor(t){this.minZoom=t.minZoom!==void 0?t.minZoom:0,this.resolutions_=t.resolutions,mt(q_(this.resolutions_,(i,s)=>s-i,!0),"`resolutions` must be sorted in descending order");let e;if(!t.origins){for(let i=0,s=this.resolutions_.length-1;i<s;++i)if(!e)e=this.resolutions_[i]/this.resolutions_[i+1];else if(this.resolutions_[i]/this.resolutions_[i+1]!==e){e=void 0;break}}this.zoomFactor_=e,this.maxZoom=this.resolutions_.length-1,this.origin_=t.origin!==void 0?t.origin:null,this.origins_=null,t.origins!==void 0&&(this.origins_=t.origins,mt(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const n=t.extent;n!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=cn(n)),mt(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,t.tileSizes!==void 0&&(this.tileSizes_=t.tileSizes,mt(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=t.tileSize!==void 0?t.tileSize:this.tileSizes_?null:Aa,mt(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=n!==void 0?n:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],t.sizes!==void 0?this.fullTileRanges_=t.sizes.map((i,s)=>{const a=new Ud(Math.min(0,i[0]),Math.max(i[0]-1,-1),Math.min(0,i[1]),Math.max(i[1]-1,-1));if(n){const h=this.getTileRangeForExtentAndZ(n,s);a.minX=Math.max(h.minX,a.minX),a.maxX=Math.min(h.maxX,a.maxX),a.minY=Math.max(h.minY,a.minY),a.maxY=Math.min(h.maxY,a.maxY)}return a}):n&&this.calculateTileRanges_(n)}forEachTileCoord(t,e,n){const i=this.getTileRangeForExtentAndZ(t,e);for(let s=i.minX,a=i.maxX;s<=a;++s)for(let h=i.minY,c=i.maxY;h<=c;++h)n([e,s,h])}forEachTileCoordParentTileRange(t,e,n,i){let s,a,h,c=null,d=t[0]-1;for(this.zoomFactor_===2?(a=t[1],h=t[2]):c=this.getTileCoordExtent(t,i);d>=this.minZoom;){if(a!==void 0&&h!==void 0?(a=Math.floor(a/2),h=Math.floor(h/2),s=qn(a,a,h,h,n)):s=this.getTileRangeForExtentAndZ(c,d,n),e(d,s))return!0;--d}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,n){if(t[0]<this.maxZoom){if(this.zoomFactor_===2){const s=t[1]*2,a=t[2]*2;return qn(s,s+1,a,a+1,e)}const i=this.getTileCoordExtent(t,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(i,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,n){if(e>this.maxZoom||e<this.minZoom)return null;const i=t[0],s=t[1],a=t[2];if(e===i)return qn(s,a,s,a,n);if(this.zoomFactor_){const c=Math.pow(this.zoomFactor_,e-i),d=Math.floor(s*c),f=Math.floor(a*c);if(e<i)return qn(d,d,f,f,n);const p=Math.floor(c*(s+1))-1,m=Math.floor(c*(a+1))-1;return qn(d,p,f,m,n)}const h=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(h,e,n)}getTileRangeForExtentAndZ(t,e,n){this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,tr);const i=tr[1],s=tr[2];this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,tr);const a=tr[1],h=tr[2];return qn(i,a,s,h,n)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),n=this.getResolution(t[0]),i=Le(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*i[0]*n,e[1]-(t[2]+.5)*i[1]*n]}getTileCoordExtent(t,e){const n=this.getOrigin(t[0]),i=this.getResolution(t[0]),s=Le(this.getTileSize(t[0]),this.tmpSize_),a=n[0]+t[1]*s[0]*i,h=n[1]-(t[2]+1)*s[1]*i,c=a+s[0]*i,d=h+s[1]*i;return ki(a,h,c,d,e)}getTileCoordForCoordAndResolution(t,e,n){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,n)}getTileCoordForXYAndResolution_(t,e,n,i,s){const a=this.getZForResolution(n),h=n/this.getResolution(a),c=this.getOrigin(a),d=Le(this.getTileSize(a),this.tmpSize_);let f=h*(t-c[0])/n/d[0],p=h*(c[1]-e)/n/d[1];return i?(f=Js(f,ji)-1,p=Js(p,ji)-1):(f=qs(f,ji),p=qs(p,ji)),jd(a,f,p,s)}getTileCoordForXYAndZ_(t,e,n,i,s){const a=this.getOrigin(n),h=this.getResolution(n),c=Le(this.getTileSize(n),this.tmpSize_);let d=(t-a[0])/h/c[0],f=(a[1]-e)/h/c[1];return i?(d=Js(d,ji)-1,f=Js(f,ji)-1):(d=qs(d,ji),f=qs(f,ji)),jd(n,d,f,s)}getTileCoordForCoordAndZ(t,e,n){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,n)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){const n=Ra(this.resolutions_,t,e||0);return Dt(n,this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return Su(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,n=new Array(e);for(let i=this.minZoom;i<e;++i)n[i]=this.getTileRangeForExtentAndZ(t,i);this.fullTileRanges_=n}}const Xd=Sx;function Yd(r){let t=r.getDefaultTileGrid();return t||(t=Ax(r),r.setDefaultTileGrid(t)),t}function Px(r,t,e){const n=t[0],i=r.getTileCoordCenter(t),s=Kl(e);if(!Ws(s,i)){const a=Mt(s),h=Math.ceil((s[0]-i[0])/a);return i[0]+=a*h,r.getTileCoordForCoordAndZ(i,n)}return t}function kx(r,t,e,n){n=n!==void 0?n:"top-left";const i=Kd(r,t,e);return new Xd({extent:r,origin:fm(r,n),resolutions:i,tileSize:e})}function Rx(r){const t=r||{},e=t.extent||zt("EPSG:3857").getExtent(),n={extent:e,minZoom:t.minZoom,tileSize:t.tileSize,resolutions:Kd(e,t.maxZoom,t.tileSize,t.maxResolution)};return new Xd(n)}function Kd(r,t,e,n){t=t!==void 0?t:em,e=Le(e!==void 0?e:Aa);const i=we(r),s=Mt(r);n=n>0?n:Math.max(s/e[0],i/e[1]);const a=t+1,h=new Array(a);for(let c=0;c<a;++c)h[c]=n/Math.pow(2,c);return h}function Ax(r,t,e,n){const i=Kl(r);return kx(i,t,e,n)}function Kl(r){r=zt(r);let t=r.getExtent();if(!t){const e=180*br.degrees/r.getMetersPerUnit();t=ki(-e,-e,e,e)}return t}class Ix extends Vd{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.opaque_=t.opaque!==void 0?t.opaque:!1,this.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,this.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;const e=[256,256];this.tileGrid&&Le(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),e),this.tileCache=new Wd(t.cacheSize||0),this.tmpSize=[0,0],this.key_=t.key||"",this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}canExpireCache(){return this.tileCache.canExpireCache()}expireCache(t,e){const n=this.getTileCacheForProjection(t);n&&n.expireCache(e)}forEachLoadedTile(t,e,n,i){const s=this.getTileCacheForProjection(t);if(!s)return!1;let a=!0,h,c,d;for(let f=n.minX;f<=n.maxX;++f)for(let p=n.minY;p<=n.maxY;++p)c=ko(e,f,p),d=!1,s.containsKey(c)&&(h=s.get(c),d=h.getState()===nt.LOADED,d&&(d=i(h)!==!1)),d||(a=!1);return a}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getOpaque(t){return this.opaque_}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,n,i,s){return ot()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:Yd(t)}getTileCacheForProjection(t){const e=this.getProjection();return mt(e===null||dn(e,t),"A VectorTile source can only be rendered if it has a projection compatible with the view projection."),this.tileCache}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,n){const i=this.getTileGridForProjection(n),s=this.getTilePixelRatio(e),a=Le(i.getTileSize(t),this.tmpSize);return s==1?a:Rv(a,s,this.tmpSize)}getTileCoordForTileUrlFunction(t,e){e=e!==void 0?e:this.getProjection();const n=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=Px(n,t,e)),_x(t,n)?t:null}clear(){this.tileCache.clear()}refresh(){this.clear(),super.refresh()}updateCacheSize(t,e){const n=this.getTileCacheForProjection(e);t>n.highWaterMark&&(n.highWaterMark=t)}useTile(t,e,n,i){}}class Dx extends ai{constructor(t,e){super(t),this.tile=e}}const Ox=Ix;function Fx(r,t){const e=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,s=/\{-y\}/g;return function(a,h,c){if(a)return r.replace(e,a[0].toString()).replace(n,a[1].toString()).replace(i,a[2].toString()).replace(s,function(){const d=a[0],f=t.getFullTileRange(d);if(!f)throw new Error("The {-y} placeholder requires a tile grid with extent");return(f.getHeight()-a[2]-1).toString()})}}function zx(r,t){const e=r.length,n=new Array(e);for(let i=0;i<e;++i)n[i]=Fx(r[i],t);return Nx(n)}function Nx(r){return r.length===1?r[0]:function(t,e,n){if(!t)return;const i=px(t),s=Bn(i,r.length);return r[s](t,e,n)}}function Bx(r){const t=[];let e=/\{([a-z])-([a-z])\}/.exec(r);if(e){const n=e[1].charCodeAt(0),i=e[2].charCodeAt(0);let s;for(s=n;s<=i;++s)t.push(r.replace(e[0],String.fromCharCode(s)));return t}if(e=/\{(\d+)-(\d+)\}/.exec(r),e){const n=parseInt(e[2],10);for(let i=parseInt(e[1],10);i<=n;i++)t.push(r.replace(e[0],i.toString()));return t}return t.push(r),t}class ql extends Ox{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===ql.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,n=dt(e),i=e.getState();let s;i==nt.LOADING?(this.tileLoadingKeys_[n]=!0,s=Yl.TILELOADSTART):n in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[n],s=i==nt.ERROR?Yl.TILELOADERROR:i==nt.LOADED?Yl.TILELOADEND:void 0),s!=null&&this.dispatchEvent(new Dx(s,e))}setTileLoadFunction(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof e<"u"?this.setKey(e):this.changed()}setUrl(t){const e=Bx(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join(`
461
- `);this.generateTileUrlFunction_?this.setTileUrlFunction(zx(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const i=ko(t,e,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)}}const Gx=ql;class Ux extends Gx{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:jx,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:Bd,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?e:{});for(const i in this.tileCacheForProjection){const s=this.tileCacheForProjection[i];s.expireCache(s==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!dn(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return this.getProjection()&&t&&!dn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||dn(e,t)))return this.tileGrid;const n=dt(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Yd(t)),this.tileGridForProjection[n]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||dn(e,t))return this.tileCache;const n=dt(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Wd(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}createTile_(t,e,n,i,s,a){const h=[t,e,n],c=this.getTileCoordForTileUrlFunction(h,s),d=c?this.tileUrlFunction(c,i,s):void 0,f=new this.tileClass(h,d!==void 0?nt.IDLE:nt.EMPTY,d!==void 0?d:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return f.key=a,f.addEventListener(ct.CHANGE,this.handleTileChange.bind(this)),f}getTile(t,e,n,i,s){const a=this.getProjection();if(!a||!s||dn(a,s))return this.getTileInternal(t,e,n,i,a||s);const h=this.getTileCacheForProjection(s),c=[t,e,n];let d;const f=Zd(c);h.containsKey(f)&&(d=h.get(f));const p=this.getKey();if(d&&d.key==p)return d;const m=this.getTileGridForProjection(a),v=this.getTileGridForProjection(s),E=this.getTileCoordForTileUrlFunction(c,s),b=new Hl(a,m,s,v,c,E,this.getTilePixelRatio(i),this.getGutter(),(M,S,y,x)=>this.getTileInternal(M,S,y,x,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return b.key=p,d?(b.interimTile=d,b.refreshInterimChain(),h.replace(f,b)):h.set(f,b),b}getTileInternal(t,e,n,i,s){let a=null;const h=ko(t,e,n),c=this.getKey();if(!this.tileCache.containsKey(h))a=this.createTile_(t,e,n,i,s,c),this.tileCache.set(h,a);else if(a=this.tileCache.get(h),a.key!=c){const d=a;a=this.createTile_(t,e,n,i,s,c),d.getState()==nt.IDLE?a.interimTile=d.interimTile:a.interimTile=d,a.refreshInterimChain(),this.tileCache.replace(h,a)}return a}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=zt(t);if(n){const i=dt(n);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function jx(r,t){r.getImage().src=t}const Zx=Ux;class Wx extends Zx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:Rx({extent:Kl(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const Hx=Wx,Vx='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class Xx extends Hx{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Vx];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",i=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:i,wrapX:t.wrapX,zDirection:t.zDirection})}}const Yx=Xx,Ro={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Kx extends ho{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(Ro.PRELOAD)}setPreload(t){this.set(Ro.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Ro.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Ro.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const qx=Kx,qd=[];let er=null;function Jx(){er=ee(1,1,void 0,{willReadFrequently:!0})}class Qx extends Sd{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ht(),this.pixelTransform=Ht(),this.inversePixelTransform=Ht(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){er||Jx(),er.clearRect(0,0,1,1);let i;try{er.drawImage(t,e,n,1,1,0,0,1,1),i=er.getImageData(0,0,1,1).data}catch{return er=null,null}return i}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const i=this.getLayer().getClassName();let s,a;if(t&&t.className===i&&(!n||t&&t.style.backgroundColor&&li(Dr(t.style.backgroundColor),Dr(n)))){const h=t.firstElementChild;h instanceof HTMLCanvasElement&&(a=h.getContext("2d"))}if(a&&a.canvas.style.transform===e?(this.container=t,this.context=a,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=i;let h=s.style;h.position="absolute",h.width="100%",h.height="100%",a=ee();const c=a.canvas;s.appendChild(c),h=c.style,h.position="absolute",h.left="0",h.transformOrigin="top left",this.container=s,this.context=a}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const i=cn(n),s=Xs(n),a=Vs(n),h=Hs(n);Nt(e.coordinateToPixelTransform,i),Nt(e.coordinateToPixelTransform,s),Nt(e.coordinateToPixelTransform,a),Nt(e.coordinateToPixelTransform,h);const c=this.inversePixelTransform;Nt(c,i),Nt(c,s),Nt(c,a),Nt(c,h),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(h[0]),Math.round(h[1])),t.clip()}dispatchRenderEvent_(t,e,n){const i=this.getLayer();if(i.hasListener(t)){const s=new Or(t,this.inversePixelTransform,n,e);i.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(te.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(te.POSTRENDER,t,e)}getRenderTransform(t,e,n,i,s,a,h){const c=s/2,d=a/2,f=i/e,p=-f,m=-t[0]+h,v=-t[1];return Ie(this.tempTransform,c,d,f,p,-n,m,v)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Jd=Qx;class $x extends Jd{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=xe(),this.tmpTileRange_=new Ud(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),i=e.getUseInterimTilesOnError();return n==nt.LOADED||n==nt.EMPTY||n==nt.ERROR&&!i}getTile(t,e,n,i){const s=i.pixelRatio,a=i.viewState.projection,h=this.getLayer();let d=h.getSource().getTile(t,e,n,s,a);return d.getState()==nt.ERROR&&h.getUseInterimTilesOnError()&&h.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(d)||(d=d.getInterimTile()),d}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),i=Nt(e.pixelToCoordinateTransform,t.slice()),s=n.getExtent();if(s&&!Ws(s,i))return null;const a=e.pixelRatio,h=e.viewState.projection,c=e.viewState,d=n.getRenderSource(),f=d.getTileGridForProjection(c.projection),p=d.getTilePixelRatio(e.pixelRatio);for(let m=f.getZForResolution(c.resolution);m>=f.getMinZoom();--m){const v=f.getTileCoordForCoordAndZ(i,m),E=d.getTile(m,v[1],v[2],a,h);if(!(E instanceof Bd||E instanceof Hl)||E instanceof Hl&&E.getState()===nt.EMPTY)return null;if(E.getState()!==nt.LOADED)continue;const b=f.getOrigin(m),M=Le(f.getTileSize(m)),S=f.getResolution(m),y=Math.floor(p*((i[0]-b[0])/S-v[1]*M[0])),x=Math.floor(p*((b[1]-i[1])/S-v[2]*M[1])),C=Math.round(p*d.getGutterForProjection(c.projection));return this.getImageData(E.getImage(),y+C,x+C)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],i=t.viewState,s=i.projection,a=i.resolution,h=i.center,c=i.rotation,d=t.pixelRatio,f=this.getLayer(),p=f.getSource(),m=p.getRevision(),v=p.getTileGridForProjection(s),E=v.getZForResolution(a,p.zDirection),b=v.getResolution(E);let M=t.extent;const S=t.viewState.resolution,y=p.getTilePixelRatio(d),x=Math.round(Mt(M)/S*d),C=Math.round(we(M)/S*d),T=n.extent&&fn(n.extent);T&&(M=Sr(M,fn(n.extent)));const k=b*x/2/y,R=b*C/2/y,I=[h[0]-k,h[1]-R,h[0]+k,h[1]+R],z=v.getTileRangeForExtentAndZ(M,E),G={};G[E]={};const j=this.createLoadedTileFinder(p,s,G),W=this.tmpExtent,Y=this.tmpTileRange_;this.newTiles_=!1;const $=c?Ba(i.center,S,c,t.size):void 0;for(let wt=z.minX;wt<=z.maxX;++wt)for(let et=z.minY;et<=z.maxY;++et){if(c&&!v.tileCoordIntersectsViewport([E,wt,et],$))continue;const it=this.getTile(E,wt,et,t);if(this.isDrawableTile(it)){const Xt=dt(this);if(it.getState()==nt.LOADED){G[E][it.tileCoord.toString()]=it;let Te=it.inTransition(Xt);Te&&n.opacity!==1&&(it.endTransition(Xt),Te=!1),!this.newTiles_&&(Te||!this.renderedTiles.includes(it))&&(this.newTiles_=!0)}if(it.getAlpha(Xt,t.time)===1)continue}const ht=v.getTileCoordChildTileRange(it.tileCoord,Y,W);let kt=!1;ht&&(kt=j(E+1,ht)),kt||v.forEachTileCoordParentTileRange(it.tileCoord,j,Y,W)}const K=b/a*d/y;Ie(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/d,1/d,c,-x/2,-C/2);const V=pu(this.pixelTransform);this.useContainer(e,V,this.getBackground(t));const Z=this.context,U=Z.canvas;$s(this.inversePixelTransform,this.pixelTransform),Ie(this.tempTransform,x/2,C/2,K,K,0,-x/2,-C/2),U.width!=x||U.height!=C?(U.width=x,U.height=C):this.containerReused||Z.clearRect(0,0,x,C),T&&this.clipUnrotated(Z,t,T),p.getInterpolate()||(Z.imageSmoothingEnabled=!1),this.preRender(Z,t),this.renderedTiles.length=0;let xt=Object.keys(G).map(Number);xt.sort(Pi);let H,at,F;n.opacity===1&&(!this.containerReused||p.getOpaque(t.viewState.projection))?xt=xt.reverse():(H=[],at=[]);for(let wt=xt.length-1;wt>=0;--wt){const et=xt[wt],it=p.getTilePixelSize(et,d,s),kt=v.getResolution(et)/b,Xt=it[0]*kt*K,Te=it[1]*kt*K,Qe=v.getTileCoordForCoordAndZ(cn(I),et),Xi=v.getTileCoordExtent(Qe),Me=Nt(this.tempTransform,[y*(Xi[0]-I[0])/b,y*(I[3]-Xi[3])/b]),Yi=y*p.getGutterForProjection(s),$e=G[et];for(const Ki in $e){const Fe=$e[Ki],qi=Fe.tileCoord,wi=Qe[1]-qi[1],rr=Math.round(Me[0]-(wi-1)*Xt),Ei=Qe[2]-qi[2],En=Math.round(Me[1]-(Ei-1)*Te),qt=Math.round(Me[0]-wi*Xt),ae=Math.round(Me[1]-Ei*Te),be=rr-qt,ze=En-ae,ti=E===et,ei=ti&&Fe.getAlpha(dt(this),t.time)!==1;let Ne=!1;if(!ei)if(H){F=[qt,ae,qt+be,ae,qt+be,ae+ze,qt,ae+ze];for(let Ji=0,Ln=H.length;Ji<Ln;++Ji)if(E!==et&&et<at[Ji]){const Yt=H[Ji];ce([qt,ae,qt+be,ae+ze],[Yt[0],Yt[3],Yt[4],Yt[7]])&&(Ne||(Z.save(),Ne=!0),Z.beginPath(),Z.moveTo(F[0],F[1]),Z.lineTo(F[2],F[3]),Z.lineTo(F[4],F[5]),Z.lineTo(F[6],F[7]),Z.moveTo(Yt[6],Yt[7]),Z.lineTo(Yt[4],Yt[5]),Z.lineTo(Yt[2],Yt[3]),Z.lineTo(Yt[0],Yt[1]),Z.clip())}H.push(F),at.push(et)}else Z.clearRect(qt,ae,be,ze);this.drawTileImage(Fe,t,qt,ae,be,ze,Yi,ti),H&&!ei?(Ne&&Z.restore(),this.renderedTiles.unshift(Fe)):this.renderedTiles.push(Fe),this.updateUsedTiles(t.usedTiles,p,Fe)}}return this.renderedRevision=m,this.renderedResolution=b,this.extentChanged=!this.renderedExtent_||!Nn(this.renderedExtent_,I),this.renderedExtent_=I,this.renderedPixelRatio=d,this.renderedProjection=s,this.manageTilePyramid(t,p,v,d,s,M,E,f.getPreload()),this.scheduleExpireCache(t,p),this.postRender(Z,t),n.extent&&Z.restore(),Z.imageSmoothingEnabled=!0,V!==U.style.transform&&(U.style.transform=V),this.container}drawTileImage(t,e,n,i,s,a,h,c){const d=this.getTileImage(t);if(!d)return;const f=dt(this),p=e.layerStatesArray[e.layerIndex],m=p.opacity*(c?t.getAlpha(f,e.time):1),v=m!==this.context.globalAlpha;v&&(this.context.save(),this.context.globalAlpha=m),this.context.drawImage(d,h,h,d.width-2*h,d.height-2*h,n,i,s,a),v&&this.context.restore(),m!==p.opacity?e.animate=!0:c&&t.endTransition(f)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const n=(function(i,s,a){const h=dt(i);h in a.usedTiles&&i.expireCache(a.viewState.projection,a.usedTiles[h])}).bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const i=dt(e);i in t||(t[i]={}),t[i][n.getKey()]=!0}manageTilePyramid(t,e,n,i,s,a,h,c,d){const f=dt(e);f in t.wantedTiles||(t.wantedTiles[f]={});const p=t.wantedTiles[f],m=t.tileQueue,v=n.getMinZoom(),E=t.viewState.rotation,b=E?Ba(t.viewState.center,t.viewState.resolution,E,t.size):void 0;let M=0,S,y,x,C,T,k;for(k=v;k<=h;++k)for(y=n.getTileRangeForExtentAndZ(a,k,y),x=n.getResolution(k),C=y.minX;C<=y.maxX;++C)for(T=y.minY;T<=y.maxY;++T)E&&!n.tileCoordIntersectsViewport([k,C,T],b)||(h-k<=c?(++M,S=e.getTile(k,C,T,i,s),S.getState()==nt.IDLE&&(p[S.getKey()]=!0,m.isKeyQueued(S.getKey())||m.enqueue([S,f,n.getTileCoordCenter(S.tileCoord),x])),d!==void 0&&d(S)):e.useTile(k,C,T,s));e.updateCacheSize(M,s)}}const tw=$x;class ew extends qx{constructor(t){super(t)}createRenderer(){return new tw(this)}}const iw=ew;class nw{constructor(t){this.rbush_=new Xh(t),this.items_={}}insert(t,e){const n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[dt(e)]=n}load(t,e){const n=new Array(e.length);for(let i=0,s=e.length;i<s;i++){const a=t[i],h=e[i],c={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:h};n[i]=c,this.items_[dt(h)]=c}this.rbush_.load(n)}remove(t){const e=dt(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[dt(e)],i=[n.minX,n.minY,n.maxX,n.maxY];Nn(i,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(i){return i.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let n;for(let i=0,s=t.length;i<s;i++)if(n=e(t[i]),n)return n;return n}isEmpty(){return on(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ki(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const Qd=nw;class Jl extends Re{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Jl(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Tt(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=gt(t,ct.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?rw(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function rw(r){if(typeof r=="function")return r;let t;return Array.isArray(r)?t=r:(mt(typeof r.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[r]),function(){return t}}const $d=Jl;class Ao extends yu{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Tt),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(gt(this.geometries_[t],ct.CHANGE,this.changed,this))}clone(){const t=new Ao(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,i){if(i<ln(this.getExtent(),t,e))return i;const s=this.geometries_;for(let a=0,h=s.length;a<h;++a)i=s[a].closestPointXY(t,e,n,i);return i}containsXY(t,e){const n=this.geometries_;for(let i=0,s=n.length;i<s;++i)if(n[i].containsXY(t,e))return!0;return!1}computeExtent(t){Tr(t);const e=this.geometries_;for(let n=0,i=e.length;n<i;++n)Zc(t,e[n].getExtent());return t}getGeometries(){return tf(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,i=e.length;n<i;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],n=this.geometries_;let i=!1;for(let s=0,a=n.length;s<a;++s){const h=n[s],c=h.getSimplifiedGeometry(t);e.push(c),c!==h&&(i=!0)}if(i){const s=new Ao(null);return s.setGeometriesArray(e),s}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,i=e.length;n<i;++n)if(e[n].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const n=this.geometries_;for(let i=0,s=n.length;i<s;++i)n[i].rotate(t,e);this.changed()}scale(t,e,n){n||(n=Ri(this.getExtent()));const i=this.geometries_;for(let s=0,a=i.length;s<a;++s)i[s].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(tf(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,i=e.length;n<i;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let i=0,s=n.length;i<s;++i)n[i].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function tf(r){const t=[];for(let e=0,n=r.length;e<n;++e)t.push(r[e].clone());return t}const sw=Ao;function Io(r,t,e,n,i,s,a){let h,c;const d=(e-t)/n;if(d===1)h=t;else if(d===2)h=t,c=i;else if(d!==0){let f=r[t],p=r[t+1],m=0;const v=[0];for(let M=t+n;M<e;M+=n){const S=r[M],y=r[M+1];m+=Math.sqrt((S-f)*(S-f)+(y-p)*(y-p)),v.push(m),f=S,p=y}const E=i*m,b=Y_(v,E);b<0?(c=(E-v[-b-2])/(v[-b-1]-v[-b-2]),h=t+(-b-2)*n):h=t+b*n}a=a>1?a:2,s=s||new Array(a);for(let f=0;f<a;++f)s[f]=h===void 0?NaN:c===void 0?r[h+f]:Ee(r[h+f],r[h+n+f],c);return s}function Ql(r,t,e,n,i,s){if(e==t)return null;let a;if(i<r[t+n-1])return s?(a=r.slice(t,t+n),a[n-1]=i,a):null;if(r[e-1]<i)return s?(a=r.slice(e-n,e),a[n-1]=i,a):null;if(i==r[t+n-1])return r.slice(t,t+n);let h=t/n,c=e/n;for(;h<c;){const m=h+c>>1;i<r[(m+1)*n-1]?c=m:h=m+1}const d=r[h*n-1];if(i==d)return r.slice((h-1)*n,(h-1)*n+n);const f=r[(h+1)*n-1],p=(i-d)/(f-d);a=[];for(let m=0;m<n-1;++m)a.push(Ee(r[(h-1)*n+m],r[h*n+m],p));return a.push(i),a}function ow(r,t,e,n,i,s,a){if(a)return Ql(r,t,e[e.length-1],n,i,s);let h;if(i<r[n-1])return s?(h=r.slice(0,n),h[n-1]=i,h):null;if(r[r.length-1]<i)return s?(h=r.slice(r.length-n),h[n-1]=i,h):null;for(let c=0,d=e.length;c<d;++c){const f=e[c];if(t!=f){if(i<r[t+n-1])return null;if(i<=r[f-1])return Ql(r,t,f,n,i,!1);t=f}}return null}function ef(r,t,e,n){let i=r[t],s=r[t+1],a=0;for(let h=t+n;h<e;h+=n){const c=r[h],d=r[h+1];a+=Math.sqrt((c-i)*(c-i)+(d-s)*(d-s)),i=c,s=d}return a}class Do extends gn{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){He(this.flatCoordinates,t),this.changed()}clone(){const t=new Do(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ja(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),$a(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,i))}forEachSegment(t){return Mu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Ql(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return Di(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return Io(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return ef(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=eo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Do(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return ro(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=to(this.flatCoordinates,0,t,this.stride),this.changed()}}const $l=Do;class Oo extends gn{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{const i=t,s=[],a=[];for(let c=0,d=i.length;c<d;++c){const f=i[c];He(s,f.getFlatCoordinates()),a.push(s.length)}const h=i.length===0?this.getLayout():i[0].getLayout();this.setFlatCoordinates(h,s),this.ends_=a}}appendLineString(t){He(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Oo(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qa(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),tl(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,i))}getCoordinateAtM(t,e,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,n=n!==void 0?n:!1,ow(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return Rr(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new $l(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,n=this.layout,i=[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=e[a],d=new $l(t.slice(s,c),n);i.push(d),s=c}return i}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const i=this.ends_,s=this.stride;for(let a=0,h=i.length;a<h;++a){const c=i[a],d=Io(e,n,c,s,.5);He(t,d),n=c}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Eu(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new Oo(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return ey(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=kr(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const aw=Oo;class th extends gn{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){He(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new th(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,i){if(i<ln(this.getExtent(),t,e))return i;const s=this.flatCoordinates,a=this.stride;for(let h=0,c=s.length;h<c;h+=a){const d=un(t,e,s[h],s[h+1]);if(d<i){i=d;for(let f=0;f<a;++f)n[f]=s[h+f];n.length=a}}return i}getCoordinates(){return Di(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new no(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,i=[];for(let s=0,a=t.length;s<a;s+=n){const h=new no(t.slice(s,s+n),e);i.push(h)}return i}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let i=0,s=e.length;i<s;i+=n){const a=e[i],h=e[i+1];if(Da(t,a,h))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=to(this.flatCoordinates,0,t,this.stride),this.changed()}}const nf=th;function rf(r,t,e,n){const i=[];let s=xe();for(let a=0,h=e.length;a<h;++a){const c=e[a];s=Fa(r,t,c[0],n),i.push((s[0]+s[2])/2,(s[1]+s[3])/2),t=c[c.length-1]}return i}class Fo extends gn{constructor(t,e,n){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!n&&!Array.isArray(t[0])){const i=t,s=[],a=[];for(let h=0,c=i.length;h<c;++h){const d=i[h],f=s.length,p=d.getEnds();for(let m=0,v=p.length;m<v;++m)p[m]+=f;He(s,d.getFlatCoordinates()),a.push(p)}e=i.length===0?this.getLayout():i[0].getLayout(),t=s,n=a}e!==void 0&&n?(this.setFlatCoordinates(e,t),this.endss_=n):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;He(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let i=0,s=e.length;i<s;++i)e[i]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let i=0;i<t;++i)e[i]=this.endss_[i].slice();const n=new Fo(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Xm(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ym(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,i))}containsXY(t,e){return ty(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Qm(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),ll(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,il(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=rf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Tu(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new nf(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;ku(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=ll(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Jm(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,n),new Fo(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const s=this.endss_[t-1];e=s[s.length-1]}const n=this.endss_[t].slice(),i=n[n.length-1];if(e!==0)for(let s=0,a=n.length;s<a;++s)n[s]-=e;return new Oi(this.flatCoordinates.slice(e,i),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,i=[];let s=0;for(let a=0,h=n.length;a<h;++a){const c=n[a].slice(),d=c[c.length-1];if(s!==0)for(let p=0,m=c.length;p<m;++p)c[p]-=s;const f=new Oi(e.slice(s,d),t,c);i.push(f),s=d}return i}getType(){return"MultiPolygon"}intersectsExtent(t){return iy(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=wu(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const i=n[n.length-1];this.flatCoordinates.length=i.length===0?0:i[i.length-1]}this.changed()}}const lw=Fo,sf=Ht();class ir{constructor(t,e,n,i,s,a){this.styleFunction,this.extent_,this.id_=a,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=s,this.squaredTolerance_,this.stride_=i,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?jc(this.flatCoordinates_):Fa(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Ri(this.getExtent());this.flatInteriorPoints_=sl(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=ry(this.flatCoordinates_,this.ends_),e=rf(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=Tu(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=Io(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const n=this.ends_;for(let i=0,s=n.length;i<s;++i){const a=n[i],h=Io(t,e,a,2,.5);He(this.flatMidpoints_,h),e=a}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=zt(t);const e=t.getExtent(),n=t.getWorldExtent();if(e&&n){const i=we(n)/we(e);Ie(sf,n[0],n[3],i,-i,0,0,0),Ii(this.flatCoordinates_,0,this.flatCoordinates_.length,2,sf,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new ir(this.type_,this.flatCoordinates_.slice(),this.ends_.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=Ic((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const n=this.simplifiedGeometry_.getFlatCoordinates();let i;switch(this.type_){case"LineString":n.length=eo(n,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,n,0),i=[n.length];break;case"MultiLineString":i=[],n.length=Eu(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,n,0,i);break;case"Polygon":i=[],n.length=el(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),n,0,i);break}return i&&(this.simplifiedGeometry_=new ir(this.type_,n,i,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}ir.prototype.getFlatCoordinates=ir.prototype.getOrientedFlatCoordinates;const mi=ir;function hw(r,t){return[[-1/0,-1/0,1/0,1/0]]}let cw=!1;function uw(r,t,e,n,i,s,a){const h=new XMLHttpRequest;h.open("GET",typeof r=="function"?r(e,n,i):r,!0),t.getType()=="arraybuffer"&&(h.responseType="arraybuffer"),h.withCredentials=cw,h.onload=function(c){if(!h.status||h.status>=200&&h.status<300){const d=t.getType();let f;d=="json"?f=JSON.parse(h.responseText):d=="text"?f=h.responseText:d=="xml"?(f=h.responseXML,f||(f=new DOMParser().parseFromString(h.responseText,"application/xml"))):d=="arraybuffer"&&(f=h.response),f?s(t.readFeatures(f,{extent:e,featureProjection:i}),t.readProjection(f)):a()}else a()},h.onerror=a,h.send()}function of(r,t){return function(e,n,i,s,a){const h=this;uw(r,t,e,n,i,function(c,d){h.addFeatures(c),s!==void 0&&s(c)},a||In)}}class Zi extends ai{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class dw extends Vd{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=In,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(mt(this.format_,"`format` must be set when `url` is set"),this.loader_=of(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:hw;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Qd:null,this.loadedExtentsRtree_=new Qd,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,i;Array.isArray(t.features)?i=t.features:t.features&&(n=t.features,i=n.getArray()),!e&&n===void 0&&(n=new Xe(i)),i!==void 0&&this.addFeaturesInternal(i),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=dt(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const i=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Zi(oe.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof mi||(this.featureChangeKeys_[t]=[gt(e,ct.CHANGE,this.handleFeatureChange_,this),gt(e,An.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let n=!0;if(e.getId()!==void 0){const i=String(e.getId());if(!(i in this.idIndex_))this.idIndex_[i]=e;else if(e instanceof mi){const s=this.idIndex_[i];s instanceof mi?Array.isArray(s)?s.push(e):this.idIndex_[i]=[s,e]:n=!1}else n=!1}return n&&(mt(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],i=[];for(let s=0,a=t.length;s<a;s++){const h=t[s],c=dt(h);this.addToIndex_(c,h)&&n.push(h)}for(let s=0,a=n.length;s<a;s++){const h=n[s],c=dt(h);this.setupChangeEvents_(c,h);const d=h.getGeometry();if(d){const f=d.getExtent();e.push(f),i.push(h)}else this.nullGeometryFeatures_[c]=h}if(this.featuresRtree_&&this.featuresRtree_.load(e,i),this.hasListener(oe.ADDFEATURE))for(let s=0,a=n.length;s<a;s++)this.dispatchEvent(new Zi(oe.ADDFEATURE,n[s]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(oe.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(oe.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(ue.ADD,n=>{e||(e=!0,this.addFeature(n.element),e=!1)}),t.addEventListener(ue.REMOVE,n=>{e||(e=!0,this.removeFeature(n.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Tt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=i=>{this.removeFeatureInternal(i)};this.featuresRtree_.forEach(n);for(const i in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Zi(oe.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(i){const s=i.getGeometry();if(s instanceof mi||s.intersectsCoordinate(t))return e(i)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){const i=n.getGeometry();if(i instanceof mi||i.intersectsExtent(t)){const s=e(n);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),on(this.nullGeometryFeatures_)||He(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=_m(t,e);return[].concat(...i.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],i=t[1];let s=null;const a=[NaN,NaN];let h=1/0;const c=[-1/0,-1/0,1/0,1/0];return e=e||Lr,this.featuresRtree_.forEachInExtent(c,function(d){if(e(d)){const f=d.getGeometry(),p=h;if(h=f instanceof mi?0:f.closestPointXY(n,i,a,h),h<p){s=d;const m=Math.sqrt(h);c[0]=n-m,c[1]=i-m,c[2]=n+m,c[3]=i+m}}}),s}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,n=dt(e),i=e.getGeometry();if(!i)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const a=i.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(a,e)):this.featuresRtree_&&this.featuresRtree_.update(a,e)}const s=e.getId();if(s!==void 0){const a=s.toString();this.idIndex_[a]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[a]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new Zi(oe.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:dt(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&on(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const i=this.loadedExtentsRtree_,s=this.strategy_(t,e,n);for(let a=0,h=s.length;a<h;++a){const c=s[a];i.forEachInExtent(c,function(f){return hn(f.extent,c)})||(++this.loadingExtentsCount_,this.dispatchEvent(new Zi(oe.FEATURESLOADSTART)),this.loader_.call(this,c,e,n,f=>{--this.loadingExtentsCount_,this.dispatchEvent(new Zi(oe.FEATURESLOADEND,void 0,f))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Zi(oe.FEATURESLOADERROR))}),i.insert(c,{extent:c.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(i){if(Nn(i.extent,t))return n=i,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=dt(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=dt(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Tt),delete this.featureChangeKeys_[e];const i=t.getId();return i!==void 0&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Zi(oe.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_){const i=this.idIndex_[n];if(t instanceof mi&&Array.isArray(i)&&i.includes(t))i.splice(i.indexOf(t),1);else if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){mt(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(of(t,this.format_))}}const zo=dw;class fw{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=$d,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?zt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=zt(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return ot()}readFeature(t,e){return ot()}readFeatures(t,e){return ot()}readGeometry(t,e){return ot()}readProjection(t){return ot()}writeFeature(t,e){return ot()}writeFeatures(t,e){return ot()}writeGeometry(t,e){return ot()}}function eh(r,t,e){const n=e?zt(e.featureProjection):null,i=e?zt(e.dataProjection):null;let s=r;if(n&&i&&!dn(n,i)){t&&(s=r.clone());const a=t?n:i,h=t?i:n;a.getUnits()==="tile-pixels"?s.transform(a,h):s.applyTransform(Pr(a,h))}if(t&&e&&e.decimals!==void 0){const a=Math.pow(10,e.decimals),h=function(c){for(let d=0,f=c.length;d<f;++d)c[d]=Math.round(c[d]*a)/a;return c};s===r&&(s=r.clone()),s.applyTransform(h)}return s}const gw={Point:no,LineString:$l,Polygon:Oi,MultiPoint:nf,MultiLineString:aw,MultiPolygon:lw};function pw(r,t,e){return Array.isArray(t[0])?(ku(r,0,t,e)||(r=r.slice(),ll(r,0,t,e)),r):(al(r,0,t,e)||(r=r.slice(),so(r,0,t,e)),r)}function af(r,t){var s;const e=r.geometry;if(!e)return[];if(Array.isArray(e))return e.map(a=>af({...r,geometry:a})).flat();const n=e.type==="MultiPolygon"?"Polygon":e.type;if(n==="GeometryCollection"||n==="Circle")throw new Error("Unsupported geometry type: "+n);const i=e.layout.length;return eh(new mi(n,n==="Polygon"?pw(e.flatCoordinates,e.ends,i):e.flatCoordinates,(s=e.ends)==null?void 0:s.flat(),i,r.properties||{},r.id).enableSimplifyTransformed(),!1,t)}function ih(r,t){if(!r)return null;if(Array.isArray(r)){const n=r.map(i=>ih(i,t));return new sw(n)}const e=gw[r.type];return eh(new e(r.flatCoordinates,r.layout,r.ends),!1,t)}class _w extends fw{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(No(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(No(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return ot()}readFeaturesFromObject(t,e){return ot()}readGeometry(t,e){return this.readGeometryFromObject(No(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return ot()}readProjection(t){return this.readProjectionFromObject(No(t))}readProjectionFromObject(t){return ot()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return ot()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return ot()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return ot()}}function No(r){if(typeof r=="string"){const t=JSON.parse(r);return t||null}return r!==null?r:null}const mw=_w;class yw extends mw{constructor(t){t=t||{},super(),this.dataProjection=zt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=zt(t.featureProjection)),t.featureClass&&(this.featureClass=t.featureClass),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};const i=nh(n.geometry);if(this.featureClass===mi)return af({geometry:i,id:n.id,properties:n.properties},e);const s=new $d;return this.geometryName_?s.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&s.setGeometryName(n.geometry_name),s.setGeometry(ih(i,e)),"id"in n&&s.setId(n.id),n.properties&&s.setProperties(n.properties,!0),s}readFeaturesFromObject(t,e){const n=t;let i=null;if(n.type==="FeatureCollection"){const s=t;i=[];const a=s.features;for(let h=0,c=a.length;h<c;++h){const d=this.readFeatureFromObject(a[h],e);d&&i.push(d)}}else i=[this.readFeatureFromObject(t,e)];return i.flat()}readGeometryFromObject(t,e){return vw(t,e)}readProjectionFromObject(t){const e=t.crs;let n;if(e)if(e.type=="name")n=zt(e.properties.name);else if(e.type==="EPSG")n=zt("EPSG:"+e.properties.code);else throw new Error("Unknown SRS type");else n=this.dataProjection;return n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},i=t.getId();if(i!==void 0&&(n.id=i),!t.hasProperties())return n;const s=t.getProperties(),a=t.getGeometry();return a&&(n.geometry=rh(a,e),delete s[t.getGeometryName()]),on(s)||(n.properties=s),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let i=0,s=t.length;i<s;++i)n.push(this.writeFeatureObject(t[i],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return rh(t,this.adaptOptions(e))}}function nh(r,t){if(!r)return null;let e;switch(r.type){case"Point":{e=ww(r);break}case"LineString":{e=Ew(r);break}case"Polygon":{e=Tw(r);break}case"MultiPoint":{e=bw(r);break}case"MultiLineString":{e=Lw(r);break}case"MultiPolygon":{e=Cw(r);break}case"GeometryCollection":{e=xw(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return e}function vw(r,t){const e=nh(r);return ih(e,t)}function xw(r,t){return r.geometries.map(function(n){return nh(n)})}function ww(r){const t=r.coordinates;return{type:"Point",flatCoordinates:t,layout:pn(t.length)}}function Ew(r){const t=r.coordinates,e=t.flat();return{type:"LineString",flatCoordinates:e,ends:[e.length],layout:pn(t[0].length)}}function Lw(r){const t=r.coordinates,e=t[0][0].length,n=[],i=kr(n,0,t,e);return{type:"MultiLineString",flatCoordinates:n,ends:i,layout:pn(e)}}function bw(r){const t=r.coordinates;return{type:"MultiPoint",flatCoordinates:t.flat(),layout:pn(t[0].length)}}function Cw(r){const t=r.coordinates,e=[],n=t[0][0][0].length,i=wu(e,0,t,n);return{type:"MultiPolygon",flatCoordinates:e,ends:i,layout:pn(n)}}function Tw(r){const t=r.coordinates,e=[],n=t[0][0].length,i=kr(e,0,t,n);return{type:"Polygon",flatCoordinates:e,ends:i,layout:pn(n)}}function rh(r,t){r=eh(r,!0,t);const e=r.getType();let n;switch(e){case"Point":{n=Aw(r);break}case"LineString":{n=Sw(r);break}case"Polygon":{n=Iw(r,t);break}case"MultiPoint":{n=kw(r);break}case"MultiLineString":{n=Pw(r);break}case"MultiPolygon":{n=Rw(r,t);break}case"GeometryCollection":{n=Mw(r,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function Mw(r,t){return t=Object.assign({},t),delete t.featureProjection,{type:"GeometryCollection",geometries:r.getGeometriesArray().map(function(n){return rh(n,t)})}}function Sw(r,t){return{type:"LineString",coordinates:r.getCoordinates()}}function Pw(r,t){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function kw(r,t){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function Rw(r,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(e)}}function Aw(r,t){return{type:"Point",coordinates:r.getCoordinates()}}function Iw(r,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(e)}}const Bo=yw,Jr={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Go=[Jr.FILL],Wi=[Jr.STROKE],wn=[Jr.BEGIN_PATH],lf=[Jr.CLOSE_PATH],rt=Jr;class Dw{drawCustom(t,e,n,i){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const hf=Dw;class Ow extends hf{constructor(t,e,n,i){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=i,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,s=this.coordinates;let a=s.length;for(let h=0,c=t.length;h<c;h+=e)i[0]=t[h],i[1]=t[h+1],Ws(n,i)&&(s[a++]=i[0],s[a++]=i[1]);return a}appendFlatLineCoordinates(t,e,n,i,s,a){const h=this.coordinates;let c=h.length;const d=this.getBufferedMaxExtent();a&&(e+=i);let f=t[e],p=t[e+1];const m=this.tmpCoordinate_;let v=!0,E,b,M;for(E=e+i;E<n;E+=i)m[0]=t[E],m[1]=t[E+1],M=Oa(d,m),M!==b?(v&&(h[c++]=f,h[c++]=p,v=!1),h[c++]=m[0],h[c++]=m[1]):M===Wt.INTERSECTING?(h[c++]=m[0],h[c++]=m[1],v=!1):v=!0,f=m[0],p=m[1],b=M;return(s&&v||E===e+i)&&(h[c++]=f,h[c++]=p),c}drawCustomCoordinates_(t,e,n,i,s){for(let a=0,h=n.length;a<h;++a){const c=n[a],d=this.appendFlatLineCoordinates(t,e,c,i,!1,!1);s.push(d),e=c}return e}drawCustom(t,e,n,i){this.beginGeometry(t,e);const s=t.getType(),a=t.getStride(),h=this.coordinates.length;let c,d,f,p,m;switch(s){case"MultiPolygon":c=t.getOrientedFlatCoordinates(),p=[];const v=t.getEndss();m=0;for(let E=0,b=v.length;E<b;++E){const M=[];m=this.drawCustomCoordinates_(c,m,v[E],a,M),p.push(M)}this.instructions.push([rt.CUSTOM,h,p,t,n,il]),this.hitDetectionInstructions.push([rt.CUSTOM,h,p,t,i||n,il]);break;case"Polygon":case"MultiLineString":f=[],c=s=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),m=this.drawCustomCoordinates_(c,0,t.getEnds(),a,f),this.instructions.push([rt.CUSTOM,h,f,t,n,Rr]),this.hitDetectionInstructions.push([rt.CUSTOM,h,f,t,i||n,Rr]);break;case"LineString":case"Circle":c=t.getFlatCoordinates(),d=this.appendFlatLineCoordinates(c,0,c.length,a,!1,!1),this.instructions.push([rt.CUSTOM,h,d,t,n,Di]),this.hitDetectionInstructions.push([rt.CUSTOM,h,d,t,i||n,Di]);break;case"MultiPoint":c=t.getFlatCoordinates(),d=this.appendFlatPointCoordinates(c,a),d>h&&(this.instructions.push([rt.CUSTOM,h,d,t,n,Di]),this.hitDetectionInstructions.push([rt.CUSTOM,h,d,t,i||n,Di]));break;case"Point":c=t.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),d=this.coordinates.length,this.instructions.push([rt.CUSTOM,h,d,t,n]),this.hitDetectionInstructions.push([rt.CUSTOM,h,d,t,i||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[rt.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[rt.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let i,s,a=-1;for(e=0;e<n;++e)i=t[e],s=i[0],s==rt.END_GEOMETRY?a=e:s==rt.BEGIN_GEOMETRY&&(i[2]=e,K_(this.hitDetectionInstructions,a,e),a=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const i=t.getColor();n.fillStyle=Ye(i||de)}else n.fillStyle=void 0;if(e){const i=e.getColor();n.strokeStyle=Ye(i||Nr);const s=e.getLineCap();n.lineCap=s!==void 0?s:Un;const a=e.getLineDash();n.lineDash=a?a.slice():ci;const h=e.getLineDashOffset();n.lineDashOffset=h||ui;const c=e.getLineJoin();n.lineJoin=c!==void 0?c:jn;const d=e.getWidth();n.lineWidth=d!==void 0?d:Gr;const f=e.getMiterLimit();n.miterLimit=f!==void 0?f:zr,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[rt.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[rt.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,i=t.lineCap,s=t.lineDash,a=t.lineDashOffset,h=t.lineJoin,c=t.lineWidth,d=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=i||s!=t.currentLineDash&&!li(t.currentLineDash,s)||t.currentLineDashOffset!=a||t.currentLineJoin!=h||t.currentLineWidth!=c||t.currentMiterLimit!=d)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,t.currentLineDash=s,t.currentLineDashOffset=a,t.currentLineJoin=h,t.currentLineWidth=c,t.currentMiterLimit=d)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[rt.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Uc(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Zs(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Qr=Ow;class Fw extends Qr{constructor(t,e,n,i){super(t,e,n,i),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),i=t.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(n,i);this.instructions.push([rt.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([rt.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),i=t.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(n,i);this.instructions.push([rt.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([rt.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const n=t.getAnchor(),i=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const zw=Fw;class Nw extends Qr{constructor(t,e,n,i){super(t,e,n,i)}drawFlatCoordinates_(t,e,n,i){const s=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,n,i,!1,!1),h=[rt.MOVE_TO_LINE_TO,s,a];return this.instructions.push(h),this.hitDetectionInstructions.push(h),n}drawLineString(t,e){const n=this.state,i=n.strokeStyle,s=n.lineWidth;if(i===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui],wn);const a=t.getFlatCoordinates(),h=t.getStride();this.drawFlatCoordinates_(a,0,a.length,h),this.hitDetectionInstructions.push(Wi),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,i=n.strokeStyle,s=n.lineWidth;if(i===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui],wn);const a=t.getEnds(),h=t.getFlatCoordinates(),c=t.getStride();let d=0;for(let f=0,p=a.length;f<p;++f)d=this.drawFlatCoordinates_(h,d,a[f],c);this.hitDetectionInstructions.push(Wi),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Wi),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Wi),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(wn)}}const Bw=Nw;class Gw extends Qr{constructor(t,e,n,i){super(t,e,n,i)}drawFlatCoordinatess_(t,e,n,i){const s=this.state,a=s.fillStyle!==void 0,h=s.strokeStyle!==void 0,c=n.length;this.instructions.push(wn),this.hitDetectionInstructions.push(wn);for(let d=0;d<c;++d){const f=n[d],p=this.coordinates.length,m=this.appendFlatLineCoordinates(t,e,f,i,!0,!h),v=[rt.MOVE_TO_LINE_TO,p,m];this.instructions.push(v),this.hitDetectionInstructions.push(v),h&&(this.instructions.push(lf),this.hitDetectionInstructions.push(lf)),e=f}return a&&(this.instructions.push(Go),this.hitDetectionInstructions.push(Go)),h&&(this.instructions.push(Wi),this.hitDetectionInstructions.push(Wi)),e}drawCircle(t,e){const n=this.state,i=n.fillStyle,s=n.strokeStyle;if(i===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_FILL_STYLE,de]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui]);const a=t.getFlatCoordinates(),h=t.getStride(),c=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,h,!1,!1);const d=[rt.CIRCLE,c];this.instructions.push(wn,d),this.hitDetectionInstructions.push(wn,d),n.fillStyle!==void 0&&(this.instructions.push(Go),this.hitDetectionInstructions.push(Go)),n.strokeStyle!==void 0&&(this.instructions.push(Wi),this.hitDetectionInstructions.push(Wi)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,i=n.fillStyle,s=n.strokeStyle;if(i===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_FILL_STYLE,de]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui]);const a=t.getEnds(),h=t.getOrientedFlatCoordinates(),c=t.getStride();this.drawFlatCoordinatess_(h,0,a,c),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,i=n.fillStyle,s=n.strokeStyle;if(i===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_FILL_STYLE,de]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui]);const a=t.getEndss(),h=t.getOrientedFlatCoordinates(),c=t.getStride();let d=0;for(let f=0,p=a.length;f<p;++f)d=this.drawFlatCoordinatess_(h,d,a[f],c);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,i=e.length;n<i;++n)e[n]=_n(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const cf=Gw;function Uw(r,t,e,n,i){const s=[];let a=e,h=0,c=t.slice(e,2);for(;h<r&&a+i<n;){const[d,f]=c.slice(-2),p=t[a+i],m=t[a+i+1],v=Math.sqrt((p-d)*(p-d)+(m-f)*(m-f));if(h+=v,h>=r){const E=(r-h+v)/v,b=Ee(d,p,E),M=Ee(f,m,E);c.push(b,M),s.push(c),c=[b,M],h==r&&(a+=i),h=0}else if(h<r)c.push(t[a+i],t[a+i+1]),a+=i;else{const E=v-h,b=Ee(d,p,E/v),M=Ee(f,m,E/v);c.push(b,M),s.push(c),c=[b,M],h=0,a+=i}}return h>0&&s.push(c),s}function jw(r,t,e,n,i){let s=e,a=e,h=0,c=0,d=e,f,p,m,v,E,b,M,S,y,x;for(p=e;p<n;p+=i){const C=t[p],T=t[p+1];E!==void 0&&(y=C-E,x=T-b,v=Math.sqrt(y*y+x*x),M!==void 0&&(c+=m,f=Math.acos((M*y+S*x)/(m*v)),f>r&&(c>h&&(h=c,s=d,a=p),c=0,d=p-i)),m=v,M=y,S=x),E=C,b=T}return c+=v,c>h?[d,p]:[s,a]}const Uo={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Zw extends Qr{constructor(t,e,n,i){super(t,e,n,i),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[de]={fillStyle:de},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,i=this.textStrokeState_,s=this.textState_;if(this.text_===""||!s||!n&&!i)return;const a=this.coordinates;let h=a.length;const c=t.getType();let d=null,f=t.getStride();if(s.placement==="line"&&(c=="LineString"||c=="MultiLineString"||c=="Polygon"||c=="MultiPolygon")){if(!ce(this.getBufferedMaxExtent(),t.getExtent()))return;let p;if(d=t.getFlatCoordinates(),c=="LineString")p=[d.length];else if(c=="MultiLineString")p=t.getEnds();else if(c=="Polygon")p=t.getEnds().slice(0,1);else if(c=="MultiPolygon"){const b=t.getEndss();p=[];for(let M=0,S=b.length;M<S;++M)p.push(b[M][0])}this.beginGeometry(t,e);const m=s.repeat,v=m?void 0:s.textAlign;let E=0;for(let b=0,M=p.length;b<M;++b){let S;m?S=Uw(m*this.resolution,d,E,p[b],f):S=[d.slice(E,p[b])];for(let y=0,x=S.length;y<x;++y){const C=S[y];let T=0,k=C.length;if(v==null){const I=jw(s.maxAngle,C,0,C.length,2);T=I[0],k=I[1]}for(let I=T;I<k;I+=f)a.push(C[I],C[I+1]);const R=a.length;E=p[b],this.drawChars_(h,R),h=R}}this.endGeometry(e)}else{let p=s.overflow?null:[];switch(c){case"Point":case"MultiPoint":d=t.getFlatCoordinates();break;case"LineString":d=t.getFlatMidpoint();break;case"Circle":d=t.getCenter();break;case"MultiLineString":d=t.getFlatMidpoints(),f=2;break;case"Polygon":d=t.getFlatInteriorPoint(),s.overflow||p.push(d[2]/this.resolution),f=3;break;case"MultiPolygon":const S=t.getFlatInteriorPoints();d=[];for(let y=0,x=S.length;y<x;y+=3)s.overflow||p.push(S[y+2]/this.resolution),d.push(S[y],S[y+1]);if(d.length===0)return;f=2;break}const m=this.appendFlatPointCoordinates(d,f);if(m===h)return;if(p&&(m-h)/2!==d.length/f){let S=h/2;p=p.filter((y,x)=>{const C=a[(S+x)*2]===d[x*f]&&a[(S+x)*2+1]===d[x*f+1];return C||--S,C})}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let v=s.padding;if(v!=yn&&(s.scale[0]<0||s.scale[1]<0)){let S=s.padding[0],y=s.padding[1],x=s.padding[2],C=s.padding[3];s.scale[0]<0&&(y=-y,C=-C),s.scale[1]<0&&(S=-S,x=-x),v=[S,y,x,C]}const E=this.pixelRatio;this.instructions.push([rt.DRAW_IMAGE,h,m,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,v==yn?yn:v.map(function(S){return S*E}),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,p]);const b=1/E,M=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=de,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([rt.DRAW_IMAGE,h,m,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[b,b],NaN,void 0,this.declutterImageWithText_,v,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?de:this.fillKey_,this.textOffsetX_,this.textOffsetY_,p]),s.backgroundFill&&(this.state.fillStyle=M,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,i=this.strokeKey_;t&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||Br,justify:e.justify,textBaseline:e.textBaseline||_o,scale:e.scale});const a=this.fillKey_;n&&(a in this.fillStates||(this.fillStates[a]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,i=this.textState_,s=this.strokeKey_,a=this.textKey_,h=this.fillKey_;this.saveTextStates_();const c=this.pixelRatio,d=Uo[i.textBaseline],f=this.textOffsetY_*c,p=this.text_,m=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([rt.DRAW_CHARS,t,e,d,i.overflow,h,i.maxAngle,c,f,s,m*c,p,a,1]),this.hitDetectionInstructions.push([rt.DRAW_CHARS,t,e,d,i.overflow,h&&de,i.maxAngle,c,f,s,m*c,p,a,1/c])}setTextStyle(t,e){let n,i,s;if(!t)this.text_="";else{const a=t.getFill();a?(i=this.textFillState_,i||(i={},this.textFillState_=i),i.fillStyle=Ye(a.getColor()||de)):(i=null,this.textFillState_=i);const h=t.getStroke();if(!h)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const E=h.getLineDash(),b=h.getLineDashOffset(),M=h.getWidth(),S=h.getMiterLimit();s.lineCap=h.getLineCap()||Un,s.lineDash=E?E.slice():ci,s.lineDashOffset=b===void 0?ui:b,s.lineJoin=h.getLineJoin()||jn,s.lineWidth=M===void 0?Gr:M,s.miterLimit=S===void 0?zr:S,s.strokeStyle=Ye(h.getColor()||Nr)}n=this.textState_;const c=t.getFont()||Xu;Py(c);const d=t.getScaleArray();n.overflow=t.getOverflow(),n.font=c,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||_o,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||yn,n.scale=d===void 0?[1,1]:d;const f=t.getOffsetX(),p=t.getOffsetY(),m=t.getRotateWithView(),v=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=f===void 0?0:f,this.textOffsetY_=p===void 0?0:p,this.textRotateWithView_=m===void 0?!1:m,this.textRotation_=v===void 0?0:v,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:dt(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=i?typeof i.fillStyle=="string"?i.fillStyle:"|"+dt(i.fillStyle):""}this.declutterImageWithText_=e}}const Ww={Circle:cf,Default:Qr,Image:zw,LineString:Bw,Polygon:cf,Text:Zw};class Hw{constructor(t,e,n,i){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const i in n){const s=n[i].finish();t[e][i]=s}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let i=this.buildersByZIndex_[n];i===void 0&&(i={},this.buildersByZIndex_[n]=i);let s=i[e];if(s===void 0){const a=Ww[e];s=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=s}return s}}const uf=Hw;function Vw(r,t,e,n,i,s,a,h,c,d,f,p){let m=r[t],v=r[t+1],E=0,b=0,M=0,S=0;function y(){E=m,b=v,t+=n,m=r[t],v=r[t+1],S+=M,M=Math.sqrt((m-E)*(m-E)+(v-b)*(v-b))}do y();while(t<e-n&&S+M<s);let x=M===0?0:(s-S)/M;const C=Ee(E,m,x),T=Ee(b,v,x),k=t-n,R=S,I=s+h*c(d,i,f);for(;t<e-n&&S+M<I;)y();x=M===0?0:(I-S)/M;const z=Ee(E,m,x),G=Ee(b,v,x);let j;if(p){const V=[C,T,z,G];_u(V,0,4,2,p,V,V),j=V[0]>V[2]}else j=C>z;const W=Math.PI,Y=[],$=k+n===t;t=k,M=0,S=R,m=r[t],v=r[t+1];let K;if($){y(),K=Math.atan2(v-b,m-E),j&&(K+=K>0?-W:W);const V=(z+C)/2,Z=(G+T)/2;return Y[0]=[V,Z,(I-s)/2,K,i],Y}i=i.replace(/\n/g," ");for(let V=0,Z=i.length;V<Z;){y();let U=Math.atan2(v-b,m-E);if(j&&(U+=U>0?-W:W),K!==void 0){let et=U-K;if(et+=et>W?-2*W:et<-W?2*W:0,Math.abs(et)>a)return null}K=U;const xt=V;let H=0;for(;V<Z;++V){const et=j?Z-V-1:V,it=h*c(d,i[et],f);if(t+n<e&&S+M<s+H+it/2)break;H+=it}if(V===xt)continue;const at=j?i.substring(Z-xt,Z-V):i.substring(xt,V);x=M===0?0:(s+H/2-S)/M;const F=Ee(E,m,x),wt=Ee(b,v,x);Y.push([F,wt,H/2,U,at]),s+=H}return Y}const nr=xe(),Hi=[],yi=[],vi=[],Vi=[];function df(r){return r[3].declutterBox}const ff=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function sh(r,t){return t==="start"?t=ff.test(r)?"right":"left":t==="end"&&(t=ff.test(r)?"left":"right"),Uo[t]}function Xw(r,t,e){return e>0&&r.push(`
461
+ `);this.generateTileUrlFunction_?this.setTileUrlFunction(zx(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,n){}useTile(t,e,n){const i=ko(t,e,n);this.tileCache.containsKey(i)&&this.tileCache.get(i)}}const Gx=ql;class Ux extends Gx{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:jx,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate!==void 0?t.interpolate:!0,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,this.tileClass=t.tileClass!==void 0?t.tileClass:Bd,this.tileCacheForProjection={},this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}canExpireCache(){if(this.tileCache.canExpireCache())return!0;for(const t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1}expireCache(t,e){const n=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==n?e:{});for(const i in this.tileCacheForProjection){const s=this.tileCacheForProjection[i];s.expireCache(s==n?e:{})}}getGutterForProjection(t){return this.getProjection()&&t&&!dn(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getOpaque(t){return this.getProjection()&&t&&!dn(this.getProjection(),t)?!1:super.getOpaque(t)}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||dn(e,t)))return this.tileGrid;const n=dt(t);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=Yd(t)),this.tileGridForProjection[n]}getTileCacheForProjection(t){const e=this.getProjection();if(!e||dn(e,t))return this.tileCache;const n=dt(t);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new Wd(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]}createTile_(t,e,n,i,s,a){const h=[t,e,n],c=this.getTileCoordForTileUrlFunction(h,s),d=c?this.tileUrlFunction(c,i,s):void 0,f=new this.tileClass(h,d!==void 0?nt.IDLE:nt.EMPTY,d!==void 0?d:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return f.key=a,f.addEventListener(ct.CHANGE,this.handleTileChange.bind(this)),f}getTile(t,e,n,i,s){const a=this.getProjection();if(!a||!s||dn(a,s))return this.getTileInternal(t,e,n,i,a||s);const h=this.getTileCacheForProjection(s),c=[t,e,n];let d;const f=Zd(c);h.containsKey(f)&&(d=h.get(f));const p=this.getKey();if(d&&d.key==p)return d;const m=this.getTileGridForProjection(a),v=this.getTileGridForProjection(s),E=this.getTileCoordForTileUrlFunction(c,s),C=new Hl(a,m,s,v,c,E,this.getTilePixelRatio(i),this.getGutter(),(M,S,y,x)=>this.getTileInternal(M,S,y,x,a),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return C.key=p,d?(C.interimTile=d,C.refreshInterimChain(),h.replace(f,C)):h.set(f,C),C}getTileInternal(t,e,n,i,s){let a=null;const h=ko(t,e,n),c=this.getKey();if(!this.tileCache.containsKey(h))a=this.createTile_(t,e,n,i,s,c),this.tileCache.set(h,a);else if(a=this.tileCache.get(h),a.key!=c){const d=a;a=this.createTile_(t,e,n,i,s,c),d.getState()==nt.IDLE?a.interimTile=d.interimTile:a.interimTile=d,a.refreshInterimChain(),this.tileCache.replace(h,a)}return a}setRenderReprojectionEdges(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(const e in this.tileCacheForProjection)this.tileCacheForProjection[e].clear();this.changed()}}setTileGridForProjection(t,e){const n=zt(t);if(n){const i=dt(n);i in this.tileGridForProjection||(this.tileGridForProjection[i]=e)}}clear(){super.clear();for(const t in this.tileCacheForProjection)this.tileCacheForProjection[t].clear()}}function jx(r,t){r.getImage().src=t}const Zx=Ux;class Wx extends Zx{constructor(t){t=t||{};const e=t.projection!==void 0?t.projection:"EPSG:3857",n=t.tileGrid!==void 0?t.tileGrid:Rx({extent:Kl(e),maxResolution:t.maxResolution,maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});super({attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:t.interpolate,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:n,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.gutter_=t.gutter!==void 0?t.gutter:0}getGutter(){return this.gutter_}}const Hx=Wx,Vx='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.';class Xx extends Hx{constructor(t){t=t||{};let e;t.attributions!==void 0?e=t.attributions:e=[Vx];const n=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",i=t.url!==void 0?t.url:"https://tile.openstreetmap.org/{z}/{x}/{y}.png";super({attributions:e,attributionsCollapsible:!1,cacheSize:t.cacheSize,crossOrigin:n,interpolate:t.interpolate,maxZoom:t.maxZoom!==void 0?t.maxZoom:19,opaque:t.opaque!==void 0?t.opaque:!0,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileLoadFunction:t.tileLoadFunction,transition:t.transition,url:i,wrapX:t.wrapX,zDirection:t.zDirection})}}const Yx=Xx,Ro={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"};class Kx extends ho{constructor(t){t=t||{};const e=Object.assign({},t);delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.setPreload(t.preload!==void 0?t.preload:0),this.setUseInterimTilesOnError(t.useInterimTilesOnError!==void 0?t.useInterimTilesOnError:!0)}getPreload(){return this.get(Ro.PRELOAD)}setPreload(t){this.set(Ro.PRELOAD,t)}getUseInterimTilesOnError(){return this.get(Ro.USE_INTERIM_TILES_ON_ERROR)}setUseInterimTilesOnError(t){this.set(Ro.USE_INTERIM_TILES_ON_ERROR,t)}getData(t){return super.getData(t)}}const qx=Kx,qd=[];let er=null;function Jx(){er=ee(1,1,void 0,{willReadFrequently:!0})}class Qx extends Sd{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Ht(),this.pixelTransform=Ht(),this.inversePixelTransform=Ht(),this.context=null,this.containerReused=!1,this.pixelContext_=null,this.frameState=null}getImageData(t,e,n){er||Jx(),er.clearRect(0,0,1,1);let i;try{er.drawImage(t,e,n,1,1,0,0,1,1),i=er.getImageData(0,0,1,1).data}catch{return er=null,null}return i}getBackground(t){let n=this.getLayer().getBackground();return typeof n=="function"&&(n=n(t.viewState.resolution)),n||void 0}useContainer(t,e,n){const i=this.getLayer().getClassName();let s,a;if(t&&t.className===i&&(!n||t&&t.style.backgroundColor&&li(Dr(t.style.backgroundColor),Dr(n)))){const h=t.firstElementChild;h instanceof HTMLCanvasElement&&(a=h.getContext("2d"))}if(a&&a.canvas.style.transform===e?(this.container=t,this.context=a,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){s=document.createElement("div"),s.className=i;let h=s.style;h.position="absolute",h.width="100%",h.height="100%",a=ee();const c=a.canvas;s.appendChild(c),h=c.style,h.position="absolute",h.left="0",h.transformOrigin="top left",this.container=s,this.context=a}!this.containerReused&&n&&!this.container.style.backgroundColor&&(this.container.style.backgroundColor=n)}clipUnrotated(t,e,n){const i=cn(n),s=Xs(n),a=Vs(n),h=Hs(n);Nt(e.coordinateToPixelTransform,i),Nt(e.coordinateToPixelTransform,s),Nt(e.coordinateToPixelTransform,a),Nt(e.coordinateToPixelTransform,h);const c=this.inversePixelTransform;Nt(c,i),Nt(c,s),Nt(c,a),Nt(c,h),t.save(),t.beginPath(),t.moveTo(Math.round(i[0]),Math.round(i[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(h[0]),Math.round(h[1])),t.clip()}dispatchRenderEvent_(t,e,n){const i=this.getLayer();if(i.hasListener(t)){const s=new Or(t,this.inversePixelTransform,n,e);i.dispatchEvent(s)}}preRender(t,e){this.frameState=e,this.dispatchRenderEvent_(te.PRERENDER,t,e)}postRender(t,e){this.dispatchRenderEvent_(te.POSTRENDER,t,e)}getRenderTransform(t,e,n,i,s,a,h){const c=s/2,d=a/2,f=i/e,p=-f,m=-t[0]+h,v=-t[1];return Ie(this.tempTransform,c,d,f,p,-n,m,v)}disposeInternal(){delete this.frameState,super.disposeInternal()}}const Jd=Qx;class $x extends Jd{constructor(t){super(t),this.extentChanged=!0,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.newTiles_=!1,this.tmpExtent=xe(),this.tmpTileRange_=new Ud(0,0,0,0)}isDrawableTile(t){const e=this.getLayer(),n=t.getState(),i=e.getUseInterimTilesOnError();return n==nt.LOADED||n==nt.EMPTY||n==nt.ERROR&&!i}getTile(t,e,n,i){const s=i.pixelRatio,a=i.viewState.projection,h=this.getLayer();let d=h.getSource().getTile(t,e,n,s,a);return d.getState()==nt.ERROR&&h.getUseInterimTilesOnError()&&h.getPreload()>0&&(this.newTiles_=!0),this.isDrawableTile(d)||(d=d.getInterimTile()),d}getData(t){const e=this.frameState;if(!e)return null;const n=this.getLayer(),i=Nt(e.pixelToCoordinateTransform,t.slice()),s=n.getExtent();if(s&&!Ws(s,i))return null;const a=e.pixelRatio,h=e.viewState.projection,c=e.viewState,d=n.getRenderSource(),f=d.getTileGridForProjection(c.projection),p=d.getTilePixelRatio(e.pixelRatio);for(let m=f.getZForResolution(c.resolution);m>=f.getMinZoom();--m){const v=f.getTileCoordForCoordAndZ(i,m),E=d.getTile(m,v[1],v[2],a,h);if(!(E instanceof Bd||E instanceof Hl)||E instanceof Hl&&E.getState()===nt.EMPTY)return null;if(E.getState()!==nt.LOADED)continue;const C=f.getOrigin(m),M=Le(f.getTileSize(m)),S=f.getResolution(m),y=Math.floor(p*((i[0]-C[0])/S-v[1]*M[0])),x=Math.floor(p*((C[1]-i[1])/S-v[2]*M[1])),b=Math.round(p*d.getGutterForProjection(c.projection));return this.getImageData(E.getImage(),y+b,x+b)}return null}loadedTileCallback(t,e,n){return this.isDrawableTile(n)?super.loadedTileCallback(t,e,n):!1}prepareFrame(t){return!!this.getLayer().getSource()}renderFrame(t,e){const n=t.layerStatesArray[t.layerIndex],i=t.viewState,s=i.projection,a=i.resolution,h=i.center,c=i.rotation,d=t.pixelRatio,f=this.getLayer(),p=f.getSource(),m=p.getRevision(),v=p.getTileGridForProjection(s),E=v.getZForResolution(a,p.zDirection),C=v.getResolution(E);let M=t.extent;const S=t.viewState.resolution,y=p.getTilePixelRatio(d),x=Math.round(Mt(M)/S*d),b=Math.round(we(M)/S*d),T=n.extent&&fn(n.extent);T&&(M=Sr(M,fn(n.extent)));const k=C*x/2/y,R=C*b/2/y,I=[h[0]-k,h[1]-R,h[0]+k,h[1]+R],z=v.getTileRangeForExtentAndZ(M,E),G={};G[E]={};const j=this.createLoadedTileFinder(p,s,G),W=this.tmpExtent,Y=this.tmpTileRange_;this.newTiles_=!1;const $=c?Ba(i.center,S,c,t.size):void 0;for(let wt=z.minX;wt<=z.maxX;++wt)for(let et=z.minY;et<=z.maxY;++et){if(c&&!v.tileCoordIntersectsViewport([E,wt,et],$))continue;const it=this.getTile(E,wt,et,t);if(this.isDrawableTile(it)){const Xt=dt(this);if(it.getState()==nt.LOADED){G[E][it.tileCoord.toString()]=it;let Te=it.inTransition(Xt);Te&&n.opacity!==1&&(it.endTransition(Xt),Te=!1),!this.newTiles_&&(Te||!this.renderedTiles.includes(it))&&(this.newTiles_=!0)}if(it.getAlpha(Xt,t.time)===1)continue}const ht=v.getTileCoordChildTileRange(it.tileCoord,Y,W);let kt=!1;ht&&(kt=j(E+1,ht)),kt||v.forEachTileCoordParentTileRange(it.tileCoord,j,Y,W)}const K=C/a*d/y;Ie(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/d,1/d,c,-x/2,-b/2);const V=pu(this.pixelTransform);this.useContainer(e,V,this.getBackground(t));const Z=this.context,U=Z.canvas;$s(this.inversePixelTransform,this.pixelTransform),Ie(this.tempTransform,x/2,b/2,K,K,0,-x/2,-b/2),U.width!=x||U.height!=b?(U.width=x,U.height=b):this.containerReused||Z.clearRect(0,0,x,b),T&&this.clipUnrotated(Z,t,T),p.getInterpolate()||(Z.imageSmoothingEnabled=!1),this.preRender(Z,t),this.renderedTiles.length=0;let xt=Object.keys(G).map(Number);xt.sort(Pi);let H,at,F;n.opacity===1&&(!this.containerReused||p.getOpaque(t.viewState.projection))?xt=xt.reverse():(H=[],at=[]);for(let wt=xt.length-1;wt>=0;--wt){const et=xt[wt],it=p.getTilePixelSize(et,d,s),kt=v.getResolution(et)/C,Xt=it[0]*kt*K,Te=it[1]*kt*K,Qe=v.getTileCoordForCoordAndZ(cn(I),et),Xi=v.getTileCoordExtent(Qe),Me=Nt(this.tempTransform,[y*(Xi[0]-I[0])/C,y*(I[3]-Xi[3])/C]),Yi=y*p.getGutterForProjection(s),$e=G[et];for(const Ki in $e){const Fe=$e[Ki],qi=Fe.tileCoord,wi=Qe[1]-qi[1],rr=Math.round(Me[0]-(wi-1)*Xt),Ei=Qe[2]-qi[2],En=Math.round(Me[1]-(Ei-1)*Te),qt=Math.round(Me[0]-wi*Xt),ae=Math.round(Me[1]-Ei*Te),be=rr-qt,ze=En-ae,ti=E===et,ei=ti&&Fe.getAlpha(dt(this),t.time)!==1;let Ne=!1;if(!ei)if(H){F=[qt,ae,qt+be,ae,qt+be,ae+ze,qt,ae+ze];for(let Ji=0,Ln=H.length;Ji<Ln;++Ji)if(E!==et&&et<at[Ji]){const Yt=H[Ji];ce([qt,ae,qt+be,ae+ze],[Yt[0],Yt[3],Yt[4],Yt[7]])&&(Ne||(Z.save(),Ne=!0),Z.beginPath(),Z.moveTo(F[0],F[1]),Z.lineTo(F[2],F[3]),Z.lineTo(F[4],F[5]),Z.lineTo(F[6],F[7]),Z.moveTo(Yt[6],Yt[7]),Z.lineTo(Yt[4],Yt[5]),Z.lineTo(Yt[2],Yt[3]),Z.lineTo(Yt[0],Yt[1]),Z.clip())}H.push(F),at.push(et)}else Z.clearRect(qt,ae,be,ze);this.drawTileImage(Fe,t,qt,ae,be,ze,Yi,ti),H&&!ei?(Ne&&Z.restore(),this.renderedTiles.unshift(Fe)):this.renderedTiles.push(Fe),this.updateUsedTiles(t.usedTiles,p,Fe)}}return this.renderedRevision=m,this.renderedResolution=C,this.extentChanged=!this.renderedExtent_||!Nn(this.renderedExtent_,I),this.renderedExtent_=I,this.renderedPixelRatio=d,this.renderedProjection=s,this.manageTilePyramid(t,p,v,d,s,M,E,f.getPreload()),this.scheduleExpireCache(t,p),this.postRender(Z,t),n.extent&&Z.restore(),Z.imageSmoothingEnabled=!0,V!==U.style.transform&&(U.style.transform=V),this.container}drawTileImage(t,e,n,i,s,a,h,c){const d=this.getTileImage(t);if(!d)return;const f=dt(this),p=e.layerStatesArray[e.layerIndex],m=p.opacity*(c?t.getAlpha(f,e.time):1),v=m!==this.context.globalAlpha;v&&(this.context.save(),this.context.globalAlpha=m),this.context.drawImage(d,h,h,d.width-2*h,d.height-2*h,n,i,s,a),v&&this.context.restore(),m!==p.opacity?e.animate=!0:c&&t.endTransition(f)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}scheduleExpireCache(t,e){if(e.canExpireCache()){const n=(function(i,s,a){const h=dt(i);h in a.usedTiles&&i.expireCache(a.viewState.projection,a.usedTiles[h])}).bind(null,e);t.postRenderFunctions.push(n)}}updateUsedTiles(t,e,n){const i=dt(e);i in t||(t[i]={}),t[i][n.getKey()]=!0}manageTilePyramid(t,e,n,i,s,a,h,c,d){const f=dt(e);f in t.wantedTiles||(t.wantedTiles[f]={});const p=t.wantedTiles[f],m=t.tileQueue,v=n.getMinZoom(),E=t.viewState.rotation,C=E?Ba(t.viewState.center,t.viewState.resolution,E,t.size):void 0;let M=0,S,y,x,b,T,k;for(k=v;k<=h;++k)for(y=n.getTileRangeForExtentAndZ(a,k,y),x=n.getResolution(k),b=y.minX;b<=y.maxX;++b)for(T=y.minY;T<=y.maxY;++T)E&&!n.tileCoordIntersectsViewport([k,b,T],C)||(h-k<=c?(++M,S=e.getTile(k,b,T,i,s),S.getState()==nt.IDLE&&(p[S.getKey()]=!0,m.isKeyQueued(S.getKey())||m.enqueue([S,f,n.getTileCoordCenter(S.tileCoord),x])),d!==void 0&&d(S)):e.useTile(k,b,T,s));e.updateCacheSize(M,s)}}const tw=$x;class ew extends qx{constructor(t){super(t)}createRenderer(){return new tw(this)}}const iw=ew;class nw{constructor(t){this.rbush_=new Xh(t),this.items_={}}insert(t,e){const n={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(n),this.items_[dt(e)]=n}load(t,e){const n=new Array(e.length);for(let i=0,s=e.length;i<s;i++){const a=t[i],h=e[i],c={minX:a[0],minY:a[1],maxX:a[2],maxY:a[3],value:h};n[i]=c,this.items_[dt(h)]=c}this.rbush_.load(n)}remove(t){const e=dt(t),n=this.items_[e];return delete this.items_[e],this.rbush_.remove(n)!==null}update(t,e){const n=this.items_[dt(e)],i=[n.minX,n.minY,n.maxX,n.maxY];Nn(i,t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(e){return e.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(i){return i.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let n;for(let i=0,s=t.length;i<s;i++)if(n=e(t[i]),n)return n;return n}isEmpty(){return on(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return ki(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}}const Qd=nw;class Jl extends Re{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Jl(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());const e=this.getGeometry();e&&t.setGeometry(e.clone());const n=this.getStyle();return n&&t.setStyle(n),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(Tt(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=gt(t,ct.CHANGE,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?rw(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()}}function rw(r){if(typeof r=="function")return r;let t;return Array.isArray(r)?t=r:(mt(typeof r.getZIndex=="function","Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),t=[r]),function(){return t}}const $d=Jl;class Ao extends yu{constructor(t){super(),this.geometries_=t||null,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(Tt),this.changeEventsKeys_.length=0}listenGeometriesChange_(){if(this.geometries_)for(let t=0,e=this.geometries_.length;t<e;++t)this.changeEventsKeys_.push(gt(this.geometries_[t],ct.CHANGE,this.changed,this))}clone(){const t=new Ao(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t}closestPointXY(t,e,n,i){if(i<ln(this.getExtent(),t,e))return i;const s=this.geometries_;for(let a=0,h=s.length;a<h;++a)i=s[a].closestPointXY(t,e,n,i);return i}containsXY(t,e){const n=this.geometries_;for(let i=0,s=n.length;i<s;++i)if(n[i].containsXY(t,e))return!0;return!1}computeExtent(t){Tr(t);const e=this.geometries_;for(let n=0,i=e.length;n<i;++n)Zc(t,e[n].getExtent());return t}getGeometries(){return tf(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let n=0,i=e.length;n<i;++n)e[n].getType()===this.getType()?t=t.concat(e[n].getGeometriesArrayRecursive()):t.push(e[n]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],n=this.geometries_;let i=!1;for(let s=0,a=n.length;s<a;++s){const h=n[s],c=h.getSimplifiedGeometry(t);e.push(c),c!==h&&(i=!0)}if(i){const s=new Ao(null);return s.setGeometriesArray(e),s}return this.simplifiedGeometryMaxMinSquaredTolerance=t,this}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let n=0,i=e.length;n<i;++n)if(e[n].intersectsExtent(t))return!0;return!1}isEmpty(){return this.geometries_.length===0}rotate(t,e){const n=this.geometries_;for(let i=0,s=n.length;i<s;++i)n[i].rotate(t,e);this.changed()}scale(t,e,n){n||(n=Ri(this.getExtent()));const i=this.geometries_;for(let s=0,a=i.length;s<a;++s)i[s].scale(t,e,n);this.changed()}setGeometries(t){this.setGeometriesArray(tf(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let n=0,i=e.length;n<i;++n)e[n].applyTransform(t);this.changed()}translate(t,e){const n=this.geometries_;for(let i=0,s=n.length;i<s;++i)n[i].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function tf(r){const t=[];for(let e=0,n=r.length;e<n;++e)t.push(r[e].clone());return t}const sw=Ao;function Io(r,t,e,n,i,s,a){let h,c;const d=(e-t)/n;if(d===1)h=t;else if(d===2)h=t,c=i;else if(d!==0){let f=r[t],p=r[t+1],m=0;const v=[0];for(let M=t+n;M<e;M+=n){const S=r[M],y=r[M+1];m+=Math.sqrt((S-f)*(S-f)+(y-p)*(y-p)),v.push(m),f=S,p=y}const E=i*m,C=Y_(v,E);C<0?(c=(E-v[-C-2])/(v[-C-1]-v[-C-2]),h=t+(-C-2)*n):h=t+C*n}a=a>1?a:2,s=s||new Array(a);for(let f=0;f<a;++f)s[f]=h===void 0?NaN:c===void 0?r[h+f]:Ee(r[h+f],r[h+n+f],c);return s}function Ql(r,t,e,n,i,s){if(e==t)return null;let a;if(i<r[t+n-1])return s?(a=r.slice(t,t+n),a[n-1]=i,a):null;if(r[e-1]<i)return s?(a=r.slice(e-n,e),a[n-1]=i,a):null;if(i==r[t+n-1])return r.slice(t,t+n);let h=t/n,c=e/n;for(;h<c;){const m=h+c>>1;i<r[(m+1)*n-1]?c=m:h=m+1}const d=r[h*n-1];if(i==d)return r.slice((h-1)*n,(h-1)*n+n);const f=r[(h+1)*n-1],p=(i-d)/(f-d);a=[];for(let m=0;m<n-1;++m)a.push(Ee(r[(h-1)*n+m],r[h*n+m],p));return a.push(i),a}function ow(r,t,e,n,i,s,a){if(a)return Ql(r,t,e[e.length-1],n,i,s);let h;if(i<r[n-1])return s?(h=r.slice(0,n),h[n-1]=i,h):null;if(r[r.length-1]<i)return s?(h=r.slice(r.length-n),h[n-1]=i,h):null;for(let c=0,d=e.length;c<d;++c){const f=e[c];if(t!=f){if(i<r[t+n-1])return null;if(i<=r[f-1])return Ql(r,t,f,n,i,!1);t=f}}return null}function ef(r,t,e,n){let i=r[t],s=r[t+1],a=0;for(let h=t+n;h<e;h+=n){const c=r[h],d=r[h+1];a+=Math.sqrt((c-i)*(c-i)+(d-s)*(d-s)),i=c,s=d}return a}class Do extends gn{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendCoordinate(t){He(this.flatCoordinates,t),this.changed()}clone(){const t=new Do(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Ja(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),$a(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,n,i))}forEachSegment(t){return Mu(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return this.layout!="XYM"&&this.layout!="XYZM"?null:(e=e!==void 0?e:!1,Ql(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return Di(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return Io(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return ef(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=eo(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new Do(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return ro(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=to(this.flatCoordinates,0,t,this.stride),this.changed()}}const $l=Do;class Oo extends gn{constructor(t,e,n){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(e!==void 0&&n)this.setFlatCoordinates(e,t),this.ends_=n;else{const i=t,s=[],a=[];for(let c=0,d=i.length;c<d;++c){const f=i[c];He(s,f.getFlatCoordinates()),a.push(s.length)}const h=i.length===0?this.getLayout():i[0].getLayout();this.setFlatCoordinates(h,s),this.ends_=a}}appendLineString(t){He(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new Oo(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Qa(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),tl(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,n,i))}getCoordinateAtM(t,e,n){return this.layout!="XYM"&&this.layout!="XYZM"||this.flatCoordinates.length===0?null:(e=e!==void 0?e:!1,n=n!==void 0?n:!1,ow(this.flatCoordinates,0,this.ends_,this.stride,t,e,n))}getCoordinates(){return Rr(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new $l(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,n=this.layout,i=[];let s=0;for(let a=0,h=e.length;a<h;++a){const c=e[a],d=new $l(t.slice(s,c),n);i.push(d),s=c}return i}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let n=0;const i=this.ends_,s=this.stride;for(let a=0,h=i.length;a<h;++a){const c=i[a],d=Io(e,n,c,s,.5);He(t,d),n=c}return t}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Eu(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,n),new Oo(e,"XY",n)}getType(){return"MultiLineString"}intersectsExtent(t){return ey(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const n=kr(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=n.length===0?0:n[n.length-1],this.changed()}}const aw=Oo;class th extends gn{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){He(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new th(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,i){if(i<ln(this.getExtent(),t,e))return i;const s=this.flatCoordinates,a=this.stride;for(let h=0,c=s.length;h<c;h+=a){const d=un(t,e,s[h],s[h+1]);if(d<i){i=d;for(let f=0;f<a;++f)n[f]=s[h+f];n.length=a}}return i}getCoordinates(){return Di(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new no(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,n=this.stride,i=[];for(let s=0,a=t.length;s<a;s+=n){const h=new no(t.slice(s,s+n),e);i.push(h)}return i}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,n=this.stride;for(let i=0,s=e.length;i<s;i+=n){const a=e[i],h=e[i+1];if(Da(t,a,h))return!0}return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=to(this.flatCoordinates,0,t,this.stride),this.changed()}}const nf=th;function rf(r,t,e,n){const i=[];let s=xe();for(let a=0,h=e.length;a<h;++a){const c=e[a];s=Fa(r,t,c[0],n),i.push((s[0]+s[2])/2,(s[1]+s[3])/2),t=c[c.length-1]}return i}class Fo extends gn{constructor(t,e,n){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!n&&!Array.isArray(t[0])){const i=t,s=[],a=[];for(let h=0,c=i.length;h<c;++h){const d=i[h],f=s.length,p=d.getEnds();for(let m=0,v=p.length;m<v;++m)p[m]+=f;He(s,d.getFlatCoordinates()),a.push(p)}e=i.length===0?this.getLayout():i[0].getLayout(),t=s,n=a}e!==void 0&&n?(this.setFlatCoordinates(e,t),this.endss_=n):this.setCoordinates(t,e)}appendPolygon(t){let e;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();else{const n=this.flatCoordinates.length;He(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let i=0,s=e.length;i<s;++i)e[i]+=n}this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let i=0;i<t;++i)e[i]=this.endss_[i].slice();const n=new Fo(this.flatCoordinates.slice(),this.layout,e);return n.applyProperties(this),n}closestPointXY(t,e,n,i){return i<ln(this.getExtent(),t,e)?i:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Xm(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Ym(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,e,n,i))}containsXY(t,e){return ty(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return Qm(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return t!==void 0?(e=this.getOrientedFlatCoordinates().slice(),ll(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,il(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=rf(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=Tu(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new nf(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;ku(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=ll(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],n=[];return e.length=Jm(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,n),new Fo(e,"XY",n)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(t===0)e=0;else{const s=this.endss_[t-1];e=s[s.length-1]}const n=this.endss_[t].slice(),i=n[n.length-1];if(e!==0)for(let s=0,a=n.length;s<a;++s)n[s]-=e;return new Oi(this.flatCoordinates.slice(e,i),this.layout,n)}getPolygons(){const t=this.layout,e=this.flatCoordinates,n=this.endss_,i=[];let s=0;for(let a=0,h=n.length;a<h;++a){const c=n[a].slice(),d=c[c.length-1];if(s!==0)for(let p=0,m=c.length;p<m;++p)c[p]-=s;const f=new Oi(e.slice(s,d),t,c);i.push(f),s=d}return i}getType(){return"MultiPolygon"}intersectsExtent(t){return iy(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const n=wu(this.flatCoordinates,0,t,this.stride,this.endss_);if(n.length===0)this.flatCoordinates.length=0;else{const i=n[n.length-1];this.flatCoordinates.length=i.length===0?0:i[i.length-1]}this.changed()}}const lw=Fo,sf=Ht();class ir{constructor(t,e,n,i,s,a){this.styleFunction,this.extent_,this.id_=a,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=s,this.squaredTolerance_,this.stride_=i,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_=this.type_==="Point"?jc(this.flatCoordinates_):Fa(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=Ri(this.getExtent());this.flatInteriorPoints_=sl(this.flatCoordinates_,0,this.ends_,2,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=ry(this.flatCoordinates_,this.ends_),e=rf(this.flatCoordinates_,0,t,2);this.flatInteriorPoints_=Tu(this.flatCoordinates_,0,t,2,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=Io(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const n=this.ends_;for(let i=0,s=n.length;i<s;++i){const a=n[i],h=Io(t,e,a,2,.5);He(this.flatMidpoints_,h),e=a}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){t=zt(t);const e=t.getExtent(),n=t.getWorldExtent();if(e&&n){const i=we(n)/we(e);Ie(sf,n[0],n[3],i,-i,0,0,0),Ii(this.flatCoordinates_,0,this.flatCoordinates_.length,2,sf,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new ir(this.type_,this.flatCoordinates_.slice(),this.ends_.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=Ic((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const n=this.simplifiedGeometry_.getFlatCoordinates();let i;switch(this.type_){case"LineString":n.length=eo(n,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,n,0),i=[n.length];break;case"MultiLineString":i=[],n.length=Eu(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,n,0,i);break;case"Polygon":i=[],n.length=el(n,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),n,0,i);break}return i&&(this.simplifiedGeometry_=new ir(this.type_,n,i,2,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}ir.prototype.getFlatCoordinates=ir.prototype.getOrientedFlatCoordinates;const mi=ir;function hw(r,t){return[[-1/0,-1/0,1/0,1/0]]}let cw=!1;function uw(r,t,e,n,i,s,a){const h=new XMLHttpRequest;h.open("GET",typeof r=="function"?r(e,n,i):r,!0),t.getType()=="arraybuffer"&&(h.responseType="arraybuffer"),h.withCredentials=cw,h.onload=function(c){if(!h.status||h.status>=200&&h.status<300){const d=t.getType();let f;d=="json"?f=JSON.parse(h.responseText):d=="text"?f=h.responseText:d=="xml"?(f=h.responseXML,f||(f=new DOMParser().parseFromString(h.responseText,"application/xml"))):d=="arraybuffer"&&(f=h.response),f?s(t.readFeatures(f,{extent:e,featureProjection:i}),t.readProjection(f)):a()}else a()},h.onerror=a,h.send()}function of(r,t){return function(e,n,i,s,a){const h=this;uw(r,t,e,n,i,function(c,d){h.addFeatures(c),s!==void 0&&s(c)},a||In)}}class Zi extends ai{constructor(t,e,n){super(t),this.feature=e,this.features=n}}class dw extends Vd{constructor(t){t=t||{},super({attributions:t.attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:t.wrapX!==void 0?t.wrapX:!0}),this.on,this.once,this.un,this.loader_=In,this.format_=t.format,this.overlaps_=t.overlaps===void 0?!0:t.overlaps,this.url_=t.url,t.loader!==void 0?this.loader_=t.loader:this.url_!==void 0&&(mt(this.format_,"`format` must be set when `url` is set"),this.loader_=of(this.url_,this.format_)),this.strategy_=t.strategy!==void 0?t.strategy:hw;const e=t.useSpatialIndex!==void 0?t.useSpatialIndex:!0;this.featuresRtree_=e?new Qd:null,this.loadedExtentsRtree_=new Qd,this.loadingExtentsCount_=0,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null;let n,i;Array.isArray(t.features)?i=t.features:t.features&&(n=t.features,i=n.getArray()),!e&&n===void 0&&(n=new Xe(i)),i!==void 0&&this.addFeaturesInternal(i),n!==void 0&&this.bindFeaturesCollection_(n)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=dt(t);if(!this.addToIndex_(e,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(e,t);const n=t.getGeometry();if(n){const i=n.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(i,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new Zi(oe.ADDFEATURE,t))}setupChangeEvents_(t,e){e instanceof mi||(this.featureChangeKeys_[t]=[gt(e,ct.CHANGE,this.handleFeatureChange_,this),gt(e,An.PROPERTYCHANGE,this.handleFeatureChange_,this)])}addToIndex_(t,e){let n=!0;if(e.getId()!==void 0){const i=String(e.getId());if(!(i in this.idIndex_))this.idIndex_[i]=e;else if(e instanceof mi){const s=this.idIndex_[i];s instanceof mi?Array.isArray(s)?s.push(e):this.idIndex_[i]=[s,e]:n=!1}else n=!1}return n&&(mt(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),n}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],n=[],i=[];for(let s=0,a=t.length;s<a;s++){const h=t[s],c=dt(h);this.addToIndex_(c,h)&&n.push(h)}for(let s=0,a=n.length;s<a;s++){const h=n[s],c=dt(h);this.setupChangeEvents_(c,h);const d=h.getGeometry();if(d){const f=d.getExtent();e.push(f),i.push(h)}else this.nullGeometryFeatures_[c]=h}if(this.featuresRtree_&&this.featuresRtree_.load(e,i),this.hasListener(oe.ADDFEATURE))for(let s=0,a=n.length;s<a;s++)this.dispatchEvent(new Zi(oe.ADDFEATURE,n[s]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(oe.ADDFEATURE,function(n){e||(e=!0,t.push(n.feature),e=!1)}),this.addEventListener(oe.REMOVEFEATURE,function(n){e||(e=!0,t.remove(n.feature),e=!1)}),t.addEventListener(ue.ADD,n=>{e||(e=!0,this.addFeature(n.element),e=!1)}),t.addEventListener(ue.REMOVE,n=>{e||(e=!0,this.removeFeature(n.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const n in this.featureChangeKeys_)this.featureChangeKeys_[n].forEach(Tt);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){const n=i=>{this.removeFeatureInternal(i)};this.featuresRtree_.forEach(n);for(const i in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[i])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new Zi(oe.CLEAR);this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const n=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(n,function(i){const s=i.getGeometry();if(s instanceof mi||s.intersectsCoordinate(t))return e(i)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(n){const i=n.getGeometry();if(i instanceof mi||i.intersectsExtent(t)){const s=e(n);if(s)return s}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),on(this.nullGeometryFeatures_)||He(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(n){e.push(n)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=_m(t,e);return[].concat(...i.map(s=>this.featuresRtree_.getInExtent(s)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const n=t[0],i=t[1];let s=null;const a=[NaN,NaN];let h=1/0;const c=[-1/0,-1/0,1/0,1/0];return e=e||Lr,this.featuresRtree_.forEachInExtent(c,function(d){if(e(d)){const f=d.getGeometry(),p=h;if(h=f instanceof mi?0:f.closestPointXY(n,i,a,h),h<p){s=d;const m=Math.sqrt(h);c[0]=n-m,c[1]=i-m,c[2]=n+m,c[3]=i+m}}}),s}getExtent(t){return this.featuresRtree_.getExtent(t)}getFeatureById(t){const e=this.idIndex_[t.toString()];return e!==void 0?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return e!==void 0?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,n=dt(e),i=e.getGeometry();if(!i)n in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[n]=e);else{const a=i.getExtent();n in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[n],this.featuresRtree_&&this.featuresRtree_.insert(a,e)):this.featuresRtree_&&this.featuresRtree_.update(a,e)}const s=e.getId();if(s!==void 0){const a=s.toString();this.idIndex_[a]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[a]=e)}else this.removeFromIdIndex_(e),this.uidIndex_[n]=e;this.changed(),this.dispatchEvent(new Zi(oe.CHANGEFEATURE,e))}hasFeature(t){const e=t.getId();return e!==void 0?e in this.idIndex_:dt(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&on(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0}loadFeatures(t,e,n){const i=this.loadedExtentsRtree_,s=this.strategy_(t,e,n);for(let a=0,h=s.length;a<h;++a){const c=s[a];i.forEachInExtent(c,function(f){return hn(f.extent,c)})||(++this.loadingExtentsCount_,this.dispatchEvent(new Zi(oe.FEATURESLOADSTART)),this.loader_.call(this,c,e,n,f=>{--this.loadingExtentsCount_,this.dispatchEvent(new Zi(oe.FEATURESLOADEND,void 0,f))},()=>{--this.loadingExtentsCount_,this.dispatchEvent(new Zi(oe.FEATURESLOADERROR))}),i.insert(c,{extent:c.slice()}))}this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_;let n;e.forEachInExtent(t,function(i){if(Nn(i.extent,t))return n=i,!0}),n&&e.remove(n)}removeFeature(t){if(!t)return;const e=dt(t);e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t),this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=dt(t),n=this.featureChangeKeys_[e];if(!n)return;n.forEach(Tt),delete this.featureChangeKeys_[e];const i=t.getId();return i!==void 0&&delete this.idIndex_[i.toString()],delete this.uidIndex_[e],this.dispatchEvent(new Zi(oe.REMOVEFEATURE,t)),t}removeFromIdIndex_(t){let e=!1;for(const n in this.idIndex_){const i=this.idIndex_[n];if(t instanceof mi&&Array.isArray(i)&&i.includes(t))i.splice(i.indexOf(t),1);else if(this.idIndex_[n]===t){delete this.idIndex_[n],e=!0;break}}return e}setLoader(t){this.loader_=t}setUrl(t){mt(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(of(t,this.format_))}}const zo=dw;class fw{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=$d,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let n=e.dataProjection?zt(e.dataProjection):this.readProjection(t);e.extent&&n&&n.getUnits()==="tile-pixels"&&(n=zt(n),n.setWorldExtent(e.extent)),e={dataProjection:n,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return ot()}readFeature(t,e){return ot()}readFeatures(t,e){return ot()}readGeometry(t,e){return ot()}readProjection(t){return ot()}writeFeature(t,e){return ot()}writeFeatures(t,e){return ot()}writeGeometry(t,e){return ot()}}function eh(r,t,e){const n=e?zt(e.featureProjection):null,i=e?zt(e.dataProjection):null;let s=r;if(n&&i&&!dn(n,i)){t&&(s=r.clone());const a=t?n:i,h=t?i:n;a.getUnits()==="tile-pixels"?s.transform(a,h):s.applyTransform(Pr(a,h))}if(t&&e&&e.decimals!==void 0){const a=Math.pow(10,e.decimals),h=function(c){for(let d=0,f=c.length;d<f;++d)c[d]=Math.round(c[d]*a)/a;return c};s===r&&(s=r.clone()),s.applyTransform(h)}return s}const gw={Point:no,LineString:$l,Polygon:Oi,MultiPoint:nf,MultiLineString:aw,MultiPolygon:lw};function pw(r,t,e){return Array.isArray(t[0])?(ku(r,0,t,e)||(r=r.slice(),ll(r,0,t,e)),r):(al(r,0,t,e)||(r=r.slice(),so(r,0,t,e)),r)}function af(r,t){var s;const e=r.geometry;if(!e)return[];if(Array.isArray(e))return e.map(a=>af({...r,geometry:a})).flat();const n=e.type==="MultiPolygon"?"Polygon":e.type;if(n==="GeometryCollection"||n==="Circle")throw new Error("Unsupported geometry type: "+n);const i=e.layout.length;return eh(new mi(n,n==="Polygon"?pw(e.flatCoordinates,e.ends,i):e.flatCoordinates,(s=e.ends)==null?void 0:s.flat(),i,r.properties||{},r.id).enableSimplifyTransformed(),!1,t)}function ih(r,t){if(!r)return null;if(Array.isArray(r)){const n=r.map(i=>ih(i,t));return new sw(n)}const e=gw[r.type];return eh(new e(r.flatCoordinates,r.layout,r.ends),!1,t)}class _w extends fw{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(No(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(No(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return ot()}readFeaturesFromObject(t,e){return ot()}readGeometry(t,e){return this.readGeometryFromObject(No(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return ot()}readProjection(t){return this.readProjectionFromObject(No(t))}readProjectionFromObject(t){return ot()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return ot()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return ot()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return ot()}}function No(r){if(typeof r=="string"){const t=JSON.parse(r);return t||null}return r!==null?r:null}const mw=_w;class yw extends mw{constructor(t){t=t||{},super(),this.dataProjection=zt(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=zt(t.featureProjection)),t.featureClass&&(this.featureClass=t.featureClass),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let n=null;t.type==="Feature"?n=t:n={type:"Feature",geometry:t,properties:null};const i=nh(n.geometry);if(this.featureClass===mi)return af({geometry:i,id:n.id,properties:n.properties},e);const s=new $d;return this.geometryName_?s.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in n!==void 0&&s.setGeometryName(n.geometry_name),s.setGeometry(ih(i,e)),"id"in n&&s.setId(n.id),n.properties&&s.setProperties(n.properties,!0),s}readFeaturesFromObject(t,e){const n=t;let i=null;if(n.type==="FeatureCollection"){const s=t;i=[];const a=s.features;for(let h=0,c=a.length;h<c;++h){const d=this.readFeatureFromObject(a[h],e);d&&i.push(d)}}else i=[this.readFeatureFromObject(t,e)];return i.flat()}readGeometryFromObject(t,e){return vw(t,e)}readProjectionFromObject(t){const e=t.crs;let n;if(e)if(e.type=="name")n=zt(e.properties.name);else if(e.type==="EPSG")n=zt("EPSG:"+e.properties.code);else throw new Error("Unknown SRS type");else n=this.dataProjection;return n}writeFeatureObject(t,e){e=this.adaptOptions(e);const n={type:"Feature",geometry:null,properties:null},i=t.getId();if(i!==void 0&&(n.id=i),!t.hasProperties())return n;const s=t.getProperties(),a=t.getGeometry();return a&&(n.geometry=rh(a,e),delete s[t.getGeometryName()]),on(s)||(n.properties=s),n}writeFeaturesObject(t,e){e=this.adaptOptions(e);const n=[];for(let i=0,s=t.length;i<s;++i)n.push(this.writeFeatureObject(t[i],e));return{type:"FeatureCollection",features:n}}writeGeometryObject(t,e){return rh(t,this.adaptOptions(e))}}function nh(r,t){if(!r)return null;let e;switch(r.type){case"Point":{e=ww(r);break}case"LineString":{e=Ew(r);break}case"Polygon":{e=Tw(r);break}case"MultiPoint":{e=bw(r);break}case"MultiLineString":{e=Lw(r);break}case"MultiPolygon":{e=Cw(r);break}case"GeometryCollection":{e=xw(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return e}function vw(r,t){const e=nh(r);return ih(e,t)}function xw(r,t){return r.geometries.map(function(n){return nh(n)})}function ww(r){const t=r.coordinates;return{type:"Point",flatCoordinates:t,layout:pn(t.length)}}function Ew(r){const t=r.coordinates,e=t.flat();return{type:"LineString",flatCoordinates:e,ends:[e.length],layout:pn(t[0].length)}}function Lw(r){const t=r.coordinates,e=t[0][0].length,n=[],i=kr(n,0,t,e);return{type:"MultiLineString",flatCoordinates:n,ends:i,layout:pn(e)}}function bw(r){const t=r.coordinates;return{type:"MultiPoint",flatCoordinates:t.flat(),layout:pn(t[0].length)}}function Cw(r){const t=r.coordinates,e=[],n=t[0][0][0].length,i=wu(e,0,t,n);return{type:"MultiPolygon",flatCoordinates:e,ends:i,layout:pn(n)}}function Tw(r){const t=r.coordinates,e=[],n=t[0][0].length,i=kr(e,0,t,n);return{type:"Polygon",flatCoordinates:e,ends:i,layout:pn(n)}}function rh(r,t){r=eh(r,!0,t);const e=r.getType();let n;switch(e){case"Point":{n=Aw(r);break}case"LineString":{n=Sw(r);break}case"Polygon":{n=Iw(r,t);break}case"MultiPoint":{n=kw(r);break}case"MultiLineString":{n=Pw(r);break}case"MultiPolygon":{n=Rw(r,t);break}case"GeometryCollection":{n=Mw(r,t);break}case"Circle":{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+e)}return n}function Mw(r,t){return t=Object.assign({},t),delete t.featureProjection,{type:"GeometryCollection",geometries:r.getGeometriesArray().map(function(n){return rh(n,t)})}}function Sw(r,t){return{type:"LineString",coordinates:r.getCoordinates()}}function Pw(r,t){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function kw(r,t){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function Rw(r,t){let e;return t&&(e=t.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(e)}}function Aw(r,t){return{type:"Point",coordinates:r.getCoordinates()}}function Iw(r,t){let e;return t&&(e=t.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(e)}}const Bo=yw,Jr={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Go=[Jr.FILL],Wi=[Jr.STROKE],wn=[Jr.BEGIN_PATH],lf=[Jr.CLOSE_PATH],rt=Jr;class Dw{drawCustom(t,e,n,i){}drawGeometry(t){}setStyle(t){}drawCircle(t,e){}drawFeature(t,e){}drawGeometryCollection(t,e){}drawLineString(t,e){}drawMultiLineString(t,e){}drawMultiPoint(t,e){}drawMultiPolygon(t,e){}drawPoint(t,e){}drawPolygon(t,e){}drawText(t,e){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}}const hf=Dw;class Ow extends hf{constructor(t,e,n,i){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=i,this.maxLineWidth=0,this.resolution=n,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return e==1?t:t.map(function(n){return n*e})}appendFlatPointCoordinates(t,e){const n=this.getBufferedMaxExtent(),i=this.tmpCoordinate_,s=this.coordinates;let a=s.length;for(let h=0,c=t.length;h<c;h+=e)i[0]=t[h],i[1]=t[h+1],Ws(n,i)&&(s[a++]=i[0],s[a++]=i[1]);return a}appendFlatLineCoordinates(t,e,n,i,s,a){const h=this.coordinates;let c=h.length;const d=this.getBufferedMaxExtent();a&&(e+=i);let f=t[e],p=t[e+1];const m=this.tmpCoordinate_;let v=!0,E,C,M;for(E=e+i;E<n;E+=i)m[0]=t[E],m[1]=t[E+1],M=Oa(d,m),M!==C?(v&&(h[c++]=f,h[c++]=p,v=!1),h[c++]=m[0],h[c++]=m[1]):M===Wt.INTERSECTING?(h[c++]=m[0],h[c++]=m[1],v=!1):v=!0,f=m[0],p=m[1],C=M;return(s&&v||E===e+i)&&(h[c++]=f,h[c++]=p),c}drawCustomCoordinates_(t,e,n,i,s){for(let a=0,h=n.length;a<h;++a){const c=n[a],d=this.appendFlatLineCoordinates(t,e,c,i,!1,!1);s.push(d),e=c}return e}drawCustom(t,e,n,i){this.beginGeometry(t,e);const s=t.getType(),a=t.getStride(),h=this.coordinates.length;let c,d,f,p,m;switch(s){case"MultiPolygon":c=t.getOrientedFlatCoordinates(),p=[];const v=t.getEndss();m=0;for(let E=0,C=v.length;E<C;++E){const M=[];m=this.drawCustomCoordinates_(c,m,v[E],a,M),p.push(M)}this.instructions.push([rt.CUSTOM,h,p,t,n,il]),this.hitDetectionInstructions.push([rt.CUSTOM,h,p,t,i||n,il]);break;case"Polygon":case"MultiLineString":f=[],c=s=="Polygon"?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),m=this.drawCustomCoordinates_(c,0,t.getEnds(),a,f),this.instructions.push([rt.CUSTOM,h,f,t,n,Rr]),this.hitDetectionInstructions.push([rt.CUSTOM,h,f,t,i||n,Rr]);break;case"LineString":case"Circle":c=t.getFlatCoordinates(),d=this.appendFlatLineCoordinates(c,0,c.length,a,!1,!1),this.instructions.push([rt.CUSTOM,h,d,t,n,Di]),this.hitDetectionInstructions.push([rt.CUSTOM,h,d,t,i||n,Di]);break;case"MultiPoint":c=t.getFlatCoordinates(),d=this.appendFlatPointCoordinates(c,a),d>h&&(this.instructions.push([rt.CUSTOM,h,d,t,n,Di]),this.hitDetectionInstructions.push([rt.CUSTOM,h,d,t,i||n,Di]));break;case"Point":c=t.getFlatCoordinates(),this.coordinates.push(c[0],c[1]),d=this.coordinates.length,this.instructions.push([rt.CUSTOM,h,d,t,n]),this.hitDetectionInstructions.push([rt.CUSTOM,h,d,t,i||n]);break}this.endGeometry(e)}beginGeometry(t,e){this.beginGeometryInstruction1_=[rt.BEGIN_GEOMETRY,e,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[rt.BEGIN_GEOMETRY,e,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;t.reverse();let e;const n=t.length;let i,s,a=-1;for(e=0;e<n;++e)i=t[e],s=i[0],s==rt.END_GEOMETRY?a=e:s==rt.BEGIN_GEOMETRY&&(i[2]=e,K_(this.hitDetectionInstructions,a,e),a=-1)}setFillStrokeStyle(t,e){const n=this.state;if(t){const i=t.getColor();n.fillStyle=Ye(i||de)}else n.fillStyle=void 0;if(e){const i=e.getColor();n.strokeStyle=Ye(i||Nr);const s=e.getLineCap();n.lineCap=s!==void 0?s:Un;const a=e.getLineDash();n.lineDash=a?a.slice():ci;const h=e.getLineDashOffset();n.lineDashOffset=h||ui;const c=e.getLineJoin();n.lineJoin=c!==void 0?c:jn;const d=e.getWidth();n.lineWidth=d!==void 0?d:Gr;const f=e.getMiterLimit();n.miterLimit=f!==void 0?f:zr,n.lineWidth>this.maxLineWidth&&(this.maxLineWidth=n.lineWidth,this.bufferedMaxExtent_=null)}else n.strokeStyle=void 0,n.lineCap=void 0,n.lineDash=null,n.lineDashOffset=void 0,n.lineJoin=void 0,n.lineWidth=void 0,n.miterLimit=void 0}createFill(t){const e=t.fillStyle,n=[rt.SET_FILL_STYLE,e];return typeof e!="string"&&n.push(!0),n}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[rt.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const n=t.fillStyle;(typeof n!="string"||t.currentFillStyle!=n)&&(n!==void 0&&this.instructions.push(e.call(this,t)),t.currentFillStyle=n)}updateStrokeStyle(t,e){const n=t.strokeStyle,i=t.lineCap,s=t.lineDash,a=t.lineDashOffset,h=t.lineJoin,c=t.lineWidth,d=t.miterLimit;(t.currentStrokeStyle!=n||t.currentLineCap!=i||s!=t.currentLineDash&&!li(t.currentLineDash,s)||t.currentLineDashOffset!=a||t.currentLineJoin!=h||t.currentLineWidth!=c||t.currentMiterLimit!=d)&&(n!==void 0&&e.call(this,t),t.currentStrokeStyle=n,t.currentLineCap=i,t.currentLineDash=s,t.currentLineDashOffset=a,t.currentLineJoin=h,t.currentLineWidth=c,t.currentMiterLimit=d)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[rt.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=Uc(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;Zs(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}}const Qr=Ow;class Fw extends Qr{constructor(t,e,n,i){super(t,e,n,i),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),i=t.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(n,i);this.instructions.push([rt.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([rt.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e){if(!this.image_)return;this.beginGeometry(t,e);const n=t.getFlatCoordinates(),i=t.getStride(),s=this.coordinates.length,a=this.appendFlatPointCoordinates(n,i);this.instructions.push([rt.DRAW_IMAGE,s,a,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([rt.DRAW_IMAGE,s,a,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const n=t.getAnchor(),i=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=n[0],this.anchorY_=n[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=i[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=i[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}const zw=Fw;class Nw extends Qr{constructor(t,e,n,i){super(t,e,n,i)}drawFlatCoordinates_(t,e,n,i){const s=this.coordinates.length,a=this.appendFlatLineCoordinates(t,e,n,i,!1,!1),h=[rt.MOVE_TO_LINE_TO,s,a];return this.instructions.push(h),this.hitDetectionInstructions.push(h),n}drawLineString(t,e){const n=this.state,i=n.strokeStyle,s=n.lineWidth;if(i===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui],wn);const a=t.getFlatCoordinates(),h=t.getStride();this.drawFlatCoordinates_(a,0,a.length,h),this.hitDetectionInstructions.push(Wi),this.endGeometry(e)}drawMultiLineString(t,e){const n=this.state,i=n.strokeStyle,s=n.lineWidth;if(i===void 0||s===void 0)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e),this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui],wn);const a=t.getEnds(),h=t.getFlatCoordinates(),c=t.getStride();let d=0;for(let f=0,p=a.length;f<p;++f)d=this.drawFlatCoordinates_(h,d,a[f],c);this.hitDetectionInstructions.push(Wi),this.endGeometry(e)}finish(){const t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Wi),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Wi),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(wn)}}const Bw=Nw;class Gw extends Qr{constructor(t,e,n,i){super(t,e,n,i)}drawFlatCoordinatess_(t,e,n,i){const s=this.state,a=s.fillStyle!==void 0,h=s.strokeStyle!==void 0,c=n.length;this.instructions.push(wn),this.hitDetectionInstructions.push(wn);for(let d=0;d<c;++d){const f=n[d],p=this.coordinates.length,m=this.appendFlatLineCoordinates(t,e,f,i,!0,!h),v=[rt.MOVE_TO_LINE_TO,p,m];this.instructions.push(v),this.hitDetectionInstructions.push(v),h&&(this.instructions.push(lf),this.hitDetectionInstructions.push(lf)),e=f}return a&&(this.instructions.push(Go),this.hitDetectionInstructions.push(Go)),h&&(this.instructions.push(Wi),this.hitDetectionInstructions.push(Wi)),e}drawCircle(t,e){const n=this.state,i=n.fillStyle,s=n.strokeStyle;if(i===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_FILL_STYLE,de]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui]);const a=t.getFlatCoordinates(),h=t.getStride(),c=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,h,!1,!1);const d=[rt.CIRCLE,c];this.instructions.push(wn,d),this.hitDetectionInstructions.push(wn,d),n.fillStyle!==void 0&&(this.instructions.push(Go),this.hitDetectionInstructions.push(Go)),n.strokeStyle!==void 0&&(this.instructions.push(Wi),this.hitDetectionInstructions.push(Wi)),this.endGeometry(e)}drawPolygon(t,e){const n=this.state,i=n.fillStyle,s=n.strokeStyle;if(i===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_FILL_STYLE,de]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui]);const a=t.getEnds(),h=t.getOrientedFlatCoordinates(),c=t.getStride();this.drawFlatCoordinatess_(h,0,a,c),this.endGeometry(e)}drawMultiPolygon(t,e){const n=this.state,i=n.fillStyle,s=n.strokeStyle;if(i===void 0&&s===void 0)return;this.setFillStrokeStyles_(),this.beginGeometry(t,e),n.fillStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_FILL_STYLE,de]),n.strokeStyle!==void 0&&this.hitDetectionInstructions.push([rt.SET_STROKE_STYLE,n.strokeStyle,n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,ci,ui]);const a=t.getEndss(),h=t.getOrientedFlatCoordinates(),c=t.getStride();let d=0;for(let f=0,p=a.length;f<p;++f)d=this.drawFlatCoordinatess_(h,d,a[f],c);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(t!==0){const e=this.coordinates;for(let n=0,i=e.length;n<i;++n)e[n]=_n(e[n],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;t.fillStyle!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)}}const cf=Gw;function Uw(r,t,e,n,i){const s=[];let a=e,h=0,c=t.slice(e,2);for(;h<r&&a+i<n;){const[d,f]=c.slice(-2),p=t[a+i],m=t[a+i+1],v=Math.sqrt((p-d)*(p-d)+(m-f)*(m-f));if(h+=v,h>=r){const E=(r-h+v)/v,C=Ee(d,p,E),M=Ee(f,m,E);c.push(C,M),s.push(c),c=[C,M],h==r&&(a+=i),h=0}else if(h<r)c.push(t[a+i],t[a+i+1]),a+=i;else{const E=v-h,C=Ee(d,p,E/v),M=Ee(f,m,E/v);c.push(C,M),s.push(c),c=[C,M],h=0,a+=i}}return h>0&&s.push(c),s}function jw(r,t,e,n,i){let s=e,a=e,h=0,c=0,d=e,f,p,m,v,E,C,M,S,y,x;for(p=e;p<n;p+=i){const b=t[p],T=t[p+1];E!==void 0&&(y=b-E,x=T-C,v=Math.sqrt(y*y+x*x),M!==void 0&&(c+=m,f=Math.acos((M*y+S*x)/(m*v)),f>r&&(c>h&&(h=c,s=d,a=p),c=0,d=p-i)),m=v,M=y,S=x),E=b,C=T}return c+=v,c>h?[d,p]:[s,a]}const Uo={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1};class Zw extends Qr{constructor(t,e,n,i){super(t,e,n,i),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates[de]={fillStyle:de},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e){const n=this.textFillState_,i=this.textStrokeState_,s=this.textState_;if(this.text_===""||!s||!n&&!i)return;const a=this.coordinates;let h=a.length;const c=t.getType();let d=null,f=t.getStride();if(s.placement==="line"&&(c=="LineString"||c=="MultiLineString"||c=="Polygon"||c=="MultiPolygon")){if(!ce(this.getBufferedMaxExtent(),t.getExtent()))return;let p;if(d=t.getFlatCoordinates(),c=="LineString")p=[d.length];else if(c=="MultiLineString")p=t.getEnds();else if(c=="Polygon")p=t.getEnds().slice(0,1);else if(c=="MultiPolygon"){const C=t.getEndss();p=[];for(let M=0,S=C.length;M<S;++M)p.push(C[M][0])}this.beginGeometry(t,e);const m=s.repeat,v=m?void 0:s.textAlign;let E=0;for(let C=0,M=p.length;C<M;++C){let S;m?S=Uw(m*this.resolution,d,E,p[C],f):S=[d.slice(E,p[C])];for(let y=0,x=S.length;y<x;++y){const b=S[y];let T=0,k=b.length;if(v==null){const I=jw(s.maxAngle,b,0,b.length,2);T=I[0],k=I[1]}for(let I=T;I<k;I+=f)a.push(b[I],b[I+1]);const R=a.length;E=p[C],this.drawChars_(h,R),h=R}}this.endGeometry(e)}else{let p=s.overflow?null:[];switch(c){case"Point":case"MultiPoint":d=t.getFlatCoordinates();break;case"LineString":d=t.getFlatMidpoint();break;case"Circle":d=t.getCenter();break;case"MultiLineString":d=t.getFlatMidpoints(),f=2;break;case"Polygon":d=t.getFlatInteriorPoint(),s.overflow||p.push(d[2]/this.resolution),f=3;break;case"MultiPolygon":const S=t.getFlatInteriorPoints();d=[];for(let y=0,x=S.length;y<x;y+=3)s.overflow||p.push(S[y+2]/this.resolution),d.push(S[y],S[y+1]);if(d.length===0)return;f=2;break}const m=this.appendFlatPointCoordinates(d,f);if(m===h)return;if(p&&(m-h)/2!==d.length/f){let S=h/2;p=p.filter((y,x)=>{const b=a[(S+x)*2]===d[x*f]&&a[(S+x)*2+1]===d[x*f+1];return b||--S,b})}this.saveTextStates_(),(s.backgroundFill||s.backgroundStroke)&&(this.setFillStrokeStyle(s.backgroundFill,s.backgroundStroke),s.backgroundFill&&this.updateFillStyle(this.state,this.createFill),s.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,e);let v=s.padding;if(v!=yn&&(s.scale[0]<0||s.scale[1]<0)){let S=s.padding[0],y=s.padding[1],x=s.padding[2],b=s.padding[3];s.scale[0]<0&&(y=-y,b=-b),s.scale[1]<0&&(S=-S,x=-x),v=[S,y,x,b]}const E=this.pixelRatio;this.instructions.push([rt.DRAW_IMAGE,h,m,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,void 0,this.declutterImageWithText_,v==yn?yn:v.map(function(S){return S*E}),!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,p]);const C=1/E,M=this.state.fillStyle;s.backgroundFill&&(this.state.fillStyle=de,this.hitDetectionInstructions.push(this.createFill(this.state))),this.hitDetectionInstructions.push([rt.DRAW_IMAGE,h,m,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[C,C],NaN,void 0,this.declutterImageWithText_,v,!!s.backgroundFill,!!s.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?de:this.fillKey_,this.textOffsetX_,this.textOffsetY_,p]),s.backgroundFill&&(this.state.fillStyle=M,this.hitDetectionInstructions.push(this.createFill(this.state))),this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,n=this.textFillState_,i=this.strokeKey_;t&&(i in this.strokeStates||(this.strokeStates[i]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||Br,justify:e.justify,textBaseline:e.textBaseline||_o,scale:e.scale});const a=this.fillKey_;n&&(a in this.fillStates||(this.fillStates[a]={fillStyle:n.fillStyle}))}drawChars_(t,e){const n=this.textStrokeState_,i=this.textState_,s=this.strokeKey_,a=this.textKey_,h=this.fillKey_;this.saveTextStates_();const c=this.pixelRatio,d=Uo[i.textBaseline],f=this.textOffsetY_*c,p=this.text_,m=n?n.lineWidth*Math.abs(i.scale[0])/2:0;this.instructions.push([rt.DRAW_CHARS,t,e,d,i.overflow,h,i.maxAngle,c,f,s,m*c,p,a,1]),this.hitDetectionInstructions.push([rt.DRAW_CHARS,t,e,d,i.overflow,h&&de,i.maxAngle,c,f,s,m*c,p,a,1/c])}setTextStyle(t,e){let n,i,s;if(!t)this.text_="";else{const a=t.getFill();a?(i=this.textFillState_,i||(i={},this.textFillState_=i),i.fillStyle=Ye(a.getColor()||de)):(i=null,this.textFillState_=i);const h=t.getStroke();if(!h)s=null,this.textStrokeState_=s;else{s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const E=h.getLineDash(),C=h.getLineDashOffset(),M=h.getWidth(),S=h.getMiterLimit();s.lineCap=h.getLineCap()||Un,s.lineDash=E?E.slice():ci,s.lineDashOffset=C===void 0?ui:C,s.lineJoin=h.getLineJoin()||jn,s.lineWidth=M===void 0?Gr:M,s.miterLimit=S===void 0?zr:S,s.strokeStyle=Ye(h.getColor()||Nr)}n=this.textState_;const c=t.getFont()||Xu;Py(c);const d=t.getScaleArray();n.overflow=t.getOverflow(),n.font=c,n.maxAngle=t.getMaxAngle(),n.placement=t.getPlacement(),n.textAlign=t.getTextAlign(),n.repeat=t.getRepeat(),n.justify=t.getJustify(),n.textBaseline=t.getTextBaseline()||_o,n.backgroundFill=t.getBackgroundFill(),n.backgroundStroke=t.getBackgroundStroke(),n.padding=t.getPadding()||yn,n.scale=d===void 0?[1,1]:d;const f=t.getOffsetX(),p=t.getOffsetY(),m=t.getRotateWithView(),v=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=f===void 0?0:f,this.textOffsetY_=p===void 0?0:p,this.textRotateWithView_=m===void 0?!1:m,this.textRotation_=v===void 0?0:v,this.strokeKey_=s?(typeof s.strokeStyle=="string"?s.strokeStyle:dt(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=n.font+n.scale+(n.textAlign||"?")+(n.repeat||"?")+(n.justify||"?")+(n.textBaseline||"?"),this.fillKey_=i?typeof i.fillStyle=="string"?i.fillStyle:"|"+dt(i.fillStyle):""}this.declutterImageWithText_=e}}const Ww={Circle:cf,Default:Qr,Image:zw,LineString:Bw,Polygon:cf,Text:Zw};class Hw{constructor(t,e,n,i){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=i,this.resolution_=n,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const n=this.buildersByZIndex_[e];for(const i in n){const s=n[i].finish();t[e][i]=s}}return t}getBuilder(t,e){const n=t!==void 0?t.toString():"0";let i=this.buildersByZIndex_[n];i===void 0&&(i={},this.buildersByZIndex_[n]=i);let s=i[e];if(s===void 0){const a=Ww[e];s=new a(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[e]=s}return s}}const uf=Hw;function Vw(r,t,e,n,i,s,a,h,c,d,f,p){let m=r[t],v=r[t+1],E=0,C=0,M=0,S=0;function y(){E=m,C=v,t+=n,m=r[t],v=r[t+1],S+=M,M=Math.sqrt((m-E)*(m-E)+(v-C)*(v-C))}do y();while(t<e-n&&S+M<s);let x=M===0?0:(s-S)/M;const b=Ee(E,m,x),T=Ee(C,v,x),k=t-n,R=S,I=s+h*c(d,i,f);for(;t<e-n&&S+M<I;)y();x=M===0?0:(I-S)/M;const z=Ee(E,m,x),G=Ee(C,v,x);let j;if(p){const V=[b,T,z,G];_u(V,0,4,2,p,V,V),j=V[0]>V[2]}else j=b>z;const W=Math.PI,Y=[],$=k+n===t;t=k,M=0,S=R,m=r[t],v=r[t+1];let K;if($){y(),K=Math.atan2(v-C,m-E),j&&(K+=K>0?-W:W);const V=(z+b)/2,Z=(G+T)/2;return Y[0]=[V,Z,(I-s)/2,K,i],Y}i=i.replace(/\n/g," ");for(let V=0,Z=i.length;V<Z;){y();let U=Math.atan2(v-C,m-E);if(j&&(U+=U>0?-W:W),K!==void 0){let et=U-K;if(et+=et>W?-2*W:et<-W?2*W:0,Math.abs(et)>a)return null}K=U;const xt=V;let H=0;for(;V<Z;++V){const et=j?Z-V-1:V,it=h*c(d,i[et],f);if(t+n<e&&S+M<s+H+it/2)break;H+=it}if(V===xt)continue;const at=j?i.substring(Z-xt,Z-V):i.substring(xt,V);x=M===0?0:(s+H/2-S)/M;const F=Ee(E,m,x),wt=Ee(C,v,x);Y.push([F,wt,H/2,U,at]),s+=H}return Y}const nr=xe(),Hi=[],yi=[],vi=[],Vi=[];function df(r){return r[3].declutterBox}const ff=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function sh(r,t){return t==="start"?t=ff.test(r)?"right":"left":t==="end"&&(t=ff.test(r)?"left":"right"),Uo[t]}function Xw(r,t,e){return e>0&&r.push(`
462
462
  `,""),r.push(t,""),r}class Yw{constructor(t,e,n,i){this.overlaps=n,this.pixelRatio=e,this.resolution=t,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=Ht(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}createLabel(t,e,n,i){const s=t+e+n+i;if(this.labels_[s])return this.labels_[s];const a=i?this.strokeStates[i]:null,h=n?this.fillStates[n]:null,c=this.textStates[e],d=this.pixelRatio,f=[c.scale[0]*d,c.scale[1]*d],p=Array.isArray(t),m=c.justify?Uo[c.justify]:sh(Array.isArray(t)?t[0]:t,c.textAlign||Br),v=i&&a.lineWidth?a.lineWidth:0,E=p?t:t.split(`
463
- `).reduce(Xw,[]),{width:b,height:M,widths:S,heights:y,lineWidths:x}=Ry(c,E),C=b+v,T=[],k=(C+2)*f[0],R=(M+v)*f[1],I={width:k<0?Math.floor(k):Math.ceil(k),height:R<0?Math.floor(R):Math.ceil(R),contextInstructions:T};(f[0]!=1||f[1]!=1)&&T.push("scale",f),i&&(T.push("strokeStyle",a.strokeStyle),T.push("lineWidth",v),T.push("lineCap",a.lineCap),T.push("lineJoin",a.lineJoin),T.push("miterLimit",a.miterLimit),T.push("setLineDash",[a.lineDash]),T.push("lineDashOffset",a.lineDashOffset)),n&&T.push("fillStyle",h.fillStyle),T.push("textBaseline","middle"),T.push("textAlign","center");const z=.5-m;let G=m*C+z*v;const j=[],W=[];let Y=0,$=0,K=0,V=0,Z;for(let U=0,xt=E.length;U<xt;U+=2){const H=E[U];if(H===`
464
- `){$+=Y,Y=0,G=m*C+z*v,++V;continue}const at=E[U+1]||c.font;at!==Z&&(i&&j.push("font",at),n&&W.push("font",at),Z=at),Y=Math.max(Y,y[K]);const F=[H,G+z*S[K]+m*(S[K]-x[V]),.5*(v+Y)+$];G+=S[K],i&&j.push("strokeText",F),n&&W.push("fillText",F),++K}return Array.prototype.push.apply(T,j),Array.prototype.push.apply(T,W),this.labels_[s]=I,I}replayTextBackground_(t,e,n,i,s,a,h){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,s),t.lineTo.apply(t,e),a&&(this.alignFill_=a[2],this.fill_(t)),h&&(this.setStrokeStyle_(t,h),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,i,s,a,h,c,d,f,p,m,v,E,b,M){h*=m[0],c*=m[1];let S=n-h,y=i-c;const x=s+d>t?t-d:s,C=a+f>e?e-f:a,T=E[3]+x*m[0]+E[1],k=E[0]+C*m[1]+E[2],R=S-E[3],I=y-E[0];(b||p!==0)&&(Hi[0]=R,Vi[0]=R,Hi[1]=I,yi[1]=I,yi[0]=R+T,vi[0]=yi[0],vi[1]=I+k,Vi[1]=vi[1]);let z;return p!==0?(z=Ie(Ht(),n,i,1,1,p,-n,-i),Nt(z,Hi),Nt(z,yi),Nt(z,vi),Nt(z,Vi),ki(Math.min(Hi[0],yi[0],vi[0],Vi[0]),Math.min(Hi[1],yi[1],vi[1],Vi[1]),Math.max(Hi[0],yi[0],vi[0],Vi[0]),Math.max(Hi[1],yi[1],vi[1],Vi[1]),nr)):ki(Math.min(R,R+T),Math.min(I,I+k),Math.max(R,R+T),Math.max(I,I+k),nr),v&&(S=Math.round(S),y=Math.round(y)),{drawImageX:S,drawImageY:y,drawImageW:x,drawImageH:C,originX:d,originY:f,declutterBox:{minX:nr[0],minY:nr[1],maxX:nr[2],maxY:nr[3],value:M},canvasTransform:z,scale:m}}replayImageOrLabel_(t,e,n,i,s,a,h){const c=!!(a||h),d=i.declutterBox,f=t.canvas,p=h?h[2]*i.scale[0]/2:0;return d.minX-p<=f.width/e&&d.maxX+p>=0&&d.minY-p<=f.height/e&&d.maxY+p>=0&&(c&&this.replayTextBackground_(t,Hi,yi,vi,Vi,a,h),Ay(t,i.canvasTransform,s,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0}fill_(t){if(this.alignFill_){const e=Nt(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,i){const s=this.textStates[e],a=this.createLabel(t,e,i,n),h=this.strokeStates[n],c=this.pixelRatio,d=sh(Array.isArray(t)?t[0]:t,s.textAlign||Br),f=Uo[s.textBaseline||_o],p=h&&h.lineWidth?h.lineWidth:0,m=a.width/c-2*s.scale[0],v=d*m+2*(.5-d)*p,E=f*a.height/c+2*(.5-f)*p;return{label:a,anchorX:v,anchorY:E}}execute_(t,e,n,i,s,a,h,c){let d;this.pixelCoordinates_&&li(n,this.renderedTransform_)?d=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),d=Ii(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Bm(this.renderedTransform_,n));let f=0;const p=i.length;let m=0,v,E,b,M,S,y,x,C,T,k,R,I,z=0,G=0,j=null,W=null;const Y=this.coordinateCache_,$=this.viewRotation_,K=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,V={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:$},Z=this.instructions!=i||this.overlaps?0:200;let U,xt,H,at;for(;f<p;){const F=i[f];switch(F[0]){case rt.BEGIN_GEOMETRY:U=F[1],at=F[3],U.getGeometry()?h!==void 0&&!ce(h,at.getExtent())?f=F[2]+1:++f:f=F[2];break;case rt.BEGIN_PATH:z>Z&&(this.fill_(t),z=0),G>Z&&(t.stroke(),G=0),!z&&!G&&(t.beginPath(),M=NaN,S=NaN),++f;break;case rt.CIRCLE:m=F[1];const et=d[m],it=d[m+1],ht=d[m+2],kt=d[m+3],Xt=ht-et,Te=kt-it,Qe=Math.sqrt(Xt*Xt+Te*Te);t.moveTo(et+Qe,it),t.arc(et,it,Qe,0,2*Math.PI,!0),++f;break;case rt.CLOSE_PATH:t.closePath(),++f;break;case rt.CUSTOM:m=F[1],v=F[2];const Xi=F[3],Me=F[4],Yi=F.length==6?F[5]:void 0;V.geometry=Xi,V.feature=U,f in Y||(Y[f]=[]);const $e=Y[f];Yi?Yi(d,m,v,2,$e):($e[0]=d[m],$e[1]=d[m+1],$e.length=2),Me($e,V),++f;break;case rt.DRAW_IMAGE:m=F[1],v=F[2],C=F[3],E=F[4],b=F[5];let Ki=F[6];const Fe=F[7],qi=F[8],wi=F[9],rr=F[10];let Ei=F[11];const En=F[12];let qt=F[13];const ae=F[14],be=F[15];if(!C&&F.length>=20){T=F[19],k=F[20],R=F[21],I=F[22];const le=this.drawLabelWithPointPlacement_(T,k,R,I);C=le.label,F[3]=C;const en=F[23];E=(le.anchorX-en)*this.pixelRatio,F[4]=E;const pe=F[24];b=(le.anchorY-pe)*this.pixelRatio,F[5]=b,Ki=C.height,F[6]=Ki,qt=C.width,F[13]=qt}let ze;F.length>25&&(ze=F[25]);let ti,ei,Ne;F.length>17?(ti=F[16],ei=F[17],Ne=F[18]):(ti=yn,ei=!1,Ne=!1),rr&&K?Ei+=$:!rr&&!K&&(Ei-=$);let Ji=0;for(;m<v;m+=2){if(ze&&ze[Ji++]<qt/this.pixelRatio)continue;const le=this.calculateImageOrLabelDimensions_(C.width,C.height,d[m],d[m+1],qt,Ki,E,b,qi,wi,Ei,En,s,ti,ei||Ne,U),en=[t,e,C,le,Fe,ei?j:null,Ne?W:null];if(c){if(ae==="none")continue;if(ae==="obstacle"){c.insert(le.declutterBox);continue}else{let pe,Be;if(be){const Jt=v-m;if(!be[Jt]){be[Jt]=en;continue}if(pe=be[Jt],delete be[Jt],Be=df(pe),c.collides(Be))continue}if(c.collides(le.declutterBox))continue;pe&&(c.insert(Be),this.replayImageOrLabel_.apply(this,pe)),c.insert(le.declutterBox)}}this.replayImageOrLabel_.apply(this,en)}++f;break;case rt.DRAW_CHARS:const Ln=F[1],Yt=F[2],$r=F[3],jo=F[4];I=F[5];const ts=F[6],es=F[7],Zo=F[8];R=F[9];const Li=F[10];T=F[11],k=F[12];const Wo=[F[13],F[13]],is=this.textStates[k],Qi=is.font,$i=[is.scale[0]*es,is.scale[1]*es];let tn;Qi in this.widths_?tn=this.widths_[Qi]:(tn={},this.widths_[Qi]=tn);const Ho=ef(d,Ln,Yt,2),Vo=Math.abs($i[0])*Ku(Qi,T,tn);if(jo||Vo<=Ho){const le=this.textStates[k].textAlign,en=(Ho-Vo)*sh(T,le),pe=Vw(d,Ln,Yt,2,T,en,ts,Math.abs($i[0]),Ku,Qi,tn,K?0:this.viewRotation_);t:if(pe){const Be=[];let Jt,sr,or,se,_e;if(R)for(Jt=0,sr=pe.length;Jt<sr;++Jt){_e=pe[Jt],or=_e[4],se=this.createLabel(or,k,"",R),E=_e[2]+($i[0]<0?-Li:Li),b=$r*se.height+(.5-$r)*2*Li*$i[1]/$i[0]-Zo;const Bt=this.calculateImageOrLabelDimensions_(se.width,se.height,_e[0],_e[1],se.width,se.height,E,b,0,0,_e[3],Wo,!1,yn,!1,U);if(c&&c.collides(Bt.declutterBox))break t;Be.push([t,e,se,Bt,1,null,null])}if(I)for(Jt=0,sr=pe.length;Jt<sr;++Jt){_e=pe[Jt],or=_e[4],se=this.createLabel(or,k,I,""),E=_e[2],b=$r*se.height-Zo;const Bt=this.calculateImageOrLabelDimensions_(se.width,se.height,_e[0],_e[1],se.width,se.height,E,b,0,0,_e[3],Wo,!1,yn,!1,U);if(c&&c.collides(Bt.declutterBox))break t;Be.push([t,e,se,Bt,1,null,null])}c&&c.load(Be.map(df));for(let Bt=0,J=Be.length;Bt<J;++Bt)this.replayImageOrLabel_.apply(this,Be[Bt])}}++f;break;case rt.END_GEOMETRY:if(a!==void 0){U=F[1];const le=a(U,at);if(le)return le}++f;break;case rt.FILL:Z?z++:this.fill_(t),++f;break;case rt.MOVE_TO_LINE_TO:for(m=F[1],v=F[2],xt=d[m],H=d[m+1],y=xt+.5|0,x=H+.5|0,(y!==M||x!==S)&&(t.moveTo(xt,H),M=y,S=x),m+=2;m<v;m+=2)xt=d[m],H=d[m+1],y=xt+.5|0,x=H+.5|0,(m==v-2||y!==M||x!==S)&&(t.lineTo(xt,H),M=y,S=x);++f;break;case rt.SET_FILL_STYLE:j=F,this.alignFill_=F[2],z&&(this.fill_(t),z=0,G&&(t.stroke(),G=0)),t.fillStyle=F[1],++f;break;case rt.SET_STROKE_STYLE:W=F,G&&(t.stroke(),G=0),this.setStrokeStyle_(t,F),++f;break;case rt.STROKE:Z?G++:t.stroke(),++f;break;default:++f;break}}z&&this.fill_(t),G&&t.stroke()}execute(t,e,n,i,s,a){this.viewRotation_=i,this.execute_(t,e,n,this.instructions,s,void 0,void 0,a)}executeHitDetection(t,e,n,i,s){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,s)}}const Kw=Yw,oh=["Polygon","Circle","LineString","Image","Text","Default"];class qw{constructor(t,e,n,i,s,a){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ht(),this.createExecutors_(s)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t){for(const e in t){let n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);const i=t[e];for(const s in i){const a=i[s];n[s]=new Kw(this.resolution_,this.pixelRatio_,this.overlaps_,a)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let i=0,s=t.length;i<s;++i)if(t[i]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,i,s,a){i=Math.round(i);const h=i*2+1,c=Ie(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-n,-t[0],-t[1]),d=!this.hitDetectionContext_;d&&(this.hitDetectionContext_=ee(h,h,void 0,{willReadFrequently:!0}));const f=this.hitDetectionContext_;f.canvas.width!==h||f.canvas.height!==h?(f.canvas.width=h,f.canvas.height=h):d||f.clearRect(0,0,h,h);let p;this.renderBuffer_!==void 0&&(p=xe(),Mr(p,t),Zs(p,e*(this.renderBuffer_+i),p));const m=Jw(i);let v;function E(T,k){const R=f.getImageData(0,0,h,h).data;for(let I=0,z=m.length;I<z;I++)if(R[m[I]]>0){if(!a||v!=="Image"&&v!=="Text"||a.includes(T)){const G=(m[I]-3)/4,j=i-G%h,W=i-(G/h|0),Y=s(T,k,j*j+W*W);if(Y)return Y}f.clearRect(0,0,h,h);break}}const b=Object.keys(this.executorsByZIndex_).map(Number);b.sort(Pi);let M,S,y,x,C;for(M=b.length-1;M>=0;--M){const T=b[M].toString();for(y=this.executorsByZIndex_[T],S=oh.length-1;S>=0;--S)if(v=oh[S],x=y[v],x!==void 0&&(C=x.executeHitDetection(f,c,n,E,p),C))return C}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],i=e[1],s=e[2],a=e[3],h=[n,i,n,a,s,a,s,i];return Ii(h,0,8,2,t,h),h}isEmpty(){return on(this.executorsByZIndex_)}execute(t,e,n,i,s,a,h){const c=Object.keys(this.executorsByZIndex_).map(Number);c.sort(Pi),this.maxExtent_&&(t.save(),this.clip(t,n)),a=a||oh;let d,f,p,m,v,E;for(h&&c.reverse(),d=0,f=c.length;d<f;++d){const b=c[d].toString();for(v=this.executorsByZIndex_[b],p=0,m=a.length;p<m;++p){const M=a[p];E=v[M],E!==void 0&&E.execute(t,e,n,i,s,h)}}this.maxExtent_&&t.restore()}}const ah={};function Jw(r){if(ah[r]!==void 0)return ah[r];const t=r*2+1,e=r*r,n=new Array(e+1);for(let s=0;s<=r;++s)for(let a=0;a<=r;++a){const h=s*s+a*a;if(h>e)break;let c=n[h];c||(c=[],n[h]=c),c.push(((r+s)*t+(r+a))*4+3),s>0&&c.push(((r-s)*t+(r+a))*4+3),a>0&&(c.push(((r+s)*t+(r-a))*4+3),s>0&&c.push(((r-s)*t+(r-a))*4+3))}const i=[];for(let s=0,a=n.length;s<a;++s)n[s]&&i.push(...n[s]);return ah[r]=i,i}const gf=qw;class Qw extends hf{constructor(t,e,n,i,s,a,h){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=i,this.transformRotation_=i?Ga(Math.atan2(i[1],i[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=a,this.userTransform_=h,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Ht()}drawImages_(t,e,n,i){if(!this.image_)return;const s=Ii(t,e,n,i,this.transform_,this.pixelCoordinates_),a=this.context_,h=this.tmpLocalTransform_,c=a.globalAlpha;this.imageOpacity_!=1&&(a.globalAlpha=c*this.imageOpacity_);let d=this.imageRotation_;this.transformRotation_===0&&(d-=this.viewRotation_),this.imageRotateWithView_&&(d+=this.viewRotation_);for(let f=0,p=s.length;f<p;f+=2){const m=s[f]-this.imageAnchorX_,v=s[f+1]-this.imageAnchorY_;if(d!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const E=m+this.imageAnchorX_,b=v+this.imageAnchorY_;Ie(h,E,b,1,1,d,-E,-b),a.save(),a.transform.apply(a,h),a.translate(E,b),a.scale(this.imageScale_[0],this.imageScale_[1]),a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),a.restore()}else a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,m,v,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(a.globalAlpha=c)}drawText_(t,e,n,i){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=Ii(t,e,n,i,this.transform_,this.pixelCoordinates_),a=this.context_;let h=this.textRotation_;for(this.transformRotation_===0&&(h-=this.viewRotation_),this.textRotateWithView_&&(h+=this.viewRotation_);e<n;e+=i){const c=s[e]+this.textOffsetX_,d=s[e+1]+this.textOffsetY_;h!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(a.save(),a.translate(c-this.textOffsetX_,d-this.textOffsetY_),a.rotate(h),a.translate(this.textOffsetX_,this.textOffsetY_),a.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&a.strokeText(this.text_,0,0),this.textFillState_&&a.fillText(this.text_,0,0),a.restore()):(this.textStrokeState_&&a.strokeText(this.text_,c,d),this.textFillState_&&a.fillText(this.text_,c,d))}}moveToLineTo_(t,e,n,i,s){const a=this.context_,h=Ii(t,e,n,i,this.transform_,this.pixelCoordinates_);a.moveTo(h[0],h[1]);let c=h.length;s&&(c-=2);for(let d=2;d<c;d+=2)a.lineTo(h[d],h[d+1]);return s&&a.closePath(),n}drawRings_(t,e,n,i){for(let s=0,a=n.length;s<a;++s)e=this.moveToLineTo_(t,e,n[s],i,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ce(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Vm(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],i=e[3]-e[1],s=Math.sqrt(n*n+i*i),a=this.context_;a.beginPath(),a.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&a.fill(),this.strokeState_&&a.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const n=e.getGeometryFunction()(t);n&&(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,i=e.length;n<i;++n)this.drawGeometry(e[n])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ce(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(ce(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,i=t.getFlatCoordinates();let s=0;const a=t.getEnds(),h=t.getStride();n.beginPath();for(let c=0,d=a.length;c<d;++c)s=this.moveToLineTo_(i,s,a[c],h,!1);n.stroke()}if(this.text_!==""){const n=t.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ce(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ce(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getOrientedFlatCoordinates();let i=0;const s=t.getEndss(),a=t.getStride();e.beginPath();for(let h=0,c=s.length;h<c;++h){const d=s[h];i=this.drawRings_(n,i,d,a)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),li(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,n=this.contextTextState_,i=t.textAlign?t.textAlign:Br;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=i&&(n.textAlign=i,e.textAlign=i),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=i,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:i,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:Ye(n||de)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),i=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),h=e.getLineJoin(),c=e.getWidth(),d=e.getMiterLimit(),f=s||ci;this.strokeState_={lineCap:i!==void 0?i:Un,lineDash:this.pixelRatio_===1?f:f.map(p=>p*this.pixelRatio_),lineDashOffset:(a||ui)*this.pixelRatio_,lineJoin:h!==void 0?h:jn,lineWidth:(c!==void 0?c:Gr)*this.pixelRatio_,miterLimit:d!==void 0?d:zr,strokeStyle:Ye(n||Nr)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),i=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*n,this.imageAnchorY_=i[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const a=t.getScaleArray();this.imageScale_=[a[0]*this.pixelRatio_/n,a[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const v=e.getColor();this.textFillState_={fillStyle:Ye(v||de)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const v=n.getColor(),E=n.getLineCap(),b=n.getLineDash(),M=n.getLineDashOffset(),S=n.getLineJoin(),y=n.getWidth(),x=n.getMiterLimit();this.textStrokeState_={lineCap:E!==void 0?E:Un,lineDash:b||ci,lineDashOffset:M||ui,lineJoin:S!==void 0?S:jn,lineWidth:y!==void 0?y:Gr,miterLimit:x!==void 0?x:zr,strokeStyle:Ye(v||Nr)}}const i=t.getFont(),s=t.getOffsetX(),a=t.getOffsetY(),h=t.getRotateWithView(),c=t.getRotation(),d=t.getScaleArray(),f=t.getText(),p=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:i!==void 0?i:Xu,textAlign:p!==void 0?p:Br,textBaseline:m!==void 0?m:_o},this.text_=f!==void 0?Array.isArray(f)?f.reduce((v,E,b)=>v+=b%2?" ":E,""):f:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=a!==void 0?this.pixelRatio_*a:0,this.textRotateWithView_=h!==void 0?h:!1,this.textRotation_=c!==void 0?c:0,this.textScale_=[this.pixelRatio_*d[0],this.pixelRatio_*d[1]]}}}const $w=Qw,Je=.5;function tE(r,t,e,n,i,s,a){const h=r[0]*Je,c=r[1]*Je,d=ee(h,c);d.imageSmoothingEnabled=!1;const f=d.canvas,p=new $w(d,Je,i,null,a),m=e.length,v=Math.floor((256*256*256-1)/m),E={};for(let M=1;M<=m;++M){const S=e[M-1],y=S.getStyleFunction()||n;if(!y)continue;let x=y(S,s);if(!x)continue;Array.isArray(x)||(x=[x]);const T=(M*v).toString(16).padStart(7,"#00000");for(let k=0,R=x.length;k<R;++k){const I=x[k],z=I.getGeometryFunction()(S);if(!z||!ce(i,z.getExtent()))continue;const G=I.clone(),j=G.getFill();j&&j.setColor(T);const W=G.getStroke();W&&(W.setColor(T),W.setLineDash(null)),G.setText(void 0);const Y=I.getImage();if(Y){const Z=Y.getImageSize();if(!Z)continue;const U=ee(Z[0],Z[1],void 0,{alpha:!1}),xt=U.canvas;U.fillStyle=T,U.fillRect(0,0,xt.width,xt.height),G.setImage(new Il({img:xt,anchor:Y.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:Y.getOrigin(),opacity:1,size:Y.getSize(),scale:Y.getScale(),rotation:Y.getRotation(),rotateWithView:Y.getRotateWithView()}))}const $=G.getZIndex()||0;let K=E[$];K||(K={},E[$]=K,K.Polygon=[],K.Circle=[],K.LineString=[],K.Point=[]);const V=z.getType();if(V==="GeometryCollection"){const Z=z.getGeometriesArrayRecursive();for(let U=0,xt=Z.length;U<xt;++U){const H=Z[U];K[H.getType().replace("Multi","")].push(H,G)}}else K[V.replace("Multi","")].push(z,G)}}const b=Object.keys(E).map(Number).sort(Pi);for(let M=0,S=b.length;M<S;++M){const y=E[b[M]];for(const x in y){const C=y[x];for(let T=0,k=C.length;T<k;T+=2){p.setStyle(C[T+1]);for(let R=0,I=t.length;R<I;++R)p.setTransform(t[R]),p.drawGeometry(C[T])}}}return d.getImageData(0,0,f.width,f.height)}function eE(r,t,e){const n=[];if(e){const i=Math.floor(Math.round(r[0])*Je),s=Math.floor(Math.round(r[1])*Je),a=(Dt(i,0,e.width-1)+Dt(s,0,e.height-1)*e.width)*4,h=e.data[a],c=e.data[a+1],f=e.data[a+2]+256*(c+256*h),p=Math.floor((256*256*256-1)/t.length);f&&f%p===0&&n.push(t[f/p-1])}return n}const iE=.5,pf={Point:uE,LineString:lE,Polygon:fE,MultiPoint:dE,MultiLineString:hE,MultiPolygon:cE,GeometryCollection:aE,Circle:sE};function nE(r,t){return parseInt(dt(r),10)-parseInt(dt(t),10)}function rE(r,t){const e=lh(r,t);return e*e}function lh(r,t){return iE*r/t}function sE(r,t,e,n,i){const s=e.getFill(),a=e.getStroke();if(s||a){const c=r.getBuilder(e.getZIndex(),"Circle");c.setFillStrokeStyle(s,a),c.drawCircle(t,n)}const h=e.getText();if(h&&h.getText()){const c=(i||r).getBuilder(e.getZIndex(),"Text");c.setTextStyle(h),c.drawText(t,n)}}function _f(r,t,e,n,i,s,a){let h=!1;const c=e.getImage();if(c){const d=c.getImageState();d==St.LOADED||d==St.ERROR?c.unlistenImageChange(i):(d==St.IDLE&&c.load(),c.listenImageChange(i),h=!0)}return oE(r,t,e,n,s,a),h}function oE(r,t,e,n,i,s){const a=e.getGeometryFunction()(t);if(!a)return;const h=a.simplifyTransformed(n,i);if(e.getRenderer())mf(r,h,e,t);else{const d=pf[h.getType()];d(r,h,e,t,s)}}function mf(r,t,e,n){if(t.getType()=="GeometryCollection"){const s=t.getGeometries();for(let a=0,h=s.length;a<h;++a)mf(r,s[a],e,n);return}r.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function aE(r,t,e,n,i){const s=t.getGeometriesArray();let a,h;for(a=0,h=s.length;a<h;++a){const c=pf[s[a].getType()];c(r,s[a],e,n,i)}}function lE(r,t,e,n,i){const s=e.getStroke();if(s){const h=r.getBuilder(e.getZIndex(),"LineString");h.setFillStrokeStyle(null,s),h.drawLineString(t,n)}const a=e.getText();if(a&&a.getText()){const h=(i||r).getBuilder(e.getZIndex(),"Text");h.setTextStyle(a),h.drawText(t,n)}}function hE(r,t,e,n,i){const s=e.getStroke();if(s){const h=r.getBuilder(e.getZIndex(),"LineString");h.setFillStrokeStyle(null,s),h.drawMultiLineString(t,n)}const a=e.getText();if(a&&a.getText()){const h=(i||r).getBuilder(e.getZIndex(),"Text");h.setTextStyle(a),h.drawText(t,n)}}function cE(r,t,e,n,i){const s=e.getFill(),a=e.getStroke();if(a||s){const c=r.getBuilder(e.getZIndex(),"Polygon");c.setFillStrokeStyle(s,a),c.drawMultiPolygon(t,n)}const h=e.getText();if(h&&h.getText()){const c=(i||r).getBuilder(e.getZIndex(),"Text");c.setTextStyle(h),c.drawText(t,n)}}function uE(r,t,e,n,i){const s=e.getImage(),a=e.getText();let h;if(s){if(s.getImageState()!=St.LOADED)return;let c=r;if(i){const f=s.getDeclutterMode();if(f!=="none")if(c=i,f==="obstacle"){const p=r.getBuilder(e.getZIndex(),"Image");p.setImageStyle(s,h),p.drawPoint(t,n)}else a&&a.getText()&&(h={})}const d=c.getBuilder(e.getZIndex(),"Image");d.setImageStyle(s,h),d.drawPoint(t,n)}if(a&&a.getText()){let c=r;i&&(c=i);const d=c.getBuilder(e.getZIndex(),"Text");d.setTextStyle(a,h),d.drawText(t,n)}}function dE(r,t,e,n,i){const s=e.getImage(),a=e.getText();let h;if(s){if(s.getImageState()!=St.LOADED)return;let c=r;if(i){const f=s.getDeclutterMode();if(f!=="none")if(c=i,f==="obstacle"){const p=r.getBuilder(e.getZIndex(),"Image");p.setImageStyle(s,h),p.drawMultiPoint(t,n)}else a&&a.getText()&&(h={})}const d=c.getBuilder(e.getZIndex(),"Image");d.setImageStyle(s,h),d.drawMultiPoint(t,n)}if(a&&a.getText()){let c=r;i&&(c=i);const d=c.getBuilder(e.getZIndex(),"Text");d.setTextStyle(a,h),d.drawText(t,n)}}function fE(r,t,e,n,i){const s=e.getFill(),a=e.getStroke();if(s||a){const c=r.getBuilder(e.getZIndex(),"Polygon");c.setFillStrokeStyle(s,a),c.drawPolygon(t,n)}const h=e.getText();if(h&&h.getText()){const c=(i||r).getBuilder(e.getZIndex(),"Text");c.setTextStyle(h),c.drawText(t,n)}}class gE extends Jd{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=xe(),this.wrappedRenderedExtent_=xe(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,n){const i=e.extent,s=e.viewState,a=s.center,h=s.resolution,c=s.projection,d=s.rotation,f=c.getExtent(),p=this.getLayer().getSource(),m=e.pixelRatio,v=e.viewHints,E=!(v[Zt.ANIMATING]||v[Zt.INTERACTING]),b=this.compositionContext_,M=Math.round(e.size[0]*m),S=Math.round(e.size[1]*m),y=p.getWrapX()&&c.canWrapX(),x=y?Mt(f):null,C=y?Math.ceil((i[2]-f[2])/x)+1:1;let T=y?Math.floor((i[0]-f[0])/x):0;do{const k=this.getRenderTransform(a,h,d,m,M,S,T*x);t.execute(b,1,k,d,E,void 0,n)}while(++T<C)}setupCompositionContext_(){if(this.opacity_!==1){const t=ee(this.context.canvas.width,this.context.canvas.height,qd);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,fo(this.compositionContext_),qd.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const n=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];Gm(this.pixelTransform,1/n,1/n),$s(this.inversePixelTransform,this.pixelTransform);const s=pu(this.pixelTransform);this.useContainer(e,s,this.getBackground(t));const a=this.context,h=a.canvas,c=this.replayGroup_,d=this.declutterExecutorGroup;let f=c&&!c.isEmpty()||d&&!d.isEmpty();if(!f&&!(this.getLayer().hasListener(te.PRERENDER)||this.getLayer().hasListener(te.POSTRENDER)))return null;const p=Math.round(t.size[0]*n),m=Math.round(t.size[1]*n);h.width!=p||h.height!=m?(h.width=p,h.height=m,h.style.transform!==s&&(h.style.transform=s)):this.containerReused||a.clearRect(0,0,p,m),this.preRender(a,t);const v=t.viewState;v.projection,this.opacity_=i.opacity,this.setupCompositionContext_();let E=!1;if(f&&i.extent&&this.clipping){const b=fn(i.extent);f=ce(b,t.extent),E=f&&!hn(b,t.extent),E&&this.clipUnrotated(this.compositionContext_,t,b)}return f&&this.renderWorlds(c,t),E&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(a,t),this.renderedRotation_!==v.rotation&&(this.renderedRotation_=v.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];Nt(this.pixelTransform,n);const i=this.renderedCenter_,s=this.renderedResolution_,a=this.renderedRotation_,h=this.renderedProjection_,c=this.wrappedRenderedExtent_,d=this.getLayer(),f=[],p=n[0]*Je,m=n[1]*Je;f.push(this.getRenderTransform(i,s,a,Je,p,m,0).slice());const v=d.getSource(),E=h.getExtent();if(v.getWrapX()&&h.canWrapX()&&!hn(E,c)){let b=c[0];const M=Mt(E);let S=0,y;for(;b<E[0];)--S,y=M*S,f.push(this.getRenderTransform(i,s,a,Je,p,m,y).slice()),b+=M;for(S=0,b=c[2];b>E[2];)++S,y=M*S,f.push(this.getRenderTransform(i,s,a,Je,p,m,y).slice()),b-=M}this.hitDetectionImageData_=tE(n,f,this.renderedFeatures_,d.getStyleFunction(),c,s,a)}e(eE(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,n,i,s){if(!this.replayGroup_)return;const a=e.viewState.resolution,h=e.viewState.rotation,c=this.getLayer(),d={},f=function(v,E,b){const M=dt(v),S=d[M];if(S){if(S!==!0&&b<S.distanceSq){if(b===0)return d[M]=!0,s.splice(s.lastIndexOf(S),1),i(v,c,E);S.geometry=E,S.distanceSq=b}}else{if(b===0)return d[M]=!0,i(v,c,E);s.push(d[M]={feature:v,layer:c,geometry:E,distanceSq:b,callback:i})}};let p;const m=[this.replayGroup_];return this.declutterExecutorGroup&&m.push(this.declutterExecutorGroup),m.some(v=>p=v.forEachFeatureAtCoordinate(t,a,h,n,f,v===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(E=>E.value):null)),p}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const i=t.viewHints[Zt.ANIMATING],s=t.viewHints[Zt.INTERACTING],a=e.getUpdateWhileAnimating(),h=e.getUpdateWhileInteracting();if(this.ready&&!a&&i||!h&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const c=t.extent,d=t.viewState,f=d.projection,p=d.resolution,m=t.pixelRatio,v=e.getRevision(),E=e.getRenderBuffer();let b=e.getRenderOrder();b===void 0&&(b=nE);const M=d.center.slice(),S=Zs(c,E*p),y=S.slice(),x=[S.slice()],C=f.getExtent();if(n.getWrapX()&&f.canWrapX()&&!hn(C,t.extent)){const K=Mt(C),V=Math.max(Mt(S)/2,K);S[0]=C[0]-V,S[2]=C[2]+V,Xc(M,f);const Z=Vc(x[0],f);Z[0]<C[0]&&Z[2]<C[2]?x.push([Z[0]+K,Z[1],Z[2]+K,Z[3]]):Z[0]>C[0]&&Z[2]>C[2]&&x.push([Z[0]-K,Z[1],Z[2]-K,Z[3]])}if(this.ready&&this.renderedResolution_==p&&this.renderedRevision_==v&&this.renderedRenderOrder_==b&&hn(this.wrappedRenderedExtent_,S))return li(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=M,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const T=new uf(lh(p,m),S,p,m);let k;this.getLayer().getDeclutter()&&(k=new uf(lh(p,m),S,p,m));let R;for(let K=0,V=x.length;K<V;++K)n.loadFeatures(x[K],p,f);const I=rE(p,m);let z=!0;const G=K=>{let V;const Z=K.getStyleFunction()||e.getStyleFunction();if(Z&&(V=Z(K,p)),V){const U=this.renderFeature(K,I,V,T,R,k);z=z&&!U}},j=nu(S),W=n.getFeaturesInExtent(j);b&&W.sort(b);for(let K=0,V=W.length;K<V;++K)G(W[K]);this.renderedFeatures_=W,this.ready=z;const Y=T.finish(),$=new gf(S,p,m,n.getOverlaps(),Y,e.getRenderBuffer());return k&&(this.declutterExecutorGroup=new gf(S,p,m,n.getOverlaps(),k.finish(),e.getRenderBuffer())),this.renderedResolution_=p,this.renderedRevision_=v,this.renderedRenderOrder_=b,this.renderedExtent_=y,this.wrappedRenderedExtent_=S,this.renderedCenter_=M,this.renderedProjection_=f,this.replayGroup_=$,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,i,s,a){if(!n)return!1;let h=!1;if(Array.isArray(n))for(let c=0,d=n.length;c<d;++c)h=_f(i,t,n[c],e,this.boundHandleStyleImageChange_,s,a)||h;else h=_f(i,t,n,e,this.boundHandleStyleImageChange_,s,a);return h}}const pE=gE;class _E extends zl{constructor(t){super(t)}createRenderer(){return new pE(this)}}const yf=_E,re={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class mE extends Re{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=t.insertFirst!==void 0?t.insertFirst:!0,this.stopEvent=t.stopEvent!==void 0?t.stopEvent:!0,this.element=document.createElement("div"),this.element.className=t.className!==void 0?t.className:"ol-overlay-container "+by,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=t.autoPan===!0?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(re.ELEMENT,this.handleElementChanged),this.addChangeListener(re.MAP,this.handleMapChanged),this.addChangeListener(re.OFFSET,this.handleOffsetChanged),this.addChangeListener(re.POSITION,this.handlePositionChanged),this.addChangeListener(re.POSITIONING,this.handlePositioningChanged),t.element!==void 0&&this.setElement(t.element),this.setOffset(t.offset!==void 0?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),t.position!==void 0&&this.setPosition(t.position)}getElement(){return this.get(re.ELEMENT)}getId(){return this.id}getMap(){return this.get(re.MAP)||null}getOffset(){return this.get(re.OFFSET)}getPosition(){return this.get(re.POSITION)}getPositioning(){return this.get(re.POSITIONING)}handleElementChanged(){Vu(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(po(this.element),Tt(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=gt(t,fi.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(re.ELEMENT,t)}setMap(t){this.set(re.MAP,t)}setOffset(t){this.set(re.OFFSET,t)}setPosition(t){this.set(re.POSITION,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(re.POSITION))return;const n=this.getRect(e.getTargetElement(),e.getSize()),i=this.getElement(),s=this.getRect(i,[Ty(i),My(i)]);t=t||{};const a=t.margin===void 0?20:t.margin;if(!hn(n,s)){const h=s[0]-n[0],c=n[2]-s[2],d=s[1]-n[1],f=n[3]-s[3],p=[0,0];if(h<0?p[0]=h-a:c<0&&(p[0]=Math.abs(c)+a),d<0?p[1]=d-a:f<0&&(p[1]=Math.abs(f)+a),p[0]!==0||p[1]!==0){const m=e.getView().getCenterInternal(),v=e.getPixelFromCoordinateInternal(m);if(!v)return;const E=[v[0]+p[0],v[1]+p[1]],b=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(E),duration:b.duration,easing:b.easing})}}}getRect(t,e){const n=t.getBoundingClientRect(),i=n.left+window.pageXOffset,s=n.top+window.pageYOffset;return[i,s,i+e[0],s+e[1]]}setPositioning(t){this.set(re.POSITIONING,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e){this.setVisible(!1);return}const n=t.getPixelFromCoordinate(e),i=t.getSize();this.updateRenderedPosition(n,i)}updateRenderedPosition(t,e){const n=this.element.style,i=this.getOffset(),s=this.getPositioning();this.setVisible(!0);const a=Math.round(t[0]+i[0])+"px",h=Math.round(t[1]+i[1])+"px";let c="0%",d="0%";s=="bottom-right"||s=="center-right"||s=="top-right"?c="-100%":(s=="bottom-center"||s=="center-center"||s=="top-center")&&(c="-50%"),s=="bottom-left"||s=="bottom-center"||s=="bottom-right"?d="-100%":(s=="center-left"||s=="center-center"||s=="center-right")&&(d="-50%");const f=`translate(${c}, ${d}) translate(${a}, ${h})`;this.rendered.transform_!=f&&(this.rendered.transform_=f,n.transform=f)}getOptions(){return this.options}}const yE=mE,vf=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],xf={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"};class vE extends xo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=t.keys!==void 0?t.keys:!1,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=t.className!==void 0?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=t.activeClassName!==void 0?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=t.inactiveClassName!==void 0?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const e=t.label!==void 0?t.label:"⤢";this.labelNode_=typeof e=="string"?document.createTextNode(e):e;const n=t.labelActive!==void 0?t.labelActive:"×";this.labelActiveNode_=typeof n=="string"?document.createTextNode(n):n;const i=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=i,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(ct.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${Fr} ${uo}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const t=this.getMap();if(!t)return;const e=t.getOwnerDocument();if(wf(e))if(Ef(e))wE(e);else{let n;this.source_?n=typeof this.source_=="string"?e.getElementById(this.source_):this.source_:n=t.getTargetElement(),this.keys_?xE(n):Lf(n)}}handleFullScreenChange_(){const t=this.getMap();if(!t)return;const e=this.isInFullscreen_;this.isInFullscreen_=Ef(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(go(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(xf.ENTERFULLSCREEN)):(go(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(xf.LEAVEFULLSCREEN)),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){const e=this.getMap();e&&e.removeChangeListener(Vt.TARGET,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(Vt.TARGET,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const t=this.documentListeners_;for(let n=0,i=t.length;n<i;++n)Tt(t[n]);t.length=0;const e=this.getMap();if(e){const n=e.getOwnerDocument();wf(n)?this.element.classList.remove(ju):this.element.classList.add(ju);for(let i=0,s=vf.length;i<s;++i)t.push(gt(n,vf[i],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}}}function wf(r){const t=r.body;return!!(t.webkitRequestFullscreen||t.requestFullscreen&&r.fullscreenEnabled)}function Ef(r){return!!(r.webkitIsFullScreen||r.fullscreenElement)}function Lf(r){r.requestFullscreen?r.requestFullscreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}function xE(r){r.webkitRequestFullscreen?r.webkitRequestFullscreen():Lf(r)}function wE(r){r.exitFullscreen?r.exitFullscreen():r.webkitExitFullscreen&&r.webkitExitFullscreen()}const EE=vE,LE=X.defineComponent({name:"MapHeat",props:{coords:Object,loadMapa:Object,typeMap:String,abrirCerrarLoader:Function,onClickMarket:Function,configurationMap:{default:()=>({strokeColor:"#f47521",copyright:"&copy; 2021 Desarrollado por UTIC - Ministerio Público",height:"250px",maxZoom:20,iconMarker:{image:ms,color:"#f47521",iconUrl:"/image/gmap01.png",iconSize:[25,41],iconAnchor:[12,41],scale:1,class:"",type:"image"},dragMarker:!0})}},data:()=>({radius:10,blur:20,zoom:5,type:"0",olMap:null,heatLayer:null,pointLayer:null,countryLayer:null,overlay:null,showSetting:!1,cantidad:0}),watch:{radius(r){this.setRadius(r)},blur(r){this.setBlur(r)},coords(r){this.cantidad=r.features.length,this.updateSource(r),this.updatePointSource(r)},loadMapa(r){this.changeCountryLayer(r)},typeMap(r){this.changeTypeMap(r)},type(r){this.changeTypeMap(r)}},methods:{changeTypeMap(r){r==="0"?(this.heatLayer.setVisible(!0),this.pointLayer.setVisible(!1),this.olMap.removeEventListener("click",this.onClickListener)):(this.heatLayer.setVisible(!1),this.pointLayer.setVisible(!0),this.initClick())},initMap(){const r=`<span class='map-copyright-text' >${this.configurationMap.copyright}</span>`,t=new Hn({stroke:new Lo({color:this.configurationMap.strokeColor,width:3}),text:new ud({font:"12px Roboto",fill:new Eo({color:"#000"}),stroke:new Lo({color:"#fff",width:1})})});this.countryLayer=new yf({source:new zo({url:`${this.loadMapa.data}`,format:new Bo}),style:function(n){const i=t.getText();return i&&i.setText(n.get("name")),t}}),this.heatLayer=new Cx({source:new zo({features:[]}),visible:!1,radius:10,blur:25});try{this.pointLayer=this.configurationMap?new yf({source:new zo({features:[]}),visible:!1,style:n=>{var a,h,c;return new Hn({image:new Il({src:(h=(a=this.configurationMap)==null?void 0:a.iconMarker)==null?void 0:h.iconUrl,color:(c=this.configurationMap.iconMarker)==null?void 0:c.color,scale:this.configurationMap.iconMarker.scale}),zIndex:1})}}):void 0}catch(n){console.log(n)}this.olMap=new Dv({controls:Ju({attribution:!1}).extend([new EE({tipLabel:"Pantalla completa"})]).extend([new qu({collapsible:!1})]),layers:[new iw({source:new Yx({attributions:r})}),this.countryLayer,this.heatLayer,this.pointLayer],target:this.$refs["map-root"],view:new Ve({center:[0,0],zoom:this.zoom})});const e=eu([this.loadMapa.lng,this.loadMapa.lat]);this.olMap.getView().adjustCenter(e),this.fitMap()},initClick(){const r=document.getElementById("popup"),t=document.getElementById("popup-closer");this.overlay=new yE({element:r,autoPan:!0}),this.olMap.addOverlay(this.overlay),t.onclick=()=>this.closeOverlay(),this.olMap.addEventListener("click",this.onClickListener)},closeOverlay(){const r=document.getElementById("popup-closer");return this.overlay.setPosition(void 0),r.blur(),!1},async onClickListener(r){const t=document.getElementById("popup-content"),e=document.getElementById("popup-closer");if(this.olMap.hasFeatureAtPixel(r.pixel)===!0){const n=this.olMap.getFeaturesAtPixel(r.pixel)[0];if(n.getGeometry().getType()==="Point"){const s=this.olMap.getFeaturesAtPixel(r.pixel)[0].getProperties(),a=r.coordinate;this.abrirCerrarLoader&&this.abrirCerrarLoader(!0);try{this.abrirCerrarLoader&&this.abrirCerrarLoader(!1);let h="";this.onClickMarket&&(h=await this.onClickMarket(s)),t.innerHTML=h;const c=this.olMap.getView(),d=n.getGeometry().getExtent(),f=c.getCenter(),p=c.getZoom();c.fit(d,{padding:[325,75,0,75],maxZoom:p});const m=c.getCenter();c.setCenter(f),c.animate({center:m})}catch{this.abrirCerrarLoader&&this.abrirCerrarLoader(!1)}this.overlay.setPosition(a)}}else this.overlay.setPosition(void 0),e.blur()},updateSource(r){if(r&&r.features.length===0){this.heatLayer.getSource().clear();return}if(r){const t=this.heatLayer.getSource(),e=new Bo({featureProjection:"EPSG:3857"}).readFeatures(r);t.clear(),t.addFeatures(e)}},updatePointSource(r){if(r&&r.features.length===0){this.pointLayer.getSource().clear();return}if(r){const t=this.pointLayer.getSource(),e=new Bo({featureProjection:"EPSG:3857"}).readFeatures(r);t.clear(),t.addFeatures(e)}},async changeCountryLayer(r){if(this.countryLayer){const e=new zo({url:`${r.data}`,format:new Bo});await this.countryLayer.setSource(e)}},fitMap(){this.countryLayer.addEventListener("change",this.countryFunction)},countryFunction(r){const t=this.olMap.getView();if(r.target.getSource().getFeatures()[0]){const n=r.target.getSource().getExtent(),i=t.getZoom(),s=t.getCenter();t.fit(n,{padding:[75,75,75,75],maxZoom:6});const a=t.getZoom(),h=t.getCenter();t.setCenter(s),t.setZoom(i),t.animate({center:h}),t.animate({zoom:a})}},setRadius(r){this.heatLayer.setRadius(parseInt(r,10))},setBlur(r){this.heatLayer.setBlur(parseInt(r,10))},irACiudad(){if(this.loadMapa&&this.loadMapa.country!=="Bolivia"){const r=this.olMap.getView(),t=r.getZoom(),e=r.getCenter();r.setCenter(eu([this.loadMapa.lng,this.loadMapa.lat]));const n=13,i=r.getCenter();r.setCenter(e),r.setZoom(t),r.animate({center:i}),r.animate({zoom:n})}},toggleSettings(){this.showSetting=!this.showSetting}},mounted(){this.countryLayer=this.loadMapa,this.initMap()},beforeDestroy(){this.countryLayer.removeEventListener("change",this.countryFunction),this.olMap.removeEventListener("click",this.onClickListener)}}),lb="",hb="",xi=r=>(X.pushScopeId("data-v-6d32e204"),r=r(),X.popScopeId(),r),bE={ref:"map-root",style:{width:"100%",height:"100%",position:"relative"}},CE={class:"btn-zoom-container ol-control"},TE=[xi(()=>X.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[X.createElementVNode("path",{d:"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4V224H109.3l9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4H224v114.8l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4V288h114.8l-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4H288V109.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z"})],-1))],ME={class:"type-map-container ol-control"},SE=[xi(()=>X.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},[X.createElementVNode("path",{d:"M215.7 499.2C267 435 384 279.4 384 192 384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2 12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"})],-1))],PE=[xi(()=>X.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},[X.createElementVNode("path",{d:"m153.6 29.9 16-21.3c4-5.4 10.4-8.6 17.1-8.6C198.4 0 208 9.6 208 21.3v22.2c0 13.1 5.4 25.7 14.9 34.7l84.7 80.8c48.8 46.6 76.4 111.2 76.4 178.7C384 434 306 512 209.7 512H192C86 512 0 426 0 320v-3.8c0-48.8 19.4-95.6 53.9-130.1l3.5-3.5c4.2-4.2 10-6.6 16-6.6 12.5 0 22.6 10.1 22.6 22.6V288c0 35.3 28.7 64 64 64s64-28.7 64-64v-3.9c0-18-7.2-35.3-19.9-48l-38.6-38.6c-24-24-37.5-56.7-37.5-90.7 0-27.7 9-54.8 25.6-76.9z"})],-1))],kE={class:"btn-settings ol-control"},RE=[xi(()=>X.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[X.createElementVNode("path",{d:"M495.9 166.6c3.2 8.7.5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4l-55.6 17.8c-8.8 2.8-18.6.3-24.5-6.8-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4c-1.1-8.4-1.7-16.9-1.7-25.5s.6-17.1 1.7-25.4l-43.3-39.4c-6.9-6.2-9.6-15.9-6.4-24.6 4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2 5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8 8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"})],-1))],AE={class:"control-container"},IE={class:"map-flex"},DE=xi(()=>X.createElementVNode("label",null,"Tamaño del radio",-1)),OE={class:"map-flex"},FE=xi(()=>X.createElementVNode("label",null,"Difuminado",-1)),zE={class:"cant-casos ol-attribution ol-unselectable ol-control ol-uncollapsible"},NE={class:"text-cantidad"},BE=xi(()=>X.createElementVNode("span",{class:"ol-bold"},"Casos: ",-1)),GE={id:"popup",class:"ol-popup"},UE=[xi(()=>X.createElementVNode("a",{id:"popup-closer",class:"ol-popup-closer"},null,-1)),xi(()=>X.createElementVNode("div",{id:"popup-content"},null,-1))];function jE(r,t,e,n,i,s){var a;return X.openBlock(),X.createElementBlock("div",{class:"map-container",style:X.normalizeStyle(`height:${(a=r.configurationMap)==null?void 0:a.height}`)},[X.createElementVNode("div",bE,[X.withDirectives(X.createElementVNode("div",CE,[X.createElementVNode("button",{title:"Ir a la ciudad",class:"jl2-button-map",onClick:t[0]||(t[0]=(...h)=>r.irACiudad&&r.irACiudad(...h))},TE)],512),[[X.vShow,r.loadMapa.country!=="Bolivia"]]),X.createElementVNode("div",ME,[X.createElementVNode("button",{title:"Mapa con Marcador",class:X.normalizeClass(["jl2-button-map",{"jl2-button-map-select":r.type=="1"}]),onClick:t[1]||(t[1]=()=>r.type="1")},SE,2),X.createElementVNode("button",{title:"Mapa de Calor",class:X.normalizeClass(["jl2-button-map",{"jl2-button-map-select":r.type=="0"}]),onClick:t[2]||(t[2]=()=>r.type="0")},PE,2)]),X.withDirectives(X.createElementVNode("div",kE,[X.createElementVNode("button",{title:"Ver Opciones",class:"jl2-button-map",onClick:t[3]||(t[3]=(...h)=>r.toggleSettings&&r.toggleSettings(...h))},RE)],512),[[X.vShow,!r.showSetting&&r.type==="0"]]),X.withDirectives(X.createElementVNode("div",AE,[X.createElementVNode("a",{onClick:t[4]||(t[4]=(...h)=>r.toggleSettings&&r.toggleSettings(...h)),class:"ol-popup-closer"}),X.createElementVNode("div",IE,[DE,X.withDirectives(X.createElementVNode("input",{id:"radius",type:"range",min:"1",max:"50",step:"1","onUpdate:modelValue":t[5]||(t[5]=h=>r.radius=h)},null,512),[[X.vModelText,r.radius]])]),X.createElementVNode("div",OE,[FE,X.withDirectives(X.createElementVNode("input",{id:"blur",type:"range",min:"1",max:"50",step:"1","onUpdate:modelValue":t[6]||(t[6]=h=>r.blur=h)},null,512),[[X.vModelText,r.blur]])])],512),[[X.vShow,r.type==="0"&&r.showSetting]]),X.createElementVNode("div",zE,[X.createElementVNode("p",NE,[BE,X.createTextVNode(X.toDisplayString(r.cantidad),1)])])],512),X.withDirectives(X.createElementVNode("div",GE,UE,512),[[X.vShow,r.type==="1"]])],4)}const ZE=ma(LE,[["render",jE],["__scopeId","data-v-6d32e204"]]);ye.CoordinatesVerifyPolygon=ip,ye.MapHeatComponent=ZE,ye.MapSearchAddress=H_,ye.MapView=Z_,ye.listenServiceGoogleMaps=Tg,ye.searchAutomaticGoogleMaps=Sg,ye.searchManualGoogleMaps=Mg,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});
463
+ `).reduce(Xw,[]),{width:C,height:M,widths:S,heights:y,lineWidths:x}=Ry(c,E),b=C+v,T=[],k=(b+2)*f[0],R=(M+v)*f[1],I={width:k<0?Math.floor(k):Math.ceil(k),height:R<0?Math.floor(R):Math.ceil(R),contextInstructions:T};(f[0]!=1||f[1]!=1)&&T.push("scale",f),i&&(T.push("strokeStyle",a.strokeStyle),T.push("lineWidth",v),T.push("lineCap",a.lineCap),T.push("lineJoin",a.lineJoin),T.push("miterLimit",a.miterLimit),T.push("setLineDash",[a.lineDash]),T.push("lineDashOffset",a.lineDashOffset)),n&&T.push("fillStyle",h.fillStyle),T.push("textBaseline","middle"),T.push("textAlign","center");const z=.5-m;let G=m*b+z*v;const j=[],W=[];let Y=0,$=0,K=0,V=0,Z;for(let U=0,xt=E.length;U<xt;U+=2){const H=E[U];if(H===`
464
+ `){$+=Y,Y=0,G=m*b+z*v,++V;continue}const at=E[U+1]||c.font;at!==Z&&(i&&j.push("font",at),n&&W.push("font",at),Z=at),Y=Math.max(Y,y[K]);const F=[H,G+z*S[K]+m*(S[K]-x[V]),.5*(v+Y)+$];G+=S[K],i&&j.push("strokeText",F),n&&W.push("fillText",F),++K}return Array.prototype.push.apply(T,j),Array.prototype.push.apply(T,W),this.labels_[s]=I,I}replayTextBackground_(t,e,n,i,s,a,h){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,n),t.lineTo.apply(t,i),t.lineTo.apply(t,s),t.lineTo.apply(t,e),a&&(this.alignFill_=a[2],this.fill_(t)),h&&(this.setStrokeStyle_(t,h),t.stroke())}calculateImageOrLabelDimensions_(t,e,n,i,s,a,h,c,d,f,p,m,v,E,C,M){h*=m[0],c*=m[1];let S=n-h,y=i-c;const x=s+d>t?t-d:s,b=a+f>e?e-f:a,T=E[3]+x*m[0]+E[1],k=E[0]+b*m[1]+E[2],R=S-E[3],I=y-E[0];(C||p!==0)&&(Hi[0]=R,Vi[0]=R,Hi[1]=I,yi[1]=I,yi[0]=R+T,vi[0]=yi[0],vi[1]=I+k,Vi[1]=vi[1]);let z;return p!==0?(z=Ie(Ht(),n,i,1,1,p,-n,-i),Nt(z,Hi),Nt(z,yi),Nt(z,vi),Nt(z,Vi),ki(Math.min(Hi[0],yi[0],vi[0],Vi[0]),Math.min(Hi[1],yi[1],vi[1],Vi[1]),Math.max(Hi[0],yi[0],vi[0],Vi[0]),Math.max(Hi[1],yi[1],vi[1],Vi[1]),nr)):ki(Math.min(R,R+T),Math.min(I,I+k),Math.max(R,R+T),Math.max(I,I+k),nr),v&&(S=Math.round(S),y=Math.round(y)),{drawImageX:S,drawImageY:y,drawImageW:x,drawImageH:b,originX:d,originY:f,declutterBox:{minX:nr[0],minY:nr[1],maxX:nr[2],maxY:nr[3],value:M},canvasTransform:z,scale:m}}replayImageOrLabel_(t,e,n,i,s,a,h){const c=!!(a||h),d=i.declutterBox,f=t.canvas,p=h?h[2]*i.scale[0]/2:0;return d.minX-p<=f.width/e&&d.maxX+p>=0&&d.minY-p<=f.height/e&&d.maxY+p>=0&&(c&&this.replayTextBackground_(t,Hi,yi,vi,Vi,a,h),Ay(t,i.canvasTransform,s,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0}fill_(t){if(this.alignFill_){const e=Nt(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(e[0]%n,e[1]%n),t.rotate(this.viewRotation_)}t.fill(),this.alignFill_&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6])}drawLabelWithPointPlacement_(t,e,n,i){const s=this.textStates[e],a=this.createLabel(t,e,i,n),h=this.strokeStates[n],c=this.pixelRatio,d=sh(Array.isArray(t)?t[0]:t,s.textAlign||Br),f=Uo[s.textBaseline||_o],p=h&&h.lineWidth?h.lineWidth:0,m=a.width/c-2*s.scale[0],v=d*m+2*(.5-d)*p,E=f*a.height/c+2*(.5-f)*p;return{label:a,anchorX:v,anchorY:E}}execute_(t,e,n,i,s,a,h,c){let d;this.pixelCoordinates_&&li(n,this.renderedTransform_)?d=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),d=Ii(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),Bm(this.renderedTransform_,n));let f=0;const p=i.length;let m=0,v,E,C,M,S,y,x,b,T,k,R,I,z=0,G=0,j=null,W=null;const Y=this.coordinateCache_,$=this.viewRotation_,K=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,V={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:$},Z=this.instructions!=i||this.overlaps?0:200;let U,xt,H,at;for(;f<p;){const F=i[f];switch(F[0]){case rt.BEGIN_GEOMETRY:U=F[1],at=F[3],U.getGeometry()?h!==void 0&&!ce(h,at.getExtent())?f=F[2]+1:++f:f=F[2];break;case rt.BEGIN_PATH:z>Z&&(this.fill_(t),z=0),G>Z&&(t.stroke(),G=0),!z&&!G&&(t.beginPath(),M=NaN,S=NaN),++f;break;case rt.CIRCLE:m=F[1];const et=d[m],it=d[m+1],ht=d[m+2],kt=d[m+3],Xt=ht-et,Te=kt-it,Qe=Math.sqrt(Xt*Xt+Te*Te);t.moveTo(et+Qe,it),t.arc(et,it,Qe,0,2*Math.PI,!0),++f;break;case rt.CLOSE_PATH:t.closePath(),++f;break;case rt.CUSTOM:m=F[1],v=F[2];const Xi=F[3],Me=F[4],Yi=F.length==6?F[5]:void 0;V.geometry=Xi,V.feature=U,f in Y||(Y[f]=[]);const $e=Y[f];Yi?Yi(d,m,v,2,$e):($e[0]=d[m],$e[1]=d[m+1],$e.length=2),Me($e,V),++f;break;case rt.DRAW_IMAGE:m=F[1],v=F[2],b=F[3],E=F[4],C=F[5];let Ki=F[6];const Fe=F[7],qi=F[8],wi=F[9],rr=F[10];let Ei=F[11];const En=F[12];let qt=F[13];const ae=F[14],be=F[15];if(!b&&F.length>=20){T=F[19],k=F[20],R=F[21],I=F[22];const le=this.drawLabelWithPointPlacement_(T,k,R,I);b=le.label,F[3]=b;const en=F[23];E=(le.anchorX-en)*this.pixelRatio,F[4]=E;const pe=F[24];C=(le.anchorY-pe)*this.pixelRatio,F[5]=C,Ki=b.height,F[6]=Ki,qt=b.width,F[13]=qt}let ze;F.length>25&&(ze=F[25]);let ti,ei,Ne;F.length>17?(ti=F[16],ei=F[17],Ne=F[18]):(ti=yn,ei=!1,Ne=!1),rr&&K?Ei+=$:!rr&&!K&&(Ei-=$);let Ji=0;for(;m<v;m+=2){if(ze&&ze[Ji++]<qt/this.pixelRatio)continue;const le=this.calculateImageOrLabelDimensions_(b.width,b.height,d[m],d[m+1],qt,Ki,E,C,qi,wi,Ei,En,s,ti,ei||Ne,U),en=[t,e,b,le,Fe,ei?j:null,Ne?W:null];if(c){if(ae==="none")continue;if(ae==="obstacle"){c.insert(le.declutterBox);continue}else{let pe,Be;if(be){const Jt=v-m;if(!be[Jt]){be[Jt]=en;continue}if(pe=be[Jt],delete be[Jt],Be=df(pe),c.collides(Be))continue}if(c.collides(le.declutterBox))continue;pe&&(c.insert(Be),this.replayImageOrLabel_.apply(this,pe)),c.insert(le.declutterBox)}}this.replayImageOrLabel_.apply(this,en)}++f;break;case rt.DRAW_CHARS:const Ln=F[1],Yt=F[2],$r=F[3],jo=F[4];I=F[5];const ts=F[6],es=F[7],Zo=F[8];R=F[9];const Li=F[10];T=F[11],k=F[12];const Wo=[F[13],F[13]],is=this.textStates[k],Qi=is.font,$i=[is.scale[0]*es,is.scale[1]*es];let tn;Qi in this.widths_?tn=this.widths_[Qi]:(tn={},this.widths_[Qi]=tn);const Ho=ef(d,Ln,Yt,2),Vo=Math.abs($i[0])*Ku(Qi,T,tn);if(jo||Vo<=Ho){const le=this.textStates[k].textAlign,en=(Ho-Vo)*sh(T,le),pe=Vw(d,Ln,Yt,2,T,en,ts,Math.abs($i[0]),Ku,Qi,tn,K?0:this.viewRotation_);t:if(pe){const Be=[];let Jt,sr,or,se,_e;if(R)for(Jt=0,sr=pe.length;Jt<sr;++Jt){_e=pe[Jt],or=_e[4],se=this.createLabel(or,k,"",R),E=_e[2]+($i[0]<0?-Li:Li),C=$r*se.height+(.5-$r)*2*Li*$i[1]/$i[0]-Zo;const Bt=this.calculateImageOrLabelDimensions_(se.width,se.height,_e[0],_e[1],se.width,se.height,E,C,0,0,_e[3],Wo,!1,yn,!1,U);if(c&&c.collides(Bt.declutterBox))break t;Be.push([t,e,se,Bt,1,null,null])}if(I)for(Jt=0,sr=pe.length;Jt<sr;++Jt){_e=pe[Jt],or=_e[4],se=this.createLabel(or,k,I,""),E=_e[2],C=$r*se.height-Zo;const Bt=this.calculateImageOrLabelDimensions_(se.width,se.height,_e[0],_e[1],se.width,se.height,E,C,0,0,_e[3],Wo,!1,yn,!1,U);if(c&&c.collides(Bt.declutterBox))break t;Be.push([t,e,se,Bt,1,null,null])}c&&c.load(Be.map(df));for(let Bt=0,J=Be.length;Bt<J;++Bt)this.replayImageOrLabel_.apply(this,Be[Bt])}}++f;break;case rt.END_GEOMETRY:if(a!==void 0){U=F[1];const le=a(U,at);if(le)return le}++f;break;case rt.FILL:Z?z++:this.fill_(t),++f;break;case rt.MOVE_TO_LINE_TO:for(m=F[1],v=F[2],xt=d[m],H=d[m+1],y=xt+.5|0,x=H+.5|0,(y!==M||x!==S)&&(t.moveTo(xt,H),M=y,S=x),m+=2;m<v;m+=2)xt=d[m],H=d[m+1],y=xt+.5|0,x=H+.5|0,(m==v-2||y!==M||x!==S)&&(t.lineTo(xt,H),M=y,S=x);++f;break;case rt.SET_FILL_STYLE:j=F,this.alignFill_=F[2],z&&(this.fill_(t),z=0,G&&(t.stroke(),G=0)),t.fillStyle=F[1],++f;break;case rt.SET_STROKE_STYLE:W=F,G&&(t.stroke(),G=0),this.setStrokeStyle_(t,F),++f;break;case rt.STROKE:Z?G++:t.stroke(),++f;break;default:++f;break}}z&&this.fill_(t),G&&t.stroke()}execute(t,e,n,i,s,a){this.viewRotation_=i,this.execute_(t,e,n,this.instructions,s,void 0,void 0,a)}executeHitDetection(t,e,n,i,s){return this.viewRotation_=n,this.execute_(t,1,e,this.hitDetectionInstructions,!0,i,s)}}const Kw=Yw,oh=["Polygon","Circle","LineString","Image","Text","Default"];class qw{constructor(t,e,n,i,s,a){this.maxExtent_=t,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=e,this.renderBuffer_=a,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Ht(),this.createExecutors_(s)}clip(t,e){const n=this.getClipCoords(e);t.beginPath(),t.moveTo(n[0],n[1]),t.lineTo(n[2],n[3]),t.lineTo(n[4],n[5]),t.lineTo(n[6],n[7]),t.clip()}createExecutors_(t){for(const e in t){let n=this.executorsByZIndex_[e];n===void 0&&(n={},this.executorsByZIndex_[e]=n);const i=t[e];for(const s in i){const a=i[s];n[s]=new Kw(this.resolution_,this.pixelRatio_,this.overlaps_,a)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const n=this.executorsByZIndex_[e];for(let i=0,s=t.length;i<s;++i)if(t[i]in n)return!0}return!1}forEachFeatureAtCoordinate(t,e,n,i,s,a){i=Math.round(i);const h=i*2+1,c=Ie(this.hitDetectionTransform_,i+.5,i+.5,1/e,-1/e,-n,-t[0],-t[1]),d=!this.hitDetectionContext_;d&&(this.hitDetectionContext_=ee(h,h,void 0,{willReadFrequently:!0}));const f=this.hitDetectionContext_;f.canvas.width!==h||f.canvas.height!==h?(f.canvas.width=h,f.canvas.height=h):d||f.clearRect(0,0,h,h);let p;this.renderBuffer_!==void 0&&(p=xe(),Mr(p,t),Zs(p,e*(this.renderBuffer_+i),p));const m=Jw(i);let v;function E(T,k){const R=f.getImageData(0,0,h,h).data;for(let I=0,z=m.length;I<z;I++)if(R[m[I]]>0){if(!a||v!=="Image"&&v!=="Text"||a.includes(T)){const G=(m[I]-3)/4,j=i-G%h,W=i-(G/h|0),Y=s(T,k,j*j+W*W);if(Y)return Y}f.clearRect(0,0,h,h);break}}const C=Object.keys(this.executorsByZIndex_).map(Number);C.sort(Pi);let M,S,y,x,b;for(M=C.length-1;M>=0;--M){const T=C[M].toString();for(y=this.executorsByZIndex_[T],S=oh.length-1;S>=0;--S)if(v=oh[S],x=y[v],x!==void 0&&(b=x.executeHitDetection(f,c,n,E,p),b))return b}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const n=e[0],i=e[1],s=e[2],a=e[3],h=[n,i,n,a,s,a,s,i];return Ii(h,0,8,2,t,h),h}isEmpty(){return on(this.executorsByZIndex_)}execute(t,e,n,i,s,a,h){const c=Object.keys(this.executorsByZIndex_).map(Number);c.sort(Pi),this.maxExtent_&&(t.save(),this.clip(t,n)),a=a||oh;let d,f,p,m,v,E;for(h&&c.reverse(),d=0,f=c.length;d<f;++d){const C=c[d].toString();for(v=this.executorsByZIndex_[C],p=0,m=a.length;p<m;++p){const M=a[p];E=v[M],E!==void 0&&E.execute(t,e,n,i,s,h)}}this.maxExtent_&&t.restore()}}const ah={};function Jw(r){if(ah[r]!==void 0)return ah[r];const t=r*2+1,e=r*r,n=new Array(e+1);for(let s=0;s<=r;++s)for(let a=0;a<=r;++a){const h=s*s+a*a;if(h>e)break;let c=n[h];c||(c=[],n[h]=c),c.push(((r+s)*t+(r+a))*4+3),s>0&&c.push(((r-s)*t+(r+a))*4+3),a>0&&(c.push(((r+s)*t+(r-a))*4+3),s>0&&c.push(((r-s)*t+(r-a))*4+3))}const i=[];for(let s=0,a=n.length;s<a;++s)n[s]&&i.push(...n[s]);return ah[r]=i,i}const gf=qw;class Qw extends hf{constructor(t,e,n,i,s,a,h){super(),this.context_=t,this.pixelRatio_=e,this.extent_=n,this.transform_=i,this.transformRotation_=i?Ga(Math.atan2(i[1],i[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=a,this.userTransform_=h,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Ht()}drawImages_(t,e,n,i){if(!this.image_)return;const s=Ii(t,e,n,i,this.transform_,this.pixelCoordinates_),a=this.context_,h=this.tmpLocalTransform_,c=a.globalAlpha;this.imageOpacity_!=1&&(a.globalAlpha=c*this.imageOpacity_);let d=this.imageRotation_;this.transformRotation_===0&&(d-=this.viewRotation_),this.imageRotateWithView_&&(d+=this.viewRotation_);for(let f=0,p=s.length;f<p;f+=2){const m=s[f]-this.imageAnchorX_,v=s[f+1]-this.imageAnchorY_;if(d!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){const E=m+this.imageAnchorX_,C=v+this.imageAnchorY_;Ie(h,E,C,1,1,d,-E,-C),a.save(),a.transform.apply(a,h),a.translate(E,C),a.scale(this.imageScale_[0],this.imageScale_[1]),a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),a.restore()}else a.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,m,v,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(a.globalAlpha=c)}drawText_(t,e,n,i){if(!this.textState_||this.text_==="")return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=Ii(t,e,n,i,this.transform_,this.pixelCoordinates_),a=this.context_;let h=this.textRotation_;for(this.transformRotation_===0&&(h-=this.viewRotation_),this.textRotateWithView_&&(h+=this.viewRotation_);e<n;e+=i){const c=s[e]+this.textOffsetX_,d=s[e+1]+this.textOffsetY_;h!==0||this.textScale_[0]!=1||this.textScale_[1]!=1?(a.save(),a.translate(c-this.textOffsetX_,d-this.textOffsetY_),a.rotate(h),a.translate(this.textOffsetX_,this.textOffsetY_),a.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&a.strokeText(this.text_,0,0),this.textFillState_&&a.fillText(this.text_,0,0),a.restore()):(this.textStrokeState_&&a.strokeText(this.text_,c,d),this.textFillState_&&a.fillText(this.text_,c,d))}}moveToLineTo_(t,e,n,i,s){const a=this.context_,h=Ii(t,e,n,i,this.transform_,this.pixelCoordinates_);a.moveTo(h[0],h[1]);let c=h.length;s&&(c-=2);for(let d=2;d<c;d+=2)a.lineTo(h[d],h[d+1]);return s&&a.closePath(),n}drawRings_(t,e,n,i){for(let s=0,a=n.length;s<a;++s)e=this.moveToLineTo_(t,e,n[s],i,!0);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ce(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=Vm(t,this.transform_,this.pixelCoordinates_),n=e[2]-e[0],i=e[3]-e[1],s=Math.sqrt(n*n+i*i),a=this.context_;a.beginPath(),a.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&a.fill(),this.strokeState_&&a.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t);break}}drawFeature(t,e){const n=e.getGeometryFunction()(t);n&&(this.setStyle(e),this.drawGeometry(n))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let n=0,i=e.length;n<i;++n)this.drawGeometry(e[n])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),n=t.getStride();this.image_&&this.drawImages_(e,0,e.length,n),this.text_!==""&&this.drawText_(e,0,e.length,n)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ce(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(n,0,n.length,t.getStride(),!1),e.stroke()}if(this.text_!==""){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(ce(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const n=this.context_,i=t.getFlatCoordinates();let s=0;const a=t.getEnds(),h=t.getStride();n.beginPath();for(let c=0,d=a.length;c<d;++c)s=this.moveToLineTo_(i,s,a[c],h,!1);n.stroke()}if(this.text_!==""){const n=t.getFlatMidpoints();this.drawText_(n,0,n.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ce(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!ce(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,n=t.getOrientedFlatCoordinates();let i=0;const s=t.getEndss(),a=t.getStride();e.beginPath();for(let h=0,c=s.length;h<c;++h){const d=s[h];i=this.drawRings_(n,i,d,a)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(this.text_!==""){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,n=this.contextFillState_;n?n.fillStyle!=t.fillStyle&&(n.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,n=this.contextStrokeState_;n?(n.lineCap!=t.lineCap&&(n.lineCap=t.lineCap,e.lineCap=t.lineCap),li(n.lineDash,t.lineDash)||e.setLineDash(n.lineDash=t.lineDash),n.lineDashOffset!=t.lineDashOffset&&(n.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),n.lineJoin!=t.lineJoin&&(n.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),n.lineWidth!=t.lineWidth&&(n.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),n.miterLimit!=t.miterLimit&&(n.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),n.strokeStyle!=t.strokeStyle&&(n.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,n=this.contextTextState_,i=t.textAlign?t.textAlign:Br;n?(n.font!=t.font&&(n.font=t.font,e.font=t.font),n.textAlign!=i&&(n.textAlign=i,e.textAlign=i),n.textBaseline!=t.textBaseline&&(n.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=i,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:i,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(!t)this.fillState_=null;else{const n=t.getColor();this.fillState_={fillStyle:Ye(n||de)}}if(!e)this.strokeState_=null;else{const n=e.getColor(),i=e.getLineCap(),s=e.getLineDash(),a=e.getLineDashOffset(),h=e.getLineJoin(),c=e.getWidth(),d=e.getMiterLimit(),f=s||ci;this.strokeState_={lineCap:i!==void 0?i:Un,lineDash:this.pixelRatio_===1?f:f.map(p=>p*this.pixelRatio_),lineDashOffset:(a||ui)*this.pixelRatio_,lineJoin:h!==void 0?h:jn,lineWidth:(c!==void 0?c:Gr)*this.pixelRatio_,miterLimit:d!==void 0?d:zr,strokeStyle:Ye(n||Nr)}}}setImageStyle(t){let e;if(!t||!(e=t.getSize())){this.image_=null;return}const n=t.getPixelRatio(this.pixelRatio_),i=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*n,this.imageAnchorY_=i[1]*n,this.imageHeight_=e[1]*n,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const a=t.getScaleArray();this.imageScale_=[a[0]*this.pixelRatio_/n,a[1]*this.pixelRatio_/n],this.imageWidth_=e[0]*n}setTextStyle(t){if(!t)this.text_="";else{const e=t.getFill();if(!e)this.textFillState_=null;else{const v=e.getColor();this.textFillState_={fillStyle:Ye(v||de)}}const n=t.getStroke();if(!n)this.textStrokeState_=null;else{const v=n.getColor(),E=n.getLineCap(),C=n.getLineDash(),M=n.getLineDashOffset(),S=n.getLineJoin(),y=n.getWidth(),x=n.getMiterLimit();this.textStrokeState_={lineCap:E!==void 0?E:Un,lineDash:C||ci,lineDashOffset:M||ui,lineJoin:S!==void 0?S:jn,lineWidth:y!==void 0?y:Gr,miterLimit:x!==void 0?x:zr,strokeStyle:Ye(v||Nr)}}const i=t.getFont(),s=t.getOffsetX(),a=t.getOffsetY(),h=t.getRotateWithView(),c=t.getRotation(),d=t.getScaleArray(),f=t.getText(),p=t.getTextAlign(),m=t.getTextBaseline();this.textState_={font:i!==void 0?i:Xu,textAlign:p!==void 0?p:Br,textBaseline:m!==void 0?m:_o},this.text_=f!==void 0?Array.isArray(f)?f.reduce((v,E,C)=>v+=C%2?" ":E,""):f:"",this.textOffsetX_=s!==void 0?this.pixelRatio_*s:0,this.textOffsetY_=a!==void 0?this.pixelRatio_*a:0,this.textRotateWithView_=h!==void 0?h:!1,this.textRotation_=c!==void 0?c:0,this.textScale_=[this.pixelRatio_*d[0],this.pixelRatio_*d[1]]}}}const $w=Qw,Je=.5;function tE(r,t,e,n,i,s,a){const h=r[0]*Je,c=r[1]*Je,d=ee(h,c);d.imageSmoothingEnabled=!1;const f=d.canvas,p=new $w(d,Je,i,null,a),m=e.length,v=Math.floor((256*256*256-1)/m),E={};for(let M=1;M<=m;++M){const S=e[M-1],y=S.getStyleFunction()||n;if(!y)continue;let x=y(S,s);if(!x)continue;Array.isArray(x)||(x=[x]);const T=(M*v).toString(16).padStart(7,"#00000");for(let k=0,R=x.length;k<R;++k){const I=x[k],z=I.getGeometryFunction()(S);if(!z||!ce(i,z.getExtent()))continue;const G=I.clone(),j=G.getFill();j&&j.setColor(T);const W=G.getStroke();W&&(W.setColor(T),W.setLineDash(null)),G.setText(void 0);const Y=I.getImage();if(Y){const Z=Y.getImageSize();if(!Z)continue;const U=ee(Z[0],Z[1],void 0,{alpha:!1}),xt=U.canvas;U.fillStyle=T,U.fillRect(0,0,xt.width,xt.height),G.setImage(new Il({img:xt,anchor:Y.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:Y.getOrigin(),opacity:1,size:Y.getSize(),scale:Y.getScale(),rotation:Y.getRotation(),rotateWithView:Y.getRotateWithView()}))}const $=G.getZIndex()||0;let K=E[$];K||(K={},E[$]=K,K.Polygon=[],K.Circle=[],K.LineString=[],K.Point=[]);const V=z.getType();if(V==="GeometryCollection"){const Z=z.getGeometriesArrayRecursive();for(let U=0,xt=Z.length;U<xt;++U){const H=Z[U];K[H.getType().replace("Multi","")].push(H,G)}}else K[V.replace("Multi","")].push(z,G)}}const C=Object.keys(E).map(Number).sort(Pi);for(let M=0,S=C.length;M<S;++M){const y=E[C[M]];for(const x in y){const b=y[x];for(let T=0,k=b.length;T<k;T+=2){p.setStyle(b[T+1]);for(let R=0,I=t.length;R<I;++R)p.setTransform(t[R]),p.drawGeometry(b[T])}}}return d.getImageData(0,0,f.width,f.height)}function eE(r,t,e){const n=[];if(e){const i=Math.floor(Math.round(r[0])*Je),s=Math.floor(Math.round(r[1])*Je),a=(Dt(i,0,e.width-1)+Dt(s,0,e.height-1)*e.width)*4,h=e.data[a],c=e.data[a+1],f=e.data[a+2]+256*(c+256*h),p=Math.floor((256*256*256-1)/t.length);f&&f%p===0&&n.push(t[f/p-1])}return n}const iE=.5,pf={Point:uE,LineString:lE,Polygon:fE,MultiPoint:dE,MultiLineString:hE,MultiPolygon:cE,GeometryCollection:aE,Circle:sE};function nE(r,t){return parseInt(dt(r),10)-parseInt(dt(t),10)}function rE(r,t){const e=lh(r,t);return e*e}function lh(r,t){return iE*r/t}function sE(r,t,e,n,i){const s=e.getFill(),a=e.getStroke();if(s||a){const c=r.getBuilder(e.getZIndex(),"Circle");c.setFillStrokeStyle(s,a),c.drawCircle(t,n)}const h=e.getText();if(h&&h.getText()){const c=(i||r).getBuilder(e.getZIndex(),"Text");c.setTextStyle(h),c.drawText(t,n)}}function _f(r,t,e,n,i,s,a){let h=!1;const c=e.getImage();if(c){const d=c.getImageState();d==St.LOADED||d==St.ERROR?c.unlistenImageChange(i):(d==St.IDLE&&c.load(),c.listenImageChange(i),h=!0)}return oE(r,t,e,n,s,a),h}function oE(r,t,e,n,i,s){const a=e.getGeometryFunction()(t);if(!a)return;const h=a.simplifyTransformed(n,i);if(e.getRenderer())mf(r,h,e,t);else{const d=pf[h.getType()];d(r,h,e,t,s)}}function mf(r,t,e,n){if(t.getType()=="GeometryCollection"){const s=t.getGeometries();for(let a=0,h=s.length;a<h;++a)mf(r,s[a],e,n);return}r.getBuilder(e.getZIndex(),"Default").drawCustom(t,n,e.getRenderer(),e.getHitDetectionRenderer())}function aE(r,t,e,n,i){const s=t.getGeometriesArray();let a,h;for(a=0,h=s.length;a<h;++a){const c=pf[s[a].getType()];c(r,s[a],e,n,i)}}function lE(r,t,e,n,i){const s=e.getStroke();if(s){const h=r.getBuilder(e.getZIndex(),"LineString");h.setFillStrokeStyle(null,s),h.drawLineString(t,n)}const a=e.getText();if(a&&a.getText()){const h=(i||r).getBuilder(e.getZIndex(),"Text");h.setTextStyle(a),h.drawText(t,n)}}function hE(r,t,e,n,i){const s=e.getStroke();if(s){const h=r.getBuilder(e.getZIndex(),"LineString");h.setFillStrokeStyle(null,s),h.drawMultiLineString(t,n)}const a=e.getText();if(a&&a.getText()){const h=(i||r).getBuilder(e.getZIndex(),"Text");h.setTextStyle(a),h.drawText(t,n)}}function cE(r,t,e,n,i){const s=e.getFill(),a=e.getStroke();if(a||s){const c=r.getBuilder(e.getZIndex(),"Polygon");c.setFillStrokeStyle(s,a),c.drawMultiPolygon(t,n)}const h=e.getText();if(h&&h.getText()){const c=(i||r).getBuilder(e.getZIndex(),"Text");c.setTextStyle(h),c.drawText(t,n)}}function uE(r,t,e,n,i){const s=e.getImage(),a=e.getText();let h;if(s){if(s.getImageState()!=St.LOADED)return;let c=r;if(i){const f=s.getDeclutterMode();if(f!=="none")if(c=i,f==="obstacle"){const p=r.getBuilder(e.getZIndex(),"Image");p.setImageStyle(s,h),p.drawPoint(t,n)}else a&&a.getText()&&(h={})}const d=c.getBuilder(e.getZIndex(),"Image");d.setImageStyle(s,h),d.drawPoint(t,n)}if(a&&a.getText()){let c=r;i&&(c=i);const d=c.getBuilder(e.getZIndex(),"Text");d.setTextStyle(a,h),d.drawText(t,n)}}function dE(r,t,e,n,i){const s=e.getImage(),a=e.getText();let h;if(s){if(s.getImageState()!=St.LOADED)return;let c=r;if(i){const f=s.getDeclutterMode();if(f!=="none")if(c=i,f==="obstacle"){const p=r.getBuilder(e.getZIndex(),"Image");p.setImageStyle(s,h),p.drawMultiPoint(t,n)}else a&&a.getText()&&(h={})}const d=c.getBuilder(e.getZIndex(),"Image");d.setImageStyle(s,h),d.drawMultiPoint(t,n)}if(a&&a.getText()){let c=r;i&&(c=i);const d=c.getBuilder(e.getZIndex(),"Text");d.setTextStyle(a,h),d.drawText(t,n)}}function fE(r,t,e,n,i){const s=e.getFill(),a=e.getStroke();if(s||a){const c=r.getBuilder(e.getZIndex(),"Polygon");c.setFillStrokeStyle(s,a),c.drawPolygon(t,n)}const h=e.getText();if(h&&h.getText()){const c=(i||r).getBuilder(e.getZIndex(),"Text");c.setTextStyle(h),c.drawText(t,n)}}class gE extends Jd{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=xe(),this.wrappedRenderedExtent_=xe(),this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedRenderOrder_=null,this.replayGroup_=null,this.replayGroupChanged=!0,this.declutterExecutorGroup=null,this.clipping=!0,this.compositionContext_=null,this.opacity_=1}renderWorlds(t,e,n){const i=e.extent,s=e.viewState,a=s.center,h=s.resolution,c=s.projection,d=s.rotation,f=c.getExtent(),p=this.getLayer().getSource(),m=e.pixelRatio,v=e.viewHints,E=!(v[Zt.ANIMATING]||v[Zt.INTERACTING]),C=this.compositionContext_,M=Math.round(e.size[0]*m),S=Math.round(e.size[1]*m),y=p.getWrapX()&&c.canWrapX(),x=y?Mt(f):null,b=y?Math.ceil((i[2]-f[2])/x)+1:1;let T=y?Math.floor((i[0]-f[0])/x):0;do{const k=this.getRenderTransform(a,h,d,m,M,S,T*x);t.execute(C,1,k,d,E,void 0,n)}while(++T<b)}setupCompositionContext_(){if(this.opacity_!==1){const t=ee(this.context.canvas.width,this.context.canvas.height,qd);this.compositionContext_=t}else this.compositionContext_=this.context}releaseCompositionContext_(){if(this.opacity_!==1){const t=this.context.globalAlpha;this.context.globalAlpha=this.opacity_,this.context.drawImage(this.compositionContext_.canvas,0,0),this.context.globalAlpha=t,fo(this.compositionContext_),qd.push(this.compositionContext_.canvas),this.compositionContext_=null}}renderDeclutter(t){this.declutterExecutorGroup&&(this.setupCompositionContext_(),this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree),this.releaseCompositionContext_())}renderFrame(t,e){const n=t.pixelRatio,i=t.layerStatesArray[t.layerIndex];Gm(this.pixelTransform,1/n,1/n),$s(this.inversePixelTransform,this.pixelTransform);const s=pu(this.pixelTransform);this.useContainer(e,s,this.getBackground(t));const a=this.context,h=a.canvas,c=this.replayGroup_,d=this.declutterExecutorGroup;let f=c&&!c.isEmpty()||d&&!d.isEmpty();if(!f&&!(this.getLayer().hasListener(te.PRERENDER)||this.getLayer().hasListener(te.POSTRENDER)))return null;const p=Math.round(t.size[0]*n),m=Math.round(t.size[1]*n);h.width!=p||h.height!=m?(h.width=p,h.height=m,h.style.transform!==s&&(h.style.transform=s)):this.containerReused||a.clearRect(0,0,p,m),this.preRender(a,t);const v=t.viewState;v.projection,this.opacity_=i.opacity,this.setupCompositionContext_();let E=!1;if(f&&i.extent&&this.clipping){const C=fn(i.extent);f=ce(C,t.extent),E=f&&!hn(C,t.extent),E&&this.clipUnrotated(this.compositionContext_,t,C)}return f&&this.renderWorlds(c,t),E&&this.compositionContext_.restore(),this.releaseCompositionContext_(),this.postRender(a,t),this.renderedRotation_!==v.rotation&&(this.renderedRotation_=v.rotation,this.hitDetectionImageData_=null),this.container}getFeatures(t){return new Promise(e=>{if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const n=[this.context.canvas.width,this.context.canvas.height];Nt(this.pixelTransform,n);const i=this.renderedCenter_,s=this.renderedResolution_,a=this.renderedRotation_,h=this.renderedProjection_,c=this.wrappedRenderedExtent_,d=this.getLayer(),f=[],p=n[0]*Je,m=n[1]*Je;f.push(this.getRenderTransform(i,s,a,Je,p,m,0).slice());const v=d.getSource(),E=h.getExtent();if(v.getWrapX()&&h.canWrapX()&&!hn(E,c)){let C=c[0];const M=Mt(E);let S=0,y;for(;C<E[0];)--S,y=M*S,f.push(this.getRenderTransform(i,s,a,Je,p,m,y).slice()),C+=M;for(S=0,C=c[2];C>E[2];)++S,y=M*S,f.push(this.getRenderTransform(i,s,a,Je,p,m,y).slice()),C-=M}this.hitDetectionImageData_=tE(n,f,this.renderedFeatures_,d.getStyleFunction(),c,s,a)}e(eE(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,n,i,s){if(!this.replayGroup_)return;const a=e.viewState.resolution,h=e.viewState.rotation,c=this.getLayer(),d={},f=function(v,E,C){const M=dt(v),S=d[M];if(S){if(S!==!0&&C<S.distanceSq){if(C===0)return d[M]=!0,s.splice(s.lastIndexOf(S),1),i(v,c,E);S.geometry=E,S.distanceSq=C}}else{if(C===0)return d[M]=!0,i(v,c,E);s.push(d[M]={feature:v,layer:c,geometry:E,distanceSq:C,callback:i})}};let p;const m=[this.replayGroup_];return this.declutterExecutorGroup&&m.push(this.declutterExecutorGroup),m.some(v=>p=v.forEachFeatureAtCoordinate(t,a,h,n,f,v===this.declutterExecutorGroup&&e.declutterTree?e.declutterTree.all().map(E=>E.value):null)),p}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),n=e.getSource();if(!n)return!1;const i=t.viewHints[Zt.ANIMATING],s=t.viewHints[Zt.INTERACTING],a=e.getUpdateWhileAnimating(),h=e.getUpdateWhileInteracting();if(this.ready&&!a&&i||!h&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const c=t.extent,d=t.viewState,f=d.projection,p=d.resolution,m=t.pixelRatio,v=e.getRevision(),E=e.getRenderBuffer();let C=e.getRenderOrder();C===void 0&&(C=nE);const M=d.center.slice(),S=Zs(c,E*p),y=S.slice(),x=[S.slice()],b=f.getExtent();if(n.getWrapX()&&f.canWrapX()&&!hn(b,t.extent)){const K=Mt(b),V=Math.max(Mt(S)/2,K);S[0]=b[0]-V,S[2]=b[2]+V,Xc(M,f);const Z=Vc(x[0],f);Z[0]<b[0]&&Z[2]<b[2]?x.push([Z[0]+K,Z[1],Z[2]+K,Z[3]]):Z[0]>b[0]&&Z[2]>b[2]&&x.push([Z[0]-K,Z[1],Z[2]-K,Z[3]])}if(this.ready&&this.renderedResolution_==p&&this.renderedRevision_==v&&this.renderedRenderOrder_==C&&hn(this.wrappedRenderedExtent_,S))return li(this.renderedExtent_,y)||(this.hitDetectionImageData_=null,this.renderedExtent_=y),this.renderedCenter_=M,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const T=new uf(lh(p,m),S,p,m);let k;this.getLayer().getDeclutter()&&(k=new uf(lh(p,m),S,p,m));let R;for(let K=0,V=x.length;K<V;++K)n.loadFeatures(x[K],p,f);const I=rE(p,m);let z=!0;const G=K=>{let V;const Z=K.getStyleFunction()||e.getStyleFunction();if(Z&&(V=Z(K,p)),V){const U=this.renderFeature(K,I,V,T,R,k);z=z&&!U}},j=nu(S),W=n.getFeaturesInExtent(j);C&&W.sort(C);for(let K=0,V=W.length;K<V;++K)G(W[K]);this.renderedFeatures_=W,this.ready=z;const Y=T.finish(),$=new gf(S,p,m,n.getOverlaps(),Y,e.getRenderBuffer());return k&&(this.declutterExecutorGroup=new gf(S,p,m,n.getOverlaps(),k.finish(),e.getRenderBuffer())),this.renderedResolution_=p,this.renderedRevision_=v,this.renderedRenderOrder_=C,this.renderedExtent_=y,this.wrappedRenderedExtent_=S,this.renderedCenter_=M,this.renderedProjection_=f,this.replayGroup_=$,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,n,i,s,a){if(!n)return!1;let h=!1;if(Array.isArray(n))for(let c=0,d=n.length;c<d;++c)h=_f(i,t,n[c],e,this.boundHandleStyleImageChange_,s,a)||h;else h=_f(i,t,n,e,this.boundHandleStyleImageChange_,s,a);return h}}const pE=gE;class _E extends zl{constructor(t){super(t)}createRenderer(){return new pE(this)}}const yf=_E,re={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"};class mE extends Re{constructor(t){super(),this.on,this.once,this.un,this.options=t,this.id=t.id,this.insertFirst=t.insertFirst!==void 0?t.insertFirst:!0,this.stopEvent=t.stopEvent!==void 0?t.stopEvent:!0,this.element=document.createElement("div"),this.element.className=t.className!==void 0?t.className:"ol-overlay-container "+by,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.autoPan=t.autoPan===!0?{}:t.autoPan||void 0,this.rendered={transform_:"",visible:!0},this.mapPostrenderListenerKey=null,this.addChangeListener(re.ELEMENT,this.handleElementChanged),this.addChangeListener(re.MAP,this.handleMapChanged),this.addChangeListener(re.OFFSET,this.handleOffsetChanged),this.addChangeListener(re.POSITION,this.handlePositionChanged),this.addChangeListener(re.POSITIONING,this.handlePositioningChanged),t.element!==void 0&&this.setElement(t.element),this.setOffset(t.offset!==void 0?t.offset:[0,0]),this.setPositioning(t.positioning||"top-left"),t.position!==void 0&&this.setPosition(t.position)}getElement(){return this.get(re.ELEMENT)}getId(){return this.id}getMap(){return this.get(re.MAP)||null}getOffset(){return this.get(re.OFFSET)}getPosition(){return this.get(re.POSITION)}getPositioning(){return this.get(re.POSITIONING)}handleElementChanged(){Vu(this.element);const t=this.getElement();t&&this.element.appendChild(t)}handleMapChanged(){this.mapPostrenderListenerKey&&(po(this.element),Tt(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);const t=this.getMap();if(t){this.mapPostrenderListenerKey=gt(t,fi.POSTRENDER,this.render,this),this.updatePixelPosition();const e=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?e.insertBefore(this.element,e.childNodes[0]||null):e.appendChild(this.element),this.performAutoPan()}}render(){this.updatePixelPosition()}handleOffsetChanged(){this.updatePixelPosition()}handlePositionChanged(){this.updatePixelPosition(),this.performAutoPan()}handlePositioningChanged(){this.updatePixelPosition()}setElement(t){this.set(re.ELEMENT,t)}setMap(t){this.set(re.MAP,t)}setOffset(t){this.set(re.OFFSET,t)}setPosition(t){this.set(re.POSITION,t)}performAutoPan(){this.autoPan&&this.panIntoView(this.autoPan)}panIntoView(t){const e=this.getMap();if(!e||!e.getTargetElement()||!this.get(re.POSITION))return;const n=this.getRect(e.getTargetElement(),e.getSize()),i=this.getElement(),s=this.getRect(i,[Ty(i),My(i)]);t=t||{};const a=t.margin===void 0?20:t.margin;if(!hn(n,s)){const h=s[0]-n[0],c=n[2]-s[2],d=s[1]-n[1],f=n[3]-s[3],p=[0,0];if(h<0?p[0]=h-a:c<0&&(p[0]=Math.abs(c)+a),d<0?p[1]=d-a:f<0&&(p[1]=Math.abs(f)+a),p[0]!==0||p[1]!==0){const m=e.getView().getCenterInternal(),v=e.getPixelFromCoordinateInternal(m);if(!v)return;const E=[v[0]+p[0],v[1]+p[1]],C=t.animation||{};e.getView().animateInternal({center:e.getCoordinateFromPixelInternal(E),duration:C.duration,easing:C.easing})}}}getRect(t,e){const n=t.getBoundingClientRect(),i=n.left+window.pageXOffset,s=n.top+window.pageYOffset;return[i,s,i+e[0],s+e[1]]}setPositioning(t){this.set(re.POSITIONING,t)}setVisible(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)}updatePixelPosition(){const t=this.getMap(),e=this.getPosition();if(!t||!t.isRendered()||!e){this.setVisible(!1);return}const n=t.getPixelFromCoordinate(e),i=t.getSize();this.updateRenderedPosition(n,i)}updateRenderedPosition(t,e){const n=this.element.style,i=this.getOffset(),s=this.getPositioning();this.setVisible(!0);const a=Math.round(t[0]+i[0])+"px",h=Math.round(t[1]+i[1])+"px";let c="0%",d="0%";s=="bottom-right"||s=="center-right"||s=="top-right"?c="-100%":(s=="bottom-center"||s=="center-center"||s=="top-center")&&(c="-50%"),s=="bottom-left"||s=="bottom-center"||s=="bottom-right"?d="-100%":(s=="center-left"||s=="center-center"||s=="center-right")&&(d="-50%");const f=`translate(${c}, ${d}) translate(${a}, ${h})`;this.rendered.transform_!=f&&(this.rendered.transform_=f,n.transform=f)}getOptions(){return this.options}}const yE=mE,vf=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],xf={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"};class vE extends xo{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=t.keys!==void 0?t.keys:!1,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=t.className!==void 0?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=t.activeClassName!==void 0?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=t.inactiveClassName!==void 0?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const e=t.label!==void 0?t.label:"⤢";this.labelNode_=typeof e=="string"?document.createTextNode(e):e;const n=t.labelActive!==void 0?t.labelActive:"×";this.labelActiveNode_=typeof n=="string"?document.createTextNode(n):n;const i=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=i,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(ct.CLICK,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${Fr} ${uo}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const t=this.getMap();if(!t)return;const e=t.getOwnerDocument();if(wf(e))if(Ef(e))wE(e);else{let n;this.source_?n=typeof this.source_=="string"?e.getElementById(this.source_):this.source_:n=t.getTargetElement(),this.keys_?xE(n):Lf(n)}}handleFullScreenChange_(){const t=this.getMap();if(!t)return;const e=this.isInFullscreen_;this.isInFullscreen_=Ef(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(go(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(xf.ENTERFULLSCREEN)):(go(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(xf.LEAVEFULLSCREEN)),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){const e=this.getMap();e&&e.removeChangeListener(Vt.TARGET,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(Vt.TARGET,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const t=this.documentListeners_;for(let n=0,i=t.length;n<i;++n)Tt(t[n]);t.length=0;const e=this.getMap();if(e){const n=e.getOwnerDocument();wf(n)?this.element.classList.remove(ju):this.element.classList.add(ju);for(let i=0,s=vf.length;i<s;++i)t.push(gt(n,vf[i],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}}}function wf(r){const t=r.body;return!!(t.webkitRequestFullscreen||t.requestFullscreen&&r.fullscreenEnabled)}function Ef(r){return!!(r.webkitIsFullScreen||r.fullscreenElement)}function Lf(r){r.requestFullscreen?r.requestFullscreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}function xE(r){r.webkitRequestFullscreen?r.webkitRequestFullscreen():Lf(r)}function wE(r){r.exitFullscreen?r.exitFullscreen():r.webkitExitFullscreen&&r.webkitExitFullscreen()}const EE=vE,LE=X.defineComponent({name:"MapHeat",props:{coords:Object,loadMapa:Object,typeMap:String,abrirCerrarLoader:Function,onClickMarket:Function,configurationMap:{default:()=>({strokeColor:"#f47521",copyright:"&copy; 2021 Desarrollado por UTIC - Ministerio Público",height:"250px",maxZoom:20,iconMarker:{image:ms,color:"#f47521",iconUrl:"/image/gmap01.png",iconSize:[25,41],iconAnchor:[12,41],scale:1,class:"",type:"image"},dragMarker:!0})}},data:()=>({radius:10,blur:20,zoom:5,type:"0",olMap:null,heatLayer:null,pointLayer:null,countryLayer:null,overlay:null,showSetting:!1,cantidad:0}),watch:{radius(r){this.setRadius(r)},blur(r){this.setBlur(r)},coords(r){this.cantidad=r.features.length,this.updateSource(r),this.updatePointSource(r)},loadMapa(r){this.changeCountryLayer(r)},typeMap(r){this.changeTypeMap(r)},type(r){this.changeTypeMap(r)}},methods:{changeTypeMap(r){r==="0"?(this.heatLayer.setVisible(!0),this.pointLayer.setVisible(!1),this.olMap.removeEventListener("click",this.onClickListener)):(this.heatLayer.setVisible(!1),this.pointLayer.setVisible(!0),this.initClick())},initMap(){const r=`<span class='map-copyright-text' >${this.configurationMap.copyright}</span>`,t=new Hn({stroke:new Lo({color:this.configurationMap.strokeColor,width:3}),text:new ud({font:"12px Roboto",fill:new Eo({color:"#000"}),stroke:new Lo({color:"#fff",width:1})})});this.countryLayer=new yf({source:new zo({url:`${this.loadMapa.data}`,format:new Bo}),style:function(n){const i=t.getText();return i&&i.setText(n.get("name")),t}}),this.heatLayer=new Cx({source:new zo({features:[]}),visible:!1,radius:10,blur:25});try{this.pointLayer=this.configurationMap?new yf({source:new zo({features:[]}),visible:!1,style:n=>{var a,h,c;return new Hn({image:new Il({src:(h=(a=this.configurationMap)==null?void 0:a.iconMarker)==null?void 0:h.iconUrl,color:(c=this.configurationMap.iconMarker)==null?void 0:c.color,scale:this.configurationMap.iconMarker.scale}),zIndex:1})}}):void 0}catch(n){console.log(n)}this.olMap=new Dv({controls:Ju({attribution:!1}).extend([new EE({tipLabel:"Pantalla completa"})]).extend([new qu({collapsible:!1})]),layers:[new iw({source:new Yx({attributions:r})}),this.countryLayer,this.heatLayer,this.pointLayer],target:this.$refs["map-root"],view:new Ve({center:[0,0],zoom:this.zoom})});const e=eu([this.loadMapa.lng,this.loadMapa.lat]);this.olMap.getView().adjustCenter(e),this.fitMap()},initClick(){const r=document.getElementById("popup"),t=document.getElementById("popup-closer");this.overlay=new yE({element:r,autoPan:!0}),this.olMap.addOverlay(this.overlay),t.onclick=()=>this.closeOverlay(),this.olMap.addEventListener("click",this.onClickListener)},closeOverlay(){const r=document.getElementById("popup-closer");return this.overlay.setPosition(void 0),r.blur(),!1},async onClickListener(r){const t=document.getElementById("popup-content"),e=document.getElementById("popup-closer");if(this.olMap.hasFeatureAtPixel(r.pixel)===!0){const n=this.olMap.getFeaturesAtPixel(r.pixel)[0];if(n.getGeometry().getType()==="Point"){const s=this.olMap.getFeaturesAtPixel(r.pixel)[0].getProperties(),a=r.coordinate;this.abrirCerrarLoader&&this.abrirCerrarLoader(!0);try{this.abrirCerrarLoader&&this.abrirCerrarLoader(!1);let h="";this.onClickMarket&&(h=await this.onClickMarket(s)),t.innerHTML=h;const c=this.olMap.getView(),d=n.getGeometry().getExtent(),f=c.getCenter(),p=c.getZoom();c.fit(d,{padding:[325,75,0,75],maxZoom:p});const m=c.getCenter();c.setCenter(f),c.animate({center:m})}catch{this.abrirCerrarLoader&&this.abrirCerrarLoader(!1)}this.overlay.setPosition(a)}}else this.overlay.setPosition(void 0),e.blur()},updateSource(r){if(r&&r.features.length===0){this.heatLayer.getSource().clear();return}if(r){const t=this.heatLayer.getSource(),e=new Bo({featureProjection:"EPSG:3857"}).readFeatures(r);t.clear(),t.addFeatures(e)}},updatePointSource(r){if(r&&r.features.length===0){this.pointLayer.getSource().clear();return}if(r){const t=this.pointLayer.getSource(),e=new Bo({featureProjection:"EPSG:3857"}).readFeatures(r);t.clear(),t.addFeatures(e)}},async changeCountryLayer(r){if(this.countryLayer){const e=new zo({url:`${r.data}`,format:new Bo});await this.countryLayer.setSource(e)}},fitMap(){this.countryLayer.addEventListener("change",this.countryFunction)},countryFunction(r){const t=this.olMap.getView();if(r.target.getSource().getFeatures()[0]){const n=r.target.getSource().getExtent(),i=t.getZoom(),s=t.getCenter();t.fit(n,{padding:[75,75,75,75],maxZoom:6});const a=t.getZoom(),h=t.getCenter();t.setCenter(s),t.setZoom(i),t.animate({center:h}),t.animate({zoom:a})}},setRadius(r){this.heatLayer.setRadius(parseInt(r,10))},setBlur(r){this.heatLayer.setBlur(parseInt(r,10))},irACiudad(){if(this.loadMapa&&this.loadMapa.country!=="Bolivia"){const r=this.olMap.getView(),t=r.getZoom(),e=r.getCenter();r.setCenter(eu([this.loadMapa.lng,this.loadMapa.lat]));const n=13,i=r.getCenter();r.setCenter(e),r.setZoom(t),r.animate({center:i}),r.animate({zoom:n})}},toggleSettings(){this.showSetting=!this.showSetting}},mounted(){this.countryLayer=this.loadMapa,this.initMap()},beforeDestroy(){this.countryLayer.removeEventListener("change",this.countryFunction),this.olMap.removeEventListener("click",this.onClickListener)}}),lb="",hb="",xi=r=>(X.pushScopeId("data-v-6d32e204"),r=r(),X.popScopeId(),r),bE={ref:"map-root",style:{width:"100%",height:"100%",position:"relative"}},CE={class:"btn-zoom-container ol-control"},TE=[xi(()=>X.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[X.createElementVNode("path",{d:"M278.6 9.4c-12.5-12.5-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l9.4-9.4V224H109.3l9.4-9.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-64 64c-12.5 12.5-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4H224v114.8l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l64 64c12.5 12.5 32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-9.4 9.4V288h114.8l-9.4 9.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l64-64c12.5-12.5 12.5-32.8 0-45.3l-64-64c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l9.4 9.4H288V109.3l9.4 9.4c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-64-64z"})],-1))],ME={class:"type-map-container ol-control"},SE=[xi(()=>X.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},[X.createElementVNode("path",{d:"M215.7 499.2C267 435 384 279.4 384 192 384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2 12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"})],-1))],PE=[xi(()=>X.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},[X.createElementVNode("path",{d:"m153.6 29.9 16-21.3c4-5.4 10.4-8.6 17.1-8.6C198.4 0 208 9.6 208 21.3v22.2c0 13.1 5.4 25.7 14.9 34.7l84.7 80.8c48.8 46.6 76.4 111.2 76.4 178.7C384 434 306 512 209.7 512H192C86 512 0 426 0 320v-3.8c0-48.8 19.4-95.6 53.9-130.1l3.5-3.5c4.2-4.2 10-6.6 16-6.6 12.5 0 22.6 10.1 22.6 22.6V288c0 35.3 28.7 64 64 64s64-28.7 64-64v-3.9c0-18-7.2-35.3-19.9-48l-38.6-38.6c-24-24-37.5-56.7-37.5-90.7 0-27.7 9-54.8 25.6-76.9z"})],-1))],kE={class:"btn-settings ol-control"},RE=[xi(()=>X.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},[X.createElementVNode("path",{d:"M495.9 166.6c3.2 8.7.5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4l-55.6 17.8c-8.8 2.8-18.6.3-24.5-6.8-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4c-1.1-8.4-1.7-16.9-1.7-25.5s.6-17.1 1.7-25.4l-43.3-39.4c-6.9-6.2-9.6-15.9-6.4-24.6 4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2 5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8 8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"})],-1))],AE={class:"control-container"},IE={class:"map-flex"},DE=xi(()=>X.createElementVNode("label",null,"Tamaño del radio",-1)),OE={class:"map-flex"},FE=xi(()=>X.createElementVNode("label",null,"Difuminado",-1)),zE={class:"cant-casos ol-attribution ol-unselectable ol-control ol-uncollapsible"},NE={class:"text-cantidad"},BE=xi(()=>X.createElementVNode("span",{class:"ol-bold"},"Casos: ",-1)),GE={id:"popup",class:"ol-popup"},UE=[xi(()=>X.createElementVNode("a",{id:"popup-closer",class:"ol-popup-closer"},null,-1)),xi(()=>X.createElementVNode("div",{id:"popup-content"},null,-1))];function jE(r,t,e,n,i,s){var a;return X.openBlock(),X.createElementBlock("div",{class:"map-container",style:X.normalizeStyle(`height:${(a=r.configurationMap)==null?void 0:a.height}`)},[X.createElementVNode("div",bE,[X.withDirectives(X.createElementVNode("div",CE,[X.createElementVNode("button",{title:"Ir a la ciudad",class:"jl2-button-map",onClick:t[0]||(t[0]=(...h)=>r.irACiudad&&r.irACiudad(...h))},TE)],512),[[X.vShow,r.loadMapa.country!=="Bolivia"]]),X.createElementVNode("div",ME,[X.createElementVNode("button",{title:"Mapa con Marcador",class:X.normalizeClass(["jl2-button-map",{"jl2-button-map-select":r.type=="1"}]),onClick:t[1]||(t[1]=()=>r.type="1")},SE,2),X.createElementVNode("button",{title:"Mapa de Calor",class:X.normalizeClass(["jl2-button-map",{"jl2-button-map-select":r.type=="0"}]),onClick:t[2]||(t[2]=()=>r.type="0")},PE,2)]),X.withDirectives(X.createElementVNode("div",kE,[X.createElementVNode("button",{title:"Ver Opciones",class:"jl2-button-map",onClick:t[3]||(t[3]=(...h)=>r.toggleSettings&&r.toggleSettings(...h))},RE)],512),[[X.vShow,!r.showSetting&&r.type==="0"]]),X.withDirectives(X.createElementVNode("div",AE,[X.createElementVNode("a",{onClick:t[4]||(t[4]=(...h)=>r.toggleSettings&&r.toggleSettings(...h)),class:"ol-popup-closer"}),X.createElementVNode("div",IE,[DE,X.withDirectives(X.createElementVNode("input",{id:"radius",type:"range",min:"1",max:"50",step:"1","onUpdate:modelValue":t[5]||(t[5]=h=>r.radius=h)},null,512),[[X.vModelText,r.radius]])]),X.createElementVNode("div",OE,[FE,X.withDirectives(X.createElementVNode("input",{id:"blur",type:"range",min:"1",max:"50",step:"1","onUpdate:modelValue":t[6]||(t[6]=h=>r.blur=h)},null,512),[[X.vModelText,r.blur]])])],512),[[X.vShow,r.type==="0"&&r.showSetting]]),X.createElementVNode("div",zE,[X.createElementVNode("p",NE,[BE,X.createTextVNode(X.toDisplayString(r.cantidad),1)])])],512),X.withDirectives(X.createElementVNode("div",GE,UE,512),[[X.vShow,r.type==="1"]])],4)}const ZE=ma(LE,[["render",jE],["__scopeId","data-v-6d32e204"]]);ye.CoordinatesVerifyPolygon=ip,ye.MapHeatComponent=ZE,ye.MapSearchAddress=H_,ye.MapView=Z_,ye.listenServiceGoogleMaps=Tg,ye.searchAutomaticGoogleMaps=Sg,ye.searchManualGoogleMaps=Mg,Object.defineProperty(ye,Symbol.toStringTag,{value:"Module"})});