- * Leaflet 1.7.1, a JS library for interactive maps. http://leafletjs.com
- * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade
- */var Ge=st((function(t,e){!function(t){var e="1.7.1";function n(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 i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(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 r=0;function s(t){return t._leaflet_id=t._leaflet_id||++r,t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)}}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 u(){return!1}function c(t,e){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 f(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function p(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 g(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 _=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(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 x=0;function w(t){var e=+new Date,n=Math.max(0,16-(e-x));return x=e+n,window.setTimeout(t,n)}var T=window.requestAnimationFrame||b("RequestAnimationFrame")||w,C=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function E(t,e,n){if(!n||T!==w)return T.call(window,o(t,e));t.call(e)}function $(t){t&&C.call(window,t)}var k={extend:n,create:i,bind:o,lastId:r,stamp:s,throttle:a,wrapNum:l,falseFn:u,formatNum:c,trim:h,splitWords:d,setOptions:f,getParamString:p,template:g,isArray:_,indexOf:v,emptyImageUrl:y,requestFn:T,cancelFn:C,requestAnimFrame:E,cancelAnimFrame:$};function P(){}function S(t){if("undefined"!=typeof L&&L&&L.Mixin){t=_(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)}}P.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&(n(e,t.statics),delete t.statics),t.includes&&(S(t.includes),n.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=n(i(r.options),t.options)),n(r,t),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)}},e},P.include=function(t){return n(this.prototype,t),this},P.mergeOptions=function(t){return n(this.prototype.options,t),this},P.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 M={on:function(t,e,n){if("object"==typeof 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(t)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._off(t[o],e,n);else delete this._events;return this},_on:function(t,e,n){this._events=this._events||{};var i=this._events[t];i||(i=[],this._events[t]=i),n===this&&(n=void 0);for(var o={fn:e,ctx:n},r=i,s=0,a=r.length;s<a;s++)if(r[s].fn===e&&r[s].ctx===n)return;r.push(o)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(e){if(n===this&&(n=void 0),i)for(o=0,r=i.length;o<r;o++){var s=i[o];if(s.ctx===n&&s.fn===e)return s.fn=u,this._firingCount&&(this._events[t]=i=i.slice()),void i.splice(o,1)}}else{for(o=0,r=i.length;o<r;o++)i[o].fn=u;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var l=r[s];l.fn.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e){var n=this._events&&this._events[t];if(n&&n.length)return!0;if(e)for(var i in this._eventParents)if(this._eventParents[i].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var i in t)this.once(i,t[i],e);return this}var r=o((function(){this.off(t,e,n).off(t,r,n)}),this);return this.on(t,e,n).on(t,r,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};M.addEventListener=M.on,M.removeEventListener=M.clearAllEventListeners=M.off,M.addOneTimeEventListener=M.once,M.fireEvent=M.fire,M.hasEventListeners=M.listens;var A=P.extend(M);function N(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var D=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof N?t:_(t)?new N(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new N(t.x,t.y):new N(t,e,n)}function O(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 O?t:new O(t,e)}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 B(t,e){return t instanceof j?t:new j(t,e)}function R(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 Z(t,e,n){return t instanceof R?t:_(t)&&"object"!=typeof t[0]?3===t.length?new R(t[0],t[1],t[2]):2===t.length?new R(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new R(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new R(t,e,n)}N.prototype={clone:function(){return new N(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 N(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new N(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=D(this.x),this.y=D(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("+c(this.x)+", "+c(this.y)+")"}},O.prototype={extend:function(t){return t=I(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new N((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new N(this.min.x,this.max.y)},getTopRight:function(){return new N(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 N?I(t):z(t))instanceof O?(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,s=o.y>=e.y&&i.y<=n.y;return r&&s},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,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)}},j.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof R)e=t,n=t;else{if(!(t instanceof j))return t?this.extend(Z(t)||B(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 R(e.lat,e.lng),this._northEast=new R(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 j(new R(e.lat-i,e.lng-o),new R(n.lat+i,n.lng+o))},getCenter:function(){return new R((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 R(this.getNorth(),this.getWest())},getSouthEast:function(){return new R(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 R||"lat"in t?Z(t):B(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof j?(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=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=B(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=B(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},R.prototype={equals:function(t,e){return!!t&&(t=Z(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("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return F.distance(this,Z(t))},wrap:function(){return F.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return B([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new R(this.lat,this.lng,this.alt)}};var H,q={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 O(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 R(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(),s=t.getNorthEast();return new j(new R(r.lat-i,r.lng-o),new R(s.lat-i,s.lng-o))}},F=n({},q,{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),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),W=6378137,U={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 N(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new R((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(H=W*Math.PI,new O([-H,-H],[H,H]))};function V(t,e,n,i){if(_(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 G(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 N((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var K=n({},F,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return G(t,.5,-t,.5)}()}),Y=n({},K,{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,s,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)l+=(i?"L":"M")+(a=s[i]).x+" "+a.y;l+=e?St?"z":"x":""}return l||"M0 0"}var J=document.documentElement.style,tt="ActiveXObject"in window,et=tt&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),it=At("webkit"),ot=At("android"),rt=At("android 2")||At("android 3"),st=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),at=ot&&At("Google")&&st<537&&!("AudioNode"in window),lt=!!window.opera,ut=!nt&&At("chrome"),ct=At("gecko")&&!it&&!lt&&!tt,ht=!ut&&At("safari"),dt=At("phantom"),ft="OTransition"in J,pt=0===navigator.platform.indexOf("Win"),mt=tt&&"transition"in J,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,_t="MozPerspective"in J,vt=!window.L_DISABLE_3D&&(mt||gt||_t)&&!ft&&!dt,yt="undefined"!=typeof orientation||At("mobile"),bt=yt&&it,xt=yt&>,wt=!window.PointerEvent&&window.MSPointerEvent,Tt=!(!window.PointerEvent&&!wt),Ct=!window.L_NO_TOUCH&&(Tt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),Et=yt&<,Lt=yt&&ct,$t=(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",u,e),window.removeEventListener("testPassiveEventSupport",u,e)}catch(t){}return t}(),Pt=!!document.createElement("canvas").getContext,St=!(!document.createElementNS||!X("svg").createSVGRect),Mt=!St&&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"==typeof e.adj}catch(t){return!1}}();function At(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:tt,ielt9:et,edge:nt,webkit:it,android:ot,android23:rt,androidStock:at,opera:lt,chrome:ut,gecko:ct,safari:ht,phantom:dt,opera12:ft,win:pt,ie3d:mt,webkit3d:gt,gecko3d:_t,any3d:vt,mobile:yt,mobileWebkit:bt,mobileWebkit3d:xt,msPointer:wt,pointer:Tt,touch:Ct,mobileOpera:Et,mobileGecko:Lt,retina:$t,passiveEvents:kt,canvas:Pt,svg:St,vml:Mt},Dt=wt?"MSPointerDown":"pointerdown",It=wt?"MSPointerMove":"pointermove",Ot=wt?"MSPointerUp":"pointerup",zt=wt?"MSPointerCancel":"pointercancel",jt={},Bt=!1;function Rt(t,e,n,i){return"touchstart"===e?Ht(t,n,i):"touchmove"===e?Vt(t,n,i):"touchend"===e&&Gt(t,n,i),this}function Zt(t,e,n){var i=t["_leaflet_"+e+n];return"touchstart"===e?t.removeEventListener(Dt,i,!1):"touchmove"===e?t.removeEventListener(It,i,!1):"touchend"===e&&(t.removeEventListener(Ot,i,!1),t.removeEventListener(zt,i,!1)),this}function Ht(t,e,n){var i=o((function(t){t.MSPOINTER_TYPE_TOUCH&&t.pointerType===t.MSPOINTER_TYPE_TOUCH&&Fe(t),Ut(t,e)}));t["_leaflet_touchstart"+n]=i,t.addEventListener(Dt,i,!1),Bt||(document.addEventListener(Dt,qt,!0),document.addEventListener(It,Ft,!0),document.addEventListener(Ot,Wt,!0),document.addEventListener(zt,Wt,!0),Bt=!0)}function qt(t){jt[t.pointerId]=t}function Ft(t){jt[t.pointerId]&&(jt[t.pointerId]=t)}function Wt(t){delete jt[t.pointerId]}function Ut(t,e){for(var n in t.touches=[],jt)t.touches.push(jt[n]);t.changedTouches=[t],e(t)}function Vt(t,e,n){var i=function(t){t.pointerType===(t.MSPOINTER_TYPE_MOUSE||"mouse")&&0===t.buttons||Ut(t,e)};t["_leaflet_touchmove"+n]=i,t.addEventListener(It,i,!1)}function Gt(t,e,n){var i=function(t){Ut(t,e)};t["_leaflet_touchend"+n]=i,t.addEventListener(Ot,i,!1),t.addEventListener(zt,i,!1)}var Kt=wt?"MSPointerDown":Tt?"pointerdown":"touchstart",Yt=wt?"MSPointerUp":Tt?"pointerup":"touchend",Xt="_leaflet_";function Qt(t,e,n){var i,o,r=!1,s=250;function a(t){if(Tt){if(!t.isPrimary)return;if("mouse"===t.pointerType)return}else if(t.touches.length>1)return;var e=Date.now(),n=e-(i||e);o=t.touches?t.touches[0]:t,r=n>0&&n<=s,i=e}function l(t){if(r&&!o.cancelBubble){if(Tt){if("mouse"===t.pointerType)return;var n,s,a={};for(s in o)n=o[s],a[s]=n&&n.bind?n.bind(o):n;o=a}o.type="dblclick",o.button=0,e(o),i=null}}return t[Xt+Kt+n]=a,t[Xt+Yt+n]=l,t[Xt+"dblclick"+n]=e,t.addEventListener(Kt,a,!!kt&&{passive:!1}),t.addEventListener(Yt,l,!!kt&&{passive:!1}),t.addEventListener("dblclick",e,!1),this}function Jt(t,e){var n=t[Xt+Kt+e],i=t[Xt+Yt+e],o=t[Xt+"dblclick"+e];return t.removeEventListener(Kt,n,!!kt&&{passive:!1}),t.removeEventListener(Yt,i,!!kt&&{passive:!1}),t.removeEventListener("dblclick",o,!1),this}var te,ee,ne,ie,oe,re=we(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),se=we(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ae="webkitTransition"===se||"OTransition"===se?se+"End":"transitionend";function le(t){return"string"==typeof t?document.getElementById(t):t}function ue(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 ce(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function he(t){var e=t.parentNode;e&&e.removeChild(t)}function de(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function fe(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function pe(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function me(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=ye(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function ge(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(!me(t,e)){var r=ye(t);ve(t,(r?r+" ":"")+e)}}function _e(t,e){void 0!==t.classList?t.classList.remove(e):ve(t,h((" "+ye(t)+" ").replace(" "+e+" "," ")))}function ve(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function ye(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function be(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&xe(t,e)}function xe(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+")"}function we(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Te(t,e,n){var i=e||new N(0,0);t.style[re]=(mt?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Ce(t,e){t._leaflet_pos=e,vt?Te(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ee(t){return t._leaflet_pos||new N(0,0)}if("onselectstart"in document)te=function(){De(window,"selectstart",Fe)},ee=function(){Oe(window,"selectstart",Fe)};else{var Le=we(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);te=function(){if(Le){var t=document.documentElement.style;ne=t[Le],t[Le]="none"}},ee=function(){Le&&(document.documentElement.style[Le]=ne,ne=void 0)}}function $e(){De(window,"dragstart",Fe)}function ke(){Oe(window,"dragstart",Fe)}function Pe(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Se(),ie=t,oe=t.style.outline,t.style.outline="none",De(window,"keydown",Se))}function Se(){ie&&(ie.style.outline=oe,ie=void 0,oe=void 0,Oe(window,"keydown",Se))}function Me(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ae(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={TRANSFORM:re,TRANSITION:se,TRANSITION_END:ae,get:le,getStyle:ue,create:ce,remove:he,empty:de,toFront:fe,toBack:pe,hasClass:me,addClass:ge,removeClass:_e,setClass:ve,getClass:ye,setOpacity:be,testProp:we,setTransform:Te,setPosition:Ce,getPosition:Ee,disableTextSelection:te,enableTextSelection:ee,disableImageDrag:$e,enableImageDrag:ke,preventOutline:Pe,restoreOutline:Se,getSizedParentNode:Me,getScale:Ae};function De(t,e,n,i){if("object"==typeof e)for(var o in e)Be(t,o,e[o],n);else for(var r=0,s=(e=d(e)).length;r<s;r++)Be(t,e[r],n,i);return this}var Ie="_leaflet_events";function Oe(t,e,n,i){if("object"==typeof e)for(var o in e)Re(t,o,e[o],n);else if(e)for(var r=0,s=(e=d(e)).length;r<s;r++)Re(t,e[r],n,i);else{for(var a in t[Ie])Re(t,a,t[Ie][a]);delete t[Ie]}return this}function ze(){if(Tt)return!(nt||ht)}var je={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Be(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[Ie]&&t[Ie][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;Tt&&0===e.indexOf("touch")?Rt(t,e,r,o):Ct&&"dblclick"===e&&!ze()?Qt(t,r,o):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(je[e]||e,r,!!kt&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,Qe(t,e)&&a(e)},t.addEventListener(je[e],r,!1)):t.addEventListener(e,a,!1):"attachEvent"in t&&t.attachEvent("on"+e,r),t[Ie]=t[Ie]||{},t[Ie][o]=r}function Re(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):""),r=t[Ie]&&t[Ie][o];if(!r)return this;Tt&&0===e.indexOf("touch")?Zt(t,e,o):Ct&&"dblclick"===e&&!ze()?Jt(t,o):"removeEventListener"in t?t.removeEventListener(je[e]||e,r,!1):"detachEvent"in t&&t.detachEvent("on"+e,r),t[Ie][o]=null}function Ze(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,Xe(t),this}function He(t){return Be(t,"wheel",Ze),this}function qe(t){return De(t,"mousedown touchstart dblclick",Ze),Be(t,"click",Ye),this}function Fe(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function We(t){return Fe(t),Ze(t),this}function Ue(t,e){if(!e)return new N(t.clientX,t.clientY);var n=Ae(e),i=n.boundingClientRect;return new N((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Ve=pt&&ut?2*window.devicePixelRatio:ct?window.devicePixelRatio:1;function Ge(t){return nt?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ve: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}var Ke={};function Ye(t){Ke[t.type]=!0}function Xe(t){var e=Ke[t.type];return Ke[t.type]=!1,e}function Qe(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 Je={on:De,off:Oe,stopPropagation:Ze,disableScrollPropagation:He,disableClickPropagation:qe,preventDefault:Fe,stop:We,getMousePosition:Ue,getWheelDelta:Ge,fakeStop:Ye,skipped:Xe,isExternalTarget:Qe,addListener:De,removeListener:Oe},tn=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=Ee(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=E(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(),Ce(this._el,n),this.fire("step")},_complete:function(){$(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),en=A.extend({options:{crs:K,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=f(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(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(Z(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=se&&vt&&!Et&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),De(this._proxy,ae,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(Z(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),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||(vt?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(vt?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 N?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():B(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),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=B(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 tn,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ge(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||!vt)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=Z(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),l=a*this.getZoomScale(s,e),u=o.distanceTo(i)||1,c=1.42,h=c*c;function d(t){var e=(l*l-a*a+(t?-1:1)*h*h*u*u)/(2*(t?l:a)*h*u),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function f(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return f(t)/p(t)}var g=d(0);function _(t){return a*(p(g)/p(g+c*t))}function v(t){return a*(p(g)*m(g+c*t)-f(g))/h}function y(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),x=(d(1)-g)/c,w=n.duration?1e3*n.duration:1e3*x*.8;function T(){var n=(Date.now()-b)/w,r=y(n)*x;n<=1?(this._flyToFrame=E(T,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(v(r)/u)),s),this.getScaleZoom(a/_(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),T.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=B(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},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,B(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.getCenter(),r=this.project(o),s=this.project(t),a=this.getPixelBounds(),l=a.getSize().divideBy(2),u=z([a.min.add(n),a.max.subtract(i)]);if(!u.contains(s)){this._enforcingBounds=!0;var c=r.subtract(s),h=I(s.x+c.x,s.y+c.y);(s.x<u.min.x||s.x>u.max.x)&&(h.x=r.x-c.x,c.x>0?h.x+=l.x-n.x:h.x-=l.x-i.x),(s.y<u.min.y||s.y>u.max.y)&&(h.y=r.y-c.y,c.y>0?h.y+=l.y-n.y:h.y-=l.y-i.y),this.panTo(this.unproject(h),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):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=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,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){var e=new R(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 s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);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.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(),he(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&($(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)he(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=ce("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:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new j(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=B(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),u=z(this.project(a,i),this.project(s,i)).getSize(),c=vt?this.options.zoomSnap:1,h=l.x/u.x,d=l.y/u.y,f=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(f,i),c&&(i=Math.round(i/(c/100))*(c/100),i=e?Math.ceil(i/c)*c:Math.floor(i/c)*c),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new N(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 O(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(Z(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(Z(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(Z(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(B(t))},distance:function(t,e){return this.options.crs.distance(Z(t),Z(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(Z(t)))},mouseEventToContainerPoint:function(t){return Ue(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=le(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");De(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&vt,ge(t,"leaflet-container"+(Ct?" leaflet-touch":"")+($t?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ht?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ue(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==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),Ce(this._mapPane,new N(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ge(t.markerPane,"leaflet-zoom-hide"),ge(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){Ce(this._mapPane,new N(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var i=this._zoom!==e;this._moveStart(i,!1)._move(t,e)._moveEnd(i),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n){void 0===e&&(e=this._zoom);var i=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(i||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return $(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ce(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[s(this._container)]=this;var e=t?Oe:De;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),vt&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){$(this._resizeRequest),this._resizeRequest=E((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,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!Qe(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!Qe(r,t)||(i=[this]),i},_handleDOMEvent:function(t){if(this._loaded&&!Xe(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e&&"keyup"!==e&&"keydown"!==e||Pe(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}if(!t._stopped&&(i=(i||[]).concat(this._findEventTargets(t,e))).length){var r=i[0];"contextmenu"===e&&r.listens(e,!0)&&Fe(t);var s={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var a=r.getLatLng&&(!r._radius||r._radius<=10);s.containerPoint=a?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),s.layerPoint=this.containerPointToLayerPoint(s.containerPoint),s.latlng=a?r.getLatLng():this.layerPointToLatLng(s.layerPoint)}for(var l=0;l<i.length;l++)if(i[l].fire(e,s,!0),s.originalEvent._stopped||!1===i[l].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))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 Ee(this._mapPane)||new N(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 O(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return s.round().equals([0,0])?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new O(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 N(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=vt?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(){_e(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=ce("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=re,n=this._proxy.style[e];Te(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(){he(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Te(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)||(E((function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ge(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&_e(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),E((function(){this._moveEnd(!0)}),this))}});function nn(t,e){return new en(t,e)}var on=P.extend({options:{position:"topright"},initialize:function(t){f(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 ge(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?(he(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()}}),rn=function(t){return new on(t)};en.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=ce("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=ce("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)he(this._controlCorners[t]);he(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var sn=on.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 f(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!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 on.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(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ge(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?(ge(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):_e(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return _e(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=ce("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),qe(e),He(e);var i=this._section=ce("section",t+"-list");n&&(this._map.on("click",this.collapse,this),ot||De(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var o=this._layersLink=ce("a",t+"-toggle",e);o.href="#",o.title="Layers",Ct?(De(o,"click",We),De(o,"click",this.expand,this)):De(o,"focus",this.expand,this),n||this.expand(),this._baseLayersList=ce("div",t+"-base",i),this._separator=ce("div",t+"-separator",i),this._overlaysList=ce("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(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(o((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;de(this._baseLayersList),de(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(s(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_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),De(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("div");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){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},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),an=function(t,e,n){return new sn(t,e,n)},ln=on.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=ce("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=ce("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),qe(r),De(r,"click",We),De(r,"click",o,this),De(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";_e(this._zoomInButton,e),_e(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&ge(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&ge(this._zoomInButton,e)}});en.mergeOptions({zoomControl:!0}),en.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ln,this.addControl(this.zoomControl))}));var un=function(t){return new ln(t)},cn=on.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=ce("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=ce("div",e,n)),t.imperial&&(this._iScale=ce("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=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),hn=function(t){return new cn(t)},dn=on.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=ce("div","leaflet-control-attribution"),qe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(" | ")}}});en.mergeOptions({attributionControl:!0}),en.addInitHook((function(){this.options.attributionControl&&(new dn).addTo(this)}));var fn=function(t){return new dn(t)};on.Layers=sn,on.Zoom=ln,on.Scale=cn,on.Attribution=dn,rn.layers=an,rn.zoom=un,rn.scale=hn,rn.attribution=fn;var pn=P.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}});pn.addTo=function(t,e){return t.addHandler(e,this),this};var mn,gn={Events:M},_n=Ct?"touchstart mousedown":"mousedown",vn={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},yn={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},bn=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){f(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(De(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bn._dragging===this&&this.finishDrag(),Oe(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!me(this._element,"leaflet-zoom-anim")&&!(bn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bn._dragging=this,this._preventOutline&&Pe(this._element),$e(),te(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t,n=Me(this._element);this._startPoint=new N(e.clientX,e.clientY),this._parentScale=Ae(n),De(document,yn[t.type],this._onMove,this),De(document,vn[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&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 N(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,Fe(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=Ee(this._element).subtract(n),ge(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ge(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,$(this._animRequest),this._lastEvent=t,this._animRequest=E(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ce(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){for(var t in _e(document.body,"leaflet-dragging"),this._lastTarget&&(_e(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),yn)Oe(document,yn[t],this._onMove,this),Oe(document,vn[t],this._onUp,this);ke(),ee(),this._moved&&this._moving&&($(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,bn._dragging=!1}});function xn(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Cn(t=Ln(t,n),n)}function wn(t,e,n){return Math.sqrt(Mn(t,e,n,!0))}function Tn(t,e,n){return Mn(t,e,n)}function Cn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,En(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function En(t,e,n,i,o){var r,s,a,l=0;for(s=i+1;s<=o-1;s++)(a=Mn(t[s],t[i],t[o],!0))>l&&(r=s,l=a);l>n&&(e[r]=1,En(t,e,n,i,r),En(t,e,n,r,o))}function Ln(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)Sn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function $n(t,e,n,i,o){var r,s,a,l=i?mn:Pn(t,n),u=Pn(e,n);for(mn=u;;){if(!(l|u))return[t,e];if(l&u)return!1;a=Pn(s=kn(t,e,r=l||u,n,o),n),r===l?(t=s,l=a):(e=s,u=a)}}function kn(t,e,n,i,o){var r,s,a=e.x-t.x,l=e.y-t.y,u=i.min,c=i.max;return 8&n?(r=t.x+a*(c.y-t.y)/l,s=c.y):4&n?(r=t.x+a*(u.y-t.y)/l,s=u.y):2&n?(r=c.x,s=t.y+l*(c.x-t.x)/a):1&n&&(r=u.x,s=t.y+l*(u.x-t.x)/a),new N(r,s,o)}function Pn(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 Sn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Mn(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,l=n.y-s,u=a*a+l*l;return u>0&&((o=((t.x-r)*a+(t.y-s)*l)/u)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=l*o)),a=t.x-r,l=t.y-s,i?a*a+l*l:new N(r,s)}function An(t){return!_(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Nn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),An(t)}var Dn={simplify:xn,pointToSegmentDistance:wn,closestPointOnSegment:Tn,clipSegment:$n,_getEdgeIntersection:kn,_getBitCode:Pn,_sqClosestPointOnSegment:Mn,isFlat:An,_flat:Nn};function In(t,e,n){var i,o,r,s,a,l,u,c,h,d=[1,4,2,8];for(o=0,u=t.length;o<u;o++)t[o]._code=Pn(t[o],e);for(s=0;s<4;s++){for(c=d[s],i=[],o=0,r=(u=t.length)-1;o<u;r=o++)a=t[o],l=t[r],a._code&c?l._code&c||((h=kn(l,a,c,e,n))._code=Pn(h,e),i.push(h)):(l._code&c&&((h=kn(l,a,c,e,n))._code=Pn(h,e),i.push(h)),i.push(a));t=i}return t}var On={clipPolygon:In},zn={project:function(t){return new N(t.lng,t.lat)},unproject:function(t){return new R(t.y,t.x)},bounds:new O([-180,-90],[180,90])},jn={R:6378137,R_MINOR:6356752.314245179,bounds:new O([-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),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new N(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),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=u=Math.PI/2-2*Math.atan(s*e)-a;return new R(a*n,t.x*n/i)}},Bn={LonLat:zn,Mercator:jn,SphericalMercator:U},Rn=n({},F,{code:"EPSG:3395",projection:jn,transformation:function(){var t=.5/(Math.PI*jn.R);return G(t,.5,-t,.5)}()}),Zn=n({},F,{code:"EPSG:4326",projection:zn,transformation:G(1/180,1,-1/180,.5)}),Hn=n({},q,{projection:zn,transformation:G(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});q.Earth=F,q.EPSG3395=Rn,q.EPSG3857=K,q.EPSG900913=Y,q.EPSG4326=Zn,q.Simple=Hn;var qn=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[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(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.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});en.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(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=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&s(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?_(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(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 Fn=qn.extend({initialize:function(t,e){var n,i;if(f(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!!t&&("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 s(t)}}),Wn=function(t,e){return new Fn(t,e)},Un=Fn.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Fn.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),Fn.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 j;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Vn=function(t,e){return new Un(t,e)},Gn=P.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){f(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),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 $t&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function Kn(t){return new Gn(t)}var Yn=Gn.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 Yn.imagePath||(Yn.imagePath=this._detectIconPath()),(this.options.imagePath||Yn.imagePath)+Gn.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=ce("div","leaflet-default-icon-path",document.body),e=ue(t,"background-image")||ue(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Xn=pn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ge(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&&_e(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=Ee(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=z(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!l.contains(r)){var u=I((Math.max(l.max.x,r.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(i);n.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Ce(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=E(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&&($(this._panRequest),this._panRequest=E(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Ee(e._icon),o=e._map.layerPointToLatLng(i);n&&Ce(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){$(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Qn=qn.extend({options:{icon:new Yn,interactive:!0,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){f(this,e),this._latlng=Z(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=Z(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||"")),ge(n,e),t.keyboard&&(n.tabIndex="0"),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(ge(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}),he(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&he(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Ce(this._icon,t),this._shadow&&Ce(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&&(ge(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Xn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Xn(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&&be(this._icon,t),this._shadow&&be(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Jn(t,e){return new Qn(t,e)}var ti=qn.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 f(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}}),ei=ti.extend({options:{fill:!0,radius:10},initialize:function(t,e){f(this,e),this._latlng=Z(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=Z(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 ti.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 O(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()}});function ni(t,e){return new ei(t,e)}var ii=ei.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),f(this,e),this._latlng=Z(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 j(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ti.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===F.distance){var o=Math.PI/180,r=this._mRadius/F.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),l=s.add(a).divideBy(2),u=n.unproject(l).lat,c=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(u*o))/(Math.cos(e*o)*Math.cos(u*o)))/o;(isNaN(c)||0===c)&&(c=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-n.project([u,t-c]).x,this._radiusY=l.y-s.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()}});function oi(t,e,n){return new ii(t,e,n)}var ri=ti.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){f(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=Mn,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],u=1,c=l.length;u<c;u++){var h=r(t,e=l[u-1],n=l[u],!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()");var t,e,n,i,o,r,s,a=this._rings[0],l=a.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=a[t].distanceTo(a[t+1])/2;if(0===e)return this._map.layerPointToLatLng(a[0]);for(t=0,i=0;t<l-1;t++)if(o=a[t],r=a[t+1],(i+=n=o.distanceTo(r))>e)return s=(i-e)/n,this._map.layerPointToLatLng([r.x-s*(r.x-o.x),r.y-s*(r.y-o.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=Z(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new j,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return An(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=An(t),i=0,o=t.length;i<o;i++)n?(e[i]=Z(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new O;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 N(t,t);this._pxBounds=new O([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)])},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof R,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;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,s,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=$n(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(l[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=xn(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,s,a,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=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&wn(t,a[o],a[i])<=l)return!0;return!1}});function si(t,e){return new ri(t,e)}ri._flat=Nn;var ai=ri.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()");var t,e,n,i,o,r,s,a,l,u=this._rings[0],c=u.length;if(!c)return null;for(r=s=a=0,t=0,e=c-1;t<c;e=t++)n=u[t],i=u[e],o=n.y*i.x-i.y*n.x,s+=(n.x+i.x)*o,a+=(n.y+i.y)*o,r+=3*o;return l=0===r?u[0]:[s/r,a/r],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=ri.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof R&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ri.prototype._setLatLngs.call(this,t),An(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return An(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new N(e,e);if(t=new O(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=In(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,s,a,l,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(l=(e=this._parts[o]).length)-1;r<l;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(u=!u);return u||ri.prototype._containsPoint.call(this,t,!0)}});function li(t,e){return new ai(t,e)}var ui=Un.extend({initialize:function(t,e){f(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=_(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 s=ci(t,r);return s?(s.feature=_i(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},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 ci(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||di;if(!a&&!s)return null;switch(s.type){case"Point":return hi(u,t,n=c(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=c(a[o]),l.push(hi(u,t,n,e));return new Un(l);case"LineString":case"MultiLineString":return i=fi(a,"LineString"===s.type?0:1,c),new ri(i,e);case"Polygon":case"MultiPolygon":return i=fi(a,"Polygon"===s.type?1:2,c),new ai(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=ci({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Un(l);default:throw new Error("Invalid GeoJSON object.")}}function hi(t,e,n,i){return t?t(e,n):new Qn(n,i&&i.markersInheritOptions&&i)}function di(t){return new R(t[1],t[0],t[2])}function fi(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?fi(t[r],e-1,n):(n||di)(t[r]),o.push(i);return o}function pi(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function mi(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?mi(t[r],e-1,n,i):pi(t[r],i));return!e&&n&&o.push(o[0]),o}function gi(t,e){return t.feature?n({},t.feature,{geometry:e}):_i(e)}function _i(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var vi={toGeoJSON:function(t){return gi(this,{type:"Point",coordinates:pi(this.getLatLng(),t)})}};function yi(t,e){return new ui(t,e)}Qn.include(vi),ii.include(vi),ei.include(vi),ri.include({toGeoJSON:function(t){var e=!An(this._latlngs);return gi(this,{type:(e?"Multi":"")+"LineString",coordinates:mi(this._latlngs,e?1:0,!1,t)})}}),ai.include({toGeoJSON:function(t){var e=!An(this._latlngs),n=e&&!An(this._latlngs[0]),i=mi(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),gi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),Fn.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),gi(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=_i(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?gi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var bi=yi,xi=qn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=B(e),f(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ge(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){he(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&&fe(this._image),this},bringToBack:function(){return this._map&&pe(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=B(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:ce("img");ge(e,"leaflet-image-layer"),this._zoomAnimated&&ge(e,"leaflet-zoom-animated"),this.options.className&&ge(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onload=o(this.fire,this,"load"),e.onerror=o(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;Te(this._image,n,e)},_reset:function(){var t=this._image,e=new O(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Ce(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){be(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)}}),wi=function(t,e,n){return new xi(t,e,n)},Ti=xi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:ce("video");if(ge(e,"leaflet-image-layer"),this._zoomAnimated&&ge(e,"leaflet-zoom-animated"),this.options.className&&ge(e,this.options.className),e.onselectstart=u,e.onmousemove=u,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{_(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted;for(var s=0;s<this._url.length;s++){var a=ce("source");a.src=this._url[s],e.appendChild(a)}}}});function Ci(t,e,n){return new Ti(t,e,n)}var Ei=xi.extend({_initImage:function(){var t=this._image=this._url;ge(t,"leaflet-image-layer"),this._zoomAnimated&&ge(t,"leaflet-zoom-animated"),this.options.className&&ge(t,this.options.className),t.onselectstart=u,t.onmousemove=u}});function Li(t,e,n){return new Ei(t,e,n)}var $i=qn.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){f(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&be(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&be(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(be(this._container,0),this._removeTimeout=setTimeout(o(he,void 0,this._container),200)):he(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=Z(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&&fe(this._container),this},bringToBack:function(){return this._map&&pe(this._container),this},_prepareOpen:function(t,e,n){if(e instanceof qn||(n=e,e=t),e instanceof Un)for(var i in t._layers){e=t._layers[i];break}if(!n)if(e.getCenter)n=e.getCenter();else{if(!e.getLatLng)throw new Error("Unable to get source layer LatLng.");n=e.getLatLng()}return this._source=e,this.update(),n},_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?Ce(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]}}),ki=$i.extend({options:{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.openPopup(this),this},onAdd:function(t){$i.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ti||this._source.on("preclick",Ze))},onRemove:function(t){$i.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ti||this._source.off("preclick",Ze))},getEvents:function(){var t=$i.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},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=ce("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=ce("div",t+"-content-wrapper",e);if(this._contentNode=ce("div",t+"-content",n),qe(e),He(this._contentNode),De(e,"contextmenu",Ze),this._tipContainer=ce("div",t+"-tip-container",e),this._tip=ce("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=ce("a",t+"-close-button",e);i.href="#close",i.innerHTML="×",De(i,"click",this._onCloseButtonClick,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",ge(t,r)):_e(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Ce(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var t=this._map,e=parseInt(ue(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new N(this._containerLeft,-n-this._containerBottom);o._add(Ee(this._container));var r=t.layerPointToContainerPoint(o),s=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||s),l=I(this.options.autoPanPaddingBottomRight||s),u=t.getSize(),c=0,h=0;r.x+i+l.x>u.x&&(c=r.x+i-u.x+l.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+n+l.y>u.y&&(h=r.y+n-u.y+l.y),r.y-h-a.y<0&&(h=r.y-a.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),We(t)},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Pi=function(t,e){return new ki(t,e)};en.mergeOptions({closePopupOnClick:!0}),en.include({openPopup:function(t,e,n){return t instanceof ki||(t=new ki(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),qn.include({bindPopup:function(t,e){return t instanceof ki?(f(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new ki(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){return this._popup&&this._map&&(e=this._popup._prepareOpen(this,t,e),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&(We(t),e instanceof ti?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Si=$i.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){$i.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){$i.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=$i.prototype.getEvents.call(this);return Ct&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ce("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,u=o.offsetHeight,c=I(this.options.offset),h=this._getAnchor();"top"===a?(e=l/2,n=u):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=u/2):"right"===a?(e=0,n=u/2):"left"===a?(e=l,n=u/2):s.x<r.x?(a="right",e=0,n=u/2):(a="left",e=l+2*(c.x+h.x),n=u/2),t=t.subtract(I(e,n,!0)).add(c).add(h),_e(o,"leaflet-tooltip-right"),_e(o,"leaflet-tooltip-left"),_e(o,"leaflet-tooltip-top"),_e(o,"leaflet-tooltip-bottom"),ge(o,"leaflet-tooltip-"+a),Ce(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&be(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])}}),Mi=function(t,e){return new Si(t,e)};en.include({openTooltip:function(t,e,n){return t instanceof Si||(t=new Si(n).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),qn.include({bindTooltip:function(t,e){return t instanceof Si?(f(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new Si(e,this)),this._tooltip.setContent(t)),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,this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),Ct&&(n.click=this._openTooltip)),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){return this._tooltip&&this._map&&(e=this._tooltip._prepareOpen(this,t,e),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(ge(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(_e(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,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 Ai=Gn.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?(de(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}});function Ni(t){return new Ai(t)}Gn.Default=Yn;var Di=qn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,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){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),he(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(fe(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(pe(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(){return this._map&&(this._removeAllTiles(),this._update()),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=a(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 N?t:new N(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&&!et){be(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);be(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&($(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this))}},_onOpaqueTile:u,_initContainer:function(){this._container||(this._container=ce("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)):(he(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=ce("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()),u(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:u,_onRemoveLevel:u,_onCreateLevel:u,_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)he(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),s=n-1,a=new N(+o,+r);a.z=+s;var l=this._tileCoordsToKey(a),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),s>i&&this._retainParent(o,r,s,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 s=new N(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];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();vt?Te(t.el,o,i):Ce(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 O(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(),s=[],a=this.options.keepBuffer,l=new O(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));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 u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new N(c.x,c.y))||(this._tiles[u].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 f=new N(d,h);if(f.z=this._tileZoom,this._isValidTile(f)){var p=this._tiles[this._tileCoordsToKey(f)];p?p.current=!0:s.push(f)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[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 B(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 j(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 N(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(he(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ge(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=u,t.onmousemove=u,et&&this.options.opacity<1&&be(t,this.options.opacity),ot&&!rt&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&E(o(this._tileReady,this,t,null,r)),Ce(r,n),this._tiles[i]={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 i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(be(n.el,0),$(this._fadeFrame),this._fadeFrame=E(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(ge(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),et||!this._map._fadeAnimated?E(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new N(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 O(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Ii(t){return new Di(t)}var Oi=Di.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=f(this,e)).detectRetina&&$t&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),ot||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 De(n,"load",o(this._tileOnLoad,this,e,n)),De(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:$t?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return g(this._url,n(e,this.options))},_tileOnLoad:function(t,e){et?setTimeout(o(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)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=u,e.onerror=u,e.complete||(e.src=y,he(e),delete this._tiles[t]))},_removeTile:function(t){var e=this._tiles[t];if(e)return at||e.el.setAttribute("src",y),Di.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==y))return Di.prototype._tileReady.call(this,t,e,n)}});function zi(t,e){return new Oi(t,e)}var ji=Oi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=f(this,e)).detectRetina&&$t?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.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,Oi.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,s=(this._wmsVersion>=1.3&&this._crs===Zn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Oi.prototype.getTileUrl.call(this,t);return a+p(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function Bi(t,e){return new ji(t,e)}Oi.WMS=ji,zi.wms=Bi;var Ri=qn.extend({options:{padding:.1,tolerance:0},initialize:function(t){f(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&ge(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=Ee(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),s=this._map.project(t,e).subtract(r),a=o.multiplyBy(-n).add(i).add(o).subtract(s);vt?Te(this._container,a,n):Ce(this._container,a)},_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 O(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Zi=Ri.extend({getEvents:function(){var t=Ri.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ri.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");De(t,"mousemove",this._onMouseMove,this),De(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),De(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){$(this._redrawRequest),delete this._ctx,he(this._container),Oe(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){Ri.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=$t?2:1;Ce(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",$t&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ri.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(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[s(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||E(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new O,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,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[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);n&&(Ye(t),this._fireEvent([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&&(_e(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,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(ge(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((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 Pt?new Zi(t):null}var qi=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">')}}}(),Fi={_initContainer:function(){this._container=ce("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ri.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=qi("shape");ge(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=qi("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(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;he(e),t.removeInteractiveTarget(e),delete this._layers[s(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=qi("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=_(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=qi("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){fe(t._container)},_bringToBack:function(t){pe(t._container)}},Wi=Mt?qi:X,Ui=Ri.extend({getEvents:function(){var t=Ri.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=Wi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Wi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){he(this._container),Oe(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ri.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)),Ce(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=Wi("path");t.options.className&&ge(e,t.options.className),t.options.interactive&&ge(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){he(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(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){fe(t._path)},_bringToBack:function(t){pe(t._path)}});function Vi(t){return St||Mt?new Ui(t):null}Mt&&Ui.include(Fi),en.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)||Vi(t)}});var Gi=ai.extend({initialize:function(t,e){ai.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=B(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Ki(t,e){return new Gi(t,e)}Ui.create=Wi,Ui.pointsToPath=Q,ui.geometryToLayer=ci,ui.coordsToLatLng=di,ui.coordsToLatLngs=fi,ui.latLngToCoords=pi,ui.latLngsToCoords=mi,ui.getFeature=gi,ui.asFeature=_i,en.mergeOptions({boxZoom:!0});var Yi=pn.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(){De(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Oe(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){he(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(),te(),$e(),this._startPoint=this._map.mouseEventToContainerPoint(t),De(document,{contextmenu:We,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ce("div","leaflet-zoom-box",this._container),ge(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new O(this._point,this._startPoint),n=e.getSize();Ce(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(he(this._box),_e(this._container,"leaflet-crosshair")),ee(),ke(),Oe(document,{contextmenu:We,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(o(this._resetState,this),0);var e=new j(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()}});en.addInitHook("addHandler","boxZoom",Yi),en.mergeOptions({doubleClickZoom:!0});var Xi=pn.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)}});en.addInitHook("addHandler","doubleClickZoom",Xi),en.mergeOptions({dragging:!0,inertia:!rt,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Qi=pn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bn(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))}ge(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){_e(this._map._container,"leaflet-grab"),_e(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=B(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,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||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,s=n.easeLinearity,a=o.multiplyBy(s/r),l=a.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,l),c=a.multiplyBy(u/l),h=u/(n.inertiaDeceleration*s),d=c.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),E((function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});en.addInitHook("addHandler","dragging",Qi),en.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Ji=pn.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"),De(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(),Oe(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(){De(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Oe(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)i._panAnim&&i._panAnim._inProgress||(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.panBy(e),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds));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()}We(t)}}});en.addInitHook("addHandler","keyboard",Ji),en.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var to=pn.extend({addHooks:function(){De(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Oe(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=Ge(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),We(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,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});en.addInitHook("addHandler","scrollWheelZoom",to),en.mergeOptions({tap:!0,tapTolerance:15});var eo=pn.extend({addHooks:function(){De(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Oe(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Fe(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new N(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&ge(n,"leaflet-active"),this._holdTimeout=setTimeout(o((function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))}),this),1e3),this._simulateEvent("mousedown",e),De(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),Oe(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],n=e.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&_e(n,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new N(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var n=document.createEvent("MouseEvents");n._simulated=!0,e.target._simulatedClick=!0,n.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(n)}});!Ct||Tt&&!ht||en.addInitHook("addHandler","tap",eo),en.mergeOptions({touchZoom:Ct&&!rt,bounceAtZoomLimits:!0});var no=pn.extend({addHooks:function(){ge(this._map._container,"leaflet-touch-zoom"),De(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){_e(this._map._container,"leaflet-touch-zoom"),Oe(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(),De(document,"touchmove",this._onTouchMove,this),De(document,"touchend",this._onTouchEnd,this),Fe(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/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 s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),$(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=E(a,this,!0),Fe(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,$(this._animRequest),Oe(document,"touchmove",this._onTouchMove,this),Oe(document,"touchend",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});en.addInitHook("addHandler","touchZoom",no),en.BoxZoom=Yi,en.DoubleClickZoom=Xi,en.Drag=Qi,en.Keyboard=Ji,en.ScrollWheelZoom=to,en.Tap=eo,en.TouchZoom=no,t.version=e,t.Control=on,t.control=rn,t.Browser=Nt,t.Evented=A,t.Mixin=gn,t.Util=k,t.Class=P,t.Handler=pn,t.extend=n,t.bind=o,t.stamp=s,t.setOptions=f,t.DomEvent=Je,t.DomUtil=Ne,t.PosAnimation=tn,t.Draggable=bn,t.LineUtil=Dn,t.PolyUtil=On,t.Point=N,t.point=I,t.Bounds=O,t.bounds=z,t.Transformation=V,t.transformation=G,t.Projection=Bn,t.LatLng=R,t.latLng=Z,t.LatLngBounds=j,t.latLngBounds=B,t.CRS=q,t.GeoJSON=ui,t.geoJSON=yi,t.geoJson=bi,t.Layer=qn,t.LayerGroup=Fn,t.layerGroup=Wn,t.FeatureGroup=Un,t.featureGroup=Vn,t.ImageOverlay=xi,t.imageOverlay=wi,t.VideoOverlay=Ti,t.videoOverlay=Ci,t.SVGOverlay=Ei,t.svgOverlay=Li,t.DivOverlay=$i,t.Popup=ki,t.popup=Pi,t.Tooltip=Si,t.tooltip=Mi,t.Icon=Gn,t.icon=Kn,t.DivIcon=Ai,t.divIcon=Ni,t.Marker=Qn,t.marker=Jn,t.TileLayer=Oi,t.tileLayer=zi,t.GridLayer=Di,t.gridLayer=Ii,t.SVG=Ui,t.svg=Vi,t.Renderer=Ri,t.Canvas=Zi,t.canvas=Hi,t.Path=ti,t.CircleMarker=ei,t.circleMarker=ni,t.Circle=ii,t.circle=oi,t.Polyline=ri,t.polyline=si,t.Polygon=ai,t.polygon=li,t.Rectangle=Gi,t.rectangle=Ki,t.Map=en,t.map=nn;var io=window.L;t.noConflict=function(){return window.L=io,this},window.L=t}(e)}));function Ke(e){let n,i,o,r,s,a,l,u,c,h,d,g,b,w,T,L,$,k,P,S,M,A,N,D,I,O,z,j;return{c(){n=_("div"),i=_("div"),o=v("map center: "),r=v(e[0]),s=y(),a=_("a"),l=v("view on osm.org"),u=y(),c=_("br"),h=v("\n map zoom: "),d=v(e[1]),g=y(),b=_("br"),w=v("\n viewbox: "),T=v(e[2]),L=y(),$=_("br"),k=v("\n last click: "),P=v(e[4]),S=y(),M=_("br"),A=v("\n mouse position: "),N=v(e[5]),D=y(),I=_("div"),O=_("a"),O.textContent="hide",C(a,"target","_blank"),C(a,"href",e[3]),C(i,"id","map-position-inner"),C(O,"href","#hide"),C(I,"id","map-position-close"),C(I,"class","svelte-1b30dq3"),C(n,"id","map-position"),C(n,"class","svelte-1b30dq3")},m(t,e){p(t,n,e),f(n,i),f(i,o),f(i,r),f(i,s),f(i,a),f(a,l),f(i,u),f(i,c),f(i,h),f(i,d),f(i,g),f(i,b),f(i,w),f(i,T),f(i,L),f(i,$),f(i,k),f(i,P),f(i,S),f(i,M),f(i,A),f(i,N),f(n,D),f(n,I),f(I,O),z||(j=x(O,"click",Ye),z=!0)},p(t,[e]){1&e&&E(r,t[0]),8&e&&C(a,"href",t[3]),2&e&&E(d,t[1]),4&e&&E(T,t[2]),16&e&&E(P,t[4]),32&e&&E(N,t[5])},i:t,o:t,d(t){t&&m(n),z=!1,j()}}}function Ye(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"}function Xe(t,e,n){let i,o,r,s,a,l,u;function c(t,e){n(0,o=t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),n(3,a=function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),n(1,r=t.getZoom()),n(2,s=function(t){var e=t.getBounds(),n=e.getWest(),i=e.getEast();return i-n>=360&&(n=t.getCenter().lng-179.999,i=t.getCenter().lng+179.999),i=L.latLng(77,i).wrap().lng,[(n=L.latLng(77,n).wrap().lng).toFixed(5),e.getNorth().toFixed(5),i.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),n(5,u="-"),e&&n(5,u=[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&n(4,l=[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}return ct.subscribe((t=>{t&&(t.on("move",(function(){c(t)})),t.on("mousemove",(function(e){c(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,c(t)})),t.on("load",(function(){c(t)})))})),[o,r,s,a,l,u]}st((function(t,e){!function(e,n){t.exports=e(Ge),void 0!==n&&n.L&&(n.L.Control.MiniMap=e(L),n.L.control.minimap=function(t,e){return new n.L.Control.MiniMap(t,e)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,n){t.Util.setOptions(this,n),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var n={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return n=t.Util.extend(this.options.mapOptions,n),this._miniMap=new t.Map(this._container,n),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var n=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(n,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,n,i,o,r,s){var a=t.DomUtil.create("a",i,o);a.innerHTML=e,a.href="#",a.title=n;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",r,s),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),n=this._miniMap.latLngToContainerPoint(e.getSouthWest()),i=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:n,ne:i}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,n=this._miniMap.getZoom()-this._mainMap.getZoom(),i=this._miniMap.getZoom()-this.options.zoomLevelOffset;return n>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=i,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window)}));class Qe extends ot{constructor(t){super(),it(this,t,Xe,Ke,s,{})}}function Je(e){let n,i,s,a,l,u,c,h;return n=new Qe({}),{c(){J(n.$$.fragment),i=y(),s=_("div"),a=y(),l=_("div"),l.textContent="show map bounds",C(s,"id","map"),C(s,"class","svelte-1vbvdrk"),C(l,"id","show-map-position"),C(l,"class","leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk")},m(o,d){var f;tt(n,o,d),p(o,i,d),p(o,s,d),p(o,a,d),p(o,l,d),u=!0,c||(h=[(f=e[0].call(null,s),f&&r(f.destroy)?f.destroy:t),x(l,"click",T(tn))],c=!0)},p:t,i(t){u||(Y(n.$$.fragment,t),u=!0)},o(t){X(n.$$.fragment,t),u=!1},d(t){et(n,t),t&&m(i),t&&m(s),t&&m(a),t&&m(l),c=!1,o(h)}}}function tn(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}function en(t,e,n){let{display_minimap:i=!1}=e,{current_result:o=null}=e,{position_marker:r=null}=e,s=[];function a(t){let e=l(ct);if(!e)return;if(function(){let t=l(ct);t&&s.forEach((function(e){t.removeLayer(e)}))}(),r){let t=Ge.circleMarker(r,{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.addTo(e),s.push(t)}var n=new URLSearchParams(window.location.search).get("viewbox");if(n){let t=n.split(","),i=Ge.latLngBounds([t[1],t[0]],[t[3],t[2]]);Ge.rectangle(i,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1}).addTo(e)}if(!t)return;let i=t.centroid?t.centroid.coordinates[1]:t.lat,o=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(i&&o){let t=Ge.circleMarker([i,o],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});e.addLayer(t),s.push(t)}if(a){var u=Ge.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(u),s.push(u),e.fitBounds(u.getBounds())}else i&&o&&r?e.fitBounds([[i,o],r],{padding:[50,50]}):i&&o&&e.setView([i,o],10)}return t.$$set=t=>{"display_minimap"in t&&n(1,i=t.display_minimap),"current_result"in t&&n(2,o=t.current_result),"position_marker"in t&&n(3,r=t.position_marker)},t.$$.update=()=>{4&t.$$.dirty&&a(o)},[function(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new Ge.map(t,{attributionControl:e&&e.length,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(Ge.tileLayer(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i){let t=new Ge.TileLayer(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new Ge.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=Ge.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return ct.set(e),a(o),{destroy:()=>{ct.set(null),e.remove()}}},i,o,r]}class nn extends ot{constructor(t){super(),it(this,t,en,Je,s,{display_minimap:1,current_result:2,position_marker:3})}}function on(t){let e,n;return e=new he({props:{api_request_params:t[0],bStructuredSearch:t[2]}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.api_request_params=t[0]),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function rn(t){let e,n,i,o,r,s,a,l,u,c;function h(e){t[4](e)}e=new te({props:{$$slots:{default:[on]},$$scope:{ctx:t}}});let d={reverse_search:!1};return void 0!==t[1]&&(d.current_result=t[1]),r=new Ve({props:d}),I.push((()=>Q(r,"current_result",h))),u=new nn({props:{current_result:t[1],display_minimap:!0}}),{c(){J(e.$$.fragment),n=y(),i=_("div"),o=_("div"),J(r.$$.fragment),a=y(),l=_("div"),J(u.$$.fragment),C(o,"class","sidebar svelte-1d53ob0"),C(l,"id","map-wrapper"),C(l,"class","svelte-1d53ob0"),C(i,"id","content"),C(i,"class","svelte-1d53ob0")},m(t,s){tt(e,t,s),p(t,n,s),p(t,i,s),f(i,o),tt(r,o,null),f(i,a),f(i,l),tt(u,l,null),c=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!s&&2&n&&(s=!0,o.current_result=t[1],Z((()=>s=!1))),r.$set(o);const a={};2&n&&(a.current_result=t[1]),u.$set(a)},i(t){c||(Y(e.$$.fragment,t),Y(r.$$.fragment,t),Y(u.$$.fragment,t),c=!0)},o(t){X(e.$$.fragment,t),X(r.$$.fragment,t),X(u.$$.fragment,t),c=!1},d(t){et(e,t),t&&m(n),t&&m(i),et(r),et(u)}}}function sn(t,e,n){let i,o,r;return u(t,pt,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"search"===t.tab&&function(t){Tt(),n(0,o={q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.get("dedupe"),"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=o.street||o.city||o.county||o.state||o.country||o.postalcode;o.q||e?bt("search",o,(function(t){ht.set(t),Tt("Result for "+o.q),document.querySelector("input[name=q]").focus()})):ht.set(void 0)}(t.params)}},[o,r,undefined,i,function(t){r=t,n(1,r)}]}class an extends ot{constructor(t){super(),it(this,t,sn,rn,s,{})}}function ln(t,e,n){const i=t.slice();return i[8]=e[n],i[10]=n,i}function un(e){let n,i,o,r,s=e[8]+"";return{c(){n=_("option"),i=v(e[10]),o=v(" - "),r=v(s),n.__value=e[10],n.value=n.__value},m(t,e){p(t,n,e),f(n,i),f(n,o),f(n,r)},p:t,d(t){t&&m(n)}}}function cn(t){let e,n,i,r,s,a,l,u,c,h,d,v,b,E,L,P,S,M,A,N,D,I,O=Ee(),z=[];for(let e=0;e<O.length;e+=1)z[e]=un(ln(t,O,e));return{c(){e=_("div"),n=_("label"),n.textContent="lat",i=y(),r=_("input"),s=y(),a=_("div"),l=_("a"),l.textContent="<>",u=y(),c=_("div"),h=_("label"),h.textContent="lon",d=y(),v=_("input"),b=y(),E=_("div"),L=_("label"),L.textContent="max zoom",P=y(),S=_("select"),M=_("option"),M.textContent="---";for(let t=0;t<z.length;t+=1)z[t].c();A=y(),N=_("div"),N.innerHTML='<button type="submit" class="btn btn-primary btn-sm mx-1">Search</button>',C(n,"for","reverse-lat"),C(n,"class","svelte-1z124cx"),C(r,"id","reverse-lat"),C(r,"name","lat"),C(r,"type","text"),C(r,"class","form-control form-control-sm svelte-1z124cx"),C(r,"placeholder","latitude"),C(e,"class","form-group"),C(l,"id","switch-coords"),C(l,"class","btn btn-outline-secondary btn-sm svelte-1z124cx"),C(l,"title","switch lat and lon"),C(a,"class","form-group"),C(h,"for","reverse-lon"),C(h,"class","svelte-1z124cx"),C(v,"id","reverse-lon"),C(v,"name","lon"),C(v,"type","text"),C(v,"class","form-control form-control-sm svelte-1z124cx"),C(v,"placeholder","longitude"),C(c,"class","form-group"),C(L,"for","reverse-zoom"),C(L,"class","svelte-1z124cx"),M.__value="",M.value=M.__value,C(S,"id","reverse-zoom"),C(S,"name","zoom"),C(S,"class","form-control form-control-sm svelte-1z124cx"),void 0===t[2]&&R((()=>t[7].call(S))),C(E,"class","form-group"),C(N,"class","form-group")},m(o,m){p(o,e,m),f(e,n),f(e,i),f(e,r),$(r,t[0]),p(o,s,m),p(o,a,m),f(a,l),p(o,u,m),p(o,c,m),f(c,h),f(c,d),f(c,v),$(v,t[1]),p(o,b,m),p(o,E,m),f(E,L),f(E,P),f(E,S),f(S,M);for(let t=0;t<z.length;t+=1)z[t].m(S,null);k(S,t[2]),p(o,A,m),p(o,N,m),D||(I=[x(r,"input",t[4]),x(r,"change",dn),x(l,"click",T(w(t[5]))),x(v,"input",t[6]),x(S,"change",t[7])],D=!0)},p(t,e){if(1&e&&r.value!==t[0]&&$(r,t[0]),2&e&&v.value!==t[1]&&$(v,t[1]),0&e){let n;for(O=Ee(),n=0;n<O.length;n+=1){const i=ln(t,O,n);z[n]?z[n].p(i,e):(z[n]=un(i),z[n].c(),z[n].m(S,null))}for(;n<z.length;n+=1)z[n].d(1);z.length=O.length}4&e&&k(S,t[2])},d(t){t&&m(e),t&&m(s),t&&m(a),t&&m(u),t&&m(c),t&&m(b),t&&m(E),g(z,t),t&&m(A),t&&m(N),D=!1,o(I)}}}function hn(t){let e,n;return e=new ie({props:{page:"reverse",$$slots:{default:[cn]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,[n]){const i={};2055&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function dn(t){var e=t.target.value.split(",");2===e.length&&(document.querySelector("input[name=lat]").value=L.Util.trim(e[0]),document.querySelector("input[name=lon]").value=L.Util.trim(e[1]))}function fn(t,e,n){let{lat:i=""}=e,{lon:o=""}=e,{zoom:r=""}=e;function s(t,e,n){let i=new URLSearchParams;i.set("lat",t),i.set("lon",e),i.set("zoom",n||r),gt("reverse",i)}ct.subscribe((t=>{t&&t.on("click",(t=>{let e=t.latlng.wrap();s(e.lat.toFixed(5),e.lng.toFixed(5))}))}));return t.$$set=t=>{"lat"in t&&n(0,i=t.lat),"lon"in t&&n(1,o=t.lon),"zoom"in t&&n(2,r=t.zoom)},[i,o,r,s,function(){i=this.value,n(0,i)},()=>s(o,i),function(){o=this.value,n(1,o)},function(){r=function(t){const e=t.querySelector(":checked")||t.options[0];return e&&e.__value}(this),n(2,r)}]}class pn extends ot{constructor(t){super(),it(this,t,fn,hn,s,{lat:0,lon:1,zoom:2})}}function mn(t){let n,i;const o=[t[0]];let r={};for(let t=0;t<o.length;t+=1)r=e(r,o[t]);return n=new pn({props:r}),{c(){J(n.$$.fragment)},m(t,e){tt(n,t,e),i=!0},p(t,e){const i=1&e?function(t,e){const n={},i={},o={$$scope:1};let r=t.length;for(;r--;){const s=t[r],a=e[r];if(a){for(const t in s)t in a||(i[t]=1);for(const t in a)o[t]||(n[t]=a[t],o[t]=1);t[r]=a}else for(const t in s)o[t]=1}for(const t in i)t in n||(n[t]=void 0);return n}(o,[(r=t[0],"object"==typeof r&&null!==r?r:{})]):{};var r;n.$set(i)},i(t){i||(Y(n.$$.fragment,t),i=!0)},o(t){X(n.$$.fragment,t),i=!1},d(t){et(n,t)}}}function gn(t){let e,n,i,o,r,s,a,l,u,c;function h(e){t[4](e)}e=new te({props:{$$slots:{default:[mn]},$$scope:{ctx:t}}});let d={reverse_search:!0};return void 0!==t[1]&&(d.current_result=t[1]),r=new Ve({props:d}),I.push((()=>Q(r,"current_result",h))),u=new nn({props:{current_result:t[1],position_marker:t[2],display_minimap:!0}}),{c(){J(e.$$.fragment),n=y(),i=_("div"),o=_("div"),J(r.$$.fragment),a=y(),l=_("div"),J(u.$$.fragment),C(o,"class","sidebar svelte-1d53ob0"),C(l,"id","map-wrapper"),C(l,"class","svelte-1d53ob0"),C(i,"id","content"),C(i,"class","svelte-1d53ob0")},m(t,s){tt(e,t,s),p(t,n,s),p(t,i,s),f(i,o),tt(r,o,null),f(i,a),f(i,l),tt(u,l,null),c=!0},p(t,[n]){const i={};65&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i);const o={};!s&&2&n&&(s=!0,o.current_result=t[1],Z((()=>s=!1))),r.$set(o);const a={};2&n&&(a.current_result=t[1]),4&n&&(a.position_marker=t[2]),u.$set(a)},i(t){c||(Y(e.$$.fragment,t),Y(r.$$.fragment,t),Y(u.$$.fragment,t),c=!0)},o(t){X(e.$$.fragment,t),X(r.$$.fragment,t),X(u.$$.fragment,t),c=!1},d(t){et(e,t),t&&m(n),t&&m(i),et(r),et(u)}}}function _n(t,e,n){let i,o,r,s;return u(t,pt,(t=>n(3,i=t))),t.$$.update=()=>{if(8&t.$$.dirty){let t=i;"reverse"===t.tab&&(e=t.params,Tt(),n(0,o={lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),format:"jsonv2"}),o.lat||o.lat?bt("reverse",o,(function(t){t&&!t.error?(n(2,s=[o.lat,o.lon]),ht.set([t])):ht.set([]),Tt("Reverse result for "+o.lat+","+o.lon),document.querySelector("input[name=lat]").focus()})):ht.set(void 0))}var e},[o,r,s,i,function(t){r=t,n(1,r)}]}class vn extends ot{constructor(t){super(),it(this,t,_n,gn,s,{})}}function yn(e){let n,i,o,r,s,a,l,u,c;return{c(){n=_("form"),i=_("input"),r=y(),s=_("button"),s.textContent="Show",a=y(),l=_("small"),l.innerHTML='OSM type+id (<em class="svelte-1kvo9ki">N123</em>, <em class="svelte-1kvo9ki">W123</em>, <em class="svelte-1kvo9ki">R123</em>),\n Place id (<em class="svelte-1kvo9ki">1234</em>) or\n URL (<em class="svelte-1kvo9ki">https://openstreetmap.org/way/123</em>)',C(i,"type","edit"),C(i,"class","form-control form-control-sm mr-1 svelte-1kvo9ki"),C(i,"pattern","^[NWR]?[0-9]+$|.*openstreetmap.*"),i.value=o=""+((e[0].osmtype||"")+(e[0].osmid||"")+(e[0].place_id||"")),C(s,"type","submit"),C(s,"class","btn btn-primary btn-sm"),C(n,"class","form-inline svelte-1kvo9ki"),C(n,"action","details.html"),C(l,"class","form-text text-muted svelte-1kvo9ki")},m(t,o){p(t,n,o),f(n,i),f(n,r),f(n,s),p(t,a,o),p(t,l,o),u||(c=x(n,"submit",w(e[1])),u=!0)},p(t,[e]){1&e&&o!==(o=""+((t[0].osmtype||"")+(t[0].osmid||"")+(t[0].place_id||"")))&&(i.value=o)},i:t,o:t,d(t){t&&m(n),t&&m(a),t&&m(l),u=!1,c()}}}function bn(t,e,n){let{api_request_params:i={}}=e;return t.$$set=t=>{"api_request_params"in t&&n(0,i=t.api_request_params)},[i,function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),n=e.match(/^\s*([NWR])(\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(\d+)\s*$/);var i=new URLSearchParams;if(n)i.set("osmtype",n[1].charAt(0).toUpperCase()),i.set("osmid",n[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");i.set("place_id",e)}gt("details",i)}]}class xn extends ot{constructor(t){super(),it(this,t,bn,yn,s,{api_request_params:0})}}function wn(e){let n;return{c(){n=_("span"),n.textContent="No Name",C(n,"class","noname svelte-bio7jk")},m(t,e){p(t,n,e)},p:t,d(t){t&&m(n)}}}function Tn(t){let e,n=t[0].localname+"";return{c(){e=v(n)},m(t,n){p(t,e,n)},p(t,i){1&i&&n!==(n=t[0].localname+"")&&E(e,n)},d(t){t&&m(e)}}}function Cn(t){let e,n;return e=new Lt({props:{page:"search",params_hash:{postalcode:t[0].localname},$$slots:{default:[$n]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={postalcode:t[0].localname}),16&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function En(t){let e,n;return e=new Lt({props:{page:"search",params_hash:{country:t[0].localname},$$slots:{default:[kn]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.params_hash={country:t[0].localname}),16&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function Ln(t){let e,n;return e=new Pe({props:{feature:t[0],$$slots:{default:[Pn]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.feature=t[0]),16&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function $n(t){let e;return{c(){e=v("search by name")},m(t,n){p(t,e,n)},d(t){t&&m(e)}}}function kn(t){let e;return{c(){e=v("search by name")},m(t,n){p(t,e,n)},d(t){t&&m(e)}}}function Pn(t){let e;return{c(){e=v("details")},m(t,n){p(t,e,n)},d(t){t&&m(e)}}}function Sn(t){let e,n,i,o,r,s,a,l,u,c,h,d,g,b,x,w,T,L,$,k,S,M=xe(t[0])+"",A=me(t[0])+"",N=t[0].rank_address+"",D=we(t[0].admin_level)+"",I=Te(t[0].distance,t[1])+"";function O(t,e){return t[0].localname?Tn:wn}let z=O(t),j=z(t);const B=[Ln,En,Cn],R=[];function Z(t,e){return t[0].osm_id?0:(1&e&&(L=!!t[0].type.match(/^country/)),L?1:"postcode"===t[0].type?2:-1)}return~($=Z(t,-1))&&(k=R[$]=B[$](t)),{c(){e=_("tr"),n=_("td"),j.c(),i=y(),o=_("td"),r=v(M),s=y(),a=_("td"),l=y(),u=_("td"),c=v(N),h=y(),d=_("td"),g=v(D),b=y(),x=_("td"),w=y(),T=_("td"),k&&k.c(),C(n,"class","name font-weight-bold svelte-bio7jk"),C(o,"class","svelte-bio7jk"),C(a,"class","svelte-bio7jk"),C(u,"class","svelte-bio7jk"),C(d,"class","svelte-bio7jk"),C(x,"class","svelte-bio7jk"),C(T,"class","svelte-bio7jk"),C(e,"class","svelte-bio7jk"),P(e,"notused",t[2]&&!t[3])},m(t,m){p(t,e,m),f(e,n),j.m(n,null),f(e,i),f(e,o),f(o,r),f(e,s),f(e,a),a.innerHTML=A,f(e,l),f(e,u),f(u,c),f(e,h),f(e,d),f(d,g),f(e,b),f(e,x),x.innerHTML=I,f(e,w),f(e,T),~$&&R[$].m(T,null),S=!0},p(t,[i]){z===(z=O(t))&&j?j.p(t,i):(j.d(1),j=z(t),j&&(j.c(),j.m(n,null))),(!S||1&i)&&M!==(M=xe(t[0])+"")&&E(r,M),(!S||1&i)&&A!==(A=me(t[0])+"")&&(a.innerHTML=A),(!S||1&i)&&N!==(N=t[0].rank_address+"")&&E(c,N),(!S||1&i)&&D!==(D=we(t[0].admin_level)+"")&&E(g,D),(!S||3&i)&&I!==(I=Te(t[0].distance,t[1])+"")&&(x.innerHTML=I);let o=$;$=Z(t,i),$===o?~$&&R[$].p(t,i):(k&&(G(),X(R[o],1,1,(()=>{R[o]=null})),K()),~$?(k=R[$],k?k.p(t,i):(k=R[$]=B[$](t),k.c()),Y(k,1),k.m(T,null)):k=null),12&i&&P(e,"notused",t[2]&&!t[3])},i(t){S||(Y(k),S=!0)},o(t){X(k),S=!1},d(t){t&&m(e),j.d(),~$&&R[$].d()}}}function Mn(t,e,n){let i,{addressLine:o}=e,{bDistanceInMeters:r}=e,{bMarkUnusedLines:s=!1}=e;return t.$$set=t=>{"addressLine"in t&&n(0,o=t.addressLine),"bDistanceInMeters"in t&&n(1,r=t.bDistanceInMeters),"bMarkUnusedLines"in t&&n(2,s=t.bMarkUnusedLines)},t.$$.update=()=>{1&t.$$.dirty&&n(3,i=o.isaddress)},[o,r,s,i]}class An extends ot{constructor(t){super(),it(this,t,Mn,Sn,s,{addressLine:0,bDistanceInMeters:1,bMarkUnusedLines:2})}}function Nn(t){let e,n,i,o,r,s;const a=t[2].default,l=c(a,t,t[1],null);return{c(){e=_("tr"),n=_("td"),i=v(t[0]),o=y(),r=_("td"),l&&l.c(),C(n,"class","svelte-1184nr4"),C(r,"class","svelte-1184nr4")},m(t,a){p(t,e,a),f(e,n),f(n,i),f(e,o),f(e,r),l&&l.m(r,null),s=!0},p(t,[e]){(!s||1&e)&&E(i,t[0]),l&&l.p&&2&e&&d(l,a,t,t[1],e,null,null)},i(t){s||(Y(l,t),s=!0)},o(t){X(l,t),s=!1},d(t){t&&m(e),l&&l.d(t)}}}function Dn(t,e,n){let{$$slots:i={},$$scope:o}=e,{title:r}=e;return t.$$set=t=>{"title"in t&&n(0,r=t.title),"$$scope"in t&&n(1,o=t.$$scope)},[r,o,i]}class In extends ot{constructor(t){super(),it(this,t,Dn,Nn,s,{title:0})}}function On(t,e,n){const i=t.slice();return i[1]=e[n],i}function zn(t){let e,n,i,o,r,s,a=t[0][t[1]]+"",l=t[1]+"";return{c(){e=_("div"),n=_("span"),i=v(a),o=v(" ("),r=v(l),s=v(")\n "),C(n,"class","name svelte-ndknvb"),C(e,"class","line")},m(t,a){p(t,e,a),f(e,n),f(n,i),f(e,o),f(e,r),f(e,s)},p(t,e){1&e&&a!==(a=t[0][t[1]]+"")&&E(i,a),1&e&&l!==(l=t[1]+"")&&E(r,l)},d(t){t&&m(e)}}}function jn(e){let n,i=Object.keys(e[0]),o=[];for(let t=0;t<i.length;t+=1)o[t]=zn(On(e,i,t));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();n=b()},m(t,e){for(let n=0;n<o.length;n+=1)o[n].m(t,e);p(t,n,e)},p(t,[e]){if(1&e){let r;for(i=Object.keys(t[0]),r=0;r<i.length;r+=1){const s=On(t,i,r);o[r]?o[r].p(s,e):(o[r]=zn(s),o[r].c(),o[r].m(n.parentNode,n))}for(;r<o.length;r+=1)o[r].d(1);o.length=i.length}},i:t,o:t,d(t){g(o,t),t&&m(n)}}}function Bn(t,e,n){let{items:i}=e;return t.$$set=t=>{"items"in t&&n(0,i=t.items)},[i]}class Rn extends ot{constructor(t){super(),it(this,t,Bn,jn,s,{items:0})}}function Zn(t,e,n){const i=t.slice();return i[6]=e[n],i}function Hn(t,e,n){const i=t.slice();return i[9]=e[n],i}function qn(t,e,n){const i=t.slice();return i[12]=e[n],i}function Fn(t,e,n){const i=t.slice();return i[12]=e[n],i}function Wn(t,e,n){const i=t.slice();return i[17]=e[n],i}function Un(t,e,n){const i=t.slice();return i[17]=e[n],i}function Vn(t){let e,n;return e=new xn({props:{api_request_params:t[2]}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};4&n&&(i.api_request_params=t[2]),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function Gn(e){let n;return{c(){n=v("No such place found.")},m(t,e){p(t,n,e)},p:t,i:t,o:t,d(t){t&&m(n)}}}function Kn(t){let e,n,i,o,r,s,a,l,u,c,h,d,g,b,x,w,T,L,$,k,P,S,M,A,N,D,I,O,z,j,B,R,Z,H,q,F,W,U,V,Q,nt,it,ot,rt,st,at,lt,ut,ct,ht,dt,ft,pt,mt,gt,_t,vt,yt,bt,xt,wt,Tt,Ct,Et,Lt=t[0].localname+"",$t=ye(t[0]);a=new Pe({props:{feature:t[0],$$slots:{default:[Yn]},$$scope:{ctx:t}}}),c=new Ie({props:{aPlace:t[0]}}),w=new In({props:{title:"Name",$$slots:{default:[Xn]},$$scope:{ctx:t}}}),L=new In({props:{title:"Type",$$slots:{default:[Qn]},$$scope:{ctx:t}}}),k=new In({props:{title:"Last Updated",$$slots:{default:[Jn]},$$scope:{ctx:t}}});let kt=$t&&ti(t);M=new In({props:{title:"Search Rank",$$slots:{default:[ni]},$$scope:{ctx:t}}}),N=new In({props:{title:"Address Rank",$$slots:{default:[ii]},$$scope:{ctx:t}}});let Pt=t[0].calculated_importance&&oi(t);O=new In({props:{title:"Coverage",$$slots:{default:[ai]},$$scope:{ctx:t}}}),j=new In({props:{title:"Centre Point (lat,lon)",$$slots:{default:[li]},$$scope:{ctx:t}}}),R=new In({props:{title:"OSM",$$slots:{default:[ui]},$$scope:{ctx:t}}}),H=new In({props:{title:"Place Id",$$slots:{default:[ci]},$$scope:{ctx:t}}});let St=t[0].calculated_wikipedia&&hi(t);W=new In({props:{title:"Computed Postcode",$$slots:{default:[fi]},$$scope:{ctx:t}}}),V=new In({props:{title:"Address Tags",$$slots:{default:[pi]},$$scope:{ctx:t}}}),nt=new In({props:{title:"Extra Tags",$$slots:{default:[mi]},$$scope:{ctx:t}}}),st=new nn({props:{current_result:t[0]}});let Mt=t[0].address&&gi(t),At=t[0].linked_places&&vi(t);function Nt(t,e){return t[0].keywords?xi:bi}let Dt=Nt(t),It=Dt(t);const Ot=[ki,$i],zt=[];function jt(t,e){return t[0].hierarchy?0:1}return Tt=jt(t),Ct=zt[Tt]=Ot[Tt](t),{c(){e=_("div"),n=_("div"),i=_("h1"),o=v(Lt),r=y(),s=_("small"),J(a.$$.fragment),l=y(),u=_("div"),J(c.$$.fragment),h=y(),d=_("div"),g=_("div"),b=_("table"),x=_("tbody"),J(w.$$.fragment),T=y(),J(L.$$.fragment),$=y(),J(k.$$.fragment),P=y(),kt&&kt.c(),S=y(),J(M.$$.fragment),A=y(),J(N.$$.fragment),D=y(),Pt&&Pt.c(),I=y(),J(O.$$.fragment),z=y(),J(j.$$.fragment),B=y(),J(R.$$.fragment),Z=y(),J(H.$$.fragment),q=y(),St&&St.c(),F=y(),J(W.$$.fragment),U=y(),J(V.$$.fragment),Q=y(),J(nt.$$.fragment),it=y(),ot=_("div"),rt=_("div"),J(st.$$.fragment),at=y(),lt=_("div"),ut=_("div"),ct=_("h2"),ct.textContent="Address",ht=y(),dt=_("table"),ft=_("thead"),ft.innerHTML="<tr><th>Local name</th> \n <th>Type</th> \n <th>OSM</th> \n <th>Address rank</th> \n <th>Admin level</th> \n <th>Distance</th> \n <th></th></tr>",pt=y(),mt=_("tbody"),Mt&&Mt.c(),gt=y(),At&&At.c(),_t=y(),vt=_("tr"),vt.innerHTML='<td colspan="6" class="svelte-mfbmpl"><h2 class="svelte-mfbmpl">Keywords</h2></td>',yt=y(),It.c(),bt=y(),xt=_("tr"),xt.innerHTML='<td colspan="6" class="svelte-mfbmpl"><h2 class="svelte-mfbmpl">Parent Of</h2></td>',wt=y(),Ct.c(),C(s,"class","svelte-mfbmpl"),C(i,"class","svelte-mfbmpl"),C(n,"class","col-sm-10"),C(u,"class","col-sm-2 text-right"),C(e,"class","row"),C(b,"id","locationdetails"),C(b,"class","table table-striped table-responsive"),C(g,"class","col-md-6"),C(rt,"id","map-wrapper"),C(rt,"class","svelte-mfbmpl"),C(ot,"class","col-md-6"),C(d,"class","row"),C(ct,"class","svelte-mfbmpl"),C(vt,"class","all-columns svelte-mfbmpl"),C(xt,"class","all-columns svelte-mfbmpl"),C(dt,"id","address"),C(dt,"class","table table-striped table-small"),C(ut,"class","col-md-12"),C(lt,"class","row")},m(t,m){p(t,e,m),f(e,n),f(n,i),f(i,o),f(i,r),f(i,s),tt(a,s,null),f(e,l),f(e,u),tt(c,u,null),p(t,h,m),p(t,d,m),f(d,g),f(g,b),f(b,x),tt(w,x,null),f(x,T),tt(L,x,null),f(x,$),tt(k,x,null),f(x,P),kt&&kt.m(x,null),f(x,S),tt(M,x,null),f(x,A),tt(N,x,null),f(x,D),Pt&&Pt.m(x,null),f(x,I),tt(O,x,null),f(x,z),tt(j,x,null),f(x,B),tt(R,x,null),f(x,Z),tt(H,x,null),f(x,q),St&&St.m(x,null),f(x,F),tt(W,x,null),f(x,U),tt(V,x,null),f(x,Q),tt(nt,x,null),f(d,it),f(d,ot),f(ot,rt),tt(st,rt,null),p(t,at,m),p(t,lt,m),f(lt,ut),f(ut,ct),f(ut,ht),f(ut,dt),f(dt,ft),f(dt,pt),f(dt,mt),Mt&&Mt.m(mt,null),f(mt,gt),At&&At.m(mt,null),f(mt,_t),f(mt,vt),f(mt,yt),It.m(mt,null),f(mt,bt),f(mt,xt),f(mt,wt),zt[Tt].m(mt,null),Et=!0},p(t,e){(!Et||1&e)&&Lt!==(Lt=t[0].localname+"")&&E(o,Lt);const n={};1&e&&(n.feature=t[0]),4194304&e&&(n.$$scope={dirty:e,ctx:t}),a.$set(n);const i={};1&e&&(i.aPlace=t[0]),c.$set(i);const r={};4194305&e&&(r.$$scope={dirty:e,ctx:t}),w.$set(r);const s={};4194305&e&&(s.$$scope={dirty:e,ctx:t}),L.$set(s);const l={};4194305&e&&(l.$$scope={dirty:e,ctx:t}),k.$set(l),1&e&&($t=ye(t[0])),$t?kt?(kt.p(t,e),1&e&&Y(kt,1)):(kt=ti(t),kt.c(),Y(kt,1),kt.m(x,S)):kt&&(G(),X(kt,1,1,(()=>{kt=null})),K());const u={};4194305&e&&(u.$$scope={dirty:e,ctx:t}),M.$set(u);const h={};4194305&e&&(h.$$scope={dirty:e,ctx:t}),N.$set(h),t[0].calculated_importance?Pt?(Pt.p(t,e),1&e&&Y(Pt,1)):(Pt=oi(t),Pt.c(),Y(Pt,1),Pt.m(x,I)):Pt&&(G(),X(Pt,1,1,(()=>{Pt=null})),K());const d={};4194305&e&&(d.$$scope={dirty:e,ctx:t}),O.$set(d);const f={};4194305&e&&(f.$$scope={dirty:e,ctx:t}),j.$set(f);const p={};4194305&e&&(p.$$scope={dirty:e,ctx:t}),R.$set(p);const m={};4194305&e&&(m.$$scope={dirty:e,ctx:t}),H.$set(m),t[0].calculated_wikipedia?St?(St.p(t,e),1&e&&Y(St,1)):(St=hi(t),St.c(),Y(St,1),St.m(x,F)):St&&(G(),X(St,1,1,(()=>{St=null})),K());const g={};4194305&e&&(g.$$scope={dirty:e,ctx:t}),W.$set(g);const _={};4194305&e&&(_.$$scope={dirty:e,ctx:t}),V.$set(_);const v={};4194305&e&&(v.$$scope={dirty:e,ctx:t}),nt.$set(v);const y={};1&e&&(y.current_result=t[0]),st.$set(y),t[0].address?Mt?(Mt.p(t,e),1&e&&Y(Mt,1)):(Mt=gi(t),Mt.c(),Y(Mt,1),Mt.m(mt,gt)):Mt&&(G(),X(Mt,1,1,(()=>{Mt=null})),K()),t[0].linked_places?At?(At.p(t,e),1&e&&Y(At,1)):(At=vi(t),At.c(),Y(At,1),At.m(mt,_t)):At&&(G(),X(At,1,1,(()=>{At=null})),K()),Dt===(Dt=Nt(t))&&It?It.p(t,e):(It.d(1),It=Dt(t),It&&(It.c(),It.m(mt,bt)));let b=Tt;Tt=jt(t),Tt===b?zt[Tt].p(t,e):(G(),X(zt[b],1,1,(()=>{zt[b]=null})),K(),Ct=zt[Tt],Ct?Ct.p(t,e):(Ct=zt[Tt]=Ot[Tt](t),Ct.c()),Y(Ct,1),Ct.m(mt,null))},i(t){Et||(Y(a.$$.fragment,t),Y(c.$$.fragment,t),Y(w.$$.fragment,t),Y(L.$$.fragment,t),Y(k.$$.fragment,t),Y(kt),Y(M.$$.fragment,t),Y(N.$$.fragment,t),Y(Pt),Y(O.$$.fragment,t),Y(j.$$.fragment,t),Y(R.$$.fragment,t),Y(H.$$.fragment,t),Y(St),Y(W.$$.fragment,t),Y(V.$$.fragment,t),Y(nt.$$.fragment,t),Y(st.$$.fragment,t),Y(Mt),Y(At),Y(Ct),Et=!0)},o(t){X(a.$$.fragment,t),X(c.$$.fragment,t),X(w.$$.fragment,t),X(L.$$.fragment,t),X(k.$$.fragment,t),X(kt),X(M.$$.fragment,t),X(N.$$.fragment,t),X(Pt),X(O.$$.fragment,t),X(j.$$.fragment,t),X(R.$$.fragment,t),X(H.$$.fragment,t),X(St),X(W.$$.fragment,t),X(V.$$.fragment,t),X(nt.$$.fragment,t),X(st.$$.fragment,t),X(Mt),X(At),X(Ct),Et=!1},d(t){t&&m(e),et(a),et(c),t&&m(h),t&&m(d),et(w),et(L),et(k),kt&&kt.d(),et(M),et(N),Pt&&Pt.d(),et(O),et(j),et(R),et(H),St&&St.d(),et(W),et(V),et(nt),et(st),t&&m(at),t&&m(lt),Mt&&Mt.d(),At&&At.d(),It.d(),zt[Tt].d()}}}function Yn(t){let e;return{c(){e=v("link to this page")},m(t,n){p(t,e,n)},d(t){t&&m(e)}}}function Xn(t){let e,n;return e=new Rn({props:{items:t[0].names}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].names),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function Qn(t){let e,n,i,o=t[0].category+"",r=t[0].type+"";return{c(){e=v(o),n=v(":"),i=v(r)},m(t,o){p(t,e,o),p(t,n,o),p(t,i,o)},p(t,n){1&n&&o!==(o=t[0].category+"")&&E(e,o),1&n&&r!==(r=t[0].type+"")&&E(i,r)},d(t){t&&m(e),t&&m(n),t&&m(i)}}}function Jn(t){let e,n=t[0].indexed_date+"";return{c(){e=v(n)},m(t,n){p(t,e,n)},p(t,i){1&i&&n!==(n=t[0].indexed_date+"")&&E(e,n)},d(t){t&&m(e)}}}function ti(t){let e,n;return e=new In({props:{title:"Admin Level",$$slots:{default:[ei]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};4194305&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function ei(t){let e,n=t[0].admin_level+"";return{c(){e=v(n)},m(t,n){p(t,e,n)},p(t,i){1&i&&n!==(n=t[0].admin_level+"")&&E(e,n)},d(t){t&&m(e)}}}function ni(t){let e,n=t[0].rank_search+"";return{c(){e=v(n)},m(t,n){p(t,e,n)},p(t,i){1&i&&n!==(n=t[0].rank_search+"")&&E(e,n)},d(t){t&&m(e)}}}function ii(t){let e,n,i,o,r=t[0].rank_address+"",s=be(t[0].rank_address)+"";return{c(){e=v(r),n=v(" ("),i=v(s),o=v(")")},m(t,r){p(t,e,r),p(t,n,r),p(t,i,r),p(t,o,r)},p(t,n){1&n&&r!==(r=t[0].rank_address+"")&&E(e,r),1&n&&s!==(s=be(t[0].rank_address)+"")&&E(i,s)},d(t){t&&m(e),t&&m(n),t&&m(i),t&&m(o)}}}function oi(t){let e,n;return e=new In({props:{title:"Importance",$$slots:{default:[si]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};4194305&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function ri(t){let e;return{c(){e=v("(estimated)")},m(t,n){p(t,e,n)},d(t){t&&m(e)}}}function si(t){let e,n,i,o=t[0].calculated_importance+"",r=!t[0].importance&&ri();return{c(){e=v(o),n=y(),r&&r.c(),i=b()},m(t,o){p(t,e,o),p(t,n,o),r&&r.m(t,o),p(t,i,o)},p(t,n){1&n&&o!==(o=t[0].calculated_importance+"")&&E(e,o),t[0].importance?r&&(r.d(1),r=null):r||(r=ri(),r.c(),r.m(i.parentNode,i))},d(t){t&&m(e),t&&m(n),r&&r.d(t),t&&m(i)}}}function ai(t){let e,n=ve(t[0])+"";return{c(){e=v(n)},m(t,n){p(t,e,n)},p(t,i){1&i&&n!==(n=ve(t[0])+"")&&E(e,n)},d(t){t&&m(e)}}}function li(t){let e,n,i,o=t[0].centroid.coordinates[1]+"",r=t[0].centroid.coordinates[0]+"";return{c(){e=v(o),n=v(","),i=v(r)},m(t,o){p(t,e,o),p(t,n,o),p(t,i,o)},p(t,n){1&n&&o!==(o=t[0].centroid.coordinates[1]+"")&&E(e,o),1&n&&r!==(r=t[0].centroid.coordinates[0]+"")&&E(i,r)},d(t){t&&m(e),t&&m(n),t&&m(i)}}}function ui(t){let e,n,i=me(t[0])+"";return{c(){n=b(),e=new S(n)},m(t,o){e.m(i,t,o),p(t,n,o)},p(t,n){1&n&&i!==(i=me(t[0])+"")&&e.p(i)},d(t){t&&m(n),t&&e.d()}}}function ci(t){let e,n,i,o,r=t[0].place_id+"";return{c(){e=v(r),n=v("\n ("),i=_("a"),i.textContent="on this server",o=v(")"),C(i,"href","https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id")},m(t,r){p(t,e,r),p(t,n,r),p(t,i,r),p(t,o,r)},p(t,n){1&n&&r!==(r=t[0].place_id+"")&&E(e,r)},d(t){t&&m(e),t&&m(n),t&&m(i),t&&m(o)}}}function hi(t){let e,n;return e=new In({props:{title:"Wikipedia Calculated",$$slots:{default:[di]},$$scope:{ctx:t}}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};4194305&n&&(i.$$scope={dirty:n,ctx:t}),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function di(t){let e,n,i=_e(t[0])+"";return{c(){n=b(),e=new S(n)},m(t,o){e.m(i,t,o),p(t,n,o)},p(t,n){1&n&&i!==(i=_e(t[0])+"")&&e.p(i)},d(t){t&&m(n),t&&e.d()}}}function fi(t){let e,n=(t[0].calculated_postcode||"")+"";return{c(){e=v(n)},m(t,n){p(t,e,n)},p(t,i){1&i&&n!==(n=(t[0].calculated_postcode||"")+"")&&E(e,n)},d(t){t&&m(e)}}}function pi(t){let e,n;return e=new Rn({props:{items:t[0].addresstags}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].addresstags),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function mi(t){let e,n;return e=new Rn({props:{items:t[0].extratags}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.items=t[0].extratags),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function gi(t){let e,n,i=t[0].address,o=[];for(let e=0;e<i.length;e+=1)o[e]=_i(Un(t,i,e));const r=t=>X(o[t],1,1,(()=>{o[t]=null}));return{c(){for(let t=0;t<o.length;t+=1)o[t].c();e=b()},m(t,i){for(let e=0;e<o.length;e+=1)o[e].m(t,i);p(t,e,i),n=!0},p(t,n){if(1&n){let s;for(i=t[0].address,s=0;s<i.length;s+=1){const r=Un(t,i,s);o[s]?(o[s].p(r,n),Y(o[s],1)):(o[s]=_i(r),o[s].c(),Y(o[s],1),o[s].m(e.parentNode,e))}for(G(),s=i.length;s<o.length;s+=1)r(s);K()}},i(t){if(!n){for(let t=0;t<i.length;t+=1)Y(o[t]);n=!0}},o(t){o=o.filter(Boolean);for(let t=0;t<o.length;t+=1)X(o[t]);n=!1},d(t){g(o,t),t&&m(e)}}}function _i(t){let e,n;return e=new An({props:{addressLine:t[17],bMarkUnusedLines:"true",bDistanceInMeters:"false"}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[17]),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function vi(t){let e,n,i,o,r=t[0].linked_places,s=[];for(let e=0;e<r.length;e+=1)s[e]=yi(Wn(t,r,e));const a=t=>X(s[t],1,1,(()=>{s[t]=null}));return{c(){e=_("tr"),e.innerHTML='<td colspan="6" class="svelte-mfbmpl"><h2 class="svelte-mfbmpl">Linked Places</h2></td>',n=y();for(let t=0;t<s.length;t+=1)s[t].c();i=b(),C(e,"class","all-columns svelte-mfbmpl")},m(t,r){p(t,e,r),p(t,n,r);for(let e=0;e<s.length;e+=1)s[e].m(t,r);p(t,i,r),o=!0},p(t,e){if(1&e){let n;for(r=t[0].linked_places,n=0;n<r.length;n+=1){const o=Wn(t,r,n);s[n]?(s[n].p(o,e),Y(s[n],1)):(s[n]=yi(o),s[n].c(),Y(s[n],1),s[n].m(i.parentNode,i))}for(G(),n=r.length;n<s.length;n+=1)a(n);K()}},i(t){if(!o){for(let t=0;t<r.length;t+=1)Y(s[t]);o=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)X(s[t]);o=!1},d(t){t&&m(e),t&&m(n),g(s,t),t&&m(i)}}}function yi(t){let e,n;return e=new An({props:{addressLine:t[17],bMarkUnusedLines:"true",bDistanceInMeters:"true"}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[17]),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function bi(t){let e,n,i,o,r;return{c(){e=_("tr"),n=_("td"),i=_("a"),o=v("display keywords"),C(i,"class","btn btn-outline-secondary btn-sm"),C(i,"href",r=t[1]+"&keywords=1")},m(t,r){p(t,e,r),f(e,n),f(n,i),f(i,o)},p(t,e){2&e&&r!==(r=t[1]+"&keywords=1")&&C(i,"href",r)},d(t){t&&m(e)}}}function xi(t){let e,n,i,o,r=t[0].keywords.name,s=[];for(let e=0;e<r.length;e+=1)s[e]=Ti(Fn(t,r,e));let a=t[0].keywords.address&&Ci(t);return{c(){e=_("tr"),e.innerHTML='<td colspan="6" class="svelte-mfbmpl"><h3 class="svelte-mfbmpl">Name Keywords</h3></td>',n=y();for(let t=0;t<s.length;t+=1)s[t].c();i=y(),a&&a.c(),o=b(),C(e,"class","all-columns svelte-mfbmpl")},m(t,r){p(t,e,r),p(t,n,r);for(let e=0;e<s.length;e+=1)s[e].m(t,r);p(t,i,r),a&&a.m(t,r),p(t,o,r)},p(t,e){if(1&e){let n;for(r=t[0].keywords.name,n=0;n<r.length;n+=1){const o=Fn(t,r,n);s[n]?s[n].p(o,e):(s[n]=Ti(o),s[n].c(),s[n].m(i.parentNode,i))}for(;n<s.length;n+=1)s[n].d(1);s.length=r.length}t[0].keywords.address?a?a.p(t,e):(a=Ci(t),a.c(),a.m(o.parentNode,o)):a&&(a.d(1),a=null)},d(t){t&&m(e),t&&m(n),g(s,t),t&&m(i),a&&a.d(t),t&&m(o)}}}function wi(t){let e,n,i,o=t[12].id+"";return{c(){e=_("td"),n=v("word id: "),i=v(o)},m(t,o){p(t,e,o),f(e,n),f(e,i)},p(t,e){1&e&&o!==(o=t[12].id+"")&&E(i,o)},d(t){t&&m(e)}}}function Ti(t){let e,n,i,o,r=Ce(t[12].token)+"",s=t[12].id&&wi(t);return{c(){e=_("tr"),n=_("td"),i=v(r),o=y(),s&&s.c()},m(t,r){p(t,e,r),f(e,n),f(n,i),f(e,o),s&&s.m(e,null)},p(t,n){1&n&&r!==(r=Ce(t[12].token)+"")&&E(i,r),t[12].id?s?s.p(t,n):(s=wi(t),s.c(),s.m(e,null)):s&&(s.d(1),s=null)},d(t){t&&m(e),s&&s.d()}}}function Ci(t){let e,n,i,o=t[0].keywords.address,r=[];for(let e=0;e<o.length;e+=1)r[e]=Li(qn(t,o,e));return{c(){e=_("tr"),e.innerHTML='<td colspan="6" class="svelte-mfbmpl"><h3 class="svelte-mfbmpl">Address Keywords</h3></td>',n=y();for(let t=0;t<r.length;t+=1)r[t].c();i=b(),C(e,"class","all-columns svelte-mfbmpl")},m(t,o){p(t,e,o),p(t,n,o);for(let e=0;e<r.length;e+=1)r[e].m(t,o);p(t,i,o)},p(t,e){if(1&e){let n;for(o=t[0].keywords.address,n=0;n<o.length;n+=1){const s=qn(t,o,n);r[n]?r[n].p(s,e):(r[n]=Li(s),r[n].c(),r[n].m(i.parentNode,i))}for(;n<r.length;n+=1)r[n].d(1);r.length=o.length}},d(t){t&&m(e),t&&m(n),g(r,t),t&&m(i)}}}function Ei(t){let e,n,i,o=t[12].id+"";return{c(){e=_("td"),n=v("word id: "),i=v(o)},m(t,o){p(t,e,o),f(e,n),f(e,i)},p(t,e){1&e&&o!==(o=t[12].id+"")&&E(i,o)},d(t){t&&m(e)}}}function Li(t){let e,n,i,o,r,s=Ce(t[12].token)+"",a=t[12].id&&Ei(t);return{c(){e=_("tr"),n=_("td"),i=v(s),o=y(),a&&a.c(),r=y()},m(t,s){p(t,e,s),f(e,n),f(n,i),f(e,o),a&&a.m(e,null),f(e,r)},p(t,n){1&n&&s!==(s=Ce(t[12].token)+"")&&E(i,s),t[12].id?a?a.p(t,n):(a=Ei(t),a.c(),a.m(e,r)):a&&(a.d(1),a=null)},d(t){t&&m(e),a&&a.d()}}}function $i(e){let n,i,o,r,s;return{c(){n=_("tr"),i=_("td"),o=_("a"),r=v("display child places"),C(o,"class","btn btn-outline-secondary btn-sm"),C(o,"href",s=e[1]+"&hierarchy=1")},m(t,e){p(t,n,e),f(n,i),f(i,o),f(o,r)},p(t,e){2&e&&s!==(s=t[1]+"&hierarchy=1")&&C(o,"href",s)},i:t,o:t,d(t){t&&m(n)}}}function ki(t){let e,n,i,o=Object.keys(t[0].hierarchy)>500,r=Object.keys(t[0].hierarchy),s=[];for(let e=0;e<r.length;e+=1)s[e]=Si(Zn(t,r,e));const a=t=>X(s[t],1,1,(()=>{s[t]=null}));let l=o&&Mi();return{c(){for(let t=0;t<s.length;t+=1)s[t].c();e=y(),l&&l.c(),n=b()},m(t,o){for(let e=0;e<s.length;e+=1)s[e].m(t,o);p(t,e,o),l&&l.m(t,o),p(t,n,o),i=!0},p(t,i){if(1&i){let n;for(r=Object.keys(t[0].hierarchy),n=0;n<r.length;n+=1){const o=Zn(t,r,n);s[n]?(s[n].p(o,i),Y(s[n],1)):(s[n]=Si(o),s[n].c(),Y(s[n],1),s[n].m(e.parentNode,e))}for(G(),n=r.length;n<s.length;n+=1)a(n);K()}1&i&&(o=Object.keys(t[0].hierarchy)>500),o?l||(l=Mi(),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null)},i(t){if(!i){for(let t=0;t<r.length;t+=1)Y(s[t]);i=!0}},o(t){s=s.filter(Boolean);for(let t=0;t<s.length;t+=1)X(s[t]);i=!1},d(t){g(s,t),t&&m(e),l&&l.d(t),t&&m(n)}}}function Pi(t){let e,n;return e=new An({props:{addressLine:t[9],bDistanceInMeters:"true"}}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},p(t,n){const i={};1&n&&(i.addressLine=t[9]),e.$set(i)},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function Si(t){let e,n,i,o,r,s,a,l=t[6]+"",u=t[0].hierarchy[t[6]],c=[];for(let e=0;e<u.length;e+=1)c[e]=Pi(Hn(t,u,e));const h=t=>X(c[t],1,1,(()=>{c[t]=null}));return{c(){e=_("tr"),n=_("td"),i=_("h3"),o=v(l),r=y();for(let t=0;t<c.length;t+=1)c[t].c();s=b(),C(i,"class","svelte-mfbmpl"),C(n,"colspan","6"),C(n,"class","svelte-mfbmpl"),C(e,"class","all-columns svelte-mfbmpl")},m(t,l){p(t,e,l),f(e,n),f(n,i),f(i,o),p(t,r,l);for(let e=0;e<c.length;e+=1)c[e].m(t,l);p(t,s,l),a=!0},p(t,e){if((!a||1&e)&&l!==(l=t[6]+"")&&E(o,l),1&e){let n;for(u=t[0].hierarchy[t[6]],n=0;n<u.length;n+=1){const i=Hn(t,u,n);c[n]?(c[n].p(i,e),Y(c[n],1)):(c[n]=Pi(i),c[n].c(),Y(c[n],1),c[n].m(s.parentNode,s))}for(G(),n=u.length;n<c.length;n+=1)h(n);K()}},i(t){if(!a){for(let t=0;t<u.length;t+=1)Y(c[t]);a=!0}},o(t){c=c.filter(Boolean);for(let t=0;t<c.length;t+=1)X(c[t]);a=!1},d(t){t&&m(e),t&&m(r),g(c,t),t&&m(s)}}}function Mi(t){let e;return{c(){e=_("p"),e.textContent="There are more child objects which are not shown."},m(t,n){p(t,e,n)},d(t){t&&m(e)}}}function Ai(t){let e,n,i,o,r,s;e=new te({props:{$$slots:{default:[Vn]},$$scope:{ctx:t}}});const a=[Kn,Gn],l=[];function u(t,e){return t[0]?0:""!==window.location.search&&t[3]?1:-1}return~(o=u(t))&&(r=l[o]=a[o](t)),{c(){J(e.$$.fragment),n=y(),i=_("div"),r&&r.c(),C(i,"class","container")},m(t,r){tt(e,t,r),p(t,n,r),p(t,i,r),~o&&l[o].m(i,null),s=!0},p(t,[n]){const s={};4194308&n&&(s.$$scope={dirty:n,ctx:t}),e.$set(s);let c=o;o=u(t),o===c?~o&&l[o].p(t,n):(r&&(G(),X(l[c],1,1,(()=>{l[c]=null})),K()),~o?(r=l[o],r?r.p(t,n):(r=l[o]=a[o](t),r.c()),Y(r,1),r.m(i,null)):r=null)},i(t){s||(Y(e.$$.fragment,t),Y(r),s=!0)},o(t){X(e.$$.fragment,t),X(r),s=!1},d(t){et(e,t),t&&m(n),t&&m(i),~o&&l[o].d()}}}function Ni(t,e,n){let i,o,r,s;u(t,pt,(t=>n(4,i=t)));let a=!1;return t.$$.update=()=>{if(16&t.$$.dirty){let t=i;"details"===t.tab&&(e=t.params,n(2,s={place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),n(3,a=!1),s.place_id||s.osmtype&&s.osmid?(s.place_id?Tt("Details for "+s.place_id):Tt("Details for "+s.osmtype+s.osmid),bt("details",s,(function(t){window.scrollTo(0,0),n(3,a=!0),n(0,o=t&&!t.error?t:void 0)}))):n(0,o=void 0),n(1,r=window.location.search))}var e},[o,r,s,a,i]}class Di extends ot{constructor(t){super(),it(this,t,Ni,Ai,s,{})}}function Ii(t,e,n){const i=t.slice();return i[2]=e[n],i}function Oi(t){let e,n,i,o,r,s,a,l,u,c,h,d,g,b,x,w,T,L,$,k,P,S,M,A,N,D,I,O,z,j=t[2].osm_type+"",B=me(t[2])+"",R=t[2].class+"",Z=t[2].type+"",H=t[2].name+"",q=(t[2].country_code||"")+"",F=t[2].errormessage+"",W=t[2].updated+"";return{c(){e=_("tr"),n=_("td"),i=v(j),o=y(),r=_("td"),s=y(),a=_("td"),l=v(R),u=y(),c=_("td"),h=v(Z),d=y(),g=_("td"),b=v(H),x=y(),w=_("td"),T=v(q),L=y(),$=_("td"),k=v(F),P=y(),S=_("td"),M=v(W),A=y(),N=_("td"),D=_("a"),I=v("josm"),z=y(),C(D,"href",O="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+pe(t[2].osm_type)+"/"+t[2].osm_id+"/full"),C(D,"target","josm")},m(t,m){p(t,e,m),f(e,n),f(n,i),f(e,o),f(e,r),r.innerHTML=B,f(e,s),f(e,a),f(a,l),f(e,u),f(e,c),f(c,h),f(e,d),f(e,g),f(g,b),f(e,x),f(e,w),f(w,T),f(e,L),f(e,$),f($,k),f(e,P),f(e,S),f(S,M),f(e,A),f(e,N),f(N,D),f(D,I),f(e,z)},p(t,e){1&e&&j!==(j=t[2].osm_type+"")&&E(i,j),1&e&&B!==(B=me(t[2])+"")&&(r.innerHTML=B),1&e&&R!==(R=t[2].class+"")&&E(l,R),1&e&&Z!==(Z=t[2].type+"")&&E(h,Z),1&e&&H!==(H=t[2].name+"")&&E(b,H),1&e&&q!==(q=(t[2].country_code||"")+"")&&E(T,q),1&e&&F!==(F=t[2].errormessage+"")&&E(k,F),1&e&&W!==(W=t[2].updated+"")&&E(M,W),1&e&&O!==(O="http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/"+pe(t[2].osm_type)+"/"+t[2].osm_id+"/full")&&C(D,"href",O)},d(t){t&&m(e)}}}function zi(t){let e,n,i,o,r,s,a,l,u,c,h,d,b,x,w,T,L,$=t[0].length+"";e=new te({});let k=t[0],P=[];for(let e=0;e<k.length;e+=1)P[e]=Oi(Ii(t,k,e));return{c(){J(e.$$.fragment),n=y(),i=_("div"),o=_("div"),r=_("div"),s=_("h1"),s.textContent="Broken polygons",a=y(),l=_("p"),u=v("Total number of broken polygons: "),c=v($),h=v("."),d=y(),b=_("table"),x=_("thead"),x.innerHTML="<th>OSM type</th> \n <th>OSM id</th> \n <th>Class</th> \n <th>Type</th> \n <th>Name</th> \n <th>Country Code</th> \n <th>Error message</th> \n <th>Updated</th> \n <th></th>",w=y(),T=_("tbody");for(let t=0;t<P.length;t+=1)P[t].c();C(b,"class","table table-striped table-hover"),C(r,"class","col-sm-12"),C(o,"class","row"),C(i,"class","container")},m(t,m){tt(e,t,m),p(t,n,m),p(t,i,m),f(i,o),f(o,r),f(r,s),f(r,a),f(r,l),f(l,u),f(l,c),f(l,h),f(r,d),f(r,b),f(b,x),f(b,w),f(b,T);for(let t=0;t<P.length;t+=1)P[t].m(T,null);L=!0},p(t,[e]){if((!L||1&e)&&$!==($=t[0].length+"")&&E(c,$),1&e){let n;for(k=t[0],n=0;n<k.length;n+=1){const i=Ii(t,k,n);P[n]?P[n].p(i,e):(P[n]=Oi(i),P[n].c(),P[n].m(T,null))}for(;n<P.length;n+=1)P[n].d(1);P.length=k.length}},i(t){L||(Y(e.$$.fragment,t),L=!0)},o(t){X(e.$$.fragment,t),L=!1},d(t){et(e,t),t&&m(n),t&&m(i),g(P,t)}}}function ji(t,e,n){let i=[];return N((function(){bt("polygons",{format:"json"},(function(t){n(0,i=t)})),Tt("Broken polygons")})),[i]}class Bi extends ot{constructor(t){super(),it(this,t,ji,zi,s,{})}}function Ri(t,e,n){const i=t.slice();return i[2]=e[n],i}function Zi(t){let e,n=t[2].place_id+"";return{c(){e=v(n)},m(t,n){p(t,e,n)},p(t,i){1&i&&n!==(n=t[2].place_id+"")&&E(e,n)},d(t){t&&m(e)}}}function Hi(t){let e,n,i,o,r,s,a,l,u,c,h,d,g,b,x,w,T,C,L,$,k,P,S=t[2].country_code+"",M=t[2].name+"",A=me(t[2])+"",N=t[2].osm_type+"",D=t[2].class+"",I=t[2].type+"";return i=new Pe({props:{feature:t[2],$$slots:{default:[Zi]},$$scope:{ctx:t}}}),{c(){e=_("tr"),n=_("td"),J(i.$$.fragment),o=y(),r=_("td"),s=v(S),a=y(),l=_("td"),u=v(M),c=y(),h=_("td"),d=y(),g=_("td"),b=v(N),x=y(),w=_("td"),T=v(D),C=y(),L=_("td"),$=v(I),k=y()},m(t,m){p(t,e,m),f(e,n),tt(i,n,null),f(e,o),f(e,r),f(r,s),f(e,a),f(e,l),f(l,u),f(e,c),f(e,h),h.innerHTML=A,f(e,d),f(e,g),f(g,b),f(e,x),f(e,w),f(w,T),f(e,C),f(e,L),f(L,$),f(e,k),P=!0},p(t,e){const n={};1&e&&(n.feature=t[2]),33&e&&(n.$$scope={dirty:e,ctx:t}),i.$set(n),(!P||1&e)&&S!==(S=t[2].country_code+"")&&E(s,S),(!P||1&e)&&M!==(M=t[2].name+"")&&E(u,M),(!P||1&e)&&A!==(A=me(t[2])+"")&&(h.innerHTML=A),(!P||1&e)&&N!==(N=t[2].osm_type+"")&&E(b,N),(!P||1&e)&&D!==(D=t[2].class+"")&&E(T,D),(!P||1&e)&&I!==(I=t[2].type+"")&&E($,I)},i(t){P||(Y(i.$$.fragment,t),P=!0)},o(t){X(i.$$.fragment,t),P=!1},d(t){t&&m(e),et(i)}}}function qi(t){let e,n,i,o,r,s,a,l,u,c,h,d,b,x,w,T,L=t[0].length+"";e=new te({});let $=t[0],k=[];for(let e=0;e<$.length;e+=1)k[e]=Hi(Ri(t,$,e));const P=t=>X(k[t],1,1,(()=>{k[t]=null}));return{c(){J(e.$$.fragment),n=y(),i=_("div"),o=_("div"),r=_("div"),s=_("h1"),s.textContent="Deletable",a=y(),l=_("p"),u=v(L),c=v(" objects have been deleted in OSM but are still in the Nominatim database."),h=y(),d=_("table"),b=_("thead"),b.innerHTML="<th>Place id</th> \n <th>Country Code</th> \n <th>Name</th> \n <th>OSM id</th> \n <th>OSM type</th> \n <th>Class</th> \n <th>Type</th>",x=y(),w=_("tbody");for(let t=0;t<k.length;t+=1)k[t].c();C(d,"class","table table-striped table-hover"),C(r,"class","col-sm-12"),C(o,"class","row"),C(i,"class","container")},m(t,m){tt(e,t,m),p(t,n,m),p(t,i,m),f(i,o),f(o,r),f(r,s),f(r,a),f(r,l),f(l,u),f(l,c),f(r,h),f(r,d),f(d,b),f(d,x),f(d,w);for(let t=0;t<k.length;t+=1)k[t].m(w,null);T=!0},p(t,[e]){if((!T||1&e)&&L!==(L=t[0].length+"")&&E(u,L),1&e){let n;for($=t[0],n=0;n<$.length;n+=1){const i=Ri(t,$,n);k[n]?(k[n].p(i,e),Y(k[n],1)):(k[n]=Hi(i),k[n].c(),Y(k[n],1),k[n].m(w,null))}for(G(),n=$.length;n<k.length;n+=1)P(n);K()}},i(t){if(!T){Y(e.$$.fragment,t);for(let t=0;t<$.length;t+=1)Y(k[t]);T=!0}},o(t){X(e.$$.fragment,t),k=k.filter(Boolean);for(let t=0;t<k.length;t+=1)X(k[t]);T=!1},d(t){et(e,t),t&&m(n),t&&m(i),g(k,t)}}}function Fi(t,e,n){let i=[];return N((function(){bt("deletable",{format:"json"},(function(t){n(0,i=t)})),Tt("Deletable objects")})),[i]}class Wi extends ot{constructor(t){super(),it(this,t,Fi,qi,s,{})}}function Ui(t){let e,n,i,o,r,s,a,l,u,c,h,d,g,b,x,w,T,L,$,k,P,S,M=Nominatim_Config.Nominatim_API_Endpoint+"",A=t[0].software_version+"",N=t[0].database_version+"",D=t[0].data_updated+"";return e=new te({}),{c(){J(e.$$.fragment),n=y(),i=_("div"),o=_("div"),r=_("div"),s=_("h1"),s.textContent="Server status",a=y(),l=_("dl"),u=_("dt"),u.textContent="API Endpoint",c=_("dd"),h=_("a"),d=v(M),g=_("dt"),g.textContent="Software version",b=_("dd"),x=v(A),w=_("dt"),w.textContent="Database version",T=_("dd"),L=v(N),$=_("dt"),$.textContent="Data last updated",k=_("dd"),P=v(D),C(h,"href",Nominatim_Config.Nominatim_API_Endpoint),C(r,"class","col-sm-12"),C(o,"class","row"),C(i,"class","container")},m(t,m){tt(e,t,m),p(t,n,m),p(t,i,m),f(i,o),f(o,r),f(r,s),f(r,a),f(r,l),f(l,u),f(l,c),f(c,h),f(h,d),f(l,g),f(l,b),f(b,x),f(l,w),f(l,T),f(T,L),f(l,$),f(l,k),f(k,P),S=!0},p(t,[e]){(!S||1&e)&&A!==(A=t[0].software_version+"")&&E(x,A),(!S||1&e)&&N!==(N=t[0].database_version+"")&&E(L,N),(!S||1&e)&&D!==(D=t[0].data_updated+"")&&E(P,D)},i(t){S||(Y(e.$$.fragment,t),S=!0)},o(t){X(e.$$.fragment,t),S=!1},d(t){et(e,t),t&&m(n),t&&m(i)}}}function Vi(t,e,n){let i={};return N((function(){bt("status",{format:"json"},(function(t){n(0,i=t)})),Tt("Server status")})),[i]}class Gi extends ot{constructor(t){super(),it(this,t,Vi,Ui,s,{})}}function Ki(e){let n,i,o,r;return n=new te({}),{c(){J(n.$$.fragment),i=y(),o=_("div"),C(o,"id","about-help"),C(o,"class","container svelte-1l5yrvt")},m(t,e){tt(n,t,e),p(t,i,e),p(t,o,e),r=!0},p:t,i(t){r||(Y(n.$$.fragment,t),r=!0)},o(t){X(n.$$.fragment,t),r=!1},d(t){et(n,t),t&&m(i),t&&m(o)}}}function Yi(t){return N((()=>{wt("theme/about-help.html",document.getElementById("about-help"))})),[]}class Xi extends ot{constructor(t){super(),it(this,t,Yi,Ki,s,{})}}function Qi(t){let e,n;return e=new Xi({}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function Ji(t){let e,n;return e=new Gi({}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function to(t){let e,n;return e=new Bi({}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function eo(t){let e,n;return e=new Wi({}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function no(t){let e,n;return e=new Di({}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function io(t){let e,n;return e=new vn({}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function oo(t){let e,n;return e=new an({}),{c(){J(e.$$.fragment)},m(t,i){tt(e,t,i),n=!0},i(t){n||(Y(e.$$.fragment,t),n=!0)},o(t){X(e.$$.fragment,t),n=!1},d(t){et(e,t)}}}function ro(t){let e,n,i,o,r,s,a;const l=[oo,io,no,eo,to,Ji,Qi],u=[];function c(t,e){return"search"===t[0]?0:"reverse"===t[0]?1:"details"===t[0]?2:"deletable"===t[0]?3:"polygons"===t[0]?4:"status"===t[0]?5:"about"===t[0]?6:-1}return~(e=c(t))&&(n=u[e]=l[e](t)),o=new vt({}),{c(){n&&n.c(),i=y(),J(o.$$.fragment)},m(n,l){~e&&u[e].m(n,l),p(n,i,l),tt(o,n,l),r=!0,s||(a=x(window,"popstate",t[2]),s=!0)},p(t,[o]){let r=e;e=c(t),e!==r&&(n&&(G(),X(u[r],1,1,(()=>{u[r]=null})),K()),~e?(n=u[e],n||(n=u[e]=l[e](t),n.c()),Y(n,1),n.m(i.parentNode,i)):n=null)},i(t){r||(Y(n),Y(o.$$.fragment,t),r=!0)},o(t){X(n),X(o.$$.fragment,t),r=!1},d(t){~e&&u[e].d(t),t&&m(i),et(o,t),s=!1,a()}}}function so(t,e,n){let i,o;u(t,pt,(t=>n(1,o=t))),gt();return t.$$.update=()=>{2&t.$$.dirty&&n(0,i=o.tab)},[i,o,()=>gt()]}new class extends ot{constructor(t){super(),it(this,t,so,ro,s,{})}}({target:document.body})}();
+ * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
+ * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
+ */function wn(){return yn||(yn=1,function(t){var e="1.9.4";function i(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++)for(e in o=arguments[i])t[e]=o[e];return t}var n=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var s=0;function r(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function a(t,e,i){var n,o,s,r;return r=function(){n=!1,o&&(s.apply(i,o),o=!1)},s=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)},s}function l(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function h(){return!1}function c(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return u(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,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var _=/\{ *([\w_ -]+) *\}/g;function m(t,e){return t.replace(_,(function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n}))}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function v(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;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,i=Math.max(0,16-(e-w));return w=e+i,window.setTimeout(t,i)}var T=window.requestAnimationFrame||b("RequestAnimationFrame")||x,P=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,e,i){if(!i||T!==x)return T.call(window,o(t,e));t.call(e)}function k(t){t&&P.call(window,t)}var C={__proto__:null,extend:i,create:n,bind:o,get lastId(){return s},stamp:r,throttle:a,wrapNum:l,falseFn:h,formatNum:c,trim:u,splitWords:d,setOptions:p,getParamString:f,template:m,isArray:g,indexOf:v,emptyImageUrl:y,requestFn:T,cancelFn:P,requestAnimFrame:M,cancelAnimFrame:k};function E(){}function A(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(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)}}E.extend=function(t){var e=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,s=n(o);for(var r in s.constructor=e,e.prototype=s,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(e[r]=this[r]);return t.statics&&i(e,t.statics),t.includes&&(A(t.includes),i.apply(null,[s].concat(t.includes))),i(s,t),delete s.statics,delete s.includes,s.options&&(s.options=o.options?n(o.options):{},i(s.options,t.options)),s._initHooks=[],s.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=s._initHooks.length;t<e;t++)s._initHooks[t].call(this)}},e},E.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},E.mergeOptions=function(t){return i(this.prototype.options,t),this},E.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var S={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=d(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,i,n){if("function"==typeof e){if(!1===this._listens(t,e,i)){i===this&&(i=void 0);var o={fn:e,ctx:i};n&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var r=this._listens(t,e,i);if(!1!==r){var a=n[r];this._firingCount&&(a.fn=h,this._events[t]=n=n.slice()),n.splice(r,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=h;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var o=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var s=this._events[t];if(s){this._firingCount=this._firingCount+1||1;for(var r=0,a=s.length;r<a;r++){var l=s[r],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,o)}this._firingCount--}}return n&&this._propagateEvent(o),this},listens:function(t,e,i,n){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(n=!!e,o=void 0,i=void 0);var s=this._events&&this._events[t];if(s&&s.length&&!1!==this._listens(t,o,i))return!0;if(n)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,i,n))return!0;return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var o=0,s=n.length;o<s;o++)if(n[o].fn===e&&n[o].ctx===i)return o;return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else for(var o=0,s=(t=d(t)).length;o<s;o++)this._on(t[o],e,i,!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 e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};S.addEventListener=S.on,S.removeEventListener=S.clearAllEventListeners=S.off,S.addOneTimeEventListener=S.once,S.fireEvent=S.fire,S.hasEventListeners=S.listens;var O=E.extend(S);function z(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var I=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function D(t,e,i){return t instanceof z?t:g(t)?new z(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new z(t.x,t.y):new z(t,e,i)}function B(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function N(t,e){return!t||t instanceof B?t:new B(t,e)}function Z(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;n<o;n++)this.extend(i[n])}function j(t,e){return t instanceof Z?t:new Z(t,e)}function $(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function R(t,e,i){return t instanceof $?t:g(t)&&"object"!=typeof t[0]?3===t.length?new $(t[0],t[1],t[2]):2===t.length?new $(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new $(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new $(t,e,i)}z.prototype={clone:function(){return new z(this.x,this.y)},add:function(t){return this.clone()._add(D(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(D(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 z(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new z(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=I(this.x),this.y=I(this.y),this},distanceTo:function(t){var e=(t=D(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=D(t)).x===this.x&&t.y===this.y},contains:function(t){return t=D(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+c(this.x)+", "+c(this.y)+")"}},B.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof z||"number"==typeof t[0]||"x"in t)e=i=D(t);else if(e=(t=N(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},getCenter:function(t){return D((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return D(this.min.x,this.max.y)},getTopRight:function(){return D(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,i;return(t="number"==typeof t[0]||t instanceof z?D(t):N(t))instanceof B?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>=e.x&&n.x<=i.x,r=o.y>=e.y&&n.y<=i.y;return s&&r},overlaps:function(t){t=N(t);var e=this.min,i=this.max,n=t.min,o=t.max,s=o.x>e.x&&n.x<i.x,r=o.y>e.y&&n.y<i.y;return s&&r},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,o=Math.abs(e.y-i.y)*t;return N(D(e.x-n,e.y-o),D(i.x+n,i.y+o))},equals:function(t){return!!t&&(t=N(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},Z.prototype={extend:function(t){var e,i,n=this._southWest,o=this._northEast;if(t instanceof $)e=t,i=t;else{if(!(t instanceof Z))return t?this.extend(R(t)||j(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||o?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),o.lat=Math.max(i.lat,o.lat),o.lng=Math.max(i.lng,o.lng)):(this._southWest=new $(e.lat,e.lng),this._northEast=new $(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,o=Math.abs(e.lng-i.lng)*t;return new Z(new $(e.lat-n,e.lng-o),new $(i.lat+n,i.lng+o))},getCenter:function(){return new $((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 $(this.getNorth(),this.getWest())},getSouthEast:function(){return new $(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 $||"lat"in t?R(t):j(t);var e,i,n=this._southWest,o=this._northEast;return t instanceof Z?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=o.lat&&e.lng>=n.lng&&i.lng<=o.lng},intersects:function(t){t=j(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=e.lat&&n.lat<=i.lat,r=o.lng>=e.lng&&n.lng<=i.lng;return s&&r},overlaps:function(t){t=j(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>e.lat&&n.lat<i.lat,r=o.lng>e.lng&&n.lng<i.lng;return s&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=j(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},$.prototype={equals:function(t,e){return!!t&&(t=R(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("+c(this.lat,t)+", "+c(this.lng,t)+")"},distanceTo:function(t){return W.distance(this,R(t))},wrap:function(){return W.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return j([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new $(this.lat,this.lng,this.alt)}};var F,H={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},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,i=this.scale(t);return new B(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new $(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,o=e.lng-i.lng;if(0===n&&0===o)return t;var s=t.getSouthWest(),r=t.getNorthEast();return new Z(new $(s.lat-n,s.lng-o),new $(r.lat-n,r.lng-o))}},W=i({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,s=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=s*s+Math.cos(n)*Math.cos(o)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),q=6378137,U={R:q,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),o=Math.sin(n*e);return new z(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new $((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(F=q*Math.PI,new B([-F,-F],[F,F]))};function V(t,e,i,n){if(g(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=i,this._d=n}function K(t,e,i,n){return new V(t,e,i,n)}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 z((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var G=i({},W,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return K(t,.5,-t,.5)}()}),Y=i({},G,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function J(t,e){var i,n,o,s,r,a,l="";for(i=0,o=t.length;i<o;i++){for(n=0,s=(r=t[i]).length;n<s;n++)l+=(n?"L":"M")+(a=r[n]).x+" "+a.y;l+=e?Zt.svg?"z":"x":""}return l||"M0 0"}var Q,tt=document.documentElement.style,et="ActiveXObject"in window,it=et&&!document.addEventListener,nt="msLaunchUri"in navigator&&!("documentMode"in document),ot=Nt("webkit"),st=Nt("android"),rt=Nt("android 2")||Nt("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=st&&Nt("Google")&&at<537&&!("AudioNode"in window),ht=!!window.opera,ct=!nt&&Nt("chrome"),ut=Nt("gecko")&&!ot&&!ht&&!et,dt=!ct&&Nt("safari"),pt=Nt("phantom"),ft="OTransition"in tt,_t=0===navigator.platform.indexOf("Win"),mt=et&&"transition"in tt,gt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!rt,vt="MozPerspective"in tt,yt=!window.L_DISABLE_3D&&(mt||gt||vt)&&!ft&&!pt,bt="undefined"!=typeof orientation||Nt("mobile"),wt=bt&&ot,xt=bt&>,Lt=!window.PointerEvent&&window.MSPointerEvent,Tt=!(!window.PointerEvent&&!Lt),Pt="ontouchstart"in window||!!window.TouchEvent,Mt=!window.L_NO_TOUCH&&(Pt||Tt),kt=bt&&ht,Ct=bt&&ut,Et=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,At=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",h,e),window.removeEventListener("testPassiveEventSupport",h,e)}catch(t){}return t}(),St=!!document.createElement("canvas").getContext,Ot=!(!document.createElementNS||!X("svg").createSVGRect),zt=!!Ot&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),It=!Ot&&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"==typeof e.adj}catch(t){return!1}}(),Dt=0===navigator.platform.indexOf("Mac"),Bt=0===navigator.platform.indexOf("Linux");function Nt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Zt={ie:et,ielt9:it,edge:nt,webkit:ot,android:st,android23:rt,androidStock:lt,opera:ht,chrome:ct,gecko:ut,safari:dt,phantom:pt,opera12:ft,win:_t,ie3d:mt,webkit3d:gt,gecko3d:vt,any3d:yt,mobile:bt,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:Lt,pointer:Tt,touch:Mt,touchNative:Pt,mobileOpera:kt,mobileGecko:Ct,retina:Et,passiveEvents:At,canvas:St,svg:Ot,vml:It,inlineSvg:zt,mac:Dt,linux:Bt},jt=Zt.msPointer?"MSPointerDown":"pointerdown",$t=Zt.msPointer?"MSPointerMove":"pointermove",Rt=Zt.msPointer?"MSPointerUp":"pointerup",Ft=Zt.msPointer?"MSPointerCancel":"pointercancel",Ht={touchstart:jt,touchmove:$t,touchend:Rt,touchcancel:Ft},Wt={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},qt={},Ut=!1;function Vt(t,e,i){return"touchstart"===e&&Jt(),Wt[e]?(i=Wt[e].bind(this,i),t.addEventListener(Ht[e],i,!1),i):(console.warn("wrong event specified:",e),h)}function Kt(t,e,i){Ht[e]?t.removeEventListener(Ht[e],i,!1):console.warn("wrong event specified:",e)}function Gt(t){qt[t.pointerId]=t}function Yt(t){qt[t.pointerId]&&(qt[t.pointerId]=t)}function Xt(t){delete qt[t.pointerId]}function Jt(){Ut||(document.addEventListener(jt,Gt,!0),document.addEventListener($t,Yt,!0),document.addEventListener(Rt,Xt,!0),document.addEventListener(Ft,Xt,!0),Ut=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],qt)e.touches.push(qt[i]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Ge(e),Qt(t,e)}function ee(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var ie=200;function ne(t,e){t.addEventListener("dblclick",e);var i,n=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Xe(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 s=Date.now();s-n<=ie?2==++i&&e(ee(t)):i=1,n=s}}}else i=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var se,re,ae,le,he,ce=ke(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ue=ke(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===ue||"OTransition"===ue?ue+"End":"transitionend";function pe(t){return"string"==typeof t?document.getElementById(t):t}function fe(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function _e(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function me(t){var e=t.parentNode;e&&e.removeChild(t)}function ge(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ve(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ye(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function be(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=Te(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function we(t,e){if(void 0!==t.classList)for(var i=d(e),n=0,o=i.length;n<o;n++)t.classList.add(i[n]);else if(!be(t,e)){var s=Te(t);Le(t,(s?s+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):Le(t,u((" "+Te(t)+" ").replace(" "+e+" "," ")))}function Le(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function Te(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Pe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Me(t,e)}function Me(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function ke(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function Ce(t,e,i){var n=e||new z(0,0);t.style[ce]=(Zt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Ee(t,e){t._leaflet_pos=e,Zt.any3d?Ce(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Ae(t){return t._leaflet_pos||new z(0,0)}if("onselectstart"in document)se=function(){je(window,"selectstart",Ge)},re=function(){Re(window,"selectstart",Ge)};else{var Se=ke(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);se=function(){if(Se){var t=document.documentElement.style;ae=t[Se],t[Se]="none"}},re=function(){Se&&(document.documentElement.style[Se]=ae,ae=void 0)}}function Oe(){je(window,"dragstart",Ge)}function ze(){Re(window,"dragstart",Ge)}function Ie(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(De(),le=t,he=t.style.outlineStyle,t.style.outlineStyle="none",je(window,"keydown",De))}function De(){le&&(le.style.outlineStyle=he,le=void 0,he=void 0,Re(window,"keydown",De))}function Be(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Ne(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ze={__proto__:null,TRANSFORM:ce,TRANSITION:ue,TRANSITION_END:de,get:pe,getStyle:fe,create:_e,remove:me,empty:ge,toFront:ve,toBack:ye,hasClass:be,addClass:we,removeClass:xe,setClass:Le,getClass:Te,setOpacity:Pe,testProp:ke,setTransform:Ce,setPosition:Ee,getPosition:Ae,get disableTextSelection(){return se},get enableTextSelection(){return re},disableImageDrag:Oe,enableImageDrag:ze,preventOutline:Ie,restoreOutline:De,getSizedParentNode:Be,getScale:Ne};function je(t,e,i,n){if(e&&"object"==typeof e)for(var o in e)We(t,o,e[o],i);else for(var s=0,r=(e=d(e)).length;s<r;s++)We(t,e[s],i,n);return this}var $e="_leaflet_events";function Re(t,e,i,n){if(1===arguments.length)Fe(t),delete t[$e];else if(e&&"object"==typeof e)for(var o in e)qe(t,o,e[o],i);else if(e=d(e),2===arguments.length)Fe(t,(function(t){return-1!==v(e,t)}));else for(var s=0,r=e.length;s<r;s++)qe(t,e[s],i,n);return this}function Fe(t,e){for(var i in t[$e]){var n=i.split(/\d/)[0];e&&!e(n)||qe(t,n,null,null,i)}}var He={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function We(t,e,i,n){var o=e+r(i)+(n?"_"+r(n):"");if(t[$e]&&t[$e][o])return this;var s=function(e){return i.call(n||t,e||window.event)},a=s;!Zt.touchNative&&Zt.pointer&&0===e.indexOf("touch")?s=Vt(t,e,s):Zt.touch&&"dblclick"===e?s=ne(t,s):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(He[e]||e,s,!!Zt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(s=function(e){e=e||window.event,ei(t,e)&&a(e)},t.addEventListener(He[e],s,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,s),t[$e]=t[$e]||{},t[$e][o]=s}function qe(t,e,i,n,o){o=o||e+r(i)+(n?"_"+r(n):"");var s=t[$e]&&t[$e][o];if(!s)return this;!Zt.touchNative&&Zt.pointer&&0===e.indexOf("touch")?Kt(t,e,s):Zt.touch&&"dblclick"===e?oe(t,s):"removeEventListener"in t?t.removeEventListener(He[e]||e,s,!1):t.detachEvent("on"+e,s),t[$e][o]=null}function Ue(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ve(t){return We(t,"wheel",Ue),this}function Ke(t){return je(t,"mousedown touchstart dblclick contextmenu",Ue),t._leaflet_disable_click=!0,this}function Ge(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ye(t){return Ge(t),Ue(t),this}function Xe(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function Je(t,e){if(!e)return new z(t.clientX,t.clientY);var i=Ne(e),n=i.boundingClientRect;return new z((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Qe=Zt.linux&&Zt.chrome?window.devicePixelRatio:Zt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ti(t){return Zt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe: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 ei(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var ii={__proto__:null,on:je,off:Re,stopPropagation:Ue,disableScrollPropagation:Ve,disableClickPropagation:Ke,preventDefault:Ge,stop:Ye,getPropagationPath:Xe,getMousePosition:Je,getWheelDelta:ti,isExternalTarget:ei,addListener:je,removeListener:Re},ni=O.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Ae(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=M(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),Ee(this._el,i),this.fire("step")},_complete:function(){k(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),oi=O.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=o(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(R(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=ue&&Zt.any3d&&!Zt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),je(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,n.pan&&n.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,i){var n=this.getZoomScale(e),o=this.getSize().divideBy(2),s=(t instanceof z?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/n),r=this.containerPointToLatLng(o.add(s));return this.setView(r,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():j(t);var i=D(e.paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,i.add(n));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var s=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(r.add(a).divideBy(2).add(s),o),zoom:o}},fitBounds:function(t,e){if(!(t=j(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.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=D(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 ni,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){we(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!Zt.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),o=this.project(t),s=this.getSize(),r=this._zoom;t=R(t),e=void 0===e?r:e;var a=Math.max(s.x,s.y),l=a*this.getZoomScale(r,e),h=o.distanceTo(n)||1,c=1.42,u=c*c;function d(t){var e=(l*l-a*a+(t?-1:1)*u*u*h*h)/(2*(t?l:a)*u*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function _(t){return p(t)/f(t)}var m=d(0);function g(t){return a*(f(m)/f(m+c*t))}function v(t){return a*(f(m)*_(m+c*t)-p(m))/u}function y(t){return 1-Math.pow(1-t,1.5)}var b=Date.now(),w=(d(1)-m)/c,x=i.duration?1e3*i.duration:1e3*w*.8;function L(){var i=(Date.now()-b)/x,s=y(i)*w;i<=1?(this._flyToFrame=M(L,this),this._move(this.unproject(n.add(o.subtract(n).multiplyBy(v(s)/h)),r),this.getScaleZoom(a/g(s),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),L.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=j(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 i=this.getCenter(),n=this._limitCenter(i,this._zoom,j(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=D((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=D(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=N([r.min.add(i),r.max.subtract(n)]),l=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var h=s.subtract(a.getCenter()),c=a.extend(s).getSize().subtract(l);o.x+=h.x<0?-c.x:c.x,o.y+=h.y<0?-c.y:c.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),s=e.divideBy(2).round(),r=n.divideBy(2).round(),a=s.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):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=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),n=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,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,i=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: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new $(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.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(),me(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(k(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)me(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=_e("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},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 Z(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,i){t=j(t),i=D(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=N(this.project(a,n),this.project(r,n)).getSize(),c=Zt.any3d?this.options.zoomSnap:1,u=l.x/h.x,d=l.y/h.y,p=e?Math.max(u,d):Math.min(u,d);return n=this.getScaleZoom(p,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(o,Math.min(s,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new z(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new B(i,i.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 i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(R(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(D(t),e)},layerPointToLatLng:function(t){var e=D(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(R(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,e){return this.options.crs.distance(R(t),R(e))},containerPointToLayerPoint:function(t){return D(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return D(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(D(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Je(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=pe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");je(e,"scroll",this._onScroll,this),this._containerId=r(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Zt.any3d,we(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=fe(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),Ee(this._mapPane,new z(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(t.markerPane,"leaflet-zoom-hide"),we(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){Ee(this._mapPane,new z(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,i)._move(t,e)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((o||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return k(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ee(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?Re:je;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(){k(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],o="mouseout"===e||"mouseover"===e,s=t.target||t.srcElement,a=!1;s;){if((i=this._targets[r(s)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(o&&!ei(s,t))break;if(n.push(i),o)break}if(s===this._container)break;s=s.parentNode}return n.length||a||o||!this.listens(e,!0)||(n=[this]),n},_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 i=t.type;"mousedown"===i&&Ie(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}var s=this._findEventTargets(t,e);if(n){for(var r=[],a=0;a<n.length;a++)n[a].listens(e,!0)&&r.push(n[a]);s=r.concat(s)}if(s.length){"contextmenu"===e&&Ge(t);var l=s[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=c?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(a=0;a<s.length;a++)if(s[a].fire(e,h,!0),h.originalEvent._stopped||!1===s[a].options.bubblingMouseEvents&&-1!==v(this._mouseEvents,e))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 Ae(this._mapPane)||new z(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 i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return N([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),o=this.getSize().divideBy(2),s=new B(n.subtract(o),n.add(o)),r=this._getBoundsOffset(s,i,e);return Math.abs(r.x)<=1&&Math.abs(r.y)<=1?t:this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new B(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=N(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new z(this._rebound(o.x,-s.x),this._rebound(o.y,-s.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(),i=this.getMaxZoom(),n=Zt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=_e("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ce,i=this._proxy.style[e];Ce(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){me(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Ce(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(o)||(M((function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(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))}});function si(t,e){return new oi(t,e)}var ri=E.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),i=this.getPosition(),n=t._controlCorners[i];return we(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(me(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()}}),ai=function(t){return new ri(t)};oi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=_e("div",e+"control-container",this._container);function n(n,o){var s=e+n+" "+e+o;t[n+o]=_e("div",s,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)me(this._controlCorners[t]);me(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var li=ri.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in p(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!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 ri.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(){we(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?(we(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=_e("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Ke(e),Ve(e);var n=this._section=_e("section",t+"-list");i&&(this._map.on("click",this.collapse,this),je(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=_e("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),je(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Ge(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=_e("div",t+"-base",n),this._separator=_e("div",t+"-separator",n),this._overlaysList=_e("div",t+"-overlays",n),e.appendChild(n)},_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,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(o((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;ge(this._baseLayersList),ge(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,o=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,o+=n.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)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+r(this),n),this._layerControlInputs.push(e),e.layerId=r(t.layer),je(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return i.appendChild(s),s.appendChild(e),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||o.push(e);for(s=0;s<o.length;s++)this._map.hasLayer(o[s])&&this._map.removeLayer(o[s]);for(s=0;s<n.length;s++)this._map.hasLayer(n[s])||this._map.addLayer(n[s]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,je(t,"click",Ge),this.expand();var e=this;setTimeout((function(){Re(t,"click",Ge),e._preventClick=!1}))}}),hi=function(t,e,i){return new li(t,e,i)},ci=ri.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",i=_e("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._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,i,n,o){var s=_e("a",i,n);return s.innerHTML=t,s.href="#",s.title=e,s.setAttribute("role","button"),s.setAttribute("aria-label",e),Ke(s),je(s,"click",Ye),je(s,"click",o,this),je(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(we(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(we(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});oi.mergeOptions({zoomControl:!0}),oi.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new ci,this.addControl(this.zoomControl))}));var ui=function(t){return new ci(t)},di=ri.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=_e("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=_e("div",e,i)),t.imperial&&(this._iScale=_e("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,o=3.2808399*t;o>5280?(e=o/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),pi=function(t){return new di(t)},fi='<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>',_i=ri.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Zt.inlineSvg?fi+" ":"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=_e("div","leaflet-control-attribution"),Ke(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 i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});oi.mergeOptions({attributionControl:!0}),oi.addInitHook((function(){this.options.attributionControl&&(new _i).addTo(this)}));var mi=function(t){return new _i(t)};ri.Layers=li,ri.Zoom=ci,ri.Scale=di,ri.Attribution=_i,ai.layers=hi,ai.zoom=ui,ai.scale=pi,ai.attribution=mi;var gi=E.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}});gi.addTo=function(t,e){return t.addHandler(e,this),this};var vi={Events:S},yi=Zt.touch?"touchstart mousedown":"mousedown",bi=O.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){p(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(je(this._dragStartTarget,yi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(bi._dragging===this&&this.finishDrag(!0),Re(this._dragStartTarget,yi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!be(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)bi._dragging===this&&this.finishDrag();else if(!(bi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(bi._dragging=this,this._preventOutline&&Ie(this._element),Oe(),se(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=Be(this._element);this._startPoint=new z(e.clientX,e.clientY),this._startPos=Ae(this._element),this._parentScale=Ne(i);var n="mousedown"===t.type;je(document,n?"mousemove":"touchmove",this._onMove,this),je(document,n?"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,i=new z(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Ge(t),this._moved||(this.fire("dragstart"),this._moved=!0,we(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),we(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ee(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Re(document,"mousemove touchmove",this._onMove,this),Re(document,"mouseup touchend touchcancel",this._onUp,this),ze(),re();var e=this._moved&&this._moving;this._moving=!1,bi._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function wi(t,e,i){var n,o,s,r,a,l,h,c,u,d=[1,4,2,8];for(o=0,h=t.length;o<h;o++)t[o]._code=Ii(t[o],e);for(r=0;r<4;r++){for(c=d[r],n=[],o=0,s=(h=t.length)-1;o<h;s=o++)a=t[o],l=t[s],a._code&c?l._code&c||((u=zi(l,a,c,e,i))._code=Ii(u,e),n.push(u)):(l._code&c&&((u=zi(l,a,c,e,i))._code=Ii(u,e),n.push(u)),n.push(a));t=n}return t}function xi(t,e){var i,n,o,s,r,a,l,h,c;if(!t||0===t.length)throw new Error("latlngs not passed");Ni(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=R([0,0]),d=j(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=Li(t));var p=t.length,f=[];for(i=0;i<p;i++){var _=R(t[i]);f.push(e.project(R([_.lat-u.lat,_.lng-u.lng])))}for(a=l=h=0,i=0,n=p-1;i<p;n=i++)o=f[i],s=f[n],r=o.y*s.x-s.y*o.x,l+=(o.x+s.x)*r,h+=(o.y+s.y)*r,a+=3*r;c=0===a?f[0]:[l/a,h/a];var m=e.unproject(D(c));return R([m.lat+u.lat,m.lng+u.lng])}function Li(t){for(var e=0,i=0,n=0,o=0;o<t.length;o++){var s=R(t[o]);e+=s.lat,i+=s.lng,n++}return R([e/n,i/n])}var Ti,Pi={__proto__:null,clipPolygon:wi,polygonCenter:xi,centroid:Li};function Mi(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Ei(t=Si(t,i),i)}function ki(t,e,i){return Math.sqrt(Bi(t,e,i,!0))}function Ci(t,e,i){return Bi(t,e,i)}function Ei(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,Ai(t,n,e,0,i-1);var o,s=[];for(o=0;o<i;o++)n[o]&&s.push(t[o]);return s}function Ai(t,e,i,n,o){var s,r,a,l=0;for(r=n+1;r<=o-1;r++)(a=Bi(t[r],t[n],t[o],!0))>l&&(s=r,l=a);l>i&&(e[s]=1,Ai(t,e,i,n,s),Ai(t,e,i,s,o))}function Si(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;n<s;n++)Di(t[n],t[o])>e&&(i.push(t[n]),o=n);return o<s-1&&i.push(t[s-1]),i}function Oi(t,e,i,n,o){var s,r,a,l=n?Ti:Ii(t,i),h=Ii(e,i);for(Ti=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=Ii(r=zi(t,e,s=l||h,i,o),i),s===l?(t=r,l=a):(e=r,h=a)}}function zi(t,e,i,n,o){var s,r,a=e.x-t.x,l=e.y-t.y,h=n.min,c=n.max;return 8&i?(s=t.x+a*(c.y-t.y)/l,r=c.y):4&i?(s=t.x+a*(h.y-t.y)/l,r=h.y):2&i?(s=c.x,r=t.y+l*(c.x-t.x)/a):1&i&&(s=h.x,r=t.y+l*(h.x-t.x)/a),new z(s,r,o)}function Ii(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Di(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Bi(t,e,i,n){var o,s=e.x,r=e.y,a=i.x-s,l=i.y-r,h=a*a+l*l;return h>0&&((o=((t.x-s)*a+(t.y-r)*l)/h)>1?(s=i.x,r=i.y):o>0&&(s+=a*o,r+=l*o)),a=t.x-s,l=t.y-r,n?a*a+l*l:new z(s,r)}function Ni(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Zi(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ni(t)}function ji(t,e){var i,n,o,s,r,a,l,h;if(!t||0===t.length)throw new Error("latlngs not passed");Ni(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=R([0,0]),u=j(t);u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=Li(t));var d=t.length,p=[];for(i=0;i<d;i++){var f=R(t[i]);p.push(e.project(R([f.lat-c.lat,f.lng-c.lng])))}for(i=0,n=0;i<d-1;i++)n+=p[i].distanceTo(p[i+1])/2;if(0===n)h=p[0];else for(i=0,s=0;i<d-1;i++)if(r=p[i],a=p[i+1],(s+=o=r.distanceTo(a))>n){l=(s-n)/o,h=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}var _=e.unproject(D(h));return R([_.lat+c.lat,_.lng+c.lng])}var $i={__proto__:null,simplify:Mi,pointToSegmentDistance:ki,closestPointOnSegment:Ci,clipSegment:Oi,_getEdgeIntersection:zi,_getBitCode:Ii,_sqClosestPointOnSegment:Bi,isFlat:Ni,_flat:Zi,polylineCenter:ji},Ri={project:function(t){return new z(t.lng,t.lat)},unproject:function(t){return new $(t.y,t.x)},bounds:new B([-180,-90],[180,90])},Fi={R:6378137,R_MINOR:6356752.314245179,bounds:new B([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,o=this.R_MINOR/i,s=Math.sqrt(1-o*o),r=s*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2);return n=-i*Math.log(Math.max(a,1e-10)),new z(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=s*Math.sin(a),e=Math.pow((1-e)/(1+e),s/2),a+=h=Math.PI/2-2*Math.atan(r*e)-a;return new $(a*i,t.x*i/n)}},Hi={__proto__:null,LonLat:Ri,Mercator:Fi,SphericalMercator:U},Wi=i({},W,{code:"EPSG:3395",projection:Fi,transformation:function(){var t=.5/(Math.PI*Fi.R);return K(t,.5,-t,.5)}()}),qi=i({},W,{code:"EPSG:4326",projection:Ri,transformation:K(1/180,1,-1/180,.5)}),Ui=i({},H,{projection:Ri,transformation:K(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});H.Earth=W,H.EPSG3395=Wi,H.EPSG3857=G,H.EPSG900913=Y,H.EPSG4326=qi,H.Simple=Ui;var Vi=O.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 i=this.getEvents();e.on(i,this),this.once("remove",(function(){e.off(i,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});oi.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 i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?g(t)?t:[t]:[]).length;e<i;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,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var o=this._zoomBoundLayers[n].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,i!==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 Ki=Vi.extend({initialize:function(t,e){var i,n;if(p(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},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,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);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)}}),Gi=function(t,e){return new Ki(t,e)},Yi=Ki.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ki.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),Ki.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 Z;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Xi=function(t,e){return new Yi(t,e)},Ji=E.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 i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var o=D(n),s=D("shadow"===e&&i.shadowAnchor||i.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),s&&(t.style.marginLeft=-s.x+"px",t.style.marginTop=-s.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"]}});function Qi(t){return new Ji(t)}var tn=Ji.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 tn.imagePath&&(tn.imagePath=this._detectIconPath()),(this.options.imagePath||tn.imagePath)+Ji.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,i){var n=e.exec(t);return n&&n[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=_e("div","leaflet-default-icon-path",document.body),e=fe(t,"background-image")||fe(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),en=gi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new bi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),we(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&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,s=Ae(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),l=N(r.min._subtract(a).add(o),r.max._subtract(a).subtract(o));if(!l.contains(s)){var h=D((Math.max(l.max.x,s.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,s.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,s.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,s.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),Ee(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(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&&(k(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=Ae(e._icon),o=e._map.layerPointToLatLng(n);i&&Ee(i,n),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){k(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),nn=Vi.extend({options:{icon:new tn,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=R(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=R(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"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),we(i,e),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&je(i,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),s=!1;o!==this._shadow&&(this._removeShadow(),s=!0),o&&(we(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&s&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Re(this._icon,"focus",this._panOnFocus,this),me(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&me(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Ee(this._icon,t),this._shadow&&Ee(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&&(we(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),en)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new en(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&&Pe(this._icon,t),this._shadow&&Pe(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,i=e.iconSize?D(e.iconSize):D(0,0),n=e.iconAnchor?D(e.iconAnchor):D(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function on(t,e){return new nn(t,e)}var sn=Vi.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)}}),rn=sn.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=R(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 sn.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,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new B(this._point.subtract(n),this._point.add(n))},_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()}});function an(t,e){return new rn(t,e)}var ln=rn.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),p(this,e),this._latlng=R(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 Z(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:sn.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===W.distance){var o=Math.PI/180,s=this._mRadius/W.R/o,r=i.project([e+s,t]),a=i.project([e-s,t]),l=r.add(a).divideBy(2),h=i.unproject(l).lat,c=Math.acos((Math.cos(s*o)-Math.sin(e*o)*Math.sin(h*o))/(Math.cos(e*o)*Math.cos(h*o)))/o;(isNaN(c)||0===c)&&(c=s/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([h,t-c]).x,this._radiusY=l.y-r.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(u).x}this._updateBounds()}});function hn(t,e,i){return new ln(t,e,i)}var cn=sn.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,i,n=1/0,o=null,s=Bi,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,c=l.length;h<c;h++){var u=s(t,e=l[h-1],i=l[h],!0);u<n&&(n=u,o=s(t,e,i))}return o&&(o.distance=Math.sqrt(n)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return ji(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=R(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Z,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Ni(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Ni(t),n=0,o=t.length;n<o;n++)i?(e[n]=R(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new B;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 z(t,t);this._rawPxBounds&&(this._pxBounds=new B([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,o,s=t[0]instanceof $,r=t.length;if(s){for(o=[],n=0;n<r;n++)o[n]=this._map.latLngToLayerPoint(t[n]),i.extend(o[n]);e.push(o)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,i)},_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,i,n,o,s,r,a,l=this._parts;for(e=0,n=0,o=this._rings.length;e<o;e++)for(i=0,s=(a=this._rings[e]).length;i<s-1;i++)(r=Oi(a[i],a[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(r[0]),r[1]===a[i+1]&&i!==s-2||(l[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=Mi(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,o,s,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,s=this._parts.length;i<s;i++)for(n=0,o=(r=(a=this._parts[i]).length)-1;n<r;o=n++)if((e||0!==n)&&ki(t,a[o],a[n])<=l)return!0;return!1}});function un(t,e){return new cn(t,e)}cn._flat=Zi;var dn=cn.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 xi(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=cn.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof $&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){cn.prototype._setLatLngs.call(this,t),Ni(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ni(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new z(e,e);if(t=new B(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,o=0,s=this._rings.length;o<s;o++)(n=wi(this._rings[o],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,o,s,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(s=0,r=(l=(e=this._parts[o]).length)-1;s<l;r=s++)i=e[s],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||cn.prototype._containsPoint.call(this,t,!0)}});function pn(t,e){return new dn(t,e)}var fn=Yi.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,o=g(t)?t:t.features;if(o){for(e=0,i=o.length;e<i;e++)((n=o[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var s=this.options;if(s.filter&&!s.filter(t))return this;var r=_n(t,s);return r?(r.feature=xn(t),r.defaultOptions=r.options,this.resetStyle(r),s.onEachFeature&&s.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},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 _n(t,e){var i,n,o,s,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||gn;if(!a&&!r)return null;switch(r.type){case"Point":return mn(h,t,i=c(a),e);case"MultiPoint":for(o=0,s=a.length;o<s;o++)i=c(a[o]),l.push(mn(h,t,i,e));return new Yi(l);case"LineString":case"MultiLineString":return n=vn(a,"LineString"===r.type?0:1,c),new cn(n,e);case"Polygon":case"MultiPolygon":return n=vn(a,"Polygon"===r.type?1:2,c),new dn(n,e);case"GeometryCollection":for(o=0,s=r.geometries.length;o<s;o++){var u=_n({geometry:r.geometries[o],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Yi(l);case"FeatureCollection":for(o=0,s=r.features.length;o<s;o++){var d=_n(r.features[o],e);d&&l.push(d)}return new Yi(l);default:throw new Error("Invalid GeoJSON object.")}}function mn(t,e,i,n){return t?t(e,i):new nn(i,n&&n.markersInheritOptions&&n)}function gn(t){return new $(t[1],t[0],t[2])}function vn(t,e,i){for(var n,o=[],s=0,r=t.length;s<r;s++)n=e?vn(t[s],e-1,i):(i||gn)(t[s]),o.push(n);return o}function yn(t,e){return void 0!==(t=R(t)).alt?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function bn(t,e,i,n){for(var o=[],s=0,r=t.length;s<r;s++)o.push(e?bn(t[s],Ni(t[s])?0:e-1,i,n):yn(t[s],n));return!e&&i&&o.length>0&&o.push(o[0].slice()),o}function wn(t,e){return t.feature?i({},t.feature,{geometry:e}):xn(e)}function xn(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ln={toGeoJSON:function(t){return wn(this,{type:"Point",coordinates:yn(this.getLatLng(),t)})}};function Tn(t,e){return new fn(t,e)}nn.include(Ln),ln.include(Ln),rn.include(Ln),cn.include({toGeoJSON:function(t){var e=!Ni(this._latlngs);return wn(this,{type:(e?"Multi":"")+"LineString",coordinates:bn(this._latlngs,e?1:0,!1,t)})}}),dn.include({toGeoJSON:function(t){var e=!Ni(this._latlngs),i=e&&!Ni(this._latlngs[0]),n=bn(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),wn(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Ki.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(i){e.push(i.toGeoJSON(t).geometry.coordinates)})),wn(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 i="GeometryCollection"===e,n=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(i)n.push(o.geometry);else{var s=xn(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}})),i?wn(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Pn=Tn,Mn=Vi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=j(e),p(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){me(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&&ve(this._image),this},bringToBack:function(){return this._map&&ye(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=j(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:_e("img");we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onload=o(this.fire,this,"load"),e.onerror=o(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),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ce(this._image,i,e)},_reset:function(){var t=this._image,e=new B(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();Ee(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){Pe(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()}}),kn=function(t,e,i){return new Mn(t,e,i)},Cn=Mn.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:_e("video");if(we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=h,e.onmousemove=h,e.onloadeddata=o(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],s=0;s<i.length;s++)n.push(i[s].src);this._url=i.length>0?n:[e.src]}else{g(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 r=0;r<this._url.length;r++){var a=_e("source");a.src=this._url[r],e.appendChild(a)}}}});function En(t,e,i){return new Cn(t,e,i)}var An=Mn.extend({_initImage:function(){var t=this._image=this._url;we(t,"leaflet-image-layer"),this._zoomAnimated&&we(t,"leaflet-zoom-animated"),this.options.className&&we(t,this.options.className),t.onselectstart=h,t.onmousemove=h}});function Sn(t,e,i){return new An(t,e,i)}var On=Vi.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof $||g(t))?(this._latlng=R(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&&Pe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Pe(this._container,1),this.bringToFront(),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Pe(this._container,0),this._removeTimeout=setTimeout(o(me,void 0,this._container),200)):me(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(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&&ve(this._container),this},bringToBack:function(){return this._map&&ye(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Yi){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];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=D(this.options.offset),i=this._getAnchor();this._zoomAnimated?Ee(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});oi.include({_initOverlay:function(t,e,i,n){var o=e;return o instanceof t||(o=new t(n).setContent(e)),i&&o.setLatLng(i),o}}),Vi.include({_initOverlay:function(t,e,i,n){var o=i;return o instanceof t?(p(o,n),o._source=this):(o=e&&!n?e:new t(n,this)).setContent(i),o}});var zn=On.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,On.prototype.openOn.call(this,t)},onAdd:function(t){On.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof sn||this._source.on("preclick",Ue))},onRemove:function(t){On.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof sn||this._source.off("preclick",Ue))},getEvents:function(){var t=On.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=_e("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=_e("div",t+"-content-wrapper",e);if(this._contentNode=_e("div",t+"-content",i),Ke(e),Ve(this._contentNode),je(e,"contextmenu",Ue),this._tipContainer=_e("div",t+"-tip-container",e),this._tip=_e("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=_e("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',je(n,"click",(function(t){Ge(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,o=this.options.maxHeight,s="leaflet-popup-scrolled";o&&n>o?(e.height=o+"px",we(t,s)):xe(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Ee(this._container,e.add(i))},_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(fe(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,o=new z(this._containerLeft,-i-this._containerBottom);o._add(Ae(this._container));var s=t.layerPointToContainerPoint(o),r=D(this.options.autoPanPadding),a=D(this.options.autoPanPaddingTopLeft||r),l=D(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),c=0,u=0;s.x+n+l.x>h.x&&(c=s.x+n-h.x+l.x),s.x-c-a.x<0&&(c=s.x-a.x),s.y+i+l.y>h.y&&(u=s.y+i-h.y+l.y),s.y-u-a.y<0&&(u=s.y-a.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return D(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),In=function(t,e){return new zn(t,e)};oi.mergeOptions({closePopupOnClick:!0}),oi.include({openPopup:function(t,e,i){return this._initOverlay(zn,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Vi.include({bindPopup:function(t,e){return this._popup=this._initOverlay(zn,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 Yi||(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){Ye(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof sn?(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 Dn=On.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){On.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){On.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=On.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=_e("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+r(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,h=o.offsetHeight,c=D(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):"center"===a?(e=l/2,i=h/2):"right"===a?(e=0,i=h/2):"left"===a?(e=l,i=h/2):r.x<s.x?(a="right",e=0,i=h/2):(a="left",e=l+2*(c.x+u.x),i=h/2),t=t.subtract(D(e,i,!0)).add(c).add(u),xe(o,"leaflet-tooltip-right"),xe(o,"leaflet-tooltip-left"),xe(o,"leaflet-tooltip-top"),xe(o,"leaflet-tooltip-bottom"),we(o,"leaflet-tooltip-"+a),Ee(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Pe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return D(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Bn=function(t,e){return new Dn(t,e)};oi.include({openTooltip:function(t,e,i){return this._initOverlay(Dn,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Vi.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Dn,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",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Yi||(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&&(je(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),je(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,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var Nn=Ji.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"),i=this.options;if(i.html instanceof Element?(ge(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=D(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Zn(t){return new Nn(t)}Ji.Default=tn;var jn=Vi.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(),me(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ve(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ye(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=a(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 z?t:new z(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,i=this.getPane().children,n=-t(-1/0,1/0),o=0,s=i.length;o<s;o++)e=i[o].style.zIndex,i[o]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Zt.ielt9){Pe(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var o=this._tiles[n];if(o.current&&o.loaded){var s=Math.min(1,(t-o.loaded)/200);Pe(o.el,s),s<1?e=!0:(o.active?i=!0:this._onOpaqueTile(o),o.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(k(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:h,_initContainer:function(){this._container||(this._container=_e("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 i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(me(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],o=this._map;return n||((n=this._levels[t]={}).el=_e("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,o.getCenter(),o.getZoom()),h(n.el.offsetWidth),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:h,_onRemoveLevel:h,_onCreateLevel:h,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<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 n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.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)me(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var o=Math.floor(t/2),s=Math.floor(e/2),r=i-1,a=new z(+o,+s);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>n&&this._retainParent(o,s,r,n))},_retainChildren:function(t,e,i,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*e;s<2*e+2;s++){var r=new z(o,s);r.z=i+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(o,s,i+1,n))}},_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,i,n){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 s=this.options.updateWhenZooming&&o!==this._tileZoom;n&&!s||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Zt.any3d?Ce(t.el,o,n):Ee(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=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]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),o=e.project(t,this._tileZoom).floor(),s=e.getSize().divideBy(2*n);return new B(o.subtract(s),o.add(s))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(n),s=o.getCenter(),r=[],a=this.options.keepBuffer,l=new B(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));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 h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&l.contains(new z(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var u=o.min.y;u<=o.max.y;u++)for(var d=o.min.x;d<=o.max.x;d++){var p=new z(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:r.push(p)}}if(r.sort((function(t,e){return t.distanceTo(s)-e.distanceTo(s)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var _=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],_);this._level.el.appendChild(_)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return j(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),o=n.add(i);return[e.unproject(n,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new Z(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new z(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(me(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){we(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=h,t.onmousemove=h,Zt.ielt9&&this.options.opacity<1&&Pe(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),s=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(s),this.createTile.length<2&&M(o(this._tileReady,this,t,null,s)),Ee(s,i),this._tiles[n]={el:s,coords:t,current:!0},e.appendChild(s),this.fire("tileloadstart",{tile:s,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(Pe(i.el,0),k(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(we(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Zt.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new z(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 B(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function $n(t){return new jn(t)}var Rn=jn.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 i=document.createElement("img");return je(i,"load",o(this._tileOnLoad,this,e,i)),je(i,"error",o(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var e={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 n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return m(this._url,i(e,this.options))},_tileOnLoad:function(t,e){Zt.ielt9?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;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=h,e.onerror=h,!e.complete)){e.src=y;var i=this._tiles[t].coords;me(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",y),jn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==y))return jn.prototype._tileReady.call(this,t,e,i)}});function Fn(t,e){return new Rn(t,e)}var Hn=Rn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var s=(e=p(this,e)).detectRetina&&Zt.retina?2:1,r=this.getTileSize();n.width=r.x*s,n.height=r.y*s,this.wmsParams=n},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,Rn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=N(i.project(e[0]),i.project(e[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===qi?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=Rn.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});function Wn(t,e){return new Hn(t,e)}Rn.WMS=Hn,Fn.wms=Wn;var qn=Vi.extend({options:{padding:.1},initialize:function(t){p(this,t),r(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),we(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),s=n.multiplyBy(-i).add(o).subtract(this._map._getNewPixelOrigin(t,e));Zt.any3d?Ce(this._container,s,i):Ee(this._container,s)},_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(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new B(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Un=qn.extend({options:{tolerance:0},getEvents:function(){var t=qn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){qn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");je(t,"mousemove",this._onMouseMove,this),je(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),je(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){k(this._redrawRequest),delete this._ctx,me(this._container),Re(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){qn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Zt.retina?2:1;Ee(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Zt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){qn.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,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[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,i,n=t.options.dashArray.split(/[, ]+/),o=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),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||M(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new B,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 i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,o,s,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(n=0,o=r[i].length;n<o;n++)s=r[i][n],l[n?"lineTo":"moveTo"](s.x,s.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==o&&(i.save(),i.scale(1,o)),i.beginPath(),i.arc(e.x,e.y/o,n,0,2*Math.PI,!1),1!==o&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],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&&(xe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,n,s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(we(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),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 i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Vn(t){return Zt.canvas?new Un(t):null}var Kn=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">')}}(),Gn={_initContainer:function(){this._container=_e("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(qn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Kn("shape");we(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Kn("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;me(e),t.removeInteractiveTarget(e),delete this._layers[r(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(e||(e=t._stroke=Kn("stroke")),o.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(o.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=Kn("fill")),o.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(o.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ve(t._container)},_bringToBack:function(t){ye(t._container)}},Yn=Zt.vml?Kn:X,Xn=qn.extend({_initContainer:function(){this._container=Yn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){me(this._container),Re(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){qn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),Ee(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Yn("path");t.options.className&&we(e,t.options.className),t.options.interactive&&we(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){me(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,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,J(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ve(t._path)},_bringToBack:function(t){ye(t._path)}});function Jn(t){return Zt.svg||Zt.vml?new Xn(t):null}Zt.vml&&Xn.include(Gn),oi.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&&Vn(t)||Jn(t)}});var Qn=dn.extend({initialize:function(t,e){dn.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=j(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function to(t,e){return new Qn(t,e)}Xn.create=Yn,Xn.pointsToPath=J,fn.geometryToLayer=_n,fn.coordsToLatLng=gn,fn.coordsToLatLngs=vn,fn.latLngToCoords=yn,fn.latLngsToCoords=bn,fn.getFeature=wn,fn.asFeature=xn,oi.mergeOptions({boxZoom:!0});var eo=gi.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(){je(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Re(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){me(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(),se(),Oe(),this._startPoint=this._map.mouseEventToContainerPoint(t),je(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=_e("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new B(this._point,this._startPoint),i=e.getSize();Ee(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(me(this._box),xe(this._container,"leaflet-crosshair")),re(),ze(),Re(document,{contextmenu:Ye,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(o(this._resetState,this),0);var e=new Z(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())}});oi.addInitHook("addHandler","boxZoom",eo),oi.mergeOptions({doubleClickZoom:!0});var io=gi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,o=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});oi.addInitHook("addHandler","doubleClickZoom",io),oi.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var no=gi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new bi(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))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(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=j(this._map.options.maxBounds);this._offsetLimit=N(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.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),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,r=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),s=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,a=o.multiplyBy(r/s),l=a.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),c=a.multiplyBy(h/l),u=h/(i.inertiaDeceleration*r),d=c.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),M((function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});oi.addInitHook("addHandler","dragging",no),oi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var oo=gi.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"),je(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(),Re(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,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;e<i;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;e<i;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;e<i;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;e<i;e++)n[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;e<i;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;e<i;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){je(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Re(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=D(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(D(e),n.options.maxBounds)),n.options.worldCopyJump){var o=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e)));n.panTo(o)}else n.panBy(e)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ye(t)}}});oi.addInitHook("addHandler","keyboard",oo),oi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var so=gi.extend({addHooks:function(){je(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Re(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=ti(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),n),Ye(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,s=i?Math.ceil(o/i)*i:o,r=t._limitZoom(e+(this._delta>0?s:-s))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});oi.addInitHook("addHandler","scrollWheelZoom",so);var ro=600;oi.mergeOptions({tapHold:Zt.touchNative&&Zt.safari&&Zt.mobile,tapTolerance:15});var ao=gi.extend({addHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Re(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 z(e.clientX,e.clientY),this._holdTimeout=setTimeout(o((function(){this._cancel(),this._isTapValid()&&(je(document,"touchend",Ge),je(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),ro),je(document,"touchend touchcancel contextmenu",this._cancel,this),je(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Re(document,"touchend",Ge),Re(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Re(document,"touchend touchcancel contextmenu",this._cancel,this),Re(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new z(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});oi.addInitHook("addHandler","tapHold",ao),oi.mergeOptions({touchZoom:Zt.touch,bounceAtZoomLimits:!0});var lo=gi.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),je(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),Re(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 i=e.mouseEventToContainerPoint(t.touches[0]),n=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(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),je(document,"touchmove",this._onTouchMove,this),je(document,"touchend touchcancel",this._onTouchEnd,this),Ge(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),s=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(s,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&s<1||this._zoom>e.getMaxZoom()&&s>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===s)return}else{var r=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===s&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),k(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=M(a,this,!0),Ge(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,k(this._animRequest),Re(document,"touchmove",this._onTouchMove,this),Re(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}});oi.addInitHook("addHandler","touchZoom",lo),oi.BoxZoom=eo,oi.DoubleClickZoom=io,oi.Drag=no,oi.Keyboard=oo,oi.ScrollWheelZoom=so,oi.TapHold=ao,oi.TouchZoom=lo,t.Bounds=B,t.Browser=Zt,t.CRS=H,t.Canvas=Un,t.Circle=ln,t.CircleMarker=rn,t.Class=E,t.Control=ri,t.DivIcon=Nn,t.DivOverlay=On,t.DomEvent=ii,t.DomUtil=Ze,t.Draggable=bi,t.Evented=O,t.FeatureGroup=Yi,t.GeoJSON=fn,t.GridLayer=jn,t.Handler=gi,t.Icon=Ji,t.ImageOverlay=Mn,t.LatLng=$,t.LatLngBounds=Z,t.Layer=Vi,t.LayerGroup=Ki,t.LineUtil=$i,t.Map=oi,t.Marker=nn,t.Mixin=vi,t.Path=sn,t.Point=z,t.PolyUtil=Pi,t.Polygon=dn,t.Polyline=cn,t.Popup=zn,t.PosAnimation=ni,t.Projection=Hi,t.Rectangle=Qn,t.Renderer=qn,t.SVG=Xn,t.SVGOverlay=An,t.TileLayer=Rn,t.Tooltip=Dn,t.Transformation=V,t.Util=C,t.VideoOverlay=Cn,t.bind=o,t.bounds=N,t.canvas=Vn,t.circle=hn,t.circleMarker=an,t.control=ai,t.divIcon=Zn,t.extend=i,t.featureGroup=Xi,t.geoJSON=Tn,t.geoJson=Pn,t.gridLayer=$n,t.icon=Qi,t.imageOverlay=kn,t.latLng=R,t.latLngBounds=j,t.layerGroup=Gi,t.map=si,t.marker=on,t.point=D,t.polygon=pn,t.polyline=un,t.popup=In,t.rectangle=to,t.setOptions=p,t.stamp=r,t.svg=Jn,t.svgOverlay=Sn,t.tileLayer=Fn,t.tooltip=Bn,t.transformation=K,t.version=e,t.videoOverlay=En;var ho=window.L;t.noConflict=function(){return window.L=ho,this},window.L=t}(bn.exports)),bn.exports}var xn,Ln,Tn=wn(),Pn={exports:{}};xn||(xn=1,Ln=Pn,function(t,e){Ln.exports=t(wn()),void 0!==e&&e.L&&(e.L.Control.MiniMap=t(L),e.L.control.minimap=function(t,i){return new e.L.Control.MiniMap(t,i)})}((function(t){var e=t.Control.extend({includes:t.Evented?t.Evented.prototype:t.Mixin.Events,options:{position:"bottomright",toggleDisplay:!1,zoomLevelOffset:-5,zoomLevelFixed:!1,centerFixed:!1,zoomAnimation:!1,autoToggleDisplay:!1,minimized:!1,width:150,height:150,collapsedWidth:19,collapsedHeight:19,aimingRectOptions:{color:"#ff7800",weight:1,clickable:!1},shadowRectOptions:{color:"#000000",weight:1,clickable:!1,opacity:0,fillOpacity:0},strings:{hideText:"Hide MiniMap",showText:"Show MiniMap"},mapOptions:{}},initialize:function(e,i){t.Util.setOptions(this,i),this.options.aimingRectOptions.clickable=!1,this.options.shadowRectOptions.clickable=!1,this._layer=e},onAdd:function(e){this._mainMap=e,this._container=t.DomUtil.create("div","leaflet-control-minimap"),this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",t.DomEvent.disableClickPropagation(this._container),t.DomEvent.on(this._container,"mousewheel",t.DomEvent.stopPropagation);var i={attributionControl:!1,dragging:!this.options.centerFixed,zoomControl:!1,zoomAnimation:this.options.zoomAnimation,autoToggleDisplay:this.options.autoToggleDisplay,touchZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),scrollWheelZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),doubleClickZoom:this.options.centerFixed?"center":!this._isZoomLevelFixed(),boxZoom:!this._isZoomLevelFixed(),crs:e.options.crs};return i=t.Util.extend(this.options.mapOptions,i),this._miniMap=new t.Map(this._container,i),this._miniMap.addLayer(this._layer),this._mainMapMoving=!1,this._miniMapMoving=!1,this._userToggledDisplay=!1,this._minimized=!1,this.options.toggleDisplay&&this._addToggleButton(),this._miniMap.whenReady(t.Util.bind((function(){this._aimingRect=t.rectangle(this._mainMap.getBounds(),this.options.aimingRectOptions).addTo(this._miniMap),this._shadowRect=t.rectangle(this._mainMap.getBounds(),this.options.shadowRectOptions).addTo(this._miniMap),this._mainMap.on("moveend",this._onMainMapMoved,this),this._mainMap.on("move",this._onMainMapMoving,this),this._miniMap.on("movestart",this._onMiniMapMoveStarted,this),this._miniMap.on("move",this._onMiniMapMoving,this),this._miniMap.on("moveend",this._onMiniMapMoved,this)}),this)),this._container},addTo:function(e){t.Control.prototype.addTo.call(this,e);var i=this.options.centerFixed||this._mainMap.getCenter();return this._miniMap.setView(i,this._decideZoom(!0)),this._setDisplay(this.options.minimized),this},onRemove:function(t){this._mainMap.off("moveend",this._onMainMapMoved,this),this._mainMap.off("move",this._onMainMapMoving,this),this._miniMap.off("moveend",this._onMiniMapMoved,this),this._miniMap.removeLayer(this._layer)},changeLayer:function(t){this._miniMap.removeLayer(this._layer),this._layer=t,this._miniMap.addLayer(this._layer)},_addToggleButton:function(){this._toggleDisplayButton=this.options.toggleDisplay?this._createButton("",this._toggleButtonInitialTitleText(),"leaflet-control-minimap-toggle-display leaflet-control-minimap-toggle-display-"+this.options.position,this._container,this._toggleDisplayButtonClicked,this):void 0,this._toggleDisplayButton.style.width=this.options.collapsedWidth+"px",this._toggleDisplayButton.style.height=this.options.collapsedHeight+"px"},_toggleButtonInitialTitleText:function(){return this.options.minimized?this.options.strings.showText:this.options.strings.hideText},_createButton:function(e,i,n,o,s,r){var a=t.DomUtil.create("a",n,o);a.innerHTML=e,a.href="#",a.title=i;var l=t.DomEvent.stopPropagation;return t.DomEvent.on(a,"click",l).on(a,"mousedown",l).on(a,"dblclick",l).on(a,"click",t.DomEvent.preventDefault).on(a,"click",s,r),a},_toggleDisplayButtonClicked:function(){this._userToggledDisplay=!0,this._minimized?this._restore():this._minimize()},_setDisplay:function(t){t!==this._minimized&&(this._minimized?this._restore():this._minimize())},_minimize:function(){this.options.toggleDisplay?(this._container.style.width=this.options.collapsedWidth+"px",this._container.style.height=this.options.collapsedHeight+"px",this._toggleDisplayButton.className+=" minimized-"+this.options.position,this._toggleDisplayButton.title=this.options.strings.showText):this._container.style.display="none",this._minimized=!0,this._onToggle()},_restore:function(){this.options.toggleDisplay?(this._container.style.width=this.options.width+"px",this._container.style.height=this.options.height+"px",this._toggleDisplayButton.className=this._toggleDisplayButton.className.replace("minimized-"+this.options.position,""),this._toggleDisplayButton.title=this.options.strings.hideText):this._container.style.display="block",this._minimized=!1,this._onToggle()},_onMainMapMoved:function(t){if(this._miniMapMoving)this._miniMapMoving=!1;else{var e=this.options.centerFixed||this._mainMap.getCenter();this._mainMapMoving=!0,this._miniMap.setView(e,this._decideZoom(!0)),this._setDisplay(this._decideMinimized())}this._aimingRect.setBounds(this._mainMap.getBounds())},_onMainMapMoving:function(t){this._aimingRect.setBounds(this._mainMap.getBounds())},_onMiniMapMoveStarted:function(t){if(!this.options.centerFixed){var e=this._aimingRect.getBounds(),i=this._miniMap.latLngToContainerPoint(e.getSouthWest()),n=this._miniMap.latLngToContainerPoint(e.getNorthEast());this._lastAimingRectPosition={sw:i,ne:n}}},_onMiniMapMoving:function(e){this.options.centerFixed||!this._mainMapMoving&&this._lastAimingRectPosition&&(this._shadowRect.setBounds(new t.LatLngBounds(this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.sw),this._miniMap.containerPointToLatLng(this._lastAimingRectPosition.ne))),this._shadowRect.setStyle({opacity:1,fillOpacity:.3}))},_onMiniMapMoved:function(t){this._mainMapMoving?this._mainMapMoving=!1:(this._miniMapMoving=!0,this._mainMap.setView(this._miniMap.getCenter(),this._decideZoom(!1)),this._shadowRect.setStyle({opacity:0,fillOpacity:0}))},_isZoomLevelFixed:function(){var t=this.options.zoomLevelFixed;return this._isDefined(t)&&this._isInteger(t)},_decideZoom:function(t){if(this._isZoomLevelFixed())return t?this.options.zoomLevelFixed:this._mainMap.getZoom();if(t)return this._mainMap.getZoom()+this.options.zoomLevelOffset;var e,i=this._miniMap.getZoom()-this._mainMap.getZoom(),n=this._miniMap.getZoom()-this.options.zoomLevelOffset;return i>this.options.zoomLevelOffset&&this._mainMap.getZoom()<this._miniMap.getMinZoom()-this.options.zoomLevelOffset?this._miniMap.getZoom()>this._lastMiniMapZoom?(e=this._mainMap.getZoom()+1,this._miniMap.setZoom(this._miniMap.getZoom()-1)):e=this._mainMap.getZoom():e=n,this._lastMiniMapZoom=this._miniMap.getZoom(),e},_decideMinimized:function(){return this._userToggledDisplay?this._minimized:this.options.autoToggleDisplay?!!this._mainMap.getBounds().contains(this._miniMap.getBounds()):this._minimized},_isInteger:function(t){return"number"==typeof t},_isDefined:function(t){return void 0!==t},_onToggle:function(){t.Util.requestAnimFrame((function(){t.DomEvent.on(this._container,"transitionend",this._fireToggleEvents,this),t.Browser.any3d||t.Util.requestAnimFrame(this._fireToggleEvents,this)}),this)},_fireToggleEvents:function(){t.DomEvent.off(this._container,"transitionend",this._fireToggleEvents,this);var e={minimized:this._minimized};this.fire(this._minimized?"minimize":"restore",e),this.fire("toggle",e)}});return t.Map.mergeOptions({miniMapControl:!1}),t.Map.addInitHook((function(){this.options.miniMapControl&&(this.miniMapControl=(new e).addTo(this))})),e}),window));var Mn=ve('<div id="map-position" class="svelte-1k961ph"><div id="map-position-inner"> <a target="_blank" rel="noreferrer">view on osm.org</a> <br> <br> <br> <br> </div> <div id="map-position-close" class="svelte-1k961ph"><a href="#hide">hide</a></div></div>');function kn(t,e){let i;le(e,!1);let n=E(),o=E(),s=E(),r=E(),a=E(),l=E();function h(t,e){S(n,t.getCenter().lat.toFixed(5)+","+t.getCenter().lng.toFixed(5)),S(r,function(t){return"https://openstreetmap.org/#map="+t.getZoom()+"/"+t.getCenter().lat.toFixed(5)+"/"+t.getCenter().lng.toFixed(5)}(t)),S(o,t.getZoom()),S(s,function(t){var e=t.getBounds(),i=e.getWest(),n=e.getEast();return n-i>=360&&(i=t.getCenter().lng-179.999,n=t.getCenter().lng+179.999),n=L.latLng(77,n).wrap().lng,[(i=L.latLng(77,i).wrap().lng).toFixed(5),e.getNorth().toFixed(5),n.toFixed(5),e.getSouth().toFixed(5)].join(",")}(t)),S(l,"-"),e&&S(l,[e.lat.toFixed(5),e.lng.toFixed(5)].join(",")),i&&S(a,[i.lat.toFixed(5),i.lng.toFixed(5)].join(","))}xi.subscribe((t=>{t&&(t.on("move",(function(){h(t)})),t.on("mousemove",(function(e){h(t,e.latlng)})),t.on("click",(function(e){i=e.latlng,h(t)})),t.on("load",(function(){h(t)})))})),Qe();var c=Mn(),u=q(c),d=q(u),p=V(d),f=V(p,3),_=V(f,2),m=V(_,2),g=V(m,2),v=q(V(u,2));lt((()=>{Te(d,`map center: ${oe(n)??""} `),$e(p,"href",oe(r)),Te(f,` map zoom: ${oe(o)??""} `),Te(_,` viewbox: ${oe(s)??""} `),Te(m,` last click: ${oe(a)??""} `),Te(g,` mouse position: ${oe(l)??""}`)})),fe("click",v,(function(){document.getElementById("map-position").style.display="none",document.getElementById("show-map-position").style.display="block"})),we(t,c),he()}var Cn=ve('<!> <div id="map" class="svelte-1vbvdrk"></div> <button id="show-map-position" class="leaflet-bar btn btn-sm btn-outline-secondary svelte-1vbvdrk">show map bounds</button>',1);function En(t,e){le(e,!1);let i=ri(e,"display_minimap",8,!1),n=ri(e,"current_result",8,null),o=ri(e,"position_marker",8,null),s=[];function r(t){let e=function(t){const e=Nominatim_Config.Map_Tile_Attribution;let n=new Tn.map(t,{attributionControl:!1,scrollWheelZoom:!0,touchZoom:!1,center:[Nominatim_Config.Map_Default_Lat,Nominatim_Config.Map_Default_Lon],zoom:Nominatim_Config.Map_Default_Zoom});if(void 0!==Nominatim_Config.Map_Default_Bounds&&Nominatim_Config.Map_Default_Bounds&&n.fitBounds(Nominatim_Config.Map_Default_Bounds),e&&e.length&&Tn.control.attribution({prefix:'<a href="https://leafletjs.com/">Leaflet</a>'}).addTo(n),Tn.tileLayer(Nominatim_Config.Map_Tile_URL,{attribution:e}).addTo(n),i()){let t=new Tn.TileLayer(Nominatim_Config.Map_Tile_URL,{minZoom:0,maxZoom:13,attribution:e});new Tn.Control.MiniMap(t,{toggleDisplay:!0}).addTo(n)}const o=Tn.Control.extend({options:{position:"topright"},onAdd:()=>document.getElementById("show-map-position")});return n.addControl(new o),n}(t);return xi.set(e),a(n()),{destroy:()=>{xi.set(null),e.remove()}}}function a(t){let e=pi(xi);if(!e)return;if(function(){let t=pi(xi);t&&s.forEach((function(e){t.removeLayer(e)}))}(),o()){let t=Tn.circleMarker(o(),{radius:5,weight:2,fillColor:"#ff7800",color:"red",opacity:.75,zIndexOffset:100,clickable:!1});t.bindTooltip(`Search (${o()[0]},${o()[1]})`).openTooltip(),t.addTo(e),s.push(t)}var i=new URLSearchParams(window.location.search).get("viewbox");if(i){let t=i.split(","),n=Tn.latLngBounds([t[1],t[0]],[t[3],t[2]]),o=Tn.rectangle(n,{color:"#69d53e",weight:3,dashArray:"5 5",opacity:.8,fill:!1,interactive:!1});e.addLayer(o),s.push(o)}if(!t)return;let n=t.centroid?t.centroid.coordinates[1]:t.lat,r=t.centroid?t.centroid.coordinates[0]:t.lon,a=t.geometry||t.geojson;if(n&&r){let t=Tn.circleMarker([n,r],{radius:10,weight:2,fillColor:"#ff7800",color:"blue",opacity:.75});o()&&t.bindTooltip("Result").openTooltip(),e.addLayer(t),s.push(t)}if(a){var l=Tn.geoJson({type:"FeatureCollection",features:[{type:"Feature",geometry:a,properties:{}}]},{style:()=>({interactive:!1,color:"blue"})});e.addLayer(l),s.push(l),e.fitBounds(l.getBounds())}else n&&r&&o()?e.fitBounds([[n,r],o()],{padding:[50,50]}):n&&r&&e.setView([n,r],10)}st((()=>ce(n())),(()=>{a(n())})),rt(),Qe();var l=Cn(),h=U(l);kn(h,{});var c=V(h,2);!function(t,e,i){ot((()=>{var n=se((()=>e(t,i?.())||{}));if(n?.destroy)return()=>n.destroy()}))}(c,(t=>r(t))),fe("click",V(c,2),Xe((function(t){t.target.style.display="none",document.getElementById("map-position").style.display="block"}))),we(t,l),he()}var An=ve('<!> <div id="content" class="svelte-1d53ob0"><div class="sidebar svelte-1d53ob0"><!></div> <div id="map-wrapper" class="svelte-1d53ob0"><!></div></div>',1);function Sn(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i);let o=E(),s=E();st((()=>n()),(()=>{let t=n();"search"===t.tab&&function(t){Bi(),S(o,{q:t.get("q"),street:t.get("street"),city:t.get("city"),county:t.get("county"),state:t.get("state"),country:t.get("country"),postalcode:t.get("postalcode"),polygon_geojson:Nominatim_Config.Search_AreaPolygons?1:0,viewbox:t.get("viewbox"),bounded:t.get("bounded"),dedupe:t.has("dedupe")&&"1"!==t.get("dedupe")?0:1,"accept-language":t.get("accept-language"),countrycodes:t.get("countrycodes"),layer:t.get("layer"),limit:t.get("limit"),polygon_threshold:t.get("polygon_threshold"),exclude_place_ids:t.get("exclude_place_ids"),format:"jsonv2"});let e=oe(o).street||oe(o).city||oe(o).county||oe(o).state||oe(o).country||oe(o).postalcode;oe(o).q||e?Oi("search",oe(o),(function(t){Li.set(t),e?(Bi("Result for "+[oe(o).street,oe(o).city,oe(o).county,oe(o).state,oe(o).country,oe(o).postalcode].filter((t=>t&&t.length>1)).join(", ")),document.querySelector(".nav-tabs a[href='#structured']").click(),document.querySelector("input[name=street]").focus()):(Bi("Result for "+oe(o).q),document.querySelector("input[name=q]").focus())})):Li.set(void 0)}(t.params)})),rt(),Qe();var r=An(),a=U(r);tn(a,{children:(t,e)=>{an(t,{get api_request_params(){return oe(o)},bStructuredSearch:undefined})},$$slots:{default:!0}});var l=q(V(a,2));vn(q(l),{get current_result(){return oe(s)},set current_result(t){S(s,t)},reverse_search:!1,$$legacy:!0}),En(q(V(l,2)),{get current_result(){return oe(s)},display_minimap:!0}),we(t,r),he()}var On=ve("<option> </option>"),zn=ve('<div class="col-auto"><label for="reverse-lat" class="svelte-1s4hp9x">lat</label></div> <div class="col-auto"><input id="reverse-lat" name="lat" type="text" class="form-control form-control-sm d-inline svelte-1s4hp9x" placeholder="latitude" pattern="^-?\\d+(\\.\\d+)?$"></div> <div class="col-auto"><button id="switch-coords" class="btn btn-outline-secondary btn-sm svelte-1s4hp9x" title="switch lat and lon"><></button></div> <div class="col-auto"><label for="reverse-lon" class="svelte-1s4hp9x">lon</label></div> <div class="col-auto"><input id="reverse-lon" name="lon" type="text" class="form-control form-control-sm svelte-1s4hp9x" placeholder="longitude" pattern="^-?\\d+(\\.\\d+)?$"></div> <div class="col-auto"><label for="reverse-zoom" class="svelte-1s4hp9x">max zoom</label></div> <div class="col-auto"><select id="reverse-zoom" name="zoom" class="form-select form-select-sm svelte-1s4hp9x"><option>---</option><!></select></div> <input type="hidden" name="layer"> <div class="col-auto"><button type="submit" class="btn btn-primary btn-sm mx-1">Search</button></div>',1),In=ve('<!> <details id="searchAdvancedOptions" class="mt-2 svelte-1s4hp9x"><summary><small>Advanced options</small></summary> <ul class="svelte-1s4hp9x"><li class="svelte-1s4hp9x"><label for="option_layer" class="svelte-1s4hp9x">Layer</label> <input id="option_layer" name="layer" placeholder="e.g. address,poi,railway,natural,manmade" data-api-param="layer" class="form-control form-control-sm d-inline w-auto api-param-setting"></li></ul></details>',1);function Dn(t,e){le(e,!1);let i=ri(e,"lat",12,""),n=ri(e,"lon",12,""),o=ri(e,"zoom",12,""),s=ri(e,"api_request_params",24,(()=>({})));function r(t,e,i){if(null===t||null===e)return;let n=new URLSearchParams;n.set("lat",t),n.set("lon",e),n.set("zoom",o()),Ei("reverse",n)}const a=xi.subscribe((t=>{t&&t.on("click",(t=>{let e=t.latlng.wrap();r(e.lat.toFixed(5),e.lng.toFixed(5))}))}));function l(t){var e=t.target.value.split(/,|%2C/);2===e.length&&(document.querySelector("input[name=lat]").value=L.Util.trim(e[0]),document.querySelector("input[name=lon]").value=L.Util.trim(e[1]))}var h;h=a,null===qt&&Pt(),ai((()=>()=>se(h))),Qe();var c=In(),u=U(c);nn(u,{page:"reverse",children:(t,e)=>{var a=zn(),h=V(U(a),2),c=q(h),u=V(h,2),d=q(u),p=V(u,4),f=q(p),_=V(p,4),m=q(_);lt((()=>{o(),function(t){var e=Ht,i=Wt;Ht=!0,Wt=new Set;var n,o=Wt;try{se(t)}finally{if(Ht=e,Ht)for(n of Wt)i.add(n);Wt=i}for(n of o)if(65536&n.f)for(const t of n.deps||[])2&t.f||A(t,null);else A(n,null)}((()=>{}))}));var g=q(m);g.value=(g.__value="",""),Ae(V(g),1,wi,Ee,((t,e,i)=>{var n=On();n.value=null==(n.__value=i)?"":i;var o=q(n);lt((()=>Te(o,`${i??""} - ${oe(e)??""}`))),we(t,n)}));var v=V(_,2);lt((()=>Ze(v,s().layer||""))),qe(c,i),fe("change",c,l),fe("click",d,Je(Xe((()=>r(n(),i()))))),qe(f,n),Ge(m,o),we(t,a)},$$slots:{default:!0}});var d=V(u,2),p=V(q(d),2),f=q(p),_=V(q(f),2);lt((()=>Ze(_,s().layer||""))),fe("change",_,(function(t){document.querySelector("input[name="+t.target.dataset.apiParam+"]").value=t.target.value})),we(t,c),he()}var Bn=ve('<!> <div id="content" class="svelte-1d53ob0"><div class="sidebar svelte-1d53ob0"><!></div> <div id="map-wrapper" class="svelte-1d53ob0"><!></div></div>',1);function Nn(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i);let o=E(),s=E(),r=E();st((()=>n()),(()=>{let t=n();var e;"reverse"===t.tab&&(e=t.params,Bi(),S(o,{lat:e.get("lat"),lon:e.get("lon"),zoom:e.get("zoom")>1?Number(e.get("zoom")):Number(Nominatim_Config.Reverse_Default_Search_Zoom),layer:e.get("layer"),format:"jsonv2"}),oe(o).lat&&oe(o).lon?Oi("reverse",oe(o),(function(t){S(r,[oe(o).lat,oe(o).lon]),t&&!t.error?Li.set([t]):Li.set([]),Bi("Reverse result for "+oe(o).lat+","+oe(o).lon),document.querySelector("input[name=lat]").focus()})):Li.set(void 0))})),rt(),Qe();var a=Bn(),l=U(a);tn(l,{children:(t,e)=>{Dn(t,{get lat(){return oe(o).lat},get lon(){return oe(o).lon},get zoom(){return oe(o).zoom},get api_request_params(){return oe(o)}})},$$slots:{default:!0}});var h=q(V(l,2));vn(q(h),{get current_result(){return oe(s)},set current_result(t){S(s,t)},reverse_search:!0,$$legacy:!0}),En(q(V(h,2)),{get current_result(){return oe(s)},get position_marker(){return oe(r)},display_minimap:!0}),we(t,a),he()}var Zn=ve('<form class="form-inline svelte-1kvo9ki" action="details.html"><div class="row g-1"><div class="col-auto"><input type="edit" class="form-control form-control-sm me-1 svelte-1kvo9ki" pattern="^[1-9][0-9]*$|^[NWRnwr]-?[1-9][0-9]*$|.*openstreetmap.*"></div> <div class="col-auto"><button type="submit" class="btn btn-primary btn-sm">Show</button></div></div></form> <small class="form-text text-muted svelte-1kvo9ki">OSM type+id (<em class="svelte-1kvo9ki">N123</em>, <em class="svelte-1kvo9ki">n123</em>, <em class="svelte-1kvo9ki">W123</em>, <em class="svelte-1kvo9ki">w123</em>, <em class="svelte-1kvo9ki">R123</em>, <em class="svelte-1kvo9ki">r123</em>),\n Place id (<em class="svelte-1kvo9ki">1234</em>) or\n URL (<em class="svelte-1kvo9ki">https://openstreetmap.org/way/123</em>)</small>',1);var jn=ve('<span class="noname">No Name</span>'),$n=ve('<tr class="svelte-6a43i0"><td class="name fw-bold svelte-6a43i0"><!></td><td class="svelte-6a43i0"> </td><td class="svelte-6a43i0"><!></td><td class="svelte-6a43i0"> </td><td class="svelte-6a43i0"> </td><td class="svelte-6a43i0"><!></td><td class="svelte-6a43i0"><!></td></tr>');function Rn(t,e){le(e,!1);const i=E(),n=E();let o=ri(e,"addressLine",8),s=ri(e,"bDistanceInMeters",8),r=ri(e,"bMarkUnusedLines",8,!1),a=ri(e,"sCountryCode",8);st((()=>ce(o())),(()=>{S(i,o().isaddress)})),st((()=>{}),(()=>{S(n,Nominatim_Config.Reverse_Only)})),rt(),Qe();var l=$n(),h=q(l);ke(q(h),(()=>o().localname),(t=>{var e=ye();lt((()=>Te(e,o().localname))),we(t,e)}),(t=>{we(t,jn())}));var c=V(h),u=q(c);lt((()=>{return Te(u,(t=o(),e=t.class+":"+t.type,t.type&&"administrative"===t.type&&t.place_type&&(e=e+" ("+t.place_type+")"),gi(e)));var t,e}));var d=V(c);De(q(d),(()=>yi(o())));var p=V(d),f=q(p),_=V(p),m=q(_);lt((()=>{return Te(m,(t=o().admin_level)&&t<15?t:"");var t}));var g=V(_);De(q(g),(()=>{return t=o().distance,s()?t<1?"0":'<abbr class="distance" title="'+t+' meters">~'+(t>=1e3?Math.round(t/1e3,1)+" km":Math.round(t,0)+" m")+"</abbr>":0===t?"0":'<abbr class="distance" title="spheric distance '+t+'">~'+Math.round(1e3*t,4)/1e3+"</abbr>";var t})),ke(q(V(g)),(()=>o().osm_id),(t=>{hn(t,{get feature(){return o()},children:(t,e)=>{we(t,ye("details"))},$$slots:{default:!0}})}),(t=>{var e=be();ke(U(e),(()=>!oe(n)&&o().type.match(/^country/)),(t=>{var e=G((()=>({country:o().localname})));Zi(t,{page:"search",get params_hash(){return oe(e)},children:(t,e)=>{we(t,ye("search by name"))},$$slots:{default:!0}})}),(t=>{var e=be();ke(U(e),(()=>!oe(n)&&"postcode"===o().type),(t=>{var e=G((()=>({postalcode:o().localname,country:a()})));Zi(t,{page:"search",get params_hash(){return oe(e)},children:(t,e)=>{we(t,ye("search by name"))},$$slots:{default:!0}})}),null,!0),we(t,e)}),!0),we(t,e)})),lt((()=>{He(l,"notused",r()&&!oe(i)),Te(f,o().rank_address)})),we(t,l),he()}var Fn=ve('(<a href="#openHint">how?</a>) <div id="postcode-hint" class="my-2 p-2 svelte-6dtaih"><button type="button" class="btn-close float-end m-1" aria-label="Close"></button> <p>Nightly calculated from nearby places having this postcode. <a href="https://nominatim.org/release-docs/latest/admin/Maintenance/#updating-postcodes">Documentation</a>.</p> <p>You can search for those with an <a target="_blank" rel="noreferrer">Overpass Turbo query</a>.</p> <p><a href="https://nominatim.org/2022/06/26/state-of-postcodes.html" target="_blank" rel="noreferrer">How Nominatim uses postcodes</a>.</p></div>',1);var Hn=ve('<tr><td class="svelte-1184nr4"> </td><td class="svelte-1184nr4"><!></td></tr>');function Wn(t,e){let i=ri(e,"title",8);var n=Hn(),o=q(n),s=q(o);Be(q(V(o)),e,"default",{}),lt((()=>Te(s,i()))),we(t,n)}var qn=ve('<div class="line"><span class="name svelte-ndknvb"> </span> </div>');function Un(t,e){le(e,!1);let i=ri(e,"items",8);Qe();var n=be();Ae(U(n),1,(()=>Object.keys(i())),Ee,((t,e)=>{var n=qn(),o=q(n),s=q(o),r=V(o);lt((()=>{Te(s,i()[oe(e)]),Te(r,` (${oe(e)??""})`)})),we(t,n)})),we(t,n),he()}var Vn=ve('<span class="noname fw-bold">No Name</span>'),Kn=ve(" <!>",1),Gn=ve(' <a href="https://nominatim.org/release-docs/develop/api/Output/#place_id-is-not-a-persistent-id">on this server</a>)',1),Yn=ve(" <!>",1),Xn=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h2 class="svelte-1bl6i9w">Linked Places</h2></td></tr> <!>',1),Jn=ve("<td> </td>"),Qn=ve("<tr><td> </td><!></tr>"),to=ve("<td> </td>"),eo=ve("<tr><td> </td><!></tr>"),io=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h3 class="svelte-1bl6i9w">Address Keywords</h3></td></tr> <!>',1),no=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h3 class="svelte-1bl6i9w">Name Keywords</h3></td></tr> <!> <!>',1),oo=ve("<tr><td>Place has no keywords</td></tr>"),so=ve('<tr><td><a class="btn btn-outline-secondary btn-sm">display keywords</a></td></tr>'),ro=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h2 class="svelte-1bl6i9w">Keywords</h2></td></tr> <!>',1),ao=ve('<tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h3 class="svelte-1bl6i9w"> </h3></td></tr> <!>',1),lo=ve("<tr><td><p>There are more child objects which are not shown.</p></td></tr>"),ho=ve("<!> <!>",1),co=ve("<tr><td>Place is not parent of other places</td></tr>"),uo=ve('<tr><td><a class="btn btn-outline-secondary btn-sm">display child places</a></td></tr>'),po=ve('<div class="row"><div class="col-sm-10"><h1 class="svelte-1bl6i9w"> <small class="svelte-1bl6i9w"><!></small></h1></div> <div class="col-sm-2 text-end"><!></div></div> <div class="row"><div class="col-md-6"><table id="locationdetails" class="table table-striped table-responsive"><tbody><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></tbody></table></div> <div class="col-md-6"><div id="map-wrapper" class="svelte-1bl6i9w"><!></div></div></div> <div class="row"><div class="col-md-12"><h2 class="svelte-1bl6i9w">Address</h2> <table id="address" class="table table-striped table-small"><thead><tr><th>Local name</th><th>Type</th><th>OSM</th><th>Address rank</th><th>Admin level</th><th>Distance</th><th></th></tr></thead><tbody><!><!><!><tr class="all-columns svelte-1bl6i9w"><td colspan="7" class="svelte-1bl6i9w"><h2 class="svelte-1bl6i9w">Parent Of</h2></td></tr><!></tbody></table></div></div>',1),fo=ve('<!> <div class="container"><!></div>',1);function _o(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i),o=E();let s=E(),r=E(),a=E(),l=E(!1);st((()=>n()),(()=>{let t=n();var e;"details"===t.tab&&(e=t.params,S(a,{place_id:e.get("place_id"),osmtype:e.get("osmtype"),osmid:e.get("osmid"),class:e.get("class"),keywords:e.get("keywords"),addressdetails:1,hierarchy:"1"===e.get("hierarchy")?1:0,group_hierarchy:1,polygon_geojson:1,format:"json"}),S(l,!1),oe(a).place_id||oe(a).osmtype&&oe(a).osmid?(oe(a).place_id?Bi("Details for "+oe(a).place_id):Bi("Details for "+oe(a).osmtype+oe(a).osmid),Oi("details",oe(a),(function(t){window.scrollTo(0,0),S(l,!0),S(s,t&&!t.error?t:void 0)}))):S(s,void 0),S(r,window.location.search))})),st((()=>{}),(()=>{S(o,Nominatim_Config.Reverse_Only)})),rt(),Qe();var h=fo(),c=U(h);tn(c,{children:(t,e)=>{!function(t,e){le(e,!1);let i=ri(e,"api_request_params",24,(()=>({})));Qe();var n=Zn(),o=U(n),s=q(o),r=q(s),a=q(r);lt((()=>Ze(a,(i().osmtype||"")+(i().osmid||"")+(i().place_id||"")))),fe("submit",o,Je((function(t){let e=t.target.querySelector("input[type=edit]").value.trim(),i=e.match(/^\s*([NWR])(-?\d+)\s*$/i)||e.match(/\/(relation|way|node)\/(-?\d+)\s*$/);var n=new URLSearchParams;if(i)n.set("osmtype",i[1].charAt(0).toUpperCase()),n.set("osmid",i[2]);else{if(!e.match(/^\d+$/))return void alert("invalid input");n.set("place_id",e)}Ei("details",n)}))),we(t,n),he()}(t,{get api_request_params(){return oe(a)}})},$$slots:{default:!0}}),ke(q(V(c,2)),(()=>oe(s)),(t=>{var e=po(),i=U(e),n=q(i),l=q(n),h=q(l);lt((()=>Te(h,`${(oe(s).localname||`${vi(oe(s).osm_type)} ${oe(s).osm_id}`)??""} `))),hn(q(V(h)),{get feature(){return oe(s)},children:(t,e)=>{we(t,ye("link to this page"))},$$slots:{default:!0}}),dn(q(V(n,2)),{get aPlace(){return oe(s)}});var c=V(i,2),u=q(c),d=q(u),p=q(d),f=q(p);Wn(f,{title:"Name",children:(t,e)=>{var i=be();ke(U(i),(()=>oe(s).names&&"object"==typeof oe(s).names&&Object.keys(oe(s).names).length),(t=>{Un(t,{get items(){return oe(s).names}})}),(t=>{we(t,Vn())})),we(t,i)},$$slots:{default:!0}});var _=V(f);Wn(_,{title:"Type",children:(t,e)=>{var i=ye();lt((()=>Te(i,`${oe(s).category??""}:${oe(s).type??""}`))),we(t,i)},$$slots:{default:!0}});var m=V(_);Wn(m,{title:"Last Updated",children:(t,e)=>{var i=ye();lt((()=>Te(i,oe(s).indexed_date))),we(t,i)},$$slots:{default:!0}});var g=V(m);ke(g,(()=>function(t){return"boundary"===t.category&&"administrative"===t.type}(oe(s))),(t=>{Wn(t,{title:"Admin Level",children:(t,e)=>{var i=ye();lt((()=>Te(i,oe(s).admin_level))),we(t,i)},$$slots:{default:!0}})}));var v=V(g);Wn(v,{title:"Search Rank",children:(t,e)=>{var i=ye();lt((()=>Te(i,oe(s).rank_search))),we(t,i)},$$slots:{default:!0}});var y=V(v);Wn(y,{title:"Address Rank",children:(t,e)=>{var i=ye();lt((()=>{return Te(i,`${oe(s).rank_address??""} (${t=oe(s).rank_address,(t<4?"other":t<6?"country":t<8?"region":t<10?"state":t<12?"state district":t<14?"county":t<16?"municipality":t<18?"city / town / village":t<20?"city / village district":t<22?"suburb / hamlet":t<24?"neighbourhood":t<26?"city block / square":26===t?"major street":27===t?"minory street / path":t<=30?"house / building":"other")??""})`);var t})),we(t,i)},$$slots:{default:!0}});var b=V(y);ke(b,(()=>oe(s).calculated_importance),(t=>{Wn(t,{title:"Importance",children:(t,e)=>{var i=Kn(),n=U(i);ke(V(n),(()=>!oe(s).importance),(t=>{we(t,ye("(estimated)"))})),lt((()=>Te(n,`${oe(s).calculated_importance??""} `))),we(t,i)},$$slots:{default:!0}})}));var w=V(b);Wn(w,{title:"Coverage",children:(t,e)=>{var i=ye();lt((()=>Te(i,function(t){return t.isarea?"Polygon":"Point"}(oe(s))))),we(t,i)},$$slots:{default:!0}});var x=V(w);Wn(x,{title:"Centre Point (lat,lon)",children:(t,e)=>{var i=ye();lt((()=>Te(i,`${oe(s).centroid.coordinates[1]??""},${oe(s).centroid.coordinates[0]??""}`))),we(t,i)},$$slots:{default:!0}});var L=V(x);Wn(L,{title:"OSM",children:(t,e)=>{var i=be();De(U(i),(()=>yi(oe(s)))),we(t,i)},$$slots:{default:!0}});var T=V(L);Wn(T,{title:"Place Id",children:(t,e)=>{var i=Gn(),n=U(i);lt((()=>Te(n,`${oe(s).place_id??""}\n (`))),we(t,i)},$$slots:{default:!0}});var P=V(T);ke(P,(()=>oe(s).calculated_wikipedia),(t=>{Wn(t,{title:"Wikipedia Calculated",children:(t,e)=>{var i=be();De(U(i),(()=>function(t){if(!t.calculated_wikipedia)return"";var e=t.calculated_wikipedia.split(":",2),i=gi(t.calculated_wikipedia);return'<a href="https://'+gi(e[0])+".wikipedia.org/wiki/"+gi(e[1])+'" target="_blank">'+i+"</a>"}(oe(s)))),we(t,i)},$$slots:{default:!0}})}));var M=V(P);Wn(M,{title:"Computed Postcode",children:(t,e)=>{var i=be();ke(U(i),(()=>oe(s).calculated_postcode),(t=>{var e=Yn(),i=U(e);!function(t,e){le(e,!1);let i=ri(e,"postcode",8),n=ri(e,"lat",8),o=ri(e,"lon",8),s=`\n // Based on the map bounds, you can zoom out and rerun the query\n\n [timeout:30]; // in seconds\n\n // we define a shortcut\n // https://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Turbo_Queries\n {{postcode=${i()}}}\n\n (\n node["addr:postcode"="{{postcode}}"]({{bbox}});\n way["addr:postcode"="{{postcode}}"]({{bbox}});\n relation["addr:postcode"="{{postcode}}"]({{bbox}});\n\n node["postal_code"="{{postcode}}"]({{bbox}});\n way["postal_code"="{{postcode}}"]({{bbox}});\n relation["postal_code"="{{postcode}}"]({{bbox}});\n );\n\n out body;\n >;\n out skel qt;\n `.replace(/^ {4}/gm,""),r="https://overpass-turbo.eu/?Q="+encodeURIComponent(s)+"&C="+encodeURIComponent([n(),o(),15].join(";"))+"&R";Qe();var a=Fn(),l=V(U(a)),h=q(V(l,2)),c=V(h,4);$e(V(q(c)),"href",r),fe("click",l,Je(Xe((function(){document.getElementById("postcode-hint").style.display="block"})))),fe("click",h,Xe((function(){document.getElementById("postcode-hint").style.display="none"}))),we(t,a),he()}(V(i),{get postcode(){return oe(s).calculated_postcode},get lat(){return oe(s).centroid.coordinates[1]},get lon(){return oe(s).centroid.coordinates[0]}}),lt((()=>Te(i,`${oe(s).calculated_postcode??""} `))),we(t,e)})),we(t,i)},$$slots:{default:!0}});var k=V(M);Wn(k,{title:"Address Tags",children:(t,e)=>{Un(t,{get items(){return oe(s).addresstags}})},$$slots:{default:!0}}),Wn(V(k),{title:"Extra Tags",children:(t,e)=>{Un(t,{get items(){return oe(s).extratags}})},$$slots:{default:!0}});var C=q(V(u,2));En(q(C),{get current_result(){return oe(s)}});var E=q(V(c,2)),A=V(q(E),2),S=V(q(A)),O=q(S);ke(O,(()=>oe(s).address),(t=>{var e=be();Ae(U(e),1,(()=>oe(s).address),Ee,((t,e)=>{var i=G((()=>function(t){let e=t.address.find((t=>"country_code"===t.type));return e?e.localname:null}(oe(s))));Rn(t,{get addressLine(){return oe(e)},bMarkUnusedLines:!0,bDistanceInMeters:!1,get sCountryCode(){return oe(i)}})})),we(t,e)}));var z=V(O);ke(z,(()=>oe(s).linked_places),(t=>{var e=Xn();Ae(V(U(e),2),1,(()=>oe(s).linked_places),Ee,((t,e)=>{Rn(t,{get addressLine(){return oe(e)},bMarkUnusedLines:!0,bDistanceInMeters:!0})})),we(t,e)}));var I=V(z);ke(I,(()=>!oe(o)),(t=>{var e=ro();ke(V(U(e),2),(()=>oe(a).keywords),(t=>{var e=be();ke(U(e),(()=>{return(t=oe(s)).keywords&&t.keywords.name&&t.keywords.address&&(t.keywords.name.length>0||t.keywords.address.length>0);var t}),(t=>{var e=no(),i=V(U(e),2);Ae(i,1,(()=>oe(s).keywords.name),Ee,((t,e)=>{var i=Qn(),n=q(i),o=q(n);lt((()=>Te(o,bi(oe(e).token)))),ke(V(n),(()=>oe(e).id),(t=>{var i=Jn(),n=q(i);lt((()=>Te(n,`word id: ${oe(e).id??""}`))),we(t,i)})),we(t,i)})),ke(V(i,2),(()=>oe(s).keywords.address),(t=>{var e=io();Ae(V(U(e),2),1,(()=>oe(s).keywords.address),Ee,((t,e)=>{var i=eo(),n=q(i),o=q(n);lt((()=>Te(o,bi(oe(e).token)))),ke(V(n),(()=>oe(e).id),(t=>{var i=to(),n=q(i);lt((()=>Te(n,`word id: ${oe(e).id??""}`))),we(t,i)})),we(t,i)})),we(t,e)})),we(t,e)}),(t=>{we(t,oo())})),we(t,e)}),(t=>{var e=so(),i=q(e),n=q(i);lt((()=>$e(n,"href",`${oe(r)??""}&keywords=1`))),we(t,e)})),we(t,e)})),ke(V(I,2),(()=>oe(a).hierarchy),(t=>{var e=be();ke(U(e),(()=>oe(s).hierarchy&&"object"==typeof oe(s).hierarchy&&Object.keys(oe(s).hierarchy).length),(t=>{var e=ho(),i=U(e);Ae(i,1,(()=>Object.keys(oe(s).hierarchy)),Ee,((t,e)=>{var i=ao(),n=U(i),o=q(n),r=q(o),a=q(r);Ae(V(n,2),1,(()=>oe(s).hierarchy[oe(e)]),Ee,((t,e)=>{Rn(t,{get addressLine(){return oe(e)},bDistanceInMeters:!0})})),lt((()=>Te(a,oe(e)))),we(t,i)})),ke(V(i,2),(()=>Object.keys(oe(s).hierarchy)>500),(t=>{we(t,lo())})),we(t,e)}),(t=>{we(t,co())})),we(t,e)}),(t=>{var e=uo(),i=q(e),n=q(i);lt((()=>$e(n,"href",`${oe(r)??""}&hierarchy=1`))),we(t,e)})),we(t,e)}),(t=>{var e=be();ke(U(e),(()=>""!==window.location.search&&oe(l)),(t=>{we(t,ye("No such place found."))}),null,!0),we(t,e)})),we(t,h),he()}var mo=ve('<tr><td><!></td><td> </td><td> </td><td> </td><td> </td><td> </td><td> </td><td><a target="josm">josm</a></td></tr>'),go=ve('<!> <div class="container"><div class="row"><div class="col-sm-12"><h1>Broken polygons</h1> <p> </p> <table class="table table-striped table-hover"><thead><tr><th>OSM object</th><th>Class</th><th>Type</th><th>Name</th><th>Country Code</th><th>Error message</th><th>Updated</th><th></th></tr></thead><tbody></tbody></table></div></div></div>',1);var vo=ve("<tr><td><!></td><td> </td><td> </td><td><!></td><td> </td><td> </td></tr>"),yo=ve('<!> <div class="container"><div class="row"><div class="col-sm-12"><h1>Deletable</h1> <p> </p> <table class="table table-striped table-hover"><thead><tr><th>Place id</th><th>Country Code</th><th>Name</th><th>OSM object</th><th>Class</th><th>Type</th></tr></thead><tbody></tbody></table></div></div></div>',1);var bo=ve('<!> <div class="container"><div class="row"><div class="col-sm-12"><h1>Server status</h1> <dl><dt>API Endpoint</dt> <dd><a> </a></dd> <dt>Software version</dt> <dd> </dd> <dt>Database version</dt> <dd> </dd> <dt>Data last updated</dt> <dd> </dd></dl></div></div></div>',1);var wo=ve('<!> <div id="about-help" class="container svelte-1l5yrvt"></div>',1);var xo=ve("<!> <!>",1);const Lo=(To=function(t,e){le(e,!1);const i=oi(),n=()=>ni(Mi,"$page",i),o=E();Ei(),st((()=>n()),(()=>{S(o,n().tab)})),rt(),Qe();var s=xo();fe("popstate",j,(()=>Ei()));var r=U(s);ke(r,(()=>"search"===oe(o)),(t=>{Sn(t,{})}),(t=>{var e=be();ke(U(e),(()=>"reverse"===oe(o)),(t=>{Nn(t,{})}),(t=>{var e=be();ke(U(e),(()=>"details"===oe(o)),(t=>{_o(t,{})}),(t=>{var e=be();ke(U(e),(()=>"deletable"===oe(o)),(t=>{!function(t,e){le(e,!1);let i=E([]);ai((function(){Oi("deletable",{format:"json"},(function(t){S(i,t)})),Bi("Deletable objects")})),Qe();var n=yo(),o=U(n);tn(o,{});var s=q(V(o,2)),r=q(s),a=V(q(r),2),l=q(a),h=V(a,2);Ae(V(q(h)),5,(()=>oe(i)),Ee,((t,e)=>{var i=vo(),n=q(i);hn(q(n),{get feature(){return oe(e)},children:(t,i)=>{var n=ye();lt((()=>Te(n,oe(e).place_id))),we(t,n)},$$slots:{default:!0}});var o=V(n),s=q(o),r=V(o),a=q(r),l=V(r);De(q(l),(()=>yi(oe(e))));var h=V(l),c=q(h),u=q(V(h));lt((()=>{Te(s,oe(e).country_code),Te(a,oe(e).name),Te(c,oe(e).class),Te(u,oe(e).type)})),we(t,i)})),lt((()=>Te(l,`${oe(i).length??""} objects have been deleted in OSM but\n are still in the Nominatim database.`))),we(t,n),he()}(t,{})}),(t=>{var e=be();ke(U(e),(()=>"polygons"===oe(o)),(t=>{!function(t,e){le(e,!1);let i=E([]);ai((function(){Oi("polygons",{format:"json"},(function(t){S(i,t)})),Bi("Broken polygons")})),Qe();var n=go(),o=U(n);tn(o,{});var s=q(V(o,2)),r=q(s),a=V(q(r),2),l=q(a),h=V(a,2);Ae(V(q(h)),5,(()=>oe(i)),Ee,((t,e)=>{var i=mo(),n=q(i);De(q(n),(()=>yi(oe(e))));var o=V(n),s=q(o),r=V(o),a=q(r),l=V(r),h=q(l),c=V(l),u=q(c),d=V(c),p=q(d),f=V(d),_=q(f),m=q(V(f));lt((()=>$e(m,"href",`http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/${vi(oe(e).osm_type)??""}/${oe(e).osm_id??""}/full`))),lt((()=>{Te(s,oe(e).class),Te(a,oe(e).type),Te(h,oe(e).name),Te(u,oe(e).country_code||""),Te(p,oe(e).errormessage),Te(_,oe(e).updated)})),we(t,i)})),lt((()=>Te(l,`Total number of broken polygons: ${oe(i).length??""}.`))),we(t,n),he()}(t,{})}),(t=>{var e=be();ke(U(e),(()=>"status"===oe(o)),(t=>{!function(t,e){le(e,!1);let i=E({}),n=Nominatim_Config;ai((function(){Oi("status",{format:"json"},(function(t){S(i,t)})),Bi("Server status")})),Qe();var o=bo(),s=U(o);tn(s,{});var r=q(V(s,2)),a=q(r),l=V(q(a),2),h=V(q(l),2),c=q(h),u=q(c),d=V(h,4),p=q(d),f=V(d,4),_=q(f),m=q(V(f,4));lt((()=>{$e(c,"href",n.Nominatim_API_Endpoint),Te(u,n.Nominatim_API_Endpoint),Te(p,oe(i).software_version),Te(_,oe(i).database_version),Te(m,oe(i).data_updated)})),we(t,o),he()}(t,{})}),(t=>{var e=be();ke(U(e),(()=>"about"===oe(o)),(t=>{!function(t,e){le(e,!1),ai((()=>{Ii("theme/about-help.html",document.getElementById("about-help"))})),Qe();var i=wo();tn(U(i),{}),we(t,i),he()}(t,{})}),null,!0),we(t,e)}),!0),we(t,e)}),!0),we(t,e)}),!0),we(t,e)}),!0),we(t,e)}),!0),we(t,e)})),function(t){we(t,Ai())}(V(r,2)),we(t,s),he()},Po={target:document.body},function(t,{target:i,anchor:o,props:s={},events:r,context:a,intro:l=!0}){!function(){if(void 0===j){j=window;var t=Element.prototype,e=Node.prototype;$=n(e,"firstChild").get,R=n(e,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}();var h=new Set,c=t=>{for(var e=0;e<t.length;e++){var n=t[e];if(!h.has(n)){h.add(n);var o=Le(n);i.addEventListener(n,_e,{passive:o});var s=Pe.get(n);void 0===s?(document.addEventListener(n,_e,{passive:o}),Pe.set(n,1)):Pe.set(n,s+1)}}};c(e(de)),pe.add(c);var u=void 0,d=function(t){const e=et(64,t,!0);return()=>{ft(e)}}((()=>{var e=o??i.appendChild(F());return ct((()=>{a&&(le({}),qt.c=a),r&&(s.$$events=r),u=t(e,s)||{},a&&he()})),()=>{for(var t of h){i.removeEventListener(t,_e);var n=Pe.get(t);0==--n?(document.removeEventListener(t,_e),Pe.delete(t)):Pe.set(t,n)}pe.delete(c),Me.delete(u),e!==o&&e.parentNode?.removeChild(e)}}));return Me.set(u,d),u}(To,Po));var To,Po;return Lo}();