diff --git a/index.js b/index.js index 453dd00..c8411b3 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ var rs=Object.defineProperty,as=Object.defineProperties;var hs=Object.getOwnPropertyDescriptors;var In=Object.getOwnPropertySymbols;var ls=Object.prototype.hasOwnProperty,us=Object.prototype.propertyIsEnumerable;var Bn=(j,H,N)=>H in j?rs(j,H,{enumerable:!0,configurable:!0,writable:!0,value:N}):j[H]=N,Ut=(j,H)=>{for(var N in H||(H={}))ls.call(H,N)&&Bn(j,N,H[N]);if(In)for(var N of In(H))us.call(H,N)&&Bn(j,N,H[N]);return j},Vt=(j,H)=>as(j,hs(H));(function(){"use strict";var j=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},H={exports:{}};/* @preserve * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade - */(function(a,f){(function(u,P){P(f)})(j,function(u){var P="1.7.1";function g(t){var e,i,n,o;for(i=1,n=arguments.length;i0?Math.floor(t):Math.ceil(t)};p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone()._add(w(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(w(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new p(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new p(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Ii(this.x),this.y=Ii(this.y),this},distanceTo:function(t){t=w(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=w(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=w(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function w(t,e,i){return t instanceof p?t:et(t)?new p(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new p(t.x,t.y):new p(t,e,i)}function z(t,e){if(!!t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=X(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=X(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=W(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=W(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,zt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",S,e),window.removeEventListener("testPassiveEventSupport",S,e)}catch{}return t}(),Vi=function(){return!!document.createElement("canvas").getContext}(),fe=!!(document.createElementNS&&Ai("svg").createSVGRect),_e=!fe&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}();function ot(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var io={ie:ue,ielt9:St,edge:ce,webkit:We,android:Kt,android23:jt,androidStock:Ni,opera:He,chrome:Fe,gecko:Ue,safari:de,phantom:Di,opera12:Wi,win:Hi,ie3d:Ve,webkit3d:Ge,gecko3d:Fi,any3d:q,mobile:Ct,mobileWebkit:Qn,mobileWebkit3d:to,msPointer:vt,pointer:it,touch:nt,mobileOpera:Ui,mobileGecko:eo,retina:gt,passiveEvents:zt,canvas:Vi,svg:fe,vml:_e},qe=vt?"MSPointerDown":"pointerdown",$e=vt?"MSPointerMove":"pointermove",Ke=vt?"MSPointerUp":"pointerup",je=vt?"MSPointerCancel":"pointercancel",Et={},Gi=!1;function no(t,e,i,n){return e==="touchstart"?so(t,i,n):e==="touchmove"?ho(t,i,n):e==="touchend"&&lo(t,i,n),this}function oo(t,e,i){var n=t["_leaflet_"+e+i];return e==="touchstart"?t.removeEventListener(qe,n,!1):e==="touchmove"?t.removeEventListener($e,n,!1):e==="touchend"&&(t.removeEventListener(Ke,n,!1),t.removeEventListener(je,n,!1)),this}function so(t,e,i){var n=k(function(o){o.MSPOINTER_TYPE_TOUCH&&o.pointerType===o.MSPOINTER_TYPE_TOUCH&&K(o),Ye(o,e)});t["_leaflet_touchstart"+i]=n,t.addEventListener(qe,n,!1),Gi||(document.addEventListener(qe,ro,!0),document.addEventListener($e,ao,!0),document.addEventListener(Ke,qi,!0),document.addEventListener(je,qi,!0),Gi=!0)}function ro(t){Et[t.pointerId]=t}function ao(t){Et[t.pointerId]&&(Et[t.pointerId]=t)}function qi(t){delete Et[t.pointerId]}function Ye(t,e){t.touches=[];for(var i in Et)t.touches.push(Et[i]);t.changedTouches=[t],e(t)}function ho(t,e,i){var n=function(o){o.pointerType===(o.MSPOINTER_TYPE_MOUSE||"mouse")&&o.buttons===0||Ye(o,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener($e,n,!1)}function lo(t,e,i){var n=function(o){Ye(o,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(Ke,n,!1),t.addEventListener(je,n,!1)}var me=vt?"MSPointerDown":it?"pointerdown":"touchstart",pe=vt?"MSPointerUp":it?"pointerup":"touchend",Zt="_leaflet_";function uo(t,e,i){var n,o,s=!1,r=250;function h(c){if(it){if(!c.isPrimary||c.pointerType==="mouse")return}else if(c.touches.length>1)return;var d=Date.now(),_=d-(n||d);o=c.touches?c.touches[0]:c,s=_>0&&_<=r,n=d}function l(c){if(s&&!o.cancelBubble){if(it){if(c.pointerType==="mouse")return;var d={},_,T;for(T in o)_=o[T],d[T]=_&&_.bind?_.bind(o):_;o=d}o.type="dblclick",o.button=0,e(o),n=null}}return t[Zt+me+i]=h,t[Zt+pe+i]=l,t[Zt+"dblclick"+i]=e,t.addEventListener(me,h,zt?{passive:!1}:!1),t.addEventListener(pe,l,zt?{passive:!1}:!1),t.addEventListener("dblclick",e,!1),this}function co(t,e){var i=t[Zt+me+e],n=t[Zt+pe+e],o=t[Zt+"dblclick"+e];return t.removeEventListener(me,i,zt?{passive:!1}:!1),t.removeEventListener(pe,n,zt?{passive:!1}:!1),t.removeEventListener("dblclick",o,!1),this}var Xe=ye(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=ye(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),$i=Yt==="webkitTransition"||Yt==="OTransition"?Yt+"End":"transitionend";function Ki(t){return typeof t=="string"?document.getElementById(t):t}function Xt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function b(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function E(t){var e=t.parentNode;e&&e.removeChild(t)}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ot(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function It(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Je(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=ge(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function v(t,e){if(t.classList!==void 0)for(var i=at(e),n=0,o=i.length;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,W(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=w(e.paddingTopLeft||e.padding||[0,0]),n=w(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),h=this.getPixelBounds(),l=h.getSize().divideBy(2),c=X([h.min.add(i),h.max.subtract(n)]);if(!c.contains(r)){this._enforcingBounds=!0;var d=s.subtract(r),_=w(r.x+d.x,r.y+d.y);(r.xc.max.x)&&(_.x=s.x-d.x,d.x>0?_.x+=l.x-i.x:_.x-=l.x-n.x),(r.yc.max.y)&&(_.y=s.y-d.y,d.y>0?_.y+=l.y-i.y:_.y-=l.y-n.y),this.panTo(this.unproject(_),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=g({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(k(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=g({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=k(this._handleGeolocationResponse,this),i=k(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var 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:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new M(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var h={latlng:n,bounds:o,timestamp:t.timestamp};for(var l in t.coords)typeof t.coords[l]=="number"&&(h[l]=t.coords[l]);this.fire("locationfound",h)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),E(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(U(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)E(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=b("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new V(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=W(t),i=w(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(i),c=X(this.project(h,n),this.project(r,n)).getSize(),d=q?this.options.zoomSnap:1,_=l.x/c.x,T=l.y/c.y,mt=e?Math.max(_,T):Math.min(_,T);return n=this.getScaleZoom(mt,n),d&&(n=Math.round(n/(d/100))*(d/100),n=e?Math.ceil(n/d)*d:Math.floor(n/d)*d),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(Z(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(w(t),e)},layerPointToLatLng:function(t){var e=w(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(Z(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Z(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(W(t))},distance:function(t,e){return this.options.crs.distance(Z(t),Z(e))},containerPointToLayerPoint:function(t){return w(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return w(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(w(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Z(t)))},mouseEventToContainerPoint:function(t){return Xi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Ki(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");y(e,"scroll",this._onScroll,this),this._containerId=m(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&q,v(t,"leaflet-container"+(nt?" leaflet-touch":"")+(gt?" leaflet-retina":"")+(St?" leaflet-oldie":"")+(de?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Xt(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),A(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(v(t.markerPane,"leaflet-zoom-hide"),v(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){A(this._mapPane,new p(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){e===void 0&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return U(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){A(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[m(this._container)]=this;var e=t?I:y;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),q&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){U(this._resizeRequest),this._resizeRequest=F(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[m(s)],n&&(e==="click"||e==="preclick")&&!t._simulated&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!Le(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&Le(s,t)&&(i=[this]),i},_handleDOMEvent:function(t){if(!(!this._loaded||ci(t))){var e=t.type;(e==="mousedown"||e==="keypress"||e==="keyup"||e==="keydown")&&oi(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=g({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e)),!!i.length)){var o=i[0];e==="contextmenu"&&o.listens(e,!0)&&K(t);var s={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var r=o.getLatLng&&(!o._radius||o._radius<=10);s.containerPoint=r?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=r?o.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var h=0;h0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=q?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){O(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=b("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Xe,n=this._proxy.style[i];Lt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){E(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Lt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(F(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){!this._mapPane||(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,v(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(k(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){!this._animatingZoom||(this._mapPane&&O(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),F(function(){this._moveEnd(!0)},this))}});function vo(t,e){return new x(t,e)}var Q=ht.extend({options:{position:"topright"},initialize:function(t){C(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return v(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(E(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ie=function(t){return new Q(t)};x.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=b("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=b("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)E(this._controlCorners[t]);E(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var tn=Q.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(m(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+m(this),i),this._layerControlInputs.push(n),n.layerId=m(t.layer),y(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),go=function(t,e,i){return new tn(t,e,i)},di=Q.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=b("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=b("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),ee(s),y(s,"click",ut),y(s,"click",o,this),y(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";O(this._zoomInButton,e),O(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&v(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&v(this._zoomInButton,e)}});x.mergeOptions({zoomControl:!0}),x.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new di,this.addControl(this.zoomControl))});var yo=function(t){return new di(t)},en=Q.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=b("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=b("div",e,i)),t.imperial&&(this._iScale=b("div",e,i))},_update:function(){var 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:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),wo=function(t){return new en(t)},fi=Q.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){C(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=b("div","leaflet-control-attribution"),ee(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(!!this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});x.mergeOptions({attributionControl:!0}),x.addInitHook(function(){this.options.attributionControl&&new fi().addTo(this)});var xo=function(t){return new fi(t)};Q.Layers=tn,Q.Zoom=di,Q.Scale=en,Q.Attribution=fi,ie.layers=go,ie.zoom=yo,ie.scale=wo,ie.attribution=xo;var st=ht.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});st.addTo=function(t,e){return t.addHandler(e,this),this};var Po={Events:G},nn=nt?"touchstart mousedown":"mousedown",on={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},_i={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Tt=qt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){C(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(y(this._dragStartTarget,nn,this._onDown,this),this._enabled=!0)},disable:function(){!this._enabled||(Tt._dragging===this&&this.finishDrag(),I(this._dragStartTarget,nn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!(t._simulated||!this._enabled)&&(this._moved=!1,!Je(this._element,"leaflet-zoom-anim")&&!(Tt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Tt._dragging=this,this._preventOutline&&oi(this._element),ei(),Jt(),!this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=ji(this._element);this._startPoint=new p(e.clientX,e.clientY),this._parentScale=si(i),y(document,_i[t.type],this._onMove,this),y(document,on[t.type],this._onUp,this)}},_onMove:function(t){if(!(t._simulated||!this._enabled)){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new p(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=h,s=l);s>i&&(e[r]=1,mi(t,e,i,n,r),mi(t,e,i,r,o))}function To(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function ko(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function ne(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,h=i.y-s,l=r*r+h*h,c;return l>0&&(c=((t.x-o)*r+(t.y-s)*h)/l,c>1?(o=i.x,s=i.y):c>0&&(o+=r*c,s+=h*c)),r=t.x-o,h=t.y-s,n?r*r+h*h:new p(o,s)}function ct(t){return!et(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]!="undefined"}function ln(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ct(t)}var Mo={simplify:sn,pointToSegmentDistance:rn,closestPointOnSegment:Lo,clipSegment:hn,_getEdgeIntersection:be,_getBitCode:kt,_sqClosestPointOnSegment:ne,isFlat:ct,_flat:ln};function un(t,e,i){var n,o=[1,4,2,8],s,r,h,l,c,d,_,T;for(s=0,d=t.length;s1e-7;h++)c=o*Math.sin(r),c=Math.pow((1-c)/(1+c),o/2),l=Math.PI/2-2*Math.atan(s*c)-r,r+=l;return new M(r*e,t.x*e/i)}},Co={LonLat:pi,Mercator:vi,SphericalMercator:Ae},zo=g({},pt,{code:"EPSG:3395",projection:vi,transformation:function(){var t=.5/(Math.PI*vi.R);return $t(t,.5,-t,.5)}()}),cn=g({},pt,{code:"EPSG:4326",projection:pi,transformation:$t(1/180,1,-1/180,.5)}),Eo=g({},lt,{projection:pi,transformation:$t(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});lt.Earth=pt,lt.EPSG3395=zo,lt.EPSG3857=Ne,lt.EPSG900913=Xn,lt.EPSG4326=cn,lt.Simple=Eo;var tt=qt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[m(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[m(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(!!e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});x.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=m(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=m(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&m(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?et(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()e)return r=(n-e)/i,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=Z(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new V,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ct(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=ct(t),n=0,o=t.length;n=2&&e[0]instanceof M&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){dt.prototype._setLatLngs.call(this,t),ct(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ct(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new p(e,e);if(t=new z(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(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||dt.prototype._containsPoint.call(this,t,!0)}});function Do(t,e){return new Nt(t,e)}var ft=At.extend({initialize:function(t,e){C(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=et(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0?n:[e.src];return}et(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var s=0;so?(e.height=o+"px",v(t,s)):O(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();A(this._container,e.add(i))},_adjustPan:function(){if(!!this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(Xt(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new p(this._containerLeft,-i-this._containerBottom);o._add(yt(this._container));var s=t.layerPointToContainerPoint(o),r=w(this.options.autoPanPadding),h=w(this.options.autoPanPaddingTopLeft||r),l=w(this.options.autoPanPaddingBottomRight||r),c=t.getSize(),d=0,_=0;s.x+n+l.x>c.x&&(d=s.x+n-c.x+l.x),s.x-d-h.x<0&&(d=s.x-h.x),s.y+i+l.y>c.y&&(_=s.y+i-c.y+l.y),s.y-_-h.y<0&&(_=s.y-h.y),(d||_)&&t.fire("autopanstart").panBy([d,_])}},_onCloseButtonClick:function(t){this._close(),ut(t)},_getAnchor:function(){return w(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Vo=function(t,e){return new Wt(t,e)};x.mergeOptions({closePopupOnClick:!0}),x.include({openPopup:function(t,e,i){return t instanceof Wt||(t=new Wt(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return(!t||t===this._popup)&&(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),tt.include({bindPopup:function(t,e){return t instanceof Wt?(C(t,e),this._popup=t,t._source=this):((!this._popup||e)&&(this._popup=new Wt(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;if(!!this._popup&&!!this._map){if(ut(t),e instanceof wt){this.openPopup(t.layer||t.target,t.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ht=_t.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){_t.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){_t.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=_t.prototype.getEvents.call(this);return nt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=b("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),h=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,d=w(this.options.offset),_=this._getAnchor();h==="top"?(e=l/2,i=c):h==="bottom"?(e=l/2,i=0):h==="center"?(e=l/2,i=c/2):h==="right"?(e=0,i=c/2):h==="left"?(e=l,i=c/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new p(o,s);r.z=i+1;var h=this._tileCoordsToKey(r),l=this._tiles[h];if(l&&l.active){l.retain=!0;continue}else l&&l.loaded&&(l.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var _=o.min.y;_<=o.max.y;_++)for(var T=o.min.x;T<=o.max.x;T++){var mt=new p(T,_);if(mt.z=this._tileZoom,!!this._isValidTile(mt)){var Mt=this._tiles[this._tileCoordsToKey(mt)];Mt?Mt.current=!0:r.push(mt)}}if(r.sort(function(xt,Li){return xt.distanceTo(s)-Li.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ze=document.createDocumentFragment();for(T=0;Ti.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return W(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new V(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new p(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];!e||(E(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){v(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=S,t.onmousemove=S,St&&this.options.opacity<1&&$(t,this.options.opacity),Kt&&!jt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),k(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&F(k(this._tileReady,this,t,null,o)),A(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],!!i&&(i.loaded=+new Date,this._map._fadeAnimated?($(i.el,0),U(this._fadeFrame),this._fadeFrame=F(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(v(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),St||!this._map._fadeAnimated?F(this._pruneTiles,this):setTimeout(k(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(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:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function $o(t){return new se(t)}var Ft=se.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=C(this,e),e.detectRetina&>&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),Kt||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return y(i,"load",k(this._tileOnLoad,this,e,i)),y(i,"error",k(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:gt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return Ci(this._url,g(e,this.options))},_tileOnLoad:function(t,e){St?setTimeout(k(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=S,e.onerror=S,e.complete||(e.src=le,E(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(!!e)return Ni||e.el.setAttribute("src",le),se.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===le))return se.prototype._tileReady.call(this,t,e,i)}});function gn(t,e){return new Ft(t,e)}var yn=Ft.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=g({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=C(this,e);var o=e.detectRetina&>?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Ft.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=X(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===cn?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),h=Ft.prototype.getTileUrl.call(this,t);return h+Si(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return g(this.wmsParams,t),e||this.redraw(),this}});function Ko(t,e){return new yn(t,e)}Ft.WMS=yn,gn.wms=Ko;var rt=tt.extend({options:{padding:.1,tolerance:0},initialize:function(t){C(this,t),m(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&v(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=yt(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),r=this._map.project(t,e),h=r.subtract(s),l=o.multiplyBy(-i).add(n).add(o).subtract(h);q?Lt(this._container,l,i):A(this._container,l)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),wn=rt.extend({getEvents:function(){var t=rt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){rt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");y(t,"mousemove",this._onMouseMove,this),y(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),y(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){U(this._redrawRequest),delete this._ctx,E(this._container),I(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){rt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=gt?2:1;A(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",gt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){rt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[m(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[m(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),jo={_initContainer:function(){this._container=b("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(rt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=re("shape");v(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=re("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;E(e),t.removeInteractiveTarget(e),delete this._layers[m(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=re("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=et(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=re("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Ot(t._container)},_bringToBack:function(t){It(t._container)}},Ee=_e?re:Ai,ae=rt.extend({getEvents:function(){var t=rt.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Ee("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ee("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){E(this._container),I(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){rt.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),A(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ee("path");t.options.className&&v(e,t.options.className),t.options.interactive&&v(e,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){E(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var 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:function(t,e){this._setPath(t,Ri(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Ot(t._path)},_bringToBack:function(t){It(t._path)}});_e&&ae.include(jo);function Pn(t){return fe||_e?new ae(t):null}x.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&xn(t)||Pn(t)}});var Ln=Nt.extend({initialize:function(t,e){Nt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=W(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Yo(t,e){return new Ln(t,e)}ae.create=Ee,ae.pointsToPath=Ri,ft.geometryToLayer=yi,ft.coordsToLatLng=wi,ft.coordsToLatLngs=Me,ft.latLngToCoords=xi,ft.latLngsToCoords=Se,ft.getFeature=Dt,ft.asFeature=Ce,x.mergeOptions({boxZoom:!0});var bn=st.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){y(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){I(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){E(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Jt(),ei(),this._startPoint=this._map.mouseEventToContainerPoint(t),y(document,{contextmenu:ut,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=b("div","leaflet-zoom-box",this._container),v(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),i=e.getSize();A(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(E(this._box),O(this._container,"leaflet-crosshair")),Qt(),ii(),I(document,{contextmenu:ut,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(k(this._resetState,this),0);var e=new V(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&this._finish()}});x.addInitHook("addHandler","boxZoom",bn),x.mergeOptions({doubleClickZoom:!0});var Tn=st.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});x.addInitHook("addHandler","doubleClickZoom",Tn),x.mergeOptions({dragging:!0,inertia:!jt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var kn=st.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Tt(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))}v(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){O(this._map._container,"leaflet-grab"),O(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=W(this._map.options.maxBounds);this._offsetLimit=X(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:function(t){if(this._map.options.inertia){var 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:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var 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:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.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:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,!!r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});x.addInitHook("addHandler","scrollWheelZoom",Sn),x.mergeOptions({tap:!0,tapTolerance:15});var Cn=st.extend({addHooks:function(){y(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){I(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(!!t.touches){if(K(t),this._fireClick=!0,t.touches.length>1){this._fireClick=!1,clearTimeout(this._holdTimeout);return}var e=t.touches[0],i=e.target;this._startPos=this._newPos=new p(e.clientX,e.clientY),i.tagName&&i.tagName.toLowerCase()==="a"&&v(i,"leaflet-active"),this._holdTimeout=setTimeout(k(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),y(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),I(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&i.tagName.toLowerCase()==="a"&&O(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new p(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});nt&&(!it||de)&&x.addInitHook("addHandler","tap",Cn),x.mergeOptions({touchZoom:nt&&!jt,bounceAtZoomLimits:!0});var zn=st.extend({addHooks:function(){v(this._map._container,"leaflet-touch-zoom"),y(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){O(this._map._container,"leaflet-touch-zoom"),I(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),y(document,"touchmove",this._onTouchMove,this),y(document,"touchend",this._onTouchEnd,this),K(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),U(this._animRequest);var r=k(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=F(r,this,!0),K(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,U(this._animRequest),I(document,"touchmove",this._onTouchMove,this),I(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});x.addInitHook("addHandler","touchZoom",zn),x.BoxZoom=bn,x.DoubleClickZoom=Tn,x.Drag=kn,x.Keyboard=Mn,x.ScrollWheelZoom=Sn,x.Tap=Cn,x.TouchZoom=zn,u.version=P,u.Control=Q,u.control=ie,u.Browser=io,u.Evented=qt,u.Mixin=Po,u.Util=jn,u.Class=ht,u.Handler=st,u.extend=g,u.bind=k,u.stamp=m,u.setOptions=C,u.DomEvent=po,u.DomUtil=_o,u.PosAnimation=Qi,u.Draggable=Tt,u.LineUtil=Mo,u.PolyUtil=So,u.Point=p,u.point=w,u.Bounds=z,u.bounds=X,u.Transformation=Re,u.transformation=$t,u.Projection=Co,u.LatLng=M,u.latLng=Z,u.LatLngBounds=V,u.latLngBounds=W,u.CRS=lt,u.GeoJSON=ft,u.geoJSON=_n,u.geoJson=Wo,u.Layer=tt,u.LayerGroup=Bt,u.layerGroup=Zo,u.FeatureGroup=At,u.featureGroup=Oo,u.ImageOverlay=ze,u.imageOverlay=Ho,u.VideoOverlay=mn,u.videoOverlay=Fo,u.SVGOverlay=pn,u.svgOverlay=Uo,u.DivOverlay=_t,u.Popup=Wt,u.popup=Vo,u.Tooltip=Ht,u.tooltip=Go,u.Icon=Rt,u.icon=Io,u.DivIcon=vn,u.divIcon=qo,u.Marker=Te,u.marker=Bo,u.TileLayer=Ft,u.tileLayer=gn,u.GridLayer=se,u.gridLayer=$o,u.SVG=ae,u.svg=Pn,u.Renderer=rt,u.Canvas=wn,u.canvas=xn,u.Path=wt,u.CircleMarker=ke,u.circleMarker=Ao,u.Circle=gi,u.circle=Ro,u.Polyline=dt,u.polyline=No,u.Polygon=Nt,u.polygon=Do,u.Rectangle=Ln,u.rectangle=Yo,u.Map=x,u.map=vo;var Xo=window.L;u.noConflict=function(){return window.L=Xo,this},window.L=u})})(H,H.exports);var N=H.exports,An=function(){var a=this,f=a.$createElement,u=a._self._c||f;return u("k-field",a._b({class:["k-locator-field",{filled:a.valueExists},a.status],attrs:{input:a._uid}},"k-field",a.$props,!1),[u("template",{slot:"options"},[a.valueExists&&a.filledStatus=="closed"?u("k-button",{attrs:{id:a._uid,icon:"edit"},on:{click:function(P){return a.toggle("open")}}},[a._v(" "+a._s(a.$t("edit"))+" ")]):a._e(),a.valueExists&&a.filledStatus=="open"?u("k-button",{attrs:{id:a._uid,icon:"trash"},on:{click:a.resetValue}},[a._v(" "+a._s(a.$t("locator.reset"))+" ")]):a._e(),a.valueExists&&a.filledStatus=="open"?u("k-button",{attrs:{id:a._uid,icon:"collapse"},on:{click:function(P){return a.toggle("closed")}}},[a._v(" "+a._s(a.$t("locator.collapse"))+" ")]):a._e()],1),u("div",{staticClass:"k-input k-locator-input",attrs:{"data-theme":"field"}},[u("input",{directives:[{name:"model",rawName:"v-model",value:a.location,expression:"location"}],ref:"input",staticClass:"k-text-input",attrs:{placeholder:a.$t("locator.placeholder")},domProps:{value:a.location},on:{input:[function(P){P.target.composing||(a.location=P.target.value)},a.onLocationInput]}}),u("button",{class:[{disabled:!a.location.length}],on:{click:a.getCoordinates}},[u("svg",[u("use",{attrs:{href:"#icon-locator-locate"}})]),a._v(" "+a._s(a.$t("locator.locate")))]),a.autocomplete?u("k-dropdown-content",{ref:"dropdown"},a._l(a.dropdownOptions,function(P,g){return u("k-dropdown-item",{key:g,on:{click:function(D){return a.select(P)}},nativeOn:{keydown:[function(D){return!D.type.indexOf("key")&&a._k(D.keyCode,"enter",13,D.key,"Enter")?null:(D.preventDefault(),a.select(P))},function(D){return!D.type.indexOf("key")&&a._k(D.keyCode,"space",32,D.key,[" ","Spacebar"])?null:(D.preventDefault(),a.select(P))}]}},[u("span",{domProps:{innerHTML:a._s(P.name)}}),u("span",{staticClass:"k-location-type",domProps:{innerHTML:a._s(P.type)}})])}),1):a._e()],1),u("k-dialog",{ref:"dialog",on:{close:function(P){a.error=""}}},[u("k-text",[a._v(a._s(a.error))]),u("k-button-group",{attrs:{slot:"footer"},slot:"footer"},[u("k-button",{attrs:{icon:"check"},on:{click:function(P){return a.$refs.dialog.close()}}},[a._v(" "+a._s(a.$t("confirm"))+" ")])],1)],1),u("div",{staticClass:"k-locator-container"},[u("div",{class:["map-container",{"map-only":!a.display}]},[u("div",{staticClass:"map",attrs:{id:a.mapId}})]),a.valueExists&&a.display?u("div",{class:["content",a.liststyle]},a._l(a.display,function(P){return a.value[P]?u("div",{staticClass:"content-block"},[u("div",{staticClass:"title"},[a._v(a._s(a.translatedTitle(P)))]),u("div",{staticClass:"value"},[a._v(a._s(a.value[P]))])]):a._e()}),0):a.valueExists?a._e():u("k-empty",{staticClass:"k-locator-empty",attrs:{icon:"search"},on:{click:function(P){return a.$refs.input.focus()}}},[a._v(" "+a._s(a.$t("locator.empty"))+" ")])],1)],2)},Rn=[],cs="";function Ti(a,f,u,P,g,D,k,he){var m=typeof a=="function"?a.options:a;f&&(m.render=f,m.staticRenderFns=u,m._compiled=!0),P&&(m.functional=!0),D&&(m._scopeId="data-v-"+D);var Y;if(k?(Y=function(B){B=B||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!B&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(B=__VUE_SSR_CONTEXT__),g&&g.call(this,B),B&&B._registeredComponents&&B._registeredComponents.add(k)},m._ssrRegister=Y):g&&(Y=he?function(){g.call(this,(m.functional?this.parent:this).$root.$options.shadowRoot)}:g),Y)if(m.functional){m._injectStyles=Y;var Pt=m.render;m.render=function(Gt,at){return Y.call(at),Pt(Gt,at)}}else{var S=m.beforeCreate;m.beforeCreate=S?[].concat(S,Y):[Y]}return{exports:a,options:m}}const Nn={data(){return{map:null,marker:null,tileLayer:null,location:"",error:"",limit:1,dropdownOptions:[],filledStatus:"closed",dragged:!1}},props:{markerUrl:String,tiles:String,center:Object,zoom:Object,saveZoom:Boolean,autoSaveZoom:Boolean,mapbox:Object,display:[Array,Boolean],geocoding:String,liststyle:String,liststyle:String,draggable:Boolean,autocomplete:Boolean,language:[String,Boolean],dblclick:String,label:String,disabled:Boolean,help:String,parent:String,value:Object,name:[String,Number],required:Boolean,type:String},computed:{mapId(){return"map-"+this._uid},icon(){return N.icon({iconUrl:this.markerUrl,iconSize:[40,47],iconAnchor:[20,47]})},valueExists(){return this.value&&(Object.keys(this.value).length>1||Object.keys(this.value).length==1&&!this.value.zoom)?Object.keys(this.value).length:!1},status(){return this.valueExists?this.filledStatus:""},defaultCoords(){return this.valueExists?[this.value.lat,this.value.lon]:[this.center.lat,this.center.lon]},defaultZoom(){return this.valueExists&&this.value.zoom?this.value.zoom:this.zoom.default},coords(){return this.valueExists?[this.value.lat,this.value.lon]:[]},tileUrl(){return this.tiles=="mapbox"||this.tiles=="mapbox.custom"?"https://api.mapbox.com/styles/v1/"+this.mapbox.id+"/tiles/256/{z}/{x}/{y}"+(N.Browser.retina?"@2x":"")+"?access_token="+this.mapbox.token:this.tiles=="wikimedia"?"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}"+(N.Browser.retina?"@2x.png":".png"):this.tiles=="openstreetmap"?"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png":this.tiles=="light_all"||this.tiles=="voyager"?"https://cartodb-basemaps-{s}.global.ssl.fastly.net/rastertiles/"+this.tiles+"/{z}/{x}/{y}"+(N.Browser.retina?"@2x.png":".png"):""},attribution(){return this.tiles=="mapbox"||this.tiles=="mapbox.custom"?'© OpenStreetMap, © Mapbox':this.tiles=="wikimedia"?'© OpenStreetMap, © Wikimedia':this.tiles=="openstreetmap"?'© OpenStreetMap':this.tiles=="light_all"||this.tiles=="voyager"?'© OpenStreetMap, © CARTO':'© OpenStreetMap'},searchQuery(){if(this.geocoding=="nominatim"){let a=this.language?"&accept-language="+this.language:"";return"https://nominatim.openstreetmap.org/search?format=jsonv2&limit=1&addressdetails=1&q="+this.location+a}else if(this.geocoding=="mapbox"){let a=this.language?"&language="+this.language:"";return"https://api.mapbox.com/geocoding/v5/mapbox.places/"+this.location+".json?types=address,country,postcode,place,locality&limit="+this.limit+"&access_token="+this.mapbox.token+a}else return""}},watch:{value(){this.updateMap()}},mounted(){this.initMap()},methods:{onLocationInput(){if(!this.autocomplete)return!1;if(this.geocoding&&this.location.length){if(this.geocoding!="mapbox")return!1;const a={referrerPolicy:"strict-origin-when-cross-origin"};this.limit=5,fetch(this.searchQuery,a).then(f=>f.json()).then(f=>{if(f.features.length){let u=f.features.filter(P=>P.relevance==1);this.dropdownOptions=u.map(P=>({name:P.place_name,type:this.capitalize(P.place_type[0])})),this.$refs.dropdown.open()}else this.$refs.dropdown.close()}).catch(f=>{this.error=this.$t("locator.error"),this.$refs.dialog.open(),this.$refs.dropdown.close()})}else this.$refs.dropdown.close()},select(a){this.location=a.name,this.getCoordinates()},translatedTitle(a){return a=a.replace("lon","longitude"),a=a.replace("lat","latitude"),this.$t("locator."+a)},toggle(a){this.filledStatus=a,this.$nextTick(()=>{this.map.invalidateSize(),this.map.setView(this.coords,this.defaultZoom),a=="closed"&&this.marker?this.disableMapEvents():a=="open"&&this.marker&&this.enableMapEvents()})},initMap(){let a=this.value?this.value.zoom||this.defaultZoom:this.defaultZoom;this.map=N.map(this.mapId,{minZoom:this.zoom.min,maxZoom:this.zoom.max}).setView(this.defaultCoords,a),this.tileLayer=N.tileLayer(this.tileUrl,{attribution:this.attribution}),this.tileLayer.on("loading",()=>document.querySelector("meta[name=referrer]").content="strict-origin-when-cross-origin"),this.tileLayer.on("load",()=>document.querySelector("meta[name=referrer]").content="same-origin"),this.map.addLayer(this.tileLayer),this.coords.length&&this.setMarker(),this.saveZoom&&this.autoSaveZoom&&this.map.on("zoomend",()=>{this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()}),this.$emit("input",this.value),this.dragged=!0,setTimeout(()=>{this.dragged=!1},500)}),this.dblclick=="marker"&&(this.map.doubleClickZoom.disable(),this.map.on("dblclick",f=>{this.setCoordinates(f.latlng.lat+","+f.latlng.lng)}))},updateMap(){this.map&&(this.marker?this.valueExists?(this.marker.setLatLng(this.coords),this.dragged||this.toggle("closed")):(this.map.removeLayer(this.marker),this.marker=null):!this.marker&&this.valueExists&&(this.setMarker(),this.dragged||this.toggle("closed")),this.valueExists?this.map.panTo(this.coords):this.$nextTick(()=>{this.map.invalidateSize();let a=this.value?this.value.zoom||this.defaultZoom:this.defaultZoom;this.map.setView(this.defaultCoords,a)}))},setMarker(){this.marker&&this.map.removeLayer(this.marker),this.marker=N.marker(this.coords,{icon:this.icon,draggable:this.draggable,autoPan:this.draggable}),this.map.addLayer(this.marker),this.filledStatus=="closed"&&this.disableMapEvents(),this.marker.on("dragend",a=>{let f=this.marker.getLatLng(),u=this;this.value={lat:parseFloat(f.lat),lon:parseFloat(f.lng),number:null,city:null,region:null,country:null,postcode:null,address:null,osm:null},this.saveZoom&&(this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()})),this.$emit("input",this.value),this.dragged=!0,setTimeout(()=>{u.dragged=!1},500)})},getCoordinates(a){if(a&&(a.preventDefault(),a.stopPropagation()),this.$refs.dropdown&&this.$refs.dropdown.close(),this.limit=1,this.isLatLon(this.location))return this.setCoordinates(this.location),!0;this.geocoding&&this.location.length&&fetch(this.searchQuery).then(f=>f.json()).then(f=>{f.length||Object.keys(f).length?(this.geocoding=="nominatim"?this.setNominatimResponse(f):this.geocoding=="mapbox"&&this.setMapboxResponse(f),this.location=""):(this.error=this.$t("locator.empty_response"),this.$refs.dialog.open(),this.value={}),this.$emit("input",this.value)}).catch(f=>{this.error=this.$t("locator.error"),this.$refs.dialog.open()})},isLatLon(a){return/^((\-?|\+?)?\d+(\.\d+)?),\s*((\-?|\+?)?\d+(\.\d+)?)$/gi.test(a)},setCoordinates(a){let f=a.split(","),u=f[0].replace(" ",""),P=f[1].replace(" ",""),g=this;this.value={lat:parseFloat(u),lon:parseFloat(P),number:null,city:null,region:null,country:null,postcode:null,address:null,osm:null},this.saveZoom&&(this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()})),this.location="",this.$emit("input",this.value),this.dragged=!0,setTimeout(()=>{g.dragged=!1},500)},setNominatimResponse(a){a=a[0],this.value={lat:parseFloat(a.lat),lon:parseFloat(a.lon),number:a.address.house_number,city:a.address.city||a.address.town||a.address.village||a.address.county||a.address.state,region:a.address.state,country:a.address.country,postcode:a.address.postcode,address:a.address.road,osm:a.osm_id},this.saveZoom&&(this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()}))},setMapboxResponse(a){a=a.features[0],this.value={lat:parseFloat(a.center[1]),lon:parseFloat(a.center[0]),number:a.address||"",city:a.context.find(f=>f.id.startsWith("place"))?a.context.find(f=>f.id.startsWith("place")).text:"",region:a.context.find(f=>f.id.startsWith("region"))?a.context.find(f=>f.id.startsWith("region")).text:"",country:a.context.find(f=>f.id.startsWith("country"))?a.context.find(f=>f.id.startsWith("country")).text:"",postcode:a.context.find(f=>f.id.startsWith("postcode"))?a.context.find(f=>f.id.startsWith("postcode")).text:"",address:a.text||""},this.saveZoom&&(this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()}))},capitalize(a){return a.charAt(0).toUpperCase()+a.slice(1)},disableMapEvents(){this.map&&(this.map.scrollWheelZoom.disable(),this.map.dragging.disable(),this.map.touchZoom.disable(),this.map.doubleClickZoom.disable(),this.map.boxZoom.disable(),this.map.keyboard.disable(),this.map.tap&&this.map.tap.disable()),this.marker&&this.marker.dragging.disable()},enableMapEvents(){this.map&&(this.map.scrollWheelZoom.enable(),this.map.dragging.enable(),this.map.touchZoom.enable(),this.dblclick!="marker"&&this.map.doubleClickZoom.enable(),this.map.boxZoom.enable(),this.map.keyboard.enable(),this.map.tap&&this.map.tap.enable()),this.marker&&this.draggable&&this.marker.dragging.enable()},resetValue(){this.value={},this.$emit("input",this.value)}}},ki={};var Dn=Ti(Nn,An,Rn,!1,Wn,null,null,null);function Wn(a){for(let f in ki)this[f]=ki[f]}var Hn=function(){return Dn.exports}(),Fn=function(){var a=this,f=a.$createElement,u=a._self._c||f;return u("div",{staticClass:"k-locator-field-preview"},[u("figure",{staticClass:"locator-preview"},[u("k-icon",{staticClass:"k-pages-field-preview-image",attrs:{type:"locatorMarker",back:"pattern"}}),u("figcaption",{domProps:{innerHTML:a._s(a.location)}})],1)])},Un=[];const Vn={props:{value:[Object,String]},computed:{locationString(){let a=this.value.number?this.value.number+" ":"",f=this.value.address?this.value.address+", ":"",u=this.value.postcode?this.value.postcode+" ":"",P=this.value.city?this.value.city+", ":"",g=this.value.country?this.value.country:"";return a+f+u+P+g},latLonString(){if(this.value.lat&&this.value.lon){let a=typeof this.value.lat=="string"?parseFloat(this.value.lat):this.value.lat;a=a.toFixed(5);let f=typeof this.value.lon=="string"?parseFloat(this.value.lon):this.value.lon;return f=f.toFixed(5),a+", "+f}else return!1},location(){return this.locationString!=""?this.locationString:this.latLonString?''+this.latLonString+"":"\u2026"}}},Mi={};var Gn=Ti(Vn,Fn,Un,!1,qn,null,null,null);function qn(a){for(let f in Mi)this[f]=Mi[f]}var $n=function(){return Gn.exports}();document.querySelector("svg defs").innerHTML+=` + */(function(a,_){(function(u,P){P(_)})(j,function(u){var P="1.7.1";function g(t){var e,i,n,o;for(i=1,n=arguments.length;i0?Math.floor(t):Math.ceil(t)};p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone()._add(w(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(w(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new p(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new p(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=Ii(this.x),this.y=Ii(this.y),this},distanceTo:function(t){t=w(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=w(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=w(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+B(this.x)+", "+B(this.y)+")"}};function w(t,e,i){return t instanceof p?t:et(t)?new p(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new p(t.x,t.y):new p(t,e,i)}function z(t,e){if(!!t)for(var i=e?[t,e]:t,n=0,o=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=X(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=X(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.xe.y&&n.y=e.lat&&o.lat<=i.lat&&n.lng>=e.lng&&o.lng<=i.lng},intersects:function(t){t=W(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=W(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.late.lng&&n.lng1,zt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",S,e),window.removeEventListener("testPassiveEventSupport",S,e)}catch{}return t}(),Vi=function(){return!!document.createElement("canvas").getContext}(),fe=!!(document.createElementNS&&Ai("svg").createSVGRect),_e=!fe&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&typeof e.adj=="object"}catch{return!1}}();function ot(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var io={ie:ue,ielt9:St,edge:ce,webkit:We,android:Kt,android23:jt,androidStock:Ni,opera:He,chrome:Fe,gecko:Ue,safari:de,phantom:Di,opera12:Wi,win:Hi,ie3d:Ve,webkit3d:Ge,gecko3d:Fi,any3d:q,mobile:Ct,mobileWebkit:Qn,mobileWebkit3d:to,msPointer:vt,pointer:it,touch:nt,mobileOpera:Ui,mobileGecko:eo,retina:gt,passiveEvents:zt,canvas:Vi,svg:fe,vml:_e},qe=vt?"MSPointerDown":"pointerdown",$e=vt?"MSPointerMove":"pointermove",Ke=vt?"MSPointerUp":"pointerup",je=vt?"MSPointerCancel":"pointercancel",Et={},Gi=!1;function no(t,e,i,n){return e==="touchstart"?so(t,i,n):e==="touchmove"?ho(t,i,n):e==="touchend"&&lo(t,i,n),this}function oo(t,e,i){var n=t["_leaflet_"+e+i];return e==="touchstart"?t.removeEventListener(qe,n,!1):e==="touchmove"?t.removeEventListener($e,n,!1):e==="touchend"&&(t.removeEventListener(Ke,n,!1),t.removeEventListener(je,n,!1)),this}function so(t,e,i){var n=k(function(o){o.MSPOINTER_TYPE_TOUCH&&o.pointerType===o.MSPOINTER_TYPE_TOUCH&&K(o),Ye(o,e)});t["_leaflet_touchstart"+i]=n,t.addEventListener(qe,n,!1),Gi||(document.addEventListener(qe,ro,!0),document.addEventListener($e,ao,!0),document.addEventListener(Ke,qi,!0),document.addEventListener(je,qi,!0),Gi=!0)}function ro(t){Et[t.pointerId]=t}function ao(t){Et[t.pointerId]&&(Et[t.pointerId]=t)}function qi(t){delete Et[t.pointerId]}function Ye(t,e){t.touches=[];for(var i in Et)t.touches.push(Et[i]);t.changedTouches=[t],e(t)}function ho(t,e,i){var n=function(o){o.pointerType===(o.MSPOINTER_TYPE_MOUSE||"mouse")&&o.buttons===0||Ye(o,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener($e,n,!1)}function lo(t,e,i){var n=function(o){Ye(o,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(Ke,n,!1),t.addEventListener(je,n,!1)}var me=vt?"MSPointerDown":it?"pointerdown":"touchstart",pe=vt?"MSPointerUp":it?"pointerup":"touchend",Zt="_leaflet_";function uo(t,e,i){var n,o,s=!1,r=250;function h(c){if(it){if(!c.isPrimary||c.pointerType==="mouse")return}else if(c.touches.length>1)return;var d=Date.now(),f=d-(n||d);o=c.touches?c.touches[0]:c,s=f>0&&f<=r,n=d}function l(c){if(s&&!o.cancelBubble){if(it){if(c.pointerType==="mouse")return;var d={},f,T;for(T in o)f=o[T],d[T]=f&&f.bind?f.bind(o):f;o=d}o.type="dblclick",o.button=0,e(o),n=null}}return t[Zt+me+i]=h,t[Zt+pe+i]=l,t[Zt+"dblclick"+i]=e,t.addEventListener(me,h,zt?{passive:!1}:!1),t.addEventListener(pe,l,zt?{passive:!1}:!1),t.addEventListener("dblclick",e,!1),this}function co(t,e){var i=t[Zt+me+e],n=t[Zt+pe+e],o=t[Zt+"dblclick"+e];return t.removeEventListener(me,i,zt?{passive:!1}:!1),t.removeEventListener(pe,n,zt?{passive:!1}:!1),t.removeEventListener("dblclick",o,!1),this}var Xe=ye(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=ye(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),$i=Yt==="webkitTransition"||Yt==="OTransition"?Yt+"End":"transitionend";function Ki(t){return typeof t=="string"?document.getElementById(t):t}function Xt(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function b(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function E(t){var e=t.parentNode;e&&e.removeChild(t)}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Ot(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function It(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function Je(t,e){if(t.classList!==void 0)return t.classList.contains(e);var i=ge(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function v(t,e){if(t.classList!==void 0)for(var i=at(e),n=0,o=i.length;nthis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,W(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){e=e||{};var i=w(e.paddingTopLeft||e.padding||[0,0]),n=w(e.paddingBottomRight||e.padding||[0,0]),o=this.getCenter(),s=this.project(o),r=this.project(t),h=this.getPixelBounds(),l=h.getSize().divideBy(2),c=X([h.min.add(i),h.max.subtract(n)]);if(!c.contains(r)){this._enforcingBounds=!0;var d=s.subtract(r),f=w(r.x+d.x,r.y+d.y);(r.xc.max.x)&&(f.x=s.x-d.x,d.x>0?f.x+=l.x-i.x:f.x-=l.x-n.x),(r.yc.max.y)&&(f.y=s.y-d.y,d.y>0?f.y+=l.y-i.y:f.y-=l.y-n.y),this.panTo(this.unproject(f),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=g({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),o=i.divideBy(2).round(),s=n.subtract(o);return!s.x&&!s.y?this:(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(k(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=g({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=k(this._handleGeolocationResponse,this),i=k(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var 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:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new M(e,i),o=n.toBounds(t.coords.accuracy*2),s=this._locateOptions;if(s.setView){var r=this.getBoundsZoom(o);this.setView(n,s.maxZoom?Math.min(r,s.maxZoom):r)}var h={latlng:n,bounds:o,timestamp:t.timestamp};for(var l in t.coords)typeof t.coords[l]=="number"&&(h[l]=t.coords[l]);this.fire("locationfound",h)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),E(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(U(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)E(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),n=b("div",i,e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new V(e,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=W(t),i=w(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),h=t.getSouthEast(),l=this.getSize().subtract(i),c=X(this.project(h,n),this.project(r,n)).getSize(),d=q?this.options.zoomSnap:1,f=l.x/c.x,T=l.y/c.y,mt=e?Math.max(f,T):Math.min(f,T);return n=this.getScaleZoom(mt,n),d&&(n=Math.round(n/(d/100))*(d/100),n=e?Math.ceil(n/d)*d:Math.floor(n/d)*d),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new p(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new z(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=e===void 0?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=e===void 0?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.latLngToPoint(Z(t),e)},unproject:function(t,e){return e=e===void 0?this._zoom:e,this.options.crs.pointToLatLng(w(t),e)},layerPointToLatLng:function(t){var e=w(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(Z(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Z(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(W(t))},distance:function(t,e){return this.options.crs.distance(Z(t),Z(e))},containerPointToLayerPoint:function(t){return w(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return w(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(w(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(Z(t)))},mouseEventToContainerPoint:function(t){return Xi(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=Ki(t);if(e){if(e._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");y(e,"scroll",this._onScroll,this),this._containerId=m(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&q,v(t,"leaflet-container"+(nt?" leaflet-touch":"")+(gt?" leaflet-retina":"")+(St?" leaflet-oldie":"")+(de?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=Xt(t,"position");e!=="absolute"&&e!=="relative"&&e!=="fixed"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),A(this._mapPane,new p(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(v(t.markerPane,"leaflet-zoom-hide"),v(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){A(this._mapPane,new p(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){e===void 0&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return U(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){A(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[m(this._container)]=this;var e=t?I:y;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),q&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){U(this._resizeRequest),this._resizeRequest=F(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i=[],n,o=e==="mouseout"||e==="mouseover",s=t.target||t.srcElement,r=!1;s;){if(n=this._targets[m(s)],n&&(e==="click"||e==="preclick")&&!t._simulated&&this._draggableMoved(n)){r=!0;break}if(n&&n.listens(e,!0)&&(o&&!Le(s,t)||(i.push(n),o))||s===this._container)break;s=s.parentNode}return!i.length&&!r&&!o&&Le(s,t)&&(i=[this]),i},_handleDOMEvent:function(t){if(!(!this._loaded||ci(t))){var e=t.type;(e==="mousedown"||e==="keypress"||e==="keyup"||e==="keydown")&&oi(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if(t.type==="click"){var n=g({},t);n.type="preclick",this._fireDOMEvent(n,n.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e)),!!i.length)){var o=i[0];e==="contextmenu"&&o.listens(e,!0)&&K(t);var s={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var r=o.getLatLng&&(!o._radius||o._radius<=10);s.containerPoint=r?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=r?o.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var h=0;h0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=q?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){O(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(e&&e.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=b("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(e){var i=Xe,n=this._proxy.style[i];Lt(this._proxy,this.project(e.center,e.zoom),this.getZoomScale(e.zoom,1)),n===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){E(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Lt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return i.animate!==!0&&!this.getSize().contains(o)?!1:(F(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){!this._mapPane||(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,v(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),setTimeout(k(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){!this._animatingZoom||(this._mapPane&&O(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),F(function(){this._moveEnd(!0)},this))}});function vo(t,e){return new x(t,e)}var Q=ht.extend({options:{position:"topright"},initialize:function(t){C(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return v(e,"leaflet-control"),i.indexOf("bottom")!==-1?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(E(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ie=function(t){return new Q(t)};x.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=b("div",e+"control-container",this._container);function n(o,s){var r=e+o+" "+e+s;t[o+s]=b("div",r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)E(this._controlCorners[t]);E(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var tn=Q.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(m(t.target)),i=e.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e=document.createElement("label"),i=this._map.hasLayer(t.layer),n;t.overlay?(n=document.createElement("input"),n.type="checkbox",n.className="leaflet-control-layers-selector",n.defaultChecked=i):n=this._createRadioElement("leaflet-base-layers_"+m(this),i),this._layerControlInputs.push(n),n.layerId=m(t.layer),y(n,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("div");e.appendChild(s),s.appendChild(n),s.appendChild(o);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t=this._layerControlInputs,e,i,n=[],o=[];this._handlingClick=!0;for(var s=t.length-1;s>=0;s--)e=t[s],i=this._getLayer(e.layerId).layer,e.checked?n.push(i):e.checked||o.push(i);for(s=0;s=0;o--)e=t[o],i=this._getLayer(e.layerId).layer,e.disabled=i.options.minZoom!==void 0&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),go=function(t,e,i){return new tn(t,e,i)},di=Q.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=b("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,o){var s=b("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),ee(s),y(s,"click",ut),y(s,"click",o,this),y(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";O(this._zoomInButton,e),O(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&v(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&v(this._zoomInButton,e)}});x.mergeOptions({zoomControl:!0}),x.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new di,this.addControl(this.zoomControl))});var yo=function(t){return new di(t)},en=Q.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=b("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=b("div",e,i)),t.imperial&&(this._iScale=b("div",e,i))},_update:function(){var 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:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e=t*3.2808399,i,n,o;e>5280?(i=e/5280,n=this._getRoundNum(i),this._updateScale(this._iScale,n+" mi",n/i)):(o=this._getRoundNum(e),this._updateScale(this._iScale,o+" ft",o/e))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),wo=function(t){return new en(t)},fi=Q.extend({options:{position:"bottomright",prefix:'Leaflet'},initialize:function(t){C(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=b("div","leaflet-control-attribution"),ee(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(!!this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});x.mergeOptions({attributionControl:!0}),x.addInitHook(function(){this.options.attributionControl&&new fi().addTo(this)});var xo=function(t){return new fi(t)};Q.Layers=tn,Q.Zoom=di,Q.Scale=en,Q.Attribution=fi,ie.layers=go,ie.zoom=yo,ie.scale=wo,ie.attribution=xo;var st=ht.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});st.addTo=function(t,e){return t.addHandler(e,this),this};var Po={Events:G},nn=nt?"touchstart mousedown":"mousedown",on={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},_i={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Tt=qt.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){C(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(y(this._dragStartTarget,nn,this._onDown,this),this._enabled=!0)},disable:function(){!this._enabled||(Tt._dragging===this&&this.finishDrag(),I(this._dragStartTarget,nn,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!(t._simulated||!this._enabled)&&(this._moved=!1,!Je(this._element,"leaflet-zoom-anim")&&!(Tt._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(Tt._dragging=this,this._preventOutline&&oi(this._element),ei(),Jt(),!this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=ji(this._element);this._startPoint=new p(e.clientX,e.clientY),this._parentScale=si(i),y(document,_i[t.type],this._onMove,this),y(document,on[t.type],this._onUp,this)}},_onMove:function(t){if(!(t._simulated||!this._enabled)){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&t.touches.length===1?t.touches[0]:t,i=new p(e.clientX,e.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)s&&(r=h,s=l);s>i&&(e[r]=1,mi(t,e,i,n,r),mi(t,e,i,r,o))}function To(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;ne&&(i.push(t[n]),o=n);return oe.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function ko(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function ne(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,h=i.y-s,l=r*r+h*h,c;return l>0&&(c=((t.x-o)*r+(t.y-s)*h)/l,c>1?(o=i.x,s=i.y):c>0&&(o+=r*c,s+=h*c)),r=t.x-o,h=t.y-s,n?r*r+h*h:new p(o,s)}function ct(t){return!et(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]!="undefined"}function ln(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ct(t)}var Mo={simplify:sn,pointToSegmentDistance:rn,closestPointOnSegment:Lo,clipSegment:hn,_getEdgeIntersection:be,_getBitCode:kt,_sqClosestPointOnSegment:ne,isFlat:ct,_flat:ln};function un(t,e,i){var n,o=[1,4,2,8],s,r,h,l,c,d,f,T;for(s=0,d=t.length;s1e-7;h++)c=o*Math.sin(r),c=Math.pow((1-c)/(1+c),o/2),l=Math.PI/2-2*Math.atan(s*c)-r,r+=l;return new M(r*e,t.x*e/i)}},Co={LonLat:pi,Mercator:vi,SphericalMercator:Ae},zo=g({},pt,{code:"EPSG:3395",projection:vi,transformation:function(){var t=.5/(Math.PI*vi.R);return $t(t,.5,-t,.5)}()}),cn=g({},pt,{code:"EPSG:4326",projection:pi,transformation:$t(1/180,1,-1/180,.5)}),Eo=g({},lt,{projection:pi,transformation:$t(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});lt.Earth=pt,lt.EPSG3395=zo,lt.EPSG3857=Ne,lt.EPSG900913=Xn,lt.EPSG4326=cn,lt.Simple=Eo;var tt=qt.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[m(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[m(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(!!e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});x.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=m(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=m(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&m(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?et(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()e)return r=(n-e)/i,this._map.layerPointToLatLng([s.x-r*(s.x-o.x),s.y-r*(s.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=Z(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new V,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ct(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=ct(t),n=0,o=t.length;n=2&&e[0]instanceof M&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){dt.prototype._setLatLngs.call(this,t),ct(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ct(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new p(e,e);if(t=new z(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(var n=0,o=this._rings.length,s;nt.y!=o.y>t.y&&t.x<(o.x-n.x)*(t.y-n.y)/(o.y-n.y)+n.x&&(e=!e);return e||dt.prototype._containsPoint.call(this,t,!0)}});function Do(t,e){return new Nt(t,e)}var ft=At.extend({initialize:function(t,e){C(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e=et(t)?t:t.features,i,n,o;if(e){for(i=0,n=e.length;i0?n:[e.src];return}et(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var s=0;so?(e.height=o+"px",v(t,s)):O(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();A(this._container,e.add(i))},_adjustPan:function(){if(!!this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(Xt(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new p(this._containerLeft,-i-this._containerBottom);o._add(yt(this._container));var s=t.layerPointToContainerPoint(o),r=w(this.options.autoPanPadding),h=w(this.options.autoPanPaddingTopLeft||r),l=w(this.options.autoPanPaddingBottomRight||r),c=t.getSize(),d=0,f=0;s.x+n+l.x>c.x&&(d=s.x+n-c.x+l.x),s.x-d-h.x<0&&(d=s.x-h.x),s.y+i+l.y>c.y&&(f=s.y+i-c.y+l.y),s.y-f-h.y<0&&(f=s.y-h.y),(d||f)&&t.fire("autopanstart").panBy([d,f])}},_onCloseButtonClick:function(t){this._close(),ut(t)},_getAnchor:function(){return w(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Vo=function(t,e){return new Wt(t,e)};x.mergeOptions({closePopupOnClick:!0}),x.include({openPopup:function(t,e,i){return t instanceof Wt||(t=new Wt(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return(!t||t===this._popup)&&(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),tt.include({bindPopup:function(t,e){return t instanceof Wt?(C(t,e),this._popup=t,t._source=this):((!this._popup||e)&&(this._popup=new Wt(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;if(!!this._popup&&!!this._map){if(ut(t),e instanceof wt){this.openPopup(t.layer||t.target,t.latlng);return}this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var Ht=_t.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){_t.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){_t.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=_t.prototype.getEvents.call(this);return nt&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip",e=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=b("div",e)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),h=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,d=w(this.options.offset),f=this._getAnchor();h==="top"?(e=l/2,i=c):h==="bottom"?(e=l/2,i=0):h==="center"?(e=l/2,i=c/2):h==="right"?(e=0,i=c/2):h==="left"?(e=l,i=c/2):r.xthis.options.maxZoom||in?this._retainParent(o,s,r,n):!1)},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new p(o,s);r.z=i+1;var h=this._tileCoordsToKey(r),l=this._tiles[h];if(l&&l.active){l.retain=!0;continue}else l&&l.loaded&&(l.retain=!0);i+1this.options.maxZoom||this.options.minZoom!==void 0&&o1){this._setView(t,i);return}for(var f=o.min.y;f<=o.max.y;f++)for(var T=o.min.x;T<=o.max.x;T++){var mt=new p(T,f);if(mt.z=this._tileZoom,!!this._isValidTile(mt)){var Mt=this._tiles[this._tileCoordsToKey(mt)];Mt?Mt.current=!0:r.push(mt)}}if(r.sort(function(xt,Li){return xt.distanceTo(s)-Li.distanceTo(s)}),r.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Ze=document.createDocumentFragment();for(T=0;Ti.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return W(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i),s=e.unproject(n,t.z),r=e.unproject(o,t.z);return[s,r]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new V(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new p(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];!e||(E(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){v(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=S,t.onmousemove=S,St&&this.options.opacity<1&&$(t,this.options.opacity),Kt&&!jt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),k(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&F(k(this._tileReady,this,t,null,o)),A(o,i),this._tiles[n]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);i=this._tiles[n],!!i&&(i.loaded=+new Date,this._map._fadeAnimated?($(i.el,0),U(this._fadeFrame),this._fadeFrame=F(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(v(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),St||!this._map._fadeAnimated?F(this._pruneTiles,this):setTimeout(k(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new p(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:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function $o(t){return new se(t)}var Ft=se.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=C(this,e),e.detectRetina&>&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),typeof e.subdomains=="string"&&(e.subdomains=e.subdomains.split("")),Kt||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&e===void 0&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return y(i,"load",k(this._tileOnLoad,this,e,i)),y(i,"error",k(this._tileOnError,this,e,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),i.alt="",i.setAttribute("role","presentation"),i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={r:gt?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return Ci(this._url,g(e,this.options))},_tileOnLoad:function(t,e){St?setTimeout(k(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=S,e.onerror=S,e.complete||(e.src=le,E(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(!!e)return Ni||e.el.setAttribute("src",le),se.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(!(!this._map||i&&i.getAttribute("src")===le))return se.prototype._tileReady.call(this,t,e,i)}});function gn(t,e){return new Ft(t,e)}var yn=Ft.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=g({},this.defaultWmsParams);for(var n in e)n in this.options||(i[n]=e[n]);e=C(this,e);var o=e.detectRetina&>?2:1,s=this.getTileSize();i.width=s.x*o,i.height=s.y*o,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Ft.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=X(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===cn?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),h=Ft.prototype.getTileUrl.call(this,t);return h+Si(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return g(this.wmsParams,t),e||this.redraw(),this}});function Ko(t,e){return new yn(t,e)}Ft.WMS=yn,gn.wms=Ko;var rt=tt.extend({options:{padding:.1,tolerance:0},initialize:function(t){C(this,t),m(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&v(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=yt(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),r=this._map.project(t,e),h=r.subtract(s),l=o.multiplyBy(-i).add(n).add(o).subtract(h);q?Lt(this._container,l,i):A(this._container,l)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(i,i.add(e.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),wn=rt.extend({getEvents:function(){var t=rt.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){rt.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");y(t,"mousemove",this._onMouseMove,this),y(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),y(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){U(this._redrawRequest),delete this._ctx,E(this._container),I(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var e in this._layers)t=this._layers[e],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){rt.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=gt?2:1;A(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",gt&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){rt.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[m(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[m(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var e=t.options.dashArray.split(/[, ]+/),i=[],n,o;for(o=0;o')}}catch{return function(e){return document.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),jo={_initContainer:function(){this._container=b("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(rt.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=re("shape");v(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=re("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;E(e),t.removeInteractiveTarget(e),delete this._layers[m(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=re("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=et(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=re("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,"+65535*360)},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){Ot(t._container)},_bringToBack:function(t){It(t._container)}},Ee=_e?re:Ai,ae=rt.extend({getEvents:function(){var t=rt.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Ee("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Ee("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){E(this._container),I(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){rt.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(e))&&(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),A(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Ee("path");t.options.className&&v(e,t.options.className),t.options.interactive&&v(e,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){E(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var 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:function(t,e){this._setPath(t,Ri(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,o="a"+i+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+o+i*2+",0 "+o+-i*2+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){Ot(t._path)},_bringToBack:function(t){It(t._path)}});_e&&ae.include(jo);function Pn(t){return fe||_e?new ae(t):null}x.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var e=this._paneRenderers[t];return e===void 0&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&xn(t)||Pn(t)}});var Ln=Nt.extend({initialize:function(t,e){Nt.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=W(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Yo(t,e){return new Ln(t,e)}ae.create=Ee,ae.pointsToPath=Ri,ft.geometryToLayer=yi,ft.coordsToLatLng=wi,ft.coordsToLatLngs=Me,ft.latLngToCoords=xi,ft.latLngsToCoords=Se,ft.getFeature=Dt,ft.asFeature=Ce,x.mergeOptions({boxZoom:!0});var bn=st.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){y(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){I(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){E(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),Jt(),ei(),this._startPoint=this._map.mouseEventToContainerPoint(t),y(document,{contextmenu:ut,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=b("div","leaflet-zoom-box",this._container),v(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),i=e.getSize();A(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(E(this._box),O(this._container,"leaflet-crosshair")),Qt(),ii(),I(document,{contextmenu:ut,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(k(this._resetState,this),0);var e=new V(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){t.keyCode===27&&this._finish()}});x.addInitHook("addHandler","boxZoom",bn),x.mergeOptions({doubleClickZoom:!0});var Tn=st.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;e.options.doubleClickZoom==="center"?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});x.addInitHook("addHandler","doubleClickZoom",Tn),x.mergeOptions({dragging:!0,inertia:!jt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var kn=st.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Tt(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))}v(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){O(this._map._container,"leaflet-grab"),O(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=W(this._map.options.maxBounds);this._offsetLimit=X(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:function(t){if(this._map.options.inertia){var 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:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var 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:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.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:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)0?s:-s))-e;this._delta=0,this._startTime=null,!!r&&(t.options.scrollWheelZoom==="center"?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});x.addInitHook("addHandler","scrollWheelZoom",Sn),x.mergeOptions({tap:!0,tapTolerance:15});var Cn=st.extend({addHooks:function(){y(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){I(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(!!t.touches){if(K(t),this._fireClick=!0,t.touches.length>1){this._fireClick=!1,clearTimeout(this._holdTimeout);return}var e=t.touches[0],i=e.target;this._startPos=this._newPos=new p(e.clientX,e.clientY),i.tagName&&i.tagName.toLowerCase()==="a"&&v(i,"leaflet-active"),this._holdTimeout=setTimeout(k(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),y(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),I(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&i.tagName.toLowerCase()==="a"&&O(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new p(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});nt&&(!it||de)&&x.addInitHook("addHandler","tap",Cn),x.mergeOptions({touchZoom:nt&&!jt,bounceAtZoomLimits:!0});var zn=st.extend({addHooks:function(){v(this._map._container,"leaflet-touch-zoom"),y(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){O(this._map._container,"leaflet-touch-zoom"),I(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(!(!t.touches||t.touches.length!==2||e._animatingZoom||this._zooming)){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),e.options.touchZoom!=="center"&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),y(document,"touchmove",this._onTouchMove,this),y(document,"touchend",this._onTouchEnd,this),K(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),e.options.touchZoom==="center"){if(this._center=this._startLatLng,o===1)return}else{var s=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(o===1&&s.x===0&&s.y===0)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),U(this._animRequest);var r=k(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=F(r,this,!0),K(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,U(this._animRequest),I(document,"touchmove",this._onTouchMove,this),I(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});x.addInitHook("addHandler","touchZoom",zn),x.BoxZoom=bn,x.DoubleClickZoom=Tn,x.Drag=kn,x.Keyboard=Mn,x.ScrollWheelZoom=Sn,x.Tap=Cn,x.TouchZoom=zn,u.version=P,u.Control=Q,u.control=ie,u.Browser=io,u.Evented=qt,u.Mixin=Po,u.Util=jn,u.Class=ht,u.Handler=st,u.extend=g,u.bind=k,u.stamp=m,u.setOptions=C,u.DomEvent=po,u.DomUtil=_o,u.PosAnimation=Qi,u.Draggable=Tt,u.LineUtil=Mo,u.PolyUtil=So,u.Point=p,u.point=w,u.Bounds=z,u.bounds=X,u.Transformation=Re,u.transformation=$t,u.Projection=Co,u.LatLng=M,u.latLng=Z,u.LatLngBounds=V,u.latLngBounds=W,u.CRS=lt,u.GeoJSON=ft,u.geoJSON=_n,u.geoJson=Wo,u.Layer=tt,u.LayerGroup=Bt,u.layerGroup=Zo,u.FeatureGroup=At,u.featureGroup=Oo,u.ImageOverlay=ze,u.imageOverlay=Ho,u.VideoOverlay=mn,u.videoOverlay=Fo,u.SVGOverlay=pn,u.svgOverlay=Uo,u.DivOverlay=_t,u.Popup=Wt,u.popup=Vo,u.Tooltip=Ht,u.tooltip=Go,u.Icon=Rt,u.icon=Io,u.DivIcon=vn,u.divIcon=qo,u.Marker=Te,u.marker=Bo,u.TileLayer=Ft,u.tileLayer=gn,u.GridLayer=se,u.gridLayer=$o,u.SVG=ae,u.svg=Pn,u.Renderer=rt,u.Canvas=wn,u.canvas=xn,u.Path=wt,u.CircleMarker=ke,u.circleMarker=Ao,u.Circle=gi,u.circle=Ro,u.Polyline=dt,u.polyline=No,u.Polygon=Nt,u.polygon=Do,u.Rectangle=Ln,u.rectangle=Yo,u.Map=x,u.map=vo;var Xo=window.L;u.noConflict=function(){return window.L=Xo,this},window.L=u})})(H,H.exports);var N=H.exports,An=function(){var a=this,_=a.$createElement,u=a._self._c||_;return u("k-field",a._b({class:["k-locator-field",{filled:a.valueExists},a.status],attrs:{input:a._uid}},"k-field",a.$props,!1),[u("template",{slot:"options"},[a.valueExists&&a.filledStatus=="closed"?u("k-button",{attrs:{id:a._uid,icon:"edit"},on:{click:function(P){return a.toggle("open")}}},[a._v(" "+a._s(a.$t("edit"))+" ")]):a._e(),a.valueExists&&a.filledStatus=="open"?u("k-button",{attrs:{id:a._uid,icon:"trash"},on:{click:a.resetValue}},[a._v(" "+a._s(a.$t("locator.reset"))+" ")]):a._e(),a.valueExists&&a.filledStatus=="open"?u("k-button",{attrs:{id:a._uid,icon:"collapse"},on:{click:function(P){return a.toggle("closed")}}},[a._v(" "+a._s(a.$t("locator.collapse"))+" ")]):a._e()],1),u("div",{staticClass:"k-input k-locator-input",attrs:{"data-theme":"field"}},[u("input",{directives:[{name:"model",rawName:"v-model",value:a.location,expression:"location"}],ref:"input",staticClass:"k-text-input",attrs:{placeholder:a.$t("locator.placeholder")},domProps:{value:a.location},on:{input:[function(P){P.target.composing||(a.location=P.target.value)},a.onLocationInput]}}),u("button",{class:[{disabled:!a.location.length}],on:{click:a.getCoordinates}},[u("svg",[u("use",{attrs:{href:"#icon-locator-locate"}})]),a._v(" "+a._s(a.$t("locator.locate")))]),a.autocomplete?u("k-dropdown-content",{ref:"dropdown"},a._l(a.dropdownOptions,function(P,g){return u("k-dropdown-item",{key:g,on:{click:function(D){return a.select(P)}},nativeOn:{keydown:[function(D){return!D.type.indexOf("key")&&a._k(D.keyCode,"enter",13,D.key,"Enter")?null:(D.preventDefault(),a.select(P))},function(D){return!D.type.indexOf("key")&&a._k(D.keyCode,"space",32,D.key,[" ","Spacebar"])?null:(D.preventDefault(),a.select(P))}]}},[u("span",{domProps:{innerHTML:a._s(P.name)}}),u("span",{staticClass:"k-location-type",domProps:{innerHTML:a._s(P.type)}})])}),1):a._e()],1),u("k-dialog",{ref:"dialog",on:{close:function(P){a.error=""}}},[u("k-text",[a._v(a._s(a.error))]),u("k-button-group",{attrs:{slot:"footer"},slot:"footer"},[u("k-button",{attrs:{icon:"check"},on:{click:function(P){return a.$refs.dialog.close()}}},[a._v(" "+a._s(a.$t("confirm"))+" ")])],1)],1),u("div",{staticClass:"k-locator-container"},[u("div",{class:["map-container",{"map-only":!a.display}]},[u("div",{staticClass:"map",attrs:{id:a.mapId}})]),a.valueExists&&a.display?u("div",{class:["content",a.liststyle]},a._l(a.display,function(P){return a.value[P]?u("div",{staticClass:"content-block"},[u("div",{staticClass:"title"},[a._v(a._s(a.translatedTitle(P)))]),u("div",{staticClass:"value"},[a._v(a._s(a.value[P]))])]):a._e()}),0):a.valueExists?a._e():u("k-empty",{staticClass:"k-locator-empty",attrs:{icon:"search"},on:{click:function(P){return a.$refs.input.focus()}}},[a._v(" "+a._s(a.$t("locator.empty"))+" ")])],1)],2)},Rn=[],cs="";function Ti(a,_,u,P,g,D,k,he){var m=typeof a=="function"?a.options:a;_&&(m.render=_,m.staticRenderFns=u,m._compiled=!0),P&&(m.functional=!0),D&&(m._scopeId="data-v-"+D);var Y;if(k?(Y=function(B){B=B||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!B&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(B=__VUE_SSR_CONTEXT__),g&&g.call(this,B),B&&B._registeredComponents&&B._registeredComponents.add(k)},m._ssrRegister=Y):g&&(Y=he?function(){g.call(this,(m.functional?this.parent:this).$root.$options.shadowRoot)}:g),Y)if(m.functional){m._injectStyles=Y;var Pt=m.render;m.render=function(Gt,at){return Y.call(at),Pt(Gt,at)}}else{var S=m.beforeCreate;m.beforeCreate=S?[].concat(S,Y):[Y]}return{exports:a,options:m}}const Nn={data(){return{map:null,marker:null,tileLayer:null,location:"",error:"",limit:1,dropdownOptions:[],filledStatus:"closed",dragged:!1}},props:{markerUrl:String,tiles:String,center:Object,zoom:Object,saveZoom:Boolean,autoSaveZoom:Boolean,mapbox:Object,display:[Array,Boolean],geocoding:String,liststyle:String,liststyle:String,draggable:Boolean,autocomplete:Boolean,language:[String,Boolean],dblclick:String,label:String,disabled:Boolean,help:String,parent:String,value:Object,name:[String,Number],required:Boolean,type:String},computed:{mapId(){return"map-"+this._uid},icon(){return N.icon({iconUrl:this.markerUrl,iconSize:[40,47],iconAnchor:[20,47]})},valueExists(){return this.value&&(Object.keys(this.value).length>1||Object.keys(this.value).length==1&&!this.value.zoom)?Object.keys(this.value).length:!1},status(){return this.valueExists?this.filledStatus:""},defaultCoords(){return this.valueExists?[this.value.lat,this.value.lon]:[this.center.lat,this.center.lon]},defaultZoom(){return this.valueExists&&this.value.zoom?this.value.zoom:this.zoom.default},coords(){return this.valueExists?[this.value.lat,this.value.lon]:[]},tileUrl(){return this.tiles=="mapbox"||this.tiles=="mapbox.custom"?"https://api.mapbox.com/styles/v1/"+this.mapbox.id+"/tiles/256/{z}/{x}/{y}"+(N.Browser.retina?"@2x":"")+"?access_token="+this.mapbox.token:this.tiles=="wikimedia"?"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}"+(N.Browser.retina?"@2x.png":".png"):this.tiles=="openstreetmap"?"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png":this.tiles=="light_all"||this.tiles=="voyager"?"https://cartodb-basemaps-{s}.global.ssl.fastly.net/rastertiles/"+this.tiles+"/{z}/{x}/{y}"+(N.Browser.retina?"@2x.png":".png"):""},attribution(){return this.tiles=="mapbox"||this.tiles=="mapbox.custom"?'© OpenStreetMap, © Mapbox':this.tiles=="wikimedia"?'© OpenStreetMap, © Wikimedia':this.tiles=="openstreetmap"?'© OpenStreetMap':this.tiles=="light_all"||this.tiles=="voyager"?'© OpenStreetMap, © CARTO':'© OpenStreetMap'},searchQuery(){if(this.geocoding=="nominatim"){let a=this.language?"&accept-language="+this.language:"";return"https://nominatim.openstreetmap.org/search?format=jsonv2&limit=1&addressdetails=1&q="+this.location+a}else if(this.geocoding=="mapbox"){let a=this.language?"&language="+this.language:"";return"https://api.mapbox.com/geocoding/v5/mapbox.places/"+this.location+".json?types=address,country,postcode,place,locality&limit="+this.limit+"&access_token="+this.mapbox.token+a}else return""}},watch:{value(){this.updateMap()}},mounted(){this.initMap()},methods:{onLocationInput(){if(!this.autocomplete)return!1;if(this.geocoding&&this.location.length){if(this.geocoding!="mapbox")return!1;const a={referrerPolicy:"strict-origin-when-cross-origin"};this.limit=5,fetch(this.searchQuery,a).then(_=>_.json()).then(_=>{if(_.features.length){let u=_.features.filter(P=>P.relevance==1);this.dropdownOptions=u.map(P=>({name:P.place_name,type:this.capitalize(P.place_type[0])})),this.$refs.dropdown.open()}else this.$refs.dropdown.close()}).catch(_=>{this.error=this.$t("locator.error"),this.$refs.dialog.open(),this.$refs.dropdown.close()})}else this.$refs.dropdown.close()},select(a){this.location=a.name,this.getCoordinates()},translatedTitle(a){return a=a.replace("lon","longitude"),a=a.replace("lat","latitude"),this.$t("locator."+a)},toggle(a){this.filledStatus=a,this.$nextTick(()=>{this.map.invalidateSize(),this.map.setView(this.coords,this.defaultZoom),a=="closed"&&this.marker?this.disableMapEvents():a=="open"&&this.marker&&this.enableMapEvents()})},initMap(){let a=this.value?this.value.zoom||this.defaultZoom:this.defaultZoom;this.map=N.map(this.mapId,{minZoom:this.zoom.min,maxZoom:this.zoom.max}).setView(this.defaultCoords,a),this.tileLayer=N.tileLayer(this.tileUrl,{attribution:this.attribution}),(this.tiles=="mapbox"||this.tiles=="mapbox.custom")&&(this.tileLayer.on("loading",()=>document.querySelector("meta[name=referrer]").content="strict-origin-when-cross-origin"),this.tileLayer.on("load",()=>document.querySelector("meta[name=referrer]").content="same-origin")),this.map.addLayer(this.tileLayer),this.coords.length&&this.setMarker(),this.saveZoom&&this.autoSaveZoom&&this.map.on("zoomend",()=>{this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()}),this.$emit("input",this.value),this.dragged=!0,setTimeout(()=>{this.dragged=!1},500)}),this.dblclick=="marker"&&(this.map.doubleClickZoom.disable(),this.map.on("dblclick",_=>{this.setCoordinates(_.latlng.lat+","+_.latlng.lng)}))},updateMap(){this.map&&(this.marker?this.valueExists?(this.marker.setLatLng(this.coords),this.dragged||this.toggle("closed")):(this.map.removeLayer(this.marker),this.marker=null):!this.marker&&this.valueExists&&(this.setMarker(),this.dragged||this.toggle("closed")),this.valueExists?this.map.panTo(this.coords):this.$nextTick(()=>{this.map.invalidateSize();let a=this.value?this.value.zoom||this.defaultZoom:this.defaultZoom;this.map.setView(this.defaultCoords,a)}))},setMarker(){this.marker&&this.map.removeLayer(this.marker),this.marker=N.marker(this.coords,{icon:this.icon,draggable:this.draggable,autoPan:this.draggable}),this.map.addLayer(this.marker),this.filledStatus=="closed"&&this.disableMapEvents(),this.marker.on("dragend",a=>{let _=this.marker.getLatLng(),u=this;this.value={lat:parseFloat(_.lat),lon:parseFloat(_.lng),number:null,city:null,region:null,country:null,postcode:null,address:null,osm:null},this.saveZoom&&(this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()})),this.$emit("input",this.value),this.dragged=!0,setTimeout(()=>{u.dragged=!1},500)})},getCoordinates(a){if(a&&(a.preventDefault(),a.stopPropagation()),this.$refs.dropdown&&this.$refs.dropdown.close(),this.limit=1,this.isLatLon(this.location))return this.setCoordinates(this.location),!0;if(this.geocoding&&this.location.length){const _=this.geocoding=="mapbox"?{referrerPolicy:"strict-origin-when-cross-origin"}:{};fetch(this.searchQuery,_).then(u=>u.json()).then(u=>{u.length||Object.keys(u).length?(this.geocoding=="nominatim"?this.setNominatimResponse(u):this.geocoding=="mapbox"&&this.setMapboxResponse(u),this.location=""):(this.error=this.$t("locator.empty_response"),this.$refs.dialog.open(),this.value={}),this.$emit("input",this.value)}).catch(u=>{this.error=this.$t("locator.error"),this.$refs.dialog.open()})}},isLatLon(a){return/^((\-?|\+?)?\d+(\.\d+)?),\s*((\-?|\+?)?\d+(\.\d+)?)$/gi.test(a)},setCoordinates(a){let _=a.split(","),u=_[0].replace(" ",""),P=_[1].replace(" ",""),g=this;this.value={lat:parseFloat(u),lon:parseFloat(P),number:null,city:null,region:null,country:null,postcode:null,address:null,osm:null},this.saveZoom&&(this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()})),this.location="",this.$emit("input",this.value),this.dragged=!0,setTimeout(()=>{g.dragged=!1},500)},setNominatimResponse(a){a=a[0],this.value={lat:parseFloat(a.lat),lon:parseFloat(a.lon),number:a.address.house_number,city:a.address.city||a.address.town||a.address.village||a.address.county||a.address.state,region:a.address.state,country:a.address.country,postcode:a.address.postcode,address:a.address.road,osm:a.osm_id},this.saveZoom&&(this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()}))},setMapboxResponse(a){a=a.features[0],this.value={lat:parseFloat(a.center[1]),lon:parseFloat(a.center[0]),number:a.address||"",city:a.context.find(_=>_.id.startsWith("place"))?a.context.find(_=>_.id.startsWith("place")).text:"",region:a.context.find(_=>_.id.startsWith("region"))?a.context.find(_=>_.id.startsWith("region")).text:"",country:a.context.find(_=>_.id.startsWith("country"))?a.context.find(_=>_.id.startsWith("country")).text:"",postcode:a.context.find(_=>_.id.startsWith("postcode"))?a.context.find(_=>_.id.startsWith("postcode")).text:"",address:a.text||""},this.saveZoom&&(this.value=Vt(Ut({},this.value),{zoom:this.map.getZoom()}))},capitalize(a){return a.charAt(0).toUpperCase()+a.slice(1)},disableMapEvents(){this.map&&(this.map.scrollWheelZoom.disable(),this.map.dragging.disable(),this.map.touchZoom.disable(),this.map.doubleClickZoom.disable(),this.map.boxZoom.disable(),this.map.keyboard.disable(),this.map.tap&&this.map.tap.disable()),this.marker&&this.marker.dragging.disable()},enableMapEvents(){this.map&&(this.map.scrollWheelZoom.enable(),this.map.dragging.enable(),this.map.touchZoom.enable(),this.dblclick!="marker"&&this.map.doubleClickZoom.enable(),this.map.boxZoom.enable(),this.map.keyboard.enable(),this.map.tap&&this.map.tap.enable()),this.marker&&this.draggable&&this.marker.dragging.enable()},resetValue(){this.value={},this.$emit("input",this.value)}}},ki={};var Dn=Ti(Nn,An,Rn,!1,Wn,null,null,null);function Wn(a){for(let _ in ki)this[_]=ki[_]}var Hn=function(){return Dn.exports}(),Fn=function(){var a=this,_=a.$createElement,u=a._self._c||_;return u("div",{staticClass:"k-locator-field-preview"},[u("figure",{staticClass:"locator-preview"},[u("k-icon",{staticClass:"k-pages-field-preview-image",attrs:{type:"locatorMarker",back:"pattern"}}),u("figcaption",{domProps:{innerHTML:a._s(a.location)}})],1)])},Un=[];const Vn={props:{value:[Object,String]},computed:{locationString(){let a=this.value.number?this.value.number+" ":"",_=this.value.address?this.value.address+", ":"",u=this.value.postcode?this.value.postcode+" ":"",P=this.value.city?this.value.city+", ":"",g=this.value.country?this.value.country:"";return a+_+u+P+g},latLonString(){if(this.value.lat&&this.value.lon){let a=typeof this.value.lat=="string"?parseFloat(this.value.lat):this.value.lat;a=a.toFixed(5);let _=typeof this.value.lon=="string"?parseFloat(this.value.lon):this.value.lon;return _=_.toFixed(5),a+", "+_}else return!1},location(){return this.locationString!=""?this.locationString:this.latLonString?''+this.latLonString+"":"\u2026"}}},Mi={};var Gn=Ti(Vn,Fn,Un,!1,qn,null,null,null);function qn(a){for(let _ in Mi)this[_]=Mi[_]}var $n=function(){return Gn.exports}();document.querySelector("svg defs").innerHTML+=`