3 lines
273 KiB
JavaScript
3 lines
273 KiB
JavaScript
/*! 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;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&a[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".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<e;t++)this._items[t].el.style.display="none"},showAllItems:function(){var t,e;for(t=0,e=this._items.length;t<e;t++)this._items[t].el.style.display=""},setDisabled:function(e,n){var i=this._container,o=t.Map.ContextMenu.BASE_CLS+"-item";isNaN(e)||(e=i.children[e]),e&&t.DomUtil.hasClass(e,o)&&(n?(t.DomUtil.addClass(e,o+"-disabled"),this._map.fire("contextmenu.disableitem",{contextmenu:this,el:e})):(t.DomUtil.removeClass(e,o+"-disabled"),this._map.fire("contextmenu.enableitem",{contextmenu:this,el:e})))},isVisible:function(){return this._visible},_createItems:function(){var t,e,n=this._map.options.contextmenuItems;for(t=0,e=n.length;t<e;t++)this._items.push(this._createItem(this._container,n[t]))},_createItem:function(e,n,i){if(n.separator||"-"===n)return this._createSeparator(e,i);var o=t.Map.ContextMenu.BASE_CLS+"-item",r=n.disabled?o+" "+o+"-disabled":o,a=this._insertElementAt("a",r,e,i),s=this._createEventHandler(a,n.callback,n.context,n.hideOnSelect),l=this._getIcon(n),c=this._getIconCls(n),u="";return l?u='<img class="'+t.Map.ContextMenu.BASE_CLS+'-icon" src="'+l+'"/>':c&&(u='<span class="'+t.Map.ContextMenu.BASE_CLS+"-icon "+c+'"></span>'),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;o<r;o++)if((n=this._items[o]).id===e)return i=n.el,(a=n.callback)&&(t.DomEvent.off(i,"mouseover",this._onItemMouseOver,this).off(i,"mouseover",this._onItemMouseOut,this).off(i,"mousedown",t.DomEvent.stopPropagation).off(i,"click",a),t.Browser.touch&&t.DomEvent.off(i,this._touchstart,t.DomEvent.stopPropagation),t.Browser.pointer||t.DomEvent.on(i,"click",this._onItemMouseOut,this)),this._container.removeChild(i),this._items.splice(o,1),n;return null},_createSeparator:function(e,n){var i=this._insertElementAt("div",t.Map.ContextMenu.BASE_CLS+"-separator",e,n);return{id:t.Util.stamp(i),el:i}},_createEventHandler:function(e,n,i,o){var r=this,a=this._map,s=t.Map.ContextMenu.BASE_CLS+"-item-disabled";return o=void 0===o||o,function(l){t.DomUtil.hasClass(e,s)||(o&&r._hide(),n&&n.call(i||a,r._showLocation),r._map.fire("contextmenu.select",{contextmenu:r,el:e}))}},_insertElementAt:function(t,e,n,i){var o,r=document.createElement(t);return r.className=e,void 0!==i&&(o=n.children[i]),o?n.insertBefore(r,o):n.appendChild(r),r},_show:function(t){this._showAtPoint(t.containerPoint,t)},_showAtPoint:function(e,n){if(this._items.length){var i=this._map,o=i.containerPointToLayerPoint(e),r=i.layerPointToLatLng(o),a=t.extend(n||{},{contextmenu:this});this._showLocation={latlng:r,layerPoint:o,containerPoint:e},n&&n.relatedTarget&&(this._showLocation.relatedTarget=n.relatedTarget),this._setPosition(e),this._visible||(this._container.style.display="block",this._visible=!0),this._map.fire("contextmenu.show",a)}},_hide:function(){this._visible&&(this._visible=!1,this._container.style.display="none",this._map.fire("contextmenu.hide",{contextmenu:this}))},_getIcon:function(e){return t.Browser.retina&&e.retinaIcon||e.icon},_getIconCls:function(e){return t.Browser.retina&&e.retinaIconCls||e.iconCls},_setPosition:function(e){var n,i=this._map.getSize(),o=this._container,r=this._getElementSize(o);this._map.options.contextmenuAnchor&&(n=t.point(this._map.options.contextmenuAnchor),e=e.add(n)),o._leaflet_pos=e,e.x+r.x>i.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;n<this.options.contextmenuItems.length;n++)this.options.contextmenuItems[n].index==t&&e.push(n);for(var i=e.pop();void 0!==i;)this.options.contextmenuItems.splice(i,1),i=e.pop()},replaceContextMenuItem:function(t){this.removeContextMenuItemWithIndex(t.index),this.addContextMenuItem(t)},_initContextMenu:function(){this._items=[],this.on("contextmenu",this._showContextMenu,this)},_showContextMenu:function(e){var n,i,o,r,a;if(this._map.contextmenu){for(i=t.extend({relatedTarget:this},e),o=this._map.mouseEventToContainerPoint(e.originalEvent),this.options.contextmenuInheritItems||this._map.contextmenu.hideAllItems(),r=0,a=this.options.contextmenuItems.length;r<a;r++)n=this.options.contextmenuItems[r],this._items.push(this._map.contextmenu.insertItem(n,n.index));this._map.once("contextmenu.hide",this._hideContextMenu,this),this._map.contextmenu.showAt(o,i)}},_hideContextMenu:function(){var t,e;for(t=0,e=this._items.length;t<e;t++)this._map.contextmenu.removeItem(this._items[t]);this._items.length=0,this.options.contextmenuInheritItems||this._map.contextmenu.showAllItems()}};var e,n,i,o=[t.Marker,t.Path],r={contextmenu:!1,contextmenuItems:[],contextmenuInheritItems:!0};for(n=0,i=o.length;n<i;n++)(e=o[n]).prototype.options?e.mergeOptions(r):e.prototype.options=r,e.addInitHook((function(){this.options.contextmenu&&this._initContextMenu()})),e.include(t.Mixin.ContextMenu);return t.Map.ContextMenu})?i.apply(e,o):i)||(t.exports=r)},208:function(t,e){var n,i,o,r;function a(t){return a="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},a(t)}r=function(t){"use strict";function e(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function i(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var o=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++o),t._leaflet_id}function s(t,e,n){var i,o,r,a;return a=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(a,e),i=!0)},r}function l(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function c(){return!1}function u(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return h(t).split(/\s+/)}function p(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?n(t.options):{}),e)t.options[i]=e[i];return t.options}function f(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function _(t,e){return t.replace(m,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var y="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var E=window.requestAnimationFrame||b("RequestAnimationFrame")||x,P=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function T(t,e,n){if(!n||E!==x)return E.call(window,i(t,e));t.call(e)}function M(t){t&&P.call(window,t)}var O={__proto__:null,extend:e,create:n,bind:i,get lastId(){return o},stamp:r,throttle:s,wrapNum:l,falseFn:c,formatNum:u,trim:h,splitWords:d,setOptions:p,getParamString:f,template:_,isArray:v,indexOf:g,emptyImageUrl:y,requestFn:E,cancelFn:P,requestAnimFrame:T,cancelAnimFrame:M};function S(){}S.extend=function(t){var i=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=i.__super__=this.prototype,r=n(o);for(var a in r.constructor=i,i.prototype=r,this)Object.prototype.hasOwnProperty.call(this,a)&&"prototype"!==a&&"__super__"!==a&&(i[a]=this[a]);return t.statics&&e(i,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),e.apply(null,[r].concat(t.includes))),e(r,t),delete r.statics,delete r.includes,r.options&&(r.options=o.options?n(o.options):{},e(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},i},S.include=function(t){var n=this.prototype.options;return e(this.prototype,t),t.options&&(this.prototype.options=n,this.mergeOptions(t.options)),this},S.mergeOptions=function(t){return e(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var k={on:function(t,e,n){if("object"===a(t))for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"===a(t))for(var i in t)this._off(i,t[i],e);else{t=d(t);for(var o=1===arguments.length,r=0,s=t.length;r<s;r++)o?this._off(t[r]):this._off(t[r],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+a(e))},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var s=this._listens(t,e,n);if(!1!==s){var l=i[s];this._firingCount&&(l.fn=c,this._events[t]=i=i.slice()),i.splice(s,1)}}else console.warn("wrong listener type: "+a(e));else{if(this._firingCount)for(o=0,r=i.length;o<r;o++)i[o].fn=c;delete this._events[t]}},fire:function(t,n,i){if(!this.listens(t,i))return this;var o=e({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,s=r.length;a<s;a++){var l=r[a],c=l.fn;l.once&&this.off(t,c,l.ctx),c.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var r=this._events&&this._events[t];if(r&&r.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var a in this._eventParents)if(this._eventParents[a].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,r=i.length;o<r;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"===a(t))for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[r(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[r(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};k.addEventListener=k.on,k.removeEventListener=k.clearAllEventListeners=k.off,k.addOneTimeEventListener=k.once,k.fireEvent=k.fire,k.hasEventListeners=k.listens;var A=S.extend(k);function R(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var C=Math.trunc||function(t){return t>0?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<o;i++)this.extend(n[i])}function z(t,e){return!t||t instanceof j?t:new j(t,e)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function Z(t,e){return t instanceof N?t:new N(t,e)}function B(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function D(t,e,n){return t instanceof B?t:v(t)&&"object"!==a(t[0])?3===t.length?new B(t[0],t[1],t[2]):2===t.length?new B(t[0],t[1]):null:null==t?t:"object"===a(t)&&"lat"in t?new B(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new B(t,e,n)}R.prototype={clone:function(){return new R(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new R(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new R(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=C(this.x),this.y=C(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},j.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof R||"number"==typeof t[0]||"x"in t)e=n=I(t);else if(e=(t=z(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof R?I(t):z(t))instanceof j?(e=t.min,n=t.max):e=n=t,e.x>=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.x<n.x,a=o.y>e.y&&i.y<n.y;return r&&a},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return z(I(e.x-i,e.y-o),I(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=z(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},N.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof B)e=t,n=t;else{if(!(t instanceof N))return t?this.extend(D(t)||Z(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new B(e.lat,e.lng),this._northEast=new B(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new N(new B(e.lat-i,e.lng-o),new B(n.lat+i,n.lng+o))},getCenter:function(){return new B((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new B(this.getNorth(),this.getWest())},getSouthEast:function(){return new B(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof B||"lat"in t?D(t):Z(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof N?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=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.lat<n.lat,a=o.lng>e.lng&&i.lng<n.lng;return r&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},B.prototype={equals:function(t,e){return!!t&&(t=D(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,D(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return Z([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new B(this.lat,this.lng,this.alt)}};var H,F={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new j(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new B(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),a=t.getNorthEast();return new N(new B(r.lat-i,r.lng-o),new B(a.lat-i,a.lng-o))}},U=e({},F,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),a=Math.sin((e.lng-t.lng)*n/2),s=r*r+Math.cos(i)*Math.cos(o)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),W=6378137,J={R:W,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new R(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new B((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(H=W*Math.PI,new j([-H,-H],[H,H]))};function V(t,e,n,i){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function q(t,e,n,i){return new V(t,e,n,i)}V.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new R((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K,G=e({},U,{code:"EPSG:3857",projection:J,transformation:(K=.5/(Math.PI*J.R),q(K,.5,-K,.5))}),Y=e({},G,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Q(t,e){var n,i,o,r,a,s,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(a=t[n]).length;i<r;i++)l+=(i?"L":"M")+(s=a[i]).x+" "+s.y;l+=e?zt.svg?"z":"x":""}return l||"M0 0"}var $,tt=document.documentElement.style,et="ActiveXObject"in window,nt=et&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),ot=jt("webkit"),rt=jt("android"),at=jt("android 2")||jt("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=rt&&jt("Google")&&st<537&&!("AudioNode"in window),ct=!!window.opera,ut=!it&&jt("chrome"),ht=jt("gecko")&&!ot&&!ct&&!et,dt=!ut&&jt("safari"),pt=jt("phantom"),ft="OTransition"in tt,mt=0===navigator.platform.indexOf("Win"),_t=et&&"transition"in tt,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!at,gt="MozPerspective"in tt,yt=!window.L_DISABLE_3D&&(_t||vt||gt)&&!ft&&!pt,bt="undefined"!=typeof orientation||jt("mobile"),wt=bt&&ot,xt=bt&&vt,Et=!window.PointerEvent&&window.MSPointerEvent,Lt=!(!window.PointerEvent&&!Et),Pt="ontouchstart"in window||!!window.TouchEvent,Tt=!window.L_NO_TOUCH&&(Pt||Lt),Mt=bt&&ct,Ot=bt&&ht,St=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,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="<svg/>","http://www.w3.org/2000/svg"===($.firstChild&&$.firstChild.namespaceURI)),It=!Rt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';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;i<o;i++)t.classList.add(n[i]);else if(!he(t,e)){var r=me(t);fe(t,(r?r+" ":"")+e)}}function pe(t,e){void 0!==t.classList?t.classList.remove(e):fe(t,h((" "+me(t)+" ").replace(" "+e+" "," ")))}function fe(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function me(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function _e(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}(t,e)}function ve(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function ge(t,e,n){var i=e||new R(0,0);t.style[ee]=(zt.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function ye(t,e){t._leaflet_pos=e,zt.any3d?ge(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function be(t){return t._leaflet_pos||new R(0,0)}if("onselectstart"in document)Gt=function(){Se(window,"selectstart",Be)},Yt=function(){Ae(window,"selectstart",Be)};else{var we=ve(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Gt=function(){if(we){var t=document.documentElement.style;Xt=t[we],t[we]="none"}},Yt=function(){we&&(document.documentElement.style[we]=Xt,Xt=void 0)}}function xe(){Se(window,"dragstart",Be)}function Ee(){Ae(window,"dragstart",Be)}function Le(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Pe(),Qt=t,$t=t.style.outlineStyle,t.style.outlineStyle="none",Se(window,"keydown",Pe))}function Pe(){Qt&&(Qt.style.outlineStyle=$t,Qt=void 0,$t=void 0,Ae(window,"keydown",Pe))}function Te(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Me(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Oe={__proto__:null,TRANSFORM:ee,TRANSITION:ne,TRANSITION_END:ie,get:oe,getStyle:re,create:ae,remove:se,empty:le,toFront:ce,toBack:ue,hasClass:he,addClass:de,removeClass:pe,setClass:fe,getClass:me,setOpacity:_e,testProp:ve,setTransform:ge,setPosition:ye,getPosition:be,get disableTextSelection(){return Gt},get enableTextSelection(){return Yt},disableImageDrag:xe,enableImageDrag:Ee,preventOutline:Le,restoreOutline:Pe,getSizedParentNode:Te,getScale:Me};function Se(t,e,n,i){if(e&&"object"===a(e))for(var o in e)Ie(t,o,e[o],n);else for(var r=0,s=(e=d(e)).length;r<s;r++)Ie(t,e[r],n,i);return this}var ke="_leaflet_events";function Ae(t,e,n,i){if(1===arguments.length)Re(t),delete t[ke];else if(e&&"object"===a(e))for(var o in e)je(t,o,e[o],n);else if(e=d(e),2===arguments.length)Re(t,(function(t){return-1!==g(e,t)}));else for(var r=0,s=e.length;r<s;r++)je(t,e[r],n,i);return this}function Re(t,e){for(var n in t[ke]){var i=n.split(/\d/)[0];e&&!e(i)||je(t,i,null,null,n)}}var Ce={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ie(t,e,n,i){var o=e+r(n)+(i?"_"+r(i):"");if(t[ke]&&t[ke][o])return this;var a=function(e){return n.call(i||t,e||window.event)},s=a;!zt.touchNative&&zt.pointer&&0===e.indexOf("touch")?a=function(t,e,n){return"touchstart"===e&&(Wt||(document.addEventListener(Nt,Jt,!0),document.addEventListener(Zt,Vt,!0),document.addEventListener(Bt,qt,!0),document.addEventListener(Dt,qt,!0),Wt=!0)),Ft[e]?(n=Ft[e].bind(this,n),t.addEventListener(Ht[e],n,!1),n):(console.warn("wrong event specified:",e),c)}(t,e,a):zt.touch&&"dblclick"===e?a=function(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=He(t);if(!o.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||o.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var r=Date.now();r-i<=te?2==++n&&e(function(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}(t)):n=1,i=r}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}(t,a):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ce[e]||e,a,!!zt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(a=function(e){e=e||window.event,Je(t,e)&&s(e)},t.addEventListener(Ce[e],a,!1)):t.addEventListener(e,s,!1):t.attachEvent("on"+e,a),t[ke]=t[ke]||{},t[ke][o]=a}function je(t,e,n,i,o){o=o||e+r(n)+(i?"_"+r(i):"");var a=t[ke]&&t[ke][o];if(!a)return this;!zt.touchNative&&zt.pointer&&0===e.indexOf("touch")?function(t,e,n){Ht[e]?t.removeEventListener(Ht[e],n,!1):console.warn("wrong event specified:",e)}(t,e,a):zt.touch&&"dblclick"===e?function(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}(t,a):"removeEventListener"in t?t.removeEventListener(Ce[e]||e,a,!1):t.detachEvent("on"+e,a),t[ke][o]=null}function ze(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ne(t){return Ie(t,"wheel",ze),this}function Ze(t){return Se(t,"mousedown touchstart dblclick contextmenu",ze),t._leaflet_disable_click=!0,this}function Be(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function De(t){return Be(t),ze(t),this}function He(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Fe(t,e){if(!e)return new R(t.clientX,t.clientY);var n=Me(e),i=n.boundingClientRect;return new R((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ue=zt.linux&&zt.chrome?window.devicePixelRatio:zt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?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;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),ye(this._el,n),this.fire("step")},_complete:function(){M(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ke=A.extend({options:{crs:G,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(D(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ne&&zt.any3d&&!zt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Se(this._proxy,ie,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,i){return n=void 0===n?this._zoom:this._limitZoom(n),t=this._limitCenter(D(t),n,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=e({animate:i.animate},i.zoom),i.pan=e({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,n,i.pan&&i.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(zt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(zt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof R?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),a=this.containerPointToLatLng(o.add(r));return this.setView(a,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():Z(t);var n=I(e.paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),a=this.project(t.getSouthWest(),o),s=this.project(t.getNorthEast(),o);return{center:this.unproject(a.add(s).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=Z(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=I(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new qe,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){de(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!zt.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),a=this._zoom;t=D(t),e=void 0===e?a:e;var s=Math.max(r.x,r.y),l=s*this.getZoomScale(a,e),c=o.distanceTo(i)||1,u=1.42,h=2.0164;function d(t){var e=(l*l-s*s+(t?-1:1)*h*h*c*c)/(2*(t?l:s)*h*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}var m=d(0);var _=Date.now(),v=(d(1)-m)/u,g=n.duration?1e3*n.duration:1e3*v*.8;return this._moveStart(!0,n.noMoveStart),function n(){var r=(Date.now()-_)/g,l=function(t){return 1-Math.pow(1-t,1.5)}(r)*v;r<=1?(this._flyToFrame=T(n,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(function(t){return s*(f(m)*(p(e=m+u*t)/f(e))-p(m))/h;var e}(l)/c)),a),this.getScaleZoom(s/function(t){return s*(f(m)/f(m+u*t))}(l),a),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=Z(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds: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;s<i.length;s++)i[s].listens(n,!0)&&a.push(i[s]);r=a.concat(r)}if(r.length){"contextmenu"===n&&Be(t);var l=r[0],c={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);c.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=u?l.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(s=0;s<r.length;s++)if(r[s].fire(n,c,!0),c.originalEvent._stopped||!1===r[s].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,n))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return be(this._mapPane)||new R(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return z([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new j(i.subtract(o),i.add(o)),a=this._getBoundsOffset(r,n,e);return Math.abs(a.x)<=1&&Math.abs(a.y)<=1?t:this.unproject(i.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new j(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=z(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new R(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?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 n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Ge.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(r(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){de(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(de(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):pe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return pe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ae("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ze(e),Ne(e);var i=this._section=ae("section",t+"-list");n&&(this._map.on("click",this.collapse,this),Se(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=ae("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),Se(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Be(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=ae("div",t+"-base",i),this._separator=ae("div",t+"-separator",i),this._overlaysList=ae("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&r(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(i((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;le(this._baseLayersList),le(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,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='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",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<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.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:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',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._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._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:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(zt.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},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(' <span aria-hidden="true">|</span> ')}}});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)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,Be(t),this._moved||(this.fire("dragstart"),this._moved=!0,de(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),de(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),ye(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){pe(document.body,"leaflet-dragging"),this._lastTarget&&(pe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ae(document,"mousemove touchmove",this._onMove,this),Ae(document,"mouseup touchend touchcancel",this._onUp,this),Ee(),Yt();var e=this._moved&&this._moving;this._moving=!1,rn._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function an(t,e,n){var i,o,r,a,s,l,c,u,h,d=[1,4,2,8];for(o=0,c=t.length;o<c;o++)t[o]._code=_n(t[o],e);for(a=0;a<4;a++){for(u=d[a],i=[],o=0,r=(c=t.length)-1;o<c;r=o++)s=t[o],l=t[r],s._code&u?l._code&u||((h=mn(l,s,u,e,n))._code=_n(h,e),i.push(h)):(l._code&u&&((h=mn(l,s,u,e,n))._code=_n(h,e),i.push(h)),i.push(s));t=i}return t}function sn(t,e){var n,i,o,r,a,s,l,c,u;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 h=D([0,0]),d=Z(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=ln(t));var p=t.length,f=[];for(n=0;n<p;n++){var m=D(t[n]);f.push(e.project(D([m.lat-h.lat,m.lng-h.lng])))}for(s=l=c=0,n=0,i=p-1;n<p;i=n++)o=f[n],r=f[i],a=o.y*r.x-r.y*o.x,l+=(o.x+r.x)*a,c+=(o.y+r.y)*a,s+=3*a;u=0===s?f[0]:[l/s,c/s];var _=e.unproject(I(u));return D([_.lat+h.lat,_.lng+h.lng])}function ln(t){for(var e=0,n=0,i=0,o=0;o<t.length;o++){var r=D(t[o]);e+=r.lat,n+=r.lng,i++}return D([e/i,n/i])}var cn,un={__proto__:null,clipPolygon:an,polygonCenter:sn,centroid:ln};function hn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=function(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)a=t[i],s=t[o],l=void 0,c=void 0,l=s.x-a.x,c=s.y-a.y,l*l+c*c>e&&(n.push(t[i]),o=i);var a,s,l,c;return o<r-1&&n.push(t[r-1]),n}(t,n),t=function(t,e){var n=t.length,i=new(("undefined"==typeof Uint8Array?"undefined":a(Uint8Array))!==void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,pn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}(t,n),t}function dn(t,e,n){return Math.sqrt(vn(t,e,n,!0))}function pn(t,e,n,i,o){var r,a,s,l=0;for(a=i+1;a<=o-1;a++)(s=vn(t[a],t[i],t[o],!0))>l&&(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.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.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;n<d;n++){var f=D(t[n]);p.push(e.project(D([f.lat-u.lat,f.lng-u.lng])))}for(n=0,i=0;n<d-1;n++)i+=p[n].distanceTo(p[n+1])/2;if(0===i)c=p[0];else for(n=0,r=0;n<d-1;n++)if(a=p[n],s=p[n+1],(r+=o=a.distanceTo(s))>i){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;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[r(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=r(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Sn=On.extend({initialize:function(t,e){var n,i;if(p(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return r(t)}}),kn=Sn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Sn.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Sn.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new N;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),An=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=I(i),r=I("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return zt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Rn=An.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof Rn.imagePath&&(Rn.imagePath=this._detectIconPath()),(this.options.imagePath||Rn.imagePath)+An.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ae("div","leaflet-default-icon-path",document.body),e=re(t,"background-image")||re(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),Cn=en.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new rn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),de(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&pe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=be(e._icon),a=n.getPixelBounds(),s=n.getPixelOrigin(),l=z(a.min._subtract(s).add(o),a.max._subtract(s).subtract(o));if(!l.contains(r)){var c=I((Math.max(l.max.x,r.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(i);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),ye(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=T(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(M(this._panRequest),this._panRequest=T(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=be(e._icon),o=e._map.layerPointToLatLng(i);n&&ye(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){M(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),In=On.extend({options:{icon:new Rn,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=D(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=D(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),de(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Se(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(de(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ae(this._icon,"focus",this._panOnFocus,this),se(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&se(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&ye(this._icon,t),this._shadow&&ye(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(de(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Cn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Cn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&_e(this._icon,t),this._shadow&&_e(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?I(e.iconSize):I(0,0),i=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),jn=On.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),zn=jn.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=D(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=D(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return jn.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new j(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),Nn=zn.extend({initialize:function(t,n,i){if("number"==typeof n&&(n=e({},i,{radius:n})),p(this,n),this._latlng=D(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:jn.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===U.distance){var o=Math.PI/180,r=this._mRadius/U.R/o,a=n.project([e+r,t]),s=n.project([e-r,t]),l=a.add(s).divideBy(2),c=n.unproject(l).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(c*o))/(Math.cos(e*o)*Math.cos(c*o)))/o;(isNaN(u)||0===u)&&(u=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([c,t-u]).x,this._radiusY=l.y-a.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}}),Zn=jn.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=vn,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],c=1,u=l.length;c<u;c++){var h=r(t,e=l[c-1],n=l[c],!0);h<i&&(i=h,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return bn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=D(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return gn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=gn(t),i=0,o=t.length;i<o;i++)n?(e[i]=D(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new j;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new R(t,t);this._rawPxBounds&&(this._pxBounds=new j([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof B,a=t.length;if(r){for(o=[],i=0;i<a;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<a;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,a,s,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(s=this._rings[e]).length;n<r-1;n++)(a=fn(s[n],s[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(a[0]),a[1]===s[n+1]&&n!==r-2||(l[i].push(a[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=hn(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(a=(s=this._parts[n]).length)-1;i<a;o=i++)if((e||0!==i)&&dn(t,s[o],s[i])<=l)return!0;return!1}});Zn._flat=yn;var Bn=Zn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return sn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Zn.prototype._convertLatLngs.call(this,t),n=e.length;return n>=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;o<r;o++)(i=an(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,a,s,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,s=this._parts.length;o<s;o++)for(r=0,a=(l=(e=this._parts[o]).length)-1;r<l;a=r++)n=e[r],i=e[a],n.y>t.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;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var a=Hn(t,r);return a?(a.feature=Kn(t),a.defaultOptions=a.options,this.resetStyle(a),r.onEachFeature&&r.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Hn(t,e){var n,i,o,r,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],c=e&&e.pointToLayer,u=e&&e.coordsToLatLng||Un;if(!s&&!a)return null;switch(a.type){case"Point":return Fn(c,t,n=u(s),e);case"MultiPoint":for(o=0,r=s.length;o<r;o++)n=u(s[o]),l.push(Fn(c,t,n,e));return new kn(l);case"LineString":case"MultiLineString":return i=Wn(s,"LineString"===a.type?0:1,u),new Zn(i,e);case"Polygon":case"MultiPolygon":return i=Wn(s,"Polygon"===a.type?1:2,u),new Bn(i,e);case"GeometryCollection":for(o=0,r=a.geometries.length;o<r;o++){var h=Hn({geometry:a.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new kn(l);case"FeatureCollection":for(o=0,r=a.features.length;o<r;o++){var d=Hn(a.features[o],e);d&&l.push(d)}return new kn(l);default:throw new Error("Invalid GeoJSON object.")}}function Fn(t,e,n,i){return t?t(e,n):new In(n,i&&i.markersInheritOptions&&i)}function Un(t){return new B(t[1],t[0],t[2])}function Wn(t,e,n){for(var i,o=[],r=0,a=t.length;r<a;r++)i=e?Wn(t[r],e-1,n):(n||Un)(t[r]),o.push(i);return o}function Jn(t,e){return void 0!==(t=D(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function Vn(t,e,n,i){for(var o=[],r=0,a=t.length;r<a;r++)o.push(e?Vn(t[r],gn(t[r])?0:e-1,n,i):Jn(t[r],i));return!e&&n&&o.length>0&&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;r<n.length;r++)o.push(n[r].src);this._url=n.length>0?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;a<this._url.length;a++){var s=ae("source");s.src=this._url[a],e.appendChild(s)}}}}),ti=Qn.extend({_initImage:function(){var t=this._image=this._url;de(t,"leaflet-image-layer"),this._zoomAnimated&&de(t,"leaflet-zoom-animated"),this.options.className&&de(t,this.options.className),t.onselectstart=c,t.onmousemove=c}}),ei=On.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof B||v(t))?(this._latlng=D(t),p(this,e)):(p(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&_e(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&_e(this._container,1),this.bringToFront(),this.options.interactive&&(de(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(_e(this._container,0),this._removeTimeout=setTimeout(i(se,void 0,this._container),200)):se(this._container),this.options.interactive&&(pe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=D(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ce(this._container),this},bringToBack:function(){return this._map&&ue(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof kn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),n=this._getAnchor();this._zoomAnimated?ye(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});Ke.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),On.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(p(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var ni=ei.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,ei.prototype.openOn.call(this,t)},onAdd:function(t){ei.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof jn||this._source.on("preclick",ze))},onRemove:function(t){ei.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof jn||this._source.off("preclick",ze))},getEvents:function(){var t=ei.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=ae("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ae("div",t+"-content-wrapper",e);if(this._contentNode=ae("div",t+"-content",n),Ze(e),Ne(this._contentNode),Se(e,"contextmenu",ze),this._tipContainer=ae("div",t+"-tip-container",e),this._tip=ae("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ae("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">×</span>',Se(i,"click",(function(t){Be(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,r="leaflet-popup-scrolled";o&&i>o?(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.x<r.x?(s="right",e=0,n=c/2):(s="left",e=l+2*(u.x+h.x),n=c/2),t=t.subtract(I(e,n,!0)).add(u).add(h),pe(o,"leaflet-tooltip-right"),pe(o,"leaflet-tooltip-left"),pe(o,"leaflet-tooltip-top"),pe(o,"leaflet-tooltip-bottom"),de(o,"leaflet-tooltip-"+s),ye(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&_e(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ke.include({openTooltip:function(t,e,n){return this._initOverlay(ii,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),On.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(ii,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof kn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(Se(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Se(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",(function(){e._openOnceFlag=!1,e._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var oi=An.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(le(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=I(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});An.Default=Rn;var ri=On.extend({options:{tileSize:256,opacity:1,updateWhenIdle:zt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),se(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ce(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ue(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=s(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof R?t:new R(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!zt.ielt9){_e(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);_e(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(M(this._fadeFrame),this._fadeFrame=T(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=ae("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(se(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=ae("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),i.el.offsetWidth,this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)se(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),a=n-1,s=new R(+o,+r);s.z=+a;var l=this._tileCoordsToKey(s),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),a>i&&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+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();zt.any3d?ge(t.el,o,i):ye(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new j(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),a=[],s=this.options.keepBuffer,l=new j(o.getBottomLeft().subtract([s,-s]),o.getTopRight().add([s,-s]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var u=this._tiles[c].coords;u.z===this._tileZoom&&l.contains(new R(u.x,u.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)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;d<a.length;d++)this._addTile(a[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.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<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||T(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new j,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,a=t._parts,s=a.length,l=this._ctx;if(s){for(l.beginPath(),n=0;n<s;n++){for(i=0,o=a[n].length;i<o;i++)r=a[n][i],l[i?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(pe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,o,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(o=n);o!==this._hoveredLayer&&(this._handleMouseOut(t),o&&(de(this._container,"leaflet-interactive"),this._fireEvent([o],t,"mouseover"),this._hoveredLayer=o)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(i((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function hi(t){return zt.canvas?new ui(t):null}var di=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}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.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap: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)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,s=o.multiplyBy(a/r),l=s.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),u=s.multiplyBy(c/l),h=c/(n.inertiaDeceleration*a),d=u.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),T((function(){e.panBy(d,{duration:h,easeLinearity:a,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});Ke.addInitHook("addHandler","dragging",bi),Ke.mergeOptions({keyboard:!0,keyboardPanDelta:80});var wi=en.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),Se(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),Ae(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){Se(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ae(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(I(e),i.options.maxBounds)),i.options.worldCopyJump){var o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(o)}else i.panBy(e)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}De(t)}}});Ke.addInitHook("addHandler","keyboard",wi),Ke.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var xi=en.extend({addHooks:function(){Se(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ae(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=We(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var o=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),o),De(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,a=t._limitZoom(e+(this._delta>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._zoom<e.getMinZoom()&&r<1||this._zoom>e.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<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var r={},a=[],s=0;s<t.length;s++){var l=t[s],c=i.base?l[0]+i.base:l[0],u=r[c]||0,h="".concat(c," ").concat(u);r[c]=u+1;var d=n(h),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var f=o(p,i);i.byIndex=s,e.splice(s,0,{identifier:h,updater:f,references:1})}a.push(h)}return a}function o(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var r=i(t=t||[],o=o||{});return function(t){t=t||[];for(var a=0;a<r.length;a++){var s=n(r[a]);e[s].references--}for(var l=i(t,o),c=0;c<r.length;c++){var u=n(r[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}r=l}}},569:t=>{"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<e;n++)i[n]=t[n];return i}function a(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 s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){var i,r,a;i=t,r=e,a=n[e],(r=function(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===o(e)?e:String(e)}(r))in i?Object.defineProperty(i,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[r]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const l=function(t,e){switch(e.type){case"ADD_MARKER":var n,i,o,a=s({},e.payload);return null!=a&&a.id||(a.id=Math.random().toString(36).substring(2,15)),delete a.preventAutoPan,delete a.isTemporary,s(s({},t),{},{markers:null!==(n=t.markers)&&void 0!==n&&n.length?[].concat((P=t.markers,function(t){if(Array.isArray(t))return r(t)}(P)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(P)||function(t,e){if(t){if("string"==typeof t)return r(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)?r(t,e):void 0}}(P)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[a]):[a],viewMarker:!0===(null===(i=e.payload)||void 0===i?void 0:i.viewMarker)?a:null,tmpMarker:null,preventAutoPan:(null===(o=e.payload)||void 0===o?void 0:o.preventAutoPan)||!1,addNewMarkerModal:!1});case"EDIT_MARKER":return s(s({},t),{},{editingMarker:e.payload,preventAutoPan:!0});case"FIT_BOUNDS":return s(s({},t),{},{viewMarker:null,tmpMarker:null,preventAutoPan:!1});case"CLOSE_MARKER_MODAL":return s(s({},t),{},{editingMarker:null,addNewMarkerModal:!1});case"SELECT_MARKER":var l=t.markers.map((function(t){return t.id===e.payload?s(s({},t),{},{isSelected:!0}):t}));return s(s({},t),{},{preventAutoPan:!0,markers:l});case"UNSELECT_MARKER":var c=t.markers.map((function(t){return t.id===e.payload?s(s({},t),{},{isSelected:!1}):t}));return s(s({},t),{},{markers:c});case"SELECT_ALL_MARKERS":var u=t.markers.map((function(t){return e.payload.includes(t.id)?s(s({},t),{},{isSelected:!0}):t}));return s(s({},t),{},{markers:u,preventAutoPan:!0});case"UNSELECT_ALL_MARKERS":var h=t.markers.map((function(t){return s(s({},t),{},{isSelected:!1})}));return s(s({},t),{},{markers:h});case"SAVE_MARKER":var d=t.markers.map((function(t){return t.id===e.payload.marker.id?e.payload.marker:t})),p=s(s({},t),{},{markers:d,editingMarker:null,viewMarker:null,preventAutoPan:!0});return e.payload.marker.isTemporary&&(p=s(s({},p),{},{tmpMarker:e.payload.marker})),p;case"ADD_TMP_MARKER":var f,m=s(s({},e.payload),{},{id:Math.random().toString(36).substring(2,15),isTemporary:!0});return s(s({},t),{},{tmpMarker:m,preventAutoPan:(null===(f=e.payload)||void 0===f?void 0:f.preventAutoPan)||!1,addNewMarkerModal:!1,viewMarker:m});case"UPDATE_TMP_MARKER":var _,v;if(!t.tmpMarker)return t;var g=s(s({},t.tmpMarker),{},{address:(null===(_=e.payload)||void 0===_?void 0:_.address)||"..."});return s(s({},t),{},{tmpMarker:g,preventAutoPan:(null===(v=e.payload)||void 0===v?void 0:v.preventAutoPan)||!1,editingMarker:null,viewMarker:null});case"DELETE_MARKER":var y,b,w=(null===(y=t.markers)||void 0===y?void 0:y.filter((function(t){return t.id!==e.payload})))||[],x=(null===(b=t.tmpMarker)||void 0===b?void 0:b.id)===e.payload;return s(s({},t),{},{viewMarker:null,markers:null!=w&&w.length?w:null,tmpMarker:x?null:t.tmpMarker,preventAutoPan:!0});case"DELETE_ALL_SELECTED_MARKERS":var E=t.markers.filter((function(t){return!t.isSelected}));return s(s({},t),{},{markers:null!=E&&E.length?E:null,preventAutoPan:!0});case"VIEW_MARKER":var L=t.markers.filter((function(t){return t.id===e.payload}));return s(s({},t),{},{viewMarker:(null==L?void 0:L[0])||null,preventAutoPan:!1});case"SET_NEW_MARKER_MODAL":return s(s({},t),{},{addNewMarkerModal:e.payload,preventAutoPan:!0});case"TOGGLE_MINIMIZED":return s(s({},t),{},{minimizedSidebar:e.payload});default:throw Error("Unknown action: "+e.type)}var P};function c(t){return c="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},c(t)}function u(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 h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach((function(e){var i,o,r;i=t,o=e,r=n[e],(o=function(t){var e=function(t,e){if("object"!==c(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==c(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===c(e)?e:String(e)}(o))in i?Object.defineProperty(i,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[o]=r})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var d=(0,t.createContext)(null),p=d.Provider;function f(){var e=(0,t.useContext)(d);if(null==e)throw new Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");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<e;n++)i[n]=t[n];return i}function y(){return y=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},y.apply(this,arguments)}function b(e,n){var i=e.bounds,o=e.boundsOptions,r=e.center,a=e.children,s=e.className,l=e.id,c=e.placeholder,u=e.style,h=e.whenReady,d=e.zoom,f=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<r.length;i++)n=r[i],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=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<e;n++)i[n]=t[n];return i}function P(e){function n(n,i){var o=e(n).current.instance;return(0,t.useImperativeHandle)(i,(function(){return o})),null}return(0,t.forwardRef)(n)}function T(t,e,n){return Object.freeze({instance:t,context:e,container:n})}function M(e,n){return null==n?function(n,i){var o=(0,t.useRef)();return o.current||(o.current=e(n,i)),o}:function(i,o){var r=(0,t.useRef)();r.current||(r.current=e(i,o));var a=(0,t.useRef)(i),s=r.current.instance;return(0,t.useEffect)((function(){a.current!==i&&(n(s,i,a.current),a.current=i)}),[s,i,o]),r}}function O(e,n){var i=(0,t.useRef)(n);(0,t.useEffect)((function(){n!==i.current&&null!=e.attributionControl&&(null!=i.current&&e.attributionControl.removeAttribution(i.current),null!=n&&e.attributionControl.addAttribution(n)),i.current=n}),[e,n])}function S(e,n){var i=(0,t.useRef)();(0,t.useEffect)((function(){return null!=n&&e.instance.on(n),i.current=n,function(){null!=i.current&&e.instance.off(i.current),i.current=null}}),[e,n])}function k(t){return k="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},k(t)}function A(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 R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?A(Object(n),!0).forEach((function(e){var i,o,r;i=t,o=e,r=n[e],(o=function(t){var e=function(t,e){if("object"!==k(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==k(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===k(e)?e:String(e)}(o))in i?Object.defineProperty(i,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[o]=r})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function C(t,e){var n,i=null!==(n=t.pane)&&void 0!==n?n:e.pane;return i?R(R({},t),{},{pane:i}):t}function I(e){return function(n){var i=f(),o=e(C(n,i),i);return O(i.map,n.attribution),S(o.current,n.eventHandlers),function(e,n){(0,t.useEffect)((function(){var t;return(null!==(t=n.layerContainer)&&void 0!==t?t:n.map).addLayer(e.instance),function(){var t;null===(t=n.layerContainer)||void 0===t||t.removeLayer(e.instance),n.map.removeLayer(e.instance)}}),[n,e])}(o.current,i),o}}var j=["url"];var z,N,Z,B=(z=function(t,e){var n=t.url,i=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<r.length;i++)n=r[i],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=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<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(H(e)+" is not iterable")}return g.prototype=y,o(E,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:g,configurable:!0}),g.displayName=c(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},L(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var a=new P(u(t,n,i,o),r);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=A,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return s.type="throw",s.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=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<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},q.apply(this,arguments)}const K=function(t){return React.createElement("svg",q({width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("mask",{id:"mask0_208_292",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},React.createElement("rect",{width:"24",height:"24",rx:"3",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_208_292)"},React.createElement("path",{d:"M20.3 20.3C19.9134 20.6866 19.2866 20.6866 18.9 20.3L14.6989 16.0989C13.9025 15.3025 12.635 15.2695 11.575 15.65C10.925 15.8833 10.2333 16 9.5 16C7.68333 16 6.14583 15.3708 4.8875 14.1125C3.62917 12.8542 3 11.3167 3 9.5C3 7.68333 3.62917 6.14583 4.8875 4.8875C6.14583 3.62917 7.68333 3 9.5 3C11.3167 3 12.8542 3.62917 14.1125 4.8875C15.3708 6.14583 16 7.68333 16 9.5C16 10.2333 15.8833 10.925 15.65 11.575C15.2695 12.635 15.3025 13.9025 16.0989 14.6989L20.3 18.9C20.6866 19.2866 20.6866 19.9134 20.3 20.3ZM9.5 14C10.75 14 11.8125 13.5625 12.6875 12.6875C13.5625 11.8125 14 10.75 14 9.5C14 8.25 13.5625 7.1875 12.6875 6.3125C11.8125 5.4375 10.75 5 9.5 5C8.25 5 7.1875 5.4375 6.3125 6.3125C5.4375 7.1875 5 8.25 5 9.5C5 10.75 5.4375 11.8125 6.3125 12.6875C7.1875 13.5625 8.25 14 9.5 14Z",fill:"currentColor"})))};function G(t){return G="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},G(t)}function Y(){return Y=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Y.apply(this,arguments)}function X(){X=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"==G(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<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(G(e)+" is not iterable")}return g.prototype=y,o(E,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:g,configurable:!0}),g.displayName=c(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},L(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var a=new P(u(t,n,i,o),r);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=A,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return s.type="throw",s.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=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);n<e;n++)i[n]=t[n];return i}const et=function(e){var n=e.initialValue,i=void 0===n?"":n,o=e.className,r=void 0===o?"":o,a=e.id,s=void 0===a?"":a,l=e.autoFocus,c=void 0!==l&&l,u=e.showSelectedResultInInput,h=void 0!==u&&u,d=e.placeholder,p=void 0===d?Joomla.JText._("NR_ENTER_AN_ADDRESS_OR_COORDINATES"):d,f=e.onSelectResult,m=$((0,t.useState)(!1),2),_=m[0],v=m[1],g=$((0,t.useState)(!1),2),y=g[0],b=g[1],w=$((0,t.useState)(i),2),x=w[0],E=w[1],P=$((0,t.useState)([]),2),T=P[0],M=P[1],O=$((0,t.useState)(!1),2),S=O[0],k=O[1],A=(0,t.createRef)(),R=function(){var t,e=(t=X().mark((function t(){var e;return X().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(x.length>0)){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);n<e;n++)i[n]=t[n];return i}const it=function(e){var n,i,o=e.marker,r=e.onSelectResult,a=e.onUpdateMarkerItem,s=e.onSaveMarker,l=e.onCloseModal,c=e.modalLabel,u=void 0===c?Joomla.JText._("NR_EDIT_MARKER"):c,h=e.buttonLabel,d=void 0===h?Joomla.JText._("NR_SAVE"):h,p=(n=(0,t.useState)(""),i=2,function(t){if(Array.isArray(t))return t}(n)||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}}(n,i)||function(t,e){if(t){if("string"==typeof t)return nt(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)?nt(t,e):void 0}}(n,i)||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],_=(0,t.useRef)(),v=(0,t.useRef)();return(0,t.useEffect)((function(){var t=function(t){var e;t.stopPropagation(),_.current&&(null===(e=L)||void 0===e||null===(e=e.DomEvent)||void 0===e?void 0:e.disableClickPropagation)(_.current)},e=function(t){v.current&&!v.current.contains(t.target)&&l()};return _.current&&(_.current.addEventListener("mousewheel",t),_.current.addEventListener("mouseover",t),_.current.addEventListener("mouseout",t),_.current.addEventListener("click",e)),function(){_.current&&(_.current.removeEventListener("mousewheel",t),_.current.removeEventListener("mouseover",t),_.current.removeEventListener("mouseout",t),_.current.removeEventListener("click",e))}}),[_]),(0,t.useEffect)((function(){function t(t){v.current&&!v.current.contains(t.target)&&l()}return document.addEventListener("mousedown",t),function(){document.removeEventListener("mousedown",t)}}),[v]),React.createElement("div",{ref:_,className:"tf-map-editor--app--sidebar--markers--edit-modal"},React.createElement("div",{ref:v,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"},u),React.createElement("svg",{onClick:l,xmlns:"http://www.w3.org/2000/svg",height:"30",viewBox:"0 -960 960 960",width:"30"},React.createElement("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z",fill:"currentColor"}))),f&&React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--error"},f),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("label",{htmlFor:"tf_map_editor_location_address"},Joomla.JText._("NR_LOCATION_ADDRESS")),React.createElement(et,{showSelectedResultInInput:!0,autoFocus:!0,initialValue:(null==o?void 0:o.address)||"",id:"tf_map_editor_location_address",onSelectResult:r,placeholder:Joomla.JText._("NR_ADDRESS_ADDRESS_HINT")})),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content--field"},React.createElement("label",{htmlFor:"tf_map_editor_location_lat"},Joomla.JText._("NR_COORDINATES")),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content--field--columns"},React.createElement("input",{type:"text",id:"tf_map_editor_location_lat",value:(null==o?void 0:o.latitude)||"",onChange:function(t){return a("latitude",t.target.value)},placeholder:Joomla.JText._("NR_LATITUDE")}),React.createElement("input",{type:"text",value:(null==o?void 0:o.longitude)||"",onChange:function(t){return a("longitude",t.target.value)},placeholder:Joomla.JText._("NR_LONGITUDE")}))),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content--separator-label"},Joomla.JText._("NR_MARKER_INFO")),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content--field"},React.createElement("label",{htmlFor:"tf_map_editor_location_label"},Joomla.JText._("NR_LABEL")),React.createElement("input",{type:"text",id:"tf_map_editor_location_label",value:(null==o?void 0:o.label)||"",onChange:function(t){return a("label",t.target.value)},placeholder:Joomla.JText._("NR_MARKER_LABEL")})),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--content--field"},React.createElement("label",{htmlFor:"tf_map_editor_location_desc"},Joomla.JText._("NR_DESCRIPTION")),React.createElement("textarea",{rows:"5",id:"tf_map_editor_location_desc",onChange:function(t){return a("description",t.target.value)},placeholder:Joomla.JText._("NR_MARKER_DESCRIPTION"),value:(null==o?void 0:o.description)||""}))),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--edit-modal--inner--footer"},React.createElement("button",{onClick:function(t){return function(t,e){t.preventDefault(),null!=e&&e.latitude&&""!==(null==e?void 0:e.latitude)&&null!=e&&e.longitude&&""!==(null==e?void 0:e.longitude)?(m(""),s(e)):m(Joomla.JText._("NR_PLEASE_SELECT_A_LOCATION"))}(t,o)}},d))))};function ot(t){return ot="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},ot(t)}function rt(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 at(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rt(Object(n),!0).forEach((function(e){st(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function st(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==ot(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==ot(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ot(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function lt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const ct=function(e){var n,i,o=e.marker,r=void 0===o?null:o,a=e.onCloseModal,s=e.onSaveMarker,l=(n=(0,t.useState)(r),i=2,function(t){if(Array.isArray(t))return t}(n)||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}}(n,i)||function(t,e){if(t){if("string"==typeof t)return lt(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)?lt(t,e):void 0}}(n,i)||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.")}()),c=l[0],u=l[1];return(0,x.createPortal)(React.createElement(it,{marker:c,onSelectResult:function(t){var e=t.lat,n=t.lon,i=t.display_name;u(at(at({},c),{},{latitude:e,longitude:n,address:i}))},onUpdateMarkerItem:function(t,e){u(at(at({},c),{},st({},t,e)))},onSaveMarker:s,onCloseModal:a}),document.body)};function ut(){return f().map}var ht=e().createContext(),dt=e().createContext(),pt=function(){return(0,t.useContext)(ht)},ft=function(){return(0,t.useContext)(dt)};function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},mt.apply(this,arguments)}const _t=function(t){return React.createElement("svg",mt({width:"22",height:"22",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 -960 960 960"},t),React.createElement("path",{d:"m424-312 282-282-56-56-226 226-114-114-56 56 170 170ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm0-560v560-560Z",fill:"currentColor"}))};function vt(){return vt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},vt.apply(this,arguments)}const gt=function(t){return React.createElement("svg",vt({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("path",{d:"M17.4167 4.58333V17.4167H4.58333V4.58333H17.4167ZM17.4167 2.75H4.58333C3.575 2.75 2.75 3.575 2.75 4.58333V17.4167C2.75 18.425 3.575 19.25 4.58333 19.25H17.4167C18.425 19.25 19.25 18.425 19.25 17.4167V4.58333C19.25 3.575 18.425 2.75 17.4167 2.75Z",fill:"currentColor"}))};function yt(){return yt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},yt.apply(this,arguments)}const bt=function(t){return React.createElement("svg",yt({xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 -960 960 960"},t),React.createElement("path",{d:"M200-200h50.461l409.463-409.463-50.461-50.461L200-250.461V-200Zm-59.999 59.999v-135.383l527.616-527.384q9.073-8.241 20.036-12.736 10.963-4.495 22.993-4.495 12.029 0 23.307 4.27 11.277 4.269 19.969 13.576l48.846 49.461q9.308 8.692 13.269 20.004 3.962 11.311 3.962 22.622 0 12.065-4.121 23.028-4.12 10.964-13.11 20.037l-527.384 527H140.001Zm620.384-570.153-50.231-50.231 50.231 50.231Zm-126.134 75.903-24.788-25.673 50.461 50.461-25.673-24.788Z",fill:"currentColor"}))};function wt(){return wt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},wt.apply(this,arguments)}const xt=function(t){return React.createElement("svg",wt({width:"22",height:"22",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("mask",{style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},React.createElement("rect",{width:"20",height:"20",fill:"currentColor"})),React.createElement("g",{mask:"url(#mask0_236_187)"},React.createElement("path",{d:"M5.83331 17.5C5.37498 17.5 4.98262 17.3368 4.65623 17.0104C4.32984 16.684 4.16665 16.2917 4.16665 15.8333V5H3.33331V3.33333H7.49998V2.5H12.5V3.33333H16.6666V5H15.8333V15.8333C15.8333 16.2917 15.6701 16.684 15.3437 17.0104C15.0173 17.3368 14.625 17.5 14.1666 17.5H5.83331ZM14.1666 5H5.83331V15.8333H14.1666V5ZM7.49998 14.1667H9.16665V6.66667H7.49998V14.1667ZM10.8333 14.1667H12.5V6.66667H10.8333V14.1667Z",fill:"currentColor"})))},Et=function(t){var e=t.readonly,n=void 0!==e&&e,i=t.className,o=void 0===i?"":i,r=t.marker,a=t.onViewMarker,s=t.onSelectMarker,l=t.onUnselectMarker,c=t.onEditMarker,u=t.onDeleteMarker;return React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--item".concat(o?" "+o:""),onClick:function(){return a(r.id)}},React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--item--icons"},null!=r&&r.isSelected?React.createElement(_t,{onClick:function(t){return l(t,r.id)}}):React.createElement(React.Fragment,null,React.createElement(gt,{onClick:function(t){return s(t,r.id)},className:"tf-map-editor--app--sidebar--markers--item--icons--select"}),React.createElement("svg",{className:"tf-map-editor--app--sidebar--markers--item--icons--marker-icon".concat(null!=r&&r.isSelected?" is-hidden":""),width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_236_173",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"22",height:"22"},React.createElement("rect",{width:"22",height:"22",fill:"#476AE7"})),React.createElement("g",{mask:"url(#mask0_236_173)"},React.createElement("path",{d:"M11.0017 10.8767C11.4578 10.8767 11.8477 10.7143 12.1715 10.3895C12.4953 10.0647 12.6571 9.67424 12.6571 9.21812C12.6571 8.762 12.4947 8.37206 12.1699 8.04829C11.8451 7.72453 11.4547 7.56264 10.9985 7.56264C10.5424 7.56264 10.1525 7.72505 9.82872 8.04985C9.50495 8.37466 9.34306 8.76512 9.34306 9.22124C9.34306 9.67735 9.50547 10.0673 9.83027 10.3911C10.1551 10.7148 10.5455 10.8767 11.0017 10.8767ZM11.0001 19.7172C8.69317 17.7182 6.96326 15.8578 5.81037 14.1362C4.65749 12.4145 4.08105 10.8338 4.08105 9.39419C4.08105 7.27883 4.76532 5.56626 6.13386 4.25648C7.50238 2.9467 9.12446 2.29181 11.0001 2.29181C12.8757 2.29181 14.4978 2.9467 15.8663 4.25648C17.2349 5.56626 17.9191 7.27883 17.9191 9.39419C17.9191 10.8338 17.3427 12.4145 16.1898 14.1362C15.0369 15.8578 13.307 17.7182 11.0001 19.7172Z",fill:"#476AE7"}))))),React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--item--title"},React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--item--title--inner",title:r.label||r.address,dangerouslySetInnerHTML:{__html:r.label||r.address}})),!n&&React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--item--actions"},!(null!=r&&r.isTemporary)&&React.createElement(bt,{width:24,height:24,onClick:function(t){return c(t,r.id)}}),React.createElement(xt,{width:24,height:24,onClick:function(t){return u(t,r.id)}})))};function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Lt.apply(this,arguments)}const Pt=function(t){return React.createElement("svg",Lt({xmlns:"http://www.w3.org/2000/svg",height:"22",viewBox:"0 -960 960 960",width:"22"},t),React.createElement("path",{d:"M460-420h40v-120h120v-40H500v-120h-40v120H340v40h120v120Zm20 247.077q112.769-98.154 178.308-199.654 65.538-101.5 65.538-175.577 0-109.769-69.5-181.192T480-800.769q-104.846 0-174.346 71.423t-69.5 181.192q0 74.077 65.538 175.577Q367.231-271.077 480-172.923Zm0 53.692Q339-243.923 267.577-351.808q-71.423-107.884-71.423-196.346 0-126.923 82.654-209.385Q361.461-840 480-840t201.192 82.461q82.654 82.462 82.654 209.385 0 88.462-71.423 196.346Q621-243.923 480-119.231Zm0-436.154Z",fill:"currentColor"}))},Tt=function(t){var e,n,i,o,r=t.markers,a=void 0===r?null:r,s=t.onViewMarker,l=t.onSelectMarker,c=t.onUnselectMarker,u=t.onEditMarker,h=t.onDeleteMarker,d=null===(e=a)||void 0===e||null===(e=e.filter((function(t){return null==t?void 0:t.isTemporary})))||void 0===e?void 0:e.length;a&&(a=null===(o=a)||void 0===o?void 0:o.filter((function(t){return!(null!=t&&t.isTemporary)})));var p=pt().readonly,f=ft(),m=0===(null===(n=a)||void 0===n?void 0:n.length)&&d;return React.createElement("div",{className:"tf-map-editor--app--sidebar--markers"},!p&&null===a&&!d&&React.createElement("div",{className:"tf-map-editor--app--sidebar--markers--empty"},React.createElement(Pt,{width:80,height:80,className:"tf-map-editor--app--blue"}),Joomla.JText._("NR_YOU_HAVENT_ADDED_ANY_MARKERS_YET"),React.createElement("a",{href:"#",onClick:function(t){return function(t){t.preventDefault(),f({type:"SET_NEW_MARKER_MODAL",payload:!0})}(t)}},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"}))),Joomla.JText._("NR_ADD_YOUR_FIRST_MARKER"))),null!==a&&(m?React.createElement(React.Fragment,null,Joomla.JText._("NR_SAVE_YOUR_FIRST_MARKER")):null!==(i=a)&&void 0!==i&&i.length?a.map((function(t,e){return React.createElement(Et,{key:e,readonly:p,className:null!=t&&t.isSelected?"isSelected":"",marker:t,onViewMarker:s,onSelectMarker:l,onUnselectMarker:c,onEditMarker:u,onDeleteMarker:h})})):React.createElement(React.Fragment,null,Joomla.JText._("NR_NO_MARKERS_FOUND"))))},Mt=function(t){var e=t.readonly,n=void 0!==e&&e,i=t.value,o=t.markers,r=void 0===o?[]:o,a=t.onChange,s=t.onSelectAll,l=t.onUnselectAll,c=t.onDeleteAllSelectedMarkers,u=r.length>0&&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<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Ot.apply(this,arguments)}const St=function(t){return React.createElement("svg",Ot({xmlns:"http://www.w3.org/2000/svg",height:"22",viewBox:"0 -960 960 960",width:"22"},t),React.createElement("path",{d:"M252.309-100.001q-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.193h47.692v-80q0-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.309Zm0-59.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.423ZM360-619.999h240v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80ZM240-160v-400 400Z",fill:"currentColor"}))};function kt(){return kt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},kt.apply(this,arguments)}const At=function(t){return React.createElement("svg",kt({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("mask",{id:"mask0_254_2351",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},React.createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_254_2351)"},React.createElement("path",{d:"M9.16663 10.8333V15.8333H7.49996V12.5H4.16663V10.8333H9.16663ZM12.5 4.16666V7.49999H15.8333V9.16666H10.8333V4.16666H12.5Z",fill:"currentColor"})))};function Rt(){return Rt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Rt.apply(this,arguments)}const Ct=function(t){return React.createElement("svg",Rt({width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("mask",{id:"mask0_211_307",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},React.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_211_307)"},React.createElement("path",{d:"M12 20C11.45 20 10.9792 19.8042 10.5875 19.4125C10.1958 19.0208 10 18.55 10 18C10 17.45 10.1958 16.9792 10.5875 16.5875C10.9792 16.1958 11.45 16 12 16C12.55 16 13.0208 16.1958 13.4125 16.5875C13.8042 16.9792 14 17.45 14 18C14 18.55 13.8042 19.0208 13.4125 19.4125C13.0208 19.8042 12.55 20 12 20ZM12 14C11.45 14 10.9792 13.8042 10.5875 13.4125C10.1958 13.0208 10 12.55 10 12C10 11.45 10.1958 10.9792 10.5875 10.5875C10.9792 10.1958 11.45 10 12 10C12.55 10 13.0208 10.1958 13.4125 10.5875C13.8042 10.9792 14 11.45 14 12C14 12.55 13.8042 13.0208 13.4125 13.4125C13.0208 13.8042 12.55 14 12 14ZM12 8C11.45 8 10.9792 7.80417 10.5875 7.4125C10.1958 7.02083 10 6.55 10 6C10 5.45 10.1958 4.97917 10.5875 4.5875C10.9792 4.19583 11.45 4 12 4C12.55 4 13.0208 4.19583 13.4125 4.5875C13.8042 4.97917 14 5.45 14 6C14 6.55 13.8042 7.02083 13.4125 7.4125C13.0208 7.80417 12.55 8 12 8Z",fill:"currentColor"})))};function It(){return It=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},It.apply(this,arguments)}const jt=function(t){return React.createElement("svg",It({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),React.createElement("mask",{id:"mask0_254_2363",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20"},React.createElement("rect",{width:"20",height:"20",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_254_2363)"},React.createElement("path",{d:"M4.16675 15.8333V10.8333H5.83341V14.1667H9.16675V15.8333H4.16675ZM14.1667 9.16667V5.83334H10.8334V4.16667H15.8334V9.16667H14.1667Z",fill:"currentColor"})))};function zt(){return zt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},zt.apply(this,arguments)}const Nt=function(t){return React.createElement("svg",zt({xmlns:"http://www.w3.org/2000/svg",height:"22",viewBox:"0 -960 960 960",width:"22"},t),React.createElement("path",{d:"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z",fill:"currentColor"}))};function Zt(t){return Zt="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},Zt(t)}function Bt(){Bt=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"==Zt(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<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(Zt(e)+" is not iterable")}return g.prototype=y,o(E,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:g,configurable:!0}),g.displayName=c(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},L(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var a=new P(u(t,n,i,o),r);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=A,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return s.type="throw",s.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=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<e;n++)i[n]=t[n];return i}const Jt=function(e){var n=e.markers,i=void 0===n?[]:n,o=e.readonly,r=void 0!==o&&o,a=e.maxMarkersAllowed,s=void 0===a?0:a,l=e.minimizedSidebar,c=void 0!==l&&l,u=e.toggleMinimized,h=e.isPro,d=void 0!==h&&h,p=e.showImport,f=void 0===p||p,m=e.enableMap,_=Ft((0,t.useState)(!1),2),v=_[0],g=_[1],y=Ft((0,t.useState)(""),2),b=y[0],w=y[1],E=Ft((0,t.useState)(""),2),L=E[0],P=E[1],T=Ft((0,t.useState)(null),2),M=T[0],O=T[1],S=Ft((0,t.useState)(!1),2),k=S[0],A=S[1],R=Ft((0,t.useState)(!1),2),C=R[0],I=R[1],j=Ft((0,t.useState)(!1),2),z=j[0],N=j[1],Z=ft(),B=(0,t.useRef)(),D=(0,t.useRef)(),H=(0,t.useRef)(),F=ut(),U=function(){I(!1),A(!1),m(F)},W=function(){var t,e=(t=Bt().mark((function t(){var e,n,i,o,r,a,l,c,u,h,d,p,f;return Bt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,w(!1),g(!0),O(null),e=L.split(/\r?\n/),n=0,i=Dt(e),t.prev=7,i.s();case 9:if((o=i.n()).done){t.next=36;break}if(""!==(r=o.value).trim()){t.next=13;break}return t.abrupt("continue",34);case 13:if(void 0,_=r.split(","),a=2===_.length&&!isNaN(parseFloat(_[0]))&&!isNaN(parseFloat(_[1])),l={},a){t.next=24;break}return t.next=18,V(r);case 18:if(null!=(c=t.sent)&&c.length){t.next=21;break}return t.abrupt("continue",34);case 21:l={address:c[0].display_name,latitude:c[0].lat,longitude:c[0].lon},t.next=29;break;case 24:return u=r.split(","),h=Ft(u,2),d=h[0],p=h[1],t.next=27,J(d,p);case 27:f=t.sent,l={address:(null==f?void 0:f.display_name)||"-",latitude:d,longitude:p};case 29:if(!(0!==s&&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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(n),!0).forEach((function(e){Yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Yt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==qt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==qt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===qt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const Qt=function(e){var n,i,o=e.onCloseModal,r=e.onSaveMarker,a=(n=(0,t.useState)({address:"",latitude:"",longitude:"",label:"",description:""}),i=2,function(t){if(Array.isArray(t))return t}(n)||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}}(n,i)||function(t,e){if(t){if("string"==typeof t)return Xt(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)?Xt(t,e):void 0}}(n,i)||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];return(0,x.createPortal)(React.createElement(it,{marker:s,onSelectResult:function(t){var e=t.lat,n=t.lon,i=t.display_name;l(Gt(Gt({},s),{},{latitude:e,longitude:n,address:i}))},onUpdateMarkerItem:function(t,e){l(Gt(Gt({},s),{},Yt({},t,e)))},onSaveMarker:r,onCloseModal:o,modalLabel:Joomla.JText._("NR_ADD_MARKER"),buttonLabel:Joomla.JText._("NR_ADD_MARKER")}),document.body)};function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const te=function(e){var n,i,o,r,a=e.onCloseModal,s=e.maxMarkersAllowed,l=void 0===s?0:s,c=e.markers,u=void 0===c?[]:c,h=e.addNewMarkerModal,d=void 0!==h&&h,p=e.showImport,f=void 0===p||p,m=(o=(0,t.useState)(""),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 $t(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)?$t(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.")}()),_=m[0],v=m[1],g=(0,t.useMemo)((function(){if(!_)return u;var t=_.toLowerCase();return null==u?void 0:u.filter((function(e){var n,i,o,r=null==e||null===(n=e.address)||void 0===n||null===(n=n.toLowerCase())||void 0===n?void 0:n.includes(t),a=null==e||null===(i=e.label)||void 0===i||null===(i=i.toLowerCase())||void 0===i?void 0:i.includes(t),s=null==e||null===(o=e.description)||void 0===o||null===(o=o.toLowerCase())||void 0===o?void 0:o.includes(t);return r||a||s}))}),[u,_]),y=pt(),b=y.minimizedSidebar,w=y.readonly,x=y.options,E=ft(),L=null!==(n=x.pro)&&void 0!==n&&n,P=(0,t.createRef)(),T=function(){E({type:"TOGGLE_MINIMIZED",payload:!b})},M=ut(),O=function(t){t.dragging.enable(),t.touchZoom.enable(),t.doubleClickZoom.enable(),t.scrollWheelZoom.enable(),t.boxZoom.enable(),t.keyboard.enable(),t.contextmenu.enable()},S=(0,t.useCallback)((function(){M&&(M.dragging.disable(),M.touchZoom.disable(),M.doubleClickZoom.disable(),M.scrollWheelZoom.disable(),M.boxZoom.disable(),M.keyboard.disable(),M.contextmenu.disable())}),[M]),k=(0,t.useCallback)((function(){M&&O(M)}),[M]);return React.createElement("div",{className:"tf-map-editor--app--sidebar-wrapper"},React.createElement("div",{onMouseEnter:S,onMouseLeave:k,className:"leaflet-control tf-map-editor--app--sidebar".concat(b?" is-minimized":""),onClick:b?T:void 0,ref:P},React.createElement(Jt,{readonly:w,enableMap:O,markers:u,maxMarkersAllowed:l,isPro:L,minimizedSidebar:b,toggleMinimized:T,showImport:f}),!b&&(null==u?void 0:u.length)>0&&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<r.length;i++)n=r[i],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(i=0;i<r.length;i++)n=r[i],e.indexOf(n)>=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<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},se.apply(this,arguments)}const le=function(t){return React.createElement("svg",se({xmlns:"http://www.w3.org/2000/svg",height:"22",viewBox:"0 -960 960 960",width:"22"},t),React.createElement("path",{d:"M480.068-485.385q29.855 0 51.047-21.26 21.192-21.26 21.192-51.115t-21.26-51.047q-21.26-21.192-51.115-21.192t-51.047 21.26q-21.192 21.26-21.192 51.115t21.26 51.047q21.26 21.192 51.115 21.192ZM480-179.461q117.384-105.076 179.654-201.577 62.269-96.5 62.269-169.039 0-109.384-69.5-179.846T480-800.385q-102.923 0-172.423 70.462t-69.5 179.846q0 72.539 62.269 169.039Q362.616-284.537 480-179.461Zm0 79.844Q329.001-230.463 253.539-343.154q-75.461-112.692-75.461-206.923 0-138.46 89.577-224.191Q357.231-859.999 480-859.999t212.345 85.731q89.577 85.731 89.577 224.191 0 94.231-75.461 206.923Q630.999-230.463 480-99.617Zm0-458.075Z",fill:"currentColor"}))},ce=function(t){var e=t.marker,n=t.readonly,i=void 0!==n&&n,o=t.onEditMarker,r=t.onDeleteMarker;return React.createElement("div",{className:"tf-marker-tooltip--footer"},React.createElement("div",{className:"tf-marker-tooltip--footer--coords"},React.createElement(le,{width:14,height:14}),React.createElement("span",null,parseFloat(e.latitude).toFixed(5),", ",parseFloat(e.longitude).toFixed(5))),!i&&React.createElement("div",{className:"tf-marker-tooltip--footer--actions"},!(null!=e&&e.isTemporary)&&React.createElement(bt,{onClick:function(t){return o(t,e.id)},width:"20",height:"20"}),React.createElement(xt,{onClick:function(t){return r(t,e.id)},width:"20",height:"20"})))},ue=function(t){var e=t.readonly,n=void 0!==e&&e,i=t.totalMarkersAdded,o=void 0===i?0:i,r=t.maxMarkersAllowed,a=void 0===r?0:r,s=t.marker,l=t.onAddTempMarkerToList,c=t.onEditMarker,u=t.onDeleteMarker;return React.createElement("div",{className:"tf-marker-tooltip"},React.createElement("div",{className:"tf-marker-tooltip--title",dangerouslySetInnerHTML:{__html:s.label||s.address}}),(null==s?void 0:s.description)&&""!==s.description&&React.createElement("div",{className:"tf-marker-tooltip--description",dangerouslySetInnerHTML:{__html:s.description}}),(null==s?void 0:s.isTemporary)&&(0===a||o<a?React.createElement("a",{href:"#",className:"tf-marker-add-button",onClick:function(t){return l(t,s)}},React.createElement(ae,null),Joomla.JText._("NR_ADD_TO_MAP")):React.createElement("div",{className:"tf-marker-tooltip--limit-reached"},Joomla.JText._("NR_MARKERS_LIMIT_REACHED_DELETE_MARKER_TO_ADD"))),React.createElement(ce,{marker:s,readonly:n,onEditMarker:c,onDeleteMarker:u}))};function he(t){return he="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},he(t)}function de(){return de=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},de.apply(this,arguments)}function pe(){pe=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"==he(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<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(he(e)+" is not iterable")}return g.prototype=y,o(E,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:g,configurable:!0}),g.displayName=c(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},L(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var a=new P(u(t,n,i,o),r);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=A,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return s.type="throw",s.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?me(Object(n),!0).forEach((function(e){var i,o,r;i=t,o=e,r=n[e],(o=function(t){var e=function(t,e){if("object"!==he(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==he(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===he(e)?e:String(e)}(o))in i?Object.defineProperty(i,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[o]=r})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ve(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}const ge=function(e){var n,i,o=e.maxMarkersAllowed,r=void 0===o?0:o,a=e.markers,s=void 0===a?[]:a,l=e.viewingMarker,c=void 0===l?null:l,u=e.markerImage,h=void 0===u?"":u;if(s){var d=(n=React.useState([0,0]),i=2,function(t){if(Array.isArray(t))return t}(n)||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}}(n,i)||function(t,e){if(t){if("string"==typeof t)return ve(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)?ve(t,e):void 0}}(n,i)||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.")}()),p=d[0],f=d[1],m=pt().readonly,_=ft(),v=React.useRef([]);(0,t.useEffect)((function(){v.current[null==c?void 0:c.id]&&setTimeout((function(){v.current[null==c?void 0:c.id].openPopup()}),230)}),[s,c]),(0,t.useEffect)((function(){""!==h&&b(h).then((function(t){f(t)}))}),[]);var g=(0,t.useCallback)((function(t,e,n,i){var o=_e(_e({},i),{},{latitude:e,longitude:n});null!=t&&t.display_name&&(o=_e(_e({},o),{},{address:t.display_name})),_({type:"SAVE_MARKER",payload:{marker:o}})}),[]),y=function(t){return{dragend:function(){return(e=pe().mark((function e(){var n,i;return pe().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=v.current[t.id].getLatLng())){e.next=7;break}return g(i,n.lat,n.lng,t),e.next=5,J(n.lat,n.lng);case 5:null!=(i=e.sent)&&i.display_name&&g(i,n.lat,n.lng,t);case 7:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(i,o){var r=e.apply(t,n);function a(t){fe(r,i,o,a,s,"next",t)}function s(t){fe(r,i,o,a,s,"throw",t)}a(void 0)}))})();var e}}},b=function(t){return new Promise((function(e,n){var i=new Image;i.onload=function(){e([i.width,i.height])},i.onerror=function(){e([0,0])},i.src=t}))},w=function(t,e){t.preventDefault(),e.viewMarker=!0,_({type:"ADD_MARKER",payload:e})},x=function(t,e){t.stopPropagation(),_({type:"EDIT_MARKER",payload:e})},E=function(t,e){var n;t.stopPropagation(),((null===(n=s.find((function(t){return t.id===e})))||void 0===n?void 0:n.isTemporary)||confirm(Joomla.JText._("NR_ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_MARKER")))&&_({type:"DELETE_MARKER",payload:e})},P=function(t){var e=Joomla.getOptions("TFMapEditor").images_url;return!0===(null==t?void 0:t.isTemporary)?new L.icon({iconUrl:e+"marker-icon-temp.png",iconSize:[25,41],iconAnchor:[12.5,8],shadowUrl:e+"marker-shadow.png"}):h?new L.icon({iconUrl:h,iconSize:p}):new L.icon({iconUrl:e+"marker-icon.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41],shadowUrl:e+"marker-shadow.png"})};return React.createElement(React.Fragment,null,s.map((function(t,e){var n,i=P(t);return React.createElement(oe,de({key:e,ref:function(e){return v.current[t.id]=e},position:[t.latitude,t.longitude],draggable:!0,eventHandlers:y(t)},i&&{icon:P(t)}),React.createElement(re,null,React.createElement(ue,{marker:t,readonly:m,totalMarkersAdded:null==s||null===(n=s.filter((function(t){return!(null!=t&&t.isTemporary)})))||void 0===n?void 0:n.length,maxMarkersAllowed:r,onAddTempMarkerToList:w,onEditMarker:x,onDeleteMarker:E})))})))}};n(565);var ye=n(379),be=n.n(ye),we=n(795),xe=n.n(we),Ee=n(569),Le=n.n(Ee),Pe=n(636),Te=n.n(Pe),Me=n(216),Oe=n.n(Me),Se=n(589),ke=n.n(Se),Ae=n(93),Re={};function Ce(t){return Ce="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},Ce(t)}function Ie(){Ie=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"==Ce(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<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(Ce(e)+" is not iterable")}return g.prototype=y,o(E,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:g,configurable:!0}),g.displayName=c(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},L(P.prototype),c(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var a=new P(u(t,n,i,o),r);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(E),c(E,l,"Generator"),c(E,a,(function(){return this})),c(E,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=A,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return s.type="throw",s.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=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<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=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;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?je(Object(n),!0).forEach((function(e){var i,o,r;i=t,o=e,r=n[e],(o=function(t){var e=function(t,e){if("object"!==Ce(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==Ce(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Ce(e)?e:String(e)}(o))in i?Object.defineProperty(i,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):i[o]=r})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ne(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)}Re.styleTagTransform=ke(),Re.setAttributes=Te(),Re.insert=Le().bind(null,"head"),Re.domAPI=xe(),Re.insertStyleElement=Oe(),be()(Ae.Z,Re),Ae.Z&&Ae.Z.locals&&Ae.Z.locals;var Ze=function(e){var n=e.markers,i=void 0===n?null:n,o=e.options,r=void 0===o?[]:o,a=e.tmpMarker,s=void 0===a?null:a,l=e.preventAutoPan,c=void 0!==l&&l,u=e.showSidebar,h=void 0===u||u,d=e.minimizedSidebar,p=void 0!==d&&d,f=e.viewMarker,m=void 0===f?null:f,_=function(){if(m)v.setView({lat:m.latitude,lng:m.longitude},v.getZoom());else if(s)v.setView({lat:s.latitude,lng:s.longitude},v.getZoom());else if(null===s&&null===m)if((null==i?void 0:i.length)>0){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:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> 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);n<e;n++)i[n]=t[n];return i}function He(n){var i,o,r,a,s,c,u={readonly:null!==(i=n.options.readonly)&&void 0!==i&&i,minimizedSidebar:!1,showSidebar:null===(o=n.options.showSidebar)||void 0===o||o,tmpMarker:null,viewMarker:null,editingMarker:null,preventAutoPan:!1,addNewMarkerModal:!1,markers:null!==(r=n.valueElement)&&void 0!==r&&r.value&&JSON.parse(n.valueElement.value)&&(null===(a=JSON.parse(n.valueElement.value))||void 0===a?void 0:a.length)>0?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)}))}))})()})();
|