@mattilsynet/design 2.2.20 → 2.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var mtdsatlas=function(D){"use strict";var An=Object.defineProperty;var Bn=(D,R,x)=>R in D?An(D,R,{enumerable:!0,configurable:!0,writable:!0,value:x}):D[R]=x;var Di=(D,R,x)=>Bn(D,typeof R!="symbol"?R+"":R,x);var X;let R=0;function x(n){return"_leaflet_id"in n||(n._leaflet_id=++R),n._leaflet_id}function Je(n,t,e){let i,s;function o(){i=!1,s&&(r.apply(e,s),s=!1)}function r(...a){i?s=a:(n.apply(e,a),setTimeout(o,t),i=!0)}return r}function _t(n,t,e){const i=t[1],s=t[0],o=i-s;return n===i&&e?n:((n-s)%o+o)%o+s}function Z(){return!1}function N(n,t){if(t===!1)return n;const e=10**(t===void 0?6:t);return Math.round(n*e)/e}function F(n){return n.trim().split(/\s+/)}function L(n,t){Object.hasOwn(n,"options")||(n.options=n.options?Object.create(n.options):{});for(const e in t)Object.hasOwn(t,e)&&(n.options[e]=t[e]);return n.options}const Ri=/\{ *([\w_ -]+) *\}/g;function Qe(n,t){return n.replace(Ri,(e,i)=>{let s=t[i];if(s===void 0)throw new Error(`No value provided for variable ${e}`);return typeof s=="function"&&(s=s(t)),s})}const Mt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";var Ni={__proto__:null,emptyImageUrl:Mt,falseFn:Z,formatNum:N,get lastId(){return R},setOptions:L,splitWords:F,stamp:x,template:Qe,throttle:Je,wrapNum:_t};class pt{static extend({statics:t,includes:e,...i}){const s=class extends this{};Object.setPrototypeOf(s,this);const o=this.prototype,r=s.prototype;if(t&&Object.assign(s,t),Array.isArray(e))for(const a of e)Object.assign(r,a);else e&&Object.assign(r,e);return Object.assign(r,i),r.options&&(r.options=o.options?Object.create(o.options):{},Object.assign(r.options,i.options)),r._initHooks=[],s}static include(t){const e=this.prototype.options;return Object.assign(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this}static setDefaultOptions(t){return L(this.prototype,t),this}static mergeOptions(t){return this.prototype.options??={},Object.assign(this.prototype.options,t),this}static addInitHook(t,...e){const i=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks??=[],this.prototype._initHooks.push(i),this}constructor(...t){this._initHooksCalled=!1,L(this),this.initialize&&this.initialize(...t),this.callInitHooks()}initialize(){}callInitHooks(){if(this._initHooksCalled)return;const t=[];let e=this;for(;(e=Object.getPrototypeOf(e))!==null;)t.push(e);t.reverse();for(const i of t)for(const s of i._initHooks??[])s.call(this);this._initHooksCalled=!0}}class ft extends pt{on(t,e,i){if(typeof t=="object")for(const[s,o]of Object.entries(t))this._on(s,o,e);else for(const s of F(t))this._on(s,e,i);return this}off(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(const[s,o]of Object.entries(t))this._off(s,o,e);else{const s=arguments.length===1;for(const o of F(t))s?this._off(o):this._off(o,e,i)}return this}_on(t,e,i,s){if(typeof e!="function"){console.warn(`wrong listener type: ${typeof e}`);return}if(this._listens(t,e,i)!==!1)return;i===this&&(i=void 0);const o={fn:e,ctx:i};s&&(o.once=!0),this._events??={},this._events[t]??=[],this._events[t].push(o)}_off(t,e,i){if(!this._events)return;let s=this._events[t];if(!s)return;if(arguments.length===1){if(this._firingCount)for(const r of s)r.fn=Z;delete this._events[t];return}if(typeof e!="function"){console.warn(`wrong listener type: ${typeof e}`);return}const o=this._listens(t,e,i);if(o!==!1){const r=s[o];this._firingCount&&(r.fn=Z,this._events[t]=s=s.slice()),s.splice(o,1)}}fire(t,e,i){if(!this.listens(t,i))return this;const s={...e,type:t,target:this,sourceTarget:e?.sourceTarget||this};if(this._events){const o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(const r of o){const a=r.fn;r.once&&this.off(t,a,r.ctx),a.call(r.ctx||this,s)}this._firingCount--}}return i&&this._propagateEvent(s),this}listens(t,e,i,s){typeof t!="string"&&console.warn('"string" type argument expected');let o=e;if(typeof e!="function"&&(s=!!e,o=void 0,i=void 0),this._events?.[t]?.length&&this._listens(t,o,i)!==!1)return!0;if(s){for(const r of Object.values(this._eventParents??{}))if(r.listens(t,e,i,s))return!0}return!1}_listens(t,e,i){if(!this._events)return!1;const s=this._events[t]??[];if(!e)return!!s.length;i===this&&(i=void 0);const o=s.findIndex(r=>r.fn===e&&r.ctx===i);return o===-1?!1:o}once(t,e,i){if(typeof t=="object")for(const[s,o]of Object.entries(t))this._on(s,o,e,!0);else for(const s of F(t))this._on(s,e,i,!0);return this}addEventParent(t){return this._eventParents??={},this._eventParents[x(t)]=t,this}removeEventParent(t){return this._eventParents&&delete this._eventParents[x(t)],this}_propagateEvent(t){for(const e of Object.values(this._eventParents??{}))e.fire(t.type,{propagatedFrom:t.target,...t},!0)}}class u{constructor(t,e,i){if(!u.validate(t,e))throw new Error(`Invalid Point object: (${t}, ${e})`);let o,r;if(t instanceof u)return t;Array.isArray(t)?(o=t[0],r=t[1]):typeof t=="object"&&"x"in t&&"y"in t?(o=t.x,r=t.y):(o=t,r=e),this.x=i?Math.round(o):o,this.y=i?Math.round(r):r}static validate(t,e){return t instanceof u||Array.isArray(t)||t&&typeof t=="object"&&"x"in t&&"y"in t?!0:!!((t||t===0)&&(e||e===0))}clone(){const t=new u(0,0);return t.x=this.x,t.y=this.y,t}add(t){return this.clone()._add(new u(t))}_add(t){return this.x+=t.x,this.y+=t.y,this}subtract(t){return this.clone()._subtract(new u(t))}_subtract(t){return this.x-=t.x,this.y-=t.y,this}divideBy(t){return this.clone()._divideBy(t)}_divideBy(t){return this.x/=t,this.y/=t,this}multiplyBy(t){return this.clone()._multiplyBy(t)}_multiplyBy(t){return this.x*=t,this.y*=t,this}scaleBy(t){return new u(this.x*t.x,this.y*t.y)}unscaleBy(t){return new u(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 u(t);const e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)}equals(t){return t=new u(t),t.x===this.x&&t.y===this.y}contains(t){return t=new u(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}toString(){return`Point(${N(this.x)}, ${N(this.y)})`}}class v{constructor(t,e){if(!t)return;if(t instanceof v)return t;const i=e?[t,e]:t;for(const s of i)this.extend(s)}extend(t){let e,i;if(!t)return this;if(t instanceof u||typeof t[0]=="number"||"x"in t)e=i=new u(t);else if(t=new v(t),e=t.min,i=t.max,!e||!i)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=i.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)),this}getCenter(t){return new u((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)}getBottomLeft(){return new u(this.min.x,this.max.y)}getTopRight(){return new u(this.max.x,this.min.y)}getTopLeft(){return this.min}getBottomRight(){return this.max}getSize(){return this.max.subtract(this.min)}contains(t){let e,i;return typeof t[0]=="number"||t instanceof u?t=new u(t):t=new v(t),t instanceof v?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y}intersects(t){t=new v(t);const e=this.min,i=this.max,s=t.min,o=t.max,r=o.x>=e.x&&s.x<=i.x,a=o.y>=e.y&&s.y<=i.y;return r&&a}overlaps(t){t=new v(t);const e=this.min,i=this.max,s=t.min,o=t.max,r=o.x>e.x&&s.x<i.x,a=o.y>e.y&&s.y<i.y;return r&&a}isValid(){return!!(this.min&&this.max)}pad(t){const e=this.min,i=this.max,s=Math.abs(e.x-i.x)*t,o=Math.abs(e.y-i.y)*t;return new v(new u(e.x-s,e.y-o),new u(i.x+s,i.y+o))}equals(t){return t?(t=new v(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}}class w{constructor(t,e){if(!t)return;if(t instanceof w)return t;const i=e?[t,e]:t;for(const s of i)this.extend(s)}extend(t){const e=this._southWest,i=this._northEast;let s,o;if(t instanceof p)s=t,o=t;else if(t instanceof w){if(s=t._southWest,o=t._northEast,!s||!o)return this}else return t?p.validate(t)?this.extend(new p(t)):this.extend(new w(t)):this;return!e&&!i?(this._southWest=new p(s.lat,s.lng),this._northEast=new p(o.lat,o.lng)):(e.lat=Math.min(s.lat,e.lat),e.lng=Math.min(s.lng,e.lng),i.lat=Math.max(o.lat,i.lat),i.lng=Math.max(o.lng,i.lng)),this}pad(t){const e=this._southWest,i=this._northEast,s=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new w(new p(e.lat-s,e.lng-o),new p(i.lat+s,i.lng+o))}getCenter(){return new p((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 p(this.getNorth(),this.getWest())}getSouthEast(){return new p(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){p.validate(t)?t=new p(t):t=new w(t);const e=this._southWest,i=this._northEast;let s,o;return t instanceof w?(s=t.getSouthWest(),o=t.getNorthEast()):s=o=t,s.lat>=e.lat&&o.lat<=i.lat&&s.lng>=e.lng&&o.lng<=i.lng}intersects(t){t=new w(t);const e=this._southWest,i=this._northEast,s=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&s.lat<=i.lat,a=o.lng>=e.lng&&s.lng<=i.lng;return r&&a}overlaps(t){t=new w(t);const e=this._southWest,i=this._northEast,s=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&s.lat<i.lat,a=o.lng>e.lng&&s.lng<i.lng;return r&&a}toBBoxString(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")}equals(t,e){return t?(t=new w(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1}isValid(){return!!(this._southWest&&this._northEast)}}class p{constructor(t,e,i){if(!p.validate(t,e,i))throw new Error(`Invalid LatLng object: (${t}, ${e})`);let o,r,a;if(t instanceof p)return t;Array.isArray(t)&&typeof t[0]!="object"?t.length===3?(o=t[0],r=t[1],a=t[2]):t.length===2&&(o=t[0],r=t[1]):typeof t=="object"&&"lat"in t?(o=t.lat,r="lng"in t?t.lng:t.lon,a=t.alt):(o=t,r=e,a=i),this.lat=+o,this.lng=+r,a!==void 0&&(this.alt=+a)}static validate(t,e,i){return t instanceof p||typeof t=="object"&&"lat"in t?!0:t&&Array.isArray(t)&&typeof t[0]!="object"?t.length===3||t.length===2:!!((t||t===0)&&(e||e===0))}equals(t,e){return t?(t=new p(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(e??1e-9)):!1}toString(t){return`LatLng(${N(this.lat,t)}, ${N(this.lng,t)})`}distanceTo(t){return q.distance(this,new p(t))}wrap(){return q.wrapLatLng(this)}toBounds(t){const e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return new w([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])}clone(){const t=new p(0,0);return t.lat=this.lat,t.lng=this.lng,t.alt=this.alt,t}}class G{static projection=void 0;static transformation=void 0;static latLngToPoint(t,e){const i=this.projection.project(t),s=this.scale(e);return this.transformation._transform(i,s)}static pointToLatLng(t,e){const i=this.scale(e),s=this.transformation.untransform(t,i);return this.projection.unproject(s)}static project(t){return this.projection.project(t)}static unproject(t){return this.projection.unproject(t)}static scale(t){return 256*2**t}static zoom(t){return Math.log(t/256)/Math.LN2}static getProjectedBounds(t){if(this.infinite)return null;const e=this.projection.bounds,i=this.scale(t),s=this.transformation.transform(e.min,i),o=this.transformation.transform(e.max,i);return new v(s,o)}static infinite=!1;static wrapLatLng(t){t=new p(t);const e=this.wrapLng?_t(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?_t(t.lat,this.wrapLat,!0):t.lat,s=t.alt;return new p(i,e,s)}static wrapLatLngBounds(t){t=new w(t);const e=t.getCenter(),i=this.wrapLatLng(e),s=e.lat-i.lat,o=e.lng-i.lng;if(s===0&&o===0)return t;const r=t.getSouthWest(),a=t.getNorthEast(),h=new p(r.lat-s,r.lng-o),l=new p(a.lat-s,a.lng-o);return new w(h,l)}}class q extends G{static wrapLng=[-180,180];static R=6371e3;static distance(t,e){const i=Math.PI/180,s=t.lat*i,o=e.lat*i,r=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),h=r*r+Math.cos(s)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return this.R*l}}const ti=6378137,Yt={R:ti,MAX_LATITUDE:85.0511287798,project(n){n=new p(n);const t=Math.PI/180,e=this.MAX_LATITUDE,i=Math.max(Math.min(e,n.lat),-e),s=Math.sin(i*t);return new u(this.R*n.lng*t,this.R*Math.log((1+s)/(1-s))/2)},unproject(n){n=new u(n);const t=180/Math.PI;return new p((2*Math.atan(Math.exp(n.y/this.R))-Math.PI/2)*t,n.x*t/this.R)},bounds:(()=>{const n=ti*Math.PI;return new v([-n,-n],[n,n])})()};class mt{constructor(t,e,i,s){if(Array.isArray(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=i,this._d=s}transform(t,e){return this._transform(t.clone(),e)}_transform(t,e){return e||=1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t}untransform(t,e){return e||=1,new u((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}}class Xt extends q{static code="EPSG:3857";static projection=Yt;static transformation=(()=>{const t=.5/(Math.PI*Yt.R);return new mt(t,.5,-t,.5)})()}class Fi extends Xt{static code="EPSG:900913"}const ei=Jt("chrome"),Hi=!ei&&Jt("safari"),ji=typeof orientation<"u"||Jt("mobile"),ii=typeof window>"u"?!1:!!window.PointerEvent,ni=typeof window>"u"?!1:"ontouchstart"in window||!!window.TouchEvent,Gi=ni||ii,Wi=typeof window>"u"||typeof window.devicePixelRatio>"u"?!1:window.devicePixelRatio>1,$i=typeof navigator>"u"||typeof navigator.platform>"u"?!1:navigator.platform.startsWith("Mac"),Ui=typeof navigator>"u"||typeof navigator.platform>"u"?!1:navigator.platform.startsWith("Linux");function Jt(n){return typeof navigator>"u"||typeof navigator.userAgent>"u"?!1:navigator.userAgent.toLowerCase().includes(n)}var z={chrome:ei,safari:Hi,mobile:ji,pointer:ii,touch:Gi,touchNative:ni,retina:Wi,mac:$i,linux:Ui};function qi(n){let t={bubbles:n.bubbles,cancelable:n.cancelable,composed:n.composed,detail:2,view:n.view,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,altKey:n.altKey,metaKey:n.metaKey,button:n.button,buttons:n.buttons,relatedTarget:n.relatedTarget,region:n.region},e;return n instanceof PointerEvent?(t={...t,pointerId:n.pointerId,width:n.width,height:n.height,pressure:n.pressure,tangentialPressure:n.tangentialPressure,tiltX:n.tiltX,tiltY:n.tiltY,twist:n.twist,pointerType:n.pointerType,isPrimary:n.isPrimary},e=new PointerEvent("dblclick",t)):e=new MouseEvent("dblclick",t),e}const Vi=200;function Ki(n,t){n.addEventListener("dblclick",t);let e=0,i;function s(o){if(o.detail!==1){i=o.detail;return}if(o.pointerType==="mouse"||o.sourceCapabilities&&!o.sourceCapabilities.firesTouchEvents)return;const r=ci(o);if(r.some(h=>h instanceof HTMLLabelElement&&h.attributes.for)&&!r.some(h=>h instanceof HTMLInputElement||h instanceof HTMLSelectElement))return;const a=Date.now();a-e<=Vi?(i++,i===2&&o.target.dispatchEvent(qi(o))):i=1,e=a}return n.addEventListener("click",s),{dblclick:t,simDblclick:s}}function Yi(n,t){n.removeEventListener("dblclick",t.dblclick),n.removeEventListener("click",t.simDblclick)}function si(n){return typeof n=="string"?document.getElementById(n):n}function b(n,t,e){const i=document.createElement(n);return i.className=t??"",e?.appendChild(i),i}function gt(n){const t=n.parentNode;t&&t.lastChild!==n&&t.appendChild(n)}function yt(n){const t=n.parentNode;t&&t.firstChild!==n&&t.insertBefore(n,t.firstChild)}function Q(n,t,e){const i=t??new u(0,0);n.style.transform=`translate3d(${i.x}px,${i.y}px,0)${e?` scale(${e})`:""}`}const oi=new WeakMap;function M(n,t){oi.set(n,t),Q(n,t)}function tt(n){return oi.get(n)??new u(0,0)}const zt=typeof document>"u"?{}:document.documentElement.style,Qt=["userSelect","WebkitUserSelect"].find(n=>n in zt);let St;function te(){const n=zt[Qt];n!=="none"&&(St=n,zt[Qt]="none")}function ee(){typeof St>"u"||(zt[Qt]=St,St=void 0)}function ie(){g(window,"dragstart",S)}function ne(){P(window,"dragstart",S)}let Ot,se;function oe(n){for(;n.tabIndex===-1;)n=n.parentNode;n.style&&(Zt(),Ot=n,se=n.style.outlineStyle,n.style.outlineStyle="none",g(window,"keydown",Zt))}function Zt(){Ot&&(Ot.style.outlineStyle=se,Ot=void 0,se=void 0,P(window,"keydown",Zt))}function ri(n){do n=n.parentNode;while((!n.offsetWidth||!n.offsetHeight)&&n!==document.body);return n}function re(n){const t=n.getBoundingClientRect();return{x:t.width/n.offsetWidth||1,y:t.height/n.offsetHeight||1,boundingClientRect:t}}var Xi={__proto__:null,create:b,disableImageDrag:ie,disableTextSelection:te,enableImageDrag:ne,enableTextSelection:ee,get:si,getPosition:tt,getScale:re,getSizedParentNode:ri,preventOutline:oe,restoreOutline:Zt,setPosition:M,setTransform:Q,toBack:yt,toFront:gt};let et=new Map,ae=!1;function ai(){ae||(ae=!0,document.addEventListener("pointerdown",hi,{capture:!0}),document.addEventListener("pointermove",li,{capture:!0}),document.addEventListener("pointerup",Et,{capture:!0}),document.addEventListener("pointercancel",Et,{capture:!0}),et=new Map)}function Ji(){document.removeEventListener("pointerdown",hi,{capture:!0}),document.removeEventListener("pointermove",li,{capture:!0}),document.removeEventListener("pointerup",Et,{capture:!0}),document.removeEventListener("pointercancel",Et,{capture:!0}),ae=!1}function hi(n){et.set(n.pointerId,n)}function li(n){et.has(n.pointerId)&&et.set(n.pointerId,n)}function Et(n){et.delete(n.pointerId)}function lt(){return[...et.values()]}function Qi(){et.clear()}var tn={__proto__:null,cleanupPointers:Qi,disablePointerDetection:Ji,enablePointerDetection:ai,getPointers:lt};function g(n,t,e,i){if(t&&typeof t=="object")for(const[s,o]of Object.entries(t))le(n,s,o,e);else for(const s of F(t))le(n,s,e,i);return this}const W="_leaflet_events";function P(n,t,e,i){if(arguments.length===1)di(n),delete n[W];else if(t&&typeof t=="object")for(const[s,o]of Object.entries(t))de(n,s,o,e);else if(t=F(t),arguments.length===2)di(n,s=>t.includes(s));else for(const s of t)de(n,s,e,i);return this}function di(n,t){for(const e of Object.keys(n[W]??{})){const i=e.split(/\d/)[0];(!t||t(i))&&de(n,i,null,null,e)}}const he={pointerenter:"pointerover",pointerleave:"pointerout",wheel:typeof window>"u"?!1:!("onwheel"in window)&&"mousewheel"};function le(n,t,e,i){const s=t+x(e)+(i?`_${x(i)}`:"");if(n[W]&&n[W][s])return this;let o=function(a){return e.call(i||n,a||window.event)};const r=o;z.touch&&t==="dblclick"?o=Ki(n,o):"addEventListener"in n?t==="wheel"||t==="mousewheel"?n.addEventListener(he[t]||t,o,{passive:!1}):t==="pointerenter"||t==="pointerleave"?(o=function(a){a??=window.event,ue(n,a)&&r(a)},n.addEventListener(he[t],o,!1)):n.addEventListener(t,r,!1):n.attachEvent(`on${t}`,o),n[W]??={},n[W][s]=o}function de(n,t,e,i,s){s??=t+x(e)+(i?`_${x(i)}`:"");const o=n[W]&&n[W][s];if(!o)return this;z.touch&&t==="dblclick"?Yi(n,o):"removeEventListener"in n?n.removeEventListener(he[t]||t,o,!1):n.detachEvent(`on${t}`,o),n[W][s]=null}function V(n){return n.stopPropagation?n.stopPropagation():n.originalEvent?n.originalEvent._stopped=!0:n.cancelBubble=!0,this}function ce(n){return le(n,"wheel",V),this}function vt(n){return g(n,"pointerdown dblclick contextmenu",V),n._leaflet_disable_click=!0,this}function S(n){return n.preventDefault?n.preventDefault():n.returnValue=!1,this}function it(n){return S(n),V(n),this}function ci(n){return n.composedPath()}function ui(n,t){if(!t)return new u(n.clientX,n.clientY);const e=re(t),i=e.boundingClientRect;return new u((n.clientX-i.left)/e.x-t.clientLeft,(n.clientY-i.top)/e.y-t.clientTop)}function _i(){const n=window.devicePixelRatio;return z.linux&&z.chrome?n:z.mac?n*3:n>0?2*n:1}function pi(n){return n.deltaY&&n.deltaMode===0?-n.deltaY/_i():n.deltaY&&n.deltaMode===1?-n.deltaY*20:n.deltaY&&n.deltaMode===2?-n.deltaY*60:(n.deltaX||n.deltaZ,0)}function ue(n,t){let e=t.relatedTarget;if(!e)return!0;try{for(;e&&e!==n;)e=e.parentNode}catch{return!1}return e!==n}var _e={__proto__:null,PointerEvents:tn,disableClickPropagation:vt,disableScrollPropagation:ce,getPointerPosition:ui,getPropagationPath:ci,getWheelDelta:pi,getWheelPxFactor:_i,isExternalTarget:ue,off:P,on:g,preventDefault:S,stop:it,stopPropagation:V};class fi extends ft{run(t,e,i,s){this.stop(),this._el=t,this._inProgress=!0,this._duration=i??.25,this._easeOutPower=1/Math.max(s??.5,.2),this._startPos=tt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()}stop(){this._inProgress&&(this._step(!0),this._complete())}_animate(){this._animId=requestAnimationFrame(this._animate.bind(this)),this._step()}_step(t){const e=+new Date-this._startTime,i=this._duration*1e3;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())}_runFrame(t,e){const i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),M(this._el,i),this.fire("step")}_complete(){cancelAnimationFrame(this._animId),this._inProgress=!1,this.fire("end")}_easeOut(t){return 1-(1-t)**this._easeOutPower}}let y=(X=class extends ft{initialize(t,e){e=L(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(new p(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=this.options.zoomAnimation,this._zoomAnimated&&this._createAnimProxy(),this._addLayers(this.options.layers)}setView(t,e,i){return e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(new p(t),e,this.options.maxBounds),i??={},this._stop(),this._loaded&&!i.reset&&i!==!0&&(i.animate!==void 0&&(i.zoom={animate:i.animate,...i.zoom},i.pan={animate:i.animate,duration:i.duration,...i.pan}),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,i.pan?.noMoveStart),this)}setZoom(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)}zoomIn(t,e){return t??=this.options.zoomDelta,this.setZoom(this._zoom+t,e)}zoomOut(t,e){return t??=this.options.zoomDelta,this.setZoom(this._zoom-t,e)}setZoomAround(t,e,i){const s=this.getZoomScale(e),o=this.getSize().divideBy(2),r=t instanceof u?t:this.latLngToContainerPoint(t),a=r.subtract(o).multiplyBy(1-1/s),h=this.containerPointToLatLng(o.add(a));return this.setView(h,e,{zoom:i})}_getBoundsCenterZoom(t,e){e??={},t=t.getBounds?t.getBounds():new w(t);const i=new u(e.paddingTopLeft||e.padding||[0,0]),s=new u(e.paddingBottomRight||e.padding||[0,0]);let o=this.getBoundsZoom(t,!1,i.add(s));if(o=typeof e.maxZoom=="number"?Math.min(e.maxZoom,o):o,o===1/0)return{center:t.getCenter(),zoom:o};const r=s.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),o),h=this.project(t.getNorthEast(),o);return{center:this.unproject(a.add(h).divideBy(2).add(r),o),zoom:o}}fitBounds(t,e){if(t=new w(t),!t.isValid())throw new Error("Bounds are not valid.");const i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)}fitWorld(t){return this.fitBounds([[-90,-180],[90,180]],t)}panTo(t,e){return this.setView(t,this._zoom,{pan:e})}panBy(t,e){if(t=new u(t).round(),e??={},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new fi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){this._mapPane.classList.add("leaflet-pan-anim");const i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this}flyTo(t,e,i){if(i??={},i.animate===!1)return this.setView(t,e,i);this._stop();const s=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),a=this._zoom;t=new p(t),e=e===void 0?a:this._limitZoom(e);const h=Math.max(r.x,r.y),l=h*this.getZoomScale(a,e),d=o.distanceTo(s)||1,c=1.42,f=c*c;function m(T){const Kt=T?-1:1,On=T?l:h,Zn=l*l-h*h+Kt*f*f*d*d,En=2*On*f*d,Xe=Zn/En,Ii=Math.sqrt(Xe*Xe+1)-Xe;return Ii<1e-9?-18:Math.log(Ii)}function C(T){return(Math.exp(T)-Math.exp(-T))/2}function k(T){return(Math.exp(T)+Math.exp(-T))/2}function ht(T){return C(T)/k(T)}const U=m(0);function Tn(T){return h*(k(U)/k(U+c*T))}function kn(T){return h*(k(U)*ht(U+c*T)-C(U))/f}function Mn(T){return 1-(1-T)**1.5}const zn=Date.now(),Ai=(m(1)-U)/c,Sn=i.duration?1e3*i.duration:1e3*Ai*.8,Bi=()=>{const T=(Date.now()-zn)/Sn,Kt=Mn(T)*Ai;T<=1?(this._flyToFrame=requestAnimationFrame(Bi),this._move(this.unproject(s.add(o.subtract(s).multiplyBy(kn(Kt)/d)),a),this.getScaleZoom(h/Tn(Kt),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)};return this._moveStart(!0,i.noMoveStart),Bi(),this}flyToBounds(t,e){const i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)}setMaxBounds(t){return t=new w(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)}setMinZoom(t){const e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this}setMaxZoom(t){const e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this}panInsideBounds(t,e){this._enforcingBounds=!0;const i=this.getCenter(),s=this._limitCenter(i,this._zoom,new w(t));return i.equals(s)||this.panTo(s,e),this._enforcingBounds=!1,this}panInside(t,e){e??={};const i=new u(e.paddingTopLeft||e.padding||[0,0]),s=new u(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),r=this.project(t),a=this.getPixelBounds(),h=new v([a.min.add(i),a.max.subtract(s)]),l=h.getSize();if(!h.contains(r)){this._enforcingBounds=!0;const d=r.subtract(h.getCenter()),c=h.extend(r).getSize().subtract(l);o.x+=d.x<0?-c.x:c.x,o.y+=d.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this}invalidateSize(t){if(!this._loaded)return this;t={animate:!1,pan:!0,...t===!0?{animate:!0}:t};const e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;const i=this.getSize(),s=e.divideBy(2).round(),o=i.divideBy(2).round(),r=s.subtract(o);return!r.x&&!r.y?this:(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(this.fire.bind(this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))}stop(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}locate(t){if(t=this._locateOptions={timeout:1e4,watch:!1,...t},!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;const e=this._handleGeolocationResponse.bind(this),i=this._handleGeolocationError.bind(this);return t.watch?(this._locationWatchId!==void 0&&navigator.geolocation.clearWatch(this._locationWatchId),this._locationWatchId=navigator.geolocation.watchPosition(e,i,t)):navigator.geolocation.getCurrentPosition(e,i,t),this}stopLocate(){return navigator.geolocation?.clearWatch?.(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}_handleGeolocationError(t){if(!this._container._leaflet_id)return;const e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:`Geolocation error: ${i}.`})}_handleGeolocationResponse(t){if(!this._container._leaflet_id)return;const e=t.coords.latitude,i=t.coords.longitude,s=new p(e,i),o=s.toBounds(t.coords.accuracy*2),r=this._locateOptions;if(r.setView){const h=this.getBoundsZoom(o);this.setView(s,r.maxZoom?Math.min(h,r.maxZoom):h)}const a={latlng:s,bounds:o,timestamp:t.timestamp};for(const h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}addHandler(t,e){if(!e)return this;const i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this}remove(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");delete this._container._leaflet_id,delete this._containerId,this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),this._mapPane.remove(),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimationFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),clearTimeout(this._transitionEndTimer),clearTimeout(this._sizeTimer),this._loaded&&this.fire("unload"),this._destroyAnimProxy();for(const t of Object.values(this._layers))t.remove();for(const t of Object.values(this._panes))t.remove();return this._layers={},this._panes={},delete this._mapPane,delete this._renderer,this}createPane(t,e){const i=`leaflet-pane${t?` leaflet-${t.replace("Pane","")}-pane`:""}`,s=b("div",i,e||this._mapPane);return t&&(this._panes[t]=s),s}getCenter(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())}getZoom(){return this._zoom}getBounds(){const t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new w(e,i)}getMinZoom(){return this.options.minZoom??this._layersMinZoom??0}getMaxZoom(){return this.options.maxZoom??this._layersMaxZoom??1/0}getBoundsZoom(t,e,i){t=new w(t),i=new u(i??[0,0]);let s=this.getZoom()??0;const o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(i),d=new v(this.project(h,s),this.project(a,s)).getSize(),c=this.options.zoomSnap,f=l.x/d.x,m=l.y/d.y,C=e?Math.max(f,m):Math.min(f,m);return s=this.getScaleZoom(C,s),c&&(s=Math.round(s/(c/100))*(c/100),s=e?Math.ceil(s/c)*c:Math.floor(s/c)*c),Math.max(o,Math.min(r,s))}getSize(){return(!this._size||this._sizeChanged)&&(this._size=new u(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()}getPixelBounds(t,e){const i=this._getTopLeftPoint(t,e);return new v(i,i.add(this.getSize()))}getPixelOrigin(){return this._checkIfLoaded(),this._pixelOrigin}getPixelWorldBounds(t){return this.options.crs.getProjectedBounds(t??this.getZoom())}getPane(t){return typeof t=="string"?this._panes[t]:t}getPanes(){return this._panes}getContainer(){return this._container}getZoomScale(t,e){const i=this.options.crs;return e??=this._zoom,i.scale(t)/i.scale(e)}getScaleZoom(t,e){const i=this.options.crs;e??=this._zoom;const s=i.zoom(t*i.scale(e));return isNaN(s)?1/0:s}project(t,e){return e??=this._zoom,this.options.crs.latLngToPoint(new p(t),e)}unproject(t,e){return e??=this._zoom,this.options.crs.pointToLatLng(new u(t),e)}layerPointToLatLng(t){const e=new u(t).add(this.getPixelOrigin());return this.unproject(e)}latLngToLayerPoint(t){return this.project(new p(t))._round()._subtract(this.getPixelOrigin())}wrapLatLng(t){return this.options.crs.wrapLatLng(new p(t))}wrapLatLngBounds(t){return this.options.crs.wrapLatLngBounds(new w(t))}distance(t,e){return this.options.crs.distance(new p(t),new p(e))}containerPointToLayerPoint(t){return new u(t).subtract(this._getMapPanePos())}layerPointToContainerPoint(t){return new u(t).add(this._getMapPanePos())}containerPointToLatLng(t){const e=this.containerPointToLayerPoint(new u(t));return this.layerPointToLatLng(e)}latLngToContainerPoint(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(new p(t)))}pointerEventToContainerPoint(t){return ui(t,this._container)}pointerEventToLayerPoint(t){return this.containerPointToLayerPoint(this.pointerEventToContainerPoint(t))}pointerEventToLatLng(t){return this.layerPointToLatLng(this.pointerEventToLayerPoint(t))}_initContainer(t){const e=this._container=si(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");g(e,"scroll",this._onScroll,this),this._containerId=x(e),ai()}_initLayout(){const t=this._container;this._fadeAnimated=this.options.fadeAnimation;const e=["leaflet-container","leaflet-touch"];z.retina&&e.push("leaflet-retina"),z.safari&&e.push("leaflet-safari"),this._fadeAnimated&&e.push("leaflet-fade-anim"),t.classList.add(...e);const{position:i}=getComputedStyle(t);i!=="absolute"&&i!=="relative"&&i!=="fixed"&&i!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()}_initPanes(){const t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),M(this._mapPane,new u(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t.markerPane.classList.add("leaflet-zoom-hide"),t.shadowPane.classList.add("leaflet-zoom-hide"))}_resetView(t,e,i){M(this._mapPane,new u(0,0));const s=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");const o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),s&&this.fire("load")}_moveStart(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this}_move(t,e,i,s){e===void 0&&(e=this._zoom);const o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),s?i?.pinch&&this.fire("zoom",i):((o||i?.pinch)&&this.fire("zoom",i),this.fire("move",i)),this}_moveEnd(t){return t&&this.fire("zoomend"),this.fire("moveend")}_stop(){return cancelAnimationFrame(this._flyToFrame),this._panAnim?.stop(),this}_rawPanBy(t){M(this._mapPane,this._getMapPanePos().subtract(t))}_getZoomSpan(){return this.getMaxZoom()-this.getMinZoom()}_panInsideMaxBounds(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)}_checkIfLoaded(){if(!this._loaded)throw new Error("Set map center and zoom first.")}_initEvents(t){this._targets={},this._targets[x(this._container)]=this,(t?P:g)(this._container,"click dblclick pointerdown pointerup pointerover pointerout pointermove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&(t?this._resizeObserver.disconnect():(this._resizeObserver||(this._resizeObserver=new ResizeObserver(this._onResize.bind(this))),this._resizeObserver.observe(this._container))),this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)}_onResize(){cancelAnimationFrame(this._resizeRequest),this._resizeRequest=requestAnimationFrame(()=>{this.invalidateSize({debounceMoveend:!0})})}_onScroll(){this._container.scrollTop=0,this._container.scrollLeft=0}_onMoveEnd(){const t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}_findEventTargets(t,e){let i=[],s,o=t.target||t.srcElement,r=!1;const a=e==="pointerout"||e==="pointerover";for(;o;){if(s=this._targets[x(o)],s&&(e==="click"||e==="preclick")&&this._draggableMoved(s)){r=!0;break}if(s&&s.listens(e,!0)&&(a&&!ue(o,t)||(i.push(s),a))||o===this._container)break;o=o.parentNode}return!i.length&&!r&&!a&&this.listens(e,!0)&&(i=[this]),i}_isClickDisabled(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click||!t.parentNode)return!0;t=t.parentNode}}_handleDOMEvent(t){const e=t.target??t.srcElement;if(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))return;const i=t.type;i==="pointerdown"&&oe(e),this._fireDOMEvent(t,i)}_fireDOMEvent(t,e,i){e==="click"&&this._fireDOMEvent(t,"preclick",i);let s=this._findEventTargets(t,e);if(i&&(s=i.filter(h=>h.listens(e,!0)).concat(s)),!s.length)return;e==="contextmenu"&&S(t);const o=s[0],r={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){const a=o.getLatLng&&(!o._radius||o._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(o.getLatLng()):this.pointerEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?o.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(const a of s)if(a.fire(e,r,!0),r.originalEvent._stopped||a.options.bubblingPointerEvents===!1&&X._pointerEvents.includes(e))return}_draggableMoved(t){return t=t.dragging?.enabled()?t:this,t.dragging?.moved()||this.boxZoom?.moved()}_clearHandlers(){for(const t of this._handlers)t.disable()}whenReady(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this}_getMapPanePos(){return tt(this._mapPane)}_moved(){const t=this._getMapPanePos();return t&&!t.equals([0,0])}_getTopLeftPoint(t,e){return(t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())}_getNewPixelOrigin(t,e){const i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()}_latLngToNewLayerPoint(t,e,i){const s=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(s)}_latLngBoundsToNewLayerBounds(t,e,i){const s=this._getNewPixelOrigin(i,e);return new v([this.project(t.getSouthWest(),e)._subtract(s),this.project(t.getNorthWest(),e)._subtract(s),this.project(t.getSouthEast(),e)._subtract(s),this.project(t.getNorthEast(),e)._subtract(s)])}_getCenterLayerPoint(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))}_getCenterOffset(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())}_limitCenter(t,e,i){if(!i)return t;const s=this.project(t,e),o=this.getSize().divideBy(2),r=new v(s.subtract(o),s.add(o)),a=this._getBoundsOffset(r,i,e);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?t:this.unproject(s.add(a),e)}_limitOffset(t,e){if(!e)return t;const i=this.getPixelBounds(),s=new v(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(s,e))}_getBoundsOffset(t,e,i){const s=new v(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=s.min.subtract(t.min),r=s.max.subtract(t.max),a=this._rebound(o.x,-r.x),h=this._rebound(o.y,-r.y);return new u(a,h)}_rebound(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))}_limitZoom(t){const e=this.getMinZoom(),i=this.getMaxZoom(),s=this.options.zoomSnap;return s&&(t=Math.round(t/s)*s),Math.max(e,Math.min(i,t))}_onPanTransitionStep(){this.fire("move")}_onPanTransitionEnd(){this._mapPane.classList.remove("leaflet-pan-anim"),this.fire("moveend")}_tryAnimatedPan(t,e){const i=this._getCenterOffset(t)._trunc();return e?.animate!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)}_createAnimProxy(){this._proxy=b("div","leaflet-proxy leaflet-zoom-animated"),this._panes.mapPane.appendChild(this._proxy),this.on("zoomanim",this._animateProxyZoom,this),this.on("load moveend",this._animMoveEnd,this),g(this._proxy,"transitionend",this._catchTransitionEnd,this)}_animateProxyZoom(t){const e=this._proxy.style.transform;Q(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style.transform&&this._animatingZoom&&this._onZoomTransitionEnd()}_animMoveEnd(){const t=this.getCenter(),e=this.getZoom();Q(this._proxy,this.project(t,e),this.getZoomScale(e,1))}_destroyAnimProxy(){this._proxy&&(P(this._proxy,"transitionend",this._catchTransitionEnd,this),this._proxy.remove(),this.off("zoomanim",this._animateProxyZoom,this),this.off("load moveend",this._animMoveEnd,this),delete this._proxy)}_catchTransitionEnd(t){this._animatingZoom&&t.propertyName.includes("transform")&&this._onZoomTransitionEnd()}_nothingToAnimate(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length}_tryAnimatedZoom(t,e,i){if(this._animatingZoom)return!0;if(i??={},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;const s=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/s);return i.animate!==!0&&!this.getSize().contains(o)?!1:(requestAnimationFrame(()=>{this._moveStart(!0,i.noMoveStart??!1)._animateZoom(t,e,!0)}),!0)}_animateZoom(t,e,i,s){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,this._mapPane.classList.add("leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._transitionEndTimer=setTimeout(this._onZoomTransitionEnd.bind(this),250))}_onZoomTransitionEnd(){this._animatingZoom&&(this._mapPane?.classList.remove("leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}},X.setDefaultOptions({crs:Xt,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0}),Di(X,"_pointerEvents",["click","dblclick","pointerover","pointerout","contextmenu"]),X);const en=y,ze=class ze extends pt{initialize(t){L(this,t)}getPosition(){return this.options.position}setPosition(t){const e=this._map;return e?.removeControl(this),this.options.position=t,e?.addControl(this),this}getContainer(){return this._container}addTo(t){this.remove(),this._map=t;const e=this._container=this.onAdd(t),i=this.getPosition(),s=t._controlCorners[i];return e.classList.add("leaflet-control"),i.includes("bottom")?s.insertBefore(e,s.firstChild):s.appendChild(e),this._map.on("unload",this.remove,this),this}remove(){return this._map?(this._container.remove(),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this}_refocusOnMap(t){this._map&&t&&!(t.screenX===0&&t.screenY===0)&&this._map.getContainer().focus()}};ze.setDefaultOptions({position:"topright"});let E=ze;y.include({addControl(n){return n.addTo(this),this},removeControl(n){return n.remove(),this},_initControlPos(){const n=this._controlCorners={},t="leaflet-",e=this._controlContainer=b("div",`${t}control-container`,this._container);function i(s,o){const r=`${t+s} ${t}${o}`;n[s+o]=b("div",r,e)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos(){for(const n of Object.values(this._controlCorners))n.remove();this._controlContainer.remove(),delete this._controlCorners,delete this._controlContainer}});const Se=class Se extends E{initialize(t,e,i){L(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(const[s,o]of Object.entries(t??{}))this._addLayer(o,s);for(const[s,o]of Object.entries(e??{}))this._addLayer(o,s,!0)}onAdd(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(const e of this._layers)e.layer.on("add remove",this._onLayerChange,this);return this.options.collapsed||t.on("resize",this._expandIfNotCollapsed,this),this._container}addTo(t){return E.prototype.addTo.call(this,t),this._expandIfNotCollapsed()}onRemove(){this._map.off("zoomend",this._checkDisabledLayers,this);for(const t of this._layers)t.layer.off("add remove",this._onLayerChange,this);this._map.off("resize",this._expandIfNotCollapsed,this)}addBaseLayer(t,e){return this._addLayer(t,e),this._map?this._update():this}addOverlay(t,e){return this._addLayer(t,e,!0),this._map?this._update():this}removeLayer(t){t.off("add remove",this._onLayerChange,this);const e=this._getLayer(x(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this}expand(){clearTimeout(this._collapseDelayTimeout),this._container.classList.add("leaflet-control-layers-expanded"),this._section.style.height=null;const t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(this._section.classList.add("leaflet-control-layers-scrollbar"),this._section.style.height=`${t}px`):this._section.classList.remove("leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this}collapse(t){if(!t||!((t.type==="pointerleave"||t.type==="pointerout")&&t.pointerType==="touch")){if(this.options.collapseDelay>0)return this._collapseDelayTimeout=setTimeout(()=>{this._container.classList.remove("leaflet-control-layers-expanded")},this.options.collapseDelay),this;this._container.classList.remove("leaflet-control-layers-expanded")}return this}_initLayout(){const t="leaflet-control-layers",e=this._container=b("div",t),i=this.options.collapsed;vt(e),ce(e);const s=this._section=b("fieldset",`${t}-list`);i&&(this._map.on("click",this.collapse,this),g(e,{pointerenter:this._expandSafely,pointerleave:this.collapse},this));const o=this._layersLink=b("a",`${t}-toggle`,e);o.href="#",o.title="Layers",o.setAttribute("role","button"),g(o,{keydown(r){r.code==="Enter"&&this._expandSafely()},click(r){S(r),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=b("div",`${t}-base`,s),this._separator=b("div",`${t}-separator`,s),this._overlaysList=b("div",`${t}-overlays`,s),e.appendChild(s)}_getLayer(t){for(const e of this._layers)if(e&&x(e.layer)===t)return e}_addLayer(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort((s,o)=>this.options.sortFunction(s.layer,o.layer,s.name,o.name)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()}_update(){if(!this._container)return this;this._baseLayersList.replaceChildren(),this._overlaysList.replaceChildren(),this._layerControlInputs=[];let t,e,i=0;for(const s of this._layers)this._addItem(s),e||=s.overlay,t||=!s.overlay,i+=s.overlay?0:1;return this.options.hideSingleBase&&(t=t&&i>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this}_onLayerChange(t){this._handlingClick||this._update();const e=this._getLayer(x(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)}_addItem(t){const e=document.createElement("label"),i=this._map.hasLayer(t.layer),s=document.createElement("input");s.type=t.overlay?"checkbox":"radio",s.className="leaflet-control-layers-selector",s.defaultChecked=i,t.overlay||(s.name=`leaflet-base-layers_${x(this)}`),this._layerControlInputs.push(s),s.layerId=x(t.layer),g(s,"click",this._onInputClick,this);const o=document.createElement("span");o.innerHTML=` ${t.name}`;const r=document.createElement("span");return e.appendChild(r),r.appendChild(s),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e}_onInputClick(t){if(this._preventClick)return;const e=this._layerControlInputs,i=[],s=[];this._handlingClick=!0;for(const o of e){const r=this._getLayer(o.layerId).layer;o.checked?i.push(r):o.checked||s.push(r)}for(const o of s)this._map.hasLayer(o)&&this._map.removeLayer(o);for(const o of i)this._map.hasLayer(o)||this._map.addLayer(o);this._handlingClick=!1,this._refocusOnMap(t)}_checkDisabledLayers(){const t=this._layerControlInputs,e=this._map.getZoom();for(const i of t){const s=this._getLayer(i.layerId).layer;i.disabled=s.options.minZoom!==void 0&&e<s.options.minZoom||s.options.maxZoom!==void 0&&e>s.options.maxZoom}}_expandIfNotCollapsed(){return this._map&&!this.options.collapsed&&this.expand(),this}_expandSafely(){const t=this._section;this._preventClick=!0,g(t,"click",S),this.expand(),setTimeout(()=>{P(t,"click",S),this._preventClick=!1})}};Se.setDefaultOptions({collapsed:!0,collapseDelay:0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction(t,e,i,s){return i<s?-1:s<i?1:0}});let pe=Se;const Oe=class Oe extends E{onAdd(t){const e="leaflet-control-zoom",i=b("div",`${e} leaflet-bar`),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,`${e}-in`,i,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,`${e}-out`,i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i}onRemove(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)}disable(){return this._disabled=!0,this._updateDisabled(),this}enable(){return this._disabled=!1,this._updateDisabled(),this}_zoomIn(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))}_zoomOut(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}_createButton(t,e,i,s,o){const r=b("a",i,s);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),vt(r),g(r,"click",it),g(r,"click",o,this),g(r,"click",this._refocusOnMap,this),r}_updateDisabled(){const t=this._map,e="leaflet-disabled";this._zoomInButton.classList.remove(e),this._zoomOutButton.classList.remove(e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(this._zoomOutButton.classList.add(e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(this._zoomInButton.classList.add(e),this._zoomInButton.setAttribute("aria-disabled","true"))}};Oe.setDefaultOptions({position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"});let At=Oe;y.mergeOptions({zoomControl:!0}),y.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new At,this.addControl(this.zoomControl))});const Ze=class Ze extends E{onAdd(t){const e="leaflet-control-scale",i=b("div",e),s=this.options;return this._addScales(s,`${e}-line`,i),t.on(s.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i}onRemove(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)}_addScales(t,e,i){t.metric&&(this._mScale=b("div",e,i)),t.imperial&&(this._iScale=b("div",e,i))}_update(){const t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)}_updateScales(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)}_updateMetric(t){const e=this._getRoundNum(t),i=e<1e3?`${e} m`:`${e/1e3} km`;this._updateScale(this._mScale,i,e/t)}_updateImperial(t){const e=t*3.2808399;let i,s,o;e>5280?(i=e/5280,s=this._getRoundNum(i),this._updateScale(this._iScale,`${s} mi`,s/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,`${o} ft`,o/e))}_updateScale(t,e,i){t.style.width=`${Math.round(this.options.maxWidth*i)}px`,t.innerHTML=e}_getRoundNum(t){const e=10**(`${Math.floor(t)}`.length-1);let i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}};Ze.setDefaultOptions({position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1});let fe=Ze;const nn='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ee=class Ee extends E{initialize(t){L(this,t),this._attributions={}}onAdd(t){t.attributionControl=this,this._container=b("div","leaflet-control-attribution"),vt(this._container);for(const e of Object.values(t._layers))e.getAttribution&&this.addAttribution(e.getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container}onRemove(t){t.off("layeradd",this._addAttribution,this)}_addAttribution(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",()=>this.removeAttribution(t.layer.getAttribution())))}setPrefix(t){return this.options.prefix=t,this._update(),this}addAttribution(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this}removeAttribution(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this}_update(){if(!this._map)return;const t=Object.keys(this._attributions).filter(i=>this._attributions[i]),e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}};Ee.setDefaultOptions({position:"bottomright",prefix:`<a target="_blank" href="https://leafletjs.com" title="A JavaScript library for interactive maps">${nn}Leaflet</a>`});let Bt=Ee;y.mergeOptions({attributionControl:!0}),y.addInitHook(function(){this.options.attributionControl&&new Bt().addTo(this)}),E.Layers=pe,E.Zoom=At,E.Scale=fe,E.Attribution=Bt;class H extends pt{initialize(t){this._map=t}enable(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)}disable(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this}enabled(){return!!this._enabled}}H.addTo=function(n,t){return n.addHandler(t,this),this};const J=class J extends ft{initialize(t,e,i,s){L(this,s),this._element=t,this._dragStartTarget=e??t,this._preventOutline=i}enable(){this._enabled||(g(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!0)}disable(){this._enabled&&(J._dragging===this&&this.finishDrag(!0),P(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!1,this._moved=!1)}_onDown(t){if(this._moved=!1,this._element.classList.contains("leaflet-zoom-anim"))return;if(lt().length!==1){J._dragging===this&&this.finishDrag();return}if(J._dragging||t.shiftKey||t.button!==0&&t.pointerType!=="touch"||(J._dragging=this,this._preventOutline&&oe(this._element),ie(),te(),this._moving))return;this.fire("down");const e=ri(this._element);this._startPoint=new u(t.clientX,t.clientY),this._startPos=tt(this._element),this._parentScale=re(e),g(document,"pointermove",this._onMove,this),g(document,"pointerup pointercancel",this._onUp,this)}_onMove(t){if(lt().length>1){this._moved=!0;return}const e=new u(t.clientX,t.clientY)._subtract(this._startPoint);!e.x&&!e.y||Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,t.cancelable&&S(t),this._moved||(this.fire("dragstart"),this._moved=!0,document.body.classList.add("leaflet-dragging"),this._lastTarget=t.target??t.srcElement,this._lastTarget.classList.add("leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition())}_updatePosition(){const t={originalEvent:this._lastEvent};this.fire("predrag",t),M(this._element,this._newPos),this.fire("drag",t)}_onUp(){this.finishDrag()}finishDrag(t){document.body.classList.remove("leaflet-dragging"),this._lastTarget&&(this._lastTarget.classList.remove("leaflet-drag-target"),this._lastTarget=null),P(document,"pointermove",this._onMove,this),P(document,"pointerup pointercancel",this._onUp,this),ne(),ee();const e=this._moved&&this._moving;this._moving=!1,J._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}};J.setDefaultOptions({clickTolerance:3});let xt=J;function mi(n,t,e){let i,s,o,r,a,h,l,d,c;const f=[1,4,2,8];for(s=0,l=n.length;s<l;s++)n[s]._code=nt(n[s],t);for(r=0;r<4;r++){for(d=f[r],i=[],s=0,l=n.length,o=l-1;s<l;o=s++)a=n[s],h=n[o],a._code&d?h._code&d||(c=It(h,a,d,t,e),c._code=nt(c,t),i.push(c)):(h._code&d&&(c=It(h,a,d,t,e),c._code=nt(c,t),i.push(c)),i.push(a));n=i}return n}function gi(n,t){let e,i,s,o,r,a,h,l,d;if(!n||n.length===0)throw new Error("latlngs not passed");B(n)||(console.warn("latlngs are not flat! Only the first ring will be used"),n=n[0]);let c=new p([0,0]);const f=new w(n);f.getNorthWest().distanceTo(f.getSouthWest())*f.getNorthEast().distanceTo(f.getNorthWest())<1700&&(c=me(n));const C=n.length,k=[];for(e=0;e<C;e++){const U=new p(n[e]);k.push(t.project(new p([U.lat-c.lat,U.lng-c.lng])))}for(a=h=l=0,e=0,i=C-1;e<C;i=e++)s=k[e],o=k[i],r=s.y*o.x-o.y*s.x,h+=(s.x+o.x)*r,l+=(s.y+o.y)*r,a+=r*3;a===0?d=k[0]:d=[h/a,l/a];const ht=t.unproject(new u(d));return new p([ht.lat+c.lat,ht.lng+c.lng])}function me(n){let t=0,e=0,i=0;for(const s of n){const o=new p(s);t+=o.lat,e+=o.lng,i++}return new p([t/i,e/i])}var sn={__proto__:null,centroid:me,clipPolygon:mi,polygonCenter:gi};function yi(n,t){if(!t||!n.length)return n.slice();const e=t*t;return n=an(n,e),n=rn(n,e),n}function vi(n,t,e){return Math.sqrt(wt(n,t,e,!0))}function on(n,t,e){return wt(n,t,e)}function rn(n,t){const e=n.length,i=new Uint8Array(e);i[0]=i[e-1]=1,ge(n,i,t,0,e-1);let s;const o=[];for(s=0;s<e;s++)i[s]&&o.push(n[s]);return o}function ge(n,t,e,i,s){let o=0,r,a,h;for(a=i+1;a<=s-1;a++)h=wt(n[a],n[i],n[s],!0),h>o&&(r=a,o=h);o>e&&(t[r]=1,ge(n,t,e,i,r),ge(n,t,e,r,s))}function an(n,t){const e=[n[0]];let i=0;for(let s=1;s<n.length;s++)hn(n[s],n[i])>t&&(e.push(n[s]),i=s);return i<n.length-1&&e.push(n[n.length-1]),e}let xi;function wi(n,t,e,i,s){let o=i?xi:nt(n,e),r=nt(t,e),a,h,l;for(xi=r;;){if(!(o|r))return[n,t];if(o&r)return!1;a=o||r,h=It(n,t,a,e,s),l=nt(h,e),a===o?(n=h,o=l):(t=h,r=l)}}function It(n,t,e,i,s){const o=t.x-n.x,r=t.y-n.y,a=i.min,h=i.max;let l,d;return e&8?(l=n.x+o*(h.y-n.y)/r,d=h.y):e&4?(l=n.x+o*(a.y-n.y)/r,d=a.y):e&2?(l=h.x,d=n.y+r*(h.x-n.x)/o):e&1&&(l=a.x,d=n.y+r*(a.x-n.x)/o),new u(l,d,s)}function nt(n,t){let e=0;return n.x<t.min.x?e|=1:n.x>t.max.x&&(e|=2),n.y<t.min.y?e|=4:n.y>t.max.y&&(e|=8),e}function hn(n,t){const e=t.x-n.x,i=t.y-n.y;return e*e+i*i}function wt(n,t,e,i){let s=t.x,o=t.y,r=e.x-s,a=e.y-o,h;const l=r*r+a*a;return l>0&&(h=((n.x-s)*r+(n.y-o)*a)/l,h>1?(s=e.x,o=e.y):h>0&&(s+=r*h,o+=a*h)),r=n.x-s,a=n.y-o,i?r*r+a*a:new u(s,o)}function B(n){return!Array.isArray(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]<"u"}function bi(n,t){let e,i,s,o,r,a,h,l;if(!n||n.length===0)throw new Error("latlngs not passed");B(n)||(console.warn("latlngs are not flat! Only the first ring will be used"),n=n[0]);let d=new p([0,0]);const c=new w(n);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(d=me(n));const m=n.length,C=[];for(e=0;e<m;e++){const ht=new p(n[e]);C.push(t.project(new p([ht.lat-d.lat,ht.lng-d.lng])))}for(e=0,i=0;e<m-1;e++)i+=C[e].distanceTo(C[e+1])/2;if(i===0)l=C[0];else for(e=0,o=0;e<m-1;e++)if(r=C[e],a=C[e+1],s=r.distanceTo(a),o+=s,o>i){h=(o-i)/s,l=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}const k=t.unproject(new u(l));return new p([k.lat+d.lat,k.lng+d.lng])}var ln={__proto__:null,_getBitCode:nt,_getEdgeIntersection:It,_sqClosestPointOnSegment:wt,clipSegment:wi,closestPointOnSegment:on,isFlat:B,pointToSegmentDistance:vi,polylineCenter:bi,simplify:yi};const ye={project(n){return n=new p(n),new u(n.lng,n.lat)},unproject(n){return n=new u(n),new p(n.y,n.x)},bounds:new v([-180,-90],[180,90])},ve={R:6378137,R_MINOR:6356752314245179e-9,bounds:new v([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project(n){n=new p(n);const t=Math.PI/180,e=this.R,i=this.R_MINOR/e,s=Math.sqrt(1-i*i);let o=n.lat*t;const r=s*Math.sin(o),a=Math.tan(Math.PI/4-o/2)/((1-r)/(1+r))**(s/2);return o=-e*Math.log(Math.max(a,1e-10)),new u(n.lng*t*e,o)},unproject(n){n=new u(n);const t=180/Math.PI,e=this.R,i=this.R_MINOR/e,s=Math.sqrt(1-i*i),o=Math.exp(-n.y/e);let r=Math.PI/2-2*Math.atan(o);for(let a=0,h=.1,l;a<15&&Math.abs(h)>1e-7;a++)l=s*Math.sin(r),l=((1-l)/(1+l))**(s/2),h=Math.PI/2-2*Math.atan(o*l)-r,r+=h;return new p(r*t,n.x*t/e)}};var dn={__proto__:null,LonLat:ye,Mercator:ve,SphericalMercator:Yt};class cn extends q{static code="EPSG:3395";static projection=ve;static transformation=(()=>{const t=.5/(Math.PI*ve.R);return new mt(t,.5,-t,.5)})()}class Li extends q{static code="EPSG:4326";static projection=ye;static transformation=new mt(.005555555555555556,1,-.005555555555555556,.5)}class un extends G{static projection=ye;static transformation=new mt(1,0,-1,0);static scale(t){return 2**t}static zoom(t){return Math.log(t)/Math.LN2}static distance(t,e){const i=e.lng-t.lng,s=e.lat-t.lat;return Math.sqrt(i*i+s*s)}static infinite=!0}G.Earth=q,G.EPSG3395=cn,G.EPSG3857=Xt,G.EPSG900913=Fi,G.EPSG4326=Li,G.Simple=un;const Ae=class Ae extends ft{addTo(t){return t.addLayer(this),this}remove(){return this.removeFrom(this._map||this._mapToAdd)}removeFrom(t){return t?.removeLayer(this),this}getPane(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)}addInteractiveTarget(t){return this._map._targets[x(t)]=this,this}removeInteractiveTarget(t){return delete this._map._targets[x(t)],this}getAttribution(){return this.options.attribution}_layerAdd(t){const e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){const i=this.getEvents();e.on(i,this),this.once("remove",()=>e.off(i,this))}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}};Ae.setDefaultOptions({pane:"overlayPane",attribution:null,bubblingPointerEvents:!0});let O=Ae;y.include({addLayer(n){if(!n._layerAdd)throw new Error("The provided object is not a Layer.");const t=x(n);return this._layers[t]?this:(this._layers[t]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer(n){const t=x(n);return this._layers[t]?(this._loaded&&n.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this):this},hasLayer(n){return x(n)in this._layers},eachLayer(n,t){for(const e of Object.values(this._layers))n.call(t,e);return this},_addLayers(n){n=n?Array.isArray(n)?n:[n]:[];for(const t of n)this.addLayer(t)},_addZoomLimit(n){(!isNaN(n.options.maxZoom)||!isNaN(n.options.minZoom))&&(this._zoomBoundLayers[x(n)]=n,this._updateZoomLevels())},_removeZoomLimit(n){const t=x(n);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels(){let n=1/0,t=-1/0;const e=this._getZoomSpan();for(const i of Object.values(this._zoomBoundLayers)){const s=i.options;n=Math.min(n,s.minZoom??1/0),t=Math.max(t,s.maxZoom??-1/0)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=n===1/0?void 0:n,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});class bt extends O{initialize(t,e){L(this,e),this._layers={};for(const i of t??[])this.addLayer(i)}addLayer(t){const e=this.getLayerId(t);return this._layers[e]=t,this._map?.addLayer(t),this}removeLayer(t){const e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this}hasLayer(t){return(typeof t=="number"?t:this.getLayerId(t))in this._layers}clearLayers(){return this.eachLayer(this.removeLayer,this)}invoke(t,...e){for(const i of Object.values(this._layers))i[t]?.apply(i,e);return this}onAdd(t){this.eachLayer(t.addLayer,t)}onRemove(t){this.eachLayer(t.removeLayer,t)}eachLayer(t,e){for(const i of Object.values(this._layers))t.call(e,i);return this}getLayer(t){return this._layers[t]}getLayers(){const t=[];return this.eachLayer(t.push,t),t}setZIndex(t){return this.invoke("setZIndex",t)}getLayerId(t){return x(t)}}class K extends bt{addLayer(t){return this.hasLayer(t)?this:(t.addEventParent(this),bt.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))}removeLayer(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),bt.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this}setStyle(t){return this.invoke("setStyle",t)}bringToFront(){return this.invoke("bringToFront")}bringToBack(){return this.invoke("bringToBack")}getBounds(){const t=new w;for(const e of Object.values(this._layers))t.extend(e.getBounds?e.getBounds():e.getLatLng());return t}}const Be=class Be extends pt{initialize(t){L(this,t)}createIcon(t){return this._createIcon("icon",t)}createShadow(t){return this._createIcon("shadow",t)}_createIcon(t,e){const i=this._getIconUrl(t);if(!i){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}const s=this._createImg(i,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(s,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s}_setIconStyles(t,e){const i=this.options;let s=i[`${e}Size`];typeof s=="number"&&(s=[s,s]);const o=u.validate(s)&&new u(s),r=e==="shadow"&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0),a=u.validate(r)&&new u(r);t.className=`leaflet-marker-${e} ${i.className||""}`,a&&(t.style.marginLeft=`${-a.x}px`,t.style.marginTop=`${-a.y}px`),o&&(t.style.width=`${o.x}px`,t.style.height=`${o.y}px`)}_createImg(t,e){return e??=document.createElement("img"),e.src=t,e}_getIconUrl(t){return z.retina&&this.options[`${t}RetinaUrl`]||this.options[`${t}Url`]}};Be.setDefaultOptions({popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1});let st=Be;const ut=class ut extends st{_getIconUrl(t){ut.imagePath||(ut.imagePath=this._detectIconPath());const e=st.prototype._getIconUrl.call(this,t);return e?(this.options.imagePath||ut.imagePath)+e:null}_stripUrl(t){const e=function(i,s,o){const r=s.exec(i);return r&&r[o]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)}_detectIconPath(){const t=b("div","leaflet-default-icon-path",document.body),e=this._stripUrl(getComputedStyle(t).backgroundImage);if(document.body.removeChild(t),e)return e;const i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}};ut.setDefaultOptions({iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]});let Dt=ut;class Pi extends H{initialize(t){this._marker=t}addHooks(){const t=this._marker._icon;this._draggable||(this._draggable=new xt(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),t.classList.add("leaflet-marker-draggable")}removeHooks(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon?.classList.remove("leaflet-marker-draggable")}moved(){return this._draggable?._moved}_adjustPan(t){const e=this._marker,i=e._map,s=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=tt(e._icon),a=i.getPixelBounds(),h=i.getPixelOrigin(),l=new v(a.min._subtract(h).add(o),a.max._subtract(h).subtract(o));if(!l.contains(r)){const d=new u((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(s);i.panBy(d,{animate:!1}),this._draggable._newPos._add(d),this._draggable._startPos._add(d),M(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,t))}}_onDragStart(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup?.(),this._marker.fire("movestart").fire("dragstart")}_onPreDrag(t){this._marker.options.autoPan&&(cancelAnimationFrame(this._panRequest),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,t)))}_onDrag(t){const e=this._marker,i=e._shadow,s=tt(e._icon),o=e._map.layerPointToLatLng(s);i&&M(i,s),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)}_onDragEnd(t){cancelAnimationFrame(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}const Ie=class Ie extends O{initialize(t,e){L(this,e),this._latlng=new p(t)}onAdd(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()}onRemove(t){this.dragging?.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()}getEvents(){return{zoom:this.update,viewreset:this.update}}getLatLng(){return this._latlng}setLatLng(t){const e=this._latlng;return this._latlng=new p(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})}setZIndexOffset(t){return this.options.zIndexOffset=t,this.update()}getIcon(){return this.options.icon}setIcon(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this}getElement(){return this._icon}update(){if(this._icon&&this._map){const t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this}_initIcon(){const t=this.options,e=`leaflet-zoom-${this._zoomAnimated?"animated":"hide"}`,i=t.icon.createIcon(this._icon);let s=!1;i!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(i.title=t.title),i.tagName==="IMG"&&(i.alt=t.alt??"")),i.classList.add(e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({pointerover:this._bringToFront,pointerout:this._resetZIndex}),this.options.autoPanOnFocus&&g(i,"focus",this._panOnFocus,this);const o=t.icon.createShadow(this._shadow);let r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(o.classList.add(e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)}_removeIcon(){this.options.riseOnHover&&this.off({pointerover:this._bringToFront,pointerout:this._resetZIndex}),this.options.autoPanOnFocus&&P(this._icon,"focus",this._panOnFocus,this),this._icon.remove(),this.removeInteractiveTarget(this._icon),this._icon=null}_removeShadow(){this._shadow?.remove(),this._shadow=null}_setPos(t){this._icon&&M(this._icon,t),this._shadow&&M(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()}_updateZIndex(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)}_initInteraction(){if(this.options.interactive&&(this._icon.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._icon),Pi)){let t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Pi(this),t&&this.dragging.enable()}}setOpacity(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this}_updateOpacity(){const t=this.options.opacity;this._icon&&(this._icon.style.opacity=t),this._shadow&&(this._shadow.style.opacity=t)}_bringToFront(){this._updateZIndex(this.options.riseOffset)}_resetZIndex(){this._updateZIndex(0)}_panOnFocus(){const t=this._map;if(!t)return;const e=this.options.icon.options,i=e.iconSize?new u(e.iconSize):new u(0,0),s=e.iconAnchor?new u(e.iconAnchor):new u(0,0);t.panInside(this._latlng,{paddingTopLeft:s,paddingBottomRight:i.subtract(s)})}_getPopupAnchor(){return this.options.icon.options.popupAnchor}_getTooltipAnchor(){return this.options.icon.options.tooltipAnchor}};Ie.setDefaultOptions({icon:new Dt,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingPointerEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10});let Lt=Ie;const De=class De extends O{beforeAdd(t){this._renderer=t.getRenderer(this)}onAdd(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)}onRemove(){this._renderer._removePath(this)}redraw(){return this._map&&this._renderer._updatePath(this),this}setStyle(t){return L(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.hasOwn(t,"weight")&&this._updateBounds()),this}bringToFront(){return this._renderer?._bringToFront(this),this}bringToBack(){return this._renderer?._bringToBack(this),this}getElement(){return this._path}_reset(){this._project(),this._update()}_clickTolerance(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}};De.setDefaultOptions({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});let j=De;const Re=class Re extends j{initialize(t,e){L(this,e),this._latlng=new p(t),this._radius=this.options.radius}setLatLng(t){const e=this._latlng;return this._latlng=new p(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})}getLatLng(){return this._latlng}setRadius(t){return this.options.radius=this._radius=t,this.redraw()}getRadius(){return this._radius}setStyle(t){const e=t?.radius??this._radius;return j.prototype.setStyle.call(this,t),this.setRadius(e),this}_project(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()}_updateBounds(){const t=this._radius,e=this._radiusY??t,i=this._clickTolerance(),s=[t+i,e+i];this._pxBounds=new v(this._point.subtract(s),this._point.add(s))}_update(){this._map&&this._updatePath()}_updatePath(){this._renderer._updateCircle(this)}_empty(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)}_containsPoint(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}};Re.setDefaultOptions({fill:!0,radius:10});let Pt=Re;class Ci extends Pt{initialize(t,e){if(L(this,e),this._latlng=new p(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius}setRadius(t){return this._mRadius=t,this.redraw()}getRadius(){return this._mRadius}getBounds(){const t=[this._radius,this._radiusY??this._radius];return new w(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))}setStyle=j.prototype.setStyle;_project(){const t=this._latlng.lng,e=this._latlng.lat,i=this._map,s=i.options.crs;if(s.distance===q.distance){const o=Math.PI/180,r=this._mRadius/q.R/o,a=i.project([e+r,t]),h=i.project([e-r,t]),l=a.add(h).divideBy(2),d=i.unproject(l).lat;let c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(d*o))/(Math.cos(e*o)*Math.cos(d*o)))/o;(isNaN(c)||c===0)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([d,t-c]).x,this._radiusY=l.y-a.y}else{const o=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=Math.abs(this._point.x-i.latLngToLayerPoint(o).x)}this._updateBounds()}}const Ne=class Ne extends j{initialize(t,e){L(this,e),this._setLatLngs(t)}getLatLngs(){return this._latlngs}setLatLngs(t){return this._setLatLngs(t),this.redraw()}isEmpty(){return!this._latlngs.length}closestLayerPoint(t){t=new u(t);let e=1/0,i=null,s,o;const r=wt;for(const a of this._parts)for(let h=1,l=a.length;h<l;h++){s=a[h-1],o=a[h];const d=r(t,s,o,!0);d<e&&(e=d,i=r(t,s,o))}return i&&(i.distance=Math.sqrt(e)),i}getCenter(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return bi(this._defaultShape(),this._map.options.crs)}getBounds(){return this._bounds}addLatLng(t,e){return e??=this._defaultShape(),t=new p(t),e.push(t),this._bounds.extend(t),this.redraw()}_setLatLngs(t){this._bounds=new w,this._latlngs=this._convertLatLngs(t)}_defaultShape(){return B(this._latlngs)?this._latlngs:this._latlngs[0]}_convertLatLngs(t){const e=[],i=B(t);for(let s=0,o=t.length;s<o;s++)i?(e[s]=new p(t[s]),this._bounds.extend(e[s])):e[s]=this._convertLatLngs(t[s]);return e}_project(){const t=new v;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())}_updateBounds(){const t=this._clickTolerance(),e=new u(t,t);this._rawPxBounds&&(this._pxBounds=new v([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))}_projectLatlngs(t,e,i){if(t[0]instanceof p){const o=t.map(r=>this._map.latLngToLayerPoint(r));o.forEach(r=>i.extend(r)),e.push(o)}else t.forEach(o=>this._projectLatlngs(o,e,i))}_clipPoints(){const t=this._renderer._bounds;if(this._parts=[],!this._pxBounds||!this._pxBounds.intersects(t))return;if(this.options.noClip){this._parts=this._rings;return}const e=this._parts;let i,s,o,r,a,h,l;for(i=0,o=0,r=this._rings.length;i<r;i++)for(l=this._rings[i],s=0,a=l.length;s<a-1;s++)h=wi(l[s],l[s+1],t,s,!0),h&&(e[o]??=[],e[o].push(h[0]),(h[1]!==l[s+1]||s===a-2)&&(e[o].push(h[1]),o++))}_simplifyPoints(){const t=this._parts,e=this.options.smoothFactor;for(let i=0,s=t.length;i<s;i++)t[i]=yi(t[i],e)}_update(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())}_updatePath(){this._renderer._updatePoly(this)}_containsPoint(t,e){let i,s,o,r,a,h;const l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(h=this._parts[i],s=0,a=h.length,o=a-1;s<a;o=s++)if(!(!e&&s===0)&&vi(t,h[o],h[s])<=l)return!0;return!1}};Ne.setDefaultOptions({smoothFactor:1,noClip:!1});let $=Ne;const Fe=class Fe extends ${isEmpty(){return!this._latlngs.length||!this._latlngs[0].length}getCenter(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return gi(this._defaultShape(),this._map.options.crs)}_convertLatLngs(t){const e=$.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof p&&e[0].equals(e[i-1])&&e.pop(),e}_setLatLngs(t){$.prototype._setLatLngs.call(this,t),B(this._latlngs)&&(this._latlngs=[this._latlngs])}_defaultShape(){return B(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]}_clipPoints(){let t=this._renderer._bounds;const e=this.options.weight,i=new u(e,e);if(t=new v(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(const s of this._rings){const o=mi(s,t,!0);o.length&&this._parts.push(o)}}}_updatePath(){this._renderer._updatePoly(this,!0)}_containsPoint(t){let e=!1,i,s,o,r,a,h,l,d;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(r=0,l=this._parts.length;r<l;r++)for(i=this._parts[r],a=0,d=i.length,h=d-1;a<d;h=a++)s=i[a],o=i[h],s.y>t.y!=o.y>t.y&&t.x<(o.x-s.x)*(t.y-s.y)/(o.y-s.y)+s.x&&(e=!e);return e||$.prototype._containsPoint.call(this,t,!0)}};Fe.setDefaultOptions({fill:!0});let ot=Fe;class Y extends K{initialize(t,e){L(this,e),this._layers={},t&&this.addData(t)}addData(t){const e=Array.isArray(t)?t:t.features;if(e){for(const o of e)(o.geometries||o.geometry||o.features||o.coordinates)&&this.addData(o);return this}const i=this.options;if(i.filter&&!i.filter(t))return this;const s=Rt(t,i);return s?(s.feature=Ht(t),s.defaultOptions=s.options,this.resetStyle(s),i.onEachFeature&&i.onEachFeature(t,s),this.addLayer(s)):this}resetStyle(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=Object.create(t.defaultOptions),this._setLayerStyle(t,this.options.style),this)}setStyle(t){return this.eachLayer(e=>this._setLayerStyle(e,t))}_setLayerStyle(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}}function Rt(n,t){const e=n.type==="Feature"?n.geometry:n,i=e?.coordinates,s=[],o=t?.pointToLayer,r=t?.coordsToLatLng??xe;let a,h;if(!i&&!e)return null;switch(e.type){case"Point":return a=r(i),Ti(o,n,a,t);case"MultiPoint":for(const l of i)a=r(l),s.push(Ti(o,n,a,t));return new K(s);case"LineString":case"MultiLineString":return h=Nt(i,e.type==="LineString"?0:1,r),new $(h,t);case"Polygon":case"MultiPolygon":return h=Nt(i,e.type==="Polygon"?1:2,r),new ot(h,t);case"GeometryCollection":for(const l of e.geometries){const d=Rt({geometry:l,type:"Feature",properties:n.properties},t);d&&s.push(d)}return new K(s);case"FeatureCollection":for(const l of e.features){const d=Rt(l,t);d&&s.push(d)}return new K(s);default:throw new Error("Invalid GeoJSON object.")}}function Ti(n,t,e,i){return n?n(t,e):new Lt(e,i?.markersInheritOptions&&i)}function xe(n){return new p(n[1],n[0],n[2])}function Nt(n,t,e){return n.map(i=>t?Nt(i,t-1,e):(e||xe)(i))}function we(n,t){return n=new p(n),n.alt!==void 0?[N(n.lng,t),N(n.lat,t),N(n.alt,t)]:[N(n.lng,t),N(n.lat,t)]}function Ft(n,t,e,i){const s=n.map(o=>t?Ft(o,B(o)?0:t-1,e,i):we(o,i));return!t&&e&&s.length>0&&s.push(s[0].slice()),s}function dt(n,t){return n.feature?{...n.feature,geometry:t}:Ht(t)}function Ht(n){return n.type==="Feature"||n.type==="FeatureCollection"?n:{type:"Feature",properties:{},geometry:n}}const be={toGeoJSON(n){return dt(this,{type:"Point",coordinates:we(this.getLatLng(),n)})}};Lt.include(be),Ci.include(be),Pt.include(be),$.include({toGeoJSON(n){const t=!B(this._latlngs),e=Ft(this._latlngs,t?1:0,!1,n);return dt(this,{type:`${t?"Multi":""}LineString`,coordinates:e})}}),ot.include({toGeoJSON(n){const t=!B(this._latlngs),e=t&&!B(this._latlngs[0]);let i=Ft(this._latlngs,e?2:t?1:0,!0,n);return t||(i=[i]),dt(this,{type:`${e?"Multi":""}Polygon`,coordinates:i})}}),bt.include({toMultiPoint(n){const t=[];return this.eachLayer(e=>{t.push(e.toGeoJSON(n).geometry.coordinates)}),dt(this,{type:"MultiPoint",coordinates:t})},toGeoJSON(n){const t=this.feature?.geometry?.type;if(t==="MultiPoint")return this.toMultiPoint(n);const e=t==="GeometryCollection",i=[];return this.eachLayer(s=>{if(s.toGeoJSON){const o=s.toGeoJSON(n);if(e)i.push(o.geometry);else{const r=Ht(o);r.type==="FeatureCollection"?i.push.apply(i,r.features):i.push(r)}}}),e?dt(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});const He=class He extends O{initialize(t){L(this,t)}onAdd(){this._container||(this._initContainer(),this._container.classList.add("leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._resizeContainer(),this._onMoveEnd()}onRemove(){this._destroyContainer()}getEvents(){const t={viewreset:this._reset,zoom:this._onZoom,moveend:this._onMoveEnd,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),this.options.continuous&&(t.move=this._onMoveEnd),t}_onAnimZoom(t){this._updateTransform(t.center,t.zoom)}_onZoom(){this._updateTransform(this._map.getCenter(),this._map.getZoom())}_updateTransform(t,e){const i=this._map.getZoomScale(e,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=s.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));Q(this._container,r,i)}_onMoveEnd(t){const e=this.options.padding,i=this._map.getSize(),s=this._map.containerPointToLayerPoint(i.multiplyBy(-e)).round();this._bounds=new v(s,s.add(i.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._updateTransform(this._center,this._zoom),this._onSettled(t),this._resizeContainer()}_reset(){this._onSettled(),this._updateTransform(this._center,this._zoom),this._onViewReset()}_initContainer(){this._container=b("div")}_destroyContainer(){P(this._container),this._container.remove(),delete this._container}_resizeContainer(){const t=this.options.padding,e=this._map.getSize().multiplyBy(1+t*2).round();return this._container.style.width=`${e.x}px`,this._container.style.height=`${e.y}px`,e}_onZoomEnd(){}_onViewReset(){}_onSettled(){}};He.setDefaultOptions({padding:.1,continuous:!1});let jt=He;const je=class je extends O{initialize(t,e,i){this._url=t,this._bounds=new w(e),L(this,i)}onAdd(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(this._image.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()}onRemove(){this._image.remove(),this.options.interactive&&this.removeInteractiveTarget(this._image)}setOpacity(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this}setStyle(t){return t.opacity&&this.setOpacity(t.opacity),this}bringToFront(){return this._map&&gt(this._image),this}bringToBack(){return this._map&&yt(this._image),this}setUrl(t){return this._url=t,this._image&&(this._image.src=t),this}setBounds(t){return this._bounds=new w(t),this._map&&this._reset(),this}getEvents(){const t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}getBounds(){return this._bounds}getElement(){return this._image}_initImage(){const t=this._url.tagName==="IMG",e=this._image=t?this._url:b("img");if(e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(...F(this.options.className)),e.onselectstart=Z,e.onpointermove=Z,e.onload=this.fire.bind(this,"load"),e.onerror=this._overlayOnError.bind(this),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),e.decoding=this.options.decoding,this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt}_animateZoom(t){const e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Q(this._image,i,e)}_reset(){const t=this._image,e=new v(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();M(t,e.min),t.style.width=`${i.x}px`,t.style.height=`${i.y}px`}_updateOpacity(){this._image.style.opacity=this.options.opacity}_updateZIndex(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)}_overlayOnError(){this.fire("error");const t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}getCenter(){return this._bounds.getCenter()}};je.setDefaultOptions({opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:"",decoding:"auto"});let Ct=je;const Ge=class Ge extends Ct{_initImage(){const t=this._url.tagName==="VIDEO",e=this._image=t?this._url:b("video");if(e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(...F(this.options.className)),g(e,"pointerdown",i=>{e.controls&&V(i)}),e.onloadeddata=this.fire.bind(this,"load"),t){const i=e.getElementsByTagName("source"),s=i.map(o=>o.src);this._url=i.length>0?s:[e.src];return}Array.isArray(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.hasOwn(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.controls=!!this.options.controls,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(const i of this._url){const s=b("source");s.src=i,e.appendChild(s)}}};Ge.setDefaultOptions({autoplay:!0,controls:!1,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0});let Le=Ge;class _n extends Ct{_initImage(){const t=this._image=this._url;t.classList.add("leaflet-image-layer"),this._zoomAnimated&&t.classList.add("leaflet-zoom-animated"),this.options.className&&t.classList.add(...F(this.options.className)),t.onselectstart=Z,t.onpointermove=Z}}const We=class We extends O{initialize(t,e){t instanceof p||Array.isArray(t)?(this._latlng=new p(t),L(this,e)):(L(this,t),this._source=e),this.options.content&&(this._content=this.options.content)}openOn(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this}close(){return this._map?.removeLayer(this),this}toggle(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this}onAdd(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&(this._container.style.opacity=0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&(this._container.style.opacity=1),this.bringToFront(),this.options.interactive&&(this._container.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._container))}onRemove(t){t._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(t){return this._latlng=new p(t),this._map&&(this._updatePosition(),this._adjustPan()),this}getContent(){return this._content}setContent(t){return this._content=t,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(){const t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}isOpen(){return!!this._map&&this._map.hasLayer(this)}bringToFront(){return this._map&&gt(this._container),this}bringToBack(){return this._map&&yt(this._container),this}_prepareOpen(t){let e=this._source;if(!e._map)return!1;if(e instanceof K){e=null;for(const i of Object.values(this._source._layers))if(i._map){e=i;break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else if(e.getBounds)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0}_updateContent(){if(!this._content)return;const t=this._contentNode,e=typeof this._content=="function"?this._content(this._source??this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}_updatePosition(){if(!this._map)return;const t=this._map.latLngToLayerPoint(this._latlng),e=this._getAnchor();let i=new u(this.options.offset);this._zoomAnimated?M(this._container,t.add(e)):i=i.add(t).add(e);const s=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=`${s}px`,this._container.style.left=`${o}px`}_getAnchor(){return[0,0]}};We.setDefaultOptions({interactive:!1,offset:[0,0],className:"",pane:void 0,content:""});let A=We;y.include({_initOverlay(n,t,e,i){let s=t;return s instanceof n||(s=new n(i).setContent(t)),e&&s.setLatLng(e),s}}),O.include({_initOverlay(n,t,e,i){let s=e;return s instanceof n?(L(s,i),s._source=this):(s=t&&!i?t:new n(i,this),s.setContent(e)),s}});const $e=class $e extends A{openOn(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,A.prototype.openOn.call(this,t)}onAdd(t){A.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof j||this._source.on("preclick",V))}onRemove(t){A.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof j||this._source.off("preclick",V))}getEvents(){const t=A.prototype.getEvents.call(this);return(this.options.closeOnClick??this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t}_initLayout(){const t="leaflet-popup",e=this._container=b("div",`${t} ${this.options.className||""} leaflet-zoom-animated`),i=this._wrapper=b("div",`${t}-content-wrapper`,e);if(this._contentNode=b("div",`${t}-content`,i),vt(e),ce(this._contentNode),g(e,"contextmenu",V),this._tipContainer=b("div",`${t}-tip-container`,e),this._tip=b("div",`${t}-tip`,this._tipContainer),this.options.closeButton){const s=this._closeButton=b("a",`${t}-close-button`,e);s.setAttribute("role","button"),s.setAttribute("aria-label",this.options.closeButtonLabel),s.href="#close",s.innerHTML='<span aria-hidden="true">&#215;</span>',g(s,"click",o=>{S(o),this.close()})}this.options.trackResize&&(this._resizeObserver=new ResizeObserver(s=>{this._map&&(this._containerWidth=s[0]?.contentRect?.width,this._containerHeight=s[0]?.contentRect?.height,this._updateLayout(),this._updatePosition(),this._adjustPan())}),this._resizeObserver.observe(this._contentNode))}_updateLayout(){const t=this._contentNode,e=t.style;e.maxWidth=`${this.options.maxWidth}px`,e.minWidth=`${this.options.minWidth}px`;const i=this._containerHeight??t.offsetHeight,s=this.options.maxHeight,o="leaflet-popup-scrolled";s&&i>s?(e.height=`${s}px`,t.classList.add(o)):t.classList.remove(o),this._containerWidth=this._container.offsetWidth,this._containerHeight=this._container.offsetHeight}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();M(this._container,e.add(i))}_adjustPan(){if(!this.options.autoPan)return;if(this._map._panAnim?.stop(),this._autopanning){this._autopanning=!1;return}const t=this._map,e=parseInt(getComputedStyle(this._container).marginBottom,10)||0,i=this._containerHeight+e,s=this._containerWidth,o=new u(this._containerLeft,-i-this._containerBottom);o._add(tt(this._container));const r=t.layerPointToContainerPoint(o),a=new u(this.options.autoPanPadding),h=new u(this.options.autoPanPaddingTopLeft??a),l=new u(this.options.autoPanPaddingBottomRight??a),d=t.getSize();let c=0,f=0;r.x+s+l.x>d.x&&(c=r.x+s-d.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+i+l.y>d.y&&(f=r.y+i-d.y+l.y),r.y-f-h.y<0&&(f=r.y-h.y),(c||f)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,f]))}_getAnchor(){return new u(this._source?._getPopupAnchor?this._source._getPopupAnchor():[0,0])}};$e.setDefaultOptions({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});let Tt=$e;y.mergeOptions({closePopupOnClick:!0}),y.include({openPopup(n,t,e){return this._initOverlay(Tt,n,t,e).openOn(this),this},closePopup(n){return n=arguments.length?n:this._popup,n?.close(),this}}),O.include({bindPopup(n,t){return this._popup=this._initOverlay(Tt,this._popup,n,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup(n){return this._popup&&(this instanceof K||(this._popup._source=this),this._popup._prepareOpen(n||this._latlng)&&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(n){return this._popup?.setContent(n),this},getPopup(){return this._popup},_openPopup(n){if(!this._popup||!this._map)return;it(n);const t=n.propagatedFrom??n.target;if(this._popup._source===t&&!(t instanceof j)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(n.latlng);return}this._popup._source=t,this.openPopup(n.latlng)},_movePopup(n){this._popup.setLatLng(n.latlng)},_onKeyPress(n){n.originalEvent.code==="Enter"&&this._openPopup(n)}});const Ue=class Ue extends A{onAdd(t){A.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))}onRemove(t){A.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))}getEvents(){const t=A.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t}_initLayout(){const t="leaflet-tooltip",e=`${t} ${this.options.className||""} leaflet-zoom-${this._zoomAnimated?"animated":"hide"}`;this._contentNode=this._container=b("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id",`leaflet-tooltip-${x(this)}`)}_updateLayout(){}_adjustPan(){}_setPosition(t){let e,i,s=this.options.direction;const o=this._map,r=this._container,a=o.latLngToContainerPoint(o.getCenter()),h=o.layerPointToContainerPoint(t),l=r.offsetWidth,d=r.offsetHeight,c=new u(this.options.offset),f=this._getAnchor();s==="top"?(e=l/2,i=d):s==="bottom"?(e=l/2,i=0):s==="center"?(e=l/2,i=d/2):s==="right"?(e=0,i=d/2):s==="left"?(e=l,i=d/2):h.x<a.x?(s="right",e=0,i=d/2):(s="left",e=l+(c.x+f.x)*2,i=d/2),t=t.subtract(new u(e,i,!0)).add(c).add(f),r.classList.remove("leaflet-tooltip-right","leaflet-tooltip-left","leaflet-tooltip-top","leaflet-tooltip-bottom"),r.classList.add(`leaflet-tooltip-${s}`),M(r,t)}_updatePosition(){const t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)}setOpacity(t){this.options.opacity=t,this._container&&(this._container.style.opacity=t)}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)}_getAnchor(){return new u(this._source?._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}};Ue.setDefaultOptions({pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9});let kt=Ue;y.include({openTooltip(n,t,e){return this._initOverlay(kt,n,t,e).openOn(this),this},closeTooltip(n){return n.close(),this}}),O.include({bindTooltip(n,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(kt,this._tooltip,n,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions(n){if(!n&&this._tooltipHandlersAdded)return;const t=n?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.pointerover=this._openTooltip,e.pointerout=this.closeTooltip,e.click=this._openTooltip,this._map?this._addFocusListeners(n):e.add=()=>this._addFocusListeners(n)),this._tooltip.options.sticky&&(e.pointermove=this._moveTooltip),this[t](e),this._tooltipHandlersAdded=!n},openTooltip(n){return this._tooltip&&(this instanceof K||(this._tooltip._source=this),this._tooltip._prepareOpen(n)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip(){if(this._tooltip)return this._tooltip.close()},toggleTooltip(){return this._tooltip?.toggle(this),this},isTooltipOpen(){return this._tooltip.isOpen()},setTooltipContent(n){return this._tooltip?.setContent(n),this},getTooltip(){return this._tooltip},_addFocusListeners(n){this.getElement?this._addFocusListenersOnLayer(this,n):this.eachLayer&&this.eachLayer(t=>this._addFocusListenersOnLayer(t,n),this)},_addFocusListenersOnLayer(n,t){const e=typeof n.getElement=="function"&&n.getElement();if(e){const i=t?"off":"on";t||(e._leaflet_focus_handler&&P(e,"focus",e._leaflet_focus_handler,this),e._leaflet_focus_handler=()=>{this._tooltip&&(this._tooltip._source=n,this.openTooltip())}),e._leaflet_focus_handler&&_e[i](e,"focus",e._leaflet_focus_handler,this),_e[i](e,"blur",this.closeTooltip,this),t&&delete e._leaflet_focus_handler}},_setAriaDescribedByOnLayer(n){(typeof n.getElement=="function"&&n.getElement())?.setAttribute?.("aria-describedby",this._tooltip._container.id)},_openTooltip(n){if(!(!this._tooltip||!this._map)){if(this._map.dragging?.moving()){n.type==="add"&&!this._moveEndOpensTooltip&&(this._moveEndOpensTooltip=!0,this._map.once("moveend",()=>{this._moveEndOpensTooltip=!1,this._openTooltip(n)}));return}this._tooltip._source=n.propagatedFrom??n.target,this.openTooltip(this._tooltip.options.sticky?n.latlng:void 0)}},_moveTooltip(n){let t=n.latlng,e,i;this._tooltip.options.sticky&&n.originalEvent&&(e=this._map.pointerEventToContainerPoint(n.originalEvent),i=this._map.containerPointToLayerPoint(e),t=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(t)}});const qe=class qe extends st{createIcon(t){const e=t&&t.tagName==="DIV"?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(e.replaceChildren(),e.appendChild(i.html)):e.innerHTML=i.html!==!1?i.html:"",i.bgPos){const s=new u(i.bgPos);e.style.backgroundPosition=`${-s.x}px ${-s.y}px`}return this._setIconStyles(e,"icon"),e}createShadow(){return null}};qe.setDefaultOptions({iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"});let Pe=qe;st.Default=Dt;const Ve=class Ve extends O{initialize(t){L(this,t)}onAdd(){this._initContainer(),this._levels={},this._tiles={},this._resetView()}beforeAdd(t){t._addZoomLimit(this)}onRemove(t){this._removeAllTiles(),this._container.remove(),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0,clearTimeout(this._pruneTimeout)}bringToFront(){return this._map&&(gt(this._container),this._setAutoZIndex(Math.max)),this}bringToBack(){return this._map&&(yt(this._container),this._setAutoZIndex(Math.min)),this}getContainer(){return this._container}setOpacity(t){return this.options.opacity=t,this._updateOpacity(),this}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}isLoading(){return this._loading}redraw(){if(this._map){this._removeAllTiles();const t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this}getEvents(){const t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=Je(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}createTile(){return document.createElement("div")}getTileSize(){const t=this.options.tileSize;return t instanceof u?t:new u(t,t)}_updateZIndex(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)}_setAutoZIndex(t){const e=this.getPane().children;let i=-t(-1/0,1/0);for(const s of e){const o=s.style.zIndex;s!==this._container&&o&&(i=t(i,+o))}isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())}_updateOpacity(){if(!this._map)return;this._container.style.opacity=this.options.opacity;const t=+new Date;let e=!1,i=!1;for(const s of Object.values(this._tiles??{})){if(!s.current||!s.loaded)continue;const o=Math.min(1,(t-s.loaded)/200);s.el.style.opacity=o,o<1?e=!0:(s.active?i=!0:this._onOpaqueTile(s),s.active=!0)}i&&!this._noPrune&&this._pruneTiles(),e&&(cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this)))}_onOpaqueTile(){}_initContainer(){this._container||(this._container=b("div",`leaflet-layer ${this.options.className??""}`),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))}_updateLevels(){const t=this._tileZoom,e=this.options.maxZoom;if(t===void 0)return;for(let o of Object.keys(this._levels))o=Number(o),this._levels[o].el.children.length||o===t?(this._levels[o].el.style.zIndex=e-Math.abs(t-o),this._onUpdateLevel(o)):(this._levels[o].el.remove(),this._removeTilesAtZoom(o),this._onRemoveLevel(o),delete this._levels[o]);let i=this._levels[t];const s=this._map;return i||(i=this._levels[t]={},i.el=b("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,s.getCenter(),s.getZoom()),Z(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}_onUpdateLevel(){}_onRemoveLevel(){}_onCreateLevel(){}_pruneTiles(){if(!this._map)return;const t=this._map.getZoom();if(t>this.options.maxZoom||t<this.options.minZoom){this._removeAllTiles();return}for(const e of Object.values(this._tiles))e.retain=e.current;for(const e of Object.values(this._tiles))if(e.current&&!e.active){const i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(const[e,i]of Object.entries(this._tiles))i.retain||this._removeTile(e)}_removeTilesAtZoom(t){for(const[e,i]of Object.entries(this._tiles))i.coords.z===t&&this._removeTile(e)}_removeAllTiles(){for(const t of Object.keys(this._tiles))this._removeTile(t)}_invalidateAll(){for(const t of Object.keys(this._levels))this._levels[t].el.remove(),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0}_retainParent(t,e,i,s){const o=Math.floor(t/2),r=Math.floor(e/2),a=i-1,h=new u(+o,+r);h.z=+a;const l=this._tileCoordsToKey(h),d=this._tiles[l];return d?.active?(d.retain=!0,!0):(d?.loaded&&(d.retain=!0),a>s?this._retainParent(o,r,a,s):!1)}_retainChildren(t,e,i,s){for(let o=2*t;o<2*t+2;o++)for(let r=2*e;r<2*e+2;r++){const a=new u(o,r);a.z=i+1;const h=this._tileCoordsToKey(a),l=this._tiles[h];if(l?.active){l.retain=!0;continue}else l?.loaded&&(l.retain=!0);i+1<s&&this._retainChildren(o,r,i+1,s)}}_resetView(t){const e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)}_animateZoom(t){this._setView(t.center,t.zoom,!0,t.noUpdate)}_clampZoom(t){const e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t}_setView(t,e,i,s){let o=Math.round(e);this.options.maxZoom!==void 0&&o>this.options.maxZoom||this.options.minZoom!==void 0&&o<this.options.minZoom?o=void 0:o=this._clampZoom(o);const r=this.options.updateWhenZooming&&o!==this._tileZoom;(!s||r)&&(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),o!==void 0&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)}_setZoomTransforms(t,e){for(const i of Object.values(this._levels))this._setZoomTransform(i,t,e)}_setZoomTransform(t,e,i){const s=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(e,i)).round();Q(t.el,o,s)}_resetGrid(){const t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),s=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],s).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],s).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],s).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],s).y/i.y)]}_onMoveEnd(){!this._map||this._map._animatingZoom||this._update()}_getTiledPixelBounds(t){const e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),s=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(s*2);return new v(o.subtract(r),o.add(r))}_update(t){const e=this._map;if(!e)return;const i=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom===void 0)return;const s=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(s),r=o.getCenter(),a=[],h=this.options.keepBuffer,l=new v(o.getBottomLeft().subtract([h,-h]),o.getTopRight().add([h,-h]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(const d of Object.values(this._tiles)){const c=d.coords;(c.z!==this._tileZoom||!l.contains(new u(c.x,c.y)))&&(d.current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(let d=o.min.y;d<=o.max.y;d++)for(let c=o.min.x;c<=o.max.x;c++){const f=new u(c,d);if(f.z=this._tileZoom,!this._isValidTile(f))continue;const m=this._tiles[this._tileCoordsToKey(f)];m?m.current=!0:a.push(f)}if(a.sort((d,c)=>d.distanceTo(r)-c.distanceTo(r)),a.length!==0){this._loading||(this._loading=!0,this.fire("loading"));const d=document.createDocumentFragment();for(const c of a)this._addTile(c,d);this._level.el.appendChild(d)}}_isValidTile(t){const e=this._map.options.crs;if(!e.infinite){const s=this._globalTileRange;if(!e.wrapLng&&(t.x<s.min.x||t.x>s.max.x)||!e.wrapLat&&(t.y<s.min.y||t.y>s.max.y))return!1}if(!this.options.bounds)return!0;const i=this._tileCoordsToBounds(t);return new w(this.options.bounds).overlaps(i)}_keyToBounds(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))}_tileCoordsToNwSe(t){const e=this._map,i=this.getTileSize(),s=t.scaleBy(i),o=s.add(i),r=e.unproject(s,t.z),a=e.unproject(o,t.z);return[r,a]}_tileCoordsToBounds(t){const e=this._tileCoordsToNwSe(t);let i=new w(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i}_tileCoordsToKey(t){return`${t.x}:${t.y}:${t.z}`}_keyToTileCoords(t){const e=t.split(":"),i=new u(+e[0],+e[1]);return i.z=+e[2],i}_removeTile(t){const e=this._tiles[t];e&&(e.el.remove(),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))}_initTile(t){t.classList.add("leaflet-tile");const e=this.getTileSize();t.style.width=`${e.x}px`,t.style.height=`${e.y}px`,t.onselectstart=Z,t.onpointermove=Z}_addTile(t,e){const i=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),this._tileReady.bind(this,t));this._initTile(o),this.createTile.length<2&&requestAnimationFrame(this._tileReady.bind(this,t,null,o)),M(o,i),this._tiles[s]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})}_tileReady(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});const s=this._tileCoordsToKey(t);i=this._tiles[s],i&&(i.loaded=+new Date,this._map._fadeAnimated?(i.el.style.opacity=0,cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this))):(i.active=!0,this._pruneTiles()),e||(i.el.classList.add("leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),this._map._fadeAnimated?this._pruneTimeout=setTimeout(this._pruneTiles.bind(this),250):requestAnimationFrame(this._pruneTiles.bind(this))))}_getTilePos(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)}_wrapCoords(t){const e=new u(this._wrapX?_t(t.x,this._wrapX):t.x,this._wrapY?_t(t.y,this._wrapY):t.y);return e.z=t.z,e}_pxBoundsToTileRange(t){const e=this.getTileSize();return new v(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))}_noTilesToLoad(){return Object.values(this._tiles).every(t=>t.loaded)}};Ve.setDefaultOptions({tileSize:256,opacity:1,updateWhenIdle:z.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2});let rt=Ve;const Ke=class Ke extends rt{initialize(t,e){if(this._url=t,e=L(this,e),e.attribution===null&&URL.canParse(t)){const i=new URL(t).hostname;["tile.openstreetmap.org","tile.osm.org"].some(o=>i.endsWith(o))&&(e.attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors')}e.detectRetina&&z.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)}setUrl(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this}createTile(t,e){const i=document.createElement("img");return g(i,"load",this._tileOnLoad.bind(this,e,i)),g(i,"error",this._tileOnError.bind(this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i}getTileUrl(t){const e=Object.create(this.options);if(Object.assign(e,{r:z.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()}),this._map&&!this._map.options.crs.infinite){const i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return Qe(this._url,e)}_tileOnLoad(t,e){t(null,e)}_tileOnError(t,e,i){const s=this.options.errorTileUrl;s&&e.getAttribute("src")!==s&&(e.src=s),t(i,e)}_onTileRemove(t){t.tile.onload=null}_getZoomForUrl(){let t=this._tileZoom;const e=this.options.maxZoom,i=this.options.zoomReverse,s=this.options.zoomOffset;return i&&(t=e-t),t+s}_getSubdomain(t){const e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]}_abortLoading(){let t,e;for(t of Object.keys(this._tiles))if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=Z,e.onerror=Z,!e.complete)){e.src=Mt;const i=this._tiles[t].coords;e.remove(),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}}_removeTile(t){const e=this._tiles[t];if(e)return e.el.setAttribute("src",Mt),rt.prototype._removeTile.call(this,t)}_tileReady(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===Mt))return rt.prototype._tileReady.call(this,t,e,i)}_clampZoom(t){return Math.round(rt.prototype._clampZoom.call(this,t))}};Ke.setDefaultOptions({minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1});let at=Ke;const Vt=class Vt extends at{initialize(t,e){this._url=t;const i={...this.defaultWmsParams};for(const r of Object.keys(e))r in this.options||(i[r]=e[r]);e=L(this,e);const s=e.detectRetina&&z.retina?2:1,o=this.getTileSize();i.width=o.x*s,i.height=o.y*s,this.wmsParams=i}onAdd(t){this._crs=this.options.crs??t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);const e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,at.prototype.onAdd.call(this,t)}getTileUrl(t){const e=this._tileCoordsToNwSe(t),i=this._crs,s=new v(i.project(e[0]),i.project(e[1])),o=s.min,r=s.max,a=(this._wmsVersion>=1.3&&this._crs===Li?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),h=new URL(at.prototype.getTileUrl.call(this,t));for(const[l,d]of Object.entries({...this.wmsParams,bbox:a}))h.searchParams.append(this.options.uppercase?l.toUpperCase():l,d);return h.toString()}setParams(t,e){return Object.assign(this.wmsParams,t),e||this.redraw(),this}};Vt.prototype.defaultWmsParams={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},Vt.setDefaultOptions({crs:null,uppercase:!1});let Ce=Vt;at.WMS=Ce;class I extends jt{initialize(t){L(this,{...t,continuous:!1}),x(this),this._layers??={}}onAdd(t){super.onAdd(t),this.on("update",this._updatePaths,this)}onRemove(){super.onRemove(),this.off("update",this._updatePaths,this)}_onZoomEnd(){for(const t of Object.values(this._layers))t._project()}_updatePaths(){for(const t of Object.values(this._layers))t._update()}_onViewReset(){for(const t of Object.values(this._layers))t._reset()}_onSettled(){this._update()}_update(){}}const Ye=class Ye extends I{getEvents(){const t=I.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t}_onViewPreReset(){this._postponeUpdatePaths=!0}onAdd(t){I.prototype.onAdd.call(this,t),this._draw()}onRemove(){I.prototype.onRemove.call(this),clearTimeout(this._pointerHoverThrottleTimeout)}_initContainer(){const t=this._container=document.createElement("canvas");g(t,"pointermove",this._onPointerMove,this),g(t,"click dblclick pointerdown pointerup contextmenu",this._onClick,this),g(t,"pointerout",this._handlePointerOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")}_destroyContainer(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,delete this._ctx,I.prototype._destroyContainer.call(this)}_resizeContainer(){const t=I.prototype._resizeContainer.call(this),e=this._ctxScale=window.devicePixelRatio;this._container.width=e*t.x,this._container.height=e*t.y}_updatePaths(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(const t of Object.values(this._layers))t._update();this._redraw()}}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=this._ctxScale;this._ctx.setTransform(e,0,0,e,-t.min.x*e,-t.min.y*e),this.fire("update")}_reset(){I.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())}_initPath(t){this._updateDashArray(t),this._layers[x(t)]=t;const e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst??=this._drawLast}_addPath(t){this._requestRedraw(t)}_removePath(t){const e=t._order,i=e.next,s=e.prev;i?i.prev=s:this._drawLast=s,s?s.next=i:this._drawFirst=i,delete t._order,delete this._layers[x(t)],this._requestRedraw(t)}_updatePath(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)}_updateStyle(t){this._updateDashArray(t),this._requestRedraw(t)}_updateDashArray(t){if(typeof t.options.dashArray=="string"){const e=t.options.dashArray.split(/[, ]+/);t.options._dashArray=e.map(i=>Number(i)).filter(i=>!isNaN(i))}else t.options._dashArray=t.options.dashArray}_requestRedraw(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest??=requestAnimationFrame(this._redraw.bind(this)))}_extendRedrawBounds(t){if(t._pxBounds){const e=(t.options.weight??0)+1;this._redrawBounds??=new v,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}}_redraw(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null}_clear(){const t=this._redrawBounds;if(t){const e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.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 t;const e=this._redrawBounds;if(this._ctx.save(),e){const i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(let i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()}_updatePoly(t,e){if(!this._drawing)return;const i=t._parts,s=this._ctx;i.length&&(s.beginPath(),i.forEach(o=>{o.forEach((r,a)=>{s[a?"lineTo":"moveTo"](r.x,r.y)}),e&&s.closePath()}),this._fillStroke(s,t))}_updateCircle(t){if(!this._drawing||t._empty())return;const e=t._point,i=this._ctx,s=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||s)/s;o!==1&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,s,0,Math.PI*2,!1),o!==1&&i.restore(),this._fillStroke(i,t)}_fillStroke(t,e){const i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor??i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&i.weight!==0&&(t.setLineDash&&(t.lineDashOffset=Number(i.dashOffset??0),t.setLineDash(i._dashArray??[])),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())}_onClick(t){const e=this._map.pointerEventToLayerPoint(t);let i,s;for(let o=this._drawFirst;o;o=o.next)i=o.layer,i.options.interactive&&i._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(i))&&(s=i);this._fireEvent(s?[s]:!1,t)}_onPointerMove(t){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom)return;const e=this._map.pointerEventToLayerPoint(t);this._handlePointerHover(t,e)}_handlePointerOut(t){const e=this._hoveredLayer;e&&(this._container.classList.remove("leaflet-interactive"),this._fireEvent([e],t,"pointerout"),this._hoveredLayer=null,this._pointerHoverThrottled=!1)}_handlePointerHover(t,e){if(this._pointerHoverThrottled)return;let i,s;for(let o=this._drawFirst;o;o=o.next)i=o.layer,i.options.interactive&&i._containsPoint(e)&&(s=i);s!==this._hoveredLayer&&(this._handlePointerOut(t),s&&(this._container.classList.add("leaflet-interactive"),this._fireEvent([s],t,"pointerover"),this._hoveredLayer=s)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._pointerHoverThrottled=!0,this._pointerHoverThrottleTimeout=setTimeout(()=>{this._pointerHoverThrottled=!1},32)}_fireEvent(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)}_bringToFront(t){const e=t._order;if(!e)return;const i=e.next,s=e.prev;if(i)i.prev=s;else return;s?s.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}_bringToBack(t){const e=t._order;if(!e)return;const i=e.next,s=e.prev;if(s)s.next=i;else return;i?i.prev=s:s&&(this._drawLast=s),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}};Ye.setDefaultOptions({tolerance:0});let Gt=Ye;function pn(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function ki(n,t){return n.flatMap(i=>[...i.map((s,o)=>`${(o?"L":"M")+s.x} ${s.y}`),t?"z":""]).join("")||"M0 0"}const Wt=pn;class $t extends I{_initContainer(){this._container=Wt("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wt("g"),this._container.appendChild(this._rootGroup)}_destroyContainer(){I.prototype._destroyContainer.call(this),delete this._rootGroup,delete this._svgSize}_resizeContainer(){const t=I.prototype._resizeContainer.call(this);(!this._svgSize||!this._svgSize.equals(t))&&(this._svgSize=t,this._container.setAttribute("width",t.x),this._container.setAttribute("height",t.y))}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=t.getSize();this._container.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}_initPath(t){const e=t._path=Wt("path");t.options.className&&e.classList.add(...F(t.options.className)),t.options.interactive&&e.classList.add("leaflet-interactive"),this._updateStyle(t),this._layers[x(t)]=t}_addPath(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)}_removePath(t){t._path.remove(),t.removeInteractiveTarget(t._path),delete this._layers[x(t)]}_updatePath(t){t._project(),t._update()}_updateStyle(t){const e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))}_updatePoly(t,e){this._setPath(t,ki(t._parts,e))}_updateCircle(t){const e=t._point,i=Math.max(Math.round(t._radius),1),s=Math.max(Math.round(t._radiusY),1)||i,o=`a${i},${s} 0 1,0 `,r=t._empty()?"M0 0":`M${e.x-i},${e.y}${o}${i*2},0 ${o}${-i*2},0 `;this._setPath(t,r)}_setPath(t,e){t._path.setAttribute("d",e)}_bringToFront(t){gt(t._path)}_bringToBack(t){yt(t._path)}}y.include({getRenderer(n){let t=n.options.renderer??this._getPaneRenderer(n.options.pane)??this.options.renderer??this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer(n){if(n==="overlayPane"||n===void 0)return;let t=this._paneRenderers[n];return t===void 0&&(t=this._createRenderer({pane:n}),this._paneRenderers[n]=t),t},_createRenderer(n){return this.options.preferCanvas&&new Gt(n)||new $t(n)}});class fn extends ot{initialize(t,e){ot.prototype.initialize.call(this,this._boundsToLatLngs(t),e)}setBounds(t){return this.setLatLngs(this._boundsToLatLngs(t))}_boundsToLatLngs(t){return t=new w(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}$t.create=Wt,$t.pointsToPath=ki,Y.geometryToLayer=Rt,Y.coordsToLatLng=xe,Y.coordsToLatLngs=Nt,Y.latLngToCoords=we,Y.latLngsToCoords=Ft,Y.getFeature=dt,Y.asFeature=Ht,y.mergeOptions({boxZoom:!0});class Mi extends H{initialize(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)}addHooks(){g(this._container,"pointerdown",this._onPointerDown,this)}removeHooks(){P(this._container,"pointerdown",this._onPointerDown,this)}moved(){return this._moved}_destroy(){this._pane.remove(),delete this._pane}_resetState(){this._resetStateTimeout=0,this._moved=!1}_clearDeferredResetState(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)}_onPointerDown(t){if(!t.shiftKey||t.button!==0)return!1;this._clearDeferredResetState(),this._resetState(),te(),ie(),this._startPoint=this._map.pointerEventToContainerPoint(t),g(document,{contextmenu:it,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerMove(t){this._moved||(this._moved=!0,this._box=b("div","leaflet-zoom-box",this._container),this._container.classList.add("leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.pointerEventToContainerPoint(t);const e=new v(this._point,this._startPoint),i=e.getSize();M(this._box,e.min),this._box.style.width=`${i.x}px`,this._box.style.height=`${i.y}px`}_finish(){this._moved&&(this._box.remove(),this._container.classList.remove("leaflet-crosshair")),ee(),ne(),P(document,{contextmenu:it,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerUp(t){if(t.button!==0||(this._finish(),!this._moved))return;this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(this._resetState.bind(this),0);const e=new w(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}_onKeyDown(t){t.code==="Escape"&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}y.addInitHook("addHandler","boxZoom",Mi),y.mergeOptions({doubleClickZoom:!0});class zi extends H{addHooks(){this._map.on("dblclick",this._onDoubleClick,this)}removeHooks(){this._map.off("dblclick",this._onDoubleClick,this)}_onDoubleClick(t){const e=this._map,i=e.getZoom(),s=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-s:i+s;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}}y.addInitHook("addHandler","doubleClickZoom",zi),y.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});class Si extends H{addHooks(){if(!this._draggable){const t=this._map;this._draggable=new xt(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,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}_onDragStart(){const t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){const e=new w(this._map.options.maxBounds);this._offsetLimit=new v(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])}_onDrag(t){if(this._map.options.inertia){const e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)}_prunePositions(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()}_onZoomEnd(){const t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x}_viscousLimit(t,e){return t-(t-e)*this._viscosity}_onPreDragLimit(){if(!this._viscosity||!this._offsetLimit)return;const t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}_onPreDragWrap(){const t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,s=this._draggable._newPos.x,o=(s-e+i)%t+e-i,r=(s+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(r+i)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a}_onDragEnd(t){const e=this._map,i=e.options,s=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),s)e.fire("moveend");else{this._prunePositions(+new Date);const o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,h=o.multiplyBy(a/r),l=h.distanceTo([0,0]),d=Math.min(i.inertiaMaxSpeed,l),c=h.multiplyBy(d/l),f=d/(i.inertiaDeceleration*a);let m=c.multiplyBy(-f/2).round();!m.x&&!m.y?e.fire("moveend"):(m=e._limitOffset(m,e.options.maxBounds),requestAnimationFrame(()=>{e.panBy(m,{duration:f,easeLinearity:a,noMoveStart:!0,animate:!0})}))}}}y.addInitHook("addHandler","dragging",Si),y.mergeOptions({keyboard:!0,keyboardPanDelta:80});class ct extends H{static keyCodes={left:["ArrowLeft"],right:["ArrowRight"],down:["ArrowDown"],up:["ArrowUp"],zoomIn:["Equal","NumpadAdd","BracketRight"],zoomOut:["Minus","NumpadSubtract","Digit6","Slash"]};initialize(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)}addHooks(){const t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),t.ariaKeyShortcuts=Object.values(ct.keyCodes).flat().join(" "),g(t,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)}removeHooks(){this._removeHooks(),P(this._map._container,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)}_onPointerDown(){if(this._focused)return;const t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,s=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(s,i)}_onFocus(){this._focused=!0,this._map.fire("focus")}_onBlur(){this._focused=!1,this._map.fire("blur")}_setPanDelta(t){const e=this._panKeys={},i=ct.keyCodes;for(const s of i.left)e[s]=[-1*t,0];for(const s of i.right)e[s]=[t,0];for(const s of i.down)e[s]=[0,t];for(const s of i.up)e[s]=[0,-1*t]}_setZoomDelta(t){const e=this._zoomKeys={},i=ct.keyCodes;for(const s of i.zoomIn)e[s]=t;for(const s of i.zoomOut)e[s]=-t}_addHooks(){g(document,"keydown",this._onKeyDown,this)}_removeHooks(){P(document,"keydown",this._onKeyDown,this)}_onKeyDown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.code,i=this._map;let s;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(s=this._panKeys[e],t.shiftKey&&(s=new u(s).multiplyBy(3)),i.options.maxBounds&&(s=i._limitOffset(new u(s),i.options.maxBounds)),i.options.worldCopyJump){const o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(s)));i.panTo(o)}else i.panBy(s)}else if(e in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e==="Escape"&&i._popup&&i._popup.options.closeOnEscapeKey)i.closePopup();else return;it(t)}}y.addInitHook("addHandler","keyboard",ct),y.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});class Oi extends H{addHooks(){g(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0}removeHooks(){P(this._map._container,"wheel",this._onWheelScroll,this),clearTimeout(this._timer)}_onWheelScroll(t){const e=pi(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.pointerEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);const s=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(this._performZoom.bind(this),s),it(t)}_performZoom(){const t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap??0;t._stop();const s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),o=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,r=i?Math.ceil(o/i)*i:o,a=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,a&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}}y.addInitHook("addHandler","scrollWheelZoom",Oi);const mn=600;y.mergeOptions({tapHold:z.safari&&z.mobile,tapTolerance:15});class Zi extends H{addHooks(){g(this._map._container,"pointerdown",this._onDown,this)}removeHooks(){P(this._map._container,"pointerdown",this._onDown,this),clearTimeout(this._holdTimeout)}_onDown(t){clearTimeout(this._holdTimeout),!(lt().length!==1||t.pointerType==="mouse")&&(this._startPos=this._newPos=new u(t.clientX,t.clientY),this._holdTimeout=setTimeout(()=>{this._cancel(),this._isTapValid()&&(g(document,"pointerup",S),g(document,"pointerup pointercancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},mn),g(document,"pointerup pointercancel contextmenu",this._cancel,this),g(document,"pointermove",this._onMove,this))}_cancelClickPrevent=function t(){P(document,"pointerup",S),P(document,"pointerup pointercancel",t)};_cancel(){clearTimeout(this._holdTimeout),P(document,"pointerup pointercancel contextmenu",this._cancel,this),P(document,"pointermove",this._onMove,this)}_onMove(t){this._newPos=new u(t.clientX,t.clientY)}_isTapValid(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance}_simulateEvent(t,e){const i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}}y.addInitHook("addHandler","tapHold",Zi),y.mergeOptions({pinchZoom:!0,bounceAtZoomLimits:!0});class Te extends H{addHooks(){this._map._container.classList.add("leaflet-touch-zoom"),g(this._map._container,"pointerdown",this._onPointerStart,this)}removeHooks(){this._map._container.classList.remove("leaflet-touch-zoom"),P(this._map._container,"pointerdown",this._onPointerStart,this)}_onPointerStart(t){const e=this._map,i=lt();if(i.length!==2||e._animatingZoom||this._zooming)return;const s=e.pointerEventToContainerPoint(i[0]),o=e.pointerEventToContainerPoint(i[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.pinchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(s.add(o)._divideBy(2))),this._startDist=s.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),g(document,"pointermove",this._onPointerMove,this),g(document,"pointerup pointercancel",this._onPointerEnd,this),S(t)}_onPointerMove(t){const e=lt();if(e.length!==2||!this._zooming)return;const i=this._map,s=i.pointerEventToContainerPoint(e[0]),o=i.pointerEventToContainerPoint(e[1]),r=s.distanceTo(o)/this._startDist;if(this._zoom=i.getScaleZoom(r,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&r<1||this._zoom>i.getMaxZoom()&&r>1)&&(this._zoom=i._limitZoom(this._zoom)),i.options.pinchZoom==="center"){if(this._center=this._startLatLng,r===1)return}else{const h=s._add(o)._divideBy(2)._subtract(this._centerPoint);if(r===1&&h.x===0&&h.y===0)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(h),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),cancelAnimationFrame(this._animRequest);const a=i._move.bind(i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimationFrame(a.bind(this)),S(t)}_onPointerEnd(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,cancelAnimationFrame(this._animRequest),P(document,"pointermove",this._onPointerMove,this),P(document,"pointerup pointercancel",this._onPointerEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}}y.addInitHook("addHandler","pinchZoom",Te),y.addInitHook(function(){this.touchZoom=this.pinchZoom,this.options.touchZoom!==void 0&&(console.warn("Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead."),this.options.pinchZoom=this.options.touchZoom,delete this.options.touchZoom),this.options.pinchZoom?this.pinchZoom.enable():this.pinchZoom.disable()}),y.BoxZoom=Mi,y.DoubleClickZoom=zi,y.Drag=Si,y.Keyboard=ct,y.ScrollWheelZoom=Oi,y.TapHold=Zi,y.PinchZoom=Te,y.TouchZoom=Te;var _={__proto__:null,BlanketOverlay:jt,Bounds:v,Browser:z,CRS:G,Canvas:Gt,Circle:Ci,CircleMarker:Pt,Class:pt,Control:E,DivIcon:Pe,DivOverlay:A,DomEvent:_e,DomUtil:Xi,Draggable:xt,Evented:ft,FeatureGroup:K,GeoJSON:Y,GridLayer:rt,Handler:H,Icon:st,ImageOverlay:Ct,LatLng:p,LatLngBounds:w,Layer:O,LayerGroup:bt,LeafletMap:en,LineUtil:ln,Map:y,Marker:Lt,Path:j,Point:u,PolyUtil:sn,Polygon:ot,Polyline:$,Popup:Tt,PosAnimation:fi,Projection:dn,Rectangle:fn,Renderer:I,SVG:$t,SVGOverlay:_n,TileLayer:at,Tooltip:kt,Transformation:mt,Util:Ni,VideoOverlay:Le,version:"2.0.0-alpha.1"};const gn=Ut().L;Ut().L=_,Ut().L.noConflict=function(){return Ut().L=gn,this};function Ut(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}const yn=`/* required styles */
1
+ var mtdsatlas=function(D){"use strict";var Fn=Object.defineProperty;var Hn=(D,R,x)=>R in D?Fn(D,R,{enumerable:!0,configurable:!0,writable:!0,value:x}):D[R]=x;var Hi=(D,R,x)=>Hn(D,typeof R!="symbol"?R+"":R,x);var J;let R=0;function x(n){return"_leaflet_id"in n||(n._leaflet_id=++R),n._leaflet_id}function Qe(n,t,e){let i,s;function o(){i=!1,s&&(r.apply(e,s),s=!1)}function r(...a){i?s=a:(n.apply(e,a),setTimeout(o,t),i=!0)}return r}function pt(n,t,e){const i=t[1],s=t[0],o=i-s;return n===i&&e?n:((n-s)%o+o)%o+s}function Z(){return!1}function N(n,t){if(t===!1)return n;const e=10**(t===void 0?6:t);return Math.round(n*e)/e}function F(n){return n.trim().split(/\s+/)}function L(n,t){Object.hasOwn(n,"options")||(n.options=n.options?Object.create(n.options):{});for(const e in t)Object.hasOwn(t,e)&&(n.options[e]=t[e]);return n.options}const ji=/\{ *([\w_ -]+) *\}/g;function ti(n,t){return n.replace(ji,(e,i)=>{let s=t[i];if(s===void 0)throw new Error(`No value provided for variable ${e}`);return typeof s=="function"&&(s=s(t)),s})}const zt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";var Gi={__proto__:null,emptyImageUrl:zt,falseFn:Z,formatNum:N,get lastId(){return R},setOptions:L,splitWords:F,stamp:x,template:ti,throttle:Qe,wrapNum:pt};class ft{static extend({statics:t,includes:e,...i}){const s=class extends this{};Object.setPrototypeOf(s,this);const o=this.prototype,r=s.prototype;if(t&&Object.assign(s,t),Array.isArray(e))for(const a of e)Object.assign(r,a);else e&&Object.assign(r,e);return Object.assign(r,i),r.options&&(r.options=o.options?Object.create(o.options):{},Object.assign(r.options,i.options)),r._initHooks=[],s}static include(t){const e=this.prototype.options;return Object.assign(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this}static setDefaultOptions(t){return L(this.prototype,t),this}static mergeOptions(t){return this.prototype.options??={},Object.assign(this.prototype.options,t),this}static addInitHook(t,...e){const i=typeof t=="function"?t:function(){this[t].apply(this,e)};return this.prototype._initHooks??=[],this.prototype._initHooks.push(i),this}constructor(...t){this._initHooksCalled=!1,L(this),this.initialize&&this.initialize(...t),this.callInitHooks()}initialize(){}callInitHooks(){if(this._initHooksCalled)return;const t=[];let e=this;for(;(e=Object.getPrototypeOf(e))!==null;)t.push(e);t.reverse();for(const i of t)for(const s of i._initHooks??[])s.call(this);this._initHooksCalled=!0}}class mt extends ft{on(t,e,i){if(typeof t=="object")for(const[s,o]of Object.entries(t))this._on(s,o,e);else for(const s of F(t))this._on(s,e,i);return this}off(t,e,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(const[s,o]of Object.entries(t))this._off(s,o,e);else{const s=arguments.length===1;for(const o of F(t))s?this._off(o):this._off(o,e,i)}return this}_on(t,e,i,s){if(typeof e!="function"){console.warn(`wrong listener type: ${typeof e}`);return}if(this._listens(t,e,i)!==!1)return;i===this&&(i=void 0);const o={fn:e,ctx:i};s&&(o.once=!0),this._events??={},this._events[t]??=[],this._events[t].push(o)}_off(t,e,i){if(!this._events)return;let s=this._events[t];if(!s)return;if(arguments.length===1){if(this._firingCount)for(const r of s)r.fn=Z;delete this._events[t];return}if(typeof e!="function"){console.warn(`wrong listener type: ${typeof e}`);return}const o=this._listens(t,e,i);if(o!==!1){const r=s[o];this._firingCount&&(r.fn=Z,this._events[t]=s=s.slice()),s.splice(o,1)}}fire(t,e,i){if(!this.listens(t,i))return this;const s={...e,type:t,target:this,sourceTarget:e?.sourceTarget||this};if(this._events){const o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(const r of o){const a=r.fn;r.once&&this.off(t,a,r.ctx),a.call(r.ctx||this,s)}this._firingCount--}}return i&&this._propagateEvent(s),this}listens(t,e,i,s){typeof t!="string"&&console.warn('"string" type argument expected');let o=e;if(typeof e!="function"&&(s=!!e,o=void 0,i=void 0),this._events?.[t]?.length&&this._listens(t,o,i)!==!1)return!0;if(s){for(const r of Object.values(this._eventParents??{}))if(r.listens(t,e,i,s))return!0}return!1}_listens(t,e,i){if(!this._events)return!1;const s=this._events[t]??[];if(!e)return!!s.length;i===this&&(i=void 0);const o=s.findIndex(r=>r.fn===e&&r.ctx===i);return o===-1?!1:o}once(t,e,i){if(typeof t=="object")for(const[s,o]of Object.entries(t))this._on(s,o,e,!0);else for(const s of F(t))this._on(s,e,i,!0);return this}addEventParent(t){return this._eventParents??={},this._eventParents[x(t)]=t,this}removeEventParent(t){return this._eventParents&&delete this._eventParents[x(t)],this}_propagateEvent(t){for(const e of Object.values(this._eventParents??{}))e.fire(t.type,{propagatedFrom:t.target,...t},!0)}}class u{constructor(t,e,i){if(!u.validate(t,e))throw new Error(`Invalid Point object: (${t}, ${e})`);let o,r;if(t instanceof u)return t;Array.isArray(t)?(o=t[0],r=t[1]):typeof t=="object"&&"x"in t&&"y"in t?(o=t.x,r=t.y):(o=t,r=e),this.x=i?Math.round(o):o,this.y=i?Math.round(r):r}static validate(t,e){return t instanceof u||Array.isArray(t)||t&&typeof t=="object"&&"x"in t&&"y"in t?!0:!!((t||t===0)&&(e||e===0))}clone(){const t=new u(0,0);return t.x=this.x,t.y=this.y,t}add(t){return this.clone()._add(new u(t))}_add(t){return this.x+=t.x,this.y+=t.y,this}subtract(t){return this.clone()._subtract(new u(t))}_subtract(t){return this.x-=t.x,this.y-=t.y,this}divideBy(t){return this.clone()._divideBy(t)}_divideBy(t){return this.x/=t,this.y/=t,this}multiplyBy(t){return this.clone()._multiplyBy(t)}_multiplyBy(t){return this.x*=t,this.y*=t,this}scaleBy(t){return new u(this.x*t.x,this.y*t.y)}unscaleBy(t){return new u(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 u(t);const e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)}equals(t){return t=new u(t),t.x===this.x&&t.y===this.y}contains(t){return t=new u(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)}toString(){return`Point(${N(this.x)}, ${N(this.y)})`}}class v{constructor(t,e){if(!t)return;if(t instanceof v)return t;const i=e?[t,e]:t;for(const s of i)this.extend(s)}extend(t){let e,i;if(!t)return this;if(t instanceof u||typeof t[0]=="number"||"x"in t)e=i=new u(t);else if(t=new v(t),e=t.min,i=t.max,!e||!i)return this;return!this.min&&!this.max?(this.min=e.clone(),this.max=i.clone()):(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)),this}getCenter(t){return new u((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)}getBottomLeft(){return new u(this.min.x,this.max.y)}getTopRight(){return new u(this.max.x,this.min.y)}getTopLeft(){return this.min}getBottomRight(){return this.max}getSize(){return this.max.subtract(this.min)}contains(t){let e,i;return typeof t[0]=="number"||t instanceof u?t=new u(t):t=new v(t),t instanceof v?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y}intersects(t){t=new v(t);const e=this.min,i=this.max,s=t.min,o=t.max,r=o.x>=e.x&&s.x<=i.x,a=o.y>=e.y&&s.y<=i.y;return r&&a}overlaps(t){t=new v(t);const e=this.min,i=this.max,s=t.min,o=t.max,r=o.x>e.x&&s.x<i.x,a=o.y>e.y&&s.y<i.y;return r&&a}isValid(){return!!(this.min&&this.max)}pad(t){const e=this.min,i=this.max,s=Math.abs(e.x-i.x)*t,o=Math.abs(e.y-i.y)*t;return new v(new u(e.x-s,e.y-o),new u(i.x+s,i.y+o))}equals(t){return t?(t=new v(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}}class w{constructor(t,e){if(!t)return;if(t instanceof w)return t;const i=e?[t,e]:t;for(const s of i)this.extend(s)}extend(t){const e=this._southWest,i=this._northEast;let s,o;if(t instanceof p)s=t,o=t;else if(t instanceof w){if(s=t._southWest,o=t._northEast,!s||!o)return this}else return t?p.validate(t)?this.extend(new p(t)):this.extend(new w(t)):this;return!e&&!i?(this._southWest=new p(s.lat,s.lng),this._northEast=new p(o.lat,o.lng)):(e.lat=Math.min(s.lat,e.lat),e.lng=Math.min(s.lng,e.lng),i.lat=Math.max(o.lat,i.lat),i.lng=Math.max(o.lng,i.lng)),this}pad(t){const e=this._southWest,i=this._northEast,s=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new w(new p(e.lat-s,e.lng-o),new p(i.lat+s,i.lng+o))}getCenter(){return new p((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 p(this.getNorth(),this.getWest())}getSouthEast(){return new p(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){p.validate(t)?t=new p(t):t=new w(t);const e=this._southWest,i=this._northEast;let s,o;return t instanceof w?(s=t.getSouthWest(),o=t.getNorthEast()):s=o=t,s.lat>=e.lat&&o.lat<=i.lat&&s.lng>=e.lng&&o.lng<=i.lng}intersects(t){t=new w(t);const e=this._southWest,i=this._northEast,s=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&s.lat<=i.lat,a=o.lng>=e.lng&&s.lng<=i.lng;return r&&a}overlaps(t){t=new w(t);const e=this._southWest,i=this._northEast,s=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&s.lat<i.lat,a=o.lng>e.lng&&s.lng<i.lng;return r&&a}toBBoxString(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")}equals(t,e){return t?(t=new w(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e)):!1}isValid(){return!!(this._southWest&&this._northEast)}}class p{constructor(t,e,i){if(!p.validate(t,e,i))throw new Error(`Invalid LatLng object: (${t}, ${e})`);let o,r,a;if(t instanceof p)return t;Array.isArray(t)&&typeof t[0]!="object"?t.length===3?(o=t[0],r=t[1],a=t[2]):t.length===2&&(o=t[0],r=t[1]):typeof t=="object"&&"lat"in t?(o=t.lat,r="lng"in t?t.lng:t.lon,a=t.alt):(o=t,r=e,a=i),this.lat=+o,this.lng=+r,a!==void 0&&(this.alt=+a)}static validate(t,e,i){return t instanceof p||typeof t=="object"&&"lat"in t?!0:t&&Array.isArray(t)&&typeof t[0]!="object"?t.length===3||t.length===2:!!((t||t===0)&&(e||e===0))}equals(t,e){return t?(t=new p(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(e??1e-9)):!1}toString(t){return`LatLng(${N(this.lat,t)}, ${N(this.lng,t)})`}distanceTo(t){return V.distance(this,new p(t))}wrap(){return V.wrapLatLng(this)}toBounds(t){const e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return new w([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])}clone(){const t=new p(0,0);return t.lat=this.lat,t.lng=this.lng,t.alt=this.alt,t}}class W{static projection=void 0;static transformation=void 0;static latLngToPoint(t,e){const i=this.projection.project(t),s=this.scale(e);return this.transformation._transform(i,s)}static pointToLatLng(t,e){const i=this.scale(e),s=this.transformation.untransform(t,i);return this.projection.unproject(s)}static project(t){return this.projection.project(t)}static unproject(t){return this.projection.unproject(t)}static scale(t){return 256*2**t}static zoom(t){return Math.log(t/256)/Math.LN2}static getProjectedBounds(t){if(this.infinite)return null;const e=this.projection.bounds,i=this.scale(t),s=this.transformation.transform(e.min,i),o=this.transformation.transform(e.max,i);return new v(s,o)}static infinite=!1;static wrapLatLng(t){t=new p(t);const e=this.wrapLng?pt(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?pt(t.lat,this.wrapLat,!0):t.lat,s=t.alt;return new p(i,e,s)}static wrapLatLngBounds(t){t=new w(t);const e=t.getCenter(),i=this.wrapLatLng(e),s=e.lat-i.lat,o=e.lng-i.lng;if(s===0&&o===0)return t;const r=t.getSouthWest(),a=t.getNorthEast(),h=new p(r.lat-s,r.lng-o),l=new p(a.lat-s,a.lng-o);return new w(h,l)}}class V extends W{static wrapLng=[-180,180];static R=6371e3;static distance(t,e){const i=Math.PI/180,s=t.lat*i,o=e.lat*i,r=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),h=r*r+Math.cos(s)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return this.R*l}}const ei=6378137,Xt={R:ei,MAX_LATITUDE:85.0511287798,project(n){n=new p(n);const t=Math.PI/180,e=this.MAX_LATITUDE,i=Math.max(Math.min(e,n.lat),-e),s=Math.sin(i*t);return new u(this.R*n.lng*t,this.R*Math.log((1+s)/(1-s))/2)},unproject(n){n=new u(n);const t=180/Math.PI;return new p((2*Math.atan(Math.exp(n.y/this.R))-Math.PI/2)*t,n.x*t/this.R)},bounds:(()=>{const n=ei*Math.PI;return new v([-n,-n],[n,n])})()};class gt{constructor(t,e,i,s){if(Array.isArray(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=e,this._c=i,this._d=s}transform(t,e){return this._transform(t.clone(),e)}_transform(t,e){return e||=1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t}untransform(t,e){return e||=1,new u((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}}class Jt extends V{static code="EPSG:3857";static projection=Xt;static transformation=(()=>{const t=.5/(Math.PI*Xt.R);return new gt(t,.5,-t,.5)})()}class Wi extends Jt{static code="EPSG:900913"}const ii=Qt("chrome"),$i=!ii&&Qt("safari"),Ui=typeof orientation<"u"||Qt("mobile"),ni=typeof window>"u"?!1:!!window.PointerEvent,si=typeof window>"u"?!1:"ontouchstart"in window||!!window.TouchEvent,qi=si||ni,Vi=typeof window>"u"||typeof window.devicePixelRatio>"u"?!1:window.devicePixelRatio>1,Ki=typeof navigator>"u"||typeof navigator.platform>"u"?!1:navigator.platform.startsWith("Mac"),Yi=typeof navigator>"u"||typeof navigator.platform>"u"?!1:navigator.platform.startsWith("Linux");function Qt(n){return typeof navigator>"u"||typeof navigator.userAgent>"u"?!1:navigator.userAgent.toLowerCase().includes(n)}var z={chrome:ii,safari:$i,mobile:Ui,pointer:ni,touch:qi,touchNative:si,retina:Vi,mac:Ki,linux:Yi};function Xi(n){let t={bubbles:n.bubbles,cancelable:n.cancelable,composed:n.composed,detail:2,view:n.view,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,altKey:n.altKey,metaKey:n.metaKey,button:n.button,buttons:n.buttons,relatedTarget:n.relatedTarget,region:n.region},e;return n instanceof PointerEvent?(t={...t,pointerId:n.pointerId,width:n.width,height:n.height,pressure:n.pressure,tangentialPressure:n.tangentialPressure,tiltX:n.tiltX,tiltY:n.tiltY,twist:n.twist,pointerType:n.pointerType,isPrimary:n.isPrimary},e=new PointerEvent("dblclick",t)):e=new MouseEvent("dblclick",t),e}const Ji=200;function Qi(n,t){n.addEventListener("dblclick",t);let e=0,i;function s(o){if(o.detail!==1){i=o.detail;return}if(o.pointerType==="mouse"||o.sourceCapabilities&&!o.sourceCapabilities.firesTouchEvents)return;const r=ui(o);if(r.some(h=>h instanceof HTMLLabelElement&&h.attributes.for)&&!r.some(h=>h instanceof HTMLInputElement||h instanceof HTMLSelectElement))return;const a=Date.now();a-e<=Ji?(i++,i===2&&o.target.dispatchEvent(Xi(o))):i=1,e=a}return n.addEventListener("click",s),{dblclick:t,simDblclick:s}}function tn(n,t){n.removeEventListener("dblclick",t.dblclick),n.removeEventListener("click",t.simDblclick)}function oi(n){return typeof n=="string"?document.getElementById(n):n}function b(n,t,e){const i=document.createElement(n);return i.className=t??"",e?.appendChild(i),i}function yt(n){const t=n.parentNode;t&&t.lastChild!==n&&t.appendChild(n)}function vt(n){const t=n.parentNode;t&&t.firstChild!==n&&t.insertBefore(n,t.firstChild)}function tt(n,t,e){const i=t??new u(0,0);n.style.transform=`translate3d(${i.x}px,${i.y}px,0)${e?` scale(${e})`:""}`}const ri=new WeakMap;function M(n,t){ri.set(n,t),tt(n,t)}function et(n){return ri.get(n)??new u(0,0)}const St=typeof document>"u"?{}:document.documentElement.style,te=["userSelect","WebkitUserSelect"].find(n=>n in St);let Ot;function ee(){const n=St[te];n!=="none"&&(Ot=n,St[te]="none")}function ie(){typeof Ot>"u"||(St[te]=Ot,Ot=void 0)}function ne(){g(window,"dragstart",S)}function se(){P(window,"dragstart",S)}let Zt,oe;function re(n){for(;n.tabIndex===-1;)n=n.parentNode;n.style&&(Et(),Zt=n,oe=n.style.outlineStyle,n.style.outlineStyle="none",g(window,"keydown",Et))}function Et(){Zt&&(Zt.style.outlineStyle=oe,Zt=void 0,oe=void 0,P(window,"keydown",Et))}function ai(n){do n=n.parentNode;while((!n.offsetWidth||!n.offsetHeight)&&n!==document.body);return n}function ae(n){const t=n.getBoundingClientRect();return{x:t.width/n.offsetWidth||1,y:t.height/n.offsetHeight||1,boundingClientRect:t}}var en={__proto__:null,create:b,disableImageDrag:ne,disableTextSelection:ee,enableImageDrag:se,enableTextSelection:ie,get:oi,getPosition:et,getScale:ae,getSizedParentNode:ai,preventOutline:re,restoreOutline:Et,setPosition:M,setTransform:tt,toBack:vt,toFront:yt};let it=new Map,he=!1;function hi(){he||(he=!0,document.addEventListener("pointerdown",li,{capture:!0}),document.addEventListener("pointermove",di,{capture:!0}),document.addEventListener("pointerup",At,{capture:!0}),document.addEventListener("pointercancel",At,{capture:!0}),it=new Map)}function nn(){document.removeEventListener("pointerdown",li,{capture:!0}),document.removeEventListener("pointermove",di,{capture:!0}),document.removeEventListener("pointerup",At,{capture:!0}),document.removeEventListener("pointercancel",At,{capture:!0}),he=!1}function li(n){it.set(n.pointerId,n)}function di(n){it.has(n.pointerId)&&it.set(n.pointerId,n)}function At(n){it.delete(n.pointerId)}function dt(){return[...it.values()]}function sn(){it.clear()}var on={__proto__:null,cleanupPointers:sn,disablePointerDetection:nn,enablePointerDetection:hi,getPointers:dt};function g(n,t,e,i){if(t&&typeof t=="object")for(const[s,o]of Object.entries(t))de(n,s,o,e);else for(const s of F(t))de(n,s,e,i);return this}const $="_leaflet_events";function P(n,t,e,i){if(arguments.length===1)ci(n),delete n[$];else if(t&&typeof t=="object")for(const[s,o]of Object.entries(t))ce(n,s,o,e);else if(t=F(t),arguments.length===2)ci(n,s=>t.includes(s));else for(const s of t)ce(n,s,e,i);return this}function ci(n,t){for(const e of Object.keys(n[$]??{})){const i=e.split(/\d/)[0];(!t||t(i))&&ce(n,i,null,null,e)}}const le={pointerenter:"pointerover",pointerleave:"pointerout",wheel:typeof window>"u"?!1:!("onwheel"in window)&&"mousewheel"};function de(n,t,e,i){const s=t+x(e)+(i?`_${x(i)}`:"");if(n[$]&&n[$][s])return this;let o=function(a){return e.call(i||n,a||window.event)};const r=o;z.touch&&t==="dblclick"?o=Qi(n,o):"addEventListener"in n?t==="wheel"||t==="mousewheel"?n.addEventListener(le[t]||t,o,{passive:!1}):t==="pointerenter"||t==="pointerleave"?(o=function(a){a??=window.event,_e(n,a)&&r(a)},n.addEventListener(le[t],o,!1)):n.addEventListener(t,r,!1):n.attachEvent(`on${t}`,o),n[$]??={},n[$][s]=o}function ce(n,t,e,i,s){s??=t+x(e)+(i?`_${x(i)}`:"");const o=n[$]&&n[$][s];if(!o)return this;z.touch&&t==="dblclick"?tn(n,o):"removeEventListener"in n?n.removeEventListener(le[t]||t,o,!1):n.detachEvent(`on${t}`,o),n[$][s]=null}function K(n){return n.stopPropagation?n.stopPropagation():n.originalEvent?n.originalEvent._stopped=!0:n.cancelBubble=!0,this}function ue(n){return de(n,"wheel",K),this}function xt(n){return g(n,"pointerdown dblclick contextmenu",K),n._leaflet_disable_click=!0,this}function S(n){return n.preventDefault?n.preventDefault():n.returnValue=!1,this}function nt(n){return S(n),K(n),this}function ui(n){return n.composedPath()}function _i(n,t){if(!t)return new u(n.clientX,n.clientY);const e=ae(t),i=e.boundingClientRect;return new u((n.clientX-i.left)/e.x-t.clientLeft,(n.clientY-i.top)/e.y-t.clientTop)}function pi(){const n=window.devicePixelRatio;return z.linux&&z.chrome?n:z.mac?n*3:n>0?2*n:1}function fi(n){return n.deltaY&&n.deltaMode===0?-n.deltaY/pi():n.deltaY&&n.deltaMode===1?-n.deltaY*20:n.deltaY&&n.deltaMode===2?-n.deltaY*60:(n.deltaX||n.deltaZ,0)}function _e(n,t){let e=t.relatedTarget;if(!e)return!0;try{for(;e&&e!==n;)e=e.parentNode}catch{return!1}return e!==n}var pe={__proto__:null,PointerEvents:on,disableClickPropagation:xt,disableScrollPropagation:ue,getPointerPosition:_i,getPropagationPath:ui,getWheelDelta:fi,getWheelPxFactor:pi,isExternalTarget:_e,off:P,on:g,preventDefault:S,stop:nt,stopPropagation:K};class mi extends mt{run(t,e,i,s){this.stop(),this._el=t,this._inProgress=!0,this._duration=i??.25,this._easeOutPower=1/Math.max(s??.5,.2),this._startPos=et(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()}stop(){this._inProgress&&(this._step(!0),this._complete())}_animate(){this._animId=requestAnimationFrame(this._animate.bind(this)),this._step()}_step(t){const e=+new Date-this._startTime,i=this._duration*1e3;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())}_runFrame(t,e){const i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),M(this._el,i),this.fire("step")}_complete(){cancelAnimationFrame(this._animId),this._inProgress=!1,this.fire("end")}_easeOut(t){return 1-(1-t)**this._easeOutPower}}let y=(J=class extends mt{initialize(t,e){e=L(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.zoom!==void 0&&(this._zoom=this._limitZoom(e.zoom)),e.center&&e.zoom!==void 0&&this.setView(new p(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=this.options.zoomAnimation,this._zoomAnimated&&this._createAnimProxy(),this._addLayers(this.options.layers)}setView(t,e,i){return e=e===void 0?this._zoom:this._limitZoom(e),t=this._limitCenter(new p(t),e,this.options.maxBounds),i??={},this._stop(),this._loaded&&!i.reset&&i!==!0&&(i.animate!==void 0&&(i.zoom={animate:i.animate,...i.zoom},i.pan={animate:i.animate,duration:i.duration,...i.pan}),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,i.pan?.noMoveStart),this)}setZoom(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)}zoomIn(t,e){return t??=this.options.zoomDelta,this.setZoom(this._zoom+t,e)}zoomOut(t,e){return t??=this.options.zoomDelta,this.setZoom(this._zoom-t,e)}setZoomAround(t,e,i){const s=this.getZoomScale(e),o=this.getSize().divideBy(2),r=t instanceof u?t:this.latLngToContainerPoint(t),a=r.subtract(o).multiplyBy(1-1/s),h=this.containerPointToLatLng(o.add(a));return this.setView(h,e,{zoom:i})}_getBoundsCenterZoom(t,e){e??={},t=t.getBounds?t.getBounds():new w(t);const i=new u(e.paddingTopLeft||e.padding||[0,0]),s=new u(e.paddingBottomRight||e.padding||[0,0]);let o=this.getBoundsZoom(t,!1,i.add(s));if(o=typeof e.maxZoom=="number"?Math.min(e.maxZoom,o):o,o===1/0)return{center:t.getCenter(),zoom:o};const r=s.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),o),h=this.project(t.getNorthEast(),o);return{center:this.unproject(a.add(h).divideBy(2).add(r),o),zoom:o}}fitBounds(t,e){if(t=new w(t),!t.isValid())throw new Error("Bounds are not valid.");const i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)}fitWorld(t){return this.fitBounds([[-90,-180],[90,180]],t)}panTo(t,e){return this.setView(t,this._zoom,{pan:e})}panBy(t,e){if(t=new u(t).round(),e??={},!t.x&&!t.y)return this.fire("moveend");if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new mi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){this._mapPane.classList.add("leaflet-pan-anim");const i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this}flyTo(t,e,i){if(i??={},i.animate===!1)return this.setView(t,e,i);this._stop();const s=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),a=this._zoom;t=new p(t),e=e===void 0?a:this._limitZoom(e);const h=Math.max(r.x,r.y),l=h*this.getZoomScale(a,e),d=o.distanceTo(s)||1,c=1.42,f=c*c;function m(T){const Yt=T?-1:1,Dn=T?l:h,Rn=l*l-h*h+Yt*f*f*d*d,Nn=2*Dn*f*d,Je=Rn/Nn,Fi=Math.sqrt(Je*Je+1)-Je;return Fi<1e-9?-18:Math.log(Fi)}function C(T){return(Math.exp(T)-Math.exp(-T))/2}function k(T){return(Math.exp(T)+Math.exp(-T))/2}function lt(T){return C(T)/k(T)}const q=m(0);function Zn(T){return h*(k(q)/k(q+c*T))}function En(T){return h*(k(q)*lt(q+c*T)-C(q))/f}function An(T){return 1-(1-T)**1.5}const Bn=Date.now(),Ri=(m(1)-q)/c,In=i.duration?1e3*i.duration:1e3*Ri*.8,Ni=()=>{const T=(Date.now()-Bn)/In,Yt=An(T)*Ri;T<=1?(this._flyToFrame=requestAnimationFrame(Ni),this._move(this.unproject(s.add(o.subtract(s).multiplyBy(En(Yt)/d)),a),this.getScaleZoom(h/Zn(Yt),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)};return this._moveStart(!0,i.noMoveStart),Ni(),this}flyToBounds(t,e){const i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)}setMaxBounds(t){return t=new w(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)}setMinZoom(t){const e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this}setMaxZoom(t){const e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this}panInsideBounds(t,e){this._enforcingBounds=!0;const i=this.getCenter(),s=this._limitCenter(i,this._zoom,new w(t));return i.equals(s)||this.panTo(s,e),this._enforcingBounds=!1,this}panInside(t,e){e??={};const i=new u(e.paddingTopLeft||e.padding||[0,0]),s=new u(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),r=this.project(t),a=this.getPixelBounds(),h=new v([a.min.add(i),a.max.subtract(s)]),l=h.getSize();if(!h.contains(r)){this._enforcingBounds=!0;const d=r.subtract(h.getCenter()),c=h.extend(r).getSize().subtract(l);o.x+=d.x<0?-c.x:c.x,o.y+=d.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this}invalidateSize(t){if(!this._loaded)return this;t={animate:!1,pan:!0,...t===!0?{animate:!0}:t};const e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;const i=this.getSize(),s=e.divideBy(2).round(),o=i.divideBy(2).round(),r=s.subtract(o);return!r.x&&!r.y?this:(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(this.fire.bind(this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))}stop(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}locate(t){if(t=this._locateOptions={timeout:1e4,watch:!1,...t},!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;const e=this._handleGeolocationResponse.bind(this),i=this._handleGeolocationError.bind(this);return t.watch?(this._locationWatchId!==void 0&&navigator.geolocation.clearWatch(this._locationWatchId),this._locationWatchId=navigator.geolocation.watchPosition(e,i,t)):navigator.geolocation.getCurrentPosition(e,i,t),this}stopLocate(){return navigator.geolocation?.clearWatch?.(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this}_handleGeolocationError(t){if(!this._container._leaflet_id)return;const e=t.code,i=t.message||(e===1?"permission denied":e===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:`Geolocation error: ${i}.`})}_handleGeolocationResponse(t){if(!this._container._leaflet_id)return;const e=t.coords.latitude,i=t.coords.longitude,s=new p(e,i),o=s.toBounds(t.coords.accuracy*2),r=this._locateOptions;if(r.setView){const h=this.getBoundsZoom(o);this.setView(s,r.maxZoom?Math.min(h,r.maxZoom):h)}const a={latlng:s,bounds:o,timestamp:t.timestamp};for(const h in t.coords)typeof t.coords[h]=="number"&&(a[h]=t.coords[h]);this.fire("locationfound",a)}addHandler(t,e){if(!e)return this;const i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this}remove(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");delete this._container._leaflet_id,delete this._containerId,this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),this._mapPane.remove(),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(cancelAnimationFrame(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),clearTimeout(this._transitionEndTimer),clearTimeout(this._sizeTimer),this._loaded&&this.fire("unload"),this._destroyAnimProxy();for(const t of Object.values(this._layers))t.remove();for(const t of Object.values(this._panes))t.remove();return this._layers={},this._panes={},delete this._mapPane,delete this._renderer,this}createPane(t,e){const i=`leaflet-pane${t?` leaflet-${t.replace("Pane","")}-pane`:""}`,s=b("div",i,e||this._mapPane);return t&&(this._panes[t]=s),s}getCenter(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())}getZoom(){return this._zoom}getBounds(){const t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new w(e,i)}getMinZoom(){return this.options.minZoom??this._layersMinZoom??0}getMaxZoom(){return this.options.maxZoom??this._layersMaxZoom??1/0}getBoundsZoom(t,e,i){t=new w(t),i=new u(i??[0,0]);let s=this.getZoom()??0;const o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(i),d=new v(this.project(h,s),this.project(a,s)).getSize(),c=this.options.zoomSnap,f=l.x/d.x,m=l.y/d.y,C=e?Math.max(f,m):Math.min(f,m);return s=this.getScaleZoom(C,s),c&&(s=Math.round(s/(c/100))*(c/100),s=e?Math.ceil(s/c)*c:Math.floor(s/c)*c),Math.max(o,Math.min(r,s))}getSize(){return(!this._size||this._sizeChanged)&&(this._size=new u(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()}getPixelBounds(t,e){const i=this._getTopLeftPoint(t,e);return new v(i,i.add(this.getSize()))}getPixelOrigin(){return this._checkIfLoaded(),this._pixelOrigin}getPixelWorldBounds(t){return this.options.crs.getProjectedBounds(t??this.getZoom())}getPane(t){return typeof t=="string"?this._panes[t]:t}getPanes(){return this._panes}getContainer(){return this._container}getZoomScale(t,e){const i=this.options.crs;return e??=this._zoom,i.scale(t)/i.scale(e)}getScaleZoom(t,e){const i=this.options.crs;e??=this._zoom;const s=i.zoom(t*i.scale(e));return isNaN(s)?1/0:s}project(t,e){return e??=this._zoom,this.options.crs.latLngToPoint(new p(t),e)}unproject(t,e){return e??=this._zoom,this.options.crs.pointToLatLng(new u(t),e)}layerPointToLatLng(t){const e=new u(t).add(this.getPixelOrigin());return this.unproject(e)}latLngToLayerPoint(t){return this.project(new p(t))._round()._subtract(this.getPixelOrigin())}wrapLatLng(t){return this.options.crs.wrapLatLng(new p(t))}wrapLatLngBounds(t){return this.options.crs.wrapLatLngBounds(new w(t))}distance(t,e){return this.options.crs.distance(new p(t),new p(e))}containerPointToLayerPoint(t){return new u(t).subtract(this._getMapPanePos())}layerPointToContainerPoint(t){return new u(t).add(this._getMapPanePos())}containerPointToLatLng(t){const e=this.containerPointToLayerPoint(new u(t));return this.layerPointToLatLng(e)}latLngToContainerPoint(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(new p(t)))}pointerEventToContainerPoint(t){return _i(t,this._container)}pointerEventToLayerPoint(t){return this.containerPointToLayerPoint(this.pointerEventToContainerPoint(t))}pointerEventToLatLng(t){return this.layerPointToLatLng(this.pointerEventToLayerPoint(t))}_initContainer(t){const e=this._container=oi(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");g(e,"scroll",this._onScroll,this),this._containerId=x(e),hi()}_initLayout(){const t=this._container;this._fadeAnimated=this.options.fadeAnimation;const e=["leaflet-container","leaflet-touch"];z.retina&&e.push("leaflet-retina"),z.safari&&e.push("leaflet-safari"),this._fadeAnimated&&e.push("leaflet-fade-anim"),t.classList.add(...e);const{position:i}=getComputedStyle(t);i!=="absolute"&&i!=="relative"&&i!=="fixed"&&i!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()}_initPanes(){const t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),M(this._mapPane,new u(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t.markerPane.classList.add("leaflet-zoom-hide"),t.shadowPane.classList.add("leaflet-zoom-hide"))}_resetView(t,e,i){M(this._mapPane,new u(0,0));const s=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");const o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),s&&this.fire("load")}_moveStart(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this}_move(t,e,i,s){e===void 0&&(e=this._zoom);const o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),s?i?.pinch&&this.fire("zoom",i):((o||i?.pinch)&&this.fire("zoom",i),this.fire("move",i)),this}_moveEnd(t){return t&&this.fire("zoomend"),this.fire("moveend")}_stop(){return cancelAnimationFrame(this._flyToFrame),this._panAnim?.stop(),this}_rawPanBy(t){M(this._mapPane,this._getMapPanePos().subtract(t))}_getZoomSpan(){return this.getMaxZoom()-this.getMinZoom()}_panInsideMaxBounds(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)}_checkIfLoaded(){if(!this._loaded)throw new Error("Set map center and zoom first.")}_initEvents(t){this._targets={},this._targets[x(this._container)]=this,(t?P:g)(this._container,"click dblclick pointerdown pointerup pointerover pointerout pointermove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&(t?this._resizeObserver.disconnect():(this._resizeObserver||(this._resizeObserver=new ResizeObserver(this._onResize.bind(this))),this._resizeObserver.observe(this._container))),this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)}_onResize(){cancelAnimationFrame(this._resizeRequest),this._resizeRequest=requestAnimationFrame(()=>{this.invalidateSize({debounceMoveend:!0})})}_onScroll(){this._container.scrollTop=0,this._container.scrollLeft=0}_onMoveEnd(){const t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}_findEventTargets(t,e){let i=[],s,o=t.target||t.srcElement,r=!1;const a=e==="pointerout"||e==="pointerover";for(;o;){if(s=this._targets[x(o)],s&&(e==="click"||e==="preclick")&&this._draggableMoved(s)){r=!0;break}if(s&&s.listens(e,!0)&&(a&&!_e(o,t)||(i.push(s),a))||o===this._container)break;o=o.parentNode}return!i.length&&!r&&!a&&this.listens(e,!0)&&(i=[this]),i}_isClickDisabled(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click||!t.parentNode)return!0;t=t.parentNode}}_handleDOMEvent(t){const e=t.target??t.srcElement;if(!this._loaded||e._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(e))return;const i=t.type;i==="pointerdown"&&re(e),this._fireDOMEvent(t,i)}_fireDOMEvent(t,e,i){e==="click"&&this._fireDOMEvent(t,"preclick",i);let s=this._findEventTargets(t,e);if(i&&(s=i.filter(h=>h.listens(e,!0)).concat(s)),!s.length)return;e==="contextmenu"&&S(t);const o=s[0],r={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){const a=o.getLatLng&&(!o._radius||o._radius<=10);r.containerPoint=a?this.latLngToContainerPoint(o.getLatLng()):this.pointerEventToContainerPoint(t),r.layerPoint=this.containerPointToLayerPoint(r.containerPoint),r.latlng=a?o.getLatLng():this.layerPointToLatLng(r.layerPoint)}for(const a of s)if(a.fire(e,r,!0),r.originalEvent._stopped||a.options.bubblingPointerEvents===!1&&J._pointerEvents.includes(e))return}_draggableMoved(t){return t=t.dragging?.enabled()?t:this,t.dragging?.moved()||this.boxZoom?.moved()}_clearHandlers(){for(const t of this._handlers)t.disable()}whenReady(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this}_getMapPanePos(){return et(this._mapPane)}_moved(){const t=this._getMapPanePos();return t&&!t.equals([0,0])}_getTopLeftPoint(t,e){return(t&&e!==void 0?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())}_getNewPixelOrigin(t,e){const i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()}_latLngToNewLayerPoint(t,e,i){const s=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(s)}_latLngBoundsToNewLayerBounds(t,e,i){const s=this._getNewPixelOrigin(i,e);return new v([this.project(t.getSouthWest(),e)._subtract(s),this.project(t.getNorthWest(),e)._subtract(s),this.project(t.getSouthEast(),e)._subtract(s),this.project(t.getNorthEast(),e)._subtract(s)])}_getCenterLayerPoint(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))}_getCenterOffset(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())}_limitCenter(t,e,i){if(!i)return t;const s=this.project(t,e),o=this.getSize().divideBy(2),r=new v(s.subtract(o),s.add(o)),a=this._getBoundsOffset(r,i,e);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?t:this.unproject(s.add(a),e)}_limitOffset(t,e){if(!e)return t;const i=this.getPixelBounds(),s=new v(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(s,e))}_getBoundsOffset(t,e,i){const s=new v(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=s.min.subtract(t.min),r=s.max.subtract(t.max),a=this._rebound(o.x,-r.x),h=this._rebound(o.y,-r.y);return new u(a,h)}_rebound(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))}_limitZoom(t){const e=this.getMinZoom(),i=this.getMaxZoom(),s=this.options.zoomSnap;return s&&(t=Math.round(t/s)*s),Math.max(e,Math.min(i,t))}_onPanTransitionStep(){this.fire("move")}_onPanTransitionEnd(){this._mapPane.classList.remove("leaflet-pan-anim"),this.fire("moveend")}_tryAnimatedPan(t,e){const i=this._getCenterOffset(t)._trunc();return e?.animate!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)}_createAnimProxy(){this._proxy=b("div","leaflet-proxy leaflet-zoom-animated"),this._panes.mapPane.appendChild(this._proxy),this.on("zoomanim",this._animateProxyZoom,this),this.on("load moveend",this._animMoveEnd,this),g(this._proxy,"transitionend",this._catchTransitionEnd,this)}_animateProxyZoom(t){const e=this._proxy.style.transform;tt(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style.transform&&this._animatingZoom&&this._onZoomTransitionEnd()}_animMoveEnd(){const t=this.getCenter(),e=this.getZoom();tt(this._proxy,this.project(t,e),this.getZoomScale(e,1))}_destroyAnimProxy(){this._proxy&&(P(this._proxy,"transitionend",this._catchTransitionEnd,this),this._proxy.remove(),this.off("zoomanim",this._animateProxyZoom,this),this.off("load moveend",this._animMoveEnd,this),delete this._proxy)}_catchTransitionEnd(t){this._animatingZoom&&t.propertyName.includes("transform")&&this._onZoomTransitionEnd()}_nothingToAnimate(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length}_tryAnimatedZoom(t,e,i){if(this._animatingZoom)return!0;if(i??={},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;const s=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/s);return i.animate!==!0&&!this.getSize().contains(o)?!1:(requestAnimationFrame(()=>{this._moveStart(!0,i.noMoveStart??!1)._animateZoom(t,e,!0)}),!0)}_animateZoom(t,e,i,s){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,this._mapPane.classList.add("leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._transitionEndTimer=setTimeout(this._onZoomTransitionEnd.bind(this),250))}_onZoomTransitionEnd(){this._animatingZoom&&(this._mapPane?.classList.remove("leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}},J.setDefaultOptions({crs:Jt,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0}),Hi(J,"_pointerEvents",["click","dblclick","pointerover","pointerout","contextmenu"]),J);const rn=y,Se=class Se extends ft{initialize(t){L(this,t)}getPosition(){return this.options.position}setPosition(t){const e=this._map;return e?.removeControl(this),this.options.position=t,e?.addControl(this),this}getContainer(){return this._container}addTo(t){this.remove(),this._map=t;const e=this._container=this.onAdd(t),i=this.getPosition(),s=t._controlCorners[i];return e.classList.add("leaflet-control"),i.includes("bottom")?s.insertBefore(e,s.firstChild):s.appendChild(e),this._map.on("unload",this.remove,this),this}remove(){return this._map?(this._container.remove(),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this}_refocusOnMap(t){this._map&&t&&!(t.screenX===0&&t.screenY===0)&&this._map.getContainer().focus()}};Se.setDefaultOptions({position:"topright"});let E=Se;y.include({addControl(n){return n.addTo(this),this},removeControl(n){return n.remove(),this},_initControlPos(){const n=this._controlCorners={},t="leaflet-",e=this._controlContainer=b("div",`${t}control-container`,this._container);function i(s,o){const r=`${t+s} ${t}${o}`;n[s+o]=b("div",r,e)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos(){for(const n of Object.values(this._controlCorners))n.remove();this._controlContainer.remove(),delete this._controlCorners,delete this._controlContainer}});const Oe=class Oe extends E{initialize(t,e,i){L(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(const[s,o]of Object.entries(t??{}))this._addLayer(o,s);for(const[s,o]of Object.entries(e??{}))this._addLayer(o,s,!0)}onAdd(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(const e of this._layers)e.layer.on("add remove",this._onLayerChange,this);return this.options.collapsed||t.on("resize",this._expandIfNotCollapsed,this),this._container}addTo(t){return E.prototype.addTo.call(this,t),this._expandIfNotCollapsed()}onRemove(){this._map.off("zoomend",this._checkDisabledLayers,this);for(const t of this._layers)t.layer.off("add remove",this._onLayerChange,this);this._map.off("resize",this._expandIfNotCollapsed,this)}addBaseLayer(t,e){return this._addLayer(t,e),this._map?this._update():this}addOverlay(t,e){return this._addLayer(t,e,!0),this._map?this._update():this}removeLayer(t){t.off("add remove",this._onLayerChange,this);const e=this._getLayer(x(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this}expand(){clearTimeout(this._collapseDelayTimeout),this._container.classList.add("leaflet-control-layers-expanded"),this._section.style.height=null;const t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(this._section.classList.add("leaflet-control-layers-scrollbar"),this._section.style.height=`${t}px`):this._section.classList.remove("leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this}collapse(t){if(!t||!((t.type==="pointerleave"||t.type==="pointerout")&&t.pointerType==="touch")){if(this.options.collapseDelay>0)return this._collapseDelayTimeout=setTimeout(()=>{this._container.classList.remove("leaflet-control-layers-expanded")},this.options.collapseDelay),this;this._container.classList.remove("leaflet-control-layers-expanded")}return this}_initLayout(){const t="leaflet-control-layers",e=this._container=b("div",t),i=this.options.collapsed;xt(e),ue(e);const s=this._section=b("fieldset",`${t}-list`);i&&(this._map.on("click",this.collapse,this),g(e,{pointerenter:this._expandSafely,pointerleave:this.collapse},this));const o=this._layersLink=b("a",`${t}-toggle`,e);o.href="#",o.title="Layers",o.setAttribute("role","button"),g(o,{keydown(r){r.code==="Enter"&&this._expandSafely()},click(r){S(r),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=b("div",`${t}-base`,s),this._separator=b("div",`${t}-separator`,s),this._overlaysList=b("div",`${t}-overlays`,s),e.appendChild(s)}_getLayer(t){for(const e of this._layers)if(e&&x(e.layer)===t)return e}_addLayer(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort((s,o)=>this.options.sortFunction(s.layer,o.layer,s.name,o.name)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()}_update(){if(!this._container)return this;this._baseLayersList.replaceChildren(),this._overlaysList.replaceChildren(),this._layerControlInputs=[];let t,e,i=0;for(const s of this._layers)this._addItem(s),e||=s.overlay,t||=!s.overlay,i+=s.overlay?0:1;return this.options.hideSingleBase&&(t=t&&i>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this}_onLayerChange(t){this._handlingClick||this._update();const e=this._getLayer(x(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)}_addItem(t){const e=document.createElement("label"),i=this._map.hasLayer(t.layer),s=document.createElement("input");s.type=t.overlay?"checkbox":"radio",s.className="leaflet-control-layers-selector",s.defaultChecked=i,t.overlay||(s.name=`leaflet-base-layers_${x(this)}`),this._layerControlInputs.push(s),s.layerId=x(t.layer),g(s,"click",this._onInputClick,this);const o=document.createElement("span");o.innerHTML=` ${t.name}`;const r=document.createElement("span");return e.appendChild(r),r.appendChild(s),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e}_onInputClick(t){if(this._preventClick)return;const e=this._layerControlInputs,i=[],s=[];this._handlingClick=!0;for(const o of e){const r=this._getLayer(o.layerId).layer;o.checked?i.push(r):o.checked||s.push(r)}for(const o of s)this._map.hasLayer(o)&&this._map.removeLayer(o);for(const o of i)this._map.hasLayer(o)||this._map.addLayer(o);this._handlingClick=!1,this._refocusOnMap(t)}_checkDisabledLayers(){const t=this._layerControlInputs,e=this._map.getZoom();for(const i of t){const s=this._getLayer(i.layerId).layer;i.disabled=s.options.minZoom!==void 0&&e<s.options.minZoom||s.options.maxZoom!==void 0&&e>s.options.maxZoom}}_expandIfNotCollapsed(){return this._map&&!this.options.collapsed&&this.expand(),this}_expandSafely(){const t=this._section;this._preventClick=!0,g(t,"click",S),this.expand(),setTimeout(()=>{P(t,"click",S),this._preventClick=!1})}};Oe.setDefaultOptions({collapsed:!0,collapseDelay:0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction(t,e,i,s){return i<s?-1:s<i?1:0}});let fe=Oe;const Ze=class Ze extends E{onAdd(t){const e="leaflet-control-zoom",i=b("div",`${e} leaflet-bar`),s=this.options;return this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,`${e}-in`,i,this._zoomIn),this._zoomOutButton=this._createButton(s.zoomOutText,s.zoomOutTitle,`${e}-out`,i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i}onRemove(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)}disable(){return this._disabled=!0,this._updateDisabled(),this}enable(){return this._disabled=!1,this._updateDisabled(),this}_zoomIn(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))}_zoomOut(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))}_createButton(t,e,i,s,o){const r=b("a",i,s);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),xt(r),g(r,"click",nt),g(r,"click",o,this),g(r,"click",this._refocusOnMap,this),r}_updateDisabled(){const t=this._map,e="leaflet-disabled";this._zoomInButton.classList.remove(e),this._zoomOutButton.classList.remove(e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(this._zoomOutButton.classList.add(e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(this._zoomInButton.classList.add(e),this._zoomInButton.setAttribute("aria-disabled","true"))}};Ze.setDefaultOptions({position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"});let Bt=Ze;y.mergeOptions({zoomControl:!0}),y.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Bt,this.addControl(this.zoomControl))});const Ee=class Ee extends E{onAdd(t){const e="leaflet-control-scale",i=b("div",e),s=this.options;return this._addScales(s,`${e}-line`,i),t.on(s.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i}onRemove(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)}_addScales(t,e,i){t.metric&&(this._mScale=b("div",e,i)),t.imperial&&(this._iScale=b("div",e,i))}_update(){const t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)}_updateScales(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)}_updateMetric(t){const e=this._getRoundNum(t),i=e<1e3?`${e} m`:`${e/1e3} km`;this._updateScale(this._mScale,i,e/t)}_updateImperial(t){const e=t*3.2808399;let i,s,o;e>5280?(i=e/5280,s=this._getRoundNum(i),this._updateScale(this._iScale,`${s} mi`,s/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,`${o} ft`,o/e))}_updateScale(t,e,i){t.style.width=`${Math.round(this.options.maxWidth*i)}px`,t.innerHTML=e}_getRoundNum(t){const e=10**(`${Math.floor(t)}`.length-1);let i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}};Ee.setDefaultOptions({position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1});let me=Ee;const an='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',Ae=class Ae extends E{initialize(t){L(this,t),this._attributions={}}onAdd(t){t.attributionControl=this,this._container=b("div","leaflet-control-attribution"),xt(this._container);for(const e of Object.values(t._layers))e.getAttribution&&this.addAttribution(e.getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container}onRemove(t){t.off("layeradd",this._addAttribution,this)}_addAttribution(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",()=>this.removeAttribution(t.layer.getAttribution())))}setPrefix(t){return this.options.prefix=t,this._update(),this}addAttribution(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this}removeAttribution(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this}_update(){if(!this._map)return;const t=Object.keys(this._attributions).filter(i=>this._attributions[i]),e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}};Ae.setDefaultOptions({position:"bottomright",prefix:`<a target="_blank" href="https://leafletjs.com" title="A JavaScript library for interactive maps">${an}Leaflet</a>`});let It=Ae;y.mergeOptions({attributionControl:!0}),y.addInitHook(function(){this.options.attributionControl&&new It().addTo(this)}),E.Layers=fe,E.Zoom=Bt,E.Scale=me,E.Attribution=It;class H extends ft{initialize(t){this._map=t}enable(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)}disable(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this}enabled(){return!!this._enabled}}H.addTo=function(n,t){return n.addHandler(t,this),this};const Q=class Q extends mt{initialize(t,e,i,s){L(this,s),this._element=t,this._dragStartTarget=e??t,this._preventOutline=i}enable(){this._enabled||(g(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!0)}disable(){this._enabled&&(Q._dragging===this&&this.finishDrag(!0),P(this._dragStartTarget,"pointerdown",this._onDown,this),this._enabled=!1,this._moved=!1)}_onDown(t){if(this._moved=!1,this._element.classList.contains("leaflet-zoom-anim"))return;if(dt().length!==1){Q._dragging===this&&this.finishDrag();return}if(Q._dragging||t.shiftKey||t.button!==0&&t.pointerType!=="touch"||(Q._dragging=this,this._preventOutline&&re(this._element),ne(),ee(),this._moving))return;this.fire("down");const e=ai(this._element);this._startPoint=new u(t.clientX,t.clientY),this._startPos=et(this._element),this._parentScale=ae(e),g(document,"pointermove",this._onMove,this),g(document,"pointerup pointercancel",this._onUp,this)}_onMove(t){if(dt().length>1){this._moved=!0;return}const e=new u(t.clientX,t.clientY)._subtract(this._startPoint);!e.x&&!e.y||Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,t.cancelable&&S(t),this._moved||(this.fire("dragstart"),this._moved=!0,document.body.classList.add("leaflet-dragging"),this._lastTarget=t.target??t.srcElement,this._lastTarget.classList.add("leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition())}_updatePosition(){const t={originalEvent:this._lastEvent};this.fire("predrag",t),M(this._element,this._newPos),this.fire("drag",t)}_onUp(){this.finishDrag()}finishDrag(t){document.body.classList.remove("leaflet-dragging"),this._lastTarget&&(this._lastTarget.classList.remove("leaflet-drag-target"),this._lastTarget=null),P(document,"pointermove",this._onMove,this),P(document,"pointerup pointercancel",this._onUp,this),se(),ie();const e=this._moved&&this._moving;this._moving=!1,Q._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}};Q.setDefaultOptions({clickTolerance:3});let wt=Q;function gi(n,t,e){let i,s,o,r,a,h,l,d,c;const f=[1,4,2,8];for(s=0,l=n.length;s<l;s++)n[s]._code=st(n[s],t);for(r=0;r<4;r++){for(d=f[r],i=[],s=0,l=n.length,o=l-1;s<l;o=s++)a=n[s],h=n[o],a._code&d?h._code&d||(c=Dt(h,a,d,t,e),c._code=st(c,t),i.push(c)):(h._code&d&&(c=Dt(h,a,d,t,e),c._code=st(c,t),i.push(c)),i.push(a));n=i}return n}function yi(n,t){let e,i,s,o,r,a,h,l,d;if(!n||n.length===0)throw new Error("latlngs not passed");B(n)||(console.warn("latlngs are not flat! Only the first ring will be used"),n=n[0]);let c=new p([0,0]);const f=new w(n);f.getNorthWest().distanceTo(f.getSouthWest())*f.getNorthEast().distanceTo(f.getNorthWest())<1700&&(c=ge(n));const C=n.length,k=[];for(e=0;e<C;e++){const q=new p(n[e]);k.push(t.project(new p([q.lat-c.lat,q.lng-c.lng])))}for(a=h=l=0,e=0,i=C-1;e<C;i=e++)s=k[e],o=k[i],r=s.y*o.x-o.y*s.x,h+=(s.x+o.x)*r,l+=(s.y+o.y)*r,a+=r*3;a===0?d=k[0]:d=[h/a,l/a];const lt=t.unproject(new u(d));return new p([lt.lat+c.lat,lt.lng+c.lng])}function ge(n){let t=0,e=0,i=0;for(const s of n){const o=new p(s);t+=o.lat,e+=o.lng,i++}return new p([t/i,e/i])}var hn={__proto__:null,centroid:ge,clipPolygon:gi,polygonCenter:yi};function vi(n,t){if(!t||!n.length)return n.slice();const e=t*t;return n=cn(n,e),n=dn(n,e),n}function xi(n,t,e){return Math.sqrt(bt(n,t,e,!0))}function ln(n,t,e){return bt(n,t,e)}function dn(n,t){const e=n.length,i=new Uint8Array(e);i[0]=i[e-1]=1,ye(n,i,t,0,e-1);let s;const o=[];for(s=0;s<e;s++)i[s]&&o.push(n[s]);return o}function ye(n,t,e,i,s){let o=0,r,a,h;for(a=i+1;a<=s-1;a++)h=bt(n[a],n[i],n[s],!0),h>o&&(r=a,o=h);o>e&&(t[r]=1,ye(n,t,e,i,r),ye(n,t,e,r,s))}function cn(n,t){const e=[n[0]];let i=0;for(let s=1;s<n.length;s++)un(n[s],n[i])>t&&(e.push(n[s]),i=s);return i<n.length-1&&e.push(n[n.length-1]),e}let wi;function bi(n,t,e,i,s){let o=i?wi:st(n,e),r=st(t,e),a,h,l;for(wi=r;;){if(!(o|r))return[n,t];if(o&r)return!1;a=o||r,h=Dt(n,t,a,e,s),l=st(h,e),a===o?(n=h,o=l):(t=h,r=l)}}function Dt(n,t,e,i,s){const o=t.x-n.x,r=t.y-n.y,a=i.min,h=i.max;let l,d;return e&8?(l=n.x+o*(h.y-n.y)/r,d=h.y):e&4?(l=n.x+o*(a.y-n.y)/r,d=a.y):e&2?(l=h.x,d=n.y+r*(h.x-n.x)/o):e&1&&(l=a.x,d=n.y+r*(a.x-n.x)/o),new u(l,d,s)}function st(n,t){let e=0;return n.x<t.min.x?e|=1:n.x>t.max.x&&(e|=2),n.y<t.min.y?e|=4:n.y>t.max.y&&(e|=8),e}function un(n,t){const e=t.x-n.x,i=t.y-n.y;return e*e+i*i}function bt(n,t,e,i){let s=t.x,o=t.y,r=e.x-s,a=e.y-o,h;const l=r*r+a*a;return l>0&&(h=((n.x-s)*r+(n.y-o)*a)/l,h>1?(s=e.x,o=e.y):h>0&&(s+=r*h,o+=a*h)),r=n.x-s,a=n.y-o,i?r*r+a*a:new u(s,o)}function B(n){return!Array.isArray(n[0])||typeof n[0][0]!="object"&&typeof n[0][0]<"u"}function Li(n,t){let e,i,s,o,r,a,h,l;if(!n||n.length===0)throw new Error("latlngs not passed");B(n)||(console.warn("latlngs are not flat! Only the first ring will be used"),n=n[0]);let d=new p([0,0]);const c=new w(n);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(d=ge(n));const m=n.length,C=[];for(e=0;e<m;e++){const lt=new p(n[e]);C.push(t.project(new p([lt.lat-d.lat,lt.lng-d.lng])))}for(e=0,i=0;e<m-1;e++)i+=C[e].distanceTo(C[e+1])/2;if(i===0)l=C[0];else for(e=0,o=0;e<m-1;e++)if(r=C[e],a=C[e+1],s=r.distanceTo(a),o+=s,o>i){h=(o-i)/s,l=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}const k=t.unproject(new u(l));return new p([k.lat+d.lat,k.lng+d.lng])}var _n={__proto__:null,_getBitCode:st,_getEdgeIntersection:Dt,_sqClosestPointOnSegment:bt,clipSegment:bi,closestPointOnSegment:ln,isFlat:B,pointToSegmentDistance:xi,polylineCenter:Li,simplify:vi};const ve={project(n){return n=new p(n),new u(n.lng,n.lat)},unproject(n){return n=new u(n),new p(n.y,n.x)},bounds:new v([-180,-90],[180,90])},xe={R:6378137,R_MINOR:6356752314245179e-9,bounds:new v([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project(n){n=new p(n);const t=Math.PI/180,e=this.R,i=this.R_MINOR/e,s=Math.sqrt(1-i*i);let o=n.lat*t;const r=s*Math.sin(o),a=Math.tan(Math.PI/4-o/2)/((1-r)/(1+r))**(s/2);return o=-e*Math.log(Math.max(a,1e-10)),new u(n.lng*t*e,o)},unproject(n){n=new u(n);const t=180/Math.PI,e=this.R,i=this.R_MINOR/e,s=Math.sqrt(1-i*i),o=Math.exp(-n.y/e);let r=Math.PI/2-2*Math.atan(o);for(let a=0,h=.1,l;a<15&&Math.abs(h)>1e-7;a++)l=s*Math.sin(r),l=((1-l)/(1+l))**(s/2),h=Math.PI/2-2*Math.atan(o*l)-r,r+=h;return new p(r*t,n.x*t/e)}};var pn={__proto__:null,LonLat:ve,Mercator:xe,SphericalMercator:Xt};class fn extends V{static code="EPSG:3395";static projection=xe;static transformation=(()=>{const t=.5/(Math.PI*xe.R);return new gt(t,.5,-t,.5)})()}class Pi extends V{static code="EPSG:4326";static projection=ve;static transformation=new gt(.005555555555555556,1,-.005555555555555556,.5)}class mn extends W{static projection=ve;static transformation=new gt(1,0,-1,0);static scale(t){return 2**t}static zoom(t){return Math.log(t)/Math.LN2}static distance(t,e){const i=e.lng-t.lng,s=e.lat-t.lat;return Math.sqrt(i*i+s*s)}static infinite=!0}W.Earth=V,W.EPSG3395=fn,W.EPSG3857=Jt,W.EPSG900913=Wi,W.EPSG4326=Pi,W.Simple=mn;const Be=class Be extends mt{addTo(t){return t.addLayer(this),this}remove(){return this.removeFrom(this._map||this._mapToAdd)}removeFrom(t){return t?.removeLayer(this),this}getPane(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)}addInteractiveTarget(t){return this._map._targets[x(t)]=this,this}removeInteractiveTarget(t){return delete this._map._targets[x(t)],this}getAttribution(){return this.options.attribution}_layerAdd(t){const e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){const i=this.getEvents();e.on(i,this),this.once("remove",()=>e.off(i,this))}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}};Be.setDefaultOptions({pane:"overlayPane",attribution:null,bubblingPointerEvents:!0});let O=Be;y.include({addLayer(n){if(!n._layerAdd)throw new Error("The provided object is not a Layer.");const t=x(n);return this._layers[t]?this:(this._layers[t]=n,n._mapToAdd=this,n.beforeAdd&&n.beforeAdd(this),this.whenReady(n._layerAdd,n),this)},removeLayer(n){const t=x(n);return this._layers[t]?(this._loaded&&n.onRemove(this),delete this._layers[t],this._loaded&&(this.fire("layerremove",{layer:n}),n.fire("remove")),n._map=n._mapToAdd=null,this):this},hasLayer(n){return x(n)in this._layers},eachLayer(n,t){for(const e of Object.values(this._layers))n.call(t,e);return this},_addLayers(n){n=n?Array.isArray(n)?n:[n]:[];for(const t of n)this.addLayer(t)},_addZoomLimit(n){(!isNaN(n.options.maxZoom)||!isNaN(n.options.minZoom))&&(this._zoomBoundLayers[x(n)]=n,this._updateZoomLevels())},_removeZoomLimit(n){const t=x(n);this._zoomBoundLayers[t]&&(delete this._zoomBoundLayers[t],this._updateZoomLevels())},_updateZoomLevels(){let n=1/0,t=-1/0;const e=this._getZoomSpan();for(const i of Object.values(this._zoomBoundLayers)){const s=i.options;n=Math.min(n,s.minZoom??1/0),t=Math.max(t,s.maxZoom??-1/0)}this._layersMaxZoom=t===-1/0?void 0:t,this._layersMinZoom=n===1/0?void 0:n,e!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});class Lt extends O{initialize(t,e){L(this,e),this._layers={};for(const i of t??[])this.addLayer(i)}addLayer(t){const e=this.getLayerId(t);return this._layers[e]=t,this._map?.addLayer(t),this}removeLayer(t){const e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this}hasLayer(t){return(typeof t=="number"?t:this.getLayerId(t))in this._layers}clearLayers(){return this.eachLayer(this.removeLayer,this)}invoke(t,...e){for(const i of Object.values(this._layers))i[t]?.apply(i,e);return this}onAdd(t){this.eachLayer(t.addLayer,t)}onRemove(t){this.eachLayer(t.removeLayer,t)}eachLayer(t,e){for(const i of Object.values(this._layers))t.call(e,i);return this}getLayer(t){return this._layers[t]}getLayers(){const t=[];return this.eachLayer(t.push,t),t}setZIndex(t){return this.invoke("setZIndex",t)}getLayerId(t){return x(t)}}class Y extends Lt{addLayer(t){return this.hasLayer(t)?this:(t.addEventParent(this),Lt.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))}removeLayer(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Lt.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this}setStyle(t){return this.invoke("setStyle",t)}bringToFront(){return this.invoke("bringToFront")}bringToBack(){return this.invoke("bringToBack")}getBounds(){const t=new w;for(const e of Object.values(this._layers))t.extend(e.getBounds?e.getBounds():e.getLatLng());return t}}const Ie=class Ie extends ft{initialize(t){L(this,t)}createIcon(t){return this._createIcon("icon",t)}createShadow(t){return this._createIcon("shadow",t)}_createIcon(t,e){const i=this._getIconUrl(t);if(!i){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}const s=this._createImg(i,e&&e.tagName==="IMG"?e:null);return this._setIconStyles(s,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(s.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),s}_setIconStyles(t,e){const i=this.options;let s=i[`${e}Size`];typeof s=="number"&&(s=[s,s]);const o=u.validate(s)&&new u(s),r=e==="shadow"&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0),a=u.validate(r)&&new u(r);t.className=`leaflet-marker-${e} ${i.className||""}`,a&&(t.style.marginLeft=`${-a.x}px`,t.style.marginTop=`${-a.y}px`),o&&(t.style.width=`${o.x}px`,t.style.height=`${o.y}px`)}_createImg(t,e){return e??=document.createElement("img"),e.src=t,e}_getIconUrl(t){return z.retina&&this.options[`${t}RetinaUrl`]||this.options[`${t}Url`]}};Ie.setDefaultOptions({popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1});let ot=Ie;const _t=class _t extends ot{_getIconUrl(t){_t.imagePath||(_t.imagePath=this._detectIconPath());const e=ot.prototype._getIconUrl.call(this,t);return e?(this.options.imagePath||_t.imagePath)+e:null}_stripUrl(t){const e=function(i,s,o){const r=s.exec(i);return r&&r[o]};return t=e(t,/^url\((['"])?(.+)\1\)$/,2),t&&e(t,/^(.*)marker-icon\.png$/,1)}_detectIconPath(){const t=b("div","leaflet-default-icon-path",document.body),e=this._stripUrl(getComputedStyle(t).backgroundImage);if(document.body.removeChild(t),e)return e;const i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}};_t.setDefaultOptions({iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]});let Rt=_t;class Ci extends H{initialize(t){this._marker=t}addHooks(){const t=this._marker._icon;this._draggable||(this._draggable=new wt(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),t.classList.add("leaflet-marker-draggable")}removeHooks(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon?.classList.remove("leaflet-marker-draggable")}moved(){return this._draggable?._moved}_adjustPan(t){const e=this._marker,i=e._map,s=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=et(e._icon),a=i.getPixelBounds(),h=i.getPixelOrigin(),l=new v(a.min._subtract(h).add(o),a.max._subtract(h).subtract(o));if(!l.contains(r)){const d=new u((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(s);i.panBy(d,{animate:!1}),this._draggable._newPos._add(d),this._draggable._startPos._add(d),M(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,t))}}_onDragStart(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup?.(),this._marker.fire("movestart").fire("dragstart")}_onPreDrag(t){this._marker.options.autoPan&&(cancelAnimationFrame(this._panRequest),this._panRequest=requestAnimationFrame(this._adjustPan.bind(this,t)))}_onDrag(t){const e=this._marker,i=e._shadow,s=et(e._icon),o=e._map.layerPointToLatLng(s);i&&M(i,s),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)}_onDragEnd(t){cancelAnimationFrame(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}const De=class De extends O{initialize(t,e){L(this,e),this._latlng=new p(t)}onAdd(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()}onRemove(t){this.dragging?.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()}getEvents(){return{zoom:this.update,viewreset:this.update}}getLatLng(){return this._latlng}setLatLng(t){const e=this._latlng;return this._latlng=new p(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})}setZIndexOffset(t){return this.options.zIndexOffset=t,this.update()}getIcon(){return this.options.icon}setIcon(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this}getElement(){return this._icon}update(){if(this._icon&&this._map){const t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this}_initIcon(){const t=this.options,e=`leaflet-zoom-${this._zoomAnimated?"animated":"hide"}`,i=t.icon.createIcon(this._icon);let s=!1;i!==this._icon&&(this._icon&&this._removeIcon(),s=!0,t.title&&(i.title=t.title),i.tagName==="IMG"&&(i.alt=t.alt??"")),i.classList.add(e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({pointerover:this._bringToFront,pointerout:this._resetZIndex}),this.options.autoPanOnFocus&&g(i,"focus",this._panOnFocus,this);const o=t.icon.createShadow(this._shadow);let r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(o.classList.add(e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),s&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)}_removeIcon(){this.options.riseOnHover&&this.off({pointerover:this._bringToFront,pointerout:this._resetZIndex}),this.options.autoPanOnFocus&&P(this._icon,"focus",this._panOnFocus,this),this._icon.remove(),this.removeInteractiveTarget(this._icon),this._icon=null}_removeShadow(){this._shadow?.remove(),this._shadow=null}_setPos(t){this._icon&&M(this._icon,t),this._shadow&&M(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()}_updateZIndex(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)}_initInteraction(){if(this.options.interactive&&(this._icon.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._icon),Ci)){let t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ci(this),t&&this.dragging.enable()}}setOpacity(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this}_updateOpacity(){const t=this.options.opacity;this._icon&&(this._icon.style.opacity=t),this._shadow&&(this._shadow.style.opacity=t)}_bringToFront(){this._updateZIndex(this.options.riseOffset)}_resetZIndex(){this._updateZIndex(0)}_panOnFocus(){const t=this._map;if(!t)return;const e=this.options.icon.options,i=e.iconSize?new u(e.iconSize):new u(0,0),s=e.iconAnchor?new u(e.iconAnchor):new u(0,0);t.panInside(this._latlng,{paddingTopLeft:s,paddingBottomRight:i.subtract(s)})}_getPopupAnchor(){return this.options.icon.options.popupAnchor}_getTooltipAnchor(){return this.options.icon.options.tooltipAnchor}};De.setDefaultOptions({icon:new Rt,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingPointerEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10});let Pt=De;const Re=class Re extends O{beforeAdd(t){this._renderer=t.getRenderer(this)}onAdd(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)}onRemove(){this._renderer._removePath(this)}redraw(){return this._map&&this._renderer._updatePath(this),this}setStyle(t){return L(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.hasOwn(t,"weight")&&this._updateBounds()),this}bringToFront(){return this._renderer?._bringToFront(this),this}bringToBack(){return this._renderer?._bringToBack(this),this}getElement(){return this._path}_reset(){this._project(),this._update()}_clickTolerance(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}};Re.setDefaultOptions({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});let j=Re;const Ne=class Ne extends j{initialize(t,e){L(this,e),this._latlng=new p(t),this._radius=this.options.radius}setLatLng(t){const e=this._latlng;return this._latlng=new p(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})}getLatLng(){return this._latlng}setRadius(t){return this.options.radius=this._radius=t,this.redraw()}getRadius(){return this._radius}setStyle(t){const e=t?.radius??this._radius;return j.prototype.setStyle.call(this,t),this.setRadius(e),this}_project(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()}_updateBounds(){const t=this._radius,e=this._radiusY??t,i=this._clickTolerance(),s=[t+i,e+i];this._pxBounds=new v(this._point.subtract(s),this._point.add(s))}_update(){this._map&&this._updatePath()}_updatePath(){this._renderer._updateCircle(this)}_empty(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)}_containsPoint(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}};Ne.setDefaultOptions({fill:!0,radius:10});let Ct=Ne;class Ti extends Ct{initialize(t,e){if(L(this,e),this._latlng=new p(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius}setRadius(t){return this._mRadius=t,this.redraw()}getRadius(){return this._mRadius}getBounds(){const t=[this._radius,this._radiusY??this._radius];return new w(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))}setStyle=j.prototype.setStyle;_project(){const t=this._latlng.lng,e=this._latlng.lat,i=this._map,s=i.options.crs;if(s.distance===V.distance){const o=Math.PI/180,r=this._mRadius/V.R/o,a=i.project([e+r,t]),h=i.project([e-r,t]),l=a.add(h).divideBy(2),d=i.unproject(l).lat;let c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(d*o))/(Math.cos(e*o)*Math.cos(d*o)))/o;(isNaN(c)||c===0)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([d,t-c]).x,this._radiusY=l.y-a.y}else{const o=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=Math.abs(this._point.x-i.latLngToLayerPoint(o).x)}this._updateBounds()}}const Fe=class Fe extends j{initialize(t,e){L(this,e),this._setLatLngs(t)}getLatLngs(){return this._latlngs}setLatLngs(t){return this._setLatLngs(t),this.redraw()}isEmpty(){return!this._latlngs.length}closestLayerPoint(t){t=new u(t);let e=1/0,i=null,s,o;const r=bt;for(const a of this._parts)for(let h=1,l=a.length;h<l;h++){s=a[h-1],o=a[h];const d=r(t,s,o,!0);d<e&&(e=d,i=r(t,s,o))}return i&&(i.distance=Math.sqrt(e)),i}getCenter(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Li(this._defaultShape(),this._map.options.crs)}getBounds(){return this._bounds}addLatLng(t,e){return e??=this._defaultShape(),t=new p(t),e.push(t),this._bounds.extend(t),this.redraw()}_setLatLngs(t){this._bounds=new w,this._latlngs=this._convertLatLngs(t)}_defaultShape(){return B(this._latlngs)?this._latlngs:this._latlngs[0]}_convertLatLngs(t){const e=[],i=B(t);for(let s=0,o=t.length;s<o;s++)i?(e[s]=new p(t[s]),this._bounds.extend(e[s])):e[s]=this._convertLatLngs(t[s]);return e}_project(){const t=new v;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())}_updateBounds(){const t=this._clickTolerance(),e=new u(t,t);this._rawPxBounds&&(this._pxBounds=new v([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))}_projectLatlngs(t,e,i){if(t[0]instanceof p){const o=t.map(r=>this._map.latLngToLayerPoint(r));o.forEach(r=>i.extend(r)),e.push(o)}else t.forEach(o=>this._projectLatlngs(o,e,i))}_clipPoints(){const t=this._renderer._bounds;if(this._parts=[],!this._pxBounds||!this._pxBounds.intersects(t))return;if(this.options.noClip){this._parts=this._rings;return}const e=this._parts;let i,s,o,r,a,h,l;for(i=0,o=0,r=this._rings.length;i<r;i++)for(l=this._rings[i],s=0,a=l.length;s<a-1;s++)h=bi(l[s],l[s+1],t,s,!0),h&&(e[o]??=[],e[o].push(h[0]),(h[1]!==l[s+1]||s===a-2)&&(e[o].push(h[1]),o++))}_simplifyPoints(){const t=this._parts,e=this.options.smoothFactor;for(let i=0,s=t.length;i<s;i++)t[i]=vi(t[i],e)}_update(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())}_updatePath(){this._renderer._updatePoly(this)}_containsPoint(t,e){let i,s,o,r,a,h;const l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,r=this._parts.length;i<r;i++)for(h=this._parts[i],s=0,a=h.length,o=a-1;s<a;o=s++)if(!(!e&&s===0)&&xi(t,h[o],h[s])<=l)return!0;return!1}};Fe.setDefaultOptions({smoothFactor:1,noClip:!1});let U=Fe;const He=class He extends U{isEmpty(){return!this._latlngs.length||!this._latlngs[0].length}getCenter(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return yi(this._defaultShape(),this._map.options.crs)}_convertLatLngs(t){const e=U.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof p&&e[0].equals(e[i-1])&&e.pop(),e}_setLatLngs(t){U.prototype._setLatLngs.call(this,t),B(this._latlngs)&&(this._latlngs=[this._latlngs])}_defaultShape(){return B(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]}_clipPoints(){let t=this._renderer._bounds;const e=this.options.weight,i=new u(e,e);if(t=new v(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(const s of this._rings){const o=gi(s,t,!0);o.length&&this._parts.push(o)}}}_updatePath(){this._renderer._updatePoly(this,!0)}_containsPoint(t){let e=!1,i,s,o,r,a,h,l,d;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(r=0,l=this._parts.length;r<l;r++)for(i=this._parts[r],a=0,d=i.length,h=d-1;a<d;h=a++)s=i[a],o=i[h],s.y>t.y!=o.y>t.y&&t.x<(o.x-s.x)*(t.y-s.y)/(o.y-s.y)+s.x&&(e=!e);return e||U.prototype._containsPoint.call(this,t,!0)}};He.setDefaultOptions({fill:!0});let rt=He;class X extends Y{initialize(t,e){L(this,e),this._layers={},t&&this.addData(t)}addData(t){const e=Array.isArray(t)?t:t.features;if(e){for(const o of e)(o.geometries||o.geometry||o.features||o.coordinates)&&this.addData(o);return this}const i=this.options;if(i.filter&&!i.filter(t))return this;const s=Nt(t,i);return s?(s.feature=jt(t),s.defaultOptions=s.options,this.resetStyle(s),i.onEachFeature&&i.onEachFeature(t,s),this.addLayer(s)):this}resetStyle(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=Object.create(t.defaultOptions),this._setLayerStyle(t,this.options.style),this)}setStyle(t){return this.eachLayer(e=>this._setLayerStyle(e,t))}_setLayerStyle(t,e){t.setStyle&&(typeof e=="function"&&(e=e(t.feature)),t.setStyle(e))}}function Nt(n,t){const e=n.type==="Feature"?n.geometry:n,i=e?.coordinates,s=[],o=t?.pointToLayer,r=t?.coordsToLatLng??we;let a,h;if(!i&&!e)return null;switch(e.type){case"Point":return a=r(i),ki(o,n,a,t);case"MultiPoint":for(const l of i)a=r(l),s.push(ki(o,n,a,t));return new Y(s);case"LineString":case"MultiLineString":return h=Ft(i,e.type==="LineString"?0:1,r),new U(h,t);case"Polygon":case"MultiPolygon":return h=Ft(i,e.type==="Polygon"?1:2,r),new rt(h,t);case"GeometryCollection":for(const l of e.geometries){const d=Nt({geometry:l,type:"Feature",properties:n.properties},t);d&&s.push(d)}return new Y(s);case"FeatureCollection":for(const l of e.features){const d=Nt(l,t);d&&s.push(d)}return new Y(s);default:throw new Error("Invalid GeoJSON object.")}}function ki(n,t,e,i){return n?n(t,e):new Pt(e,i?.markersInheritOptions&&i)}function we(n){return new p(n[1],n[0],n[2])}function Ft(n,t,e){return n.map(i=>t?Ft(i,t-1,e):(e||we)(i))}function be(n,t){return n=new p(n),n.alt!==void 0?[N(n.lng,t),N(n.lat,t),N(n.alt,t)]:[N(n.lng,t),N(n.lat,t)]}function Ht(n,t,e,i){const s=n.map(o=>t?Ht(o,B(o)?0:t-1,e,i):be(o,i));return!t&&e&&s.length>0&&s.push(s[0].slice()),s}function ct(n,t){return n.feature?{...n.feature,geometry:t}:jt(t)}function jt(n){return n.type==="Feature"||n.type==="FeatureCollection"?n:{type:"Feature",properties:{},geometry:n}}const Le={toGeoJSON(n){return ct(this,{type:"Point",coordinates:be(this.getLatLng(),n)})}};Pt.include(Le),Ti.include(Le),Ct.include(Le),U.include({toGeoJSON(n){const t=!B(this._latlngs),e=Ht(this._latlngs,t?1:0,!1,n);return ct(this,{type:`${t?"Multi":""}LineString`,coordinates:e})}}),rt.include({toGeoJSON(n){const t=!B(this._latlngs),e=t&&!B(this._latlngs[0]);let i=Ht(this._latlngs,e?2:t?1:0,!0,n);return t||(i=[i]),ct(this,{type:`${e?"Multi":""}Polygon`,coordinates:i})}}),Lt.include({toMultiPoint(n){const t=[];return this.eachLayer(e=>{t.push(e.toGeoJSON(n).geometry.coordinates)}),ct(this,{type:"MultiPoint",coordinates:t})},toGeoJSON(n){const t=this.feature?.geometry?.type;if(t==="MultiPoint")return this.toMultiPoint(n);const e=t==="GeometryCollection",i=[];return this.eachLayer(s=>{if(s.toGeoJSON){const o=s.toGeoJSON(n);if(e)i.push(o.geometry);else{const r=jt(o);r.type==="FeatureCollection"?i.push.apply(i,r.features):i.push(r)}}}),e?ct(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});const je=class je extends O{initialize(t){L(this,t)}onAdd(){this._container||(this._initContainer(),this._container.classList.add("leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._resizeContainer(),this._onMoveEnd()}onRemove(){this._destroyContainer()}getEvents(){const t={viewreset:this._reset,zoom:this._onZoom,moveend:this._onMoveEnd,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),this.options.continuous&&(t.move=this._onMoveEnd),t}_onAnimZoom(t){this._updateTransform(t.center,t.zoom)}_onZoom(){this._updateTransform(this._map.getCenter(),this._map.getZoom())}_updateTransform(t,e){const i=this._map.getZoomScale(e,this._zoom),s=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=s.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));tt(this._container,r,i)}_onMoveEnd(t){const e=this.options.padding,i=this._map.getSize(),s=this._map.containerPointToLayerPoint(i.multiplyBy(-e)).round();this._bounds=new v(s,s.add(i.multiplyBy(1+e*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom(),this._updateTransform(this._center,this._zoom),this._onSettled(t),this._resizeContainer()}_reset(){this._onSettled(),this._updateTransform(this._center,this._zoom),this._onViewReset()}_initContainer(){this._container=b("div")}_destroyContainer(){P(this._container),this._container.remove(),delete this._container}_resizeContainer(){const t=this.options.padding,e=this._map.getSize().multiplyBy(1+t*2).round();return this._container.style.width=`${e.x}px`,this._container.style.height=`${e.y}px`,e}_onZoomEnd(){}_onViewReset(){}_onSettled(){}};je.setDefaultOptions({padding:.1,continuous:!1});let Gt=je;const Ge=class Ge extends O{initialize(t,e,i){this._url=t,this._bounds=new w(e),L(this,i)}onAdd(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(this._image.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()}onRemove(){this._image.remove(),this.options.interactive&&this.removeInteractiveTarget(this._image)}setOpacity(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this}setStyle(t){return t.opacity&&this.setOpacity(t.opacity),this}bringToFront(){return this._map&&yt(this._image),this}bringToBack(){return this._map&&vt(this._image),this}setUrl(t){return this._url=t,this._image&&(this._image.src=t),this}setBounds(t){return this._bounds=new w(t),this._map&&this._reset(),this}getEvents(){const t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}getBounds(){return this._bounds}getElement(){return this._image}_initImage(){const t=this._url.tagName==="IMG",e=this._image=t?this._url:b("img");if(e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(...F(this.options.className)),e.onselectstart=Z,e.onpointermove=Z,e.onload=this.fire.bind(this,"load"),e.onerror=this._overlayOnError.bind(this),(this.options.crossOrigin||this.options.crossOrigin==="")&&(e.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),e.decoding=this.options.decoding,this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt}_animateZoom(t){const e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;tt(this._image,i,e)}_reset(){const t=this._image,e=new v(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();M(t,e.min),t.style.width=`${i.x}px`,t.style.height=`${i.y}px`}_updateOpacity(){this._image.style.opacity=this.options.opacity}_updateZIndex(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)}_overlayOnError(){this.fire("error");const t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}getCenter(){return this._bounds.getCenter()}};Ge.setDefaultOptions({opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:"",decoding:"auto"});let Tt=Ge;const We=class We extends Tt{_initImage(){const t=this._url.tagName==="VIDEO",e=this._image=t?this._url:b("video");if(e.classList.add("leaflet-image-layer"),this._zoomAnimated&&e.classList.add("leaflet-zoom-animated"),this.options.className&&e.classList.add(...F(this.options.className)),g(e,"pointerdown",i=>{e.controls&&K(i)}),e.onloadeddata=this.fire.bind(this,"load"),t){const i=e.getElementsByTagName("source"),s=i.map(o=>o.src);this._url=i.length>0?s:[e.src];return}Array.isArray(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.hasOwn(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.controls=!!this.options.controls,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(const i of this._url){const s=b("source");s.src=i,e.appendChild(s)}}};We.setDefaultOptions({autoplay:!0,controls:!1,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0});let Pe=We;class gn extends Tt{_initImage(){const t=this._image=this._url;t.classList.add("leaflet-image-layer"),this._zoomAnimated&&t.classList.add("leaflet-zoom-animated"),this.options.className&&t.classList.add(...F(this.options.className)),t.onselectstart=Z,t.onpointermove=Z}}const $e=class $e extends O{initialize(t,e){t instanceof p||Array.isArray(t)?(this._latlng=new p(t),L(this,e)):(L(this,t),this._source=e),this.options.content&&(this._content=this.options.content)}openOn(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this}close(){return this._map?.removeLayer(this),this}toggle(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this}onAdd(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&(this._container.style.opacity=0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&(this._container.style.opacity=1),this.bringToFront(),this.options.interactive&&(this._container.classList.add("leaflet-interactive"),this.addInteractiveTarget(this._container))}onRemove(t){t._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(t){return this._latlng=new p(t),this._map&&(this._updatePosition(),this._adjustPan()),this}getContent(){return this._content}setContent(t){return this._content=t,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(){const t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}isOpen(){return!!this._map&&this._map.hasLayer(this)}bringToFront(){return this._map&&yt(this._container),this}bringToBack(){return this._map&&vt(this._container),this}_prepareOpen(t){let e=this._source;if(!e._map)return!1;if(e instanceof Y){e=null;for(const i of Object.values(this._source._layers))if(i._map){e=i;break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else if(e.getBounds)t=e.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0}_updateContent(){if(!this._content)return;const t=this._contentNode,e=typeof this._content=="function"?this._content(this._source??this):this._content;if(typeof e=="string")t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}_updatePosition(){if(!this._map)return;const t=this._map.latLngToLayerPoint(this._latlng),e=this._getAnchor();let i=new u(this.options.offset);this._zoomAnimated?M(this._container,t.add(e)):i=i.add(t).add(e);const s=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=`${s}px`,this._container.style.left=`${o}px`}_getAnchor(){return[0,0]}};$e.setDefaultOptions({interactive:!1,offset:[0,0],className:"",pane:void 0,content:""});let A=$e;y.include({_initOverlay(n,t,e,i){let s=t;return s instanceof n||(s=new n(i).setContent(t)),e&&s.setLatLng(e),s}}),O.include({_initOverlay(n,t,e,i){let s=e;return s instanceof n?(L(s,i),s._source=this):(s=t&&!i?t:new n(i,this),s.setContent(e)),s}});const Ue=class Ue extends A{openOn(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,A.prototype.openOn.call(this,t)}onAdd(t){A.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof j||this._source.on("preclick",K))}onRemove(t){A.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof j||this._source.off("preclick",K))}getEvents(){const t=A.prototype.getEvents.call(this);return(this.options.closeOnClick??this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t}_initLayout(){const t="leaflet-popup",e=this._container=b("div",`${t} ${this.options.className||""} leaflet-zoom-animated`),i=this._wrapper=b("div",`${t}-content-wrapper`,e);if(this._contentNode=b("div",`${t}-content`,i),xt(e),ue(this._contentNode),g(e,"contextmenu",K),this._tipContainer=b("div",`${t}-tip-container`,e),this._tip=b("div",`${t}-tip`,this._tipContainer),this.options.closeButton){const s=this._closeButton=b("a",`${t}-close-button`,e);s.setAttribute("role","button"),s.setAttribute("aria-label",this.options.closeButtonLabel),s.href="#close",s.innerHTML='<span aria-hidden="true">&#215;</span>',g(s,"click",o=>{S(o),this.close()})}this.options.trackResize&&(this._resizeObserver=new ResizeObserver(s=>{this._map&&(this._containerWidth=s[0]?.contentRect?.width,this._containerHeight=s[0]?.contentRect?.height,this._updateLayout(),this._updatePosition(),this._adjustPan())}),this._resizeObserver.observe(this._contentNode))}_updateLayout(){const t=this._contentNode,e=t.style;e.maxWidth=`${this.options.maxWidth}px`,e.minWidth=`${this.options.minWidth}px`;const i=this._containerHeight??t.offsetHeight,s=this.options.maxHeight,o="leaflet-popup-scrolled";s&&i>s?(e.height=`${s}px`,t.classList.add(o)):t.classList.remove(o),this._containerWidth=this._container.offsetWidth,this._containerHeight=this._container.offsetHeight}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();M(this._container,e.add(i))}_adjustPan(){if(!this.options.autoPan)return;if(this._map._panAnim?.stop(),this._autopanning){this._autopanning=!1;return}const t=this._map,e=parseInt(getComputedStyle(this._container).marginBottom,10)||0,i=this._containerHeight+e,s=this._containerWidth,o=new u(this._containerLeft,-i-this._containerBottom);o._add(et(this._container));const r=t.layerPointToContainerPoint(o),a=new u(this.options.autoPanPadding),h=new u(this.options.autoPanPaddingTopLeft??a),l=new u(this.options.autoPanPaddingBottomRight??a),d=t.getSize();let c=0,f=0;r.x+s+l.x>d.x&&(c=r.x+s-d.x+l.x),r.x-c-h.x<0&&(c=r.x-h.x),r.y+i+l.y>d.y&&(f=r.y+i-d.y+l.y),r.y-f-h.y<0&&(f=r.y-h.y),(c||f)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,f]))}_getAnchor(){return new u(this._source?._getPopupAnchor?this._source._getPopupAnchor():[0,0])}};Ue.setDefaultOptions({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});let kt=Ue;y.mergeOptions({closePopupOnClick:!0}),y.include({openPopup(n,t,e){return this._initOverlay(kt,n,t,e).openOn(this),this},closePopup(n){return n=arguments.length?n:this._popup,n?.close(),this}}),O.include({bindPopup(n,t){return this._popup=this._initOverlay(kt,this._popup,n,t),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup(n){return this._popup&&(this instanceof Y||(this._popup._source=this),this._popup._prepareOpen(n||this._latlng)&&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(n){return this._popup?.setContent(n),this},getPopup(){return this._popup},_openPopup(n){if(!this._popup||!this._map)return;nt(n);const t=n.propagatedFrom??n.target;if(this._popup._source===t&&!(t instanceof j)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(n.latlng);return}this._popup._source=t,this.openPopup(n.latlng)},_movePopup(n){this._popup.setLatLng(n.latlng)},_onKeyPress(n){n.originalEvent.code==="Enter"&&this._openPopup(n)}});const qe=class qe extends A{onAdd(t){A.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))}onRemove(t){A.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))}getEvents(){const t=A.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t}_initLayout(){const t="leaflet-tooltip",e=`${t} ${this.options.className||""} leaflet-zoom-${this._zoomAnimated?"animated":"hide"}`;this._contentNode=this._container=b("div",e),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id",`leaflet-tooltip-${x(this)}`)}_updateLayout(){}_adjustPan(){}_setPosition(t){let e,i,s=this.options.direction;const o=this._map,r=this._container,a=o.latLngToContainerPoint(o.getCenter()),h=o.layerPointToContainerPoint(t),l=r.offsetWidth,d=r.offsetHeight,c=new u(this.options.offset),f=this._getAnchor();s==="top"?(e=l/2,i=d):s==="bottom"?(e=l/2,i=0):s==="center"?(e=l/2,i=d/2):s==="right"?(e=0,i=d/2):s==="left"?(e=l,i=d/2):h.x<a.x?(s="right",e=0,i=d/2):(s="left",e=l+(c.x+f.x)*2,i=d/2),t=t.subtract(new u(e,i,!0)).add(c).add(f),r.classList.remove("leaflet-tooltip-right","leaflet-tooltip-left","leaflet-tooltip-top","leaflet-tooltip-bottom"),r.classList.add(`leaflet-tooltip-${s}`),M(r,t)}_updatePosition(){const t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)}setOpacity(t){this.options.opacity=t,this._container&&(this._container.style.opacity=t)}_animateZoom(t){const e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)}_getAnchor(){return new u(this._source?._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}};qe.setDefaultOptions({pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9});let Mt=qe;y.include({openTooltip(n,t,e){return this._initOverlay(Mt,n,t,e).openOn(this),this},closeTooltip(n){return n.close(),this}}),O.include({bindTooltip(n,t){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Mt,this._tooltip,n,t),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions(n){if(!n&&this._tooltipHandlersAdded)return;const t=n?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.pointerover=this._openTooltip,e.pointerout=this.closeTooltip,e.click=this._openTooltip,this._map?this._addFocusListeners(n):e.add=()=>this._addFocusListeners(n)),this._tooltip.options.sticky&&(e.pointermove=this._moveTooltip),this[t](e),this._tooltipHandlersAdded=!n},openTooltip(n){return this._tooltip&&(this instanceof Y||(this._tooltip._source=this),this._tooltip._prepareOpen(n)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip(){if(this._tooltip)return this._tooltip.close()},toggleTooltip(){return this._tooltip?.toggle(this),this},isTooltipOpen(){return this._tooltip.isOpen()},setTooltipContent(n){return this._tooltip?.setContent(n),this},getTooltip(){return this._tooltip},_addFocusListeners(n){this.getElement?this._addFocusListenersOnLayer(this,n):this.eachLayer&&this.eachLayer(t=>this._addFocusListenersOnLayer(t,n),this)},_addFocusListenersOnLayer(n,t){const e=typeof n.getElement=="function"&&n.getElement();if(e){const i=t?"off":"on";t||(e._leaflet_focus_handler&&P(e,"focus",e._leaflet_focus_handler,this),e._leaflet_focus_handler=()=>{this._tooltip&&(this._tooltip._source=n,this.openTooltip())}),e._leaflet_focus_handler&&pe[i](e,"focus",e._leaflet_focus_handler,this),pe[i](e,"blur",this.closeTooltip,this),t&&delete e._leaflet_focus_handler}},_setAriaDescribedByOnLayer(n){(typeof n.getElement=="function"&&n.getElement())?.setAttribute?.("aria-describedby",this._tooltip._container.id)},_openTooltip(n){if(!(!this._tooltip||!this._map)){if(this._map.dragging?.moving()){n.type==="add"&&!this._moveEndOpensTooltip&&(this._moveEndOpensTooltip=!0,this._map.once("moveend",()=>{this._moveEndOpensTooltip=!1,this._openTooltip(n)}));return}this._tooltip._source=n.propagatedFrom??n.target,this.openTooltip(this._tooltip.options.sticky?n.latlng:void 0)}},_moveTooltip(n){let t=n.latlng,e,i;this._tooltip.options.sticky&&n.originalEvent&&(e=this._map.pointerEventToContainerPoint(n.originalEvent),i=this._map.containerPointToLayerPoint(e),t=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(t)}});const Ve=class Ve extends ot{createIcon(t){const e=t&&t.tagName==="DIV"?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(e.replaceChildren(),e.appendChild(i.html)):e.innerHTML=i.html!==!1?i.html:"",i.bgPos){const s=new u(i.bgPos);e.style.backgroundPosition=`${-s.x}px ${-s.y}px`}return this._setIconStyles(e,"icon"),e}createShadow(){return null}};Ve.setDefaultOptions({iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"});let Ce=Ve;ot.Default=Rt;const Ke=class Ke extends O{initialize(t){L(this,t)}onAdd(){this._initContainer(),this._levels={},this._tiles={},this._resetView()}beforeAdd(t){t._addZoomLimit(this)}onRemove(t){this._removeAllTiles(),this._container.remove(),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0,clearTimeout(this._pruneTimeout)}bringToFront(){return this._map&&(yt(this._container),this._setAutoZIndex(Math.max)),this}bringToBack(){return this._map&&(vt(this._container),this._setAutoZIndex(Math.min)),this}getContainer(){return this._container}setOpacity(t){return this.options.opacity=t,this._updateOpacity(),this}setZIndex(t){return this.options.zIndex=t,this._updateZIndex(),this}isLoading(){return this._loading}redraw(){if(this._map){this._removeAllTiles();const t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this}getEvents(){const t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=Qe(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t}createTile(){return document.createElement("div")}getTileSize(){const t=this.options.tileSize;return t instanceof u?t:new u(t,t)}_updateZIndex(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)}_setAutoZIndex(t){const e=this.getPane().children;let i=-t(-1/0,1/0);for(const s of e){const o=s.style.zIndex;s!==this._container&&o&&(i=t(i,+o))}isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())}_updateOpacity(){if(!this._map)return;this._container.style.opacity=this.options.opacity;const t=+new Date;let e=!1,i=!1;for(const s of Object.values(this._tiles??{})){if(!s.current||!s.loaded)continue;const o=Math.min(1,(t-s.loaded)/200);s.el.style.opacity=o,o<1?e=!0:(s.active?i=!0:this._onOpaqueTile(s),s.active=!0)}i&&!this._noPrune&&this._pruneTiles(),e&&(cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this)))}_onOpaqueTile(){}_initContainer(){this._container||(this._container=b("div",`leaflet-layer ${this.options.className??""}`),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))}_updateLevels(){const t=this._tileZoom,e=this.options.maxZoom;if(t===void 0)return;for(let o of Object.keys(this._levels))o=Number(o),this._levels[o].el.children.length||o===t?(this._levels[o].el.style.zIndex=e-Math.abs(t-o),this._onUpdateLevel(o)):(this._levels[o].el.remove(),this._removeTilesAtZoom(o),this._onRemoveLevel(o),delete this._levels[o]);let i=this._levels[t];const s=this._map;return i||(i=this._levels[t]={},i.el=b("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,s.getCenter(),s.getZoom()),Z(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}_onUpdateLevel(){}_onRemoveLevel(){}_onCreateLevel(){}_pruneTiles(){if(!this._map)return;const t=this._map.getZoom();if(t>this.options.maxZoom||t<this.options.minZoom){this._removeAllTiles();return}for(const e of Object.values(this._tiles))e.retain=e.current;for(const e of Object.values(this._tiles))if(e.current&&!e.active){const i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(const[e,i]of Object.entries(this._tiles))i.retain||this._removeTile(e)}_removeTilesAtZoom(t){for(const[e,i]of Object.entries(this._tiles))i.coords.z===t&&this._removeTile(e)}_removeAllTiles(){for(const t of Object.keys(this._tiles))this._removeTile(t)}_invalidateAll(){for(const t of Object.keys(this._levels))this._levels[t].el.remove(),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0}_retainParent(t,e,i,s){const o=Math.floor(t/2),r=Math.floor(e/2),a=i-1,h=new u(+o,+r);h.z=+a;const l=this._tileCoordsToKey(h),d=this._tiles[l];return d?.active?(d.retain=!0,!0):(d?.loaded&&(d.retain=!0),a>s?this._retainParent(o,r,a,s):!1)}_retainChildren(t,e,i,s){for(let o=2*t;o<2*t+2;o++)for(let r=2*e;r<2*e+2;r++){const a=new u(o,r);a.z=i+1;const h=this._tileCoordsToKey(a),l=this._tiles[h];if(l?.active){l.retain=!0;continue}else l?.loaded&&(l.retain=!0);i+1<s&&this._retainChildren(o,r,i+1,s)}}_resetView(t){const e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)}_animateZoom(t){this._setView(t.center,t.zoom,!0,t.noUpdate)}_clampZoom(t){const e=this.options;return e.minNativeZoom!==void 0&&t<e.minNativeZoom?e.minNativeZoom:e.maxNativeZoom!==void 0&&e.maxNativeZoom<t?e.maxNativeZoom:t}_setView(t,e,i,s){let o=Math.round(e);this.options.maxZoom!==void 0&&o>this.options.maxZoom||this.options.minZoom!==void 0&&o<this.options.minZoom?o=void 0:o=this._clampZoom(o);const r=this.options.updateWhenZooming&&o!==this._tileZoom;(!s||r)&&(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),o!==void 0&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)}_setZoomTransforms(t,e){for(const i of Object.values(this._levels))this._setZoomTransform(i,t,e)}_setZoomTransform(t,e,i){const s=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(e,i)).round();tt(t.el,o,s)}_resetGrid(){const t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),s=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],s).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],s).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],s).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],s).y/i.y)]}_onMoveEnd(){!this._map||this._map._animatingZoom||this._update()}_getTiledPixelBounds(t){const e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),s=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(s*2);return new v(o.subtract(r),o.add(r))}_update(t){const e=this._map;if(!e)return;const i=this._clampZoom(e.getZoom());if(t===void 0&&(t=e.getCenter()),this._tileZoom===void 0)return;const s=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(s),r=o.getCenter(),a=[],h=this.options.keepBuffer,l=new v(o.getBottomLeft().subtract([h,-h]),o.getTopRight().add([h,-h]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(const d of Object.values(this._tiles)){const c=d.coords;(c.z!==this._tileZoom||!l.contains(new u(c.x,c.y)))&&(d.current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(let d=o.min.y;d<=o.max.y;d++)for(let c=o.min.x;c<=o.max.x;c++){const f=new u(c,d);if(f.z=this._tileZoom,!this._isValidTile(f))continue;const m=this._tiles[this._tileCoordsToKey(f)];m?m.current=!0:a.push(f)}if(a.sort((d,c)=>d.distanceTo(r)-c.distanceTo(r)),a.length!==0){this._loading||(this._loading=!0,this.fire("loading"));const d=document.createDocumentFragment();for(const c of a)this._addTile(c,d);this._level.el.appendChild(d)}}_isValidTile(t){const e=this._map.options.crs;if(!e.infinite){const s=this._globalTileRange;if(!e.wrapLng&&(t.x<s.min.x||t.x>s.max.x)||!e.wrapLat&&(t.y<s.min.y||t.y>s.max.y))return!1}if(!this.options.bounds)return!0;const i=this._tileCoordsToBounds(t);return new w(this.options.bounds).overlaps(i)}_keyToBounds(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))}_tileCoordsToNwSe(t){const e=this._map,i=this.getTileSize(),s=t.scaleBy(i),o=s.add(i),r=e.unproject(s,t.z),a=e.unproject(o,t.z);return[r,a]}_tileCoordsToBounds(t){const e=this._tileCoordsToNwSe(t);let i=new w(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i}_tileCoordsToKey(t){return`${t.x}:${t.y}:${t.z}`}_keyToTileCoords(t){const e=t.split(":"),i=new u(+e[0],+e[1]);return i.z=+e[2],i}_removeTile(t){const e=this._tiles[t];e&&(e.el.remove(),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))}_initTile(t){t.classList.add("leaflet-tile");const e=this.getTileSize();t.style.width=`${e.x}px`,t.style.height=`${e.y}px`,t.onselectstart=Z,t.onpointermove=Z}_addTile(t,e){const i=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),this._tileReady.bind(this,t));this._initTile(o),this.createTile.length<2&&requestAnimationFrame(this._tileReady.bind(this,t,null,o)),M(o,i),this._tiles[s]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})}_tileReady(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});const s=this._tileCoordsToKey(t);i=this._tiles[s],i&&(i.loaded=+new Date,this._map._fadeAnimated?(i.el.style.opacity=0,cancelAnimationFrame(this._fadeFrame),this._fadeFrame=requestAnimationFrame(this._updateOpacity.bind(this))):(i.active=!0,this._pruneTiles()),e||(i.el.classList.add("leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),this._map._fadeAnimated?this._pruneTimeout=setTimeout(this._pruneTiles.bind(this),250):requestAnimationFrame(this._pruneTiles.bind(this))))}_getTilePos(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)}_wrapCoords(t){const e=new u(this._wrapX?pt(t.x,this._wrapX):t.x,this._wrapY?pt(t.y,this._wrapY):t.y);return e.z=t.z,e}_pxBoundsToTileRange(t){const e=this.getTileSize();return new v(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))}_noTilesToLoad(){return Object.values(this._tiles).every(t=>t.loaded)}};Ke.setDefaultOptions({tileSize:256,opacity:1,updateWhenIdle:z.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2});let at=Ke;const Ye=class Ye extends at{initialize(t,e){if(this._url=t,e=L(this,e),e.attribution===null&&URL.canParse(t)){const i=new URL(t).hostname;["tile.openstreetmap.org","tile.osm.org"].some(o=>i.endsWith(o))&&(e.attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors')}e.detectRetina&&z.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)}setUrl(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this}createTile(t,e){const i=document.createElement("img");return g(i,"load",this._tileOnLoad.bind(this,e,i)),g(i,"error",this._tileOnError.bind(this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i}getTileUrl(t){const e=Object.create(this.options);if(Object.assign(e,{r:z.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()}),this._map&&!this._map.options.crs.infinite){const i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return ti(this._url,e)}_tileOnLoad(t,e){t(null,e)}_tileOnError(t,e,i){const s=this.options.errorTileUrl;s&&e.getAttribute("src")!==s&&(e.src=s),t(i,e)}_onTileRemove(t){t.tile.onload=null}_getZoomForUrl(){let t=this._tileZoom;const e=this.options.maxZoom,i=this.options.zoomReverse,s=this.options.zoomOffset;return i&&(t=e-t),t+s}_getSubdomain(t){const e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]}_abortLoading(){let t,e;for(t of Object.keys(this._tiles))if(this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=Z,e.onerror=Z,!e.complete)){e.src=zt;const i=this._tiles[t].coords;e.remove(),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}}_removeTile(t){const e=this._tiles[t];if(e)return e.el.setAttribute("src",zt),at.prototype._removeTile.call(this,t)}_tileReady(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===zt))return at.prototype._tileReady.call(this,t,e,i)}_clampZoom(t){return Math.round(at.prototype._clampZoom.call(this,t))}};Ye.setDefaultOptions({minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1});let ht=Ye;const Kt=class Kt extends ht{initialize(t,e){this._url=t;const i={...this.defaultWmsParams};for(const r of Object.keys(e))r in this.options||(i[r]=e[r]);e=L(this,e);const s=e.detectRetina&&z.retina?2:1,o=this.getTileSize();i.width=o.x*s,i.height=o.y*s,this.wmsParams=i}onAdd(t){this._crs=this.options.crs??t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);const e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,ht.prototype.onAdd.call(this,t)}getTileUrl(t){const e=this._tileCoordsToNwSe(t),i=this._crs,s=new v(i.project(e[0]),i.project(e[1])),o=s.min,r=s.max,a=(this._wmsVersion>=1.3&&this._crs===Pi?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),h=new URL(ht.prototype.getTileUrl.call(this,t));for(const[l,d]of Object.entries({...this.wmsParams,bbox:a}))h.searchParams.append(this.options.uppercase?l.toUpperCase():l,d);return h.toString()}setParams(t,e){return Object.assign(this.wmsParams,t),e||this.redraw(),this}};Kt.prototype.defaultWmsParams={service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},Kt.setDefaultOptions({crs:null,uppercase:!1});let Te=Kt;ht.WMS=Te;class I extends Gt{initialize(t){L(this,{...t,continuous:!1}),x(this),this._layers??={}}onAdd(t){super.onAdd(t),this.on("update",this._updatePaths,this)}onRemove(){super.onRemove(),this.off("update",this._updatePaths,this)}_onZoomEnd(){for(const t of Object.values(this._layers))t._project()}_updatePaths(){for(const t of Object.values(this._layers))t._update()}_onViewReset(){for(const t of Object.values(this._layers))t._reset()}_onSettled(){this._update()}_update(){}}const Xe=class Xe extends I{getEvents(){const t=I.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t}_onViewPreReset(){this._postponeUpdatePaths=!0}onAdd(t){I.prototype.onAdd.call(this,t),this._draw()}onRemove(){I.prototype.onRemove.call(this),clearTimeout(this._pointerHoverThrottleTimeout)}_initContainer(){const t=this._container=document.createElement("canvas");g(t,"pointermove",this._onPointerMove,this),g(t,"click dblclick pointerdown pointerup contextmenu",this._onClick,this),g(t,"pointerout",this._handlePointerOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")}_destroyContainer(){cancelAnimationFrame(this._redrawRequest),this._redrawRequest=null,delete this._ctx,I.prototype._destroyContainer.call(this)}_resizeContainer(){const t=I.prototype._resizeContainer.call(this),e=this._ctxScale=window.devicePixelRatio;this._container.width=e*t.x,this._container.height=e*t.y}_updatePaths(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(const t of Object.values(this._layers))t._update();this._redraw()}}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=this._ctxScale;this._ctx.setTransform(e,0,0,e,-t.min.x*e,-t.min.y*e),this.fire("update")}_reset(){I.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())}_initPath(t){this._updateDashArray(t),this._layers[x(t)]=t;const e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst??=this._drawLast}_addPath(t){this._requestRedraw(t)}_removePath(t){const e=t._order,i=e.next,s=e.prev;i?i.prev=s:this._drawLast=s,s?s.next=i:this._drawFirst=i,delete t._order,delete this._layers[x(t)],this._requestRedraw(t)}_updatePath(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)}_updateStyle(t){this._updateDashArray(t),this._requestRedraw(t)}_updateDashArray(t){if(typeof t.options.dashArray=="string"){const e=t.options.dashArray.split(/[, ]+/);t.options._dashArray=e.map(i=>Number(i)).filter(i=>!isNaN(i))}else t.options._dashArray=t.options.dashArray}_requestRedraw(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest??=requestAnimationFrame(this._redraw.bind(this)))}_extendRedrawBounds(t){if(t._pxBounds){const e=(t.options.weight??0)+1;this._redrawBounds??=new v,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}}_redraw(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null}_clear(){const t=this._redrawBounds;if(t){const e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.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 t;const e=this._redrawBounds;if(this._ctx.save(),e){const i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(let i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()}_updatePoly(t,e){if(!this._drawing)return;const i=t._parts,s=this._ctx;i.length&&(s.beginPath(),i.forEach(o=>{o.forEach((r,a)=>{s[a?"lineTo":"moveTo"](r.x,r.y)}),e&&s.closePath()}),this._fillStroke(s,t))}_updateCircle(t){if(!this._drawing||t._empty())return;const e=t._point,i=this._ctx,s=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||s)/s;o!==1&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,s,0,Math.PI*2,!1),o!==1&&i.restore(),this._fillStroke(i,t)}_fillStroke(t,e){const i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor??i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&i.weight!==0&&(t.setLineDash&&(t.lineDashOffset=Number(i.dashOffset??0),t.setLineDash(i._dashArray??[])),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())}_onClick(t){const e=this._map.pointerEventToLayerPoint(t);let i,s;for(let o=this._drawFirst;o;o=o.next)i=o.layer,i.options.interactive&&i._containsPoint(e)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(i))&&(s=i);this._fireEvent(s?[s]:!1,t)}_onPointerMove(t){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom)return;const e=this._map.pointerEventToLayerPoint(t);this._handlePointerHover(t,e)}_handlePointerOut(t){const e=this._hoveredLayer;e&&(this._container.classList.remove("leaflet-interactive"),this._fireEvent([e],t,"pointerout"),this._hoveredLayer=null,this._pointerHoverThrottled=!1)}_handlePointerHover(t,e){if(this._pointerHoverThrottled)return;let i,s;for(let o=this._drawFirst;o;o=o.next)i=o.layer,i.options.interactive&&i._containsPoint(e)&&(s=i);s!==this._hoveredLayer&&(this._handlePointerOut(t),s&&(this._container.classList.add("leaflet-interactive"),this._fireEvent([s],t,"pointerover"),this._hoveredLayer=s)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._pointerHoverThrottled=!0,this._pointerHoverThrottleTimeout=setTimeout(()=>{this._pointerHoverThrottled=!1},32)}_fireEvent(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)}_bringToFront(t){const e=t._order;if(!e)return;const i=e.next,s=e.prev;if(i)i.prev=s;else return;s?s.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t)}_bringToBack(t){const e=t._order;if(!e)return;const i=e.next,s=e.prev;if(s)s.next=i;else return;i?i.prev=s:s&&(this._drawLast=s),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t)}};Xe.setDefaultOptions({tolerance:0});let Wt=Xe;function yn(n){return document.createElementNS("http://www.w3.org/2000/svg",n)}function Mi(n,t){return n.flatMap(i=>[...i.map((s,o)=>`${(o?"L":"M")+s.x} ${s.y}`),t?"z":""]).join("")||"M0 0"}const $t=yn;class Ut extends I{_initContainer(){this._container=$t("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=$t("g"),this._container.appendChild(this._rootGroup)}_destroyContainer(){I.prototype._destroyContainer.call(this),delete this._rootGroup,delete this._svgSize}_resizeContainer(){const t=I.prototype._resizeContainer.call(this);(!this._svgSize||!this._svgSize.equals(t))&&(this._svgSize=t,this._container.setAttribute("width",t.x),this._container.setAttribute("height",t.y))}_update(){if(this._map._animatingZoom&&this._bounds)return;const t=this._bounds,e=t.getSize();this._container.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}_initPath(t){const e=t._path=$t("path");t.options.className&&e.classList.add(...F(t.options.className)),t.options.interactive&&e.classList.add("leaflet-interactive"),this._updateStyle(t),this._layers[x(t)]=t}_addPath(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)}_removePath(t){t._path.remove(),t.removeInteractiveTarget(t._path),delete this._layers[x(t)]}_updatePath(t){t._project(),t._update()}_updateStyle(t){const e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))}_updatePoly(t,e){this._setPath(t,Mi(t._parts,e))}_updateCircle(t){const e=t._point,i=Math.max(Math.round(t._radius),1),s=Math.max(Math.round(t._radiusY),1)||i,o=`a${i},${s} 0 1,0 `,r=t._empty()?"M0 0":`M${e.x-i},${e.y}${o}${i*2},0 ${o}${-i*2},0 `;this._setPath(t,r)}_setPath(t,e){t._path.setAttribute("d",e)}_bringToFront(t){yt(t._path)}_bringToBack(t){vt(t._path)}}y.include({getRenderer(n){let t=n.options.renderer??this._getPaneRenderer(n.options.pane)??this.options.renderer??this._renderer;return t||(t=this._renderer=this._createRenderer()),this.hasLayer(t)||this.addLayer(t),t},_getPaneRenderer(n){if(n==="overlayPane"||n===void 0)return;let t=this._paneRenderers[n];return t===void 0&&(t=this._createRenderer({pane:n}),this._paneRenderers[n]=t),t},_createRenderer(n){return this.options.preferCanvas&&new Wt(n)||new Ut(n)}});class vn extends rt{initialize(t,e){rt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)}setBounds(t){return this.setLatLngs(this._boundsToLatLngs(t))}_boundsToLatLngs(t){return t=new w(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}Ut.create=$t,Ut.pointsToPath=Mi,X.geometryToLayer=Nt,X.coordsToLatLng=we,X.coordsToLatLngs=Ft,X.latLngToCoords=be,X.latLngsToCoords=Ht,X.getFeature=ct,X.asFeature=jt,y.mergeOptions({boxZoom:!0});class zi extends H{initialize(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)}addHooks(){g(this._container,"pointerdown",this._onPointerDown,this)}removeHooks(){P(this._container,"pointerdown",this._onPointerDown,this)}moved(){return this._moved}_destroy(){this._pane.remove(),delete this._pane}_resetState(){this._resetStateTimeout=0,this._moved=!1}_clearDeferredResetState(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)}_onPointerDown(t){if(!t.shiftKey||t.button!==0)return!1;this._clearDeferredResetState(),this._resetState(),ee(),ne(),this._startPoint=this._map.pointerEventToContainerPoint(t),g(document,{contextmenu:nt,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerMove(t){this._moved||(this._moved=!0,this._box=b("div","leaflet-zoom-box",this._container),this._container.classList.add("leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.pointerEventToContainerPoint(t);const e=new v(this._point,this._startPoint),i=e.getSize();M(this._box,e.min),this._box.style.width=`${i.x}px`,this._box.style.height=`${i.y}px`}_finish(){this._moved&&(this._box.remove(),this._container.classList.remove("leaflet-crosshair")),ie(),se(),P(document,{contextmenu:nt,pointermove:this._onPointerMove,pointerup:this._onPointerUp,keydown:this._onKeyDown},this)}_onPointerUp(t){if(t.button!==0||(this._finish(),!this._moved))return;this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(this._resetState.bind(this),0);const e=new w(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}_onKeyDown(t){t.code==="Escape"&&(this._finish(),this._clearDeferredResetState(),this._resetState())}}y.addInitHook("addHandler","boxZoom",zi),y.mergeOptions({doubleClickZoom:!0});class Si extends H{addHooks(){this._map.on("dblclick",this._onDoubleClick,this)}removeHooks(){this._map.off("dblclick",this._onDoubleClick,this)}_onDoubleClick(t){const e=this._map,i=e.getZoom(),s=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-s:i+s;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}}y.addInitHook("addHandler","doubleClickZoom",Si),y.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});class Oi extends H{addHooks(){if(!this._draggable){const t=this._map;this._draggable=new wt(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,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}_onDragStart(){const t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){const e=new w(this._map.options.maxBounds);this._offsetLimit=new v(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])}_onDrag(t){if(this._map.options.inertia){const e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)}_prunePositions(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()}_onZoomEnd(){const t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x}_viscousLimit(t,e){return t-(t-e)*this._viscosity}_onPreDragLimit(){if(!this._viscosity||!this._offsetLimit)return;const t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}_onPreDragWrap(){const t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,s=this._draggable._newPos.x,o=(s-e+i)%t+e-i,r=(s+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(r+i)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a}_onDragEnd(t){const e=this._map,i=e.options,s=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),s)e.fire("moveend");else{this._prunePositions(+new Date);const o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,h=o.multiplyBy(a/r),l=h.distanceTo([0,0]),d=Math.min(i.inertiaMaxSpeed,l),c=h.multiplyBy(d/l),f=d/(i.inertiaDeceleration*a);let m=c.multiplyBy(-f/2).round();!m.x&&!m.y?e.fire("moveend"):(m=e._limitOffset(m,e.options.maxBounds),requestAnimationFrame(()=>{e.panBy(m,{duration:f,easeLinearity:a,noMoveStart:!0,animate:!0})}))}}}y.addInitHook("addHandler","dragging",Oi),y.mergeOptions({keyboard:!0,keyboardPanDelta:80});class ut extends H{static keyCodes={left:["ArrowLeft"],right:["ArrowRight"],down:["ArrowDown"],up:["ArrowUp"],zoomIn:["Equal","NumpadAdd","BracketRight"],zoomOut:["Minus","NumpadSubtract","Digit6","Slash"]};initialize(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)}addHooks(){const t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),t.ariaKeyShortcuts=Object.values(ut.keyCodes).flat().join(" "),g(t,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)}removeHooks(){this._removeHooks(),P(this._map._container,{focus:this._onFocus,blur:this._onBlur,pointerdown:this._onPointerDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)}_onPointerDown(){if(this._focused)return;const t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,s=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(s,i)}_onFocus(){this._focused=!0,this._map.fire("focus")}_onBlur(){this._focused=!1,this._map.fire("blur")}_setPanDelta(t){const e=this._panKeys={},i=ut.keyCodes;for(const s of i.left)e[s]=[-1*t,0];for(const s of i.right)e[s]=[t,0];for(const s of i.down)e[s]=[0,t];for(const s of i.up)e[s]=[0,-1*t]}_setZoomDelta(t){const e=this._zoomKeys={},i=ut.keyCodes;for(const s of i.zoomIn)e[s]=t;for(const s of i.zoomOut)e[s]=-t}_addHooks(){g(document,"keydown",this._onKeyDown,this)}_removeHooks(){P(document,"keydown",this._onKeyDown,this)}_onKeyDown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.code,i=this._map;let s;if(e in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(s=this._panKeys[e],t.shiftKey&&(s=new u(s).multiplyBy(3)),i.options.maxBounds&&(s=i._limitOffset(new u(s),i.options.maxBounds)),i.options.worldCopyJump){const o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(s)));i.panTo(o)}else i.panBy(s)}else if(e in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else if(e==="Escape"&&i._popup&&i._popup.options.closeOnEscapeKey)i.closePopup();else return;nt(t)}}y.addInitHook("addHandler","keyboard",ut),y.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});class Zi extends H{addHooks(){g(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0}removeHooks(){P(this._map._container,"wheel",this._onWheelScroll,this),clearTimeout(this._timer)}_onWheelScroll(t){const e=fi(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.pointerEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);const s=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(this._performZoom.bind(this),s),nt(t)}_performZoom(){const t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap??0;t._stop();const s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),o=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,r=i?Math.ceil(o/i)*i:o,a=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,a&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}}y.addInitHook("addHandler","scrollWheelZoom",Zi);const xn=600;y.mergeOptions({tapHold:z.safari&&z.mobile,tapTolerance:15});class Ei extends H{addHooks(){g(this._map._container,"pointerdown",this._onDown,this)}removeHooks(){P(this._map._container,"pointerdown",this._onDown,this),clearTimeout(this._holdTimeout)}_onDown(t){clearTimeout(this._holdTimeout),!(dt().length!==1||t.pointerType==="mouse")&&(this._startPos=this._newPos=new u(t.clientX,t.clientY),this._holdTimeout=setTimeout(()=>{this._cancel(),this._isTapValid()&&(g(document,"pointerup",S),g(document,"pointerup pointercancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",t))},xn),g(document,"pointerup pointercancel contextmenu",this._cancel,this),g(document,"pointermove",this._onMove,this))}_cancelClickPrevent=function t(){P(document,"pointerup",S),P(document,"pointerup pointercancel",t)};_cancel(){clearTimeout(this._holdTimeout),P(document,"pointerup pointercancel contextmenu",this._cancel,this),P(document,"pointermove",this._onMove,this)}_onMove(t){this._newPos=new u(t.clientX,t.clientY)}_isTapValid(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance}_simulateEvent(t,e){const i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}}y.addInitHook("addHandler","tapHold",Ei),y.mergeOptions({pinchZoom:!0,bounceAtZoomLimits:!0});class ke extends H{addHooks(){this._map._container.classList.add("leaflet-touch-zoom"),g(this._map._container,"pointerdown",this._onPointerStart,this)}removeHooks(){this._map._container.classList.remove("leaflet-touch-zoom"),P(this._map._container,"pointerdown",this._onPointerStart,this)}_onPointerStart(t){const e=this._map,i=dt();if(i.length!==2||e._animatingZoom||this._zooming)return;const s=e.pointerEventToContainerPoint(i[0]),o=e.pointerEventToContainerPoint(i[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.pinchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(s.add(o)._divideBy(2))),this._startDist=s.distanceTo(o),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),g(document,"pointermove",this._onPointerMove,this),g(document,"pointerup pointercancel",this._onPointerEnd,this),S(t)}_onPointerMove(t){const e=dt();if(e.length!==2||!this._zooming)return;const i=this._map,s=i.pointerEventToContainerPoint(e[0]),o=i.pointerEventToContainerPoint(e[1]),r=s.distanceTo(o)/this._startDist;if(this._zoom=i.getScaleZoom(r,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&r<1||this._zoom>i.getMaxZoom()&&r>1)&&(this._zoom=i._limitZoom(this._zoom)),i.options.pinchZoom==="center"){if(this._center=this._startLatLng,r===1)return}else{const h=s._add(o)._divideBy(2)._subtract(this._centerPoint);if(r===1&&h.x===0&&h.y===0)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(h),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),cancelAnimationFrame(this._animRequest);const a=i._move.bind(i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=requestAnimationFrame(a.bind(this)),S(t)}_onPointerEnd(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,cancelAnimationFrame(this._animRequest),P(document,"pointermove",this._onPointerMove,this),P(document,"pointerup pointercancel",this._onPointerEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}}y.addInitHook("addHandler","pinchZoom",ke),y.addInitHook(function(){this.touchZoom=this.pinchZoom,this.options.touchZoom!==void 0&&(console.warn("Map: touchZoom option is deprecated and will be removed in future versions. Use pinchZoom instead."),this.options.pinchZoom=this.options.touchZoom,delete this.options.touchZoom),this.options.pinchZoom?this.pinchZoom.enable():this.pinchZoom.disable()}),y.BoxZoom=zi,y.DoubleClickZoom=Si,y.Drag=Oi,y.Keyboard=ut,y.ScrollWheelZoom=Zi,y.TapHold=Ei,y.PinchZoom=ke,y.TouchZoom=ke;var _={__proto__:null,BlanketOverlay:Gt,Bounds:v,Browser:z,CRS:W,Canvas:Wt,Circle:Ti,CircleMarker:Ct,Class:ft,Control:E,DivIcon:Ce,DivOverlay:A,DomEvent:pe,DomUtil:en,Draggable:wt,Evented:mt,FeatureGroup:Y,GeoJSON:X,GridLayer:at,Handler:H,Icon:ot,ImageOverlay:Tt,LatLng:p,LatLngBounds:w,Layer:O,LayerGroup:Lt,LeafletMap:rn,LineUtil:_n,Map:y,Marker:Pt,Path:j,Point:u,PolyUtil:hn,Polygon:rt,Polyline:U,Popup:kt,PosAnimation:mi,Projection:pn,Rectangle:vn,Renderer:I,SVG:Ut,SVGOverlay:gn,TileLayer:ht,Tooltip:Mt,Transformation:gt,Util:Gi,VideoOverlay:Pe,version:"2.0.0-alpha.1"};const wn=qt().L;qt().L=_,qt().L.noConflict=function(){return qt().L=wn,this};function qt(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}const bn=`/* required styles */
2
2
 
3
3
  .leaflet-pane,
4
4
  .leaflet-tile,
@@ -600,7 +600,7 @@ path.leaflet-interactive:focus:not(:focus-visible) {
600
600
  print-color-adjust: exact;
601
601
  }
602
602
  }
603
- `,vn={dialog:"_dialog_nq83g_1 _ds-dialog_dbymd_5"},xn=typeof window<"u"&&typeof document<"u";function wn(n,t){let e;return function(...i){clearTimeout(e),e=setTimeout(()=>n.apply(this,i),t)}}function ke(n,t,e){return e===void 0?n.getAttribute(t)??null:(e===null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e),null)}`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`,`${vn.dialog.split(" ")[0]}`;const Me=(n,t,e)=>{const i=document.createElement(n);if(e&&(i.textContent=e),t)for(const[s,o]of Object.entries(t))ke(i,s,o);return i},bn=typeof HTMLElement>"u"?class{}:HTMLElement,Ln=`:host {
603
+ `,Ln=`:host {
604
604
  --mtdsc-atlas-cluster-size: var(--mtds-8);
605
605
  --mtdsc-atlas-background: #fbfbfb;
606
606
  --mtdsc-atlas-border-color: var(--ds-color-border-subtle);
@@ -654,6 +654,8 @@ slot {
654
654
  box-sizing: border-box;
655
655
  font: inherit;
656
656
  outline: 0;
657
+ position: relative;
658
+ z-index: 1; /* Ensure <slot> is always on top */
657
659
  }
658
660
  .leaflet-control-attribution {
659
661
  font-size: 12px;
@@ -683,5 +685,5 @@ slot {
683
685
  /* biome-ignore lint/complexity/noImportantStyles: need to overwrite style attribute */
684
686
  margin: calc(var(--mtdsc-atlas-cluster-size) / -2) !important;
685
687
  }
686
- `;_.MarkerClusterGroup=_.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(n){_.Util.setOptions(this,n),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this.options.clusterPane||(this.options.clusterPane=_.Marker.prototype.options.pane),this._featureGroup=new _.FeatureGroup,this._featureGroup.addEventParent(this),this._nonPointGroup=new _.FeatureGroup,this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=_.DomUtil.TRANSITION&&this.options.animate;Object.assign(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?_.MarkerCluster:_.MarkerClusterNonAnimated},addLayer:function(n){if(n instanceof _.LayerGroup)return this.addLayers([n]);if(!n.getLatLng)return this._nonPointGroup.addLayer(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(!this._map)return this._needsClustering.push(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(this.hasLayer(n))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(n,this._maxZoom),this.fire("layeradd",{layer:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=n,e=this._zoom;if(n.__parent)for(;t.__parent._zoom>=e;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(n,t):this._animationAddLayerNonAnimated(n,t)),this},removeLayer:function(n){return n instanceof _.LayerGroup?this.removeLayers([n]):n.getLatLng?this._map?n.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(n)),this._removeLayer(n,!0),this.fire("layerremove",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),n.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(n)&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,n)&&this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n,propagatedFrom:n}),this):(this._nonPointGroup.removeLayer(n),this.fire("layerremove",{layer:n,propagatedFrom:n}),this)},addLayers:function(n,t){if(!Array.isArray(n))return this.addLayer(n);var e=this._featureGroup,i=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,r=this.options.chunkProgress,a=n.length,h=0,l=!0,d;if(this._map){const c=Date.now(),f=()=>{for(var m=Date.now();h<a&&!(s&&h%200===0&&Date.now()-m>o);h++){if(d=n[h],d instanceof _.LayerGroup){l&&(n=n.slice(),l=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d),t||this.fire("layeradd",{layer:d,propagatedFrom:d});continue}if(!this.hasLayer(d)&&(this._addLayer(d,this._maxZoom),t||this.fire("layeradd",{layer:d,propagatedFrom:d}),d.__parent&&d.__parent.getChildCount()===2)){const C=d.__parent.getAllChildMarkers(),k=C[0]===d?C[1]:C[0];e.removeLayer(k)}}r&&r(h,a,Date.now()-c),h===a?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(f,this.options.chunkDelay)};f()}else{const c=this._needsClustering;for(;h<a;h++){if(d=n[h],d instanceof _.LayerGroup){l&&(n=n.slice(),l=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d);continue}this.hasLayer(d)||c.push(d)}}return this},removeLayers:function(n){var t,e,i=n.length,s=this._featureGroup,o=this._nonPointGroup,r=!0;if(!this._map){for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}this._arraySplice(this._needsClustering,e),o.removeLayer(e),this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e,propagatedFrom:e})}return this}if(this._unspiderfy){this._unspiderfy();const a=n.slice();let h=i;for(t=0;t<h;t++){if(e=a[t],e instanceof _.LayerGroup){this._extractNonGroupLayers(e,a),h=a.length;continue}this._unspiderfyLayer(e)}}for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}if(!e.__parent){o.removeLayer(e),this.fire("layerremove",{layer:e,propagatedFrom:e});continue}this._removeLayer(e,!0,!0),this.fire("layerremove",{layer:e,propagatedFrom:e}),s.hasLayer(e)&&(s.removeLayer(e),e.clusterShow&&e.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(n){n.off(this._childMarkerEventHandlers,this),delete n.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var n=new _.LatLngBounds;this._topClusterLevel&&n.extend(this._topClusterLevel._bounds);for(let t=this._needsClustering.length-1;t>=0;t--)n.extend(this._needsClustering[t].getLatLng());return n.extend(this._nonPointGroup.getBounds()),n},eachLayer:function(n,t){var e=this._needsClustering.slice(),i=this._needsRemoving,s,o,r;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(e),o=e.length-1;o>=0;o--){for(s=!0,r=i.length-1;r>=0;r--)if(i[r].layer===e[o]){s=!1;break}s&&n.call(t,e[o])}this._nonPointGroup.eachLayer(n,t)},getLayers:function(){var n=[];return this.eachLayer(t=>{n.push(t)}),n},getLayer:function(n){var t=null;return n=parseInt(n,10),this.eachLayer(e=>{_.stamp(e)===n&&(t=e)}),t},hasLayer:function(n){if(!n)return!1;var t,e=this._needsClustering;for(t=e.length-1;t>=0;t--)if(e[t]===n)return!0;for(e=this._needsRemoving,t=e.length-1;t>=0;t--)if(e[t].layer===n)return!1;return!!(n.__parent&&n.__parent._group===this)||this._nonPointGroup.hasLayer(n)},zoomToShowLayer:function(n,t){typeof t!="function"&&(t=()=>{});var e=function(){(n._icon||n.__parent._icon)&&!this._inZoomAnimation&&(this._map.off("moveend",e,this),this.off("animationend",e,this),n._icon?t():n.__parent._icon&&(this.once("spiderfied",t,this),n.__parent.spiderfy()))};n._icon&&this._map.getBounds().contains(n.getLatLng())?t():n.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",e,this),this._map.panTo(n.getLatLng())):(this._map.on("moveend",e,this),this.on("animationend",e,this),n.__parent.zoomToBounds())},onAdd:function(n){this._map=n;var t,e,i;if(!Number.isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(n),this._nonPointGroup.addTo(n),this._gridClusters||this._generateInitialClusters(),this._maxLat=n.options.crs.projection.MAX_LATITUDE,t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],i.newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),e=this._needsClustering,this._needsClustering=[],this.addLayers(e,!0)},onRemove:function(n){n.off("zoomend",this._zoomEnd,this),n.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:n=>{for(var t=n;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:(n,t)=>{for(let e=n.length-1;e>=0;e--)if(n[e]===t)return n.splice(e,1),!0},_removeFromGridUnclustered:function(n,t){for(var e=this._map,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());t>=s&&i[t].removeObject(n,e.project(n.getLatLng(),t));t--);},_childMarkerDragStart:n=>{n.target.__dragStart=n.target._latlng},_childMarkerMoved:function(n){if(!this._ignoreMove&&!n.target.__dragStart){const t=(n.target._popup||null)?.isOpen();this._moveChild(n.target,n.oldLatLng,n.latlng),t&&n.target.openPopup()}},_moveChild:function(n,t,e){n._latlng=t,this.removeLayer(n),n._latlng=e,this.addLayer(n)},_childMarkerDragEnd:function(n){n.target.__dragStart&&this._moveChild(n.target,n.target.__dragStart,n.target._latlng),delete n.target.__dragStart},_removeLayer:function(n,t,e){var i=this._gridClusters,s=this._gridUnclustered,o=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(n,this._maxZoom);var h=n.__parent,l=h._markers,d;for(this._arraySplice(l,n);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<a));)t&&h._childCount<=1?(d=h._markers[0]===n?h._markers[1]:h._markers[0],i[h._zoom].removeObject(h,r.project(h._cLatLng,h._zoom)),s[h._zoom].addObject(d,r.project(d.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(d),d.__parent=h.__parent,h._icon&&(o.removeLayer(h),e||o.addLayer(d))):h._iconNeedsUpdate=!0,h=h.__parent;delete n.__parent},_isOrIsParent:(n,t)=>{for(;t;){if(n===t)return!0;t=t.parentNode}return!1},fire:function(n,t,e){if(t&&t.propagatedFrom instanceof _.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.propagatedFrom._icon,t.originalEvent.relatedTarget))return;n=`cluster${n}`}_.FeatureGroup.prototype.fire.call(this,n,t,e)},listens:function(n,t){return _.FeatureGroup.prototype.listens.call(this,n,t)||_.FeatureGroup.prototype.listens.call(this,`cluster${n}`,t)},_defaultIconCreateFunction:n=>{const t=n.getChildCount();let e=" marker-cluster-";return t<10?e+="small":t<100?e+="medium":e+="large",new _.DivIcon({html:`<div><span>${t}</span></div>`,className:`marker-cluster ${e}`,iconSize:new _.Point(40,40)})},_bindEvents:function(){var n=this._map,t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(t||i)&&this.on("clusterclick",this._zoomOrSpiderfy,this),e&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),n.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(n){const t=n.propagatedFrom;let e=t;for(;e._childClusters.length===1;)e=e._childClusters[0];e._zoom===this._maxZoom&&e._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),n.originalEvent&&n.originalEvent.keyCode===13&&this._map._container.focus()},_showCoverage:function(n){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),n.propagatedFrom.getChildCount()>2&&n.propagatedFrom!==this._spiderfied&&(this._shownPolygon=new _.Polygon(n.propagatedFrom.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var n=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,e=this.options.zoomToBoundsOnClick,i=this._map;(n||e)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),i.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var n=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,n),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),n),this._currentShownBounds=n}},_generateInitialClusters:function(){var n=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),e=this.options.maxClusterRadius,i=e;typeof e!="function"&&(i=()=>e),this.options.disableClusteringAtZoom!==null&&(n=this.options.disableClusteringAtZoom-1),this._maxZoom=n,this._gridClusters={},this._gridUnclustered={};for(let s=n;s>=t;s--)this._gridClusters[s]=new _.DistanceGrid(i(s)),this._gridUnclustered[s]=new _.DistanceGrid(i(s));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(n,t){var e=this._gridClusters,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom()),o,r;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(n),n.on(this._childMarkerEventHandlers,this);t>=s;t--){o=this._map.project(n.getLatLng(),t);let a=e[t].getNearObject(o);if(a){a._addChild(n),n.__parent=a;return}if(a=i[t].getNearObject(o),a){const h=a.__parent;h&&this._removeLayer(a,!1);const l=new this._markerCluster(this,t,a,n);e[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l,n.__parent=l;let d=l;for(r=t-1;r>h._zoom;r--)d=new this._markerCluster(this,r,d),e[r].addObject(d,this._map.project(a.getLatLng(),r));h._addChild(d),this._removeFromGridUnclustered(a,t);return}i[t].addObject(n,o)}this._topClusterLevel._addChild(n),n.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(n=>{n instanceof _.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon()})},_enqueue:function(n){this._queue.push(n),this._queueTimeout||(this._queueTimeout=setTimeout(()=>this._processQueue(),300))},_processQueue:function(){for(let n=0;n<this._queue.length;n++)this._queue[n].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var n=Math.round(this._map._zoom);this._processQueue(),this._zoom<n&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,n)):this._zoom>n?(this._animationStart(),this._animationZoomOut(this._zoom,n)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(_.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(n){var t=this._maxLat;return t!==void 0&&(n.getNorth()>=t&&(n._northEast.lat=1/0),n.getSouth()<=-t&&(n._southWest.lat=-1/0)),n},_animationAddLayerNonAnimated:function(n,t){if(t===n)this._featureGroup.addLayer(n);else if(t._childCount===2){t._addToMap();const e=t.getAllChildMarkers();this._featureGroup.removeLayer(e[0]),this._featureGroup.removeLayer(e[1])}else t._updateIcon()},_extractNonGroupLayers:function(n,t){var e=n.getLayers(),i=0,s;for(t=t||[];i<e.length;i++){if(s=e[i],s instanceof _.LayerGroup){this._extractNonGroupLayers(s,t);continue}t.push(s)}return t},_overrideMarkerIcon:function(n){return n.options.icon=this.options.iconCreateFunction({getChildCount:()=>1,getAllChildMarkers:()=>[n]}),n.options.icon}}),_.MarkerClusterGroup.include({_mapBoundsInfinite:new _.LatLngBounds(new _.LatLng(-1/0,-1/0),new _.LatLng(1/0,1/0))}),_.MarkerClusterGroup.include({_noAnimation:{_animationStart:()=>{},_animationZoomIn:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(n,t){this._animationAddLayerNonAnimated(n,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(n,t){var e=this._getExpandedVisibleBounds(),i=this._featureGroup,s=Math.floor(this._map.getMinZoom()),o;this._ignoreMove=!0,this._topClusterLevel._recursively(e,n,s,r=>{var a=r._latlng,h=r._markers,l;for(e.contains(a)||(a=null),r._isSingleParent()&&n+1===t?(i.removeLayer(r),r._recursivelyAddChildrenToMap(null,t,e)):(r.clusterHide(),r._recursivelyAddChildrenToMap(a,t,e)),o=h.length-1;o>=0;o--)l=h[o],e.contains(l._latlng)||i.removeLayer(l)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(e,t),i.eachLayer(r=>{!(r instanceof _.MarkerCluster)&&r._icon&&r.clusterShow()}),this._topClusterLevel._recursively(e,n,t,r=>{r._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(e,n,s,r=>{i.removeLayer(r),r.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(n,t){this._animationZoomOutSingle(this._topClusterLevel,n-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n,this._getExpandedVisibleBounds())},_animationAddLayer:function(n,t){var e=this._featureGroup;e.addLayer(n),t!==n&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),n._setPos(this._map.latLngToLayerPoint(t.getLatLng())),n.clusterHide(),this._enqueue(()=>{e.removeLayer(n),n.clusterShow(),this._animationEnd()})):(this._forceLayout(),this._animationStart(),this._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(n,t,e){var i=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());n._recursivelyAnimateChildrenInAndAddSelfToMap(i,s,t+1,e);var o=this;this._forceLayout(),n._recursivelyBecomeVisible(i,e),this._enqueue(function(){if(n._childCount===1){const r=n._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else n._recursively(i,e,s,r=>{r._recursivelyRemoveChildrenFromMap(i,s,t+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:()=>{_.Util.falseFn(document.body.offsetWidth)}}),_.MarkerCluster=_.Marker.extend({initialize:function(n,t,e,i){_.Marker.prototype.initialize.call(this,e?e._cLatLng||e.getLatLng():new _.LatLng(0,0),{icon:this,pane:n.options.clusterPane}),this._group=n,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new _.LatLngBounds,e&&this._addChild(e),i&&this._addChild(i)},getAllChildMarkers:function(n){n=n||[];for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(n);for(let t=this._markers.length-1;t>=0;t--)n.push(this._markers[t]);return n},getChildCount:function(){return this._childCount},zoomToBounds:function(n){for(var t=this._childClusters.slice(),e=this._group._map,i=e.getBoundsZoom(this._bounds),s=this._zoom+1,o=e.getZoom(),r;t.length>0&&i>s;){s++;let a=[];for(r=0;r<t.length;r++)a=a.concat(t[r]._childClusters);t=a}i>s?this._group._map.setView(this._latlng,s):i<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,n)},getBounds:function(){var n=new _.LatLngBounds;return n.extend(this._bounds),n},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(n,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(n),n instanceof _.MarkerCluster?(t||(this._childClusters.push(n),n.__parent=this),this._childCount+=n._childCount):(t||this._markers.push(n),this._childCount++),this.__parent&&this.__parent._addChild(n,!0)},_setClusterCenter:function(n){this._cLatLng||(this._cLatLng=n._cLatLng||n._latlng)},_resetBounds:function(){var n=this._bounds;n._southWest&&(n._southWest.lat=1/0,n._southWest.lng=1/0),n._northEast&&(n._northEast.lat=-1/0,n._northEast.lng=-1/0)},_recalculateBounds:function(){var n=this._markers,t=this._childClusters,e=0,i=0,s=this._childCount,o,r,a,h;if(s!==0){for(this._resetBounds(),o=0;o<n.length;o++)a=n[o]._latlng,this._bounds.extend(a),e+=a.lat,i+=a.lng;for(o=0;o<t.length;o++)r=t[o],r._boundsNeedUpdate&&r._recalculateBounds(),this._bounds.extend(r._bounds),a=r._wLatLng,h=r._childCount,e+=a.lat*h,i+=a.lng*h;this._latlng=this._wLatLng=new _.LatLng(e/s,i/s),this._boundsNeedUpdate=!1}},_addToMap:function(n){n&&(this._backupLatlng=this._latlng,this.setLatLng(n)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(n,t,e){this._recursively(n,this._group._map.getMinZoom(),e-1,i=>{var s=i._markers,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())},i=>{var s=i._childClusters,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(n,t,e,i){this._recursively(n,i,t,s=>{s._recursivelyAnimateChildrenIn(n,s._group._map.latLngToLayerPoint(s.getLatLng()).round(),e),s._isSingleParent()&&e-1===i?(s.clusterShow(),s._recursivelyRemoveChildrenFromMap(n,t,e)):s.clusterHide(),s._addToMap()})},_recursivelyBecomeVisible:function(n,t){this._recursively(n,this._group._map.getMinZoom(),t,null,e=>{e.clusterShow()})},_recursivelyAddChildrenToMap:function(n,t,e){this._recursively(e,this._group._map.getMinZoom()-1,t,i=>{if(t!==i._zoom)for(let s=i._markers.length-1;s>=0;s--){const o=i._markers[s];e.contains(o._latlng)&&(n&&(o._backupLatlng=o.getLatLng(),o.setLatLng(n),o.clusterHide&&o.clusterHide()),i._group._featureGroup.addLayer(o))}},i=>{i._addToMap(n)})},_recursivelyRestoreChildPositions:function(n){for(let t=this._markers.length-1;t>=0;t--){const e=this._markers[t];e._backupLatlng&&(e.setLatLng(e._backupLatlng),delete e._backupLatlng)}if(n-1===this._zoom)for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._restorePosition();else for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._recursivelyRestoreChildPositions(n)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(n,t,e,i){var s,o;this._recursively(n,t-1,e-1,r=>{for(o=r._markers.length-1;o>=0;o--)s=r._markers[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())},r=>{for(o=r._childClusters.length-1;o>=0;o--)s=r._childClusters[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())})},_recursively:function(n,t,e,i,s){var o=this._childClusters,r=this._zoom,a,h;if(t<=r&&(i&&i(this),s&&r===e&&s(this)),r<t||r<e)for(a=o.length-1;a>=0;a--)h=o[a],n.intersects(h._bounds)&&h._recursively(n,t,e,i,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),_.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var n=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,n}}),_.DistanceGrid=function(n){this._cellSize=n,this._sqCellSize=n*n,this._grid={},this._objectPoint={}},_.DistanceGrid.prototype={addObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a=_.Util.stamp(n);this._objectPoint[a]=t,r.push(n)},updateObject:function(n,t){this.removeObject(n),this.addObject(n,t)},removeObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a,h;for(delete this._objectPoint[_.Util.stamp(n)],a=0,h=r.length;a<h;a++)if(r[a]===n)return r.splice(a,1),h===1&&delete o[e],!0},eachObject:function(n,t){var e,i,s,o,r,a,h,l=this._grid;for(e in l){r=l[e];for(i in r)for(a=r[i],s=0,o=a.length;s<o;s++)h=n.call(t,a[s]),h&&(s--,o--)}},getNearObject:function(n){var t=this._getCoord(n.x),e=this._getCoord(n.y),i,s,o,r,a,h,l,d,c=this._objectPoint,f=this._sqCellSize,m=null;for(i=e-1;i<=e+1;i++)if(r=this._grid[i],r){for(s=t-1;s<=t+1;s++)if(a=r[s],a)for(o=0,h=a.length;o<h;o++)l=a[o],d=this._sqDist(c[_.Util.stamp(l)],n),d<f&&(f=d,m=l)}return m},_getCoord:function(n){return Math.floor(n/this._cellSize)},_sqDist:(n,t)=>{var e=t.x-n.x,i=t.y-n.y;return e*e+i*i}},_.QuickHull={getDistant:(n,t)=>{var e=t[1].lat-t[0].lat,i=t[0].lng-t[1].lng;return i*(n.lat-t[0].lat)+e*(n.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(n,t){var e=0,i=null,s=[],o,r,a;for(o=t.length-1;o>=0;o--){if(r=t[o],a=this.getDistant(r,n),a>0)s.push(r);else continue;a>e&&(e=a,i=r)}return{maxPoint:i,newPoints:s}},buildConvexHull:function(n,t){var e=[],i=this.findMostDistantPointFromBaseLine(n,t);return i.maxPoint?(e=e.concat(this.buildConvexHull([n[0],i.maxPoint],i.newPoints)),e=e.concat(this.buildConvexHull([i.maxPoint,n[1]],i.newPoints)),e):[n[0]]},getConvexHull:function(n){var t=!1,e=!1,i=!1,s=!1,o=null,r=null,a=null,h=null,l=null,d=null,c;for(c=n.length-1;c>=0;c--){const m=n[c];(t===!1||m.lat>t)&&(o=m,t=m.lat),(e===!1||m.lat<e)&&(r=m,e=m.lat),(i===!1||m.lng>i)&&(a=m,i=m.lng),(s===!1||m.lng<s)&&(h=m,s=m.lng)}e!==t?(d=r,l=o):(d=h,l=a);var f=[].concat(this.buildConvexHull([d,l],n),this.buildConvexHull([l,d],n));return f}},_.MarkerCluster.include({getConvexHull:function(){var n=this.getAllChildMarkers(),t=[],e,i;for(i=n.length-1;i>=0;i--)e=n[i].getLatLng(),t.push(e);return _.QuickHull.getConvexHull(t)}}),_.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var n=this.getAllChildMarkers(),t=this._group,e=t._map,i=e.latLngToLayerPoint(this._latlng),s;this._group._unspiderfy(),this._group._spiderfied=this,n.length>=this._circleSpiralSwitchover?s=this._generatePointsSpiral(n.length,i):(i.y+=10,s=this._generatePointsCircle(n.length,i)),this._animationSpiderfy(n,s)}},unspiderfy:function(n){this._group._inZoomAnimation||(this._animationUnspiderfy(n),this._group._spiderfied=null)},_generatePointsCircle:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+n),i=e/this._2PI,s=this._2PI/n,o=[],r,a;for(o.length=n,r=n-1;r>=0;r--)a=this._circleStartAngle+r*s,o[r]=new _.Point(t.x+i*Math.cos(a),t.y+i*Math.sin(a))._round();return o},_generatePointsSpiral:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier,i=e*this._spiralLengthStart,s=e*this._spiralFootSeparation,o=e*this._spiralLengthFactor*this._2PI,r=0,a=[],h;for(a.length=n,h=n-1;h>=0;h--)r+=s/i+h*5e-4,a[h]=new _.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round(),i+=o/r;return a},_noanimationUnspiderfy:function(){var n=this._group,t=n._map,e=n._featureGroup,i=this.getAllChildMarkers(),s,o;for(n._ignoreMove=!0,this.setOpacity(1),o=i.length-1;o>=0;o--)s=i[o],e.removeLayer(s),s._preSpiderfyLatlng&&(s.setLatLng(s._preSpiderfyLatlng),delete s._preSpiderfyLatlng),s.setZIndexOffset&&s.setZIndexOffset(0),s._spiderLeg&&(t.removeLayer(s._spiderLeg),delete s._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:i}),n._ignoreMove=!1,n._spiderfied=null}}),_.MarkerClusterNonAnimated=_.MarkerCluster.extend({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._group.options.spiderLegPolylineOptions,r,a,h,l;for(e._ignoreMove=!0,r=0;r<n.length;r++)l=i.layerPointToLatLng(t[r]),a=n[r],h=new _.Polyline([this._latlng,l],o),i.addLayer(h),a._spiderLeg=h,a._preSpiderfyLatlng=a._latlng,a.setLatLng(l),a.setZIndexOffset&&a.setZIndexOffset(1e6),s.addLayer(a);this.setOpacity(.3),e._ignoreMove=!1,e.fire("spiderfied",{cluster:this,markers:n})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),_.MarkerCluster.include({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._latlng,r=i.latLngToLayerPoint(o),a=_.Path.SVG,h=Object.assign({},this._group.options.spiderLegPolylineOptions),l=h.opacity,d,c,f,m,C,k;for(l===void 0&&(l=_.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),a?(h.opacity=0,h.className=`${h.className||""} leaflet-cluster-spider-leg`):h.opacity=l,e._ignoreMove=!0,d=0;d<n.length;d++)c=n[d],k=i.layerPointToLatLng(t[d]),f=new _.Polyline([o,k],h),i.addLayer(f),c._spiderLeg=f,a&&(m=f._path,C=m.getTotalLength()+.1,m.style.strokeDasharray=C,m.style.strokeDashoffset=C),c.setZIndexOffset&&c.setZIndexOffset(1e6),c.clusterHide&&c.clusterHide(),s.addLayer(c),c._setPos&&c._setPos(r);for(e._forceLayout(),e._animationStart(),d=n.length-1;d>=0;d--)k=i.layerPointToLatLng(t[d]),c=n[d],c._preSpiderfyLatlng=c._latlng,c.setLatLng(k),c.clusterShow&&c.clusterShow(),a&&(f=c._spiderLeg,m=f._path,m.style.strokeDashoffset=0,f.setStyle({opacity:l}));this.setOpacity(.3),e._ignoreMove=!1,setTimeout(()=>{e._animationEnd(),e.fire("spiderfied",{cluster:this,markers:n})},200)},_animationUnspiderfy:function(n){var t=this._group,e=t._map,i=t._featureGroup,s=n?e._latLngToNewLayerPoint(this._latlng,n.zoom,n.center):e.latLngToLayerPoint(this._latlng),o=this.getAllChildMarkers(),r=_.Path.SVG,a,h,l,d,c,f;for(t._ignoreMove=!0,t._animationStart(),this.setOpacity(1),h=o.length-1;h>=0;h--)a=o[h],a._preSpiderfyLatlng&&(a.closePopup(),a.setLatLng(a._preSpiderfyLatlng),delete a._preSpiderfyLatlng,f=!0,a._setPos&&(a._setPos(s),f=!1),a.clusterHide&&(a.clusterHide(),f=!1),f&&i.removeLayer(a),r&&(l=a._spiderLeg,d=l._path,c=d.getTotalLength()+.1,d.style.strokeDashoffset=c,l.setStyle({opacity:0})));t._ignoreMove=!1,setTimeout(()=>{var m=0;for(h=o.length-1;h>=0;h--)a=o[h],a._spiderLeg&&m++;for(h=o.length-1;h>=0;h--)a=o[h],a._spiderLeg&&(a.clusterShow&&a.clusterShow(),a.setZIndexOffset&&a.setZIndexOffset(0),m>1&&i.removeLayer(a),e.removeLayer(a._spiderLeg),delete a._spiderLeg);t._animationEnd(),t.fire("unspiderfied",{cluster:this,markers:o})},200)}}),_.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(...n){this._unspiderfy.apply(this,n)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),_.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(n){this._map._mapPane.classList.contains("leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(n))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(n){this._spiderfied&&this._spiderfied.unspiderfy(n)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(n){n._spiderLeg&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow(),n.setZIndexOffset&&n.setZIndexOffset(0),this._map.removeLayer(n._spiderLeg),delete n._spiderLeg)}}),_.MarkerClusterGroup.include({refreshClusters:function(n){return n?n instanceof _.MarkerClusterGroup?n=n._topClusterLevel.getAllChildMarkers():n instanceof _.LayerGroup?n=n._layers:n instanceof _.MarkerCluster?n=n.getAllChildMarkers():n instanceof _.Marker&&(n=[n]):n=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(n),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(n),this},_flagParentsIconsNeedUpdate:n=>{var t,e;for(t in n)for(e=n[t].__parent;e;)e._iconNeedsUpdate=!0,e=e.__parent},_refreshSingleMarkerModeMarkers:function(n){var t,e;for(t in n)e=n[t],this.hasLayer(e)&&e.setIcon(this._overrideMarkerIcon(e))}}),_.Marker.include({refreshIconOptions:function(n,t){var e=this.options.icon;return _.setOptions(e,n),this.setIcon(e),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}});const Pn=[[57.5,4.73],[71.5,31.44]],Cn="https://cache.kartverket.no/v1/wmts/1.0.0/topo/default/webmercator/{z}/{y}/{x}.png";class qt extends bn{cluster;map;_popup;static get observedAttributes(){return["data-view","data-scrollzoom"]}constructor(){super(),this.attachShadow({mode:"open"}).append(Me("style",{},`${yn}
687
- ${Ln}`),Me("slot"),Me("div"))}connectedCallback(){const t=this.shadowRoot?.lastElementChild,e=Number(ke(this,"data-cluster"))||1,i=new _.TileLayer(Cn,{attribution:"&copy; Kartverket",maxZoom:18});this.map=new _.Map(t,{attributionControl:!1,wheelPxPerZoomLevel:20,zoomControl:!1,zoomSnap:0,layers:[i]}),this.cluster=new _.MarkerClusterGroup({disableClusteringAtZoom:e,showCoverageOnHover:!1,zoomToBoundsOnClick:!0}).addTo(this.map),this.map.addControl(new _.Control.Attribution({prefix:""})),this.map.addControl(new _.Control.Zoom({position:"bottomright"})),qt.observedAttributes.forEach(s=>{this.attributeChangedCallback(s,null,ke(this,s))})}attributeChangedCallback(t,e=null,i=null){this.map&&(t==="data-view"&&this.setView(i||""),t==="data-scrollzoom"&&this.map.scrollWheelZoom[i==="false"?"disable":"enable"]())}setView(t,e){const i=`${t}`.split(",").map(parseFloat).filter(Number.isFinite),s=this.cluster?.getBounds();i.length===3?this.map?.setView([i[0],i[1]],i[2],e):t!=="fit"?this.map?.fitBounds(Pn,e):s?.isValid()?this.map?.fitBounds(s,e||{padding:[40,40]}):this.cluster?.on("layeradd",Ei,this)}addMarker(t,e){return new _.Marker(t,e).addTo(this.cluster)}disconnectedCallback(){this.map?.remove()}}xn&&!window.customElements.get("mtds-atlas")&&(_.Marker.prototype.options.icon=new _.DivIcon({html:'<svg class="map-pin" viewBox="0 0 256 256"><rect x="78" y="50" width="100" height="100" /><path fill="var(--mtds-)" d="M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z"/></svg>',iconSize:[30,30],iconAnchor:[15,30],popupAnchor:[0,-15]}),window.customElements.define("mtds-atlas",qt));const Ei=wn(function(){this.cluster?.off("layeradd",Ei),this.cluster?.getBounds().isValid()&&this.setView("fit")},100);return D.L=_,D.MTDSAtlasElement=qt,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),D}({});
688
+ `;_.MarkerClusterGroup=_.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(n){_.Util.setOptions(this,n),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this.options.clusterPane||(this.options.clusterPane=_.Marker.prototype.options.pane),this._featureGroup=new _.FeatureGroup,this._featureGroup.addEventParent(this),this._nonPointGroup=new _.FeatureGroup,this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var t=_.DomUtil.TRANSITION&&this.options.animate;Object.assign(this,t?this._withAnimation:this._noAnimation),this._markerCluster=t?_.MarkerCluster:_.MarkerClusterNonAnimated},addLayer:function(n){if(n instanceof _.LayerGroup)return this.addLayers([n]);if(!n.getLatLng)return this._nonPointGroup.addLayer(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(!this._map)return this._needsClustering.push(n),this.fire("layeradd",{layer:n,propagatedFrom:n}),this;if(this.hasLayer(n))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(n,this._maxZoom),this.fire("layeradd",{layer:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var t=n,e=this._zoom;if(n.__parent)for(;t.__parent._zoom>=e;)t=t.__parent;return this._currentShownBounds.contains(t.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(n,t):this._animationAddLayerNonAnimated(n,t)),this},removeLayer:function(n){return n instanceof _.LayerGroup?this.removeLayers([n]):n.getLatLng?this._map?n.__parent?(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(n)),this._removeLayer(n,!0),this.fire("layerremove",{layer:n,propagatedFrom:n}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),n.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(n)&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow()),this):this:(!this._arraySplice(this._needsClustering,n)&&this.hasLayer(n)&&this._needsRemoving.push({layer:n,latlng:n._latlng}),this.fire("layerremove",{layer:n,propagatedFrom:n}),this):(this._nonPointGroup.removeLayer(n),this.fire("layerremove",{layer:n,propagatedFrom:n}),this)},addLayers:function(n,t){if(!Array.isArray(n))return this.addLayer(n);var e=this._featureGroup,i=this._nonPointGroup,s=this.options.chunkedLoading,o=this.options.chunkInterval,r=this.options.chunkProgress,a=n.length,h=0,l=!0,d;if(this._map){const c=Date.now(),f=()=>{for(var m=Date.now();h<a&&!(s&&h%200===0&&Date.now()-m>o);h++){if(d=n[h],d instanceof _.LayerGroup){l&&(n=n.slice(),l=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d),t||this.fire("layeradd",{layer:d,propagatedFrom:d});continue}if(!this.hasLayer(d)&&(this._addLayer(d,this._maxZoom),t||this.fire("layeradd",{layer:d,propagatedFrom:d}),d.__parent&&d.__parent.getChildCount()===2)){const C=d.__parent.getAllChildMarkers(),k=C[0]===d?C[1]:C[0];e.removeLayer(k)}}r&&r(h,a,Date.now()-c),h===a?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(f,this.options.chunkDelay)};f()}else{const c=this._needsClustering;for(;h<a;h++){if(d=n[h],d instanceof _.LayerGroup){l&&(n=n.slice(),l=!1),this._extractNonGroupLayers(d,n),a=n.length;continue}if(!d.getLatLng){i.addLayer(d);continue}this.hasLayer(d)||c.push(d)}}return this},removeLayers:function(n){var t,e,i=n.length,s=this._featureGroup,o=this._nonPointGroup,r=!0;if(!this._map){for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}this._arraySplice(this._needsClustering,e),o.removeLayer(e),this.hasLayer(e)&&this._needsRemoving.push({layer:e,latlng:e._latlng}),this.fire("layerremove",{layer:e,propagatedFrom:e})}return this}if(this._unspiderfy){this._unspiderfy();const a=n.slice();let h=i;for(t=0;t<h;t++){if(e=a[t],e instanceof _.LayerGroup){this._extractNonGroupLayers(e,a),h=a.length;continue}this._unspiderfyLayer(e)}}for(t=0;t<i;t++){if(e=n[t],e instanceof _.LayerGroup){r&&(n=n.slice(),r=!1),this._extractNonGroupLayers(e,n),i=n.length;continue}if(!e.__parent){o.removeLayer(e),this.fire("layerremove",{layer:e,propagatedFrom:e});continue}this._removeLayer(e,!0,!0),this.fire("layerremove",{layer:e,propagatedFrom:e}),s.hasLayer(e)&&(s.removeLayer(e),e.clusterShow&&e.clusterShow())}return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer(function(n){n.off(this._childMarkerEventHandlers,this),delete n.__parent},this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var n=new _.LatLngBounds;this._topClusterLevel&&n.extend(this._topClusterLevel._bounds);for(let t=this._needsClustering.length-1;t>=0;t--)n.extend(this._needsClustering[t].getLatLng());return n.extend(this._nonPointGroup.getBounds()),n},eachLayer:function(n,t){var e=this._needsClustering.slice(),i=this._needsRemoving,s,o,r;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(e),o=e.length-1;o>=0;o--){for(s=!0,r=i.length-1;r>=0;r--)if(i[r].layer===e[o]){s=!1;break}s&&n.call(t,e[o])}this._nonPointGroup.eachLayer(n,t)},getLayers:function(){var n=[];return this.eachLayer(t=>{n.push(t)}),n},getLayer:function(n){var t=null;return n=parseInt(n,10),this.eachLayer(e=>{_.stamp(e)===n&&(t=e)}),t},hasLayer:function(n){if(!n)return!1;var t,e=this._needsClustering;for(t=e.length-1;t>=0;t--)if(e[t]===n)return!0;for(e=this._needsRemoving,t=e.length-1;t>=0;t--)if(e[t].layer===n)return!1;return!!(n.__parent&&n.__parent._group===this)||this._nonPointGroup.hasLayer(n)},zoomToShowLayer:function(n,t){typeof t!="function"&&(t=()=>{});var e=function(){(n._icon||n.__parent._icon)&&!this._inZoomAnimation&&(this._map.off("moveend",e,this),this.off("animationend",e,this),n._icon?t():n.__parent._icon&&(this.once("spiderfied",t,this),n.__parent.spiderfy()))};n._icon&&this._map.getBounds().contains(n.getLatLng())?t():n.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",e,this),this._map.panTo(n.getLatLng())):(this._map.on("moveend",e,this),this.on("animationend",e,this),n.__parent.zoomToBounds())},onAdd:function(n){this._map=n;var t,e,i;if(!Number.isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(n),this._nonPointGroup.addTo(n),this._gridClusters||this._generateInitialClusters(),this._maxLat=n.options.crs.projection.MAX_LATITUDE,t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],i.newlatlng=i.layer._latlng,i.layer._latlng=i.latlng;for(t=0,e=this._needsRemoving.length;t<e;t++)i=this._needsRemoving[t],this._removeLayer(i.layer,!0),i.layer._latlng=i.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),e=this._needsClustering,this._needsClustering=[],this.addLayers(e,!0)},onRemove:function(n){n.off("zoomend",this._zoomEnd,this),n.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:n=>{for(var t=n;t&&!t._icon;)t=t.__parent;return t||null},_arraySplice:(n,t)=>{for(let e=n.length-1;e>=0;e--)if(n[e]===t)return n.splice(e,1),!0},_removeFromGridUnclustered:function(n,t){for(var e=this._map,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());t>=s&&i[t].removeObject(n,e.project(n.getLatLng(),t));t--);},_childMarkerDragStart:n=>{n.target.__dragStart=n.target._latlng},_childMarkerMoved:function(n){if(!this._ignoreMove&&!n.target.__dragStart){const t=(n.target._popup||null)?.isOpen();this._moveChild(n.target,n.oldLatLng,n.latlng),t&&n.target.openPopup()}},_moveChild:function(n,t,e){n._latlng=t,this.removeLayer(n),n._latlng=e,this.addLayer(n)},_childMarkerDragEnd:function(n){n.target.__dragStart&&this._moveChild(n.target,n.target.__dragStart,n.target._latlng),delete n.target.__dragStart},_removeLayer:function(n,t,e){var i=this._gridClusters,s=this._gridUnclustered,o=this._featureGroup,r=this._map,a=Math.floor(this._map.getMinZoom());t&&this._removeFromGridUnclustered(n,this._maxZoom);var h=n.__parent,l=h._markers,d;for(this._arraySplice(l,n);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom<a));)t&&h._childCount<=1?(d=h._markers[0]===n?h._markers[1]:h._markers[0],i[h._zoom].removeObject(h,r.project(h._cLatLng,h._zoom)),s[h._zoom].addObject(d,r.project(d.getLatLng(),h._zoom)),this._arraySplice(h.__parent._childClusters,h),h.__parent._markers.push(d),d.__parent=h.__parent,h._icon&&(o.removeLayer(h),e||o.addLayer(d))):h._iconNeedsUpdate=!0,h=h.__parent;delete n.__parent},_isOrIsParent:(n,t)=>{for(;t;){if(n===t)return!0;t=t.parentNode}return!1},fire:function(n,t,e){if(t&&t.propagatedFrom instanceof _.MarkerCluster){if(t.originalEvent&&this._isOrIsParent(t.propagatedFrom._icon,t.originalEvent.relatedTarget))return;n=`cluster${n}`}_.FeatureGroup.prototype.fire.call(this,n,t,e)},listens:function(n,t){return _.FeatureGroup.prototype.listens.call(this,n,t)||_.FeatureGroup.prototype.listens.call(this,`cluster${n}`,t)},_defaultIconCreateFunction:n=>{const t=n.getChildCount();let e=" marker-cluster-";return t<10?e+="small":t<100?e+="medium":e+="large",new _.DivIcon({html:`<div><span>${t}</span></div>`,className:`marker-cluster ${e}`,iconSize:new _.Point(40,40)})},_bindEvents:function(){var n=this._map,t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick;(t||i)&&this.on("clusterclick",this._zoomOrSpiderfy,this),e&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),n.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(n){const t=n.propagatedFrom;let e=t;for(;e._childClusters.length===1;)e=e._childClusters[0];e._zoom===this._maxZoom&&e._childCount===t._childCount&&this.options.spiderfyOnMaxZoom?t.spiderfy():this.options.zoomToBoundsOnClick&&t.zoomToBounds(),n.originalEvent&&n.originalEvent.keyCode===13&&this._map._container.focus()},_showCoverage:function(n){var t=this._map;this._inZoomAnimation||(this._shownPolygon&&t.removeLayer(this._shownPolygon),n.propagatedFrom.getChildCount()>2&&n.propagatedFrom!==this._spiderfied&&(this._shownPolygon=new _.Polygon(n.propagatedFrom.getConvexHull(),this.options.polygonOptions),t.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var n=this.options.spiderfyOnMaxZoom,t=this.options.showCoverageOnHover,e=this.options.zoomToBoundsOnClick,i=this._map;(n||e)&&this.off("clusterclick",this._zoomOrSpiderfy,this),t&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),i.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var n=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,n),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),n),this._currentShownBounds=n}},_generateInitialClusters:function(){var n=Math.ceil(this._map.getMaxZoom()),t=Math.floor(this._map.getMinZoom()),e=this.options.maxClusterRadius,i=e;typeof e!="function"&&(i=()=>e),this.options.disableClusteringAtZoom!==null&&(n=this.options.disableClusteringAtZoom-1),this._maxZoom=n,this._gridClusters={},this._gridUnclustered={};for(let s=n;s>=t;s--)this._gridClusters[s]=new _.DistanceGrid(i(s)),this._gridUnclustered[s]=new _.DistanceGrid(i(s));this._topClusterLevel=new this._markerCluster(this,t-1)},_addLayer:function(n,t){var e=this._gridClusters,i=this._gridUnclustered,s=Math.floor(this._map.getMinZoom()),o,r;for(this.options.singleMarkerMode&&this._overrideMarkerIcon(n),n.on(this._childMarkerEventHandlers,this);t>=s;t--){o=this._map.project(n.getLatLng(),t);let a=e[t].getNearObject(o);if(a){a._addChild(n),n.__parent=a;return}if(a=i[t].getNearObject(o),a){const h=a.__parent;h&&this._removeLayer(a,!1);const l=new this._markerCluster(this,t,a,n);e[t].addObject(l,this._map.project(l._cLatLng,t)),a.__parent=l,n.__parent=l;let d=l;for(r=t-1;r>h._zoom;r--)d=new this._markerCluster(this,r,d),e[r].addObject(d,this._map.project(a.getLatLng(),r));h._addChild(d),this._removeFromGridUnclustered(a,t);return}i[t].addObject(n,o)}this._topClusterLevel._addChild(n),n.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(n=>{n instanceof _.MarkerCluster&&n._iconNeedsUpdate&&n._updateIcon()})},_enqueue:function(n){this._queue.push(n),this._queueTimeout||(this._queueTimeout=setTimeout(()=>this._processQueue(),300))},_processQueue:function(){for(let n=0;n<this._queue.length;n++)this._queue[n].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var n=Math.round(this._map._zoom);this._processQueue(),this._zoom<n&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,n)):this._zoom>n?(this._animationStart(),this._animationZoomOut(this._zoom,n)):this._moveEnd()},_getExpandedVisibleBounds:function(){if(this.options.removeOutsideVisibleBounds){if(_.Browser.mobile)return this._checkBoundsMaxLat(this._map.getBounds())}else return this._mapBoundsInfinite;return this._checkBoundsMaxLat(this._map.getBounds().pad(1))},_checkBoundsMaxLat:function(n){var t=this._maxLat;return t!==void 0&&(n.getNorth()>=t&&(n._northEast.lat=1/0),n.getSouth()<=-t&&(n._southWest.lat=-1/0)),n},_animationAddLayerNonAnimated:function(n,t){if(t===n)this._featureGroup.addLayer(n);else if(t._childCount===2){t._addToMap();const e=t.getAllChildMarkers();this._featureGroup.removeLayer(e[0]),this._featureGroup.removeLayer(e[1])}else t._updateIcon()},_extractNonGroupLayers:function(n,t){var e=n.getLayers(),i=0,s;for(t=t||[];i<e.length;i++){if(s=e[i],s instanceof _.LayerGroup){this._extractNonGroupLayers(s,t);continue}t.push(s)}return t},_overrideMarkerIcon:function(n){return n.options.icon=this.options.iconCreateFunction({getChildCount:()=>1,getAllChildMarkers:()=>[n]}),n.options.icon}}),_.MarkerClusterGroup.include({_mapBoundsInfinite:new _.LatLngBounds(new _.LatLng(-1/0,-1/0),new _.LatLng(1/0,1/0))}),_.MarkerClusterGroup.include({_noAnimation:{_animationStart:()=>{},_animationZoomIn:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(n,t){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(n,t){this._animationAddLayerNonAnimated(n,t)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(n,t){var e=this._getExpandedVisibleBounds(),i=this._featureGroup,s=Math.floor(this._map.getMinZoom()),o;this._ignoreMove=!0,this._topClusterLevel._recursively(e,n,s,r=>{var a=r._latlng,h=r._markers,l;for(e.contains(a)||(a=null),r._isSingleParent()&&n+1===t?(i.removeLayer(r),r._recursivelyAddChildrenToMap(null,t,e)):(r.clusterHide(),r._recursivelyAddChildrenToMap(a,t,e)),o=h.length-1;o>=0;o--)l=h[o],e.contains(l._latlng)||i.removeLayer(l)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(e,t),i.eachLayer(r=>{!(r instanceof _.MarkerCluster)&&r._icon&&r.clusterShow()}),this._topClusterLevel._recursively(e,n,t,r=>{r._recursivelyRestoreChildPositions(t)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(e,n,s,r=>{i.removeLayer(r),r.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(n,t){this._animationZoomOutSingle(this._topClusterLevel,n-1,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,t,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),n,this._getExpandedVisibleBounds())},_animationAddLayer:function(n,t){var e=this._featureGroup;e.addLayer(n),t!==n&&(t._childCount>2?(t._updateIcon(),this._forceLayout(),this._animationStart(),n._setPos(this._map.latLngToLayerPoint(t.getLatLng())),n.clusterHide(),this._enqueue(()=>{e.removeLayer(n),n.clusterShow(),this._animationEnd()})):(this._forceLayout(),this._animationStart(),this._animationZoomOutSingle(t,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(n,t,e){var i=this._getExpandedVisibleBounds(),s=Math.floor(this._map.getMinZoom());n._recursivelyAnimateChildrenInAndAddSelfToMap(i,s,t+1,e);var o=this;this._forceLayout(),n._recursivelyBecomeVisible(i,e),this._enqueue(function(){if(n._childCount===1){const r=n._markers[0];this._ignoreMove=!0,r.setLatLng(r.getLatLng()),this._ignoreMove=!1,r.clusterShow&&r.clusterShow()}else n._recursively(i,e,s,r=>{r._recursivelyRemoveChildrenFromMap(i,s,t+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:()=>{_.Util.falseFn(document.body.offsetWidth)}}),_.MarkerCluster=_.Marker.extend({initialize:function(n,t,e,i){_.Marker.prototype.initialize.call(this,e?e._cLatLng||e.getLatLng():new _.LatLng(0,0),{icon:this,pane:n.options.clusterPane}),this._group=n,this._zoom=t,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new _.LatLngBounds,e&&this._addChild(e),i&&this._addChild(i)},getAllChildMarkers:function(n){n=n||[];for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t].getAllChildMarkers(n);for(let t=this._markers.length-1;t>=0;t--)n.push(this._markers[t]);return n},getChildCount:function(){return this._childCount},zoomToBounds:function(n){for(var t=this._childClusters.slice(),e=this._group._map,i=e.getBoundsZoom(this._bounds),s=this._zoom+1,o=e.getZoom(),r;t.length>0&&i>s;){s++;let a=[];for(r=0;r<t.length;r++)a=a.concat(t[r]._childClusters);t=a}i>s?this._group._map.setView(this._latlng,s):i<=o?this._group._map.setView(this._latlng,o+1):this._group._map.fitBounds(this._bounds,n)},getBounds:function(){var n=new _.LatLngBounds;return n.extend(this._bounds),n},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(n,t){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(n),n instanceof _.MarkerCluster?(t||(this._childClusters.push(n),n.__parent=this),this._childCount+=n._childCount):(t||this._markers.push(n),this._childCount++),this.__parent&&this.__parent._addChild(n,!0)},_setClusterCenter:function(n){this._cLatLng||(this._cLatLng=n._cLatLng||n._latlng)},_resetBounds:function(){var n=this._bounds;n._southWest&&(n._southWest.lat=1/0,n._southWest.lng=1/0),n._northEast&&(n._northEast.lat=-1/0,n._northEast.lng=-1/0)},_recalculateBounds:function(){var n=this._markers,t=this._childClusters,e=0,i=0,s=this._childCount,o,r,a,h;if(s!==0){for(this._resetBounds(),o=0;o<n.length;o++)a=n[o]._latlng,this._bounds.extend(a),e+=a.lat,i+=a.lng;for(o=0;o<t.length;o++)r=t[o],r._boundsNeedUpdate&&r._recalculateBounds(),this._bounds.extend(r._bounds),a=r._wLatLng,h=r._childCount,e+=a.lat*h,i+=a.lng*h;this._latlng=this._wLatLng=new _.LatLng(e/s,i/s),this._boundsNeedUpdate=!1}},_addToMap:function(n){n&&(this._backupLatlng=this._latlng,this.setLatLng(n)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(n,t,e){this._recursively(n,this._group._map.getMinZoom(),e-1,i=>{var s=i._markers,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())},i=>{var s=i._childClusters,o,r;for(o=s.length-1;o>=0;o--)r=s[o],r._icon&&(r._setPos(t),r.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(n,t,e,i){this._recursively(n,i,t,s=>{s._recursivelyAnimateChildrenIn(n,s._group._map.latLngToLayerPoint(s.getLatLng()).round(),e),s._isSingleParent()&&e-1===i?(s.clusterShow(),s._recursivelyRemoveChildrenFromMap(n,t,e)):s.clusterHide(),s._addToMap()})},_recursivelyBecomeVisible:function(n,t){this._recursively(n,this._group._map.getMinZoom(),t,null,e=>{e.clusterShow()})},_recursivelyAddChildrenToMap:function(n,t,e){this._recursively(e,this._group._map.getMinZoom()-1,t,i=>{if(t!==i._zoom)for(let s=i._markers.length-1;s>=0;s--){const o=i._markers[s];e.contains(o._latlng)&&(n&&(o._backupLatlng=o.getLatLng(),o.setLatLng(n),o.clusterHide&&o.clusterHide()),i._group._featureGroup.addLayer(o))}},i=>{i._addToMap(n)})},_recursivelyRestoreChildPositions:function(n){for(let t=this._markers.length-1;t>=0;t--){const e=this._markers[t];e._backupLatlng&&(e.setLatLng(e._backupLatlng),delete e._backupLatlng)}if(n-1===this._zoom)for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._restorePosition();else for(let t=this._childClusters.length-1;t>=0;t--)this._childClusters[t]._recursivelyRestoreChildPositions(n)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(n,t,e,i){var s,o;this._recursively(n,t-1,e-1,r=>{for(o=r._markers.length-1;o>=0;o--)s=r._markers[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())},r=>{for(o=r._childClusters.length-1;o>=0;o--)s=r._childClusters[o],(!i||!i.contains(s._latlng))&&(r._group._featureGroup.removeLayer(s),s.clusterShow&&s.clusterShow())})},_recursively:function(n,t,e,i,s){var o=this._childClusters,r=this._zoom,a,h;if(t<=r&&(i&&i(this),s&&r===e&&s(this)),r<t||r<e)for(a=o.length-1;a>=0;a--)h=o[a],n.intersects(h._bounds)&&h._recursively(n,t,e,i,s)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}}),_.Marker.include({clusterHide:function(){return this.options.opacityWhenUnclustered=this.options.opacity||1,this.setOpacity(0)},clusterShow:function(){var n=this.setOpacity(this.options.opacity||this.options.opacityWhenUnclustered);return delete this.options.opacityWhenUnclustered,n}}),_.DistanceGrid=function(n){this._cellSize=n,this._sqCellSize=n*n,this._grid={},this._objectPoint={}},_.DistanceGrid.prototype={addObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a=_.Util.stamp(n);this._objectPoint[a]=t,r.push(n)},updateObject:function(n,t){this.removeObject(n),this.addObject(n,t)},removeObject:function(n,t){var e=this._getCoord(t.x),i=this._getCoord(t.y),s=this._grid;s[i]=s[i]||{};var o=s[i];o[e]=o[e]||[];var r=o[e],a,h;for(delete this._objectPoint[_.Util.stamp(n)],a=0,h=r.length;a<h;a++)if(r[a]===n)return r.splice(a,1),h===1&&delete o[e],!0},eachObject:function(n,t){var e,i,s,o,r,a,h,l=this._grid;for(e in l){r=l[e];for(i in r)for(a=r[i],s=0,o=a.length;s<o;s++)h=n.call(t,a[s]),h&&(s--,o--)}},getNearObject:function(n){var t=this._getCoord(n.x),e=this._getCoord(n.y),i,s,o,r,a,h,l,d,c=this._objectPoint,f=this._sqCellSize,m=null;for(i=e-1;i<=e+1;i++)if(r=this._grid[i],r){for(s=t-1;s<=t+1;s++)if(a=r[s],a)for(o=0,h=a.length;o<h;o++)l=a[o],d=this._sqDist(c[_.Util.stamp(l)],n),d<f&&(f=d,m=l)}return m},_getCoord:function(n){return Math.floor(n/this._cellSize)},_sqDist:(n,t)=>{var e=t.x-n.x,i=t.y-n.y;return e*e+i*i}},_.QuickHull={getDistant:(n,t)=>{var e=t[1].lat-t[0].lat,i=t[0].lng-t[1].lng;return i*(n.lat-t[0].lat)+e*(n.lng-t[0].lng)},findMostDistantPointFromBaseLine:function(n,t){var e=0,i=null,s=[],o,r,a;for(o=t.length-1;o>=0;o--){if(r=t[o],a=this.getDistant(r,n),a>0)s.push(r);else continue;a>e&&(e=a,i=r)}return{maxPoint:i,newPoints:s}},buildConvexHull:function(n,t){var e=[],i=this.findMostDistantPointFromBaseLine(n,t);return i.maxPoint?(e=e.concat(this.buildConvexHull([n[0],i.maxPoint],i.newPoints)),e=e.concat(this.buildConvexHull([i.maxPoint,n[1]],i.newPoints)),e):[n[0]]},getConvexHull:function(n){var t=!1,e=!1,i=!1,s=!1,o=null,r=null,a=null,h=null,l=null,d=null,c;for(c=n.length-1;c>=0;c--){const m=n[c];(t===!1||m.lat>t)&&(o=m,t=m.lat),(e===!1||m.lat<e)&&(r=m,e=m.lat),(i===!1||m.lng>i)&&(a=m,i=m.lng),(s===!1||m.lng<s)&&(h=m,s=m.lng)}e!==t?(d=r,l=o):(d=h,l=a);var f=[].concat(this.buildConvexHull([d,l],n),this.buildConvexHull([l,d],n));return f}},_.MarkerCluster.include({getConvexHull:function(){var n=this.getAllChildMarkers(),t=[],e,i;for(i=n.length-1;i>=0;i--)e=n[i].getLatLng(),t.push(e);return _.QuickHull.getConvexHull(t)}}),_.MarkerCluster.include({_2PI:Math.PI*2,_circleFootSeparation:25,_circleStartAngle:Math.PI/6,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(!(this._group._spiderfied===this||this._group._inZoomAnimation)){var n=this.getAllChildMarkers(),t=this._group,e=t._map,i=e.latLngToLayerPoint(this._latlng),s;this._group._unspiderfy(),this._group._spiderfied=this,n.length>=this._circleSpiralSwitchover?s=this._generatePointsSpiral(n.length,i):(i.y+=10,s=this._generatePointsCircle(n.length,i)),this._animationSpiderfy(n,s)}},unspiderfy:function(n){this._group._inZoomAnimation||(this._animationUnspiderfy(n),this._group._spiderfied=null)},_generatePointsCircle:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+n),i=e/this._2PI,s=this._2PI/n,o=[],r,a;for(o.length=n,r=n-1;r>=0;r--)a=this._circleStartAngle+r*s,o[r]=new _.Point(t.x+i*Math.cos(a),t.y+i*Math.sin(a))._round();return o},_generatePointsSpiral:function(n,t){var e=this._group.options.spiderfyDistanceMultiplier,i=e*this._spiralLengthStart,s=e*this._spiralFootSeparation,o=e*this._spiralLengthFactor*this._2PI,r=0,a=[],h;for(a.length=n,h=n-1;h>=0;h--)r+=s/i+h*5e-4,a[h]=new _.Point(t.x+i*Math.cos(r),t.y+i*Math.sin(r))._round(),i+=o/r;return a},_noanimationUnspiderfy:function(){var n=this._group,t=n._map,e=n._featureGroup,i=this.getAllChildMarkers(),s,o;for(n._ignoreMove=!0,this.setOpacity(1),o=i.length-1;o>=0;o--)s=i[o],e.removeLayer(s),s._preSpiderfyLatlng&&(s.setLatLng(s._preSpiderfyLatlng),delete s._preSpiderfyLatlng),s.setZIndexOffset&&s.setZIndexOffset(0),s._spiderLeg&&(t.removeLayer(s._spiderLeg),delete s._spiderLeg);n.fire("unspiderfied",{cluster:this,markers:i}),n._ignoreMove=!1,n._spiderfied=null}}),_.MarkerClusterNonAnimated=_.MarkerCluster.extend({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._group.options.spiderLegPolylineOptions,r,a,h,l;for(e._ignoreMove=!0,r=0;r<n.length;r++)l=i.layerPointToLatLng(t[r]),a=n[r],h=new _.Polyline([this._latlng,l],o),i.addLayer(h),a._spiderLeg=h,a._preSpiderfyLatlng=a._latlng,a.setLatLng(l),a.setZIndexOffset&&a.setZIndexOffset(1e6),s.addLayer(a);this.setOpacity(.3),e._ignoreMove=!1,e.fire("spiderfied",{cluster:this,markers:n})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),_.MarkerCluster.include({_animationSpiderfy:function(n,t){var e=this._group,i=e._map,s=e._featureGroup,o=this._latlng,r=i.latLngToLayerPoint(o),a=_.Path.SVG,h=Object.assign({},this._group.options.spiderLegPolylineOptions),l=h.opacity,d,c,f,m,C,k;for(l===void 0&&(l=_.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),a?(h.opacity=0,h.className=`${h.className||""} leaflet-cluster-spider-leg`):h.opacity=l,e._ignoreMove=!0,d=0;d<n.length;d++)c=n[d],k=i.layerPointToLatLng(t[d]),f=new _.Polyline([o,k],h),i.addLayer(f),c._spiderLeg=f,a&&(m=f._path,C=m.getTotalLength()+.1,m.style.strokeDasharray=C,m.style.strokeDashoffset=C),c.setZIndexOffset&&c.setZIndexOffset(1e6),c.clusterHide&&c.clusterHide(),s.addLayer(c),c._setPos&&c._setPos(r);for(e._forceLayout(),e._animationStart(),d=n.length-1;d>=0;d--)k=i.layerPointToLatLng(t[d]),c=n[d],c._preSpiderfyLatlng=c._latlng,c.setLatLng(k),c.clusterShow&&c.clusterShow(),a&&(f=c._spiderLeg,m=f._path,m.style.strokeDashoffset=0,f.setStyle({opacity:l}));this.setOpacity(.3),e._ignoreMove=!1,setTimeout(()=>{e._animationEnd(),e.fire("spiderfied",{cluster:this,markers:n})},200)},_animationUnspiderfy:function(n){var t=this._group,e=t._map,i=t._featureGroup,s=n?e._latLngToNewLayerPoint(this._latlng,n.zoom,n.center):e.latLngToLayerPoint(this._latlng),o=this.getAllChildMarkers(),r=_.Path.SVG,a,h,l,d,c,f;for(t._ignoreMove=!0,t._animationStart(),this.setOpacity(1),h=o.length-1;h>=0;h--)a=o[h],a._preSpiderfyLatlng&&(a.closePopup(),a.setLatLng(a._preSpiderfyLatlng),delete a._preSpiderfyLatlng,f=!0,a._setPos&&(a._setPos(s),f=!1),a.clusterHide&&(a.clusterHide(),f=!1),f&&i.removeLayer(a),r&&(l=a._spiderLeg,d=l._path,c=d.getTotalLength()+.1,d.style.strokeDashoffset=c,l.setStyle({opacity:0})));t._ignoreMove=!1,setTimeout(()=>{var m=0;for(h=o.length-1;h>=0;h--)a=o[h],a._spiderLeg&&m++;for(h=o.length-1;h>=0;h--)a=o[h],a._spiderLeg&&(a.clusterShow&&a.clusterShow(),a.setZIndexOffset&&a.setZIndexOffset(0),m>1&&i.removeLayer(a),e.removeLayer(a._spiderLeg),delete a._spiderLeg);t._animationEnd(),t.fire("unspiderfied",{cluster:this,markers:o})},200)}}),_.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(...n){this._unspiderfy.apply(this,n)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),_.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(n){this._map._mapPane.classList.contains("leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(n))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(n){this._spiderfied&&this._spiderfied.unspiderfy(n)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(n){n._spiderLeg&&(this._featureGroup.removeLayer(n),n.clusterShow&&n.clusterShow(),n.setZIndexOffset&&n.setZIndexOffset(0),this._map.removeLayer(n._spiderLeg),delete n._spiderLeg)}}),_.MarkerClusterGroup.include({refreshClusters:function(n){return n?n instanceof _.MarkerClusterGroup?n=n._topClusterLevel.getAllChildMarkers():n instanceof _.LayerGroup?n=n._layers:n instanceof _.MarkerCluster?n=n.getAllChildMarkers():n instanceof _.Marker&&(n=[n]):n=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(n),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(n),this},_flagParentsIconsNeedUpdate:n=>{var t,e;for(t in n)for(e=n[t].__parent;e;)e._iconNeedsUpdate=!0,e=e.__parent},_refreshSingleMarkerModeMarkers:function(n){var t,e;for(t in n)e=n[t],this.hasLayer(e)&&e.setIcon(this._overrideMarkerIcon(e))}}),_.Marker.include({refreshIconOptions:function(n,t){var e=this.options.icon;return _.setOptions(e,n),this.setIcon(e),t&&this.__parent&&this.__parent._group.refreshClusters(this),this}});const Pn={dialog:"_dialog_1cl7y_1 _ds-dialog_dbymd_5"},Cn=typeof window<"u"&&typeof document<"u";function Tn(n,t){let e;return function(...i){clearTimeout(e),e=setTimeout(()=>n.apply(this,i),t)}}function G(n,t,e){return e===void 0?n.getAttribute(t)??null:(e===null?n.removeAttribute(t):n.getAttribute(t)!==e&&n.setAttribute(t,e),null)}`${Date.now().toString(36)}${Math.random().toString(36).slice(2,5)}`;const Ai=(n,t,[...e])=>{for(const i of e[0].split(","))e[0]=i,t[`${n}EventListener`](...e)},kn=(n,...t)=>(Ai("add",n,t),()=>Bi(n,...t)),Bi=(n,...t)=>Ai("remove",n,t);`${Pn.dialog.split(" ")[0]}`;const Me=(n,t,e)=>{const i=document.createElement(n);if(e&&(i.textContent=e),t)for(const[s,o]of Object.entries(t))G(i,s,o);return i},Mn=typeof HTMLElement>"u"?class{}:HTMLElement,ze=[30,30],zn=[[57.5,4.73],[71.5,31.44]],Sn="https://cache.kartverket.no/v1/wmts/1.0.0/topo/default/webmercator/{z}/{y}/{x}.png";class Vt extends Mn{cluster;map;_popup;static get observedAttributes(){return["data-view","data-scrollzoom"]}constructor(){super(),this.attachShadow({mode:"open"}).append(Me("style",{},`${bn}
689
+ ${Ln}`),Me("slot"),Me("div"))}connectedCallback(){const t=this.shadowRoot?.lastElementChild,e=Number(G(this,"data-cluster"))||1,i=new _.TileLayer(Sn,{attribution:"&copy; Kartverket",maxZoom:18});this.map=new _.Map(t,{attributionControl:!1,wheelPxPerZoomLevel:20,zoomControl:!1,zoomSnap:0,layers:[i]}),this.cluster=new _.MarkerClusterGroup({disableClusteringAtZoom:e,showCoverageOnHover:!1,zoomToBoundsOnClick:!0}).addTo(this.map),this.map.addControl(new _.Control.Attribution({prefix:""})),this.map.addControl(new _.Control.Zoom({position:"bottomright"})),this.map.on("popupopen",On),Vt.observedAttributes.forEach(s=>{this.attributeChangedCallback(s,null,G(this,s))})}attributeChangedCallback(t,e=null,i=null){this.map&&(t==="data-view"&&this.setView(i||""),t==="data-scrollzoom"&&this.map.scrollWheelZoom[i==="false"?"disable":"enable"]())}setView(t,e){const i=`${t}`.split(",").map(parseFloat).filter(Number.isFinite),s=this.cluster?.getBounds();i.length===3?this.map?.setView([i[0],i[1]],i[2],e):t!=="fit"?this.map?.fitBounds(zn,e):s?.isValid()?this.map?.fitBounds(s,e||{padding:[40,40]}):this.cluster?.on("layeradd",Ii,this)}addMarker(t,e){return new _.Marker(t,e).addTo(this.cluster)}disconnectedCallback(){this.map?.remove()}}Cn&&!window.customElements.get("mtds-atlas")&&(_.Marker.prototype.options.icon=new _.DivIcon({html:'<svg class="map-pin" viewBox="0 0 256 256"><rect x="78" y="50" width="100" height="100" /><path fill="var(--mtds-)" d="M128,16a88.1,88.1,0,0,0-88,88c0,75.3,80,132.17,83.41,134.55a8,8,0,0,0,9.18,0C136,236.17,216,179.3,216,104A88.1,88.1,0,0,0,128,16Zm0,56a32,32,0,1,1-32,32A32,32,0,0,1,128,72Z"/></svg>',iconSize:ze,iconAnchor:[15,30],popupAnchor:[0,-15]}),window.customElements.define("mtds-atlas",Vt));const Ii=Tn(function(){this.cluster?.off("layeradd",Ii),this.cluster?.getBounds().isValid()&&this.setView("fit")},100),Di="popupclose move resize zoomanim viewreset",On=({target:n,popup:t})=>{const e=t.getContent(),i=String(e)[0]==="#"&&document.getElementById(e.slice(1));if(i&&i.closest("mtds-atlas")){const s=t.getLatLng(),o=G(i,"popover");G(t.getElement(),"hidden",""),G(i,"data-popover","open"),G(i,"popover","manual");const r=new ResizeObserver(()=>a()),a=l=>{if(l?.type==="popupclose"&&l?.popup===t)r.disconnect(),n.off(Di,a),G(t.getElement(),"hidden",null),G(i,"data-popover",null),G(i,"popover",o),Bi(i,"click",h);else{const d=n.latLngToContainerPoint(s),c=d.x-i.offsetWidth/2-ze[0]/2,f=d.y-i.offsetHeight-ze[1];i.style.translate=`${c}px ${f}px`}},h=({target:l})=>l?.closest?.('[popovertargetaction="hide"]')&&t.close();n.on(Di,a),kn(i,"click",h),r.observe(i),a()}};return D.L=_,D.MTDSAtlasElement=Vt,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),D}({});