leaflet
Version:
JavaScript library for mobile-friendly interactive maps
6 lines • 147 kB
JavaScript
/* @preserve
* Leaflet 2.0.0-beta.5, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2026 Volodymyr Agafonkin, (c) 2010-2011 CloudMade
*/
var L=(function(){var e=Object.defineProperty,t=(t,n)=>{let r=Object.setPrototypeOf({},null);for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n&1||e(r,Symbol.toStringTag,{value:`Module`}),n&2?r:Object.preventExtensions(r)},n=t({falseFn:()=>s,formatNum:()=>c,lastId:()=>r,setOptions:()=>f,splitWords:()=>d,stamp:()=>i,template:()=>te,throttle:()=>a,toNumber:()=>l,wrapNum:()=>o});let r=0;function i(e){return`_leaflet_id`in e||(e._leaflet_id=++r),e._leaflet_id}function a(e,t,n){let r,i;function a(){r=!1,i&&=(o.apply(n,i),!1)}function o(...o){r?i=o:(e.apply(n,o),setTimeout(a,t),r=!0)}return o}function o(e,t,n){let r=t[1],i=t[0],a=r-i;return e===r&&n?e:((e-i)%a+a)%a+i}function s(){return!1}function c(e,t=6){if(t===!1)return e;let n=10**t;return Math.round(e*n)/n}function l(e){return typeof e==`number`?e:typeof e==`string`&&e.trim()!==``?+e:NaN}let u=/\s+/;function d(e){let t=e.trim();return u.test(t)?t.split(u):[t]}function f(e,t){if(!Object.hasOwn(e,`options`)){let t=m(e.constructor)??e.options;e.options=t?Object.create(t):{}}for(let n in t)Object.hasOwn(t,n)&&(e.options[n]=t[n]);return e.options}let p=new WeakMap;function m(e){let t=e?.defaultOptions;if(t&&p.get(e)!==t){for(let t=e;t.defaultOptions;t=Object.getPrototypeOf(t))Object.hasOwn(t,`defaultOptions`)&&Object.setPrototypeOf(t.defaultOptions,Object.getPrototypeOf(t).defaultOptions??Object.prototype);p.set(e,t)}return t}let ee=/\{ *([\w_ -]+?) *\}/g;function te(e,t){return e.replace(ee,(e,n)=>{let r=t[n];if(r===void 0)throw Error(`No value provided for variable ${e}`);return typeof r==`function`&&(r=r(t)),r})}let ne=0,h=new WeakMap,re=new WeakMap;function g(e){let t=re.get(e);if(t?.version!==ne){t={version:ne,runners:0,hooks:[]};for(let n=e;n!==Function.prototype;n=Object.getPrototypeOf(n))Object.hasOwn(n,`initHooks`)&&n.initHooks&&t.runners++,t.hooks.unshift(...h.get(n)??[]);re.set(e,t)}return t}var _=class{static initHooks=!0;static include(e){for(let t=e;t&&t!==Object.prototype;t=Object.getPrototypeOf(t))for(let n of Object.getOwnPropertyNames(t))n!==`constructor`&&n!==`options`&&(this.prototype[n]=e[n]);let{options:t}=e;return t&&this.mergeOptions(t),this}static mergeOptions(e){return Object.hasOwn(this,`defaultOptions`)||(this.defaultOptions=Object.create(this.defaultOptions??Object.prototype)),Object.assign(this.defaultOptions,e),this}static setDefaultOptions(e){return this.mergeOptions(e)}static addInitHook(e,...t){let n=typeof e==`function`?e:function(){this[e](...t)};return h.has(this)||h.set(this,[]),h.get(this).push(n),ne++,this}constructor(){if(this.initialize)throw Error(`${this.constructor.name}: initialize() is not called in Leaflet 2. Rename it to constructor() and call super() at its start.`);this.options=f(this),this._initHooksLeft=g(this.constructor).runners,this.callInitHooks()}callInitHooks(){if(--this._initHooksLeft===0)for(let e of g(this.constructor).hooks)e.call(this)}};let ie={position:`topright`};var v=class extends _{static initHooks=!0;static defaultOptions=ie;constructor(e){super(),f(this,e),this.callInitHooks()}getPosition(){return this.options.position}setPosition(e){let t=this._map;return t?.removeControl(this),this.options.position=e,t?.addControl(this),this}getContainer(){return this._container}addTo(e){this.remove(),this._map=e;let t=this._container=this.onAdd(e),n=this.getPosition(),r=e._controlCorners[n];return t.classList.add(`leaflet-control`),n.includes(`bottom`)?r.prepend(t):r.append(t),this._mapEvents={...this.getEvents?.(),unload:this.remove},e.on(this._mapEvents,this),this}remove(){return this._map&&=(this._container.remove(),this._map.off(this._mapEvents,this),this.onRemove?.(this._map),null),this}},y=class e{constructor(t,n,r){if(t instanceof e)return t;let i=t,a=n;if(Array.isArray(t)?(i=t[0],a=t[1]):typeof t==`object`&&t&&(i=t.x,a=t.y),this.x=r?Math.round(l(i)):l(i),this.y=r?Math.round(l(a)):l(a),this.x!==this.x||this.y!==this.y)throw Error(`Invalid Point object: (${i}, ${a})`)}static validate(t,n){try{return!!new e(t,n)}catch{return!1}}clone(){let t=new e(0,0);return t.x=this.x,t.y=this.y,t}add(t){return this.clone()._add(new e(t))}_add(e){return this.x+=e.x,this.y+=e.y,this}subtract(t){return this.clone()._subtract(new e(t))}_subtract(e){return this.x-=e.x,this.y-=e.y,this}divideBy(e){return this.clone()._divideBy(e)}_divideBy(e){return this.x/=e,this.y/=e,this}multiplyBy(e){return this.clone()._multiplyBy(e)}_multiplyBy(e){return this.x*=e,this.y*=e,this}scaleBy(t){return t=new e(t),new e(this.x*t.x,this.y*t.y)}unscaleBy(t){return t=new e(t),new e(this.x/t.x,this.y/t.y)}round(){return this.clone()._round()}_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}floor(){return this.clone()._floor()}_floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.clone()._ceil()}_ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}trunc(){return this.clone()._trunc()}_trunc(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}distanceTo(t){t=new e(t);let n=t.x-this.x,r=t.y-this.y;return Math.sqrt(n*n+r*r)}equals(t){return t=new e(t),t.x===this.x&&t.y===this.y}contains(t){return t=new e(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}toString(){return`Point(${c(this.x)}, ${c(this.y)})`}},ae=t({create:()=>b,disableImageDrag:()=>ce,enableImageDrag:()=>le,get:()=>oe,getPosition:()=>T,getScale:()=>E,getSizedParentNode:()=>ue,setPosition:()=>w,setTransform:()=>C,toBack:()=>S,toFront:()=>x});function oe(e){return typeof e==`string`?document.getElementById(e):e}function b(e,t,n){let r=document.createElement(e);return r.className=t??``,n?.append(r),r}function x(e){let t=e.parentNode;if(t&&t.lastChild!==e){if(e.matches(`:hover`))for(;e.nextSibling;)e.before(e.nextSibling);else t.append(e)}}function S(e){let t=e.parentNode;if(t&&t.firstChild!==e){if(e.matches(`:hover`))for(;e.previousSibling;)e.after(e.previousSibling);else t.prepend(e)}}function C(e,t,n){let r=t??new y(0,0);e.style.transform=`translate3d(${r.x}px,${r.y}px,0)${n?` scale(${n})`:``}`}let se=new WeakMap;function w(e,t,n){se.set(e,t),n?e.style.transform=`translate(${t.x}px,${t.y}px)`:C(e,t)}function T(e){return se.get(e)??new y(0,0)}function ce(){A(window,`dragstart`,F)}function le(){M(window,`dragstart`,F)}function ue(e){do e=e.parentNode;while((!e.offsetWidth||!e.offsetHeight)&&e!==document.body);return e}function E(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}let de=new WeakSet,fe=new WeakSet,pe=new WeakSet;function me(e,t){for(;e&&e!==t;){if(fe.has(e)||!e.parentNode)return!0;e=e.parentNode}return!1}let D=new Map,he;function ge(e){e.addEventListener(`pointerdown`,ve,!0),e.addEventListener(`pointermove`,ye,!0),e.addEventListener(`pointerup`,O,!0),e.addEventListener(`pointercancel`,O,!0),D.clear()}function _e(e){e.removeEventListener(`pointerdown`,ve,!0),e.removeEventListener(`pointermove`,ye,!0),e.removeEventListener(`pointerup`,O,!0),e.removeEventListener(`pointercancel`,O,!0)}function ve(e){he=e.pointerType,me(e.target,e.currentTarget)||(e.isTrusted&&e.target.setPointerCapture(e.pointerId),D.set(e.pointerId,e))}function ye(e){D.has(e.pointerId)&&D.set(e.pointerId,e)}function O(e){e.isTrusted&&e.target.releasePointerCapture(e.pointerId),D.delete(e.pointerId)}function k(){return[...D.values()]}let be=[`bubbles`,`cancelable`,`composed`,`view`,`screenX`,`screenY`,`clientX`,`clientY`,`ctrlKey`,`shiftKey`,`altKey`,`metaKey`,`button`,`buttons`,`relatedTarget`],xe=0,Se=0;function Ce(e){let t=e.target;if(e.detail!==1||he===`mouse`||t.closest(`label`)){Se=0;return}let n=Date.now();if(Se=n-xe<=200?Se+1:1,xe=n,Se===2){let n={detail:2};for(let t of be)n[t]=e[t];t.dispatchEvent(new MouseEvent(`dblclick`,n))}}function we(e){e.addEventListener(`keydown`,Te)}function Te(e){e.key===` `&&!e.repeat&&(e.preventDefault(),this.click())}var Ee=t({disableClickPropagation:()=>P,disableScrollPropagation:()=>je,getPointerPosition:()=>Me,getWheelDelta:()=>Ne,off:()=>M,on:()=>A,preventDefault:()=>F,stop:()=>I,stopPropagation:()=>N});function A(e,t,n,r){if(t&&typeof t==`object`)for(let[r,i]of Object.entries(t))ke(e,r,i,n);else for(let i of d(t))ke(e,i,n,r)}let j=new WeakMap;function M(e,t,n,r){if(arguments.length===1)Oe(e),j.delete(e);else if(t&&typeof t==`object`)for(let[r,i]of Object.entries(t))Ae(e,r,i,n);else if(t=d(t),arguments.length===2)Oe(e,e=>t.includes(e));else for(let i of t)Ae(e,i,n,r)}let De=/\d/;function Oe(e,t){for(let n of j.get(e)?.keys()??[]){let r=n.split(De)[0];(!t||t(r))&&Ae(e,r,null,null,n)}}function ke(e,t,n,r){let a=t+i(n)+(r?`_${i(r)}`:``),o=j.get(e);if(o?.has(a))return;let s=function(t){return n.call(r||e,t)};e.addEventListener(t,s,t===`wheel`&&{passive:!1}),o||(o=new Map,j.set(e,o)),o.set(a,s)}function Ae(e,t,n,r,a){a??=t+i(n)+(r?`_${i(r)}`:``);let o=j.get(e),s=o?.get(a);o&&s&&(e.removeEventListener(t,s,!1),o.delete(a))}function N(e){`stopPropagation`in e?e.stopPropagation():e.originalEvent&&de.add(e.originalEvent)}function je(e){ke(e,`wheel`,N)}function P(e){A(e,`pointerdown dblclick contextmenu`,N),fe.add(e)}function F(e){e.preventDefault?.()}function I(e){`preventDefault`in e&&F(e),N(e)}function Me(e,t){if(!t)return new y(e.clientX,e.clientY);let n=E(t),r=n.boundingClientRect;return new y((e.clientX-r.left)/n.x-t.clientLeft,(e.clientY-r.top)/n.y-t.clientTop)}function Ne(e){return-e.deltaY*(e.deltaMode?e.deltaMode===1?20:60:.5/window.devicePixelRatio)||0}let Pe={position:`bottomright`,prefix:`<a target="_blank" href="https://leafletjs.com" lang="en" title="A JavaScript library for interactive maps"><svg aria-hidden="true" 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>Leaflet</a>`};var Fe=class extends v{static initHooks=!0;static defaultOptions=Pe;constructor(e){super(e),this._attributions={},this._layerAttributions=new Map,this._shownLayers=new Set,this.callInitHooks()}onAdd(e){return e.attributionControl=this,this._container=b(`div`,`leaflet-control-attribution`),P(this._container),e._loaded&&e.eachLayer(e=>this._addLayer({layer:e})),this._update(),this._container}getEvents(){return{layeradd:this._addLayer,layerremove:this._removeLayer,zoomend:this._onZoomEnd}}onRemove(){for(let e of this._layerAttributions.keys())this._removeLayer({layer:e})}_addLayer({layer:e}){let t=e.getAttribution?.();t&&!this._layerAttributions.has(e)&&(this._layerAttributions.set(e,t),this._updateLayer(e))}_removeLayer({layer:e}){this._shownLayers.delete(e)&&this.removeAttribution(this._layerAttributions.get(e)),this._layerAttributions.delete(e)}_onZoomEnd(){for(let e of this._layerAttributions.keys())this._updateLayer(e)}_updateLayer(e){let{minZoom:t=-1/0,maxZoom:n=1/0}=e.options,r=this._map.getZoom(),i=r>=t&&r<=n;if(i===this._shownLayers.has(e))return;let a=this._layerAttributions.get(e);i?(this._shownLayers.add(e),this.addAttribution(a)):(this._shownLayers.delete(e),this.removeAttribution(a))}setPrefix(e){return this.options.prefix=e,this._update(),this}addAttribution(e){return e&&(this._attributions[e]=(this._attributions[e]||0)+1,this._update()),this}removeAttribution(e){return e&&this._attributions[e]&&(this._attributions[e]--,this._update()),this}_update(){if(!this._map)return;let e=Object.keys(this._attributions).filter(e=>this._attributions[e]).join(`, `);this._container.innerHTML=[this.options.prefix,e].filter(Boolean).join(` <span aria-hidden="true">|</span> `)}};let Ie={position:`topleft`,enterText:`<svg width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M1 5V1h4m4 0h4v4m0 4v4H9m-4 0H1V9"/></svg>`,enterTitle:`Enter fullscreen`,exitText:`<svg width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M5 1v4H1m8-4v4h4m0 4H9v4m-4 0V9H1"/></svg>`,exitTitle:`Exit fullscreen`,container:void 0,pseudo:!1};var Le=class extends v{static defaultOptions=Ie;onAdd(e){let t=b(`div`,`leaflet-control-fullscreen leaflet-bar`),n=this._link=b(`a`,``,t);return n.href=`#`,n.setAttribute(`role`,`button`),we(n),this._target=this.options.container??e.getContainer(),this._fullscreen=!1,this._update(),P(n),A(n,`click`,e=>{I(e),this.toggle()}),A(document,`fullscreenchange`,this._onFullscreenChange,this),t}onRemove(e){this.setFullscreen(!1),this._setPseudo(!1),M(document,`fullscreenchange`,this._onFullscreenChange,this)}isFullscreen(){return this._fullscreen}toggle(){return this.setFullscreen(!this._fullscreen)}setFullscreen(e){return e===this._fullscreen||(e?this.options.pseudo||!document.fullscreenEnabled?this._setPseudo(!0):this._target.requestFullscreen().catch(()=>this._setPseudo(!0)):this._pseudo?this._setPseudo(!1):document.fullscreenElement===this._target?document.exitFullscreen():this._setFullscreen(!1)),this}_setPseudo(e){this._pseudo=e,this._target.classList.toggle(`leaflet-pseudo-fullscreen`,e),(e?A:M)(document,`keydown`,this._onKeyDown,this),this._setFullscreen(e)}_onKeyDown(e){e.key===`Escape`&&!e.defaultPrevented&&this._setPseudo(!1)}_onFullscreenChange(){this._setFullscreen(document.fullscreenElement===this._target)}_setFullscreen(e){e!==this._fullscreen&&(this._fullscreen=e,this._update(),this._map.fire(e?`enterfullscreen`:`exitfullscreen`))}_update(){let e=this._link,{options:t}=this,n=this._map.translate(this._fullscreen?t.exitTitle:t.enterTitle);e.innerHTML=this._fullscreen?t.exitText:t.enterText,e.title=n,e.setAttribute(`aria-label`,n),this._map.getContainer().classList.toggle(`leaflet-fullscreen-on`,this._fullscreen)}};let Re={collapsed:!0,collapseDelay:0,position:`topright`,title:`Layers`,autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction(e,t,n,r){return n<r?-1:+(r<n)}};var ze=class extends v{static initHooks=!0;static defaultOptions=Re;constructor(e,t,n){super(n),this._layerControlInputs=new Map,this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,this._needsUpdate=!1;for(let[t,n]of Object.entries(e??{}))this._addLayer(n,t);for(let[e,n]of Object.entries(t??{}))this._addLayer(n,e,!0);this.callInitHooks()}onAdd(e){this._initLayout(),this._update(),this._map=e,e.on(`zoomend`,this._checkDisabledLayers,this);for(let e of this._layers)e.layer.on(`add remove`,this._onLayerChange,this);return this.options.collapsed||e.on(`resize`,this._expandIfNotCollapsed,this),this._container}addTo(e){return super.addTo(e),this._expandIfNotCollapsed()}onRemove(e){e.off(`zoomend`,this._checkDisabledLayers,this);for(let e of this._layers)e.layer.off(`add remove`,this._onLayerChange,this);e.off(`resize`,this._expandIfNotCollapsed,this),e.off(`click`,this.collapse,this)}addBaseLayer(e,t){return this._addLayer(e,t),this._map?this._update():this}addOverlay(e,t){return this._addLayer(e,t,!0),this._map?this._update():this}removeLayer(e){return e.off(`add remove`,this._onLayerChange,this),this._layers=this._layers.filter(t=>t.layer!==e),this._map?this._update():this}expand(){clearTimeout(this._collapseDelayTimeout),this._container.classList.add(`leaflet-control-layers-expanded`),this._needsUpdate&&this._update(),this._section.style.height=``;let e=this._map.getSize().y-(this._container.offsetTop+50);return e<this._section.clientHeight?(this._section.classList.add(`leaflet-control-layers-scrollbar`),this._section.style.height=`${e}px`):this._section.classList.remove(`leaflet-control-layers-scrollbar`),this._checkDisabledLayers(),this}collapse(){return clearTimeout(this._collapseDelayTimeout),this.options.collapseDelay>0?this._collapseDelayTimeout=setTimeout(()=>{this._container.classList.remove(`leaflet-control-layers-expanded`)},this.options.collapseDelay):this._container.classList.remove(`leaflet-control-layers-expanded`),this}_initLayout(){let e=`leaflet-control-layers`,t=this._container=b(`div`,e),n=this.options.collapsed;P(t),je(t);let r=b(`fieldset`,`${e}-list`);this._section=r;let i=this._layersLink=b(`a`,`${e}-toggle`,t);i.href=`#`,i.title=this._map.translate(this.options.title),i.setAttribute(`role`,`button`),we(i),r.setAttribute(`aria-label`,i.title),r.tabIndex=-1,A(i,`click`,e=>{e.preventDefault();let t=document.activeElement===i;this._expandSafely(),t&&r.focus()}),n?(this._map.on(`click`,this.collapse,this),A(t,{pointerenter:this._expandSafely,pointerleave(e){e.pointerType!==`touch`&&this.collapse()}},this),A(r,`keydown`,n=>{n.key===`Escape`&&(clearTimeout(this._collapseDelayTimeout),t.classList.remove(`${e}-expanded`),i.focus(),n.preventDefault())})):this.expand(),this._baseLayersList=b(`div`,`${e}-base`,r),this._separator=b(`div`,`${e}-separator`,r),this._overlaysList=b(`div`,`${e}-overlays`,r),t.append(r)}_addLayer(e,t,n){this._map&&e.on(`add remove`,this._onLayerChange,this),this._layers.push({layer:e,name:t,overlay:n}),this.options.sortLayers&&this._layers.sort(((e,t)=>this.options.sortFunction(e.layer,t.layer,e.name,t.name))),this.options.autoZIndex&&e.setZIndex&&(this._lastZIndex++,e.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()}_update(){if(!this._container)return this;if(!this._container.classList.contains(`leaflet-control-layers-expanded`))return this._needsUpdate=!0,this;this._needsUpdate=!1,this._baseLayersList.replaceChildren(),this._overlaysList.replaceChildren(),this._layerControlInputs.clear();let e,t,n=0;for(let r of this._layers)this._addItem(r),t||=r.overlay,e||=!r.overlay,n+=+!r.overlay;return this.options.hideSingleBase&&(e&&=n>1,this._baseLayersList.style.display=e?``:`none`),this._separator.style.display=t&&e?``:`none`,this._checkDisabledLayers(),this}_onLayerChange(e){this._handlingClick||this._update();let t=this._layers.find(t=>t.layer===e.target),n=t.overlay?e.type===`add`?`overlayadd`:`overlayremove`:e.type===`add`?`baselayerchange`:null;n&&this._map.fire(n,t)}_addItem(e){let t=document.createElement(`label`),n=this._map.hasLayer(e.layer),r=document.createElement(`input`);r.type=e.overlay?`checkbox`:`radio`,r.className=`leaflet-control-layers-selector`,r.defaultChecked=n,e.overlay||(r.name=`leaflet-base-layers_${i(this)}`),this._layerControlInputs.set(r,e.layer),A(r,`click`,this._onInputClick,this);let a=document.createElement(`span`);a.innerHTML=` ${e.name}`;let o=document.createElement(`span`);return t.append(o),o.append(r,a),(e.overlay?this._overlaysList:this._baseLayersList).append(t),t}_onInputClick(){if(this._preventClick)return;let e=new Map;for(let[t,n]of this._layerControlInputs)e.set(n,e.get(n)||t.checked);let t=[],n=[];for(let[r,i]of e)i!==this._map.hasLayer(r)&&(i?t:n).push(r);this._handlingClick=!0;for(let e of n)this._map.removeLayer(e);for(let e of t)this._map.addLayer(e);this._handlingClick=!1;for(let[t,n]of e)if(n!==this._map.hasLayer(t)){this._update();break}}_checkDisabledLayers(){let e=this._map.getZoom();for(let[t,n]of this._layerControlInputs){let r=n.options;t.disabled=r.minZoom!==void 0&&e<r.minZoom||r.maxZoom!==void 0&&e>r.maxZoom}}_expandIfNotCollapsed(){return this._map&&!this.options.collapsed&&this.expand(),this}_expandSafely(){let e=this._section;this._preventClick=!0,A(e,`click`,F),this.expand(),setTimeout(()=>{M(e,`click`,F),this._preventClick=!1})}};let Be={position:`bottomleft`,maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1};var Ve=class extends v{static defaultOptions=Be;onAdd(e){let t=`leaflet-control-scale`,n=b(`div`,t),r=this.options;return this._addScales(r,`${t}-line`,n),e.whenReady(this._update,this),n}getEvents(){return{[this.options.updateWhenIdle?`moveend`:`move`]:this._update}}_addScales(e,t,n){e.metric&&(this._mScale=b(`div`,t,n)),e.imperial&&(this._iScale=b(`div`,t,n))}_update(){let e=this._map,t=e.getSize().y/2,n=e.distance(e.containerPointToLatLng([0,t]),e.containerPointToLatLng([this.options.maxWidth,t]));this._updateScales(n)}_updateScales(e){this.options.metric&&e&&this._updateMetric(e),this.options.imperial&&e&&this._updateImperial(e)}_updateMetric(e){let t=this._getRoundNum(e),n=t<1e3?`${t} m`:`${t/1e3} km`;this._updateScale(this._mScale,n,t/e)}_updateImperial(e){let t=e*3.2808399,n=t>5280,r=n?t/5280:t,i=this._getRoundNum(r);this._updateScale(this._iScale,`${i} ${n?`mi`:`ft`}`,i/r)}_updateScale(e,t,n){e.style.width=`${Math.round(this.options.maxWidth*n)}px`,e.textContent=t}_getRoundNum(e){let t=e<1?Math.floor(Math.log10(e)):`${Math.floor(e)}`.length-1,n=e/10**t;return n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1,t<0?n/10**-t:n*10**t}};let He={position:`topleft`,zoomInText:`<svg width="12" height="12" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M0 6h12M6 0v12"/></svg>`,zoomInTitle:`Zoom in`,zoomOutText:`<svg width="12" height="12" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M0 6h12"/></svg>`,zoomOutTitle:`Zoom out`};var Ue=class extends v{static defaultOptions=He;onAdd(e){let t=`leaflet-control-zoom`,n=b(`div`,`${t} leaflet-bar`),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,e.translate(r.zoomInTitle),`${t}-in`,n,e=>this._zoom(e,1)),this._zoomOutButton=this._createButton(r.zoomOutText,e.translate(r.zoomOutTitle),`${t}-out`,n,e=>this._zoom(e,-1)),this._updateDisabled(),n}getEvents(){return{zoomend:this._updateDisabled,zoomlevelschange:this._updateDisabled}}disable(){return this._disabled=!0,this._updateDisabled(),this}enable(){return this._disabled=!1,this._updateDisabled(),this}_zoom(e,t){let n=this._map;!this._disabled&&(t>0?n._zoom<n.getMaxZoom():n._zoom>n.getMinZoom())&&n.zoomIn(t*n.options.zoomDelta*(e.shiftKey?3:1),{originalEvent:e})}_createButton(e,t,n,r,i){let a=b(`a`,n,r);return a.innerHTML=e,a.href=`#`,a.title=t,a.setAttribute(`role`,`button`),a.setAttribute(`aria-label`,t),we(a),P(a),A(a,`click`,e=>{I(e),i.call(this,e)}),a}_updateDisabled(){let e=this._map;if(e)for(let[t,n]of[[this._zoomInButton,e.getMaxZoom()],[this._zoomOutButton,e.getMinZoom()]]){let r=this._disabled||e._zoom===n;t.classList.toggle(`leaflet-disabled`,r),t.setAttribute(`aria-disabled`,`${r}`)}}};let We=new Set;function Ge(){}var R=class e extends _{static initHooks=!0;constructor(){super(),this._events=void 0,this._eventIndexes=void 0,this._eventParents=void 0,this.callInitHooks()}on(e,t,n){if(typeof e==`object`)for(let[n,r]of Object.entries(e))this._on(n,r,t);else for(let r of d(e))this._on(r,t,n);return this}off(e,t,n){if(!arguments.length){for(let e of Object.keys(this._events??{}))this._off(e);this._events=this._eventIndexes=void 0}else if(typeof e==`object`)for(let[n,r]of Object.entries(e))this._off(n,r,t);else{let r=arguments.length===1;for(let i of d(e))r?this._off(i):this._off(i,t,n)}return this}static __REMOVED_EVENTS={mousedown:`pointerdown`,mouseup:`pointerup`,mouseover:`pointerover`,mouseout:`pointerout`,mousemove:`pointermove`,keypress:`keydown`};_on(t,n,r,i){if(Object.hasOwn(e.__REMOVED_EVENTS,t)&&!We.has(t)&&(We.add(t),console.error(`The event ${t} has been removed in Leaflet 2. Use ${e.__REMOVED_EVENTS[t]} instead.`)),typeof n!=`function`){console.warn(`wrong listener type: ${typeof n}`);return}r===this&&(r=void 0),this._events??={};let a=this._events[t]??=[],o=this._eventIndexes?.[t]?.index;if(Ke(a,o,n,r))return;let s={fn:n,ctx:r};if(i&&(s.once=!0),a.push(s),o)qe(o,s);else if(a.length>32){let e=new Map;for(let t of a)qe(e,t);(this._eventIndexes??={})[t]={index:e,removed:0}}}_off(e,t,n){let r=this._events,i=r?.[e];if(!r||!i)return;if(arguments.length===1){for(let e of i)e.fn=Ge;this._removeType(e);return}if(typeof t!=`function`){console.warn(`wrong listener type: ${typeof t}`);return}n===this&&(n=void 0);let a=this._eventIndexes?.[e],o=Ke(i,a?.index,t,n);if(!o)return;if(o.fn=Ge,o.ctx=void 0,!a){i.length===1?this._removeType(e):r[e]=i.filter(e=>e!==o);return}let s=a.index.get(t);s instanceof Map?(s.delete(n),s.size||a.index.delete(t)):a.index.delete(t),++a.removed===i.length?this._removeType(e):a.removed*2>=i.length&&(r[e]=i.filter(e=>e.fn!==Ge),a.removed=0)}_removeType(e){this._events&&(this._events[e]=void 0),this._eventIndexes&&(this._eventIndexes[e]=void 0)}fire(e,t,n){if(!this.listens(e,n))return this;let r={...t,type:e,target:this,sourceTarget:t?.sourceTarget||this},i=this._events?.[e];if(i){let{length:t}=i;for(let n=0;n<t;n++){let t=i[n],{fn:a,ctx:o}=t;t.once&&this.off(e,a,o),a.call(o||this,r)}}return n&&this._propagateEvent(r),this}listens(e,t,n,r){typeof e!=`string`&&console.warn(`"string" type argument expected`);let i=t;typeof t!=`function`&&(r=!!t,i=void 0,n=void 0);let a=this._events?.[e];if(a&&(!i||Ke(a,this._eventIndexes?.[e]?.index,i,n===this?void 0:n)))return!0;if(r){for(let i of Object.values(this._eventParents??{}))if(i.listens(e,t,n,r))return!0}return!1}once(e,t,n){if(typeof e==`object`)for(let[n,r]of Object.entries(e))this._on(n,r,t,!0);else for(let r of d(e))this._on(r,t,n,!0);return this}addEventParent(e){return this._eventParents??={},this._eventParents[i(e)]=e,this}removeEventParent(e){return this._eventParents&&delete this._eventParents[i(e)],this}_propagateEvent(e){for(let t of Object.values(this._eventParents??{}))t.fire(e.type,{layer:e.target,propagatedFrom:e.target,...e},!0)}};function Ke(e,t,n,r){if(!t)return e.find(e=>e.fn===n&&e.ctx===r);let i=t.get(n);return i instanceof Map?i.get(r):i?.ctx===r?i:void 0}function qe(e,t){let n=e.get(t.fn);n?n instanceof Map?n.set(t.ctx,t):e.set(t.fn,new Map([[n.ctx,n],[t.ctx,t]])):e.set(t.fn,t)}var z=class extends _{static initHooks=!0;constructor(e){super(),this._map=e,this.callInitHooks()}enable(){return this._enabled||(this._enabled=!0,this.addHooks()),this}disable(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this}enabled(){return!!this._enabled}addHooks(){}removeHooks(){}static addTo(e,t){return e.addHandler(t,this),this}};let Je={clickTolerance:3};var B=class e extends R{static initHooks=!0;static defaultOptions=Je;static _dragging=!1;constructor(e,t,n){if(typeof n==`boolean`)throw Error(`Draggable: the preventOutline argument is removed in Leaflet 2. Pass options as the third argument.`);super(),f(this,n),this._element=e,this._dragStartTarget=t??e,this.callInitHooks()}enable(){this._enabled||=(A(this._dragStartTarget,`pointerdown`,this._onDown,this),!0)}disable(){this._enabled&&(e._dragging===this&&this.finishDrag(!0),M(this._dragStartTarget,`pointerdown`,this._onDown,this),this._enabled=!1,this._moved=!1)}_onDown(t){this._moved=!1;let n=k().length;if(n>1){e._dragging===this&&this.finishDrag();return}let r=t.shiftKey&&this._element.closest(`.leaflet-container`)?.classList.contains(`leaflet-box-zoom`);if(e._dragging||r||t.button!==0&&t.pointerType!==`touch`||(e._dragging=this,ce(),this._moving))return;!n&&t.isTrusted&&t.target.setPointerCapture(t.pointerId),this.fire(`down`);let i=ue(this._element);this._startPoint=new y(t.clientX,t.clientY),this._startPos=T(this._element),this._parentScale=E(i),A(this._dragStartTarget,`pointermove`,this._onMove,this),A(this._dragStartTarget,`pointerup pointercancel lostpointercapture`,this._onUp,this)}_onMove(e){if(k().length>1){this._moved=!0;return}let t=new y(e.clientX,e.clientY)._subtract(this._startPoint),n=Math.abs(t.x)+Math.abs(t.y);!this._moved&&(!n||n<this.options.clickTolerance)||(t.x/=this._parentScale.x,t.y/=this._parentScale.y,e.cancelable&&e.preventDefault(),this._lastEvent=e,this._moved||(this.fire(`dragstart`,{originalEvent:e}),this._moved=!0,this._draggingContainer=this._element.closest(`.leaflet-container`)??this._element,this._draggingContainer.classList.add(`leaflet-dragging`),this._lastTarget=e.target,this._lastTarget.classList.add(`leaflet-drag-target`)),this._newPos=this._startPos.add(t),this._moving=!0,this._updatePosition())}_updatePosition(){let e={originalEvent:this._lastEvent};this.fire(`predrag`,e);let t=window.devicePixelRatio;this._newPos=this._newPos.multiplyBy(t)._round()._divideBy(t),w(this._element,this._newPos),this.fire(`drag`,e)}_onUp(e){e.type===`lostpointercapture`&&e.buttons||this.finishDrag()}finishDrag(t){this._draggingContainer?.classList.remove(`leaflet-dragging`),this._draggingContainer=null,this._lastTarget?.classList.remove(`leaflet-drag-target`),this._lastTarget=null,M(this._dragStartTarget,`pointermove`,this._onMove,this),M(this._dragStartTarget,`pointerup pointercancel lostpointercapture`,this._onUp,this),le();let n=this._moved&&this._moving;this._moving=!1,e._dragging=!1,n&&this.fire(`dragend`,{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}},V=class e{constructor(t,n){if(!t)return;if(t instanceof e)return t;let r=n?[t,n]:t;for(let e of r)this.extend(e)}extend(t){let n,r;if(!t)return this;if(Ye(t))n=r=new y(t);else if({min:n,max:r}=new e(t),!n)return this;return this.min?(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(r.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(r.y,this.max.y)):(this.min=n.clone(),this.max=r.clone()),this}getCenter(e){return new y((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)}getBottomLeft(){return new y(this.min.x,this.max.y)}getTopRight(){return new y(this.max.x,this.min.y)}getTopLeft(){return this.min}getBottomRight(){return this.max}getSize(){return this.max.subtract(this.min)}contains(t){let n,r;return Ye(t)?n=r=new y(t):{min:n,max:r}=new e(t),n.x>=this.min.x&&r.x<=this.max.x&&n.y>=this.min.y&&r.y<=this.max.y}intersects(t){t=new e(t);let n=this.min,r=this.max,i=t.min,a=t.max,o=a.x>=n.x&&i.x<=r.x,s=a.y>=n.y&&i.y<=r.y;return o&&s}overlaps(t){t=new e(t);let n=this.min,r=this.max,i=t.min,a=t.max,o=Math.max(n.x,i.x)<Math.min(r.x,a.x),s=Math.max(n.y,i.y)<Math.min(r.y,a.y);return o&&s}isValid(){return!!(this.min&&this.max)}pad(t){let n=this.min,r=this.max,i=Math.abs(n.x-r.x)*t,a=Math.abs(n.y-r.y)*t;return new e(new y(n.x-i,n.y-a),new y(r.x+i,r.y+a))}equals(t){return t?(t=new e(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function Ye(e){return e instanceof y||(Array.isArray(e)?e.length>0&&typeof e[0]!=`object`:`x`in e)}var H=class{constructor(e,t,n,r){Array.isArray(e)&&([e,t,n,r]=e),this._a=e,this._b=t,this._c=n,this._d=r}transform(e,t){return this._transform(e.clone(),t)}_transform(e,t){return t||=1,e.x=t*(this._a*e.x+this._b),e.y=t*(this._c*e.y+this._d),e}untransform(e,t){return t||=1,new y((e.x/t-this._b)/this._a,(e.y/t-this._d)/this._c)}},U=class e{constructor(t,n){if(!t)return;if(t instanceof e)return t;let r=n?[t,n]:t;for(let e of r)this.extend(e)}extend(t){let n=this._southWest,r=this._northEast,i,a;if(t instanceof W)i=a=t;else if(t instanceof e){if({_southWest:i,_northEast:a}=t,!i)return this}else if(Xe(t))i=a=new W(t);else return this.extend(new e(t));return n?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),r.lat=Math.max(a.lat,r.lat),r.lng=Math.max(a.lng,r.lng)):(this._southWest=new W(i.lat,i.lng),this._northEast=new W(a.lat,a.lng)),this}pad(t){let n=this._southWest,r=this._northEast,i=Math.abs(n.lat-r.lat)*t,a=Math.abs(n.lng-r.lng)*t;return new e(new W(n.lat-i,n.lng-a),new W(r.lat+i,r.lng+a))}getCenter(){return new W((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)}getSouthWest(){return this._southWest}getNorthEast(){return this._northEast}getNorthWest(){return new W(this.getNorth(),this.getWest())}getSouthEast(){return new W(this.getSouth(),this.getEast())}getWest(){return this._southWest.lng}getSouth(){return this._southWest.lat}getEast(){return this._northEast.lng}getNorth(){return this._northEast.lat}contains(t){let n=this._southWest,r=this._northEast,i,a;return Xe(t)?i=a=new W(t):{_southWest:i,_northEast:a}=new e(t),i.lat>=n.lat&&a.lat<=r.lat&&i.lng>=n.lng&&a.lng<=r.lng}intersects(t){t=new e(t);let n=this._southWest,r=this._northEast,i=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>=n.lat&&i.lat<=r.lat,s=a.lng>=n.lng&&i.lng<=r.lng;return o&&s}overlaps(t){t=new e(t);let n=this._southWest,r=this._northEast,i=t.getSouthWest(),a=t.getNorthEast(),o=Math.max(n.lat,i.lat)<Math.min(r.lat,a.lat),s=Math.max(n.lng,i.lng)<Math.min(r.lng,a.lng);return o&&s}toBBoxString(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(`,`)}equals(t,n){return t?(t=new e(t),this._southWest.equals(t.getSouthWest(),n)&&this._northEast.equals(t.getNorthEast(),n)):!1}isValid(){return!!(this._southWest&&this._northEast)}};function Xe(e){return e instanceof W||(Array.isArray(e)?e.length>0&&typeof e[0]!=`object`:typeof e==`object`&&!!e&&`lat`in e)}var W=class e{constructor(t,n,r){if(t instanceof e)return t;let i=t,a=n,o=r;if(Array.isArray(t)?(i=t.length<=3?t[0]:NaN,a=t[1],o=t[2]):typeof t==`object`&&t&&(i=t.lat,a=`lng`in t?t.lng:t.lon,o=t.alt),this.lat=l(i),this.lng=l(a),isNaN(this.lat)||isNaN(this.lng))throw Error(`Invalid LatLng object: (${i}, ${a})`);if(o!=null&&(this.alt=l(o),isNaN(this.alt)))throw Error(`Invalid LatLng altitude: ${o}`)}static validate(t,n,r){try{return!!new e(t,n,r)}catch{return!1}}equals(t,n){return t?(t=new e(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(n??1e-9)):!1}toString(e){return`LatLng(${c(this.lat,e)}, ${c(this.lng,e)})`}distanceTo(t){return Ze(this,new e(t),6371e3)}wrap(){return new e(this.lat,o(this.lng,[-180,180],!0),this.alt)}toBounds(e){let t=180*e/40075017,n=t/Math.cos(Math.PI/180*this.lat);return new U([this.lat-t,this.lng-n],[this.lat+t,this.lng+n])}clone(){let t=new e(0,0);return t.lat=this.lat,t.lng=this.lng,this.alt!==void 0&&(t.alt=this.alt),t}};function Ze(e,t,n){let r=Math.PI/180,i=e.lat*r,a=t.lat*r,o=Math.sin((t.lat-e.lat)*r/2),s=Math.sin((t.lng-e.lng)*r/2),c=Math.min(o*o+Math.cos(i)*Math.cos(a)*s*s,1);return n*(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)))}var Qe=t({_getBitCode:()=>G,_getEdgeIntersection:()=>st,_projectRing:()=>J,_sqClosestPointOnSegment:()=>K,clipSegment:()=>ot,closestPointOnSegment:()=>tt,isFlat:()=>q,pointToSegmentDistance:()=>et,polylineCenter:()=>lt,simplify:()=>$e});function $e(e,t){if(!t||!e.length)return e.slice();let n=t*t;return e=it(e,n),e=nt(e,n),e}function et(e,t,n){return Math.sqrt(K(e,t,n,!0))}function tt(e,t,n){return K(e,t,n)}function nt(e,t){let n=e.length,r=new Uint8Array(n);r[0]=r[n-1]=1,rt(e,r,t,0,n-1);let i,a=[];for(i=0;i<n;i++)r[i]&&a.push(e[i]);return a}function rt(e,t,n,r,i){let a=0,o=0,s,c;for(s=r+1;s<=i-1;s++)c=K(e[s],e[r],e[i],!0),c>a&&(o=s,a=c);a>n&&(t[o]=1,rt(e,t,n,r,o),rt(e,t,n,o,i))}function it(e,t){let n=[e[0]],r=0;for(let i=1;i<e.length;i++)ct(e[i],e[r])>t&&(n.push(e[i]),r=i);return r<e.length-1&&n.push(e[e.length-1]),n}let at;function ot(e,t,n,r,i){let a=e,o=t,s=r?at:G(e,n),c=G(t,n),l,u,d;for(at=c;;){if(!(s|c))return i&&(e!==a&&(e=e.round()),t!==o&&(t=t.round())),[e,t];if(s&c)return!1;l=s||c,u=st(e,t,l,n),d=G(u,n),l===s?(e=u,s=d):(t=u,c=d)}}function st(e,t,n,r,i){let a=t.x-e.x,o=t.y-e.y,s=r.min,c=r.max,l,u;return n&8?(l=e.x+a*(c.y-e.y)/o,u=c.y):n&4?(l=e.x+a*(s.y-e.y)/o,u=s.y):n&2?(l=c.x,u=e.y+o*(c.x-e.x)/a):(l=s.x,u=e.y+o*(s.x-e.x)/a),new y(l,u,i)}function G(e,t){let n=0;return e.x<t.min.x?n|=1:e.x>t.max.x&&(n|=2),e.y<t.min.y?n|=4:e.y>t.max.y&&(n|=8),n}function ct(e,t){let n=t.x-e.x,r=t.y-e.y;return n*n+r*r}function K(e,t,n,r){let i=t.x,a=t.y,o=n.x-i,s=n.y-a,c,l=o*o+s*s;return l>0&&(c=((e.x-i)*o+(e.y-a)*s)/l,c>1?(i=n.x,a=n.y):c>0&&(i+=o*c,a+=s*c)),o=e.x-i,s=e.y-a,r?o*o+s*s:new y(i,a)}function q(e){return!Array.isArray(e[0])||typeof e[0][0]!=`object`&&e[0][0]!==void 0}function lt(e,t){let n=J(e,t),r=n.length,i=0;for(let e=1;e<r;e++)i+=n[e-1].distanceTo(n[e]);i/=2;let a=n[0];for(let e=1,t=0;e<r;e++){let r=n[e-1],o=n[e],s=r.distanceTo(o);if(t+=s,t>i){let e=(t-i)/s;a=new y(o.x-e*(o.x-r.x),o.y-e*(o.y-r.y));break}}return t.unproject(a)}function J(e,t){if(!e||e.length===0)throw Error(`latlngs not passed`);return q(e)?e.map(e=>t.project(new W(e))):(console.warn(`latlngs are not flat! Only the first ring will be used`),J(e[0],t))}var ut=t({centroid:()=>mt,clipPolygon:()=>dt,polygonCenter:()=>pt});function dt(e,t,n){for(let r of[1,4,2,8]){if(!e.length)break;let i=[],a=e[e.length-1],o=ft(a,r,t);for(let s of e){let e=ft(s,r,t);e!==o&&i.push(st(a,s,r,t,n)),e||i.push(s),a=s,o=e}e=i}return e}function ft(e,t,n){return t===1?e.x<n.min.x:t===2?e.x>n.max.x:t===4?e.y<n.min.y:e.y>n.max.y}function pt(e,t){let n=J(e,t),r=n[0].clone(),i=n.length;for(let e of n)e._subtract(r);let a=0,o=0,s=0;for(let e=0,t=i-1;e<i;t=e++){let r=n[e],i=n[t],c=r.y*i.x-i.y*r.x;o+=(r.x+i.x)*c,s+=(r.y+i.y)*c,a+=c}if(a!==0)return t.unproject(new y(o/(3*a),s/(3*a))._add(r));let c=new V(n).getCenter(),l=n[0];for(let e=0,t=i-1;e<i;t=e++){let r=K(c,n[t],n[e]);r.distanceTo(c)<l.distanceTo(c)&&(l=r)}return t.unproject(l._add(r))}function mt(e){let t=0,n=0,r=0;for(let i of e){let e=new W(i);t+=e.lat,n+=e.lng,r++}return new W([t/r,n/r])}let ht={project(e){return e=new W(e),new y(e.lng,e.lat)},unproject(e){return e=new y(e),new W(e.y,e.x)},bounds:new V([-180,-90],[180,90])},gt={R:6378137,R_MINOR:6356752.314245179,bounds:new V([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project(e){e=new W(e);let t=Math.PI/180,n=this.R,r=this.R_MINOR/n,i=Math.sqrt(1-r*r),a=e.lat*t,o=i*Math.sin(a),s=Math.tan(Math.PI/4-a/2)/((1-o)/(1+o))**(i/2);return a=-n*Math.log(Math.max(s,1e-10)),new y(e.lng*t*n,a)},unproject(e){e=new y(e);let t=180/Math.PI,n=this.R,r=this.R_MINOR/n,i=Math.sqrt(1-r*r),a=Math.exp(-e.y/n),o=Math.PI/2-2*Math.atan(a);for(let e=0,t=.1,n;e<15&&Math.abs(t)>1e-7;e++)n=i*Math.sin(o),n=((1-n)/(1+n))**(i/2),t=Math.PI/2-2*Math.atan(a*n)-o,o+=t;return new W(o*t,e.x*t/n)}},_t=6378137,vt={R:_t,MAX_LATITUDE:85.0511287798,project(e){e=new W(e);let t=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,e.lat),-n),i=Math.sin(r*t);return new y(this.R*e.lng*t,this.R*Math.log((1+i)/(1-i))/2)},unproject(e){e=new y(e);let t=180/Math.PI;return new W((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*t,e.x*t/this.R)},bounds:(()=>{let e=_t*Math.PI;return new V([-e,-e],[e,e])})()};var yt=class{static code;static projection;static transformation;static wrapLng;static wrapLat;static distance;static latLngToPoint(e,t){let n=this.projection.project(e),r=this.scale(t);return this.transformation._transform(n,r)}static pointToLatLng(e,t){let n=this.scale(t),r=this.transformation.untransform(e,n);return this.projection.unproject(r)}static project(e){return this.projection.project(e)}static unproject(e){return this.projection.unproject(e)}static scale(e){return 256*2**e}static zoom(e){return Math.log(e/256)/Math.LN2}static getProjectedBounds(e){if(this.infinite)return null;let t=this.projection.bounds,n=this.scale(e);return new V(this.transformation.transform(t.min,n),this.transformation.transform(t.max,n))}static infinite=!1;static wrapLatLng(e){e=new W(e);let t=this.wrapLng?o(e.lng,this.wrapLng,!0):e.lng,n=this.wrapLat?o(e.lat,this.wrapLat,!0):e.lat,r=e.alt;return new W(n,t,r)}static wrapLatLngBounds(e){e=new U(e);let t=e.getCenter(),n=this.wrapLatLng(t),r=t.lat-n.lat,i=t.lng-n.lng;if(r===0&&i===0)return e;let a=e.getSouthWest(),o=e.getNorthEast();return new U(new W(a.lat-r,a.lng-i),new W(o.lat-r,o.lng-i))}},Y=class extends yt{static wrapLng=[-180,180];static R=6371e3;static distance(e,t){return Ze(e,t,this.R)}},bt=class extends Y{static code=`EPSG:3395`;static projection=gt;static transformation=(()=>{let e=.5/(Math.PI*gt.R);return new H(e,.5,-e,.5)})()},xt=class extends Y{static code=`EPSG:3857`;static projection=vt;static transformation=(()=>{let e=.5/(Math.PI*vt.R);return new H(e,.5,-e,.5)})()},St=class extends xt{static code=`EPSG:900913`},Ct=class extends Y{static code=`EPSG:4326`;static projection=ht;static transformation=new H(1/180,1,-1/180,.5)},wt=class extends Y{static wrapLng=void 0;static transformation=new H(1,0,-1,0);static resolutions=[];static scale(e){let t=this.resolutions,n=Math.min(Math.max(Math.floor(e),0),t.length-2);return(t[n]/t[n+1])**(e-n)/t[n]}static zoom(e){let t=this.resolutions,n=0;for(;n<t.length-2&&t[n+1]*e>=1;)n++;return n+Math.log(t[n]*e)/Math.log(t[n]/t[n+1])}},Tt=class extends yt{static projection=ht;static transformation=new H(1,0,-1,0);static scale(e){return 2**e}static zoom(e){return Math.log(e)/Math.LN2}static distance(e,t){let n=t.lng-e.lng,r=t.lat-e.lat;return Math.sqrt(n*n+r*r)}static infinite=!0};let Et={pane:`overlayPane`,attribution:null,bubblingPointerEvents:!0};var Dt=class extends R{static defaultOptions=Et;addTo(e){return e.addLayer(this),this}remove(){return this.removeFrom(this._map||this._mapToAdd)}removeFrom(e){return e?.removeLayer(this),this}getPane(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)}addInteractiveTarget(e){return this._map._targets[i(e)]=this,this}removeInteractiveTarget(e){return delete this._map._targets[i(e)],this}getAttribution(){return this.options.attribution}_layerAdd(e){let t=e.target;if(t.hasLayer(this)){if(this._map=t,this._zoomAnimated=t._zoomAnimated,this.getEvents){let e=this.getEvents();t.on(e,this),this.once(`remove`,()=>t.off(e,this))}this.onAdd(t),this.fire(`add`),t.fire(`layeradd`,{layer:this})}}};let Ot=new WeakMap,kt={interactive:!1,offset:[0,0],className:``,content:``};var At=class extends Dt{static initHooks=!0;static defaultOptions=kt;constructor(e,t){super(),e instanceof W||Array.isArray(e)?(this._latlng=new W(e),f(this,t)):(f(this,e),this._source=t),this.options.content&&(this._content=this.options.content),this.callInitHooks()}openOn(e){return e=arguments.length?e:this._source._map,e.hasLayer(this)||e.addLayer(this),this}close(){return this._map?.removeLayer(this),this}toggle(e){return this._map?this.close():(arguments.length?this._source=e:e=this._source,this._prepareOpen()&&this.openOn(e._map)),this}onAdd(e){this._container||this._initLayout(),e._fadeAnimated&&(this._container.style.opacity=`0`),clearTimeout(this._removeTimeout),this.getPane().append(this._container),this.update(),e._fadeAnimated&&(this._container.style.opacity=`1`),this.bringToFront(),this.options.interactive&&(this._container.classList.add(`leaflet-interactive`),this.addInteractiveTarget(this._container))}onRemove(e){e._fadeAnimated?(this._container.style.opacity=`0`,this._removeTimeout=setTimeout(()=>this._container.remove(),200)):this._container.remove(),this.options.interactive&&(this._container.classList.remove(`leaflet-interactive`),this.removeInteractiveTarget(this._container))}getLatLng(){return this._latlng}setLatLng(e){return this._latlng=new W(e),this._map&&(this._updatePosition(),this._adjustPan()),this}getContent(){return this._content}setContent(e){return this._content=e,this.update(),this}getElement(){return this._container}update(){this._map&&(this._container.style.visibility=`hidden`,this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility=``,this._adjustPan())}getEvents(){return{zoom:this._updatePosition,viewreset:this._updatePosition,zoomanim:this._animateZoom}}isOpen(){return!!this._map?.hasLayer(this)}bringToFront(){return this._map&&x(this._container),this}bringToBack(){return this._map&&S(this._container),this}_prepareOpen(e){let t=this._source;if(!t._map)return!1;let n=t._getOverlaySource();if(!n)return!1;if(this._source=n,e??=n.getCenter?.()??n.getLatLng?.()??n.getBounds?.().getCenter(),!e)throw Error(`Unable to get source layer LatLng.`);return this.setLatLng(e),this._map&&this.update(),!0}_updateContent(){if(this._content==null)return;let e=this._contentNode,t=typeof this._content==`function`?this._content(this._source??this):this._content;typeof t==`string`?e.innerHTML=t:t instanceof DocumentFragment?(t.hasChildNodes()&&Ot.set(t,[...t.childNodes]),e.replaceChildren(...Ot.get(t)??[])):e.replaceChildren(t),this.fire(`contentupdate`)}_updatePosition(){if(!this._map)return;let e=this._map._snapLayerPoint(this._map.latLngToLayerPoint(this._latlng)),t=new y(this.options.offset);w(this._container,e.add(this._getAnchor()));let n=this._containerBottom=-t.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+t.x;this._container.style.bottom=`${n}px`,this._container.style.left=`${r}px`}_getAnchor(){return[0,0]}};let jt={pane:`popupPane`,offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,closeButtonLabel:`Close popup`,autoClose:!0,closeOnEscapeKey:!0,className:``,trackResize:!0};var Mt=class extends At{static defaultOptions=jt;openOn(e){return e=arguments.length?e:this._source._map,!e.hasLayer(this)&&e._popup?.options.autoClose&&e.removeLayer(e._popup),e._popup=this,super.openOn(e),this._updateSourceAria(!0),this}onAdd(e){super.onAdd(e),e.fire(`popupopen`,{popup:this}),this._updateSourceAria(!0),this._source&&(this._source.fire(`popupopen`,{popup:this},!0),this._source._togglesPopupOnClick()&&this._source.on(`preclick`,N))}onRemove(e){if(this._container.contains(document.activeElement)){let t=this._source?.getElement?.();(t&&t.tabIndex>=0?t:e._container).focus()}super.onRemove(e),e.fire(`popupclose`,{popup:this}),this._updateSourceAria(!1),this._source&&(this._source.fire(`popupclose`,{popup:this},!0),this._source._togglesPopupOnClick()&&this._source.off(`preclick`,N))}getEvents(){let e=super.getEvents();return(this.options.closeOnClick??this._map.options.closePopupOnClick)&&(e.preclick=this.close),this.options.keepInView&&(e.moveend=this._adjustPan),e}_updateSourceAria(e){this._ariaSource?.setAttribute(`aria-expanded`,`false`),this._ariaSource?.removeAttribute(`aria-controls`);let t=this._source?.getElement?.();this._ariaSource=t?.getAttribute(`role`)===`button`?t:null,this._ariaSource?.setAttribute(`aria-expanded`,String(e)),e&&this._ariaSource?.setAttribute(`aria-controls`,this._container.id)}_initLayout(){let e=`leaflet-popup`,t=this._container=b(`div`,`${e} ${this.options.className||``} leaflet-zoom-animated`);t.id=`leaflet-popup-${i(this)}`;let n=this._wrapper=b(`div`,`${e}-content-wrapper`,t);if(this._contentNode=b(`div`,`${e}-content`,n),P(t),je(this._contentNode),A(t,`contextmenu`,N),this._tipContainer=b(`div`,`${e}-tip-container`,t),this._tip=b(`div`,`${e}-tip`,this._tipContainer),this.options.closeButton){let n=this._closeButton=b(`a`,`${e}-close-button`,t);n.setAttribute(`role`,`button`),n.setAttribute(`aria-label`,this._map.translate(this.options.closeButtonLabel)),we(n),n.href=`#close`,n.textContent=`×`,A(n,`click`,e=>{e.preventDefault(),this.close()})}this.options.trackResize&&(this._resizeObserver=new ResizeObserver(()=>{this._map&&(this._updateLayout(),this._updatePosition(),this._adjustPan())}),this._resizeObserver.observe(this._contentNode))}_updateLayout(){let e=this._contentNode,t=e.style;t.maxWidth=`${this.options.maxWidth}px`,t.minWidth=`${this.options.minWidth}px`,t.height=``;let n=this.options.maxHeight,r=!!n&&e.offsetHeight>n;r&&(t.height=`${n}px`),e.classList.toggle(`leaflet-popup-scrolled`,r),this._containerWidth=this._container.offsetWidth,this._containerHeight=this._container.offsetHeight}_animateZoom(e){let t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();w(this._container,t.add(n))}_adjustPan(){if(!this.options.autoPan||(this._map._panAnim?.stop(),!this._map))return;if(this._autopanning){this._autopanning=!1;return}let e=this._map,t=parseInt(getComputedStyle(this._container).marginBottom,10)||0,n=this._containerHeight+t,r=this._containerWidth,i=new y(this._containerLeft,-n-this._containerBottom);i._add(T(this._container));let a=e.layerPointToContainerPoint(i),o=new y(this.options.autoPanPadding),s=new y(this.options.autoPanPaddingTopLeft??o),c=new y(this.options.autoPanPaddingBottomRight??o),l=e.getSize(),u=0,d=0;a.x+r+c.x>l.x&&(u=a.x+r-l.x+c.x),a.x-u-s.x<0&&(u=a.x-s.x),a.y+n+c.y>l.y&&(d=a.y+n-l.y+c.y),a.y-d-s.y<0&&(d=a.y-s.y),(u||d)&&(this.options.keepInView&&(this._autopanning=!0),e.fire(`autopanstart`).panBy([u,d]))}_getAnchor(){return new y(this._source?._getPopupAnchor?this._source._getPopupAnchor():[0,0])}};let Nt={pane:`tooltipPane`,offset:[0,0],direction:`auto`,permanent:!1,sticky:!1,opacity:.9},Pt={top:[.5,1],bottom:[.5,0],center:[.5,.5],right:[0,.5],left:[1,.5]};var Ft=class extends At{static defaultOptions=Nt;onAdd(e){super.onAdd(e),this.setOpacity(this.options.opacity),e.fire(`tooltipopen`,{tooltip:this}),this._source&&(this.addEventParent(this._source),this._ariaSource=this._source.getElement?.(),this._ariaSource&&It(this._ariaSource,this._container.id,!0),this._source.fire(`tooltipopen`,{tooltip:this},!0))}onRemove(e){super.onRemove(e),e.fire(`tooltipclose`,{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._ariaSource&&It(this._ariaSource,this._container.id,!1),this._ariaSource=null,this._source.fire(`tooltipclose`,{tooltip:this},!0))}getEvents(){let e=super.getEvents();return this.options.permanent||(e.preclick=this.close),e}_initLayout(){let e=`leaflet-tooltip ${this.options.className||``} leaflet-zoom-animated`;this._contentNode=this._container=b(`div`,e),this._container.setAttribute(`role`,`tooltip`),this._container.id=`leaflet-tooltip-${i(this)}`}_updateLayout(){}_adjustPan(){}_setPosition(e){let t=this._container,n=new y(this.options.offset).clone(),r=this.options.direction;r in Pt||(r=e.x<=this._map._getCenterLayerPoint().x?`right`:`left`,r===`left`&&(n.x=-n.x));let[i,a]=Pt[r],o=this._getAnchor(r).add(n);for(let e in Pt)t.classList.toggle(`leaflet-tooltip-${e}`,e===r);t.style.translate=`${-i*100}% ${-a*100}%`,t.style.translate=`round(${-i*100}%, 1px) round(${-a*100}%, 1px)`,w(t,e._add(o))}_updatePosition(){let e=this._map._snapLayerPoint(this._map.latLngToLayerPoint(this._latlng));this._setPosition(e)}setOpacity(e){this.options.opacity=e,this._container&&(this._container.style.opacity=`${e}`)}_animateZoom(e){let t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(t)}_getAnchor(e){return new y(this._source?._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor(e):[0,0])}};function It(e,t,n){let r=d(e.getAttribute(`aria-describedby`)??``).filter(e=>e&&e!==t);n&&r.push(t),r.length?e.setAttribute(`aria-describedby`,r.join(` `)):e.removeAttribute(`aria-describedby`)}let Lt=new WeakMap;var X=class extends Dt{bindPopup(e,t){let n=this._initOverlay(Mt,this._popup,e,t);return n!==this._popup&&this.closePopup(),this._popup=n,this._popup._updateSourceAria(this._popup.isOpen()),this.on({click:this._openPopup,remove:this.closePopup,move:this._movePopup}),this}unbindPopup(){if(this._popup){this.off({click:this._openPopup,remove:this.closePopup,move:this._movePopup});let e=this.getElement?.();e?.removeAttribute(`aria-expanded`),e?.removeAttribute(`aria-controls`),this._popup=null}return this}openPopup(e){return this._popup&&(this._getOverlaySource()===this&&(this._popup._source=this),this._popup._prepareOpen(e)&&this._popup.openOn(this._map)),this}closePopup(){return this._popup?.close(),this}togglePopup(){return this._popup?.toggle(this),this}isPopupOpen(){return this._popup?.isOpen()??!1}setPopupContent(e){return this._popup?.setContent(e),this}getPopup(){return this._popup}_openPopup(e){if(!this._popup||!this._map)return;N(e);let t=e.propagatedFrom??e.target;this._popup._source===t&&t._togglesPopupOnClick()&&this._map.hasLayer(this._popup)?this.closePopup():(this._popup._source=t,this.openPopup(e.latlng))}_movePopup(e){this._popup.setLatLng(e.latlng)}bindTooltip(e,t){let n=this.isTooltipOpen()?null:this._tooltip;return this._tooltip&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ft,n,e,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map?.hasLayer(this)&&this.openTooltip(),this}unbindTooltip(){return this._tooltip&&=(this._initTooltipInteractions(!0),this.closeTooltip(),null),this}_initTooltipInteractions(e){let{permanent:t,sticky:n}=this._tooltip.options,r={remove:this.closeTooltip,move:this._moveTooltip};t?r.add=this._openTooltip:(r.pointerover=this._openTooltip,r.pointerout=this.closeTooltip,r.click=this._openTooltip,r.add=this._toggleFocusListeners,this._map&&this._toggleFocusListeners(!e)),n&&(r.pointermove=this._moveTooltip),this[e?`off`:`on`](r)}openTooltip(e){return this._tooltip&&(this._getOverlaySource()===this&&(this._tooltip._source=this),this._tooltip._prepareOpen(e)&&this._tooltip.openOn(this._map)),this}closeTooltip(){return this._tooltip?.close(),this}toggleTooltip(){return this._tooltip?.toggle(this),this}isTooltipOpen(){return this._tooltip?.isOpen()??!1}setTooltipContent(e){return this._tooltip?.setContent(e),this}getTooltip(){return this._tooltip}_toggleFocusListeners(e){this.getElement?this._addFocusListenersOnLayer(this,!e):this.eachLayer&&this.eachLayer(t=>this._addFocusListenersOnLayer(t,!e))}_addFocusListenersOnLayer(e,t){let n=e.getElement?.();if(!n)return;let r=Lt.get(n);if(r&&M(n,`focus`,r,this),t){Lt.delete(n),M(n,`blur`,this.closeTooltip,this);return}let i=()=>{this._tooltip&&n.matches(`:focus-visible`)&&(this._tooltip._source=e,this.openTooltip())};Lt.set(n,i),A(n,`focus`,i,this),A(n,`blur`,this.closeTooltip,this)}_openTooltip(e){this._tooltip&&this._map&&(this._map.dragging.moving()?e.type===`add`&&!this._moveEndOpensTooltip&&(this._moveEndOpensTooltip=!0,this._map.once(`moveend`,()=>{this._moveEndOpensTooltip=!1,this._openTooltip(e)})):(this._tooltip._source=e.propagatedFrom??e.target,this.openTooltip(this._tooltip.options.sticky?e.latlng:void 0)))}_moveTooltip(e){let t=this._tooltip;t.setLatLng(t.options.sticky&&e.originalEvent?this._map.pointerEventToLatLng(e.originalEvent):e.latlng)}_initOverlay(e,t,n,r){let i=n;return i instanceof e?(f(i,r),i._source=this):(i=t&&!r?t:new e(r,this),i.setContent(n)),i}_getOverlaySource(){return this}_togglesPopupOnClick(){return!0}};function Rt(e,t){return e=new W(e),e.alt===void 0?[c(e.lng,t),c(e.lat,t)]:[c(e.lng,t),c(e.lat,t),c(e.alt,t)]}function zt(e,t,n,r){if(!q(e))return e.map(e=>zt(e,t,n,r));let i=e.map(e=>Rt(e,r));return n&&i.length>0&&i.push(i[0].slice()),i}function Z(e,t){return e.feature?{...e.feature,geometry:t}:Bt(t)}function Bt(e){return e.type===`Feature`||e.type===`FeatureCollection`?e:{type:`Feature`,properties:{},geometry:e}}function Vt(e,t){return Z(e,{type:`Point`,coordinates:Rt(e.getLatLng(),t)})}var Ht=class extends X{static initHooks=!0;constructor(e,t){super(),f(this,t),this._layers={};for(let t of e??[])this.addLayer(t);this.callInitHooks()}addLayer(e){let t=this.getLayerId(e);return this._layers[t]=e,this._map?.addLayer(e),this}removeLayer(e){let t=typeof e==`number`?e:this.getLayerId(e);return this._map&&this._layers[t]&&this._map.removeLayer(this._layers[t]),delete this._layers[t],this}hasLayer(e){return(typeof e==`number`?e:this.getLayerId(e))in this._layers}clearLayers(){return this.eachLayer(this.removeLayer,this)}onAdd(e){this.eachLayer(e.addLayer,e)}onRemove(e){this.eachLayer(e.removeLayer,e)}eachLayer(e,t){for(let n of Object.values(this._layers))e.call(t,n);return this}getLayer(e){return this._layers[e]}getLayers(){let e=[];return this.eachLayer(t=>e.push(t)),e}setZIndex(e){for(let t of Object.values(this._layers))t.setZIndex?.(e);return this}getLayerId(e){return i(e)}toMultiPoint(e){let t=[];return this.eachLayer(n=>{t.push(n.toGeoJSON(e).geometry.coordinates)}),Z(this,{type:`MultiPoint`,coordinates:t})}toGeoJSON(e){let t=this.feature?.geometry?.type;if(t===`MultiPoint`)return this.toMultiPoint(e);let n=t===`GeometryCollection`,r=[];return this.eachLayer(t=>{if(t.toGeoJSON){let i=t.toGeoJSON(e);if(n)r.push(i.geometry);else{let e=Bt(i);e.type===`FeatureCollection`?r.push(...e.features):r.push(e)}}}),n?Z(this,{geometries:r,type:`GeometryCollection`}):{type:`FeatureCollection`,features:r}}},Q=class e extends Ht{addLayer(e){return this.hasLayer(e)?this:(e.addEventParent(this),super.addLayer(e),this.fire(`layeradd`,{layer:e}))}removeLayer(e){return this.hasLayer(e)?(typeof e==`number`&&(e=this._layers[e]),e.removeEventParent(this),super.removeLayer(e),this.fire(`layerremove`,{layer:e})):this}setStyle(e){for(let t of Object.values(this._layers))t.setStyle?.(e);return this}bringToFront(){for(let e of Object.values(this._layers))e.bringToFront?.();return this}bringToBack(){for(let e of Object.values(this._layers))e.bringToBack?.();return this}getBounds(){let t=new U;for(let n of Object.values(this._layers))n.getBounds?t.extend(n.getBounds()):n.getLatLng?t.extend(n.getLatLng()):n instanceof Ht&&t.extend(e.prototype.getBounds.call(n));return t}_getOverlaySource(){return Object.values(this._layers).find(e=>e._map)}};let Ut={iconUrl:null,iconRetinaUrl:null,iconSize:null,iconAnchor:null,popupAnchor:[0,0],tooltipAnchor:[0,0],shadowUrl:null,shadowRetinaUrl:null,shadowSize:null,shadowAnchor:null,className:``,crossOrigin:!1};var Wt=class extends _{static initHooks=!0;static defaultOptions=Ut;constructor(e){super(),f(this,e),this.callInitHooks()}createIcon(e){return this._createIcon(`icon`,e)}createShadow(e){return this._createIcon(`shadow`,e)}_createIcon(e,t){let n=this._getIconUrl(e);if(!n){if(e===`icon`)throw Error(`iconUrl not set in Icon options (see the docs).`);return null}let r=this._createImg(n,t instanceof HTMLImageElement?t:null);return this._setIconStyles(r,e),r.crossOrigin=this.options.crossOrigin||this.options.crossOrigin===``?this.options.crossOrigin===!0?``:this.options.crossOrigin:null,r}_getBox(e){let t=this.options,n=t[`${e}Size`],[r,i]=(typeof n==`number`?[n,n]:Array.isArray(n)?n:[n?.x,n?.y]).map(l),a=e===`shadow`&&t.shadowAnchor||t.iconAnchor;return{width:r,height:i,anchor:y.validate(a)?new y(a):{x:r/2,y:i/2}}}_getTooltipAnchor(e){let{x:t,y:n}=new y(this.options.tooltipAnchor);if(e===`left`)return new y(-t,n);if(e===`center`)return new y(0,n);if(e!==`top`&&e!==`bottom`)return new y(t,n);let{height:r,anchor:i}=this._getBox(`icon`);return new y(0,(e===`top`?-i.y:r-i.y)||0)}_setIconStyles(e,t){let n=this.options,{width:r,height:i,anchor:a}=this._getBox(t);e.className=`leaflet-marker-${t} ${n.className||``}`;let{style:o}=e;o.marginLeft=o.marginTop=o.transformOrigin=o.width=o.height=``,isNaN(a.x)||(o.marginLeft=`${-a.x}px`),isNaN(a.y)||(o.marginTop=`${-a.y}px`),!isNaN(a.x)&&!isNaN(a.y)&&(o.transformOrigin=`${a.x}px ${a.y}px`),isNaN(r)||(o.width=`${r}px`),isNaN(i)||(o.height=`${i}px`)}_createImg(e,t){return t??=document.createElement(`img`),t.src=e,t}_getIconUrl(e){return window.devicePixelRatio>1&&this.options[`${e}RetinaUrl`]||this.options[`${e}Url`]}};let Gt=(e,t,n,r,i=``)=>`data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25.59 47.09" fill="%23fff" stroke-width="1.1"><radialGradient id="c"><stop stop-opacity=".3"/><stop offset="1" stop-opacity="0"/></radialGradient><ellipse cx="12.8" cy="41.53" rx="10.5" ry="5" fill="url(%23c)"/><linearGradient id="a" x2="0" y1="1"><stop stop-color="${e}"/><stop offset="1" stop-color="${t}" stop-opacity=".75"/></linearGradient><linearGradient id="b" x2="0" y1=".5"><stop stop-color="${n}"/><stop offset="1" stop-color="${r}"/></linearGradient><circle cx="12.8" cy="13.63" r="4.7"/><path id="p" d="M12.84 1.74c-6.57 0-12.04 5.69-12.04 11.87 0 2.78 1.56 6.31 2.69 8.75l9.31 17.87 9.26-17.87c1.13-2.44 2.74-5.79 2.74-8.75 0-6.18-5.38-11.87-11.96-11.87Zm0 7.16a4.71 4.71 0 0 1 4.68 4.71c0 2.59-2.1 4.66-4.68 4.68-2.58-.02-4.68-2.09-4.68-4.68a4.71 4.71 0 0 1 4.68-4.71Z"/><use href="%23p" fill="url(%23a)" stroke="url(%23b)"/>${i}</svg>`,Kt={iconUrl:Gt(`%23126FC6`,`%23107BC2`,`%232E6C97`,`%233883B7`),iconSize:[25,46],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],color:null};var qt=class extends Wt{static defaultOptions=Kt;_getIconUrl(e){let{color:t}=this.options;if(!t||e!==`icon`)return super._getIconUrl(e);let n=t.replace(`#`,`%23`);return Gt(n,n,n,n,`<use href="%23p" fill="none" stroke="%23666" stroke-opacity=".4"/>`)}};let Jt={ArrowLeft:[-1,0],ArrowRight:[1,0],ArrowUp:[0,-1],ArrowDown:[0,1]};var Yt=class extends z{static initHooks=!0;constructor(e){super(e._map),this._marker=e,this.callInitHooks()}addHooks(){let e=this._marker._icon;this._draggable||=new B(e),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),A(e,`keydown keyup blur`,this._onKey,this),e.classList.add(`leaflet-marker-draggable`)}removeHooks(){this._keyDrag=!1,this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),M(this._draggable._element,`keydown keyup blur`,this._onKey,this),this._marker._icon?.classList.remove(`leaflet-marker-draggable`)}moved(){return this._draggable?._moved}_adjustPan(e){let t=this._marker,n=t._map,r=this._marker.options.autoPanSpeed,i=new y(this._marker.options.autoPanPadding),a=t._icon,o=T(a),s=n.getPixelBounds(),c=n.getPixelOrigin(),l=s.min._subtract(c)._add(i),u=s.max._subtract(c)._subtract(i),d=Math.max(o.x-u.x,0)+Math.min(o.x-l.x,0),f=Math.max(o.y-u.y,0)+Math.min(o.y-l.y,0);if(d||f){let t=n._limitOffset(new y(i.x?d/i.x*r:Math.sign(d)*r,i.y?f/i.y*r:Math.sign(f)*r),n.options.maxBounds)._round();if(!t.x&&!t.y)return;n.panBy(t,{animate:!1}),this._draggable._newPos._add(t),this._draggable._startPos._add(t),w(a,this._draggable._newPos),this._onDrag(e),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,e))}}_onDragStart(e){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup?.();let{originalEvent:t}=e;this._marker.fire(`movestart`,{originalEvent:t}).fire(`dragstart`,{originalEvent:t})}_onPreDrag(e){this._marker.options.autoPan&&(cancelAnimationFrame(this._panRequest),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,e)))}_onDrag(e){let t=this._marker,n=T(t._icon),r=t._map.layerPointToLatLng(n),{alt:i}=this._oldLatLng;i!==void 0&&(r.alt=i),t._positionElements(n),t._latlng=r,e.latlng=r,e.oldLatLng=this._oldLatLng,t.fire(`move`,e).fire(`drag`,e)}_onDragEnd(e){cancelAnimationFrame(this._panRequest),this._marker.fire(`moveend`).fire(`dragend`,e)}_onKey(e){let t=e,n=Jt[t.key],r=this._draggable,{options:i,_map:a}=this._marker;if(e.type!==`keydown`)this._keyDrag&&(this._keyDrag=!1,r.finishDrag());else if(n&&t.target===r._element&&!(t.altKey||t.ctrlKey||t.metaKey)){if(e.preventDefault(),!this._keyDrag){if(B._dragging)return;B._dragging=r,r._startPos=r._newPos=T(r._element),r._moved=r._moving=this._keyDrag=!0,r.fire(`dragstart`,{originalEvent:t})}r._newPos=r._newPos.add(new y(...n).multiplyBy(t.shiftKey?30:10)),w(r._element,r._newPos),r.fire(`drag`,{originalEvent:t}),i.autoPan&&a.panInside(this._marker._latlng,{padding:i.autoPanPadding,animate:!1})}}};let Xt={icon:new qt,interactive:!0,keyboard:!0,title:``,alt:`Marker`,zIndexOffset:0,opacity:1,rotation:null,riseOnHover:!1,riseOffset:250,pane:`markerPane`,shadowPane:`shadowPane`,bubblingPointerEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10};var Zt=class extends X{static initHooks=!0;static defaultOptions=Xt;constructor(e,t){super(),f(this,t),this._latlng=new W(e),this.callInitHooks()}onAdd(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation,this._zoomAnimated&&e.on(`zoomanim`,this._animateZoom,this),this._initIcon(),this.update()}onRemove(e){this.dragging&&(this.options.draggable=this.dragging.enabled(),this.options.draggable&&this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&e.off(`zoomanim`,this._animateZoom,this),this._removeIcon(),this._removeShadow()}getEvents(){return{zoom:this.update,viewreset:this.update}}getLatLng(){return this._latlng}setLatLng(e){let t=this._latlng;return this._latlng=new W(e),this.update(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})}setZIndexOffset(e){return this.options.zIndexOffset=e,this.update()}getIcon(){return this.options.icon}setIcon(e){return this.options.icon=e,this._map&&(this._initIcon(),this.update()),this}getElement(){return this._icon}update(){if(this._icon&&this._map){let e=this._map._snapLayerPoint(this._map.latLngToLayerPoint(this._latlng));this._setPos(e)}return this}_initIcon(){let e=this.options,t=`leaflet-zoom-${this._zoomAnimated?`animated`:`hide`}`,n=e.icon.createIcon(this._icon),r=!1;n!==this._icon&&(this._icon&&this._removeIcon(),r=!0,e.title&&(n.title=e.title),n instanceof HTMLImageElement&&(n.alt=e.alt?this._map.translate(e.alt):``)),n.classList.add(t),e.keyboard&&(n.tabIndex=0,e.interactive&&(n.setAttribute(`role`,`button`),A(n,`keydown`,this._onKeyDown,this))),this._icon=n,this._popup?._source===this&&this._popup._updateSourceAria(this._popup.isOpen()),A(n,`focusin focusout`,this._updateRise,this),e.riseOnHover&&A(n,`pointerover pointerout`,this._updateRise,this),this.options.autoPanOnFocus&&A(n,`focus`,this._panOnFocus,this);let i=e.icon.createShadow?.(this._shadow)??null,a=!1;i!==this._shadow&&(this._removeShadow(),a=!0),i&&(i.classList.add(t),i.alt=``),this._shadow=i,e.opacity<1&&this._updateOpacity(),r&&this.getPane().append(n),this._initInteraction(),i&&a&&this.getPane(e.shadowPane).append(i)}_removeIcon(){let e=this._icon;M(e,`pointerover pointerout focusin focusout`,this._updateRise,this),M(e,`focus`,this._panOnFocus,this),M(e,`keydown`,this._onKeyDown,this),this._hovered=this._focused=!1,e.remove(),this.removeInteractiveTarget(e),this._icon=null}_removeShadow(){this._shadow?.remove(),this._shadow=null}_setPos(e){this._positionElements(e),this._zIndex=Math.round(e.y)+this.options.zIndexOffset,this._updateRise()}_positionElements(e){let t=this.options.rotation;this._icon&&(w(this._icon,e),t!=null&&(this._icon.style.transform+=` rotate(${t}deg)`)),this._shadow&&(w(this._shadow,e),this._shadow.style.display=t==null?``:`none`)}_updateZIndex(e){this._icon&&(this._icon.style.zIndex=`${this._zIndex+e}`)}_animateZoom(e){let t=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center)._round();this._setPos(t)}_initInteraction(){if(!this.options.interactive)return;let e=this._icon;if(e.classList.add(`leaflet-interactive`),this.addInteractiveTarget(e),this.dragging?._draggable?._element===e){e.classList.toggle(`leaflet-marker-draggable`,this.dragging.enabled());return}let t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Yt(this),t&&this.dragging.enable()}getRotation(){return this.options.rotation}setRotation(e){return this.options.rotation=e,this._icon&&!this._map._animatingZoom&&(this._positionElements(T(this._icon)),this._popup?._updatePosition(),this._tooltip?._updatePosition()),this}setOpacity(e){return this.options.opacity=e,this._map&&this._updateOpacity(),this}toGeoJSON(e){return Vt(this,e)}_updateOpacity(){for(let e of[this._icon,this._shadow])e&&(e.style.opacity=`${this.options.opacity}`)}_updateRise(e){e?.type.startsWith(`pointer`)?this._hovered=e.type===`pointerover`:e&&(this._focused=e.type===`focusin`),this._hovered||this._focused?this._bringToFront():this._resetZIndex()}_bringToFront(){this._updateZIndex(this.options.riseOffset)}_resetZIndex(){this._updateZIndex(0)}_onKeyDown(e){if(e.target===this._icon&&!e.repeat&&(e.key===`Enter`||e.key===` `)){e.preventDefault(),this._icon?.click();let t=this._map?._popup;t?.isOpen()&&t._ariaSource===this._icon&&(t.getElement()?.querySelector(`a[href], button, input, select, textarea, [tabindex="0"]`))?.focus({preventScroll:!0})}}_panOnFocus(){let e=this._map;if(!e)return;let t=this._icon,n=getComputedStyle(t),r=new y(-parseFloat(n.marginLeft)||0,-parseFloat(n.marginTop)||0),i=new y(t.offsetWidth,t.offsetHeight);e.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:i.subtract(r)})}_getPopupAnchor(){return this._rotateAnchor(this.options.icon.options.popupAnchor)}_getTooltipAnchor(e){return this._rotateAnchor(this.options.icon._getTooltipAnchor(e))}_rotateAnchor(e){let t=(this.options.rotation??0)*Math.PI/180;if(!t||!e)return e;let{x:n,y:r}=new y(e),i=Math.cos(t),a=Math.sin(t);return new y(n*i-r*a,n*a+r*i)}};let Qt={padding:.1,continuous:!1};var $t=class extends X{static initHooks=!0;static defaultOptions=Qt;constructor(e){super(),f(this,e),this.callInitHooks()}onAdd(e){this._container||(this._initContainer(),this._container.classList.add(`leaflet-zoom-animated`)),this.getPane().append(this._container),this._resizeContainer(),this._onMoveEnd()}onRemove(e){this._destroyContainer()}getEvents(){let e={viewreset:this._reset,zoom:this._onZoom,moveend:this._onMoveEnd,resize:this._resizeContainer,zoomend:this._onZoomEnd,zoomanim:this._onAnimZoom};return this.options.continuous&&(e.move=this._onMoveEnd),e}_onAnimZoom(e){this._updateTransform(e.center,e.zoom)}_onZoom(){this._updateTransform(this._map.getCenter(),this._map.getZoom())}_updateTransform(e,t){let n=this._map.getZoomScale(t,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),i=this._map.project(this._center,t),a=r.multiplyBy(-n)._add(i)._subtract(this._map._getNewPixelOrigin(e,t));n===1&&this._map._snapLayerPoint(a),C(this._container,a,n)}_onMoveEnd(e){let t=this.options.padding,n=this._map.getSize(),r=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new V(r,r.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._updateTransform(this._center,this._zoom),this._onSettled(e)}_reset(){this._onSettled(),this._updateTransform(this._center,this._zoom),this._onViewReset()}_initContainer(){this._container=b(`div`)}_destroyContainer(){M(this._container),this._container.remove(),delete this._container}_resizeContainer(){let e=this.options.padding,t=this._map.getSize().multiplyBy(1+e*2).round();return this._container.style.width=`${t.x}px`,this._container.style.height=`${t.y}px`,t}_onZoomEnd(){}_onViewReset(){}_onSettled(e){}},en=class extends $t{static initHooks=!0;constructor(e){super({...e,continuous:!1}),i(this),this._layers??={},this.callInitHooks()}onAdd(e){this._setPathView(),super.onAdd(e),this.on(`update`,this._updatePaths,this)}onRemove(e){super.onRemove(e),this.off(`update`,this._updatePaths,this)}_onZoomEnd(){this._setPathView();for(let e of Object.values(this._layers))e._project()}_setPathView(){this._pathZoom=this._map.getZoom(),this._pathOrigin=this._map.getPixelOrigin()}_latLngToLayerPoint(e){return this._map.project(e,this._pathZoom)._subtract(this._pathOrigin)}_updatePaths(){for(let e of Object.values(this._layers))e._update()}_onViewReset(){this._setPathView();for(let e of Object.values(this._layers))e._reset()}_onSettled(){this._update()}_update(){}},tn=class e extends en{_initContainer(){this._container=e.create(`svg`),this._container.setAttribute(`pointer-events`,`none`),this._rootGroup=e.create(`g`),this._container.append(this._rootGroup)}_destroyContainer(){super._destroyContainer(),delete this._rootGroup,delete this._svgSize}_resizeContainer(){let e=super._resizeContainer();this._svgSize?.equals(e)||(this._svgSize=e,this._container.setAttribute(`width`,`${e.x}`),this._container.setAttribute(`height`,`${e.y}`));let t=this._bounds;return t&&this._container.setAttribute(`viewBox`,[t.min.x,t.min.y,e.x,e.y].join(` `)),e}_update(){if(this._map._animatingZoom&&this._bounds)return;let e=this._bounds,t=e.getSize();this._container.setAttribute(`viewBox`,[e.min.x,e.min.y,t.x,t.y].join(` `)),this.fire(`update`)}_initPath(t){let n=t._path=e.create(`path`);t.options.className&&n.classList.add(...d(t.options.className)),t.options.interactive&&n.classList.add(`leaflet-interactive`),this._updateStyle(t),this._layers[i(t)]=t}_addPath(e){this._rootGroup||this._initContainer(),this._rootGroup.append(e._path),e.addInteractiveTarget(e._path)}_removePath(e){e._path.remove(),e.removeInteractiveTarget(e._path),delete this._layers[i(e)]}_updatePath(e){e._project(),e._update()}_updateStyle(e){let t=e._path,n=e.options;t&&(n.stroke?(t.setAttribute(`stroke`,n.color),t.setAttribute(`stroke-opacity`,`${n.opacity}`),t.setAttribute(`stroke-width`,`${n.weight}`),t.setAttribute(`stroke-linecap`,n.lineCap),t.setAttribute(`stroke-linejoin`,n.lineJoin),n.dashArray?t.setAttribute(`stroke-dasharray`,`${n.dashArray}`):t.removeAttribute(`stroke-dasharray`),n.dashOffset?t.setAttribute(`stroke-dashoffset`,n.dashOffset):t.removeAttribute(`stroke-dashoffset`)):t.setAttribute(`stroke`,`none`),n.fill?(t.setAttribute(`fill`,n.fillColor||n.color),t.setAttribute(`fill-opacity`,`${n.fillOpacity}`),t.setAttribute(`fill-rule`,n.fillRule||`evenodd`)):t.setAttribute(`fill`,`none`))}_updatePoly(t,n){this._setPath(t,e.pointsToPath(t._parts,n))}_updateCircle(e){let t=e._point,n=Math.max(Math.round(e._pxRadius),1),r=`a${n},${Math.max(Math.round(e._pxRadiusY??n),1)} 0 1,0 `,i=e._empty()?`M0 0`:`M${$(t.x-n)},${$(t.y)}${r}${n*2},0 ${r}${-n*2},0 `;this._setPath(e,i)}_setPath(e,t){e._path.setAttribute(`d`,t)}_bringToFront(e){x(e._path)}_bringToBack(e){S(e._path)}static create(e){return document.createElementNS(`http://www.w3.org/2000/svg`,e)}static pointsToPath(e,t){return e.flatMap(e=>[...e.map((e,t)=>`${(t?`L`:`M`)+$(e.x)} ${$(e.y)}`),t?`z`:``]).join(``)||`M0 0`}};function $(e){let t=Math.round(e*10),n=t<0?-t:t,r=Math.floor(n/10),i=n-r*10;return(t<0?`-`:``)+(i?`${r}.${i}`:r)}let nn={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,bubblingPointerEvents:!0,renderer:void 0};var rn=class extends X{static defaultOptions=nn;beforeAdd(e){this._renderer=e.getRenderer(this)}onAdd(e){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)}onRemove(e){this._renderer._removePath(this)}redraw(){return this._map&&this._renderer._updatePath(this),this}setStyle(e){return f(this,e),this._renderer&&(this._renderer._updateStyle(this),e&&(Object.hasOwn(e,`weight`)||Object.hasOwn(e,`stroke`))&&this._updateBounds()),this}bringToFront(){return this._renderer?._bringToFront(this),this}bringToBack(){return this._renderer?._bringToBack(this),this}getElement(){return this._path}_createRenderer(e){return new tn(e)}_togglesPopupOnClick(){return!1}_reset(){this._project(),this._update()}_clickTolerance(){return(this.options.stroke&&this.options.weight/2||0)+(this._renderer.options.tolerance||0)}};let an={smoothFactor:.5,noClip:!1};var on=class extends rn{static initHooks=!0;static defaultOptions=an;constructor(e,t){super(),f(this,t),this._setLatLngs(e),this.callInitHooks()}getLatLngs(){return this._latlngs}setLatLngs(e){return this._setLatLngs(e),this.redraw()}isEmpty(){return!this._latlngs.length}closestLayerPoint(e){e=new y(e);let t=1/0,n=null,r,i,a=K,o=this._isClosed();for(let s of this._parts)for(let c=+!o,l=s.length;c<l;c++){r=s[(c||l)-1],i=s[c];let o=a(e,r,i,!0);o<t&&(t=o,n=a(e,r,i))}return n&&Object.assign(n,{distance:Math.sqrt(t)})}getCenter(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return lt(this._defaultShape(),this._map.options.crs)}getBounds(){return this._bounds}addLatLng(e,t){return t??=this._defaultShape(),e=new W(e),t.push(e),this._bounds.extend(e),this.redraw()}toGeoJSON(e){let t=!q(this._latlngs),n=zt(this._latlngs,0,!1,e);return Z(this,{type:`${t?`Multi`:``}LineString`,coordinates:n})}_setLatLngs(e){this._bounds=new U,this._latlngs=this._convertLatLngs(e)}_defaultShape(){return q(this._latlngs)?this._latlngs:this._latlngs[0]}_convertLatLngs(e){if(!q(e))return e.map(e=>this._convertLatLngs(e));let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=new W(e[n]),this._bounds.extend(t[n]);return t}_project(){let e=new V;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,e),this._bounds.isValid()&&e.isValid()&&(this._rawPxBounds=e,this._updateBounds())}_updateBounds(){let e=this._clickTolerance(),t=new y(e,e);this._rawPxBounds&&(this._pxBounds=new V([this._rawPxBounds.min.subtract(t),this._rawPxBounds.max.add(t)]))}_projectLatlngs(e,t,n){if(q(e)){let r=e.map(e=>this._renderer._latLngToLayerPoint(e));r.forEach(e=>n.extend(e)),t.push(r)}else e.forEach(e=>this._projectLatlngs(e,t,n))}_clipPoints(){let e=this._renderer._bounds;if(this._parts=[],!this._pxBounds?.intersects(e))return;if(this.options.noClip){this._parts=this._rings;return}let t=this._parts,n=0;for(let r of this._rings)for(let i=0,a=r.length;i<a-1;i++){let o=ot(r[i],r[i+1],e,!!i);o&&(t[n]??=[],t[n].push(o[0]),(o[1]!==r[i+1]||i===a-2)&&(t[n].push(o[1]),n++))}}_simplifyPoints(){let e=this._parts,t=this.options.smoothFactor;for(let n=0,r=e.length;n<r;n++)e[n]=$e(e[n],t)}_update(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())}_updatePath(){this._renderer._updatePoly(this)}_isClosed(){return!1}_containsPoint(e,t){let n=this._clickTolerance();if(!this._pxBounds?.contains(e))return!1;for(let r of this._parts)for(let i=+!t,a=r.length;i<a;i++)if(et(e,r[(i||a)-1],r[i])<=n)return!0;return!1}};let sn={fill:!0};var cn=class extends on{static defaultOptions=sn;isEmpty(){return!this._latlngs.length||!this._latlngs[0].length}getCenter(){if(!this._map)throw Error(`Must add layer to map before using getCenter()`);return pt(this._defaultShape(),this._map.options.crs)}toGeoJSON(e){let t=!q(this._latlngs),n=t&&!q(this._latlngs[0]),r=zt(this._latlngs,0,!0,e);return Z(this,{type:`${n?`Multi`:``}Polygon`,coordinates:t?r:[r]})}_convertLatLngs(e){let t=super._convertLatLngs(e),n=t.length;return n>=2&&q(t)&&t[0].equals(t[n-1])&&t.pop(),t}_setLatLngs(e){super._setLatLngs(e),q(this._latlngs)&&(this._latlngs=[this._latlngs])}_defaultShape(){return q(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]}_clipPoints(){let e=this._renderer._bounds,t=+this.options.weight||0,n=new y(t,t);if(e=new V(e.min.subtract(n),e.max.add(n)),this._parts=[],this._pxBounds?.intersects(e)){if(this.options.noClip)this._parts=this._rings;else for(let t of this._rings){let n=dt(t,e);n.length&&this._parts.push(n)}}}_updatePath(){this._renderer._updatePoly(this,!0)}_isClosed(){return!0}_containsPoint(e){let t=!1;if(!this._pxBounds?.contains(e))return!1;for(let n of this._parts)for(let r=0,i=n.length,a=i-1;r<i;a=r++){let i=n[r],o=n[a];i.y>e.y!=o.y>e.y&&e.x<(o.x-i.x)*(e.y-i.y)/(o.y-i.y)+i.x&&(t=!t)}return t||super._containsPoint(e,!0)}},ln=class e extends Q{static initHooks=!0;constructor(e,t){super(void 0,t),e&&this.addData(e),this.callInitHooks()}addData(t){if(Array.isArray(t)||`features`in t){for(let e of Array.isArray(t)?t:t.features)this.addData(e);return this}let n=this.options,r=e.asFeature(t);if(!r.geometry||n.filter&&!n.filter(r))return this;let i=e.geometryToLayer(r,n);return i?(i.feature=r,i.defaultOptions=i.options,this.resetStyle(i),n.onEachFeature&&n.onEachFeature(r,i),this.addLayer(i)):this}addLayer(e){let t=e;return t.defaultOptions||(t.defaultOptions=e.options,e.options=Object.create(e.options)),super.addLayer(e)}resetStyle(e){return e===void 0?this.eachLayer(this.resetStyle,this):(e.options=Object.create(e.defaultOptions),this._setLayerStyle(e,this.options.style),this)}setStyle(e){return this.eachLayer(t=>this._setLayerStyle(t,e))}_setLayerStyle(e,t){e.setStyle&&(typeof t==`function`&&(t=t(e.feature)),e.setStyle(t))}static geometryToLayer(t,n){let r=t.type===`Feature`?t.geometry:t,i=r?.coordinates,a=[],o=n?.pointToLayer,s=n?.coordsToLatLng??e.coordsToLatLng,c,l;if(!r)return null;switch(r.type){case`Point`:return c=s(i),e._pointToLayer(o,t,c,n);case`MultiPoint`:for(let r of i)c=s(r),a.push(e._pointToLayer(o,t,c,n));return new Q(a);case`LineString`:case`MultiLineString`:return l=e.coordsToLatLngs(i,r.type===`LineString`?0:1,s),new on(l,n);case`Polygon`:case`MultiPolygon`:return l=e.coordsToLatLngs(i,r.type===`Polygon`?1:2,s),new cn(l,n);case`GeometryCollection`:for(let i of r.geometries){let r=e.geometryToLayer({geometry:i,type:`Feature`,properties:t.properties},n);r&&(r.feature=e.asFeature(i),a.push(r))}return new Q(a);case`FeatureCollection`:for(let t of r.features){let r=e.geometryToLayer(t,n);r&&a.push(r)}return new Q(a);default:throw Error(`Invalid GeoJSON object.`)}}static _pointToLayer(e,t,n,r){return e?e(t,n):new Zt(n,r?.markersInheritOptions&&r)}static coordsToLatLng(e){return new W(e[1],e[0],e[2])}static coordsToLatLngs(t,n,r){return t.map(t=>n?e.coordsToLatLngs(t,n-1,r):(r||e.coordsToLatLng)(t))}static latLngToCoords=Rt;static latLngsToCoords=zt;static getFeature=Z;static asFeature=Bt};let un={opacity:1,alt:``,interactive:!1,crossOrigin:!1,errorOverlayUrl:``,zIndex:1,className:``,decoding:`auto`};var dn=class extends X{static initHooks=!0;static defaultOptions=un;constructor(e,t,n){super(),this._url=e,this._bounds=new U(t),f(this,n),this.callInitHooks()}onAdd(e){this._image||(this._initImage(),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(this._image.classList.add(`leaflet-interactive`),this.addInteractiveTarget(this._image)),this.getPane().append(this._image),this._reset()}onRemove(e){this._image.remove(),this.options.interactive&&this.removeInteractiveTarget(this._image)}setOpacity(e){return this.options.opacity=e,this._image&&this._updateOpacity(),this}setStyle(e){return e.opacity!=null&&this.setOpacity(e.opacity),this}bringToFront(){return this._map&&x(this._image),this}bringToBack(){return this._map&&S(this._image),this}setUrl(e){return this._url=e,this._image&&(this._image.src=e),this}setBounds(e){return this._bounds=new U(e),this._map&&this._reset(),this}getEvents(){return{zoom:this._reset,viewreset:this._reset,zoomanim:this._animateZoom}}setZIndex(e){return this.options.zIndex=e,this._updateZIndex(),this}getBounds(){return this._bounds}getElement(){return this._image}_initImage(){let e=this._url,t=e instanceof HTMLImageElement,n=t?e:b(`img`);this._image=n,n.classList.add(`leaflet-image-layer`,`leaflet-zoom-animated`),this.options.className&&n.classList.add(...d(this.options.className)),n.onload=this.fire.bind(this,`load`),n.onerror=this._overlayOnError.bind(this),(this.options.crossOrigin||this.options.crossOrigin===``)&&(n.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),n.decoding=this.options.decoding,t?this._url=n.src:(n.src=e,n.alt=this.options.alt)}_animateZoom(e){let t=this._map.getZoomScale(e.zoom),n=this._map._latLngToNewLayerPoint(this._bounds.getNorthWest(),e.zoom,e.center);C(this._image,n,t)}_reset(){let e=this._image,t=this._map,n=new V(t._snapLayerPoint(t.latLngToLayerPoint(this._bounds.getNorthWest())),t._snapLayerPoint(t.latLngToLayerPoint(this._bounds.getSouthEast()))),r=n.getSize();w(e,n.min),e.style.width=`${r.x}px`,e.style.height=`${r.y}px`}_updateOpacity(){this._image.style.opacity=`${this.options.opacity}`}_updateZIndex(){this._image&&this.options.zIndex!=null&&(this._image.style.zIndex=`${this.options.zIndex}`)}_overlayOnError(){this.fire(`error`);let e=this.options.errorOverlayUrl;e&&this._url!==e&&(this._url=e,this._image.src=e)}getCenter(){return this._bounds.getCenter()}_togglesPopupOnClick(){return!1}};let fn={autoplay:!0,controls:!1,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0};var pn=class extends dn{static defaultOptions=fn;_initImage(){let e=this._url,t=e instanceof HTMLVideoElement,n=this._image=t?e:b(`video`);if(n.classList.add(`leaflet-image-layer`,`leaflet-zoom-animated`),this.options.className&&n.classList.add(...d(this.options.className)),A(n,`pointerdown`,e=>{n.controls&&N(e)}),n.onloadeddata=this.fire.bind(this,`load`),t){let e=n.getElementsByTagName(`source`),t=Array.from(e,e=>e.src);this._url=e.length>0?t:[n.src];return}let r=this._url=Array.isArray(e)?e:[e];this.options.keepAspectRatio||(n.style.objectFit=`fill`),n.autoplay=!!this.options.autoplay,n.controls=!!this.options.controls,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(let e of r){let t=b(`source`);t.src=e,n.append(t)}}},mn=class extends dn{_initImage(){let e=this._image=this._url;e.classList.add(`leaflet-image-layer`,`leaflet-zoom-animated`),this.options.className&&e.classList.add(...d(this.options.className))}};let hn={iconSize:[12,12],html:!1,bgPos:null,className:`leaflet-div-icon`};var gn=class extends Wt{static defaultOptions=hn;createIcon(e){let t=e instanceof HTMLDivElement?e:document.createElement(`div`),n=this.options;n.html instanceof Element?t.replaceChildren(n.html):t.innerHTML=n.html===!1?``:n.html;let r=n.bgPos&&new y(n.bgPos);return t.style.backgroundPosition=r?`${-r.x}px ${-r.y}px`:``,this._setIconStyles(t,`icon`),t}createShadow(){return null}};let _n={tileSize:256,opacity:1,updateWhenIdle:!1,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};var vn=class extends X{static initHooks=!0;static defaultOptions=_n;constructor(e){super(),f(this,e),this.callInitHooks()}onAdd(e){this._initContainer(),this._levels={},this._tiles={},this._resetView()}beforeAdd(e){e._addZoomLimit(this)}onRemove(e){this._removeAllTiles(),this._container.remove(),e._removeZoomLimit(this),this._container=null,this._tileZoom=void 0,clearTimeout(this._pruneTimeout),cancelAnimationFrame(this._fadePruneFrame),this._fadePruneFrame=0}bringToFront(){return this._map&&(x(this._container),this._setAutoZIndex(Math.max)),this}bringToBack(){return this._map&&(S(this._container),this._setAutoZIndex(Math.min)),this}getContainer(){return this._container}setOpacity(e){return this.options.opacity=e,this._updateOpacity(),this}setZIndex(e){return this.options.zIndex=e,this._updateZIndex(),this}isLoading(){return!!this._loading}redraw(){if(this._map){this._removeAllTiles();let e=this._getTileZoom(this._map.getZoom());e!==this._tileZoom&&(this._tileZoom=e,this._updateLevels()),this._update()}return this}getEvents(){let e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd,worldcopyjump:this._onWorldCopyJump,zoomanim:this._animateZoom};return this.options.updateWhenIdle||(this._onMove||=a(this._onMoveEnd,this.options.updateInterval,this),e.move=this._onMove),e}createTile(){return document.createElement(`div`)}getTileSize(){let e=this.options.tileSize;return e instanceof y?e:new y(e,e)}_updateZIndex(){this._container&&this.options.zIndex!=null&&(this._container.style.zIndex=`${this.options.zIndex}`)}_setAutoZIndex(e){let t=this.getPane().children,n=-e(-1/0,1/0);for(let r of t){let t=r.style.zIndex;r!==this._container&&t&&(n=e(n,+t))}isFinite(n)&&(this.options.zIndex=n+e(-1,1),this._updateZIndex())}_updateOpacity(){this._map&&(this._container.style.opacity=`${this.options.opacity}`)}_onOpaqueTile(e){}_initContainer(){this._container||(this._container=b(`div`,`leaflet-layer leaflet-zoom-animated ${this.options.className??``}`),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().append(this._container))}_updateLevels(){let e=this._tileZoom,t=this.options.maxZoom;if(e===void 0)return;for(let n of Object.keys(this._levels).map(Number))this._levels[n].el.children.length||n===e?(this._levels[n].el.style.zIndex=`${t-Math.abs(e-n)}`,this._onUpdateLevel(n)):(this._levels[n].el.remove(),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);let n=this._levels[e],r=this._map;return n||(n=this._levels[e]={},n.el=b(`div`,`leaflet-tile-container leaflet-zoom-animated`,this._container),n.el.style.zIndex=`${t}`,n.origin=r.project(r.unproject(r.getPixelOrigin()),e).round(),n.zoom=e,this._setZoomTransform(n,r.getCenter(),r.getZoom()),this._onCreateLevel(n)),this._level=n,n}_onUpdateLevel(e){}_onRemoveLevel(e){}_onCreateLevel(e){}_pruneTiles(){if(this._map){if(this._getTileZoom(this._map.getZoom())===void 0)this._removeAllTiles();else{for(let e of Object.values(this._tiles))e.retain=e.current;for(let e of Object.values(this._tiles))if(e.current&&!e.active){let t=e.coords;this._retainParent(t.x,t.y,t.z,t.z-5)||this._retainChildren(t.x,t.y,t.z,t.z+2)}for(let[e,t]of Object.entries(this._tiles))t.retain||this._removeTile(e)}}}_removeTilesAtZoom(e){for(let[t,n]of Object.entries(this._tiles))n.coords.z===e&&this._removeTile(t)}_removeAllTiles(){for(let e of Object.keys(this._tiles))this._removeTile(e)}_invalidateAll(e){let t=this._map;if(!(e?.zoom!==void 0&&e.zoom!==t.getZoom()&&t.getBounds().contains(e.center))){for(let e of Object.keys(this._levels))this._levels[e].el.remove(),this._onRemoveLevel(Number(e)),delete this._levels[e];this._removeAllTiles(),this._tileZoom=void 0}}_retainParent(e,t,n,r){for(n--;n>=r;n--)if(e=Math.floor(e/2),t=Math.floor(t/2),this._retain(e,t,n))return!0;return!1}_retainChildren(e,t,n,r){for(let i=2*e;i<2*e+2;i++)for(let e=2*t;e<2*t+2;e++)!this._retain(i,e,n+1)&&n+1<r&&this._retainChildren(i,e,n+1,r)}_retain(e,t,n){let r=this._tiles[this._tileCoordsToKey({x:e,y:t,z:n})];return r?.loaded&&(r.retain=!0),r?.active}_resetView(e){let t=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),t,t)}_animateZoom(e){let t=this._map,n=t.getCenter(),r=t.getZoom(),i=t.getZoomScale(e.zoom,r);this._setView(e.center,e.zoom,!0,e.noUpdate),this._setZoomTransforms(n,r),C(this._container,t._getNewPixelOrigin(n,r).multiplyBy(i).subtract(t._getNewPixelOrigin(e.center,e.zoom)),i)}_clampZoom(e){let t=this.options;return t.minNativeZoom!==void 0&&e<t.minNativeZoom?t.minNativeZoom:t.maxNativeZoom!==void 0&&t.maxNativeZoom<e?t.maxNativeZoom:e}_getTileZoom(e){let{minZoom:t,maxZoom:n=1/0}=this.options;if(!(e<t||e>n))return this._clampZoom(Math.round(e))}_setView(e,t,n,r){let i=this._getTileZoom(t),a=this.options.updateWhenZooming&&i!==this._tileZoom;(!r||a)&&(this._tileZoom=i,this._abortLoading?.(),this._updateLevels(),this._resetGrid(),i!==void 0&&this._update(e),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(e,t)}_setZoomTransforms(e,t){this._container.style.transform&&(this._container.style.transform=``);for(let n of Object.values(this._levels))this._setZoomTransform(n,e,t)}_setZoomTransform(e,t,n){let r=this._map.getZoomScale(n,e.zoom),i=e.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(t,n));r===1&&this._map._snapLayerPoint(i),C(e.el,i,r)}_resetGrid(){let e=this._map,t=e.options.crs,n=this._tileSize=this.getTileSize(),r=this._tileZoom,i=this._map.getPixelWorldBounds(this._tileZoom);i&&(this._globalTileRange=this._pxBoundsToTileRange(i)),this._wrapX=t.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,t.wrapLng[0]],r).x/n.x),Math.ceil(e.project([0,t.wrapLng[1]],r).x/n.x)],this._wrapY=t.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([t.wrapLat[0],0],r).y/n.y),Math.ceil(e.project([t.wrapLat[1],0],r).y/n.y)]}_onMoveEnd(){let e=this._map;e&&!e._animatingZoom&&(this._container.style.transform&&this._setZoomTransforms(e.getCenter(),e.getZoom()),this._update())}_onWorldCopyJump({worlds:e}){if(!this._wrapX)return;let t=this.getTileSize(),n={};for(let r of Object.values(this._tiles)){let{coords:i,el:a}=r,o=e*this._map.getPixelWorldBounds(i.z).getSize().x;o%t.x===0&&(i.x-=o/t.x,w(a,T(a).subtract([o,0]),!0)),n[this._tileCoordsToKey(i)]=r}this._tiles=n}_getTiledPixelBounds(e){let t=this._map,n=t._animatingZoom?Math.max(t._animateToZoom,t.getZoom()):t.getZoom(),r=t.getZoomScale(n,this._tileZoom),i=t.project(e,this._tileZoom).floor(),a=t.getSize().divideBy(r*2);return new V(i.subtract(a),i.add(a))}_update(e){let t=this._map;if(!t)return;let n=this._clampZoom(t.getZoom());if(e===void 0&&(e=t.getCenter()),this._tileZoom===void 0)return;let r=this._getTiledPixelBounds(e),i=this._pxBoundsToTileRange(r),a=i.getCenter(),o=[],s=this.options.keepBuffer,c=new V(i.getBottomLeft().subtract([s,-s]),i.getTopRight().add([s,-s]));if(!(isFinite(i.min.x)&&isFinite(i.min.y)&&isFinite(i.max.x)&&isFinite(i.max.y)))throw Error(`Attempted to load an infinite number of tiles`);for(let e of Object.values(this._tiles)){let t=e.coords;t.z===this._tileZoom&&c.contains(new y(t.x,t.y))||(e.current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(e,n);else{for(let e=i.min.y;e<=i.max.y;e++)for(let t=i.min.x;t<=i.max.x;t++){let n=new y(t,e);if(n.z=this._tileZoom,!this._isValidTile(n))continue;let r=this._tiles[this._tileCoordsToKey(n)];r?r.current=!0:o.push(n)}if(o.sort((e,t)=>e.distanceTo(a)-t.distanceTo(a)),o.length){this._loading||(this._loading=!0,this.fire(`loading`));let e=document.createDocumentFragment();for(let t of o)this._addTile(t,e);this._level.el.append(e)}}}_isValidTile(e){let t=this._map.options.crs;if(!t.infinite){let n=this._globalTileRange;if(!t.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!t.wrapLat&&(e.y<n.min.y||e.y>n.max.y))return!1}if(!this.options.bounds)return!0;let n=this._tileCoordsToBounds(e);return new U(this.options.bounds).overlaps(n)}_tileCoordsToNwSe(e){let t=this._map,n=this.getTileSize(),r=e.scaleBy(n),i=r.add(n);return[t.unproject(r,e.z),t.unproject(i,e.z)]}_tileCoordsToBounds(e){let t=this._tileCoordsToNwSe(e),n=new U(t[0],t[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n}_tileCoordsToKey(e){return`${e.x}:${e.y}:${e.z}`}_removeTile(e){let t=this._tiles[e];t&&(t.el.remove(),delete this._tiles[e],this.fire(`tileunload`,{tile:t.el,coords:t.coords}))}_initTile(e){e.classList.add(`leaflet-tile`);let t=this.getTileSize();e.style.width=`${t.x}px`,e.style.height=`${t.y}px`}_addTile(e,t){let n=this._getTilePos(e),r=this._tileCoordsToKey(e),i=this.createTile(this._wrapCoords(e),this._tileReady.bind(this,e));this._initTile(i),this.createTile.length<2&&requestAnimationFrame(this._tileReady.bind(this,e,null,i)),w(i,n,!0),this._tiles[r]={el:i,coords:e,current:!0},t.append(i),this.fire(`tileloadstart`,{tile:i,coords:e})}_tileReady(e,t,n){t&&this.fire(`tileerror`,{error:t,tile:n,coords:e});let r=this._tiles[this._tileCoordsToKey(e)];if(r&&(this._map._fadeAnimated?r.loaded||(r.el.classList.add(`leaflet-tile-fading`),r.el.animate({opacity:[0,1]},200).onfinish=this._onTileFaded.bind(this,r)):(r.active=!0,this._pruneTiles()),r.loaded=!0,t||(r.el.classList.add(`leaflet-tile-loaded`),this.fire(`tileload`,{tile:r.el,coords:e})),this._map&&this._noTilesToLoad())){if(this._loading=!1,this.fire(`load`),!this._map)return;this._map._fadeAnimated?this._pruneTimeout=setTimeout(this._pruneTiles.bind(this),250):requestAnimationFrame(this._pruneTiles.bind(this))}}_onTileFaded(e){e.el.classList.remove(`leaflet-tile-fading`),this._tiles[this._tileCoordsToKey(e.coords)]===e&&(e.active=!0,this._onOpaqueTile(e),this._noPrune||this._fadePruneFrame||(this._fadePruneFrame=requestAnimationFrame(()=>{this._fadePruneFrame=0,this._noPrune||this._pruneTiles()})))}_getTilePos(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)}_wrapCoords(e){let t=new y(this._wrapX?o(e.x,this._wrapX):e.x,this._wrapY?o(e.y,this._wrapY):e.y);return t.z=e.z,t}_pxBoundsToTileRange(e){let t=this.getTileSize();return new V(e.min.unscaleBy(t).floor(),e.max.unscaleBy(t).ceil().subtract([1,1]))}_noTilesToLoad(){return Object.values(this._tiles).every(e=>e.loaded)}};let yn={minZoom:0,maxZoom:18,subdomains:`abc`,errorTileUrl:``,zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:`strict-origin-when-cross-origin`},bn=[`tile.openstreetmap.org`,`tile.osm.org`],xn=/^(https?:)?\/\/([^/?#:]*)/i,Sn=/^http:/i;function Cn(e){let t=xn.exec(e)?.[2]??``;return bn.some(e=>t===e||t.endsWith(`.${e}`))}let wn=e=>Cn(e)?e.replace(Sn,`https:`):e;var Tn=class extends vn{static initHooks=!0;static defaultOptions=yn;constructor(e,t){super(t),f(this,t);let n=this.options;if(Cn(e)&&n.attribution===null&&(n.attribution=`© <a href="https://www.openstreetmap.org/copyright" lang="en">OpenStreetMap contributors</a>`),this._url=wn(e),n.detectRetina&&window.devicePixelRatio>=1.5&&n.maxZoom>0){let e=n.tileSize;n.tileSize=e instanceof y?e.divideBy(2).floor():Math.floor(e/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom),n.maxNativeZoom!==void 0&&n.maxNativeZoom--,n.minNativeZoom!==void 0&&n.minNativeZoom--}else n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom);typeof n.subdomains==`string`&&(n.subdomains=n.subdomains.split(``)),this.callInitHooks()}setUrl(e,t){return e=wn(e),this._url===e&&t===void 0&&(t=!0),this._url=e,t||this.redraw(),this}createTile(e,t){let n=document.createElement(`img`);return A(n,`load`,this._tileOnLoad.bind(this,t,n)),A(n,`error`,this._tileOnError.bind(this,t,n)),(this.options.crossOrigin||this.options.crossOrigin===``)&&(n.crossOrigin=this.options.crossOrigin===!0?``:this.options.crossOrigin),typeof this.options.referrerPolicy==`string`&&(n.referrerPolicy=this.options.referrerPolicy),n.alt=``,n.src=this.getTileUrl(e),n}getTileUrl(e){let t=Object.create(this.options);Object.assign(t,{r:window.devicePixelRatio>1?`@2x`:``,s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl(e.z)});let n=this._map?.getPixelWorldBounds(e.z);if(n){let r=this._pxBoundsToTileRange(n).max.y-e.y;this.options.tms&&(t.y=r),t[`-y`]=r}return te(this._url,t)}_tileOnLoad(e,t){e(null,t)}_tileOnError(e,t,n){let r=this.options.errorTileUrl,i=t.getAttribute(`src`);r&&i!==r&&(i||t.isConnected)&&(t.src=r),e(n,t)}_getZoomForUrl(e){let t=this.options.maxZoom,n=this.options.zoomReverse,r=this.options.zoomOffset;return n&&(e=t-e),e+r}_getSubdomain(e){let{subdomains:t}=this.options;return t?.[Math.abs(e.x+e.y)%t.length]}_abortLoading(){for(let[e,{coords:t,el:n}]of Object.entries(this._tiles)){let r=n;t.z!==this._tileZoom&&!r.complete&&(r.setAttribute(`src`,``),r.remove(),delete this._tiles[e],this.fire(`tileabort`,{tile:r,coords:t}))}}_removeTile(e){let t=this._tiles[e];if(t)return t.el.setAttribute(`src`,``),super._removeTile(e)}_tileReady(e,t,n){if(this._map&&n?.getAttribute(`src`)!==``)return super._tileReady(e,t,n)}_clampZoom(e){return Math.round(super._clampZoom(e))}};let En={service:`WMS`,request:`GetMap`,layers:``,styles:``,format:`image/jpeg`,transparent:!1,version:`1.1.1`},Dn={crs:null,uppercase:!1};var On=class e extends Tn{static initHooks=!0;static defaultWmsParams=En;static defaultOptions=Dn;constructor(t,n){super(t,n);let r={...e.defaultWmsParams};for(let[t,i]of Object.entries(n))t in e.defaultOptions||(r[t]=i);let i=this.options.detectRetina&&window.devicePixelRatio>=1.5?2:1,a=this.getTileSize();r.width=a.x*i,r.height=a.y*i,this.wmsParams=r,this.callInitHooks()}onAdd(e){this._crs=this.options.crs??e.options.crs,this._updateCrsParam(),super.onAdd(e)}_updateCrsParam(){this._wmsVersion=parseFloat(this.wmsParams.version),delete this.wmsParams.srs,delete this.wmsParams.crs,this.wmsParams[this._wmsVersion>=1.3?`crs`:`srs`]=this._crs.code}getTileUrl(e){let t=this._tileCoordsToNwSe(e),n=this._crs,r=new V(n.project(t[0]),n.project(t[1])),i=r.min,a=r.max,o=(this._wmsVersion>=1.3&&this._crs===Ct?[i.y,i.x,a.y,a.x]:[i.x,i.y,a.x,a.y]).join(`,`),s=new URL(super.getTileUrl(e),document.baseURI);for(let[e,t]of Object.entries({...this.wmsParams,bbox:o}))t!=null&&s.searchParams.append(this.options.uppercase?e.toUpperCase():e,`${t}`);return s.toString()}setParams(e,t){return Object.assign(this.wmsParams,e),this._crs&&this._updateCrsParam(),t||this.redraw(),this}};let kn={tolerance:0},An=/[, ]+/;var jn=class extends en{static defaultOptions=kn;getEvents(){let e=super.getEvents();return e.viewprereset=this._onViewPreReset,e}_onViewPreReset(){this._postponeUpdatePaths=!0}onAdd(e){super.onAdd(e);let t=e=>+getComputedStyle(e._container.parentNode).zIndex||0;e._canvases.push(this),e._canvases.sort((e,n)=>t(n)-t(e)||1-(e._container.compareDocumentPosition(n._container)&2)),this._draw()}onRemove(e){super.onRemove(e),e._canvases=e._canvases.filter(e=>e!==this)}_initContainer(){let e=this._container=document.createElement(`canvas`);this._ctx=e.getContext(`2d`)}_destroyContainer(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,delete this._ctx,super._destroyContainer()}_resizeContainer(){let e=super._resizeContainer(),t=this._ctxScale=window.devicePixelRatio;return this._container.width=t*e.x,this._container.height=t*e.y,e}_updatePaths(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(let e of Object.values(this._layers))e._update();this._redraw()}}_update(){if(this._map._animatingZoom&&this._bounds)return;let e=this._bounds,t=this._ctxScale;this._ctx.setTransform(t,0,0,t,-e.min.x*t,-e.min.y*t),this.fire(`update`)}_reset(){super._reset(),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())}_initPath(e){this._updateDashArray(e),this._layers[i(e)]=e,this._append(e._order={layer:e})}_addPath(e){this._requestRedraw(e)}_removePath(e){this._unlink(e._order),delete e._order,delete this._layers[i(e)],this._requestRedraw(e)}_updatePath(e){this._extendRedrawBounds(e),e._project(),e._update(),this._requestRedraw(e)}_updateStyle(e){this._updateDashArray(e),this._requestRedraw(e)}_updateDashArray(e){e._dashArray=typeof e.options.dashArray==`string`?e.options.dashArray.split(An).map(e=>Number(e)).filter(e=>!isNaN(e)):e.options.dashArray}_requestRedraw(e){this._map&&(this._extendRedrawBounds(e),this._redrawRequest??=requestAnimationFrame(this._redraw.bind(this)))}_extendRedrawBounds(e){if(e._pxBounds){let t=(+e.options.weight||0)+1;this._redrawBounds??=new V,this._redrawBounds.extend(e._pxBounds.min.subtract([t,t])),this._redrawBounds.extend(e._pxBounds.max.add([t,t]))}}_redraw(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null}_clear(){let e=this._redrawBounds;if(e){let t=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,t.x,t.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(){let e,t=this._redrawBounds;if(this._ctx.save(),t){let e=t.getSize();this._ctx.beginPath(),this._ctx.rect(t.min.x,t.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(let n=this._drawFirst;n;n=n.next)e=n.layer,(!t||e._pxBounds?.intersects(t))&&e._updatePath();this._drawing=!1,this._ctx.restore()}_updatePoly(e,t){if(!this._drawing)return;let n=e._parts,r=this._ctx;n.length&&(r.beginPath(),n.forEach(e=>{e.forEach((e,t)=>{r[t?`lineTo`:`moveTo`](e.x,e.y)}),t&&r.closePath()}),this._fillStroke(r,e))}_updateCircle(e){if(!this._drawing||e._empty())return;let{x:t,y:n}=e._point,r=this._ctx,i=Math.max(Math.round(e._pxRadius),1),a=Math.max(Math.round(e._pxRadiusY??i),1);r.beginPath(),a===i?r.arc(t,n,i,0,Math.PI*2):r.ellipse(t,n,i,a,0,0,Math.PI*2),this._fillStroke(r,e)}_fillStroke(e,t){let n=t.options;n.fill&&(e.globalAlpha=n.fillOpacity,e.fillStyle=n.fillColor??n.color,e.fill(n.fillRule||`evenodd`)),n.stroke&&+n.weight!=0&&(e.lineDashOffset=Number(n.dashOffset??0),e.setLineDash(t._dashArray??[]),e.globalAlpha=n.opacity,e.lineWidth=n.weight,e.strokeStyle=n.color,e.lineCap=n.lineCap,e.lineJoin=n.lineJoin,e.stroke())}_layerAt(e,t){let n=this._map.pointerEventToLayerPoint(e);for(let e=this._drawLast;e;e=e.prev){let r=e.layer;if(r.options.interactive&&r._containsPoint(n)&&!(t&&this._map._draggableMoved(r)))return r}}_bringToFront(e){let t=e._order;t?.next&&(this._unlink(t),this._append(t),this._requestRedraw(e))}_bringToBack(e){let t=e._order;t?.prev&&(this._unlink(t),t.prev=null,t.next=this._drawFirst,this._drawFirst.prev=t,this._drawFirst=t,this._requestRedraw(e))}_append(e){e.prev=this._drawLast,e.next=null,this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst??=e}_unlink({prev:e,next:t}){t?t.prev=e:this._drawLast=e,e?e.next=t:this._drawFirst=t}};let Mn={fill:!0,radius:10};var Nn=class extends rn{static initHooks=!0;static defaultOptions=Mn;constructor(e,t){super(),f(this,t),this._latlng=new W(e),this.setRadius(this.options.radius),this.callInitHooks()}setLatLng(e){let t=this._latlng;return this._latlng=new W(e),this.redraw(),this.fire(`move`,{oldLatLng:t,latlng:this._latlng})}getLatLng(){return this._latlng}setRadius(e){let t=l(e);if(isNaN(t))throw Error(`Invalid radius: ${e}`);return this._radius=this.options.radius=t,this.redraw()}getRadius(){return this._radius}setStyle(e){return super.setStyle(e),e?.radius!==void 0&&this.setRadius(e.radius),this}toGeoJSON(e){return Vt(this,e)}_project(){this._point=this._renderer._latLngToLayerPoint(this._latlng)._round(),this._pxRadius=this._radius,this._updateBounds()}_updateBounds(){let e=this._pxRadius,t=this._pxRadiusY??e,n=this._clickTolerance(),r=[e+n,t+n];this._pxBounds=new V(this._point.subtract(r),this._point.add(r))}_update(){this._map&&this._updatePath()}_updatePath(){this._renderer._updateCircle(this)}_empty(){return this._pxRadius&&!this._renderer._bounds.intersects(this._pxBounds)}_containsPoint(e){let t=this._clickTolerance(),n=this._pxRadius+t,r=(this._pxRadiusY??this._pxRadius)+t,{x:i,y:a}=e.subtract(this._point);return(i*r)**2+(a*n)**2<=(n*r)**2}},Pn=class extends Nn{static initHooks=!0;constructor(e,t){if(typeof t==`number`)throw Error(`Circle: the radius is an option in Leaflet 2. Use new Circle(latlng, {radius}).`);super(e,t),this.callInitHooks()}getBounds(){if(!this._map)return this._latlng.toBounds(this._radius*2);let e=[this._pxRadius,this._pxRadiusY??this._pxRadius];return new U(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))}_project(){let e=this._latlng.lng,t=this._latlng.lat,n=this._map,r=n.options.crs,i=this._renderer,a=i._pathZoom;if(r.distance===Y.distance){let r=Math.PI/180,o=this._radius/Y.R/r,s=n.project([t+o,e],a),c=n.project([t-o,e],a),l=s.add(c).divideBy(2),u=n.unproject(l,a).lat,d=2*Math.asin(Math.sqrt((Math.sin(o*r/2)**2-Math.sin((u-t)*r/2)**2)/(Math.cos(t*r)*Math.cos(u*r))))/r;(isNaN(d)||d===0)&&(d=o/Math.cos(t*r)),this._point=l.subtract(i._pathOrigin),this._pxRadius=isNaN(d)?0:l.distanceTo(n.project([u,e-d],a)),this._pxRadiusY=l.distanceTo(s)}else{let e=r.unproject(r.project(this._latlng).subtract([this._radius,0]));this._point=i._latLngToLayerPoint(this._latlng),this._pxRadius=Math.abs(this._point.x-i._latLngToLayerPoint(e).x)}this._updateBounds()}},Fn=class extends cn{static initHooks=!0;constructor(e,t){super(In(e),t),this.callInitHooks()}setBounds(e){return this.setLatLngs(In(e))}};function In(e){return e=new U(e),[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}var Ln=class extends R{run(e,t,n,r){this.stop(),this._el=e,this._inProgress=!0,this._duration=n??.25,this._easeOutPower=1/Math.max(r??.5,.2),this._startPos=T(e),this._offset=t.subtract(this._startPos),this._startTime=Date.now(),this.fire(`start`),this._animate()}stop(){this._inProgress&&(this._step(!0),this._complete())}_animate(){this._animId=requestAnimationFrame(this._animate.bind(this)),this._step()}_step(e){let t=Date.now()-this._startTime,n=this._duration*1e3;t<n?this._runFrame(this._easeOut(t/n),e):(this._runFrame(1),this._complete())}_runFrame(e,t){let n=this._startPos.add(this._offset.multiplyBy(e));t&&n._round(),w(this._el,n),this.fire(`step`)}_complete(){cancelAnimationFrame(this._animId),this._inProgress=!1,this.fire(`end`)}_easeOut(e){return 1-(1-e)**this._easeOutPower}},Rn=class extends z{addHooks(){A(this._map._container,`pointerdown`,this._onPointerDown,this),this._map._container.classList.add(`leaflet-box-zoom`)}removeHooks(){M(this._map._container,`pointerdown`,this._onPointerDown,this),this._map._container.classList.remove(`leaflet-box-zoom`),this._finish(),this._resetState()}moved(){return this._moved}_resetState(){clearTimeout(this._resetStateTimeout),this._moved=!1}_toggleListeners(e){e(this._map._container,{contextmenu:I,pointermove:this._onPointerMove,pointerup:this._onPointerUp},this),e(document,`keydown`,this._onKeyDown,this)}_onPointerDown(e){if(!e.shiftKey||e.button!==0)return!1;this._resetState(),F(e),this._startPoint=this._map.pointerEventToContainerPoint(e),this._toggleListeners(A)}_onPointerMove(e){let t=this._map;this._moved||(this._moved=!0,this._box=b(`div`,`leaflet-zoom-box`,t._container),t._container.classList.add(`leaflet-crosshair`),t.fire(`boxzoomstart`)),this._point=t.pointerEventToContainerPoint(e);let n=new V(this._point,this._startPoint),r=n.getSize();w(this._box,n.min),this._box.style.width=`${r.x}px`,this._box.style.height=`${r.y}px`}_finish(){this._moved&&(this._box.remove(),this._map._container.classList.remove(`leaflet-crosshair`)),this._toggleListeners(M)}_onPointerUp(e){if(e.button!==0||(this._finish(),!this._moved))return;this._resetStateTimeout=setTimeout(()=>this._resetState(),0);let t=new U(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.getBoundsZoom(t)!==1/0&&this._map.fitBounds(t,{originalEvent:e}),this._map.fire(`boxzoomend`,{boxZoomBounds:t})}_onKeyDown(e){e.code===`Escape`&&(this._finish(),this._resetState())}},zn=class extends z{addHooks(){this._map.on(`dblclick`,this._onDoubleClick,this)}removeHooks(){this._map.off(`dblclick`,this._onDoubleClick,this)}_onDoubleClick(e){let t=this._map,n=t.getZoom(),r=t.options.zoomDelta,i=e.originalEvent.shiftKey?n-r:n+r,a={originalEvent:e.originalEvent};t.options.doubleClickZoom===`center`?t.setZoom(i,a):t.setZoomAround(e.containerPoint,i,a)}},Bn=class extends z{addHooks(){if(!this._draggable){let e=this._map;this._draggable=new B(e._mapPane,e._container),this._draggable.on({down:this._onDown,dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on(`predrag`,this._onPreDragLimit,this),e.options.worldCopyJump&&this._draggable.on(`predrag`,this._onPreDragWrap,this)}this._map._container.classList.add(`leaflet-grab`,`leaflet-touch-drag`),this._draggable.enable(),this._positions=[],this._times=[]}removeHooks(){this._map._container.classList.remove(`leaflet-grab`,`leaflet-touch-drag`),this._draggable.disable()}moved(){return this._draggable?._moved}moving(){return this._draggable?._moving}_onDown(){this._map._stop()}_onDragStart(){let e=this._map;if(e._stop(),e.options.maxBounds&&e.options.maxBoundsViscosity){let t=new U(e.options.maxBounds),{min:n,max:r}=new V([t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()].map(t=>e.latLngToContainerPoint(t)));this._offsetLimit=new V(r.multiplyBy(-1),n.multiplyBy(-1).add(e.getSize())),this._viscosity=Math.min(1,Math.max(0,e.options.maxBoundsViscosity))}else this._offsetLimit=null;e._moveStart(!1,!1,this._draggable._lastEvent).fire(`dragstart`),e.options.inertia&&(this._positions=[],this._times=[])}_onDrag(e){if(this._map.options.inertia){let e=Date.now(),t=this._draggable._absPos||this._draggable._newPos;this._lastTime=e,this._lastPos=t,this._positions.push(t),this._times.push(e),this._prunePositions(e)}this._map.fire(`move`,e).fire(`drag`,e)}_prunePositions(e){for(;this._positions.length>1&&e-this._times[0]>50;)this._positions.shift(),this._times.shift()}_viscousLimit(e,t){return e-(e-t)*this._viscosity}_onPreDragLimit(){if(!this._viscosity||!this._offsetLimit)return;let e=this._draggable._newPos.subtract(this._draggable._startPos),t=this._offsetLimit;e.x<t.min.x&&(e.x=this._viscousLimit(e.x,t.min.x)),e.y<t.min.y&&(e.y=this._viscousLimit(e.y,t.min.y)),e.x>t.max.x&&(e.x=this._viscousLimit(e.x,t.max.x)),e.y>t.max.y&&(e.y=this._viscousLimit(e.y,t.max.y)),this._draggable._newPos=this._draggable._startPos.add(e)}_onPreDragWrap(){let e=this._draggable;e._absPos=e._newPos,e._newPos=this._map._wrapWorldCopy(e._newPos)}_onDragEnd(e){let t=this._map,n=t.options,r=!n.inertia||e.noInertia||this._times.length<2;if(t.fire(`dragend`,e),r)t._moveEnd(!1);else{this._prunePositions(Date.now());let e=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,i=n.easeLinearity,a=e.multiplyBy(i/r),o=a.distanceTo([0,0]),s=Math.min(n.inertiaMaxSpeed,o),c=a.multiplyBy(s/o),l=t.getSize().divideBy(2),u=s/(n.inertiaDeceleration*i),d=c.multiplyBy(-u/2).round();if(t._prefersReducedMotion()&&!l.contains(d)){let e=Math.min(l.x/Math.abs(d.x),l.y/Math.abs(d.y));d=d.multiplyBy(e).round(),u*=Math.sqrt(e)}if(!d.x&&!d.y)t._moveEnd(!1);else{d=t._limitOffset(d,t.options.maxBounds);let e=t._moveEvent;requestAnimationFrame(()=>{t.panBy(d,{duration:u,easeLinearity:i,noMoveStart:!0,animate:!0,originalEvent:e})})}}}},Vn=class e extends z{static keys={left:[`ArrowLeft`],right:[`ArrowRight`],down:[`ArrowDown`],up:[`ArrowUp`],zoomIn:[`+`,`=`],zoomOut:[`-`,`_`]};addHooks(){let e=this._map._container;e.tabIndex<=0&&(e.tabIndex=0);let t=this._map.options.ariaKeyShortcuts;t&&e.setAttribute(`aria-keyshortcuts`,t===!0?`ArrowLeft ArrowRight ArrowUp ArrowDown = Plus -`:t),A(e,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown,keydown:this._onContainerKeyDown},this)}removeHooks(){M(document,`keydown`,this._onKeyDown,this),this._map.options.ariaKeyShortcuts&&this._map._container.removeAttribute(`aria-keyshortcuts`),M(this._map._container,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown,keydown:this._onContainerKeyDown},this)}_onPointerDown(){this._focused||this._map._container.contains(document.activeElement)||this._map._container.focus({preventScroll:!0,focusVisible:!1})}_onFocus(){this._focused=!0,A(document,`keydown`,this._onKeyDown,this),this._map.fire(`focus`)}_onBlur(){this._focused=!1,M(document,`keydown`,this._onKeyDown,this),this._map.fire(`blur`)}_onContainerKeyDown(e){let t=this._map,n=t._popup,r=e.target;e.key===`Escape`&&!e.defaultPrevented&&n?.isOpen()&&n.options.closeOnEscapeKey&&!t._controlContainer.contains(r)&&(t.closePopup(),e.preventDefault())}_onKeyDown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=t.key,r=this._map,{left:i,right:a,down:o,up:s,zoomIn:c,zoomOut:l}=e.keys,u=+a.includes(n)-i.includes(n),d=+o.includes(n)-s.includes(n),f=+c.includes(n)-l.includes(n),p=t.shiftKey?3:1;if(u||d){if(!r._panAnim?._inProgress){let e=new y(u,d).multiplyBy(p*r.options.keyboardPanDelta);r.options.maxBounds&&(e=r._limitOffset(e,r.options.maxBounds)),r.panBy(e,{originalEvent:t})}}else if(f)r._zoomInputBlocked()||r.setZoom(r.getZoom()+p*f*r.options.zoomDelta,{originalEvent:t});else return;I(t)}},Hn=class extends z{addHooks(){A(this._map._container,`wheel`,this._onWheelScroll,this),this._delta=0}removeHooks(){M(this._map._container,`wheel`,this._onWheelScroll,this),clearTimeout(this._timer)}_onWheelScroll(e){let t=Ne(e),n=this._map.options.wheelDebounceTime;this._delta+=t,this._lastEvent=e,this._startTime||=Date.now();let r=Math.max(n-(Date.now()-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(this._performZoom.bind(this),r),I(e)}_performZoom(){let e=this._map,t=e.getZoom(),n=e.options.zoomSnap??0;e._stop();let r=this._delta/(e.options.wheelPxPerZoomLevel*4),i=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,a=n?Math.ceil(i/n)*n:i,o=e._prefersReducedMotion()?Math.min(a,1):a,s=e._limitZoom(t+(this._delta>0?o:-o))-t;if(this._delta=0,this._startTime=null,!s||e._zoomInputBlocked())return;let c={originalEvent:this._lastEvent};e.options.scrollWheelZoom===`center`?e.setZoom(t+s,c):e.setZoomAround(e.pointerEventToContainerPoint(this._lastEvent),t+s,c)}},Un=class extends z{addHooks(){A(this._map._container,`pointerdown`,this._onDown,this)}removeHooks(){M(this._map._container,`pointerdown`,this._onDown,this),this._cancel(),this._stopPreventingNative()}_onDown(e){if(clearTimeout(this._holdTimeout),k().length!==1||e.pointerType===`mouse`)return;let t=this._map._container,n=new y(e.clientX,e.clientY);this._holdTimeout=setTimeout((()=>{this._cancel();let r=k(),i=r[0];r.length!==1||n.distanceTo([i.clientX,i.clientY])>this._map.options.tapTolerance||(this._simulateEvent(`contextmenu`,e),t.addEventListener(`contextmenu`,I,!0),t.addEventListener(`click`,I,!0),t.addEventListener(`pointerdown`,this._stopPreventingNative,!0),t.addEventListener(`keydown`,this._stopPreventingNative,!0))}),600),A(t,`pointerup pointercancel contextmenu`,this._cancel,this)}_stopPreventingNative=()=>{let e=this._map._container;e.removeEventListener(`contextmenu`,I,!0),e.removeEventListener(`click`,I,!0),e.removeEventListener(`pointerdown`,this._stopPreventingNative,!0),e.removeEventListener(`keydown`,this._stopPreventingNative,!0)};_cancel(){clearTimeout(this._holdTimeout);let e=this._map._container;M(e,`pointerup pointercancel contextmenu`,this._cancel,this)}_simulateEvent(e,t){let n=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,screenX:t.screenX,screenY:t.screenY,clientX:t.clientX,clientY:t.clientY});t.target.dispatchEvent(n)}},Wn=class extends z{addHooks(){this._map._container.classList.add(`leaflet-touch-zoom`),A(this._map._container,`pointerdown`,this._onPointerStart,this)}removeHooks(){this._map._container.classList.remove(`leaflet-touch-zoom`),M(this._map._container,`pointerdown`,this._onPointerStart,this),M(this._map._container,`pointermove`,this._onPointerMove,this),M(this._map._container,`pointerup pointercancel`,this._onPointerEnd,this)}_onPointerStart(e){let t=this._map,n=k();if(n.length!==2||t._animatingZoom||this._zooming)return;let r=t.pointerEventToContainerPoint(n[0]),i=t.pointerEventToContainerPoint(n[1]),{x:a,y:o}=E(t._container);this._containerScale=new y(a,o),this._containerOrigin=new y(n[0].clientX,n[0].clientY)._subtract(r.scaleBy(this._containerScale)),this._centerPoint=t.getSize()._divideBy(2),this._startLatLng=t.containerPointToLatLng(this._centerPoint),t.options.pinchZoom!==`center`&&(this._pinchStartLatLng=t.containerPointToLatLng(r.add(i)._divideBy(2))),this._startDist=r.distanceTo(i),this._startZoom=t.getZoom(),this._moved=!1,this._zooming=!0,t._stop(),A(t._container,`pointermove`,this._onPointerMove,this),A(t._container,`pointerup pointercancel`,this._onPointerEnd,this),e.preventDefault()}_onPointerMove(e){let t=k();if(t.length!==2||!this._zooming)return;let n=this._map,r=this._toContainerPoint(t[0]),i=this._toContainerPoint(t[1]),a=r.distanceTo(i)/this._startDist;if(this._zoom=n.getScaleZoom(a,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoom<n.getMinZoom()&&a<1||this._zoom>n.getMaxZoom()&&a>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.pinchZoom===`center`){if(this._center=this._startLatLng,a===1)return}else{let e=r._add(i)._divideBy(2)._subtract(this._centerPoint);if(a===1&&e.x===0&&e.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(e),this._zoom)}this._moved||=(n._moveStart(!0,!1,e),!0),cancelAnimationFrame(this._animRequest);let o=this._center,s=this._zoom;this._animRequest=requestAnimationFrame(()=>n._move(o,s,{pinch:!0})),e.preventDefault()}_toContainerPoint(e){return new y(e.clientX,e.clientY)._subtract(this._containerOrigin).unscaleBy(this._containerScale)}_onPointerEnd(){if(M(this._map._container,`pointermove`,this._onPointerMove,this),M(this._map._container,`pointerup pointercancel`,this._onPointerEnd,this),!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,cancelAnimationFrame(this._animRequest);let e=this._map,t=e._limitZoom(this._zoom);e._zoomAnimated?e._animateZoom(this._center,t,!!e.options.zoomSnap):e._resetView(this._center,t,!1,e._moveEvent)}};let Gn={crs:xt,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:null,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0,closePopupOnClick:!0,boxZoom:!0,doubleClickZoom:!0,dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1400,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0,keyboard:!0,keyboardPanDelta:80,ariaKeyShortcuts:!1,scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60,tapHold:!0,tapTolerance:15,pinchZoom:!0,bounceAtZoomLimits:!0,zoomControl:!0,attributionControl:!0,translate(e){return e}};var Kn=class e extends R{static initHooks=!0;static defaultOptions=Gn;constructor(e,t){super(),t=f(this,t),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._canvases=[],this._sizeChanged=!0,this._popup=void 0,this._renderer=void 0,this._initContainer(e),this._initLayout(),this._initEvents(),t.maxBounds&&this.setMaxBounds(t.maxBounds),t.zoom!==void 0&&(this._zoom=this._limitZoom(t.zoom)),t.center&&t.zoom!==void 0&&this.setView(new W(t.center),t.zoom,{reset:!0}),t.attributionControl&&(this.attributionControl=new Fe,this.addControl(this.attributionControl)),t.zoomControl&&(this.zoomControl=new Ue,this.addControl(this.zoomControl)),t.touchZoom!==void 0&&(console.warn(`Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead.`),t.pinchZoom=t.touchZoom,delete t.touchZoom),t.preferCanvas!==void 0&&console.error(`Map: preferCanvas option has been removed. Use renderer: new Canvas() instead.`),this.boxZoom=this._addHandler(`boxZoom`,Rn),this.doubleClickZoom=this._addHandler(`doubleClickZoom`,zn),this.dragging=this._addHandler(`dragging`,Bn),this.keyboard=this._addHandler(`keyboard`,Vn),this.scrollWheelZoom=this._addHandler(`scrollWheelZoom`,Hn),this.tapHold=this._addHandler(`tapHold`,Un),this.pinchZoom=this._addHandler(`pinchZoom`,Wn),this.touchZoom=this.pinchZoom,this.callInitHooks(),this._zoomAnimated=this.options.zoomAnimation,this._zoomAnimated&&this._createAnimProxy(),this._addLayers(this.options.layers)}setView(e,t,n){t=t===void 0?this._targetZoom():this._limitZoom(t);let r=this._limitCenter(new W(e),t,this.options.maxBounds);n??={};let i=n.originalEvent??n.zoom?.originalEvent??n.pan?.originalEvent;return this._stop(),this._targetView={center:e,zoom:t},this._animatingZoom?(this._pendingView={center:e,zoom:t,options:n},this):this._loaded&&!n.reset&&(n.animate!==void 0&&(n.zoom={animate:n.animate,...n.zoom},n.pan={animate:n.animate,duration:n.duration,...n.pan}),this._zoom===t?this._tryAnimatedPan(r,{originalEvent:i,...n.pan}):this._tryAnimatedZoom?.(r,t,{originalEvent:i,...n.zoom}))?(clearTimeout(this._sizeTimer),this):(this._resetView(this.options.worldCopyJump?this.wrapLatLng(r):r,t,n.pan?.noMoveStart,i),this)}setZoom(e,t){return this._loaded?this.setView(this._targetView?.center??this.getCenter(),e,{zoom:t}):(this._zoom=e,this)}zoomIn(e,t){return e??=this.options.zoomDelta,this.setZoom(this._targetZoom()+e,t)}zoomOut(e,t){return e??=this.options.zoomDelta,this.setZoom(this._targetZoom()-e,t)}setZoomAround(e,t,n){let r=this.project(this.getCenter()),i=e instanceof y?e.subtract(this.getSize().divideBy(2)):this.project(e).subtract(r),a=this.unproject(r.add(i.multiplyBy(1-1/this.getZoomScale(t))));return this.setView(a,t,{zoom:n})}_getBoundsCenterZoom(e,t){t??={},e=`getBounds`in e?e.getBounds():new U(e);let n=new y(t.paddingTopLeft||t.padding||[0,0]),r=new y(t.paddingBottomRight||t.padding||[0,0]),i=this.getBoundsZoom(e,!1,n.add(r));if(i=Math.min(t.maxZoom??1/0,i),i===1/0)return{center:e.getCenter(),zoom:i};let a=r.subtract(n).divideBy(2),o=this.project(e.getSouthWest(),i),s=this.project(e.getNorthEast(),i);return{center:this.unproject(o.add(s).divideBy(2).add(a),i),zoom:i}}fitBounds(e,t){if(e=new U(e),!e.isValid())throw Error(`Bounds are not valid.`);let n=this._getBoundsCenterZoom(e,t);return this.setView(n.center,n.zoom,t)}fitWorld(e){return this.fitBounds([[-90,-180],[90,180]],e)}panTo(e,t){return this.setView(e,void 0,{pan:t})}panBy(e,t){let{center:n=this.getCenter(),zoom:r=this._zoom}=this._targetView??{},i=this.unproject(this.project(n,r).add(new y(e).round()),r);return this.setView(i,r,{pan:t})}_panBy(e,t){if(t??={},!e.x&&!e.y)return this._moveStart(!1,!0,t.originalEvent)._moveEnd(!1);this._panAnim||=new Ln().on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this),this._moveStart(!1,t.noMoveStart,t.originalEvent);let n=this._prefersReducedMotion()&&!this.getSize().divideBy(2).contains(e);if(t.animate===!0||t.animate!==!1&&!n){this._mapPane.classList.add(`leaflet-pan-anim`);let n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,t.duration||.25,t.easeLinearity)}else this._rawPanBy(e),this._wrapWorldCopy(),this._fireMove(`move`)._moveEnd(!1);return this}flyTo(e,t,n){if(n??={},n.animate===!1)return this.setView(e,t,{...n,zoom:{...n.zoom,animate:!1}});if(n.animate!==!0&&this._prefersReducedMotion())return this.setView(e,t,n);t=t===void 0?this._targetZoom():this._limitZoom(t);let r=this._limitCenter(new W(e),t,this.options.maxBounds);this._stop(),this._targetView={center:e,zoom:t},this._subpixelOrigin=!0;let i=this.project(this.getCenter()),a=this.project(r),o=this.getSize(),s=this._zoom,c=Math.max(o.x,o.y),l=c*this.getZoomScale(s,t),u=a.distanceTo(i)||1,d=1.42,f=d*d;function p(e){let t=e?-1:1,n=e?l:c,r=l*l-c*c+t*f*f*u*u,i=2*n*f*u;return-Math.asinh(r/i)}let m=p(0);function ee(e){return c*(Math.cosh(m)*Math.tanh(m+d*e)-Math.sinh(m))/f}function te(e){return 1-(1-e)**1.5}let ne=Date.now(),h=(p(1)-m)/d,re=1e3*(n.duration||h*.8),g=()=>{let e=(Date.now()-ne)/re,n=te(e)*h;if(e<=1)this._flyToFrame=requestAnimationFrame(g),this._move(this.unproject(i.add(a.subtract(i).multiplyBy(ee(n)/u)),s),this.getScaleZoom(Math.cosh(m+d*n)/Math.cosh(m),s),{flyTo:!0});else{let e=this._zoom!==t;this._subpixelOrigin=!1,this._move(r,t),e||this._fireMove(`zoom`),this._moveEnd(!0)}};return this._moveStart(!0,n.noMoveStart,n.originalEvent),g(),this}flyToBounds(e,t){let n=this._getBoundsCenterZoom(e,t);return this.flyTo(n.center,n.zoom,t)}setMaxBounds(e){return e=new U(e),this.listens(`moveend`,this._panInsideMaxBounds)&&this.off(`moveend`,this._panInsideMaxBounds),e.isValid()?(this.options.maxBounds=e,this._loaded&&this._panInsideMaxBounds(),this.on(`moveend`,this._panInsideMaxBounds)):(this.options.maxBounds=null,this)}setMinZoom(e){let t=this.options.minZoom;return this.options.minZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this._targetZoom()<this.options.minZoom)?this.setZoom(e):this}setMaxZoom(e){let t=this.options.maxZoom;return this.options.maxZoom=e,this._loaded&&t!==e&&(this.fire(`zoomlevelschange`),this._targetZoom()>this.options.maxZoom)?this.setZoom(e):this}panInsideBounds(e,t){this._enforcingBounds=!0;let n=this.getCenter(),r=this._limitCenter(n,this._zoom,new U(e));return n.equals(r)||this.panTo(r,t),this._enforcingBounds=!1,this}panInside(e,t){t??={};let n=new y(t.paddingTopLeft||t.padding||[0,0]),r=new y(t.paddingBottomRight||t.padding||[0,0]),i=this.project(this.getCenter()),a=this.project(e),o=this.getPixelBounds(),s=new V([o.min.add(n),o.max.subtract(r)]),c=s.getSize();if(!s.contains(a)){this._enforcingBounds=!0;let e=a.subtract(s.getCenter()),n=s.extend(a).getSize().subtract(c);i.x+=e.x<0?-n.x:n.x,i.y+=e.y<0?-n.y:n.y,this.panTo(this.unproject(i),t),this._enforcingBounds=!1}return this}invalidateSize(e){if(!this._loaded)return this;e={animate:!1,pan:!0,...e===!0?{animate:!0}:e};let t=this.getSize();this._sizeChanged=!0;let n=this.getSize();n.equals(t)||(this._lastCenter=null);let r=t.divideBy(2).round(),i=n.divideBy(2).round(),a=r.subtract(i);return!a.x&&!a.y?this:(e.animate&&e.pan?this.panBy(a):(e.pan&&this._rawPanBy(a),this.fire(`move`),e.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(this.fire.bind(this,`moveend`),200)):this.fire(`moveend`)),this.fire(`resize`,{oldSize:t,newSize:n}))}stop(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire(`viewreset`),this._stop()}locate(e){if(this._locateOptions=e={timeout:1e4,watch:!1,...e},!(`geolocation`in navigator))return this._handleGeolocationError({code:0,message:`Geolocation not supported.`}),this;let t=this._handleGeolocationResponse.bind(this),n=this._handleGeolocationError.bind(this);return e.watch?(this._locationWatchId!==void 0&&navigator.geolocation.clearWatch(this._locationWatchId),this._locationWatchId=navigator.geolocation.watchPosition(t,n,e)):navigator.geolocation.getCurrentPosition(t,n,e),this}stopLocate(){return navigator.geolocation?.clearWatch?.(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}_handleGeolocationError(e){if(!this._container._leaflet_id)return;let t=e.code,n=e.message||(t===1?`permission denied`:t===2?`position unavailable`:`timeout`);this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire(`locationerror`,{code:t,message:`Geolocation error: ${n}.`})}_handleGeolocationResponse(e){if(!this._container._leaflet_id)return;let t=new W(e.coords.latitude,e.coords.longitude),n=t.toBounds(e.coords.accuracy*2),r=this._locateOptions;if(r.setView){let e=this.getBoundsZoom(n);this.setView(t,r.maxZoom?Math.min(e,r.maxZoom):e)}let i={latlng:t,bounds:n,timestamp:e.timestamp};for(let t in e.coords){let n=e.coords[t];typeof n==`number`&&(i[t]=n)}this.fire(`locationfound`,i)}addLayer(e){if(!e._layerAdd)throw Error(`The provided object is not a Layer.`);let t=i(e);return this._layers[t]||(this._layers[t]=e,e._mapToAdd=this,e.beforeAdd?.(this),this.whenReady(e._layerAdd,e)),this}removeLayer(e){let t=i(e);return this._layers[t]&&(this._loaded&&e.onRemove(this),delete this._layers[t],this._loaded&&(this.fire(`layerremove`,{layer:e}),e.fire(`remove`)),e._map=e._mapToAdd=null),this}hasLayer(e){return i(e)in this._layers}eachLayer(e,t){for(let n of Object.values(this._layers))e.call(t,n);return this}openPopup(e,t,n){return this._initOverlay(Mt,e,t,n).openOn(this),this}closePopup(e){return e=arguments.length?e:this._popup,e?.close(),this}openTooltip(e,t,n){return this._initOverlay(Ft,e,t,n).openOn(this),this}closeTooltip(e){return e.close(),this}_initOverlay(e,t,n,r){let i=t instanceof e?t:new e(r).setContent(t);return n&&i.setLatLng(n),i}addControl(e){return e.addTo(this),this}removeControl(e){return e.remove(),this}getRenderer(e){let t=e.options.renderer??this._getPaneRenderer(e)??this.options.renderer??(this._renderer??=e._createRenderer?.());return t&&!this.hasLayer(t)&&this.addLayer(t),t}_getPaneRenderer(e){let t=e.options.pane;if(t===`overlayPane`||t===void 0)return;let n=this._paneRenderers[t];if(!n){let r=this.options.renderer?.constructor;n=r?new r({...this.options.renderer?.options,pane:t}):e._createRenderer({pane:t}),this._paneRenderers[t]=n}return n}addHandler(e,t){return t&&(this[e]=this._addHandler(e,t)),this}_addHandler(e,t){let n=new t(this);return this._handlers.push(n),this.options[e]&&n.enable(),n}remove(){if(this._initEvents(!0),this.off(`moveend`,this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw Error(`Map container is being reused by another instance`);delete this._container._leaflet_id,delete this._containerId,this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),_e(this._container),this._mapPane.remove(),this._controlContainer.remove(),this._controlContainer.replaceChildren(),this._controlCorners={},cancelAnimationFrame(this._resizeRequest);for(let e=this._handlers.length-1;e>=0;e--)this._handlers[e].disable();clearTimeout(this._transitionEndTimer),clearTimeout(this._sizeTimer),this._loaded&&this.fire(`unload`);for(let e of Object.values(this._layers))e.remove();for(let e of Object.values(this._panes))e.remove();return this._layers={},this._panes={},delete this._renderer,this}createPane(e,t){let n=b(`div`,`leaflet-pane${e?` leaflet-${e.replace(`Pane`,``)}-pane`:``}`,t||this._mapPane);return e&&(this._panes[e]=n),n}getCenter(){return this._checkIfLoaded(),this._lastCenter&&this._getMapPanePos().equals(this._lastCenterPanePos)?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())}getZoom(){return this._zoom}getBounds(){let e=this.getPixelBounds();return new U(this.unproject(e.getBottomLeft()),this.unproject(e.getTopRight()))}getMinZoom(){return this.options.minZoom??this._layersMinZoom??0}getMaxZoom(){return this.options.maxZoom??this._layersMaxZoom??1/0}getBoundsZoom(e,t,n){e=new U(e),n=new y(n??[0,0]);let r=this.getZoom()??0,i=this.getMinZoom(),a=this.getMaxZoom(),o=this.getSize().subtract(n),s=new V([e.getNorthWest(),e.getNorthEast(),e.getSouthEast(),e.getSouthWest()].map(e=>this.project(e,r))).getSize(),c=this.options.zoomSnap,l=Math.max(o.x,0)/s.x,u=Math.max(o.y,0)/s.y,d=t?Math.max(l,u):Math.min(l,u);return r=this.getScaleZoom(d,r),c&&(r=Math.round(r/(c/100))*(c/100),r=t?Math.ceil(r/c)*c:Math.floor(r/c)*c),Math.max(i,Math.min(a,r))}getSize(){return(!this._size||this._sizeChanged)&&(this._size=new y(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()}getPixelBounds(e,t){let n=this._getTopLeftPoint(e,t);return new V(n,n.add(this.getSize()))}getPixelOrigin(){return this._checkIfLoaded(),this._pixelOrigin}getPixelWorldBounds(e){return this.options.crs.getProjectedBounds(e??this.getZoom())}getPane(e){return typeof e==`string`?this._panes[e]:e}getPanes(){return this._panes}getContainer(){return this._container}translate(e){return this.options.translate?.(e)??e}getZoomScale(e,t){let n=this.options.crs;return t??=this._zoom,n.scale(e)/n.scale(t)}getScaleZoom(e,t){let n=this.options.crs;t??=this._zoom;let r=n.zoom(e*n.scale(t));return isNaN(r)?1/0:r}project(e,t){return t??=this._zoom,this.options.crs.latLngToPoint(new W(e),t)}unproject(e,t){return t??=this._zoom,this.options.crs.pointToLatLng(new y(e),t)}layerPointToLatLng(e){let t=new y(e).add(this.getPixelOrigin());return this.unproject(t)}latLngToLayerPoint(e){return this.project(e)._subtract(this.getPixelOrigin())}wrapLatLng(e){return this.options.crs.wrapLatLng(new W(e))}wrapLatLngBounds(e){return this.options.crs.wrapLatLngBounds(new U(e))}distance(e,t){return this.options.crs.distance(new W(e),new W(t))}containerPointToLayerPoint(e){return new y(e).subtract(this._getMapPanePos())}layerPointToContainerPoint(e){return new y(e).add(this._getMapPanePos())}containerPointToLatLng(e){let t=this.containerPointToLayerPoint(e);return this.layerPointToLatLng(t)}latLngToContainerPoint(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(e))}pointerEventToContainerPoint(e){if(!this._animatingZoom)return Me(e,this._container);if(!this._containerRect){let e=this._container,{x:t,y:n,boundingClientRect:r}=E(e);this._containerRect={x:t,y:n,left:r.left+e.clientLeft*t,top:r.top+e.clientTop*n}}let t=this._containerRect;return new y((e.clientX-t.left)/t.x,(e.clientY-t.top)/t.y)}pointerEventToLayerPoint(e){return this.containerPointToLayerPoint(this.pointerEventToContainerPoint(e))}pointerEventToLatLng(e){return this.layerPointToLatLng(this.pointerEventToLayerPoint(e))}_initContainer(e){let t=oe(e);if(!t)throw Error(`Map container not found.`);if(t._leaflet_id)throw Error(`Map container is already initialized.`);this._container=t,ge(t),A(t,`scroll`,this._onScroll,this),this._containerId=i(t),t.hasAttribute(`role`)||t.setAttribute(`role`,`region`),t.hasAttribute(`aria-label`)||t.setAttribute(`aria-label`,this.translate(`Map`))}_initLayout(){let e=this._container;this._fadeAnimated=this.options.fadeAnimation,e.classList.add(`leaflet-container`,`leaflet-touch`),e.classList.toggle(`leaflet-retina`,window.devicePixelRatio>1),e.classList.toggle(`leaflet-fade-anim`,!!this._fadeAnimated),[`absolute`,`relative`,`fixed`,`sticky`].includes(getComputedStyle(e).position)||(e.style.position=`relative`),this._initPanes(),this._initControlPos()}_initControlPos(){let e={},t=`leaflet-`,n=b(`div`,`${t}control-container`,this._container);for(let r of[`top`,`bottom`])for(let i of[`left`,`right`])e[r+i]=b(`div`,`${t+r} ${t}${i}`,n);this._controlCorners=e,this._controlContainer=n}_initPanes(){let e={};this._panes=e,this._paneRenderers={},this._mapPane=this.createPane(`mapPane`,this._container),w(this._mapPane,new y(0,0)),this.createPane(`tilePane`),this.createPane(`overlayPane`),this.createPane(`shadowPane`),this.createPane(`markerPane`),this.createPane(`tooltipPane`),this.createPane(`popupPane`),this.options.markerZoomAnimation||(e.markerPane.classList.add(`leaflet-zoom-hide`),e.shadowPane.classList.add(`leaflet-zoom-hide`))}_resetView(e,t,n,r){let i=!this._loaded;this._loaded=!0,t=this._limitZoom(t),this.fire(`viewprereset`,{center:e,zoom:t}),w(this._mapPane,new y(0,0));let a=this._zoom!==t;a&&!i&&(this._instantZoomEnd=Date.now()+250),this._moveStart(a,n,r)._move(e,t)._moveEnd(a),this.fire(`viewreset`),i&&this.fire(`load`)}_moveStart(e,t,n){return this._moveEvent=n,e&&this._fireMove(`zoomstart`),t||this._fireMove(`movestart`),this}_fireMove(e,t){let n=this._moveEvent;return this.fire(e,n?{...t,originalEvent:n}:t)}_move(e,t,n,r){t??=this._zoom;let i=this._zoom!==t;return this._zoom=t,this._lastCenter=e,this._lastCenterPanePos=this._getMapPanePos(),this._pixelOrigin=this._getNewPixelOrigin(e),(i&&!r||n?.pinch||n?.flyTo)&&this._fireMove(`zoom`,n),r||this._fireMove(`move`,n),this}_moveEnd(e){let t=this._moveEvent,n=t&&{originalEvent:t};return this._moveEvent=void 0,this._pendingView||(this._targetView=null),e&&this.fire(`zoomend`,n),this.fire(`moveend`,n)}_stop(){return this._pendingView=null,this._targetView=null,cancelAnimationFrame(this._flyToFrame),cancelAnimationFrame(this._zoomAnimFrame),this._subpixelOrigin&&(this._subpixelOrigin=!1,this._move(this._lastCenter,this._zoom,{flyTo:!0})),this._panAnim?.stop(),this}_rawPanBy(e){w(this._mapPane,this._getMapPanePos().subtract(e))}_wrapWorldCopy(e=this._getMapPanePos()){if(!this._loaded||!this.options.worldCopyJump||this.options.crs.infinite)return e;let t=this.getPixelWorldBounds().getSize().x,n=e.x-t*Math.round((e.x+this.latLngToLayerPoint([0,0]).x-this.getSize().x/2)/t),r=Math.round((n-this._getMapPanePos().x)/t);return e=new y(n,e.y),r&&(w(this._mapPane,e),this.fire(`worldcopyjump`,{worlds:r})),e}_addLayers(e){e=e?Array.isArray(e)?e:[e]:[];for(let t of e)this.addLayer(t)}_addZoomLimit(e){isNaN(e.options.maxZoom)&&isNaN(e.options.minZoom)||(this._zoomBoundLayers[i(e)]=e,this._updateZoomLevels())}_removeZoomLimit(e){let t=i(e);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())}_updateZoomLevels(){let e=1/0,t=-1/0,n=this._getZoomSpan();for(let n of Object.values(this._zoomBoundLayers)){let r=n.options;r.minZoom!=null&&!Number.isNaN(r.minZoom)&&(e=Math.min(e,r.minZoom)),r.maxZoom!=null&&!Number.isNaN(r.maxZoom)&&(t=Math.max(t,r.maxZoom))}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=e===1/0?void 0:e,n!==this._getZoomSpan()&&this.fire(`zoomlevelschange`),this.options.maxZoom===void 0&&this._layersMaxZoom!==void 0&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}_getZoomSpan(){return this.getMaxZoom()-this.getMinZoom()}_panInsideMaxBounds(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)}_checkIfLoaded(){if(!this._loaded)throw Error(`Set map center and zoom first.`)}_initEvents(e){this._targets={},this._targets[i(this._container)]=this,(e?M:A)(this._container,`click dblclick pointerdown pointerup pointerover pointerout pointermove contextmenu keydown keyup`,this._handleDOMEvent,this),this.options.trackResize&&(e?this._resizeObserver.disconnect():(this._resizeObserver||=new ResizeObserver(this._onResize.bind(this)),this._resizeObserver.observe(this._container))),this.options.transform3DLimit&&(e?this.off(`moveend`,this._onMoveEnd):this.on(`moveend`,this._onMoveEnd))}_onResize(){cancelAnimationFrame(this._resizeRequest),this._resizeRequest=requestAnimationFrame(()=>{this.invalidateSize({debounceMoveend:!0})})}_onScroll(){this._container.scrollTop=0,this._container.scrollLeft=0}_onMoveEnd(){let e=this._getMapPanePos();Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}_findEventTargets(e,t){let n=[],r,a=e.target,o=!1,s=t===`pointerout`||t===`pointerover`,c=e.relatedTarget,l=(t===`click`||t===`preclick`)&&e.detail>0;for(;a;){if(r=this._targets[i(a)],r&&l&&this._draggableMoved(r)){o=!0;break}if(r?.listens(t,!0)&&(s&&a.contains(c)||(n.push(r),s))||a===this._container)break;a=a.parentNode}return!n.length&&!o&&!s&&this.listens(t,!0)&&(n=[this]),n}_handleDOMEvent(e){let t=e.target;if(e.type===`click`&&Ce(e),!this._loaded||pe.has(t)||e.type===`click`&&me(t,this._container))return;let n=e,r=n.type,i=r===`pointermove`,a=this._hoveredCanvasLayer,o=r===`pointerover`||r===`pointerout`||r.startsWith(`key`)||this._animatingZoom||i&&this.dragging?.moving(),s=n.relatedTarget,c=r===`pointerout`&&!this._container.contains(s),l=o?void 0:this._canvasLayerAt(n,r===`click`);r===`pointerdown`?this._pressedCanvasLayer=o?void 0:l??null:r===`click`&&n.detail>0&&this._pressedCanvasLayer!==void 0&&(l!==this._pressedCanvasLayer&&(l=void 0),this._pressedCanvasLayer=void 0),l!==a&&(i&&!o||c)&&(a&&this._fireDOMEvent(n,`pointerout`,[a]),this._container.classList.toggle(`leaflet-interactive`,!!l),this._hoveredCanvasLayer=l,l&&this._fireDOMEvent(n,`pointerover`,[l])),this._fireDOMEvent(n,r,l&&[l])}_canvasLayerAt(e,t){for(let t=e.target;t!==this._container;t=t.parentNode)if(!t||t===this._controlContainer||this._targets[i(t)])return;for(let n of this._canvases){let r=n._layerAt(e,t);if(r)return r}}static _pointerEvents=[`click`,`dblclick`,`pointerover`,`pointerout`,`contextmenu`];_fireDOMEvent(t,n,r){n===`click`&&this._fireDOMEvent(t,`preclick`,r);let i=r&&(n===`pointerover`||n===`pointerout`)?[]:this._findEventTargets(t,n);if(r&&(i=[...r.filter(e=>e.listens(n,!0)),...i]),!i.length)return;n===`contextmenu`&&t.preventDefault();let a=i[0],o={originalEvent:t};if(t.type!==`keydown`&&t.type!==`keyup`){let e=(!a._pxRadius||a._pxRadius<=10)&&a.getLatLng?.();o.containerPoint=e?this.latLngToContainerPoint(e):this.pointerEventToContainerPoint(t),o.layerPoint=this.containerPointToLayerPoint(o.containerPoint),o.latlng=e||this.layerPointToLatLng(o.layerPoint)}for(let r of i){r.fire(n,o,!0);let i=r.options.bubblingMouseEvents??r.options.bubblingPointerEvents;if(de.has(t)||i===!1&&e._pointerEvents.includes(n))return}}_draggableMoved(e){return e=e.dragging?.enabled()?e:this,e.dragging?.moved()||this.boxZoom.moved()}whenReady(e,t){return this._loaded?e.call(t||this,{target:this}):this.on(`load`,e,t),this}_getMapPanePos(){return T(this._mapPane)}_getTopLeftPoint(e,t){return(e&&t!==void 0?this._getNewPixelOrigin(e,t):this.getPixelOrigin()).subtract(this._getMapPanePos())}_getNewPixelOrigin(e,t){let n=this.getSize()._divideBy(2),r=this.project(e,t)._subtract(n)._add(this._getMapPanePos());return this._subpixelOrigin?r:r._round()}_snapLayerPoint(e){return this._subpixelOrigin?e:e._round()}_latLngToNewLayerPoint(e,t,n){let r=this._getNewPixelOrigin(n,t);return this.project(e,t)._subtract(r)}_getCenterLayerPoint(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))}_getCenterOffset(e){return this.latLngToLayerPoint(e)._round()._subtract(this._getCenterLayerPoint())}_limitCenter(e,t,n){if(!n)return e;let r=this.project(e,t),i=this.getSize().divideBy(2),a=new V(r.subtract(i),r.add(i)),o=this._getBoundsOffset(a,n,t);return Math.abs(o.x)<=1&&Math.abs(o.y)<=1?e:this.unproject(r.add(o),t)}_prefersReducedMotion(){return window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}_limitOffset(e,t){if(!t)return e;let n=this.getPixelBounds(),r=new V(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(r,t))}_getBoundsOffset(e,t,n){let r=t,i=new V([r.getNorthWest(),r.getNorthEast(),r.getSouthEast(),r.getSouthWest()].map(e=>this.project(e,n))),a=i.min.subtract(e.min),o=i.max.subtract(e.max);return new y(this._rebound(a.x,-o.x),this._rebound(a.y,-o.y))}_rebound(e,t){return e+t>0?Math.round(e-t)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(t))}_limitZoom(e){let t=this.getMinZoom(),n=this.getMaxZoom(),r=this.options.zoomSnap;return r&&(e=Math.round(e/r)*r),Math.max(t,Math.min(n,e))}_onPanTransitionStep(){this._fireMove(`move`)}_onPanTransitionEnd(){this._mapPane.classList.remove(`leaflet-pan-anim`),this._wrapWorldCopy(),this._moveEnd(!1)}_tryAnimatedPan(e,t){let n=this._getCenterOffset(e)._round();return t?.animate!==!0&&!this.getSize().contains(n)?!1:(this._panBy(n,t),!0)}_createAnimProxy(){this._proxy=b(`div`,`leaflet-proxy leaflet-zoom-animated`),this._panes.mapPane.append(this._proxy),this.on(`zoomanim`,this._animateProxyZoom,this),this.on(`load moveend`,this._animMoveEnd,this),A(this._proxy,`transitionend`,this._catchTransitionEnd,this)}_animateProxyZoom(e){let t=this._proxy.style.transform;C(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),t===this._proxy.style.transform&&this._animatingZoom&&this._onZoomTransitionEnd()}_animMoveEnd(){let e=this.getCenter(),t=this.getZoom();C(this._proxy,this.project(e,t),this.getZoomScale(t,1))}_catchTransitionEnd(e){this._animatingZoom&&e.propertyName.includes(`transform`)&&this._onZoomTransitionEnd()}_nothingToAnimate(){return!this._container.getElementsByClassName(`leaflet-zoom-animated`).length}_targetZoom(){return this._targetView?.zoom??this._zoom}_zoomInputBlocked(){return this._animatingZoom||Date.now()<this._instantZoomEnd}_tryAnimatedZoom(e,t,n){if(this._animatingZoom)return!0;n??={};let r=this.options.zoomAnimationThreshold,i=this._prefersReducedMotion()&&n.animate!==!0?Math.min(r,1):r;if(!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(t-this._zoom)>i)return!1;let a=this.getZoomScale(t),o=this._getCenterOffset(e)._divideBy(1-1/a);return n.animate!==!0&&!this.getSize().contains(o)?!1:(this._zoomAnimFrame=requestAnimationFrame(()=>{this._zoomAnimFrame=0,this._moveStart(!0,n.noMoveStart,n.originalEvent)._animateZoom(e,t)}),!0)}_animateZoom(e,t,n){this._mapPane.parentNode&&(this._animatingZoom=!0,this._animateToCenter=e,this._animateToZoom=t,this._mapPane.classList.add(`leaflet-zoom-anim`),this.fire(`zoomanim`,{center:e,zoom:t,noUpdate:n}),this._tempFireZoomEvent||=this._zoom!==this._animateToZoom,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),clearTimeout(this._transitionEndTimer),this._transitionEndTimer=setTimeout(this._onZoomTransitionEnd.bind(this),1e3))}_onZoomTransitionEnd(){if(!this._animatingZoom)return;clearTimeout(this._transitionEndTimer),this._containerRect=null,this._mapPane.classList.remove(`leaflet-zoom-anim`),this._animatingZoom=!1,this._move(this.getCenter(),this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this._fireMove(`zoom`),delete this._tempFireZoomEvent,this._fireMove(`move`),this._moveEnd(!0);let e=this._pendingView;e&&(this._pendingView=null,this.setView(e.center,e.zoom,e.options))}},qn=t({AttributionControl:()=>Fe,BlanketOverlay:()=>$t,Bounds:()=>V,BoxZoomHandler:()=>Rn,CRS:()=>yt,Canvas:()=>jn,Circle:()=>Pn,CircleMarker:()=>Nn,Class:()=>_,Control:()=>v,DefaultIcon:()=>qt,DivIcon:()=>gn,DivOverlay:()=>At,DomEvent:()=>Ee,DomUtil:()=>ae,DoubleClickZoomHandler:()=>zn,DragHandler:()=>Bn,Draggable:()=>B,EPSG3395:()=>bt,EPSG3857:()=>xt,EPSG4326:()=>Ct,EPSG900913:()=>St,EarthCRS:()=>Y,Evented:()=>R,FeatureGroup:()=>Q,FullscreenControl:()=>Le,GeoJSON:()=>ln,GridLayer:()=>vn,Handler:()=>z,Icon:()=>Wt,ImageOverlay:()=>dn,KeyboardHandler:()=>Vn,LatLng:()=>W,LatLngBounds:()=>U,Layer:()=>X,LayerGroup:()=>Ht,LayersControl:()=>ze,LeafletMap:()=>Kn,LineUtil:()=>Qe,LonLatProjection:()=>ht,Map:()=>Kn,Marker:()=>Zt,MercatorProjection:()=>gt,Path:()=>rn,PinchZoomHandler:()=>Wn,Point:()=>y,PolyUtil:()=>ut,Polygon:()=>cn,Polyline:()=>on,Popup:()=>Mt,ProjectedCRS:()=>wt,Rectangle:()=>Fn,Renderer:()=>en,SVG:()=>tn,SVGOverlay:()=>mn,ScaleControl:()=>Ve,ScrollWheelZoomHandler:()=>Hn,SimpleCRS:()=>Tt,SphericalMercatorProjection:()=>vt,TapHoldHandler:()=>Un,TileLayer:()=>Tn,Tooltip:()=>Ft,Transformation:()=>H,Util:()=>n,VideoOverlay:()=>pn,WMSTileLayer:()=>On,ZoomControl:()=>Ue,version:()=>Jn});let Jn=`2.0.0-beta.5`,Yn=e=>e?.[Symbol.toStringTag]===`Module`;function Xn(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Yn(t)?Xn(t):t]))}return Xn(qn)})();
//# sourceMappingURL=leaflet-global.js.map