/*! For license information please see mapeditor.js.LICENSE.txt */ (()=>{var t={922:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},251:t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),r="/*# ".concat(o," */");return[e].concat([r]).join("\n")}return[e].join("\n")}},565:(t,e,n)=>{var i,o,r;o=[n(208)],void 0===(r="function"==typeof(i=function(t){t.Map.mergeOptions({contextmenuItems:[]}),t.Map.ContextMenu=t.Handler.extend({_touchstart:t.Browser.msPointer?"MSPointerDown":t.Browser.pointer?"pointerdown":"touchstart",statics:{BASE_CLS:"leaflet-contextmenu"},initialize:function(e){t.Handler.prototype.initialize.call(this,e),this._items=[],this._visible=!1;var n=this._container=t.DomUtil.create("div",t.Map.ContextMenu.BASE_CLS,e._container);n.style.zIndex=1e4,n.style.position="absolute",e.options.contextmenuWidth&&(n.style.width=e.options.contextmenuWidth+"px"),this._createItems(),t.DomEvent.on(n,"click",t.DomEvent.stop).on(n,"mousedown",t.DomEvent.stop).on(n,"dblclick",t.DomEvent.stop).on(n,"contextmenu",t.DomEvent.stop)},addHooks:function(){var e=this._map.getContainer();t.DomEvent.on(e,"mouseleave",this._hide,this).on(document,"keydown",this._onKeyDown,this),t.Browser.touch&&t.DomEvent.on(document,this._touchstart,this._hide,this),this._map.on({contextmenu:this._show,mousedown:this._hide,movestart:this._hide,zoomstart:this._hide},this)},removeHooks:function(){var e=this._map.getContainer();t.DomEvent.off(e,"mouseleave",this._hide,this).off(document,"keydown",this._onKeyDown,this),t.Browser.touch&&t.DomEvent.off(document,this._touchstart,this._hide,this),this._map.off({contextmenu:this._show,mousedown:this._hide,movestart:this._hide,zoomstart:this._hide},this)},showAt:function(e,n){e instanceof t.LatLng&&(e=this._map.latLngToContainerPoint(e)),this._showAtPoint(e,n)},hide:function(){this._hide()},addItem:function(t){return this.insertItem(t)},insertItem:function(t,e){e=void 0!==e?e:this._items.length;var n=this._createItem(this._container,t,e);return this._items.push(n),this._sizeChanged=!0,this._map.fire("contextmenu.additem",{contextmenu:this,el:n.el,index:e}),n.el},removeItem:function(e){var n=this._container;return isNaN(e)||(e=n.children[e]),e?(this._removeItem(t.Util.stamp(e)),this._sizeChanged=!0,this._map.fire("contextmenu.removeitem",{contextmenu:this,el:e}),e):null},removeAllItems:function(){for(var e,n=this._container.children;n.length;)e=n[0],this._removeItem(t.Util.stamp(e));return n},hideAllItems:function(){var t,e;for(t=0,e=this._items.length;t':c&&(u=''),a.innerHTML=u+n.text,a.href="#",t.DomEvent.on(a,"mouseover",this._onItemMouseOver,this).on(a,"mouseout",this._onItemMouseOut,this).on(a,"mousedown",t.DomEvent.stopPropagation).on(a,"click",s),t.Browser.touch&&t.DomEvent.on(a,this._touchstart,t.DomEvent.stopPropagation),t.Browser.pointer||t.DomEvent.on(a,"click",this._onItemMouseOut,this),{id:t.Util.stamp(a),el:a,callback:s}},_removeItem:function(e){var n,i,o,r,a;for(o=0,r=this._items.length;oi.x?(o.style.left="auto",o.style.right=Math.min(Math.max(i.x-e.x,0),i.x-r.x-1)+"px"):(o.style.left=Math.max(e.x,0)+"px",o.style.right="auto"),e.y+r.y>i.y?(o.style.top="auto",o.style.bottom=Math.min(Math.max(i.y-e.y,0),i.y-r.y-1)+"px"):(o.style.top=Math.max(e.y,0)+"px",o.style.bottom="auto")},_getElementSize:function(t){var e=this._size,n=t.style.display;return e&&!this._sizeChanged||(e={},t.style.left="-999999px",t.style.right="auto",t.style.display="block",e.x=t.offsetWidth,e.y=t.offsetHeight,t.style.left="auto",t.style.display=n,this._sizeChanged=!1),e},_onKeyDown:function(t){27===t.keyCode&&this._hide()},_onItemMouseOver:function(e){t.DomUtil.addClass(e.target||e.srcElement,"over")},_onItemMouseOut:function(e){t.DomUtil.removeClass(e.target||e.srcElement,"over")}}),t.Map.addInitHook("addHandler","contextmenu",t.Map.ContextMenu),t.Mixin.ContextMenu={bindContextMenu:function(e){return t.setOptions(this,e),this._initContextMenu(),this},unbindContextMenu:function(){return this.off("contextmenu",this._showContextMenu,this),this},addContextMenuItem:function(t){this.options.contextmenuItems.push(t)},removeContextMenuItemWithIndex:function(t){for(var e=[],n=0;n0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof R?t:v(t)?new R(t[0],t[1]):null==t?t:"object"===a(t)&&"x"in t&&"y"in t?new R(t.x,t.y):new R(t,e,n)}function j(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=z(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,a=o.y>=e.y&&i.y<=n.y;return r&&a},overlaps:function(t){t=z(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.xe.y&&i.y=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,a=o.lng>=e.lng&&i.lng<=n.lng;return r&&a},overlaps:function(t){t=Z(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.late.lng&&i.lng1,kt=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,e),window.removeEventListener("testPassiveEventSupport",c,e)}catch(t){}return t}(),At=!!document.createElement("canvas").getContext,Rt=!(!document.createElementNS||!X("svg").createSVGRect),Ct=!!Rt&&(($=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===($.firstChild&&$.firstChild.namespaceURI)),It=!Rt&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"===a(e.adj)}catch(t){return!1}}();function jt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var zt={ie:et,ielt9:nt,edge:it,webkit:ot,android:rt,android23:at,androidStock:lt,opera:ct,chrome:ut,gecko:ht,safari:dt,phantom:pt,opera12:ft,win:mt,ie3d:_t,webkit3d:vt,gecko3d:gt,any3d:yt,mobile:bt,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:Et,pointer:Lt,touch:Tt,touchNative:Pt,mobileOpera:Mt,mobileGecko:Ot,retina:St,passiveEvents:kt,canvas:At,svg:Rt,vml:It,inlineSvg:Ct,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},Nt=zt.msPointer?"MSPointerDown":"pointerdown",Zt=zt.msPointer?"MSPointerMove":"pointermove",Bt=zt.msPointer?"MSPointerUp":"pointerup",Dt=zt.msPointer?"MSPointerCancel":"pointercancel",Ht={touchstart:Nt,touchmove:Zt,touchend:Bt,touchcancel:Dt},Ft={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Be(e),Kt(t,e)},touchmove:Kt,touchend:Kt,touchcancel:Kt},Ut={},Wt=!1;function Jt(t){Ut[t.pointerId]=t}function Vt(t){Ut[t.pointerId]&&(Ut[t.pointerId]=t)}function qt(t){delete Ut[t.pointerId]}function Kt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Ut)e.touches.push(Ut[n]);e.changedTouches=[e],t(e)}}var Gt,Yt,Xt,Qt,$t,te=200,ee=ve(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ne=ve(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ie="webkitTransition"===ne||"OTransition"===ne?ne+"End":"transitionend";function oe(t){return"string"==typeof t?document.getElementById(t):t}function re(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function ae(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function se(t){var e=t.parentNode;e&&e.removeChild(t)}function le(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ce(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ue(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function he(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=me(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function de(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;i0?2*window.devicePixelRatio:1;function We(t){return zt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ue:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function Je(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var Ve={__proto__:null,on:Se,off:Ae,stopPropagation:ze,disableScrollPropagation:Ne,disableClickPropagation:Ze,preventDefault:Be,stop:De,getPropagationPath:He,getMousePosition:Fe,getWheelDelta:We,isExternalTarget:Je,addListener:Se,removeListener:Ae},qe=A.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=be(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=T(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;ethis.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,Z(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),r=this.project(t),a=this.getPixelBounds(),s=z([a.min.add(n),a.max.subtract(i)]),l=s.getSize();if(!s.contains(r)){this._enforcingBounds=!0;var c=r.subtract(s.getCenter()),u=s.extend(r).getSize().subtract(l);o.x+=c.x<0?-u.x:u.x,o.y+=c.y<0?-u.y:u.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var o=this.getSize(),r=n.divideBy(2).round(),a=o.divideBy(2).round(),s=r.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:o})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=i(this._handleGeolocationResponse,this),o=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,o,t):navigator.geolocation.getCurrentPosition(n,o,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){if(this._container._leaflet_id){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new B(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(r[a]=t.coords[a]);this.fire("locationfound",r)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),se(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(M(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)se(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ae("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=Z(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(n),c=z(this.project(s,i),this.project(a,i)).getSize(),u=zt.any3d?this.options.zoomSnap:1,h=l.x/c.x,d=l.y/c.y,p=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(p,i),u&&(i=Math.round(i/(u/100))*(u/100),i=e?Math.ceil(i/u)*u:Math.floor(i/u)*u),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new R(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new j(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(D(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(D(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(D(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,e){return this.options.crs.distance(D(t),D(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(D(t)))},mouseEventToContainerPoint:function(t){return Fe(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=oe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Se(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&zt.any3d,de(t,"leaflet-container"+(zt.touch?" leaflet-touch":"")+(zt.retina?" leaflet-retina":"")+(zt.ielt9?" leaflet-oldie":"")+(zt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=re(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(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),ye(this._mapPane,new R(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(de(t.markerPane,"leaflet-zoom-hide"),de(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){ye(this._mapPane,new R(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),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,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return M(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){ye(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[r(this._container)]=this;var e=t?Ae:Se;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),zt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){M(this._resizeRequest),this._resizeRequest=T((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 n,i=[],o="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,s=!1;a;){if((n=this._targets[r(a)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){s=!0;break}if(n&&n.listens(e,!0)){if(o&&!Je(a,t))break;if(i.push(n),o)break}if(a===this._container)break;a=a.parentNode}return i.length||s||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&Le(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){if("click"===t.type){var o=e({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var r=this._findEventTargets(t,n);if(i){for(var a=[],s=0;s0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=zt.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){pe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=ae("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ee,n=this._proxy.style[e];ge(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){se(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ge(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,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(T((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,o){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,de(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:o}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&pe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}}),Ge=S.extend({options:{position:"topright"},initialize:function(t){p(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),n=this.getPosition(),i=t._controlCorners[n];return de(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(se(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()}}),Ye=function(t){return new Ge(t)};Ke.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=ae("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=ae("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)se(this._controlCorners[t]);se(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Xe=Ge.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n1,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(r(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+r(this),i),this._layerControlInputs.push(e),e.layerId=r(t.layer),Se(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var a=document.createElement("span");return n.appendChild(a),a.appendChild(e),a.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ie.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Se(t,"click",Be),this.expand();var e=this;setTimeout((function(){Ae(t,"click",Be),e._preventClick=!1}))}}),Qe=Ge.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ae("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},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,n,i,o){var r=ae("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Ze(r),Se(r,"click",De),Se(r,"click",o,this),Se(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";pe(this._zoomInButton,e),pe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(de(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(de(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ke.mergeOptions({zoomControl:!0}),Ke.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new Qe,this.addControl(this.zoomControl))}));var $e=Ge.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ae("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=ae("div",e,n)),t.imperial&&(this._iScale=ae("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_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),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),tn=Ge.extend({options:{position:"bottomright",prefix:''+(zt.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ae("div","leaflet-control-attribution"),Ze(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},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 n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' ')}}});Ke.mergeOptions({attributionControl:!0}),Ke.addInitHook((function(){this.options.attributionControl&&(new tn).addTo(this)})),Ge.Layers=Xe,Ge.Zoom=Qe,Ge.Scale=$e,Ge.Attribution=tn,Ye.layers=function(t,e,n){return new Xe(t,e,n)},Ye.zoom=function(t){return new Qe(t)},Ye.scale=function(t){return new $e(t)},Ye.attribution=function(t){return new tn(t)};var en=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});en.addTo=function(t,e){return t.addHandler(e,this),this};var nn={Events:k},on=zt.touch?"touchstart mousedown":"mousedown",rn=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(Se(this._dragStartTarget,on,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(rn._dragging===this&&this.finishDrag(!0),Ae(this._dragStartTarget,on,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!he(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)rn._dragging===this&&this.finishDrag();else if(!(rn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(rn._dragging=this,this._preventOutline&&Le(this._element),xe(),Gt(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Te(this._element);this._startPoint=new R(e.clientX,e.clientY),this._startPos=be(this._element),this._parentScale=Me(n);var i="mousedown"===t.type;Se(document,i?"mousemove":"touchmove",this._onMove,this),Se(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new R(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)e&&(n.push(t[i]),o=i);var a,s,l,c;return ol&&(r=a,l=s);l>n&&(e[r]=1,pn(t,e,n,i,r),pn(t,e,n,r,o))}function fn(t,e,n,i,o){var r,a,s,l=i?cn:_n(t,n),c=_n(e,n);for(cn=c;;){if(!(l|c))return[t,e];if(l&c)return!1;s=_n(a=mn(t,e,r=l||c,n,o),n),r===l?(t=a,l=s):(e=a,c=s)}}function mn(t,e,n,i,o){var r,a,s=e.x-t.x,l=e.y-t.y,c=i.min,u=i.max;return 8&n?(r=t.x+s*(u.y-t.y)/l,a=u.y):4&n?(r=t.x+s*(c.y-t.y)/l,a=c.y):2&n?(r=u.x,a=t.y+l*(u.x-t.x)/s):1&n&&(r=c.x,a=t.y+l*(c.x-t.x)/s),new R(r,a,o)}function _n(t,e){var n=0;return t.xe.max.x&&(n|=2),t.ye.max.y&&(n|=8),n}function vn(t,e,n,i){var o,r=e.x,a=e.y,s=n.x-r,l=n.y-a,c=s*s+l*l;return c>0&&((o=((t.x-r)*s+(t.y-a)*l)/c)>1?(r=n.x,a=n.y):o>0&&(r+=s*o,a+=l*o)),s=t.x-r,l=t.y-a,i?s*s+l*l:new R(r,a)}function gn(t){return!v(t[0])||"object"!==a(t[0][0])&&void 0!==t[0][0]}function yn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gn(t)}function bn(t,e){var n,i,o,r,a,s,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");gn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=D([0,0]),h=Z(t);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(u=ln(t));var d=t.length,p=[];for(n=0;ni){l=(r-i)/o,c=[s.x-l*(s.x-a.x),s.y-l*(s.y-a.y)];break}var m=e.unproject(I(c));return D([m.lat+u.lat,m.lng+u.lng])}var wn={__proto__:null,simplify:hn,pointToSegmentDistance:dn,closestPointOnSegment:function(t,e,n){return vn(t,e,n)},clipSegment:fn,_getEdgeIntersection:mn,_getBitCode:_n,_sqClosestPointOnSegment:vn,isFlat:gn,_flat:yn,polylineCenter:bn},xn={project:function(t){return new R(t.lng,t.lat)},unproject:function(t){return new B(t.y,t.x)},bounds:new j([-180,-90],[180,90])},En={R:6378137,R_MINOR:6356752.314245179,bounds:new j([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),a=r*Math.sin(i),s=Math.tan(Math.PI/4-i/2)/Math.pow((1-a)/(1+a),r/2);return i=-n*Math.log(Math.max(s,1e-10)),new R(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),a=Math.exp(-t.y/i),s=Math.PI/2-2*Math.atan(a),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)e=r*Math.sin(s),e=Math.pow((1-e)/(1+e),r/2),s+=c=Math.PI/2-2*Math.atan(a*e)-s;return new B(s*n,t.x*n/i)}},Ln={__proto__:null,LonLat:xn,Mercator:En,SphericalMercator:J},Pn=e({},U,{code:"EPSG:3395",projection:En,transformation:function(){var t=.5/(Math.PI*En.R);return q(t,.5,-t,.5)}()}),Tn=e({},U,{code:"EPSG:4326",projection:xn,transformation:q(1/180,1,-1/180,.5)}),Mn=e({},F,{projection:xn,transformation:q(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 n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});F.Earth=U,F.EPSG3395=Pn,F.EPSG3857=G,F.EPSG900913=Y,F.EPSG4326=Tn,F.Simple=Mn;var On=A.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[r(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[r(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 n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});Ke.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=r(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=r(t);return this._layers[e]?(this._loaded&&t.onRemove(this),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 r(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?v(t)?t:[t]:[]).length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof B&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){Zn.prototype._setLatLngs.call(this,t),gn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new R(e,e);if(t=new j(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;ot.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||Zn.prototype._containsPoint.call(this,t,!0)}}),Dn=kn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=v(t)?t:t.features;if(o){for(e=0,n=o.length;e0&&o.push(o[0].slice()),o}function qn(t,n){return t.feature?e({},t.feature,{geometry:n}):Kn(n)}function Kn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Gn={toGeoJSON:function(t){return qn(this,{type:"Point",coordinates:Jn(this.getLatLng(),t)})}};function Yn(t,e){return new Dn(t,e)}In.include(Gn),Nn.include(Gn),zn.include(Gn),Zn.include({toGeoJSON:function(t){var e=!gn(this._latlngs);return qn(this,{type:(e?"Multi":"")+"LineString",coordinates:Vn(this._latlngs,e?1:0,!1,t)})}}),Bn.include({toGeoJSON:function(t){var e=!gn(this._latlngs),n=e&&!gn(this._latlngs[0]),i=Vn(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),qn(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Sn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),qn(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=Kn(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?qn(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var Xn=Yn,Qn=On.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=Z(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(de(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){se(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ce(this._image),this},bringToBack:function(){return this._map&&ue(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:ae("img");de(e,"leaflet-image-layer"),this._zoomAnimated&&de(e,"leaflet-zoom-animated"),this.options.className&&de(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ge(this._image,n,e)},_reset:function(){var t=this._image,e=new j(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();ye(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){_e(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),$n=Qn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ae("video");if(de(e,"leaflet-image-layer"),this._zoomAnimated&&de(e,"leaflet-zoom-animated"),this.options.className&&de(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),o=[],r=0;r0?o:[e.src]}else{v(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,e.playsInline=!!this.options.playsInline;for(var a=0;ao?(e.height=o+"px",de(t,r)):pe(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();ye(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(re(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new R(this._containerLeft,-n-this._containerBottom);o._add(be(this._container));var r=t.layerPointToContainerPoint(o),a=I(this.options.autoPanPadding),s=I(this.options.autoPanPaddingTopLeft||a),l=I(this.options.autoPanPaddingBottomRight||a),c=t.getSize(),u=0,h=0;r.x+i+l.x>c.x&&(u=r.x+i-c.x+l.x),r.x-u-s.x<0&&(u=r.x-s.x),r.y+n+l.y>c.y&&(h=r.y+n-c.y+l.y),r.y-h-s.y<0&&(h=r.y-s.y),(u||h)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,h]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ke.mergeOptions({closePopupOnClick:!0}),Ke.include({openPopup:function(t,e,n){return this._initOverlay(ni,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),On.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ni,this._popup,t,e),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){return this._popup&&(this instanceof kn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){De(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof jn?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var ii=ei.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){ei.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){ei.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=ei.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ae("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),a=i.layerPointToContainerPoint(t),s=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,u=I(this.options.offset),h=this._getAnchor();"top"===s?(e=l/2,n=c):"bottom"===s?(e=l/2,n=0):"center"===s?(e=l/2,n=c/2):"right"===s?(e=0,n=c/2):"left"===s?(e=l,n=c/2):a.xthis.options.maxZoom||ni&&this._retainParent(o,r,a,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var a=new R(o,r);a.z=n+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1this.options.maxZoom||void 0!==this.options.minZoom&&o1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var p=new R(d,h);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:a.push(p)}}if(a.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;dn.max.x)||!e.wrapLat&&(t.yn.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new N(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new R(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(se(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){de(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,zt.ielt9&&this.options.opacity<1&&_e(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),o=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&T(i(this._tileReady,this,t,null,r)),ye(r,n),this._tiles[o]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var o=this._tileCoordsToKey(t);(n=this._tiles[o])&&(n.loaded=+new Date,this._map._fadeAnimated?(_e(n.el,0),M(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(de(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),zt.ielt9||!this._map._fadeAnimated?T(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new R(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new j(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}}),ai=ri.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&zt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Se(n,"load",i(this._tileOnLoad,this,e,n)),Se(n,"error",i(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var n={r:zt.retina?"@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&&(n.y=i),n["-y"]=i}return _(this._url,e(n,this.options))},_tileOnLoad:function(t,e){zt.ielt9?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_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)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,!e.complete)){e.src=y;var n=this._tiles[t].coords;se(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",y),ri.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return ri.prototype._tileReady.call(this,t,e,n)}});function si(t,e){return new ai(t,e)}var li=ai.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,n){this._url=t;var i=e({},this.defaultWmsParams);for(var o in n)o in this.options||(i[o]=n[o]);var r=(n=p(this,n)).detectRetina&&zt.retina?2:1,a=this.getTileSize();i.width=a.x*r,i.height=a.y*r,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,ai.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=z(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,a=(this._wmsVersion>=1.3&&this._crs===Tn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),s=ai.prototype.getTileUrl.call(this,t);return s+f(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,n){return e(this.wmsParams,t),n||this.redraw(),this}});ai.WMS=li,si.wms=function(t,e){return new li(t,e)};var ci=On.extend({options:{padding:.1},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),de(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 n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));zt.any3d?ge(this._container,r,n):ye(this._container,r)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),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(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new j(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),ui=ci.extend({options:{tolerance:0},getEvents:function(){var t=ci.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ci.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Se(t,"mousemove",this._onMouseMove,this),Se(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Se(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){M(this._redrawRequest),delete this._ctx,se(this._container),Ae(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ci.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=zt.retina?2:1;ye(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",zt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ci.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[r(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,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[r(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("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),pi={_initContainer:function(){this._container=ae("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ci.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=di("shape");de(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=di("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[r(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;se(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=di("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=di("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ce(t._container)},_bringToBack:function(t){ue(t._container)}},fi=zt.vml?di:X,mi=ci.extend({_initContainer:function(){this._container=fi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=fi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){se(this._container),Ae(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){ci.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),ye(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=fi("path");t.options.className&&de(e,t.options.className),t.options.interactive&&de(e,"leaflet-interactive"),this._updateStyle(t),this._layers[r(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){se(t._path),t.removeInteractiveTarget(t._path),delete this._layers[r(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,Q(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ce(t._path)},_bringToBack:function(t){ue(t._path)}});function _i(t){return zt.svg||zt.vml?new mi(t):null}zt.vml&&mi.include(pi),Ke.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("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&hi(t)||_i(t)}});var vi=Bn.extend({initialize:function(t,e){Bn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});mi.create=fi,mi.pointsToPath=Q,Dn.geometryToLayer=Hn,Dn.coordsToLatLng=Un,Dn.coordsToLatLngs=Wn,Dn.latLngToCoords=Jn,Dn.latLngsToCoords=Vn,Dn.getFeature=qn,Dn.asFeature=Kn,Ke.mergeOptions({boxZoom:!0});var gi=en.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(){Se(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){se(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Gt(),xe(),this._startPoint=this._map.mouseEventToContainerPoint(t),Se(document,{contextmenu:De,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ae("div","leaflet-zoom-box",this._container),de(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new j(this._point,this._startPoint),n=e.getSize();ye(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(se(this._box),pe(this._container,"leaflet-crosshair")),Yt(),Ee(),Ae(document,{contextmenu:De,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ke.addInitHook("addHandler","boxZoom",gi),Ke.mergeOptions({doubleClickZoom:!0});var yi=en.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,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});Ke.addInitHook("addHandler","doubleClickZoom",yi),Ke.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var bi=en.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new rn(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))}de(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){pe(this._map._container,"leaflet-grab"),pe(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=Z(this._map.options.maxBounds);this._offsetLimit=z(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,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),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),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,a=Math.abs(o+n)0?r:-r))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});Ke.addInitHook("addHandler","scrollWheelZoom",xi),Ke.mergeOptions({tapHold:zt.touchNative&&zt.safari&&zt.mobile,tapTolerance:15});var Ei=en.extend({addHooks:function(){Se(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new R(e.clientX,e.clientY),this._holdTimeout=setTimeout(i((function(){this._cancel(),this._isTapValid()&&(Se(document,"touchend",Be),Se(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),600),Se(document,"touchend touchcancel contextmenu",this._cancel,this),Se(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ae(document,"touchend",Be),Ae(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ae(document,"touchend touchcancel contextmenu",this._cancel,this),Ae(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new R(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});Ke.addInitHook("addHandler","tapHold",Ei),Ke.mergeOptions({touchZoom:zt.touch,bounceAtZoomLimits:!0});var Li=en.extend({addHooks:function(){de(this._map._container,"leaflet-touch-zoom"),Se(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){pe(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Se(document,"touchmove",this._onTouchMove,this),Se(document,"touchend touchcancel",this._onTouchEnd,this),Be(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),o=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(o)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var a=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),M(this._animRequest);var s=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=T(s,this,!0),Be(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,M(this._animRequest),Ae(document,"touchmove",this._onTouchMove,this),Ae(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ke.addInitHook("addHandler","touchZoom",Li),Ke.BoxZoom=gi,Ke.DoubleClickZoom=yi,Ke.Drag=bi,Ke.Keyboard=wi,Ke.ScrollWheelZoom=xi,Ke.TapHold=Ei,Ke.TouchZoom=Li,t.Bounds=j,t.Browser=zt,t.CRS=F,t.Canvas=ui,t.Circle=Nn,t.CircleMarker=zn,t.Class=S,t.Control=Ge,t.DivIcon=oi,t.DivOverlay=ei,t.DomEvent=Ve,t.DomUtil=Oe,t.Draggable=rn,t.Evented=A,t.FeatureGroup=kn,t.GeoJSON=Dn,t.GridLayer=ri,t.Handler=en,t.Icon=An,t.ImageOverlay=Qn,t.LatLng=B,t.LatLngBounds=N,t.Layer=On,t.LayerGroup=Sn,t.LineUtil=wn,t.Map=Ke,t.Marker=In,t.Mixin=nn,t.Path=jn,t.Point=R,t.PolyUtil=un,t.Polygon=Bn,t.Polyline=Zn,t.Popup=ni,t.PosAnimation=qe,t.Projection=Ln,t.Rectangle=vi,t.Renderer=ci,t.SVG=mi,t.SVGOverlay=ti,t.TileLayer=ai,t.Tooltip=ii,t.Transformation=V,t.Util=O,t.VideoOverlay=$n,t.bind=i,t.bounds=z,t.canvas=hi,t.circle=function(t,e,n){return new Nn(t,e,n)},t.circleMarker=function(t,e){return new zn(t,e)},t.control=Ye,t.divIcon=function(t){return new oi(t)},t.extend=e,t.featureGroup=function(t,e){return new kn(t,e)},t.geoJSON=Yn,t.geoJson=Xn,t.gridLayer=function(t){return new ri(t)},t.icon=function(t){return new An(t)},t.imageOverlay=function(t,e,n){return new Qn(t,e,n)},t.latLng=D,t.latLngBounds=Z,t.layerGroup=function(t,e){return new Sn(t,e)},t.map=function(t,e){return new Ke(t,e)},t.marker=function(t,e){return new In(t,e)},t.point=I,t.polygon=function(t,e){return new Bn(t,e)},t.polyline=function(t,e){return new Zn(t,e)},t.popup=function(t,e){return new ni(t,e)},t.rectangle=function(t,e){return new vi(t,e)},t.setOptions=p,t.stamp=r,t.svg=_i,t.svgOverlay=function(t,e,n){return new ti(t,e,n)},t.tileLayer=si,t.tooltip=function(t,e){return new ii(t,e)},t.transformation=q,t.version="1.9.4",t.videoOverlay=function(t,e,n){return new $n(t,e,n)};var Pi=window.L;t.noConflict=function(){return window.L=Pi,this},window.L=t},"object"===a(e)?r(e):(i=[e],void 0===(o="function"==typeof(n=r)?n.apply(e,i):n)||(t.exports=o))},769:(t,e,n)=>{"use strict";var i=n(533);e.s=i.createRoot,i.hydrateRoot},93:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var i=n(251),o=n.n(i),r=n(922),a=n.n(r)()(o());a.push([t.id,".leaflet-contextmenu {\n display: none;\n box-shadow: 0 1px 7px rgba(0,0,0,0.4);\n -webkit-border-radius: 4px;\n border-radius: 4px;\n padding: 4px 0;\n background-color: #fff;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.leaflet-contextmenu a.leaflet-contextmenu-item {\n display: block;\n color: #222;\n font-size: 12px;\n line-height: 20px;\n text-decoration: none;\n padding: 0 12px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n cursor: default;\n outline: none;\n}\n\n.leaflet-contextmenu a.leaflet-contextmenu-item-disabled {\n opacity: 0.5;\n}\n\n.leaflet-contextmenu a.leaflet-contextmenu-item.over {\n background-color: #f4f4f4;\n border-top: 1px solid #f0f0f0;\n border-bottom: 1px solid #f0f0f0;\n}\n\n.leaflet-contextmenu a.leaflet-contextmenu-item-disabled.over {\n background-color: inherit;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n}\n\n.leaflet-contextmenu-icon {\n margin: 2px 8px 0 0;\n width: 16px;\n height: 16px;\n float: left;\n border: 0;\n}\n\n.leaflet-contextmenu-separator {\n border-bottom: 1px solid #ccc;\n margin: 5px 0;\n}\n","",{version:3,sources:["webpack://./node_modules/leaflet-contextmenu/dist/leaflet.contextmenu.css"],names:[],mappings:"AAAA;IACI,aAAa;IACb,qCAAqC;IACrC,0BAA0B;IAC1B,kBAAkB;IAClB,cAAc;IACd,sBAAsB;IACtB,eAAe;IACf,yBAAyB;IACzB,sBAAsB;IACtB,iBAAiB;AACrB;;AAEA;IACI,cAAc;IACd,WAAW;IACX,eAAe;IACf,iBAAiB;IACjB,qBAAqB;IACrB,eAAe;IACf,iCAAiC;IACjC,oCAAoC;IACpC,eAAe;IACf,aAAa;AACjB;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,yBAAyB;IACzB,6BAA6B;IAC7B,gCAAgC;AACpC;;AAEA;IACI,yBAAyB;IACzB,iCAAiC;IACjC,oCAAoC;AACxC;;AAEA;IACI,mBAAmB;IACnB,WAAW;IACX,YAAY;IACZ,WAAW;IACX,SAAS;AACb;;AAEA;IACI,6BAA6B;IAC7B,aAAa;AACjB",sourcesContent:[".leaflet-contextmenu {\n display: none;\n box-shadow: 0 1px 7px rgba(0,0,0,0.4);\n -webkit-border-radius: 4px;\n border-radius: 4px;\n padding: 4px 0;\n background-color: #fff;\n cursor: default;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.leaflet-contextmenu a.leaflet-contextmenu-item {\n display: block;\n color: #222;\n font-size: 12px;\n line-height: 20px;\n text-decoration: none;\n padding: 0 12px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n cursor: default;\n outline: none;\n}\n\n.leaflet-contextmenu a.leaflet-contextmenu-item-disabled {\n opacity: 0.5;\n}\n\n.leaflet-contextmenu a.leaflet-contextmenu-item.over {\n background-color: #f4f4f4;\n border-top: 1px solid #f0f0f0;\n border-bottom: 1px solid #f0f0f0;\n}\n\n.leaflet-contextmenu a.leaflet-contextmenu-item-disabled.over {\n background-color: inherit;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n}\n\n.leaflet-contextmenu-icon {\n margin: 2px 8px 0 0;\n width: 16px;\n height: 16px;\n float: left;\n border: 0;\n}\n\n.leaflet-contextmenu-separator {\n border-bottom: 1px solid #ccc;\n margin: 5px 0;\n}\n"],sourceRoot:""}]);const s=a},379:t=>{"use strict";var e=[];function n(t){for(var n=-1,i=0;i{"use strict";var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},216:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},636:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},795:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},533:t=>{"use strict";t.exports=ReactDOM}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0,(()=>{"use strict";const t=React;var e=n.n(t),i=n(769);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n");return e}var m=n(208),_=["bounds","boundsOptions","center","children","className","id","placeholder","style","whenReady","zoom"];function v(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return g(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(e,_),g=v((0,t.useState)({className:s,id:l,style:u}),1)[0],b=v((0,t.useState)(null),2),w=b[0],x=b[1];(0,t.useImperativeHandle)(n,(function(){var t;return null!==(t=null==w?void 0:w.map)&&void 0!==t?t:null}),[w]);var E=(0,t.useCallback)((function(t){if(null!==t&&null===w){var e=new m.Map(t,f);null!=r&&null!=d?e.setView(r,d):null!=i&&e.fitBounds(i,o),null!=h&&e.whenReady(h),x(function(t){return Object.freeze({__version:1,map:t})}(e))}}),[]);(0,t.useEffect)((function(){return function(){null==w||w.map.remove()}}),[w]);var L=w?t.createElement(p,{value:w},a):null!=c?c:null;return t.createElement("div",y({},g,{ref:E}),L)}var w=(0,t.forwardRef)(b),x=n(533);function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,j);return T(new m.TileLayer(n,C(i,e)),e)},P(I(M(z,(function(t,e,n){!function(t,e,n){var i=e.opacity,o=e.zIndex;null!=i&&i!==n.opacity&&t.setOpacity(i),null!=o&&o!==n.zIndex&&t.setZIndex(o)}(t,e,n);var i=e.url;null!=i&&i!==n.url&&t.setUrl(i)}))))),D=(Z=function(t){return new m.Control.Zoom(t)},P((N=M((function(t,e){return T(Z(t),e)})),function(e){var n=f(),i=N(e,n),o=i.current.instance,r=(0,t.useRef)(e.position),a=e.position;return(0,t.useEffect)((function(){return o.addTo(n.map),function(){o.remove()}}),[n.map,o]),(0,t.useEffect)((function(){null!=a&&a!==r.current&&(o.setPosition(a),r.current=a)}),[o,a]),i})));function H(t){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H(t)}function F(){F=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,a=Object.create(r.prototype),s=new k(i||[]);return o(a,"_invoke",{value:T(t,n,s)}),a}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",m="completed",_={};function v(){}function g(){}function y(){}var b={};c(b,a,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(A([])));x&&x!==n&&i.call(x,a)&&(b=x);var E=y.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(o,r,a,s){var l=h(t[o],t,r);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==H(u)&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(u).then((function(t){c.value=t,a(c)}),(function(t){return n("throw",t,a,s)}))}s(l.arg)}var r;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){n(t,i,e,o)}))}return r=r?r.then(o,o):o()}})}function T(e,n,i){var o=d;return function(r,a){if(o===f)throw new Error("Generator is already running");if(o===m){if("throw"===r)throw a;return{value:t,done:!0}}for(i.method=r,i.arg=a;;){var s=i.delegate;if(s){var l=M(s,i);if(l){if(l===_)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===d)throw o=m,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=f;var c=h(e,n,i);if("normal"===c.type){if(o=i.done?m:p,c.arg===_)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(o=m,i.method="throw",i.arg=c.arg)}}}function M(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,M(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),_;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,_;var a=r.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,_):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,_)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),_}},e}function U(t,e,n,i,o,r,a){try{var s=t[r](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,o)}function W(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){U(r,i,o,a,s,"next",t)}function s(t){U(r,i,o,a,s,"throw",t)}a(void 0)}))}}var J=function(){var t=W(F().mark((function t(e,n){var i,o,r;return F().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i="https://nominatim.openstreetmap.org/reverse?lat="+e+"&lon="+n+"&format=json",t.next=3,fetch(i);case 3:return o=t.sent,t.next=6,o.json();case 6:return r=t.sent,t.abrupt("return",r);case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),V=function(){var t=W(F().mark((function t(e){var n,i,o;return F().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n="https://nominatim.openstreetmap.org/search?q="+e+"&format=json",t.next=3,fetch(n);case 3:return i=t.sent,t.next=6,i.json();case 6:return o=t.sent,t.abrupt("return",o);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function q(){return q=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),_}},e}function Q(t,e,n,i,o,r,a){try{var s=t[r](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,o)}function $(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0)){t.next=6;break}return t.next=3,V(x);case 3:null!=(e=t.sent)&&e.length&&M(e),b(!1);case 6:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){Q(r,i,o,a,s,"next",t)}function s(t){Q(r,i,o,a,s,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return(0,t.useEffect)((function(){if(S){if(""===x)return E(""),M([]),void b(!1);if(_){b(!0);var t=setTimeout(R,300);return function(){return clearTimeout(t)}}v(!0)}}),[x]),(0,t.useEffect)((function(){k(!0);var t=function(t){var e;t.stopPropagation(),A.current&&(null===(e=L)||void 0===e||null===(e=e.DomEvent)||void 0===e?void 0:e.disableClickPropagation)(A.current)};return A.current&&(A.current.addEventListener("mousewheel",t),A.current.addEventListener("mouseover",t),A.current.addEventListener("mouseout",t)),function(){A.current&&(A.current.removeEventListener("mousewheel",t),A.current.removeEventListener("mouseover",t),A.current.removeEventListener("mouseout",t))}}),[A]),React.createElement("div",{className:r,ref:A},React.createElement("div",{className:"tf-map-editor--app--search--box"},React.createElement("input",Y({type:"text","data-1p-ignore":!0,placeholder:p},s?s={id:s}:"",{autoComplete:"false",autoFocus:c,value:x,onChange:function(t){return E(t.target.value)},onPaste:function(t){v(!0)}})),T.length>0?React.createElement("svg",{onClick:function(){return E(""),M([]),void b(!1)},className:"tf-clear-search-term",xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 -960 960 960",width:"24"},React.createElement("path",{d:"M256-213.847 213.847-256l224-224-224-224L256-746.153l224 224 224-224L746.153-704l-224 224 224 224L704-213.847l-224-224-224 224Z"})):y?React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 -960 960 960",width:"20",className:"tf-loading-anim"},React.createElement("path",{d:"M479.878-100.001q-78.032 0-147.323-29.9-69.291-29.9-121.023-81.631-51.731-51.732-81.631-121.023t-29.9-147.323q0-78.984 29.962-147.976 29.961-68.991 81.576-120.607 51.616-51.615 121.044-81.576Q402.012-859.999 480-859.999q12.75 0 21.374 8.629 8.625 8.629 8.625 21.384 0 12.756-8.625 21.371Q492.75-800 480-800q-133 0-226.5 93.5T160-480q0 133 93.5 226.5T480-160q133 0 226.5-93.5T800-480q0-12.769 8.629-21.384 8.628-8.615 21.384-8.615 12.755 0 21.37 8.625 8.616 8.624 8.616 21.374 0 77.988-29.962 147.417-29.961 69.428-81.576 121.044-51.616 51.615-120.607 81.576-68.992 29.962-147.976 29.962Z"})):React.createElement(K,{width:"24",height:"24"})),T.length>0&&React.createElement("div",{className:"tf-map-editor--app--search--results"},T.map((function(t,e){return React.createElement("div",{key:e,className:"tf-map-editor--app--search--results--item",onClick:function(){return function(t){E(h?null==t?void 0:t.display_name:""),v(!1),M([]),b(!1),f(t)}(t)}},t.display_name)}))))};function nt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&r.length===r.filter((function(t){return t.isSelected})).length,h=r.filter((function(t){return t.isSelected})).length>0;return React.createElement("div",{className:"tf-map-editor--app--sidebar--filters"},React.createElement("div",{className:"tf-map-editor--app--sidebar--filters--checks"},u?React.createElement(React.Fragment,null,React.createElement(_t,{className:"is-checked",onClick:function(){l()}})):React.createElement(gt,{onClick:function(){s()}}),!n&&h&&React.createElement(xt,{onClick:c})),!u&&!h&&React.createElement("div",{className:"tf-map-editor--app--sidebar--filters--searchbox"},React.createElement("input",{type:"text",value:i,onChange:function(t){return a(t.target.value)},placeholder:"Search"}),React.createElement(K,{width:"20",height:"20"})))};function Ot(){return Ot=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),_}},e}function Dt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Ut(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,r=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw r}}}}function Ht(t,e,n,i,o,r,a){try{var s=t[r](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,o)}function Ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(t,e)||Ut(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ut(t,e){if(t){if("string"==typeof t)return Wt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wt(t,e):void 0}}function Wt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=s)){t.next=31;break}return t.abrupt("break",36);case 31:l.preventAutoPan=!0,Z({type:"ADD_MARKER",payload:l}),n++;case 34:t.next=9;break;case 36:t.next=41;break;case 38:t.prev=38,t.t0=t.catch(7),i.e(t.t0);case 41:return t.prev=41,i.f(),t.finish(41);case 44:g(!1),0===n?w(""===L?Joomla.JText._("NR_PLEASE_ENTER_LOCATIONS_TO_IMPORT"):Joomla.JText._("NR_COULDNT_IMPORT_LOCATIONS")):(P(""),I(!1)),m(F),Z({type:"FIT_BOUNDS",payload:!0}),O({total:e.length,added:n}),t.next=57;break;case 51:t.prev=51,t.t1=t.catch(0),console.error("Error:",t.t1),g(!1),w("An unexpected error occurred."),m(F);case 57:case"end":return t.stop()}var _}),t,null,[[0,51],[7,38,41,44]])})),function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){Ht(r,i,o,a,s,"next",t)}function s(t){Ht(r,i,o,a,s,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),q=(0,x.createPortal)(React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal"},React.createElement("div",{ref:H,className:"tf-map-editor--app--sidebar--markers--edit-modal--inner"},React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--top"},React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--top--title"},Joomla.JText._("NR_IMPORT_MARKERS")),React.createElement(Nt,{width:30,height:30,onClick:U})),b&&React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--error"},b),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content"},React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content--field"},React.createElement("textarea",{autoFocus:!0,rows:12,onChange:function(t){return e=t.target.value,void P(e);var e},value:L}),React.createElement("div",{className:"tf-map-editor-example-formats"},React.createElement("div",null,Joomla.JText._("NR_IMPORT_LOCATIONS_DESC")),React.createElement("div",{className:"tf-map-editor-example-format"},React.createElement("div",null,"Kos, Greece"),React.createElement("div",null,"Crete, Greece"),React.createElement("div",null,"Athens, Greece")),React.createElement("div",{className:"tf-map-editor-example-format"},React.createElement("div",null,"36.89618297913001, 27.287810880738398"),React.createElement("div",null,"35.255194302351185, 24.785314037527865"),React.createElement("div",null,"37.987682611306575, 23.721270133629385")),React.createElement("div",null,Joomla.JText._("NR_IMPORT_LOCATIONS_DESC2"))))),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--footer"},v?React.createElement("button",{disabled:!0},Joomla.JText._("NR_ADDING_MARKERS")):React.createElement("button",{onClick:W},Joomla.JText._("NR_IMPORT"))))),document.body),K=(0,x.createPortal)(React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal"},React.createElement("div",{ref:D,className:"tf-map-editor--app--sidebar--markers--edit-modal--inner"},React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--top"},React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--top--title"},Joomla.JText._("NR_EXPORT_MARKERS")),React.createElement(Nt,{width:30,height:30,onClick:U})),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content"},React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content--field"},null!=i&&i.length?React.createElement("div",{className:"tf-map-editor-example-formats"},React.createElement("textarea",{rows:12,value:null==i?void 0:i.map((function(t){return[null==t?void 0:t.latitude,t.longitude].join(",")})).join("\n")}),React.createElement("div",null,Joomla.JText._("NR_EXPORT_MARKERS_DESC"))):React.createElement("div",null,Joomla.JText._("NR_THERE_ARE_NO_LOCATIONS_TO_EXPORT")))))),document.body);return(0,t.useEffect)((function(){function t(t){H.current&&!H.current.contains(t.target)&&I(!1),D.current&&!D.current.contains(t.target)&&A(!1),B.current&&!B.current.contains(t.target)&&N(!1)}return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}}),[H,D,B]),React.createElement(React.Fragment,null,React.createElement("div",{className:"tf-map-editor--app--sidebar--top"},React.createElement("div",{className:"tf-map-editor--app--sidebar--top--title"},Joomla.JText._("NR_MARKERS"),null!==M&&React.createElement("div",{className:"tf-map-editor--app--sidebar--top--title--stats"},M.added,"/",M.total," ",Joomla.JText._("NR_LOCATIONS_IMPORTED"),React.createElement(Nt,{width:16,height:16,onClick:function(){return O(null)}}))),React.createElement("div",{className:"tf-map-editor--app--sidebar--top--icons"},!c&&React.createElement(At,{onClick:u}),c&&React.createElement(jt,null),!c&&f&&React.createElement("div",{className:"tf-map-editor--app--sidebar--top--icons--action",ref:B},React.createElement(Ct,{onClick:function(){r||N((function(t){return!t}))}}),z&&React.createElement("ul",{className:"tf-map-editor--app--sidebar--top--icons--action--list"},d?React.createElement(React.Fragment,null,React.createElement("li",{onClick:function(){I(!0),N(!1)}},Joomla.JText._("NR_IMPORT_MARKERS")),(null==i?void 0:i.length)>0&&React.createElement("li",{onClick:function(){A(!0),N(!1)}},Joomla.JText._("NR_EXPORT_MARKERS"))):React.createElement(React.Fragment,null,React.createElement("li",{className:"is-pro","data-pro-only":Joomla.JText._("NR_IMPORT_MARKERS")},Joomla.JText._("NR_IMPORT_MARKERS"),React.createElement(St,null)),React.createElement("li",{className:"is-pro","data-pro-only":Joomla.JText._("NR_EXPORT_MARKERS")},Joomla.JText._("NR_EXPORT_MARKERS"),React.createElement(St,null))))))),C&&q,k&&K)},Vt=function(){return React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"22",viewBox:"0 -960 960 960",width:"22"},React.createElement("path",{d:"M252.309-619.999H600v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85h-59.999q0-74.922 52.538-127.46Q405.078-879.997 480-879.997t127.461 52.538q52.538 52.538 52.538 127.46v80h47.692q29.923 0 51.115 21.193 21.193 21.192 21.193 51.115v375.382q0 29.923-21.193 51.115-21.192 21.193-51.115 21.193H252.309q-29.923 0-51.115-21.193-21.193-21.192-21.193-51.115v-375.382q0-29.923 21.193-51.115 21.192-21.193 51.115-21.193Zm0 459.999h455.382q5.385 0 8.847-3.462 3.462-3.462 3.462-8.847v-375.382q0-5.385-3.462-8.847-3.462-3.462-8.847-3.462H252.309q-5.385 0-8.847 3.462-3.462 3.462-3.462 8.847v375.382q0 5.385 3.462 8.847 3.462 3.462 8.847 3.462ZM480-290.001q29.154 0 49.576-20.423 20.423-20.422 20.423-49.576t-20.423-49.576Q509.154-429.999 480-429.999t-49.576 20.423Q410.001-389.154 410.001-360t20.423 49.576q20.422 20.423 49.576 20.423ZM240-160v-400 400Z",fill:"currentColor"}))};function qt(t){return qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qt(t)}function Kt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Gt(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,i=new Array(e);nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n0&&React.createElement(Mt,{readonly:w,value:_,markers:u,onDeleteAllSelectedMarkers:function(){confirm(Joomla.JText._("NR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_ALL_SELECTED_MARKERS"))&&(E({type:"DELETE_ALL_SELECTED_MARKERS"}),O(M))},onSelectAll:function(){E({type:"SELECT_ALL_MARKERS",payload:g.map((function(t){return t.id}))})},onUnselectAll:function(){E({type:"UNSELECT_ALL_MARKERS"})},onChange:function(t){v(t)}}),!b&&React.createElement(Tt,{markers:g,onSelectMarker:function(t,e){t.stopPropagation(),E({type:"SELECT_MARKER",payload:e})},onUnselectMarker:function(t,e){t.stopPropagation(),E({type:"UNSELECT_MARKER",payload:e})},onViewMarker:function(t){E({type:"VIEW_MARKER",payload:t})},onEditMarker:function(t,e){t.stopPropagation(),E({type:"EDIT_MARKER",payload:e})},onDeleteMarker:function(t,e){t.stopPropagation(),confirm(Joomla.JText._("NR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_MARKER"))&&E({type:"DELETE_MARKER",payload:e})}}),!b&&!L&&React.createElement("a",{href:"#",className:"tf-map-editor--app--sidebar--pro-cta","data-pro-only":Joomla.JText._("NR_UNLIMITED_MARKERS")},React.createElement(St,null),React.createElement(Vt,null),Joomla.JText._("NR_ADD_MORE_MARKERS_UPGRADE_TO_PRO")),!b&&0!==l&&(null==u?void 0:u.length)>0&&React.createElement("div",{className:"tf-map-editor--app--sidebar--total-used"},(null==u||null===(i=u.filter((function(t){return!(null!=t&&t.isTemporary)})))||void 0===i?void 0:i.length)||0," ",Joomla.Text._("NR_OUT_OF")," ",l," ",Joomla.Text._("NR_MARKERS_ADDED"))),d&&React.createElement(Qt,{onCloseModal:a,onSaveMarker:function(t){""!==(null==t?void 0:t.latitude)||""!==(null==t?void 0:t.longitude)?E({type:"ADD_MARKER",payload:t}):E({type:"CLOSE_MARKER_MODAL"})}}))},ee=function(){var t=pt().readonly,e=ft();return React.createElement(et,{className:"tf-map-editor--app--search",onSelectResult:function(n){var i=n.lat,o=n.lon,r=n.display_name;t||e({type:"ADD_TMP_MARKER",payload:{latitude:i,longitude:o,address:r,description:""}})}})};var ne=["position"];var ie,oe=function(e){function n(n,i){var o=e(n).current,r=o.instance,a=o.context;return(0,t.useImperativeHandle)(i,(function(){return r})),null==n.children?null:t.createElement(p,{value:a},n.children)}return(0,t.forwardRef)(n)}(I(M((function(t,e){var n,i,o=t.position,r=function(t,e){if(null==t)return{};var n,i,o=function(t,e){if(null==t)return{};var n,i,o={},r=Object.keys(t);for(i=0;i=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}(t,ne),a=new m.Marker(o,r);return T(a,(n=e,i={overlayContainer:a},Object.freeze(h(h({},n),i))))}),(function(t,e,n){e.position!==n.position&&t.setLatLng(e.position),null!=e.icon&&e.icon!==n.icon&&t.setIcon(e.icon),null!=e.zIndexOffset&&e.zIndexOffset!==n.zIndexOffset&&t.setZIndexOffset(e.zIndexOffset),null!=e.opacity&&e.opacity!==n.opacity&&t.setOpacity(e.opacity),null!=t.dragging&&e.draggable!==n.draggable&&(!0===e.draggable?t.dragging.enable():t.dragging.disable())})))),re=(ie=function(t,e){return function(n,i){var o=f(),r=t(C(n,o),o);return O(o.map,n.attribution),S(r.current,n.eventHandlers),e(r.current,o,n,i),r}}(M((function(t,e){return T(new m.Popup(t,e.overlayContainer),e)})),(function(e,n,i,o){var r=i.position;(0,t.useEffect)((function(){var t=e.instance;function i(e){e.popup===t&&(t.update(),o(!0))}function a(e){e.popup===t&&o(!1)}return n.map.on({popupopen:i,popupclose:a}),null==n.overlayContainer?(null!=r&&t.setLatLng(r),t.openOn(n.map)):n.overlayContainer.bindPopup(t),function(){var e;n.map.off({popupopen:i,popupclose:a}),null===(e=n.overlayContainer)||void 0===e||e.unbindPopup(),n.map.removeLayer(t)}}),[e,n,o,r])})),function(e){function n(n,i){var o,r,a=(o=(0,t.useState)(!1),r=2,function(t){if(Array.isArray(t))return t}(o)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(o,r)||function(t,e){if(t){if("string"==typeof t)return E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(t,e):void 0}}(o,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=a[0],l=a[1],c=e(n,l).current.instance;(0,t.useImperativeHandle)(i,(function(){return c})),(0,t.useEffect)((function(){s&&c.update()}),[c,s,n.children]);var u=c._contentNode;return u?(0,x.createPortal)(n.children,u):null}return(0,t.forwardRef)(n)}(ie));const ae=function(){return React.createElement("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_211_595",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22"},React.createElement("rect",{width:"22",height:"22",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_211_595)"},React.createElement("path",{d:"M10.0834 11.9167H4.58337V10.0833H10.0834V4.58333H11.9167V10.0833H17.4167V11.9167H11.9167V17.4167H10.0834V11.9167Z",fill:"currentColor"})))};function se(){return se=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),_}},e}function fe(t,e,n,i,o,r,a){try{var s=t[r](a),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(i,o)}function me(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function _e(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),S(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;S(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:A(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),_}},e}function je(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ze(t){for(var e=1;e0){var t=p||!h?{padding:[0,40]}:{paddingTopLeft:[520,80],padding:[0,40]};v.fitBounds(function(t){if(t)return t.map((function(t){return[t.latitude,t.longitude]}))}(i),t)}else{var e=null!=r&&r.lat?8:2;v.setView({lat:r.lat,lng:r.lng},e)}};if(function(e){var n=ut();(0,t.useEffect)((function(){return n.on(e),function(){n.off(e)}}),[n,e])}({popupopen:function(t){return setTimeout((function(){return t.popup.options.autoPan=!1}),100)},popupclose:function(t){return t.popup.options.autoPan=!0},resize:function(t){return _()}}),!c){var v=ut();return null!=r&&r.readonly&&v.contextmenu.disable(),_(),null}};const Be=function(){var t=pt(),e=t.markers,n=t.tmpMarker,i=t.viewMarker,o=t.editingMarker,r=t.options,a=t.preventAutoPan,s=t.addNewMarkerModal,l=t.minimizedSidebar,c=t.showSidebar,u=ft(),h=function(t,e){var n=null;return null!=t&&t.length&&(n=t),e&&(n=null===n?[e]:n.concat(e)),n}(e,n),d=function(){var t,e=(t=Ie().mark((function t(e){var n,i,o;return Ie().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={id:Math.random().toString(36).substring(2,15),address:"...",latitude:e.latlng.lat,longitude:e.latlng.lng,preventAutoPan:!0,viewMarker:!0},u({type:"ADD_MARKER",payload:n}),t.next=4,J(e.latlng.lat,e.latlng.lng);case 4:null!=(i=t.sent)&&i.display_name&&(o=ze(ze({},n),{},{address:i.display_name,preventAutoPan:!0}),u({type:"SAVE_MARKER",payload:{marker:o}}));case 6:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function a(t){Ne(r,i,o,a,s,"next",t)}function s(t){Ne(r,i,o,a,s,"throw",t)}a(void 0)}))});return function(t){return e.apply(this,arguments)}}(),p=function(t){""!==(null==t?void 0:t.latitude)||""!==(null==t?void 0:t.longitude)?u({type:"SAVE_MARKER",payload:{marker:t}}):u({type:"CLOSE_MARKER_MODAL"})},f=function(){u({type:"CLOSE_MARKER_MODAL"})},m=[{text:Joomla.JText._("NR_ADD_MARKER"),callback:d}],_=parseInt(r.maxMarkers);return React.createElement(React.Fragment,null,React.createElement(w,{draggable:!0,zoomControl:!1,style:{height:"100%",width:"100%"},contextmenu:!0,contextmenuItems:m,closePopupOnClick:!1},React.createElement(Ze,{viewMarker:i,showSidebar:c,minimizedSidebar:l,preventAutoPan:o||a,markers:h,options:r}),React.createElement(B,{attribution:'© OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),React.createElement("div",{className:"tf-map-editor-overlay-controls"},null!=r&&r.showSidebar?React.createElement(te,{onSaveMarker:p,onCloseModal:f,maxMarkersAllowed:_,markers:h,addNewMarkerModal:s,showImport:0===r.maxMarkers||r.maxMarkers>1}):React.createElement("div",null,React.createElement("div",{className:"tf-map-editor-empty-space"})),React.createElement(ee,null),React.createElement("div",null,React.createElement("div",{className:"tf-map-editor-empty-space"}))),React.createElement(ge,{maxMarkersAllowed:_,markers:h,viewingMarker:i||n,markerImage:r.markerImage}),React.createElement(D,{position:"bottomright"})),o&&React.createElement(ct,{onCloseModal:f,marker:e.find((function(t){return t.id===o})),onSaveMarker:p}))};function De(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n0?JSON.parse(n.valueElement.value):null,options:n.options,center:[0,0]};1===(null===(s=u.options)||void 0===s?void 0:s.maxMarkers)&&1===(null===(c=u.markers)||void 0===c?void 0:c.length)&&(u.minimizedSidebar=!0);var h,d,p=(h=(0,t.useReducer)(l,u),d=2,function(t){if(Array.isArray(t))return t}(h)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,a,s=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(h,d)||function(t,e){if(t){if("string"==typeof t)return De(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(t,e):void 0}}(h,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=p[0],m=p[1];return(0,t.useEffect)((function(){n.valueElement.value=null!=f&&f.markers?JSON.stringify(f.markers):null}),[f]),e().createElement(ht.Provider,{value:f},e().createElement(dt.Provider,{value:m},e().createElement(Be,null)))}document.addEventListener("DOMContentLoaded",(function(){var t=new IntersectionObserver((function(t,n){t.forEach((function(t){if(t.isIntersecting){var o,r,a=(0,i.s)(t.target.querySelector(".tf-map-editor--app")),s=t.target.dataset.options?JSON.parse(t.target.dataset.options):{},l={lat:s.lat||0,lng:s.long||0,pro:s.pro||!1,maxMarkers:s.maxMarkers||0,markerImage:s.markerImage,showSidebar:null===(o=s.showSidebar)||void 0===o||o,readonly:null!==(r=s.readonly)&&void 0!==r&&r},c=t.target.nextElementSibling.classList.contains("tf-map-editor--value")?t.target.nextElementSibling:t.target.querySelector(".tf-map-editor--value");a.render(e().createElement(He,{valueElement:c,options:l})),n.unobserve(t.target)}}))}),{rootMargin:"0px 0px 0px 0px"});document.querySelectorAll(".tf-map-editor").forEach((function(e){t.observe(e)}))}))})()})();