niris-public-community-components 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -191,7 +191,7 @@ const w=Symbol();class b{get taskComplete(){return this.t||(1===this.i?this.t=ne
191
191
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
192
192
  var(--tw-shadow);
193
193
  }
194
- `;var M;!function(t){t.Number="Number",t.Text="Text",t.Options="Options",t.Date="Date",t.Time="Time"}(M||(M={}));function x(t){var i,s,n,e;for(s=1,n=arguments.length;s<n;s++)for(i in e=arguments[s])t[i]=e[i];return t}var k=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function P(t,i){var s=Array.prototype.slice;if(t.bind)return t.bind.apply(t,s.call(arguments,1));var n=s.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(s.call(arguments)):arguments)}}var T=0;function z(t){return"_leaflet_id"in t||(t._leaflet_id=++T),t._leaflet_id}function $(t,i,s){var n=i[1],e=i[0],o=n-e;return t===n&&s?t:((t-e)%o+o)%o+e}function C(){return!1}function S(t,i){if(!1===i)return t;var s=Math.pow(10,void 0===i?6:i);return Math.round(t*s)/s}function E(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function A(t){return E(t).split(/\s+/)}function O(t,i){for(var s in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?k(t.options):{}),i)t.options[s]=i[s];return t.options}var B=/\{ *([\w_ -]+) *\}/g;var I=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function D(t,i){for(var s=0;s<t.length;s++)if(t[s]===i)return s;return-1}var Z="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function j(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var R=0;function N(t){var i=+new Date,s=Math.max(0,16-(i-R));return R=i+s,window.setTimeout(t,s)}var F=window.requestAnimationFrame||j("RequestAnimationFrame")||N,U=window.cancelAnimationFrame||j("CancelAnimationFrame")||j("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function H(t,i,s){if(!s||F!==N)return F.call(window,P(t,i));t.call(i)}function q(t){t&&U.call(window,t)}function G(){}G.extend=function(t){var i=function(){O(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=i.M=this.prototype,n=k(s);for(var e in n.constructor=i,i.prototype=n,this)Object.prototype.hasOwnProperty.call(this,e)&&"prototype"!==e&&"__super__"!==e&&(i[e]=this[e]);return t.statics&&x(i,t.statics),t.includes&&(!function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=I(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(t.includes),x.apply(null,[n].concat(t.includes))),x(n,t),delete n.statics,delete n.includes,n.options&&(n.options=s.options?k(s.options):{},x(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=n._initHooks.length;t<i;t++)n._initHooks[t].call(this)}},i},G.include=function(t){var i=this.prototype.options;return x(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},G.mergeOptions=function(t){return x(this.prototype.options,t),this},G.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),s="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(s),this};var W={on:function(t,i,s){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var e=0,o=(t=A(t)).length;e<o;e++)this._on(t[e],i,s);return this},off:function(t,i,s){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else{t=A(t);for(var e=1===arguments.length,o=0,h=t.length;o<h;o++)e?this._off(t[o]):this._off(t[o],i,s)}else delete this._events;return this},_on:function(t,i,s,n){if("function"==typeof i){if(!1===this._listens(t,i,s)){s===this&&(s=void 0);var e={fn:i,ctx:s};n&&(e.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)}}else console.warn("wrong listener type: "+typeof i)},_off:function(t,i,s){var n,e,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if("function"==typeof i){var h=this._listens(t,i,s);if(!1!==h){var r=n[h];this._firingCount&&(r.fn=C,this._events[t]=n=n.slice()),n.splice(h,1)}}else console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(e=0,o=n.length;e<o;e++)n[e].fn=C;delete this._events[t]}},fire:function(t,i,s){if(!this.listens(t,s))return this;var n=x({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var e=this._events[t];if(e){this._firingCount=this._firingCount+1||1;for(var o=0,h=e.length;o<h;o++){var r=e[o],a=r.fn;r.once&&this.off(t,a,r.ctx),a.call(r.ctx||this,n)}this._firingCount--}}return s&&this._propagateEvent(n),this},listens:function(t,i,s,n){"string"!=typeof t&&console.warn('"string" type argument expected');var e=i;"function"!=typeof i&&(n=!!i,e=void 0,s=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,e,s))return!0;if(n)for(var h in this._eventParents)if(this._eventParents[h].listens(t,i,s,n))return!0;return!1},_listens:function(t,i,s){if(!this._events)return!1;var n=this._events[t]||[];if(!i)return!!n.length;s===this&&(s=void 0);for(var e=0,o=n.length;e<o;e++)if(n[e].fn===i&&n[e].ctx===s)return e;return!1},once:function(t,i,s){if("object"==typeof t)for(var n in t)this._on(n,t[n],i,!0);else for(var e=0,o=(t=A(t)).length;e<o;e++)this._on(t[e],i,s,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[z(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[z(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,x({layer:t.target,propagatedFrom:t.target},t),!0)}};W.addEventListener=W.on,W.removeEventListener=W.clearAllEventListeners=W.off,W.addOneTimeEventListener=W.once,W.fireEvent=W.fire,W.hasEventListeners=W.listens;var V=G.extend(W);function J(t,i,s){this.x=s?Math.round(t):t,this.y=s?Math.round(i):i}var K=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function X(t,i,s){return t instanceof J?t:I(t)?new J(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new J(t.x,t.y):new J(t,i,s)}function Y(t,i){if(t)for(var s=i?[t,i]:t,n=0,e=s.length;n<e;n++)this.extend(s[n])}function Q(t,i){return!t||t instanceof Y?t:new Y(t,i)}function tt(t,i){if(t)for(var s=i?[t,i]:t,n=0,e=s.length;n<e;n++)this.extend(s[n])}function it(t,i){return t instanceof tt?t:new tt(t,i)}function st(t,i,s){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==s&&(this.alt=+s)}function nt(t,i,s){return t instanceof st?t:I(t)&&"object"!=typeof t[0]?3===t.length?new st(t[0],t[1],t[2]):2===t.length?new st(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new st(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new st(t,i,s)}J.prototype={clone:function(){return new J(this.x,this.y)},add:function(t){return this.clone()._add(X(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(X(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 J(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new J(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=K(this.x),this.y=K(this.y),this},distanceTo:function(t){var i=(t=X(t)).x-this.x,s=t.y-this.y;return Math.sqrt(i*i+s*s)},equals:function(t){return(t=X(t)).x===this.x&&t.y===this.y},contains:function(t){return t=X(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+S(this.x)+", "+S(this.y)+")"}},Y.prototype={extend:function(t){var i,s;if(!t)return this;if(t instanceof J||"number"==typeof t[0]||"x"in t)i=s=X(t);else if(i=(t=Q(t)).min,s=t.max,!i||!s)return this;return this.min||this.max?(this.min.x=Math.min(i.x,this.min.x),this.max.x=Math.max(s.x,this.max.x),this.min.y=Math.min(i.y,this.min.y),this.max.y=Math.max(s.y,this.max.y)):(this.min=i.clone(),this.max=s.clone()),this},getCenter:function(t){return X((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return X(this.min.x,this.max.y)},getTopRight:function(){return X(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 i,s;return(t="number"==typeof t[0]||t instanceof J?X(t):Q(t))instanceof Y?(i=t.min,s=t.max):i=s=t,i.x>=this.min.x&&s.x<=this.max.x&&i.y>=this.min.y&&s.y<=this.max.y},intersects:function(t){t=Q(t);var i=this.min,s=this.max,n=t.min,e=t.max,o=e.x>=i.x&&n.x<=s.x,h=e.y>=i.y&&n.y<=s.y;return o&&h},overlaps:function(t){t=Q(t);var i=this.min,s=this.max,n=t.min,e=t.max,o=e.x>i.x&&n.x<s.x,h=e.y>i.y&&n.y<s.y;return o&&h},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var i=this.min,s=this.max,n=Math.abs(i.x-s.x)*t,e=Math.abs(i.y-s.y)*t;return Q(X(i.x-n,i.y-e),X(s.x+n,s.y+e))},equals:function(t){return!!t&&(t=Q(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},tt.prototype={extend:function(t){var i,s,n=this._southWest,e=this._northEast;if(t instanceof st)i=t,s=t;else{if(!(t instanceof tt))return t?this.extend(nt(t)||it(t)):this;if(i=t._southWest,s=t._northEast,!i||!s)return this}return n||e?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),e.lat=Math.max(s.lat,e.lat),e.lng=Math.max(s.lng,e.lng)):(this._southWest=new st(i.lat,i.lng),this._northEast=new st(s.lat,s.lng)),this},pad:function(t){var i=this._southWest,s=this._northEast,n=Math.abs(i.lat-s.lat)*t,e=Math.abs(i.lng-s.lng)*t;return new tt(new st(i.lat-n,i.lng-e),new st(s.lat+n,s.lng+e))},getCenter:function(){return new st((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 st(this.getNorth(),this.getWest())},getSouthEast:function(){return new st(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 st||"lat"in t?nt(t):it(t);var i,s,n=this._southWest,e=this._northEast;return t instanceof tt?(i=t.getSouthWest(),s=t.getNorthEast()):i=s=t,i.lat>=n.lat&&s.lat<=e.lat&&i.lng>=n.lng&&s.lng<=e.lng},intersects:function(t){t=it(t);var i=this._southWest,s=this._northEast,n=t.getSouthWest(),e=t.getNorthEast(),o=e.lat>=i.lat&&n.lat<=s.lat,h=e.lng>=i.lng&&n.lng<=s.lng;return o&&h},overlaps:function(t){t=it(t);var i=this._southWest,s=this._northEast,n=t.getSouthWest(),e=t.getNorthEast(),o=e.lat>i.lat&&n.lat<s.lat,h=e.lng>i.lng&&n.lng<s.lng;return o&&h},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=it(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},st.prototype={equals:function(t,i){return!!t&&(t=nt(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+S(this.lat,t)+", "+S(this.lng,t)+")"},distanceTo:function(t){return ht.distance(this,nt(t))},wrap:function(){return ht.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,s=i/Math.cos(Math.PI/180*this.lat);return it([this.lat-i,this.lng-s],[this.lat+i,this.lng+s])},clone:function(){return new st(this.lat,this.lng,this.alt)}};var et,ot={latLngToPoint:function(t,i){var s=this.projection.project(t),n=this.scale(i);return this.transformation._transform(s,n)},pointToLatLng:function(t,i){var s=this.scale(i),n=this.transformation.untransform(t,s);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 i=this.projection.bounds,s=this.scale(t);return new Y(this.transformation.transform(i.min,s),this.transformation.transform(i.max,s))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?$(t.lng,this.wrapLng,!0):t.lng;return new st(this.wrapLat?$(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),s=this.wrapLatLng(i),n=i.lat-s.lat,e=i.lng-s.lng;if(0===n&&0===e)return t;var o=t.getSouthWest(),h=t.getNorthEast();return new tt(new st(o.lat-n,o.lng-e),new st(h.lat-n,h.lng-e))}},ht=x({},ot,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var s=Math.PI/180,n=t.lat*s,e=i.lat*s,o=Math.sin((i.lat-t.lat)*s/2),h=Math.sin((i.lng-t.lng)*s/2),r=o*o+Math.cos(n)*Math.cos(e)*h*h,a=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return this.R*a}}),rt=6378137,at={R:rt,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,s=this.MAX_LATITUDE,n=Math.max(Math.min(s,t.lat),-s),e=Math.sin(n*i);return new J(this.R*t.lng*i,this.R*Math.log((1+e)/(1-e))/2)},unproject:function(t){var i=180/Math.PI;return new st((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:(et=rt*Math.PI,new Y([-et,-et],[et,et]))};function ut(t,i,s,n){if(I(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=s,this._d=n}function ct(t,i,s,n){return new ut(t,i,s,n)}ut.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return i=i||1,t.x=i*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new J((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};var ft,lt=x({},ht,{code:"EPSG:3857",projection:at,transformation:(ft=.5/(Math.PI*at.R),ct(ft,.5,-ft,.5))}),dt=x({},lt,{code:"EPSG:900913"});function vt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function mt(t,i){var s,n,e,o,h,r,a="";for(s=0,e=t.length;s<e;s++){for(n=0,o=(h=t[s]).length;n<o;n++)a+=(n?"L":"M")+(r=h[n]).x+" "+r.y;a+=i?Qt.svg?"z":"x":""}return a||"M0 0"}var pt,gt=document.documentElement.style,wt="ActiveXObject"in window,bt=wt&&!document.addEventListener,_t="msLaunchUri"in navigator&&!("documentMode"in document),yt=Yt("webkit"),Mt=Yt("android"),xt=Yt("android 2")||Yt("android 3"),kt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Lt=Mt&&Yt("Google")&&kt<537&&!("AudioNode"in window),Pt=!!window.opera,Tt=!_t&&Yt("chrome"),zt=Yt("gecko")&&!yt&&!Pt&&!wt,$t=!Tt&&Yt("safari"),Ct=Yt("phantom"),St="OTransition"in gt,Et=0===navigator.platform.indexOf("Win"),At=wt&&"transition"in gt,Ot="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!xt,Bt="MozPerspective"in gt,It=!window.L_DISABLE_3D&&(At||Ot||Bt)&&!St&&!Ct,Dt="undefined"!=typeof orientation||Yt("mobile"),Zt=Dt&&yt,jt=Dt&&Ot,Rt=!window.PointerEvent&&window.MSPointerEvent,Nt=!(!window.PointerEvent&&!Rt),Ft="ontouchstart"in window||!!window.TouchEvent,Ut=!window.L_NO_TOUCH&&(Ft||Nt),Ht=Dt&&Pt,qt=Dt&&zt,Gt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Wt=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",C,i),window.removeEventListener("testPassiveEventSupport",C,i)}catch(t){}return t}(),Vt=!!document.createElement("canvas").getContext,Jt=!(!document.createElementNS||!vt("svg").createSVGRect),Kt=!!Jt&&((pt=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(pt.firstChild&&pt.firstChild.namespaceURI)),Xt=!Jt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function Yt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Qt={ie:wt,ielt9:bt,edge:_t,webkit:yt,android:Mt,android23:xt,androidStock:Lt,opera:Pt,chrome:Tt,gecko:zt,safari:$t,phantom:Ct,opera12:St,win:Et,ie3d:At,webkit3d:Ot,gecko3d:Bt,any3d:It,mobile:Dt,mobileWebkit:Zt,mobileWebkit3d:jt,msPointer:Rt,pointer:Nt,touch:Ut,touchNative:Ft,mobileOpera:Ht,mobileGecko:qt,retina:Gt,passiveEvents:Wt,canvas:Vt,svg:Jt,vml:Xt,inlineSvg:Kt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},ti=Qt.msPointer?"MSPointerDown":"pointerdown",ii=Qt.msPointer?"MSPointerMove":"pointermove",si=Qt.msPointer?"MSPointerUp":"pointerup",ni=Qt.msPointer?"MSPointerCancel":"pointercancel",ei={touchstart:ti,touchmove:ii,touchend:si,touchcancel:ni},oi={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&ts(i);li(t,i)},touchmove:li,touchend:li,touchcancel:li},hi={},ri=!1;function ai(t,i,s){return"touchstart"===i&&(ri||(document.addEventListener(ti,ui,!0),document.addEventListener(ii,ci,!0),document.addEventListener(si,fi,!0),document.addEventListener(ni,fi,!0),ri=!0)),oi[i]?(s=oi[i].bind(this,s),t.addEventListener(ei[i],s,!1),s):(console.warn("wrong event specified:",i),C)}function ui(t){hi[t.pointerId]=t}function ci(t){hi[t.pointerId]&&(hi[t.pointerId]=t)}function fi(t){delete hi[t.pointerId]}function li(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var s in i.touches=[],hi)i.touches.push(hi[s]);i.changedTouches=[i],t(i)}}var di=200;var vi,mi,pi,gi,wi,bi=Oi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),_i=Oi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),yi="webkitTransition"===_i||"OTransition"===_i?_i+"End":"transitionend";function Mi(t,i){var s=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!s||"auto"===s)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);s=n?n[i]:null}return"auto"===s?null:s}function xi(t,i,s){var n=document.createElement(t);return n.className=i||"",s&&s.appendChild(n),n}function ki(t){var i=t.parentNode;i&&i.removeChild(t)}function Li(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Pi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function Ti(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function zi(t,i){if(void 0!==t.classList)return t.classList.contains(i);var s=Ei(t);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}function $i(t,i){if(void 0!==t.classList)for(var s=A(i),n=0,e=s.length;n<e;n++)t.classList.add(s[n]);else if(!zi(t,i)){var o=Ei(t);Si(t,(o?o+" ":"")+i)}}function Ci(t,i){void 0!==t.classList?t.classList.remove(i):Si(t,E((" "+Ei(t)+" ").replace(" "+i+" "," ")))}function Si(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function Ei(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Ai(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var s=!1,n="DXImageTransform.Microsoft.Alpha";try{s=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),s?(s.Enabled=100!==i,s.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function Oi(t){for(var i=document.documentElement.style,s=0;s<t.length;s++)if(t[s]in i)return t[s];return!1}function Bi(t,i,s){var n=i||new J(0,0);t.style[bi]=(Qt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(s?" scale("+s+")":"")}function Ii(t,i){t._leaflet_pos=i,Qt.any3d?Bi(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function Di(t){return t._leaflet_pos||new J(0,0)}if("onselectstart"in document)vi=function(){Hi(window,"selectstart",ts)},mi=function(){Gi(window,"selectstart",ts)};else{var Zi=Oi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);vi=function(){if(Zi){var t=document.documentElement.style;pi=t[Zi],t[Zi]="none"}},mi=function(){Zi&&(document.documentElement.style[Zi]=pi,pi=void 0)}}function ji(){Hi(window,"dragstart",ts)}function Ri(){Gi(window,"dragstart",ts)}function Ni(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Fi(),gi=t,wi=t.style.outlineStyle,t.style.outlineStyle="none",Hi(window,"keydown",Fi))}function Fi(){gi&&(gi.style.outlineStyle=wi,gi=void 0,wi=void 0,Gi(window,"keydown",Fi))}function Ui(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}function Hi(t,i,s,n){if(i&&"object"==typeof i)for(var e in i)Ji(t,e,i[e],s);else for(var o=0,h=(i=A(i)).length;o<h;o++)Ji(t,i[o],s,n);return this}var qi="_leaflet_events";function Gi(t,i,s,n){if(1===arguments.length)Wi(t),delete t[qi];else if(i&&"object"==typeof i)for(var e in i)Ki(t,e,i[e],s);else if(i=A(i),2===arguments.length)Wi(t,(function(t){return-1!==D(i,t)}));else for(var o=0,h=i.length;o<h;o++)Ki(t,i[o],s,n);return this}function Wi(t,i){for(var s in t[qi]){var n=s.split(/\d/)[0];i&&!i(n)||Ki(t,n,null,null,s)}}var Vi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ji(t,i,s,n){var e=i+z(s)+(n?"_"+z(n):"");if(t[qi]&&t[qi][e])return this;var o=function(i){return s.call(n||t,i||window.event)},h=o;!Qt.touchNative&&Qt.pointer&&0===i.indexOf("touch")?o=ai(t,i,o):Qt.touch&&"dblclick"===i?o=function(t,i){t.addEventListener("dblclick",i);var s,n=0;function e(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var e=function(t){if(t.composedPath)return t.composedPath();for(var i=[],s=t.target;s;)i.push(s),s=s.parentNode;return i}(t);if(!e.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||e.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var o=Date.now();o-n<=di?2==++s&&i(function(t){var i,s,n={};for(s in t)i=t[s],n[s]=i&&i.bind?i.bind(t):i;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):s=1,n=o}}}else s=t.detail}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}(t,o):"addEventListener"in t?"touchstart"===i||"touchmove"===i||"wheel"===i||"mousewheel"===i?t.addEventListener(Vi[i]||i,o,!!Qt.passiveEvents&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?(o=function(i){i=i||window.event,ns(t,i)&&h(i)},t.addEventListener(Vi[i],o,!1)):t.addEventListener(i,h,!1):t.attachEvent("on"+i,o),t[qi]=t[qi]||{},t[qi][e]=o}function Ki(t,i,s,n,e){e=e||i+z(s)+(n?"_"+z(n):"");var o=t[qi]&&t[qi][e];if(!o)return this;!Qt.touchNative&&Qt.pointer&&0===i.indexOf("touch")?function(t,i,s){ei[i]?t.removeEventListener(ei[i],s,!1):console.warn("wrong event specified:",i)}(t,i,o):Qt.touch&&"dblclick"===i?function(t,i){t.removeEventListener("dblclick",i.dblclick),t.removeEventListener("click",i.simDblclick)}(t,o):"removeEventListener"in t?t.removeEventListener(Vi[i]||i,o,!1):t.detachEvent("on"+i,o),t[qi][e]=null}function Xi(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Yi(t){return Ji(t,"wheel",Xi),this}function Qi(t){return Hi(t,"mousedown touchstart dblclick contextmenu",Xi),t._leaflet_disable_click=!0,this}function ts(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function is(t){return ts(t),Xi(t),this}var ss=Qt.linux&&Qt.chrome?window.devicePixelRatio:Qt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ns(t,i){var s=i.relatedTarget;if(!s)return!0;try{for(;s&&s!==t;)s=s.parentNode}catch(t){return!1}return s!==t}var es=V.extend({run:function(t,i,s,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=s||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Di(t),this._offset=i.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=H(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,s=1e3*this._duration;i<s?this._runFrame(this._easeOut(i/s),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var s=this._startPos.add(this._offset.multiplyBy(t));i&&s._round(),Ii(this._el,s),this.fire("step")},_complete:function(){q(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),os=V.extend({options:{crs:lt,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,i){i=O(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=P(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(nt(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=_i&&Qt.any3d&&!Qt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Hi(this._proxy,yi,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,s){if((i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(nt(t),i,this.options.maxBounds),s=s||{},this._stop(),this._loaded&&!s.reset&&!0!==s)&&(void 0!==s.animate&&(s.zoom=x({animate:s.animate},s.zoom),s.pan=x({animate:s.animate,duration:s.duration},s.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,s.zoom):this._tryAnimatedPan(t,s.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,i,s.pan&&s.pan.noMoveStart),this},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(Qt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(Qt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,s){var n=this.getZoomScale(i),e=this.getSize().divideBy(2),o=(t instanceof J?t:this.latLngToContainerPoint(t)).subtract(e).multiplyBy(1-1/n),h=this.containerPointToLatLng(e.add(o));return this.setView(h,i,{zoom:s})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():it(t);var s=X(i.paddingTopLeft||i.padding||[0,0]),n=X(i.paddingBottomRight||i.padding||[0,0]),e=this.getBoundsZoom(t,!1,s.add(n));if((e="number"==typeof i.maxZoom?Math.min(i.maxZoom,e):e)===1/0)return{center:t.getCenter(),zoom:e};var o=n.subtract(s).divideBy(2),h=this.project(t.getSouthWest(),e),r=this.project(t.getNorthEast(),e);return{center:this.unproject(h.add(r).divideBy(2).add(o),e),zoom:e}},fitBounds:function(t,i){if(!(t=it(t)).isValid())throw new Error("Bounds are not valid.");var s=this._getBoundsCenterZoom(t,i);return this.setView(s.center,s.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(i=i||{},!(t=X(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==i.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 es,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){$i(this._mapPane,"leaflet-pan-anim");var s=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,s,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,s){if(!1===(s=s||{}).animate||!Qt.any3d)return this.setView(t,i,s);this._stop();var n=this.project(this.getCenter()),e=this.project(t),o=this.getSize(),h=this._zoom;t=nt(t),i=void 0===i?h:i;var r=Math.max(o.x,o.y),a=r*this.getZoomScale(h,i),u=e.distanceTo(n)||1,c=1.42,f=c*c;function l(t){var i=(a*a-r*r+(t?-1:1)*f*f*u*u)/(2*(t?a:r)*f*u),s=Math.sqrt(i*i+1)-i;return s<1e-9?-18:Math.log(s)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function v(t){return(Math.exp(t)+Math.exp(-t))/2}var m=l(0);function p(t){return r*(v(m)*function(t){return d(t)/v(t)}(m+c*t)-d(m))/f}var g=Date.now(),w=(l(1)-m)/c,b=s.duration?1e3*s.duration:1e3*w*.8;return this._moveStart(!0,s.noMoveStart),function s(){var o=(Date.now()-g)/b,a=function(t){return 1-Math.pow(1-t,1.5)}(o)*w;o<=1?(this._flyToFrame=H(s,this),this._move(this.unproject(n.add(e.subtract(n).multiplyBy(p(a)/u)),h),this.getScaleZoom(r/function(t){return r*(v(m)/v(m+c*t))}(a),h),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var s=this._getBoundsCenterZoom(t,i);return this.flyTo(s.center,s.zoom,i)},setMaxBounds:function(t){return t=it(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 i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var s=this.getCenter(),n=this._limitCenter(s,this._zoom,it(t));return s.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var s=X((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=X(i.paddingBottomRight||i.padding||[0,0]),e=this.project(this.getCenter()),o=this.project(t),h=this.getPixelBounds(),r=Q([h.min.add(s),h.max.subtract(n)]),a=r.getSize();if(!r.contains(o)){this._enforcingBounds=!0;var u=o.subtract(r.getCenter()),c=r.extend(o).getSize().subtract(a);e.x+=u.x<0?-c.x:c.x,e.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(e),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=x({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),n=i.divideBy(2).round(),e=s.divideBy(2).round(),o=n.subtract(e);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(P(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:s})):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=x({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=P(this._handleGeolocationResponse,this),s=P(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,s,t):navigator.geolocation.getCurrentPosition(i,s,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 i=t.code,s=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+s+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new st(t.coords.latitude,t.coords.longitude),s=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var e=this.getBoundsZoom(s);this.setView(i,n.maxZoom?Math.min(e,n.maxZoom):e)}var o={latlng:i,bounds:s,timestamp:t.timestamp};for(var h in t.coords)"number"==typeof t.coords[h]&&(o[h]=t.coords[h]);this.fire("locationfound",o)}},addHandler:function(t,i){if(!i)return this;var s=this[t]=new i(this);return this._handlers.push(s),this.options[t]&&s.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(),ki(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(q(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ki(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var s=xi("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=s),s},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 tt(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,i,s){t=it(t),s=X(s||[0,0]);var n=this.getZoom()||0,e=this.getMinZoom(),o=this.getMaxZoom(),h=t.getNorthWest(),r=t.getSouthEast(),a=this.getSize().subtract(s),u=Q(this.project(r,n),this.project(h,n)).getSize(),c=Qt.any3d?this.options.zoomSnap:1,f=a.x/u.x,l=a.y/u.y,d=i?Math.max(f,l):Math.min(f,l);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=i?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(e,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new J(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var s=this._getTopLeftPoint(t,i);return new Y(s,s.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,i){var s=this.options.crs;return i=void 0===i?this._zoom:i,s.scale(t)/s.scale(i)},getScaleZoom:function(t,i){var s=this.options.crs;i=void 0===i?this._zoom:i;var n=s.zoom(t*s.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(nt(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(X(t),i)},layerPointToLatLng:function(t){var i=X(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(nt(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(nt(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(it(t))},distance:function(t,i){return this.options.crs.distance(nt(t),nt(i))},containerPointToLayerPoint:function(t){return X(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return X(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(X(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(nt(t)))},mouseEventToContainerPoint:function(t){return function(t,i){if(!i)return new J(t.clientX,t.clientY);var s=Ui(i),n=s.boundingClientRect;return new J((t.clientX-n.left)/s.x-i.clientLeft,(t.clientY-n.top)/s.y-i.clientTop)}(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 i=this._container=function(t){return"string"==typeof t?document.getElementById(t):t}(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");Hi(i,"scroll",this._onScroll,this),this._containerId=z(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Qt.any3d,$i(t,"leaflet-container"+(Qt.touch?" leaflet-touch":"")+(Qt.retina?" leaflet-retina":"")+(Qt.ielt9?" leaflet-oldie":"")+(Qt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=Mi(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&"sticky"!==i&&(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),Ii(this._mapPane,new J(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||($i(t.markerPane,"leaflet-zoom-hide"),$i(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i,s){Ii(this._mapPane,new J(0,0));var n=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var e=this._zoom!==i;this._moveStart(e,s)._move(t,i)._moveEnd(e),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,s,n){void 0===i&&(i=this._zoom);var e=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?s&&s.pinch&&this.fire("zoom",s):((e||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return q(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Ii(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[z(this._container)]=this;var i=t?Gi:Hi;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Qt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){q(this._resizeRequest),this._resizeRequest=H((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,i){for(var s,n=[],e="mouseout"===i||"mouseover"===i,o=t.target||t.srcElement,h=!1;o;){if((s=this._targets[z(o)])&&("click"===i||"preclick"===i)&&this._draggableMoved(s)){h=!0;break}if(s&&s.listens(i,!0)){if(e&&!ns(o,t))break;if(n.push(s),e)break}if(o===this._container)break;o=o.parentNode}return n.length||h||e||!this.listens(i,!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 i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var s=t.type;"mousedown"===s&&Ni(i),this._fireDOMEvent(t,s)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,s){if("click"===t.type){var n=x({},t);n.type="preclick",this._fireDOMEvent(n,n.type,s)}var e=this._findEventTargets(t,i);if(s){for(var o=[],h=0;h<s.length;h++)s[h].listens(i,!0)&&o.push(s[h]);e=o.concat(e)}if(e.length){"contextmenu"===i&&ts(t);var r=e[0],a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=u?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=u?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(h=0;h<e.length;h++)if(e[h].fire(i,a,!0),a.originalEvent._stopped||!1===e[h].options.bubblingMouseEvents&&-1!==D(this._mouseEvents,i))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,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return Di(this._mapPane)||new J(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var s=this.getSize()._divideBy(2);return this.project(t,i)._subtract(s)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,s){var n=this._getNewPixelOrigin(s,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,s){var n=this._getNewPixelOrigin(s,i);return Q([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,s){if(!s)return t;var n=this.project(t,i),e=this.getSize().divideBy(2),o=new Y(n.subtract(e),n.add(e)),h=this._getBoundsOffset(o,s,i);return Math.abs(h.x)<=1&&Math.abs(h.y)<=1?t:this.unproject(n.add(h),i)},_limitOffset:function(t,i){if(!i)return t;var s=this.getPixelBounds(),n=new Y(s.min.add(t),s.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,s){var n=Q(this.project(i.getNorthEast(),s),this.project(i.getSouthWest(),s)),e=n.min.subtract(t.min),o=n.max.subtract(t.max);return new J(this._rebound(e.x,-o.x),this._rebound(e.y,-o.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),s=this.getMaxZoom(),n=Qt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(s,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ci(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var s=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(s))&&(this.panBy(s,i),!0)},_createAnimProxy:function(){var t=this._proxy=xi("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=bi,s=this._proxy.style[i];Bi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),s===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ki(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();Bi(this._proxy,this.project(t,i),this.getZoomScale(i,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,i,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||!1===s.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),e=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==s.animate&&!this.getSize().contains(e))&&(H((function(){this._moveStart(!0,s.noMoveStart||!1)._animateZoom(t,i,!0)}),this),!0)},_animateZoom:function(t,i,s,n){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,$i(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(P(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ci(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))}});var hs=G.extend({options:{position:"topright"},initialize:function(t){O(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),s=this.getPosition(),n=t._controlCorners[s];return $i(i,"leaflet-control"),-1!==s.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ki(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()}});os.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",s=this._controlContainer=xi("div",i+"control-container",this._container);function n(n,e){var o=i+n+" "+i+e;t[n+e]=xi("div",o,s)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ki(this._controlCorners[t]);ki(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rs=hs.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,s,n){return s<n?-1:n<s?1:0}},initialize:function(t,i,s){for(var n in O(this,s),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return hs.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,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(z(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){$i(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?($i(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):Ci(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Ci(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=xi("div",t),s=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Qi(i),Yi(i);var n=this._section=xi("section",t+"-list");s&&(this._map.on("click",this.collapse,this),Hi(i,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var e=this._layersLink=xi("a",t+"-toggle",i);e.href="#",e.title="Layers",e.setAttribute("role","button"),Hi(e,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){ts(t),this._expandSafely()}},this),s||this.expand(),this._baseLayersList=xi("div",t+"-base",n),this._separator=xi("div",t+"-separator",n),this._overlaysList=xi("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&z(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,s){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:s}),this.options.sortLayers&&this._layers.sort(P((function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Li(this._baseLayersList),Li(this._overlaysList),this._layerControlInputs=[];var t,i,s,n,e=0;for(s=0;s<this._layers.length;s++)n=this._layers[s],this._addItem(n),i=i||n.overlay,t=t||!n.overlay,e+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&e>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(z(t.target)),s=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;s&&this._map.fire(s,i)},_createRadioElement:function(t,i){var s='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=s,n.firstChild},_addItem:function(t){var i,s=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+z(this),n),this._layerControlInputs.push(i),i.layerId=z(t.layer),Hi(i,"click",this._onInputClick,this);var e=document.createElement("span");e.innerHTML=" "+t.name;var o=document.createElement("span");return s.appendChild(o),o.appendChild(i),o.appendChild(e),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(s),this._checkDisabledLayers(),s},_onInputClick:function(){if(!this._preventClick){var t,i,s=this._layerControlInputs,n=[],e=[];this._handlingClick=!0;for(var o=s.length-1;o>=0;o--)t=s[o],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||e.push(i);for(o=0;o<e.length;o++)this._map.hasLayer(e[o])&&this._map.removeLayer(e[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,i,s=this._layerControlInputs,n=this._map.getZoom(),e=s.length-1;e>=0;e--)t=s[e],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Hi(t,"click",ts),this.expand();var i=this;setTimeout((function(){Gi(t,"click",ts),i._preventClick=!1}))}}),as=hs.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",s=xi("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",s,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),s},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,i,s,n,e){var o=xi("a",s,n);return o.innerHTML=t,o.href="#",o.title=i,o.setAttribute("role","button"),o.setAttribute("aria-label",i),Qi(o),Hi(o,"click",is),Hi(o,"click",e,this),Hi(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";Ci(this._zoomInButton,i),Ci(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&($i(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&($i(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});os.mergeOptions({zoomControl:!0}),os.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new as,this.addControl(this.zoomControl))}));var us=hs.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",s=xi("div",i),n=this.options;return this._addScales(n,i+"-line",s),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),s},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,s){t.metric&&(this._mScale=xi("div",i,s)),t.imperial&&(this._iScale=xi("div",i,s))},_update:function(){var t=this._map,i=t.getSize().y/2,s=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(s)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),s=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,s,i/t)},_updateImperial:function(t){var i,s,n,e=3.2808399*t;e>5280?(i=e/5280,s=this._getRoundNum(i),this._updateScale(this._iScale,s+" mi",s/i)):(n=this._getRoundNum(e),this._updateScale(this._iScale,n+" ft",n/e))},_updateScale:function(t,i,s){t.style.width=Math.round(this.options.maxWidth*s)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),s=t/i;return i*(s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:1)}}),cs=hs.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Qt.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){O(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=xi("div","leaflet-control-attribution"),Qi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].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 i in this._attributions)this._attributions[i]&&t.push(i);var s=[];this.options.prefix&&s.push(this.options.prefix),t.length&&s.push(t.join(", ")),this._container.innerHTML=s.join(' <span aria-hidden="true">|</span> ')}}});os.mergeOptions({attributionControl:!0}),os.addInitHook((function(){this.options.attributionControl&&(new cs).addTo(this)})),hs.Layers=rs,hs.Zoom=as,hs.Scale=us,hs.Attribution=cs;var fs=G.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}});fs.addTo=function(t,i){return t.addHandler(i,this),this};var ls,ds=Qt.touch?"touchstart mousedown":"mousedown",vs=V.extend({options:{clickTolerance:3},initialize:function(t,i,s,n){O(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=s},enable:function(){this._enabled||(Hi(this._dragStartTarget,ds,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(vs._dragging===this&&this.finishDrag(!0),Gi(this._dragStartTarget,ds,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!zi(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)vs._dragging===this&&this.finishDrag();else if(!(vs._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(vs._dragging=this,this._preventOutline&&Ni(this._element),ji(),vi(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,s=function(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}(this._element);this._startPoint=new J(i.clientX,i.clientY),this._startPos=Di(this._element),this._parentScale=Ui(s);var n="mousedown"===t.type;Hi(document,n?"mousemove":"touchmove",this._onMove,this),Hi(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 i=t.touches&&1===t.touches.length?t.touches[0]:t,s=new J(i.clientX,i.clientY)._subtract(this._startPoint);(s.x||s.y)&&(Math.abs(s.x)+Math.abs(s.y)<this.options.clickTolerance||(s.x/=this._parentScale.x,s.y/=this._parentScale.y,ts(t),this._moved||(this.fire("dragstart"),this._moved=!0,$i(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),$i(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Ii(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){Ci(document.body,"leaflet-dragging"),this._lastTarget&&(Ci(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Gi(document,"mousemove touchmove",this._onMove,this),Gi(document,"mouseup touchend touchcancel",this._onUp,this),Ri(),mi();var i=this._moved&&this._moving;this._moving=!1,vs._dragging=!1,i&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function ms(t,i,s){var n,e,o,h,r,a,u,c,f,l=[1,4,2,8];for(e=0,u=t.length;e<u;e++)t[e]._code=Ms(t[e],i);for(h=0;h<4;h++){for(c=l[h],n=[],e=0,o=(u=t.length)-1;e<u;o=e++)r=t[e],a=t[o],r._code&c?a._code&c||((f=ys(a,r,c,i,s))._code=Ms(f,i),n.push(f)):(a._code&c&&((f=ys(a,r,c,i,s))._code=Ms(f,i),n.push(f)),n.push(r));t=n}return t}function ps(t){for(var i=0,s=0,n=0,e=0;e<t.length;e++){var o=nt(t[e]);i+=o.lat,s+=o.lng,n++}return nt([i/n,s/n])}function gs(t,i){if(!i||!t.length)return t.slice();var s=i*i;return t=function(t,i){for(var s=[t[0]],n=1,e=0,o=t.length;n<o;n++)xs(t[n],t[e])>i&&(s.push(t[n]),e=n);e<o-1&&s.push(t[o-1]);return s}(t,s),t=function(t,i){var s=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(s);n[0]=n[s-1]=1,bs(t,n,i,0,s-1);var e,o=[];for(e=0;e<s;e++)n[e]&&o.push(t[e]);return o}(t,s),t}function ws(t,i,s){return Math.sqrt(ks(t,i,s,!0))}function bs(t,i,s,n,e){var o,h,r,a=0;for(h=n+1;h<=e-1;h++)(r=ks(t[h],t[n],t[e],!0))>a&&(o=h,a=r);a>s&&(i[o]=1,bs(t,i,s,n,o),bs(t,i,s,o,e))}function _s(t,i,s,n,e){var o,h,r,a=n?ls:Ms(t,s),u=Ms(i,s);for(ls=u;;){if(!(a|u))return[t,i];if(a&u)return!1;r=Ms(h=ys(t,i,o=a||u,s,e),s),o===a?(t=h,a=r):(i=h,u=r)}}function ys(t,i,s,n,e){var o,h,r=i.x-t.x,a=i.y-t.y,u=n.min,c=n.max;return 8&s?(o=t.x+r*(c.y-t.y)/a,h=c.y):4&s?(o=t.x+r*(u.y-t.y)/a,h=u.y):2&s?(o=c.x,h=t.y+a*(c.x-t.x)/r):1&s&&(o=u.x,h=t.y+a*(u.x-t.x)/r),new J(o,h,e)}function Ms(t,i){var s=0;return t.x<i.min.x?s|=1:t.x>i.max.x&&(s|=2),t.y<i.min.y?s|=4:t.y>i.max.y&&(s|=8),s}function xs(t,i){var s=i.x-t.x,n=i.y-t.y;return s*s+n*n}function ks(t,i,s,n){var e,o=i.x,h=i.y,r=s.x-o,a=s.y-h,u=r*r+a*a;return u>0&&((e=((t.x-o)*r+(t.y-h)*a)/u)>1?(o=s.x,h=s.y):e>0&&(o+=r*e,h+=a*e)),r=t.x-o,a=t.y-h,n?r*r+a*a:new J(o,h)}function Ls(t){return!I(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}var Ps={project:function(t){return new J(t.lng,t.lat)},unproject:function(t){return new st(t.y,t.x)},bounds:new Y([-180,-90],[180,90])},Ts={R:6378137,R_MINOR:6356752.314245179,bounds:new Y([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,s=this.R,n=t.lat*i,e=this.R_MINOR/s,o=Math.sqrt(1-e*e),h=o*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/Math.pow((1-h)/(1+h),o/2);return n=-s*Math.log(Math.max(r,1e-10)),new J(t.lng*i*s,n)},unproject:function(t){for(var i,s=180/Math.PI,n=this.R,e=this.R_MINOR/n,o=Math.sqrt(1-e*e),h=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(h),a=0,u=.1;a<15&&Math.abs(u)>1e-7;a++)i=o*Math.sin(r),i=Math.pow((1-i)/(1+i),o/2),r+=u=Math.PI/2-2*Math.atan(h*i)-r;return new st(r*s,t.x*s/n)}},zs=x({},ht,{code:"EPSG:3395",projection:Ts,transformation:function(){var t=.5/(Math.PI*Ts.R);return ct(t,.5,-t,.5)}()}),$s=x({},ht,{code:"EPSG:4326",projection:Ps,transformation:ct(1/180,1,-1/180,.5)}),Cs=x({},ot,{projection:Ps,transformation:ct(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var s=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(s*s+n*n)},infinite:!0});ot.Earth=ht,ot.EPSG3395=zs,ot.EPSG3857=lt,ot.EPSG900913=dt,ot.EPSG4326=$s,ot.Simple=Cs;var Ss=V.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[z(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[z(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var s=this.getEvents();i.on(s,this),this.once("remove",(function(){i.off(s,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});os.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=z(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=z(t);return this._layers[i]?(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return z(t)in this._layers},eachLayer:function(t,i){for(var s in this._layers)t.call(i,this._layers[s]);return this},_addLayers:function(t){for(var i=0,s=(t=t?I(t)?t:[t]:[]).length;i<s;i++)this.addLayer(t[i])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[z(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=z(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,s=this._getZoomSpan();for(var n in this._zoomBoundLayers){var e=this._zoomBoundLayers[n].options;t=void 0===e.minZoom?t:Math.min(t,e.minZoom),i=void 0===e.maxZoom?i:Math.max(i,e.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,s!==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 Es=Ss.extend({initialize:function(t,i){var s,n;if(O(this,i),this._layers={},t)for(s=0,n=t.length;s<n;s++)this.addLayer(t[s])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],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 i,s,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(s=this._layers[i])[t]&&s[t].apply(s,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var s in this._layers)t.call(i,this._layers[s]);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 z(t)}}),As=Es.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Es.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),Es.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 tt;for(var i in this._layers){var s=this._layers[i];t.extend(s.getBounds?s.getBounds():s.getLatLng())}return t}}),Os=G.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){O(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var s=this._getIconUrl(t);if(!s){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(s,i&&"IMG"===i.tagName?i: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,i){var s=this.options,n=s[i+"Size"];"number"==typeof n&&(n=[n,n]);var e=X(n),o=X("shadow"===i&&s.shadowAnchor||s.iconAnchor||e&&e.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(s.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),e&&(t.style.width=e.x+"px",t.style.height=e.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Qt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Bs=Os.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 Bs.imagePath&&(Bs.imagePath=this._detectIconPath()),(this.options.imagePath||Bs.imagePath)+Os.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var i=function(t,i,s){var n=i.exec(t);return n&&n[s]};return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=xi("div","leaflet-default-icon-path",document.body),i=Mi(t,"background-image")||Mi(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;var s=document.querySelector('link[href$="leaflet.css"]');return s?s.href.substring(0,s.href.length-11-1):""}}),Is=fs.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new vs(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),$i(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&&Ci(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,s=i._map,n=this._marker.options.autoPanSpeed,e=this._marker.options.autoPanPadding,o=Di(i._icon),h=s.getPixelBounds(),r=s.getPixelOrigin(),a=Q(h.min._subtract(r).add(e),h.max._subtract(r).subtract(e));if(!a.contains(o)){var u=X((Math.max(a.max.x,o.x)-a.max.x)/(h.max.x-a.max.x)-(Math.min(a.min.x,o.x)-a.min.x)/(h.min.x-a.min.x),(Math.max(a.max.y,o.y)-a.max.y)/(h.max.y-a.max.y)-(Math.min(a.min.y,o.y)-a.min.y)/(h.min.y-a.min.y)).multiplyBy(n);s.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Ii(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=H(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&&(q(this._panRequest),this._panRequest=H(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,s=i._shadow,n=Di(i._icon),e=i._map.layerPointToLatLng(n);s&&Ii(s,n),i._latlng=e,t.latlng=e,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){q(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ds=Ss.extend({options:{icon:new Bs,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,i){O(this,i),this._latlng=nt(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 i=this._latlng;return this._latlng=nt(t),this.update(),this.fire("move",{oldLatLng:i,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,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),s=t.icon.createIcon(this._icon),n=!1;s!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(s.title=t.title),"IMG"===s.tagName&&(s.alt=t.alt||"")),$i(s,i),t.keyboard&&(s.tabIndex="0",s.setAttribute("role","button")),this._icon=s,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Hi(s,"focus",this._panOnFocus,this);var e=t.icon.createShadow(this._shadow),o=!1;e!==this._shadow&&(this._removeShadow(),o=!0),e&&($i(e,i),e.alt=""),this._shadow=e,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),e&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Gi(this._icon,"focus",this._panOnFocus,this),ki(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ki(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Ii(this._icon,t),this._shadow&&Ii(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 i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&($i(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Is)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Is(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&&Ai(this._icon,t),this._shadow&&Ai(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var i=this.options.icon.options,s=i.iconSize?X(i.iconSize):X(0,0),n=i.iconAnchor?X(i.iconAnchor):X(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:s.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Zs(t,i){return new Ds(t,i)}var js=Ss.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 O(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)}}),Rs=js.extend({options:{fill:!0,radius:10},initialize:function(t,i){O(this,i),this._latlng=nt(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=nt(t),this.redraw(),this.fire("move",{oldLatLng:i,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 i=t&&t.radius||this._radius;return js.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,s=this._clickTolerance(),n=[t+s,i+s];this._pxBounds=new Y(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()}}),Ns=Rs.extend({initialize:function(t,i,s){if("number"==typeof i&&(i=x({},s,{radius:i})),O(this,i),this._latlng=nt(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 tt(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:js.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,s=this._map,n=s.options.crs;if(n.distance===ht.distance){var e=Math.PI/180,o=this._mRadius/ht.R/e,h=s.project([i+o,t]),r=s.project([i-o,t]),a=h.add(r).divideBy(2),u=s.unproject(a).lat,c=Math.acos((Math.cos(o*e)-Math.sin(i*e)*Math.sin(u*e))/(Math.cos(i*e)*Math.cos(u*e)))/e;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*i)),this._point=a.subtract(s.getPixelOrigin()),this._radius=isNaN(c)?0:a.x-s.project([u,t-c]).x,this._radiusY=a.y-h.y}else{var f=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=s.latLngToLayerPoint(this._latlng),this._radius=this._point.x-s.latLngToLayerPoint(f).x}this._updateBounds()}}),Fs=js.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){O(this,i),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 i,s,n=1/0,e=null,o=ks,h=0,r=this._parts.length;h<r;h++)for(var a=this._parts[h],u=1,c=a.length;u<c;u++){var f=o(t,i=a[u-1],s=a[u],!0);f<n&&(n=f,e=o(t,i,s))}return e&&(e.distance=Math.sqrt(n)),e},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return function(t,i){var s,n,e,o,h,r,a,u;if(!t||0===t.length)throw new Error("latlngs not passed");Ls(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=nt([0,0]),f=it(t);f.getNorthWest().distanceTo(f.getSouthWest())*f.getNorthEast().distanceTo(f.getNorthWest())<1700&&(c=ps(t));var l=t.length,d=[];for(s=0;s<l;s++){var v=nt(t[s]);d.push(i.project(nt([v.lat-c.lat,v.lng-c.lng])))}for(s=0,n=0;s<l-1;s++)n+=d[s].distanceTo(d[s+1])/2;if(0===n)u=d[0];else for(s=0,o=0;s<l-1;s++)if(h=d[s],r=d[s+1],(o+=e=h.distanceTo(r))>n){a=(o-n)/e,u=[r.x-a*(r.x-h.x),r.y-a*(r.y-h.y)];break}var m=i.unproject(X(u));return nt([m.lat+c.lat,m.lng+c.lng])}(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=nt(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new tt,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Ls(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],s=Ls(t),n=0,e=t.length;n<e;n++)s?(i[n]=nt(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new Y;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(),i=new J(t,t);this._rawPxBounds&&(this._pxBounds=new Y([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)]))},_projectLatlngs:function(t,i,s){var n,e,o=t[0]instanceof st,h=t.length;if(o){for(e=[],n=0;n<h;n++)e[n]=this._map.latLngToLayerPoint(t[n]),s.extend(e[n]);i.push(e)}else for(n=0;n<h;n++)this._projectLatlngs(t[n],i,s)},_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 i,s,n,e,o,h,r,a=this._parts;for(i=0,n=0,e=this._rings.length;i<e;i++)for(s=0,o=(r=this._rings[i]).length;s<o-1;s++)(h=_s(r[s],r[s+1],t,s,!0))&&(a[n]=a[n]||[],a[n].push(h[0]),h[1]===r[s+1]&&s!==o-2||(a[n].push(h[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,s=0,n=t.length;s<n;s++)t[s]=gs(t[s],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var s,n,e,o,h,r,a=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,o=this._parts.length;s<o;s++)for(n=0,e=(h=(r=this._parts[s]).length)-1;n<h;e=n++)if((i||0!==n)&&ws(t,r[e],r[n])<=a)return!0;return!1}});Fs._flat=function(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ls(t)};var Us=Fs.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 function(t,i){var s,n,e,o,h,r,a,u,c;if(!t||0===t.length)throw new Error("latlngs not passed");Ls(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var f=nt([0,0]),l=it(t);l.getNorthWest().distanceTo(l.getSouthWest())*l.getNorthEast().distanceTo(l.getNorthWest())<1700&&(f=ps(t));var d=t.length,v=[];for(s=0;s<d;s++){var m=nt(t[s]);v.push(i.project(nt([m.lat-f.lat,m.lng-f.lng])))}for(r=a=u=0,s=0,n=d-1;s<d;n=s++)e=v[s],o=v[n],h=e.y*o.x-o.y*e.x,a+=(e.x+o.x)*h,u+=(e.y+o.y)*h,r+=3*h;c=0===r?v[0]:[a/r,u/r];var p=i.unproject(X(c));return nt([p.lat+f.lat,p.lng+f.lng])}(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var i=Fs.prototype._convertLatLngs.call(this,t),s=i.length;return s>=2&&i[0]instanceof st&&i[0].equals(i[s-1])&&i.pop(),i},_setLatLngs:function(t){Fs.prototype._setLatLngs.call(this,t),Ls(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ls(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,s=new J(i,i);if(t=new Y(t.min.subtract(s),t.max.add(s)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,e=0,o=this._rings.length;e<o;e++)(n=ms(this._rings[e],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,s,n,e,o,h,r,a,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,r=this._parts.length;e<r;e++)for(o=0,h=(a=(i=this._parts[e]).length)-1;o<a;h=o++)s=i[o],n=i[h],s.y>t.y!=n.y>t.y&&t.x<(n.x-s.x)*(t.y-s.y)/(n.y-s.y)+s.x&&(u=!u);return u||Fs.prototype._containsPoint.call(this,t,!0)}}),Hs=As.extend({initialize:function(t,i){O(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,s,n,e=I(t)?t:t.features;if(e){for(i=0,s=e.length;i<s;i++)((n=e[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var h=qs(t,o);return h?(h.feature=Ys(t),h.defaultOptions=h.options,this.resetStyle(h),o.onEachFeature&&o.onEachFeature(t,h),this.addLayer(h)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=x({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(i){this._setLayerStyle(i,t)}),this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function qs(t,i){var s,n,e,o,h="Feature"===t.type?t.geometry:t,r=h?h.coordinates:null,a=[],u=i&&i.pointToLayer,c=i&&i.coordsToLatLng||Ws;if(!r&&!h)return null;switch(h.type){case"Point":return Gs(u,t,s=c(r),i);case"MultiPoint":for(e=0,o=r.length;e<o;e++)s=c(r[e]),a.push(Gs(u,t,s,i));return new As(a);case"LineString":case"MultiLineString":return n=Vs(r,"LineString"===h.type?0:1,c),new Fs(n,i);case"Polygon":case"MultiPolygon":return n=Vs(r,"Polygon"===h.type?1:2,c),new Us(n,i);case"GeometryCollection":for(e=0,o=h.geometries.length;e<o;e++){var f=qs({geometry:h.geometries[e],type:"Feature",properties:t.properties},i);f&&a.push(f)}return new As(a);case"FeatureCollection":for(e=0,o=h.features.length;e<o;e++){var l=qs(h.features[e],i);l&&a.push(l)}return new As(a);default:throw new Error("Invalid GeoJSON object.")}}function Gs(t,i,s,n){return t?t(i,s):new Ds(s,n&&n.markersInheritOptions&&n)}function Ws(t){return new st(t[1],t[0],t[2])}function Vs(t,i,s){for(var n,e=[],o=0,h=t.length;o<h;o++)n=i?Vs(t[o],i-1,s):(s||Ws)(t[o]),e.push(n);return e}function Js(t,i){return void 0!==(t=nt(t)).alt?[S(t.lng,i),S(t.lat,i),S(t.alt,i)]:[S(t.lng,i),S(t.lat,i)]}function Ks(t,i,s,n){for(var e=[],o=0,h=t.length;o<h;o++)e.push(i?Ks(t[o],Ls(t[o])?0:i-1,s,n):Js(t[o],n));return!i&&s&&e.length>0&&e.push(e[0].slice()),e}function Xs(t,i){return t.feature?x({},t.feature,{geometry:i}):Ys(i)}function Ys(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Qs={toGeoJSON:function(t){return Xs(this,{type:"Point",coordinates:Js(this.getLatLng(),t)})}};Ds.include(Qs),Ns.include(Qs),Rs.include(Qs),Fs.include({toGeoJSON:function(t){var i=!Ls(this._latlngs);return Xs(this,{type:(i?"Multi":"")+"LineString",coordinates:Ks(this._latlngs,i?1:0,!1,t)})}}),Us.include({toGeoJSON:function(t){var i=!Ls(this._latlngs),s=i&&!Ls(this._latlngs[0]),n=Ks(this._latlngs,s?2:i?1:0,!0,t);return i||(n=[n]),Xs(this,{type:(s?"Multi":"")+"Polygon",coordinates:n})}}),Es.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(s){i.push(s.toGeoJSON(t).geometry.coordinates)})),Xs(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var s="GeometryCollection"===i,n=[];return this.eachLayer((function(i){if(i.toGeoJSON){var e=i.toGeoJSON(t);if(s)n.push(e.geometry);else{var o=Ys(e);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}})),s?Xs(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var tn=Ss.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,s){this._url=t,this._bounds=it(i),O(this,s)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&($i(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ki(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&&Pi(this._image),this},bringToBack:function(){return this._map&&Ti(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=it(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,i=this._image=t?this._url:xi("img");$i(i,"leaflet-image-layer"),this._zoomAnimated&&$i(i,"leaflet-zoom-animated"),this.options.className&&$i(i,this.options.className),i.onselectstart=C,i.onmousemove=C,i.onload=P(this.fire,this,"load"),i.onerror=P(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),s=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Bi(this._image,s,i)},_reset:function(){var t=this._image,i=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),s=i.getSize();Ii(t,i.min),t.style.width=s.x+"px",t.style.height=s.y+"px"},_updateOpacity:function(){Ai(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()}});tn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:xi("video");if($i(i,"leaflet-image-layer"),this._zoomAnimated&&$i(i,"leaflet-zoom-animated"),this.options.className&&$i(i,this.options.className),i.onselectstart=C,i.onmousemove=C,i.onloadeddata=P(this.fire,this,"load"),t){for(var s=i.getElementsByTagName("source"),n=[],e=0;e<s.length;e++)n.push(s[e].src);this._url=s.length>0?n:[i.src]}else{I(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var h=xi("source");h.src=this._url[o],i.appendChild(h)}}}}),tn.extend({_initImage:function(){var t=this._image=this._url;$i(t,"leaflet-image-layer"),this._zoomAnimated&&$i(t,"leaflet-zoom-animated"),this.options.className&&$i(t,this.options.className),t.onselectstart=C,t.onmousemove=C}});var sn=Ss.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,i){t&&(t instanceof st||I(t))?(this._latlng=nt(t),O(this,i)):(O(this,t),this._source=i),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&&Ai(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Ai(this._container,1),this.bringToFront(),this.options.interactive&&($i(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Ai(this._container,0),this._removeTimeout=setTimeout(P(ki,void 0,this._container),200)):ki(this._container),this.options.interactive&&(Ci(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=nt(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&&Pi(this._container),this},bringToBack:function(){return this._map&&Ti(this._container),this},_prepareOpen:function(t){var i=this._source;if(!i._map)return!1;if(i instanceof As){i=null;var s=this._source._layers;for(var n in s)if(s[n]._map){i=s[n];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=X(this.options.offset),s=this._getAnchor();this._zoomAnimated?Ii(this._container,t.add(s)):i=i.add(t).add(s);var n=this._containerBottom=-i.y,e=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=e+"px"}},_getAnchor:function(){return[0,0]}});os.include({_initOverlay:function(t,i,s,n){var e=i;return e instanceof t||(e=new t(n).setContent(i)),s&&e.setLatLng(s),e}}),Ss.include({_initOverlay:function(t,i,s,n){var e=s;return e instanceof t?(O(e,n),e._source=this):(e=i&&!n?i:new t(n,this)).setContent(s),e}});var nn=sn.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,sn.prototype.openOn.call(this,t)},onAdd:function(t){sn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof js||this._source.on("preclick",Xi))},onRemove:function(t){sn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof js||this._source.off("preclick",Xi))},getEvents:function(){var t=sn.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",i=this._container=xi("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),s=this._wrapper=xi("div",t+"-content-wrapper",i);if(this._contentNode=xi("div",t+"-content",s),Qi(i),Yi(this._contentNode),Hi(i,"contextmenu",Xi),this._tipContainer=xi("div",t+"-tip-container",i),this._tip=xi("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=xi("a",t+"-close-button",i);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',Hi(n,"click",(function(t){ts(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var s=t.offsetWidth;s=Math.min(s,this.options.maxWidth),s=Math.max(s,this.options.minWidth),i.width=s+1+"px",i.whiteSpace="",i.height="";var n=t.offsetHeight,e=this.options.maxHeight,o="leaflet-popup-scrolled";e&&n>e?(i.height=e+"px",$i(t,o)):Ci(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),s=this._getAnchor();Ii(this._container,i.add(s))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,i=parseInt(Mi(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+i,n=this._containerWidth,e=new J(this._containerLeft,-s-this._containerBottom);e._add(Di(this._container));var o=t.layerPointToContainerPoint(e),h=X(this.options.autoPanPadding),r=X(this.options.autoPanPaddingTopLeft||h),a=X(this.options.autoPanPaddingBottomRight||h),u=t.getSize(),c=0,f=0;o.x+n+a.x>u.x&&(c=o.x+n-u.x+a.x),o.x-c-r.x<0&&(c=o.x-r.x),o.y+s+a.y>u.y&&(f=o.y+s-u.y+a.y),o.y-f-r.y<0&&(f=o.y-r.y),(c||f)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,f]))}},_getAnchor:function(){return X(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});os.mergeOptions({closePopupOnClick:!0}),os.include({openPopup:function(t,i,s){return this._initOverlay(nn,t,i,s).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Ss.include({bindPopup:function(t,i){return this._popup=this._initOverlay(nn,this._popup,t,i),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 As||(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){is(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof js?(this._popup._source=i,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 en=sn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){sn.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){sn.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=sn.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=xi("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+z(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,s,n=this._map,e=this._container,o=n.latLngToContainerPoint(n.getCenter()),h=n.layerPointToContainerPoint(t),r=this.options.direction,a=e.offsetWidth,u=e.offsetHeight,c=X(this.options.offset),f=this._getAnchor();"top"===r?(i=a/2,s=u):"bottom"===r?(i=a/2,s=0):"center"===r?(i=a/2,s=u/2):"right"===r?(i=0,s=u/2):"left"===r?(i=a,s=u/2):h.x<o.x?(r="right",i=0,s=u/2):(r="left",i=a+2*(c.x+f.x),s=u/2),t=t.subtract(X(i,s,!0)).add(c).add(f),Ci(e,"leaflet-tooltip-right"),Ci(e,"leaflet-tooltip-left"),Ci(e,"leaflet-tooltip-top"),Ci(e,"leaflet-tooltip-bottom"),$i(e,"leaflet-tooltip-"+r),Ii(e,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Ai(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return X(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});os.include({openTooltip:function(t,i,s){return this._initOverlay(en,t,i,s).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Ss.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(en,this._tooltip,t,i),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 i=t?"off":"on",s={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?s.add=this._openTooltip:(s.mouseover=this._openTooltip,s.mouseout=this.closeTooltip,s.click=this._openTooltip,this._map?this._addFocusListeners():s.add=this._addFocusListeners),this._tooltip.options.sticky&&(s.mousemove=this._moveTooltip),this[i](s),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof As||(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 i="function"==typeof t.getElement&&t.getElement();i&&(Hi(i,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Hi(i,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var i="function"==typeof t.getElement&&t.getElement();i&&i.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 i=this;this._map.once("moveend",(function(){i._openOnceFlag=!1,i._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,s,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),s=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(n)}}),Os.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),s=this.options;if(s.html instanceof Element?(Li(i),i.appendChild(s.html)):i.innerHTML=!1!==s.html?s.html:"",s.bgPos){var n=X(s.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),Os.Default=Bs;var on=Ss.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Qt.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){O(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ki(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Pi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Ti(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,i,s,n,e,o,h,r={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=(t=this._onMoveEnd,i=this.options.updateInterval,s=this,h=function(){n=!1,e&&(o.apply(s,e),e=!1)},o=function(){n?e=arguments:(t.apply(s,arguments),setTimeout(h,i),n=!0)},o)),r.move=this._onMove),this._zoomAnimated&&(r.zoomanim=this._animateZoom),r},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof J?t:new J(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 i,s=this.getPane().children,n=-t(-1/0,1/0),e=0,o=s.length;e<o;e++)i=s[e].style.zIndex,s[e]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Qt.ielt9){Ai(this._container,this.options.opacity);var t=+new Date,i=!1,s=!1;for(var n in this._tiles){var e=this._tiles[n];if(e.current&&e.loaded){var o=Math.min(1,(t-e.loaded)/200);Ai(e.el,o),o<1?i=!0:(e.active?s=!0:this._onOpaqueTile(e),e.active=!0)}}s&&!this._noPrune&&this._pruneTiles(),i&&(q(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this))}},_onOpaqueTile:C,_initContainer:function(){this._container||(this._container=xi("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,i=this.options.maxZoom;if(void 0!==t){for(var s in this._levels)s=Number(s),this._levels[s].el.children.length||s===t?(this._levels[s].el.style.zIndex=i-Math.abs(t-s),this._onUpdateLevel(s)):(ki(this._levels[s].el),this._removeTilesAtZoom(s),this._onRemoveLevel(s),delete this._levels[s]);var n=this._levels[t],e=this._map;return n||((n=this._levels[t]={}).el=xi("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=e.project(e.unproject(e.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,e.getCenter(),e.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:C,_onRemoveLevel:C,_onCreateLevel:C,_pruneTiles:function(){if(this._map){var t,i,s=this._map.getZoom();if(s>this.options.maxZoom||s<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var n=i.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 i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ki(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,s,n){var e=Math.floor(t/2),o=Math.floor(i/2),h=s-1,r=new J(+e,+o);r.z=+h;var a=this._tileCoordsToKey(r),u=this._tiles[a];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),h>n&&this._retainParent(e,o,h,n))},_retainChildren:function(t,i,s,n){for(var e=2*t;e<2*t+2;e++)for(var o=2*i;o<2*i+2;o++){var h=new J(e,o);h.z=s+1;var r=this._tileCoordsToKey(h),a=this._tiles[r];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),s+1<n&&this._retainChildren(e,o,s+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,s,n){var e=Math.round(i);e=void 0!==this.options.maxZoom&&e>this.options.maxZoom||void 0!==this.options.minZoom&&e<this.options.minZoom?void 0:this._clampZoom(e);var o=this.options.updateWhenZooming&&e!==this._tileZoom;n&&!o||(this._tileZoom=e,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==e&&this._update(t),s||this._pruneTiles(),this._noPrune=!!s),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var s in this._levels)this._setZoomTransform(this._levels[s],t,i)},_setZoomTransform:function(t,i,s){var n=this._map.getZoomScale(s,t.zoom),e=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,s)).round();Qt.any3d?Bi(t.el,e,n):Ii(t.el,e)},_resetGrid:function(){var t=this._map,i=t.options.crs,s=this._tileSize=this.getTileSize(),n=this._tileZoom,e=this._map.getPixelWorldBounds(this._tileZoom);e&&(this._globalTileRange=this._pxBoundsToTileRange(e)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/s.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/s.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/s.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/s.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,s=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(s,this._tileZoom),e=i.project(t,this._tileZoom).floor(),o=i.getSize().divideBy(2*n);return new Y(e.subtract(o),e.add(o))},_update:function(t){var i=this._map;if(i){var s=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),e=this._pxBoundsToTileRange(n),o=e.getCenter(),h=[],r=this.options.keepBuffer,a=new Y(e.getBottomLeft().subtract([r,-r]),e.getTopRight().add([r,-r]));if(!(isFinite(e.min.x)&&isFinite(e.min.y)&&isFinite(e.max.x)&&isFinite(e.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&&a.contains(new J(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(s-this._tileZoom)>1)this._setView(t,s);else{for(var f=e.min.y;f<=e.max.y;f++)for(var l=e.min.x;l<=e.max.x;l++){var d=new J(l,f);if(d.z=this._tileZoom,this._isValidTile(d)){var v=this._tiles[this._tileCoordsToKey(d)];v?v.current=!0:h.push(d)}}if(h.sort((function(t,i){return t.distanceTo(o)-i.distanceTo(o)})),0!==h.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(l=0;l<h.length;l++)this._addTile(h[l],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var s=this._globalTileRange;if(!i.wrapLng&&(t.x<s.min.x||t.x>s.max.x)||!i.wrapLat&&(t.y<s.min.y||t.y>s.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return it(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,s=this.getTileSize(),n=t.scaleBy(s),e=n.add(s);return[i.unproject(n,t.z),i.unproject(e,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),s=new tt(i[0],i[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),s=new J(+i[0],+i[1]);return s.z=+i[2],s},_removeTile:function(t){var i=this._tiles[t];i&&(ki(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){$i(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=C,t.onmousemove=C,Qt.ielt9&&this.options.opacity<1&&Ai(t,this.options.opacity)},_addTile:function(t,i){var s=this._getTilePos(t),n=this._tileCoordsToKey(t),e=this.createTile(this._wrapCoords(t),P(this._tileReady,this,t));this._initTile(e),this.createTile.length<2&&H(P(this._tileReady,this,t,null,e)),Ii(e,s),this._tiles[n]={el:e,coords:t,current:!0},i.appendChild(e),this.fire("tileloadstart",{tile:e,coords:t})},_tileReady:function(t,i,s){i&&this.fire("tileerror",{error:i,tile:s,coords:t});var n=this._tileCoordsToKey(t);(s=this._tiles[n])&&(s.loaded=+new Date,this._map._fadeAnimated?(Ai(s.el,0),q(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),i||($i(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Qt.ielt9||!this._map._fadeAnimated?H(this._pruneTiles,this):setTimeout(P(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new J(this._wrapX?$(t.x,this._wrapX):t.x,this._wrapY?$(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new Y(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),hn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=O(this,i)).detectRetina&&Qt.retina&&i.maxZoom>0?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var s=document.createElement("img");return Hi(s,"load",P(this._tileOnLoad,this,i,s)),Hi(s,"error",P(this._tileOnError,this,i,s)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(s.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(s.referrerPolicy=this.options.referrerPolicy),s.alt="",s.src=this.getTileUrl(t),s},getTileUrl:function(t){var i={r:Qt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var s=this._globalTileRange.max.y-t.y;this.options.tms&&(i.y=s),i["-y"]=s}return function(t,i){return t.replace(B,(function(t,s){var n=i[s];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n}))}(this._url,x(i,this.options))},_tileOnLoad:function(t,i){Qt.ielt9?setTimeout(P(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,s){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(s,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom;return this.options.zoomReverse&&(t=i-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=C,i.onerror=C,!i.complete)){i.src=Z;var s=this._tiles[t].coords;ki(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:s})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",Z),on.prototype._removeTile.call(this,t)},_tileReady:function(t,i,s){if(this._map&&(!s||s.getAttribute("src")!==Z))return on.prototype._tileReady.call(this,t,i,s)}});function rn(t,i){return new hn(t,i)}var an=hn.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,i){this._url=t;var s=x({},this.defaultWmsParams);for(var n in i)n in this.options||(s[n]=i[n]);var e=(i=O(this,i)).detectRetina&&Qt.retina?2:1,o=this.getTileSize();s.width=o.x*e,s.height=o.y*e,this.wmsParams=s},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code,hn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),s=this._crs,n=Q(s.project(i[0]),s.project(i[1])),e=n.min,o=n.max,h=(this._wmsVersion>=1.3&&this._crs===$s?[e.y,e.x,o.y,o.x]:[e.x,e.y,o.x,o.y]).join(","),r=hn.prototype.getTileUrl.call(this,t);return r+function(t,i,s){var n=[];for(var e in t)n.push(encodeURIComponent(s?e.toUpperCase():e)+"="+encodeURIComponent(t[e]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+h},setParams:function(t,i){return x(this.wmsParams,t),i||this.redraw(),this}});hn.WMS=an,rn.wms=function(t,i){return new an(t,i)};var un=Ss.extend({options:{padding:.1},initialize:function(t){O(this,t),z(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),$i(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,i){var s=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),e=this._map.project(this._center,i),o=n.multiplyBy(-s).add(e).subtract(this._map._getNewPixelOrigin(t,i));Qt.any3d?Bi(this._container,o,s):Ii(this._container,o)},_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,i=this._map.getSize(),s=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new Y(s,s.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),cn=un.extend({options:{tolerance:0},getEvents:function(){var t=un.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){un.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Hi(t,"mousemove",this._onMouseMove,this),Hi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Hi(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){q(this._redrawRequest),delete this._ctx,ki(this._container),Gi(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){un.prototype._update.call(this);var t=this._bounds,i=this._container,s=t.getSize(),n=Qt.retina?2:1;Ii(i,t.min),i.width=n*s.x,i.height=n*s.y,i.style.width=s.x+"px",i.style.height=s.y+"px",Qt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){un.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[z(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,s=i.next,n=i.prev;s?s.prev=n:this._drawLast=n,n?n.next=s:this._drawFirst=s,delete t._order,delete this._layers[z(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 i,s,n=t.options.dashArray.split(/[, ]+/),e=[];for(s=0;s<n.length;s++){if(i=Number(n[s]),isNaN(i))return;e.push(i)}t.options._dashArray=e}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||H(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_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 i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.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,i=this._redrawBounds;if(this._ctx.save(),i){var s=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,s.x,s.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var s,n,e,o,h=t._parts,r=h.length,a=this._ctx;if(r){for(a.beginPath(),s=0;s<r;s++){for(n=0,e=h[s].length;n<e;n++)o=h[s][n],a[n?"lineTo":"moveTo"](o.x,o.y);i&&a.closePath()}this._fillStroke(a,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,s=this._ctx,n=Math.max(Math.round(t._radius),1),e=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==e&&(s.save(),s.scale(1,e)),s.beginPath(),s.arc(i.x,i.y/e,n,0,2*Math.PI,!1),1!==e&&s.restore(),this._fillStroke(s,t)}},_fillStroke:function(t,i){var s=i.options;s.fill&&(t.globalAlpha=s.fillOpacity,t.fillStyle=s.fillColor||s.color,t.fill(s.fillRule||"evenodd")),s.stroke&&0!==s.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=s.opacity,t.lineWidth=s.weight,t.strokeStyle=s.color,t.lineCap=s.lineCap,t.lineJoin=s.lineJoin,t.stroke())},_onClick:function(t){for(var i,s,n=this._map.mouseEventToLayerPoint(t),e=this._drawFirst;e;e=e.next)(i=e.layer).options.interactive&&i._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(s=i);this._fireEvent(!!s&&[s],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(Ci(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var s,n,e=this._drawFirst;e;e=e.next)(s=e.layer).options.interactive&&s._containsPoint(i)&&(n=s);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&($i(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(P((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,i,s){this._map._fireDOMEvent(i,s||i.type,t)},_bringToFront:function(t){var i=t._order;if(i){var s=i.next,n=i.prev;s&&(s.prev=n,n?n.next=s:s&&(this._drawFirst=s),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))}},_bringToBack:function(t){var i=t._order;if(i){var s=i.next,n=i.prev;n&&(n.next=s,s?s.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}});var fn=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">')}}(),ln={_initContainer:function(){this._container=xi("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(un.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=fn("shape");$i(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=fn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[z(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ki(i),t.removeInteractiveTarget(i),delete this._layers[z(t)]},_updateStyle:function(t){var i=t._stroke,s=t._fill,n=t.options,e=t._container;e.stroked=!!n.stroke,e.filled=!!n.fill,n.stroke?(i||(i=t._stroke=fn("stroke")),e.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=I(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(e.removeChild(i),t._stroke=null),n.fill?(s||(s=t._fill=fn("fill")),e.appendChild(s),s.color=n.fillColor||n.color,s.opacity=n.fillOpacity):s&&(e.removeChild(s),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),s=Math.round(t._radius),n=Math.round(t._radiusY||s);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+s+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){Pi(t._container)},_bringToBack:function(t){Ti(t._container)}},dn=Qt.vml?fn:vt,vn=un.extend({_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ki(this._container),Gi(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){un.prototype._update.call(this);var t=this._bounds,i=t.getSize(),s=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,s.setAttribute("width",i.x),s.setAttribute("height",i.y)),Ii(s,t.min),s.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=dn("path");t.options.className&&$i(i,t.options.className),t.options.interactive&&$i(i,"leaflet-interactive"),this._updateStyle(t),this._layers[z(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ki(t._path),t.removeInteractiveTarget(t._path),delete this._layers[z(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,s=t.options;i&&(s.stroke?(i.setAttribute("stroke",s.color),i.setAttribute("stroke-opacity",s.opacity),i.setAttribute("stroke-width",s.weight),i.setAttribute("stroke-linecap",s.lineCap),i.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?i.setAttribute("stroke-dasharray",s.dashArray):i.removeAttribute("stroke-dasharray"),s.dashOffset?i.setAttribute("stroke-dashoffset",s.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),s.fill?(i.setAttribute("fill",s.fillColor||s.color),i.setAttribute("fill-opacity",s.fillOpacity),i.setAttribute("fill-rule",s.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,mt(t._parts,i))},_updateCircle:function(t){var i=t._point,s=Math.max(Math.round(t._radius),1),n="a"+s+","+(Math.max(Math.round(t._radiusY),1)||s)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(i.x-s)+","+i.y+n+2*s+",0 "+n+2*-s+",0 ";this._setPath(t,e)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){Pi(t._path)},_bringToBack:function(t){Ti(t._path)}});Qt.vml&&vn.include(ln),os.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&function(t){return Qt.canvas?new cn(t):null}(t)||function(t){return Qt.svg||Qt.vml?new vn(t):null}(t)}}),Us.extend({initialize:function(t,i){Us.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=it(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),vn.create=dn,vn.pointsToPath=mt,Hs.geometryToLayer=qs,Hs.coordsToLatLng=Ws,Hs.coordsToLatLngs=Vs,Hs.latLngToCoords=Js,Hs.latLngsToCoords=Ks,Hs.getFeature=Xs,Hs.asFeature=Ys,os.mergeOptions({boxZoom:!0});var mn=fs.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(){Hi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Gi(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ki(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(),vi(),ji(),this._startPoint=this._map.mouseEventToContainerPoint(t),Hi(document,{contextmenu:is,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=xi("div","leaflet-zoom-box",this._container),$i(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new Y(this._point,this._startPoint),s=i.getSize();Ii(this._box,i.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(ki(this._box),Ci(this._container,"leaflet-crosshair")),mi(),Ri(),Gi(document,{contextmenu:is,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(P(this._resetState,this),0);var i=new tt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});os.addInitHook("addHandler","boxZoom",mn),os.mergeOptions({doubleClickZoom:!0});var pn=fs.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,s=i.getZoom(),n=i.options.zoomDelta,e=t.originalEvent.shiftKey?s-n:s+n;"center"===i.options.doubleClickZoom?i.setZoom(e):i.setZoomAround(t.containerPoint,e)}});os.addInitHook("addHandler","doubleClickZoom",pn),os.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var gn=fs.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new vs(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))}$i(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ci(this._map._container,"leaflet-grab"),Ci(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 i=it(this._map.options.maxBounds);this._offsetLimit=Q(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.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 i=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(i),this._prunePositions(i)}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),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),s=this._initialWorldOffset,n=this._draggable._newPos.x,e=(n-i+s)%t+i-s,o=(n+i+s)%t-i-s,h=Math.abs(e+s)<Math.abs(o+s)?e:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=h},_onDragEnd:function(t){var i=this._map,s=i.options,n=!s.inertia||t.noInertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{this._prunePositions(+new Date);var e=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,h=s.easeLinearity,r=e.multiplyBy(h/o),a=r.distanceTo([0,0]),u=Math.min(s.inertiaMaxSpeed,a),c=r.multiplyBy(u/a),f=u/(s.inertiaDeceleration*h),l=c.multiplyBy(-f/2).round();l.x||l.y?(l=i._limitOffset(l,i.options.maxBounds),H((function(){i.panBy(l,{duration:f,easeLinearity:h,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}}});os.addInitHook("addHandler","dragging",gn),os.mergeOptions({keyboard:!0,keyboardPanDelta:80});var wn=fs.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"),Hi(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(),Gi(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,i=document.documentElement,s=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,s)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,s,n=this._panKeys={},e=this.keyCodes;for(i=0,s=e.left.length;i<s;i++)n[e.left[i]]=[-1*t,0];for(i=0,s=e.right.length;i<s;i++)n[e.right[i]]=[t,0];for(i=0,s=e.down.length;i<s;i++)n[e.down[i]]=[0,t];for(i=0,s=e.up.length;i<s;i++)n[e.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,s,n=this._zoomKeys={},e=this.keyCodes;for(i=0,s=e.zoomIn.length;i<s;i++)n[e.zoomIn[i]]=t;for(i=0,s=e.zoomOut.length;i<s;i++)n[e.zoomOut[i]]=-t},_addHooks:function(){Hi(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Gi(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,s=t.keyCode,n=this._map;if(s in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(i=this._panKeys[s],t.shiftKey&&(i=X(i).multiplyBy(3)),n.options.maxBounds&&(i=n._limitOffset(X(i),n.options.maxBounds)),n.options.worldCopyJump){var e=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(i)));n.panTo(e)}else n.panBy(i)}else if(s in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[s]);else{if(27!==s||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}is(t)}}});os.addInitHook("addHandler","keyboard",wn),os.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var bn=fs.extend({addHooks:function(){Hi(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Gi(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=function(t){return Qt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ss: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}(t),s=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(s-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(P(this._performZoom,this),n),is(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),s=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),e=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=s?Math.ceil(e/s)*s:e,h=t._limitZoom(i+(this._delta>0?o:-o))-i;this._delta=0,this._startTime=null,h&&("center"===t.options.scrollWheelZoom?t.setZoom(i+h):t.setZoomAround(this._lastMousePos,i+h))}});os.addInitHook("addHandler","scrollWheelZoom",bn);os.mergeOptions({tapHold:Qt.touchNative&&Qt.safari&&Qt.mobile,tapTolerance:15});var _n=fs.extend({addHooks:function(){Hi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Gi(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new J(i.clientX,i.clientY),this._holdTimeout=setTimeout(P((function(){this._cancel(),this._isTapValid()&&(Hi(document,"touchend",ts),Hi(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),Hi(document,"touchend touchcancel contextmenu",this._cancel,this),Hi(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Gi(document,"touchend",ts),Gi(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Gi(document,"touchend touchcancel contextmenu",this._cancel,this),Gi(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new J(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var s=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});s._simulated=!0,i.target.dispatchEvent(s)}});os.addInitHook("addHandler","tapHold",_n),os.mergeOptions({touchZoom:Qt.touch,bounceAtZoomLimits:!0});var yn=fs.extend({addHooks:function(){$i(this._map._container,"leaflet-touch-zoom"),Hi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ci(this._map._container,"leaflet-touch-zoom"),Gi(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var s=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(s.add(n)._divideBy(2))),this._startDist=s.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Hi(document,"touchmove",this._onTouchMove,this),Hi(document,"touchend touchcancel",this._onTouchEnd,this),ts(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,s=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]),e=s.distanceTo(n)/this._startDist;if(this._zoom=i.getScaleZoom(e,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&e<1||this._zoom>i.getMaxZoom()&&e>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===e)return}else{var o=s._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===e&&0===o.x&&0===o.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),q(this._animRequest);var h=P(i._move,i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=H(h,this,!0),ts(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,q(this._animRequest),Gi(document,"touchmove",this._onTouchMove,this),Gi(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}});os.addInitHook("addHandler","touchZoom",yn),os.BoxZoom=mn,os.DoubleClickZoom=pn,os.Drag=gn,os.Keyboard=wn,os.ScrollWheelZoom=bn,os.TapHold=_n,os.TouchZoom=yn;var Mn=function(t,i,s,n){for(var e,o=arguments.length,h=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,s):n,r=t.length-1;r>=0;r--)(e=t[r])&&(h=(o<3?e(h):o>3?e(i,s,h):e(i,s))||h);return o>3&&h&&Object.defineProperty(i,s,h),h};const{getLocale:xn,setLocale:kn}=o({sourceLocale:r,targetLocales:a,loadLocale:t=>import(`./generated/locales/${t}.js`)});let Ln=class extends u{constructor(){super(),this.defaultLat="39.5701058",this.defaultLon="2.6487098",this.locale="es",this.isCitizen=!0,this.activeMap=!1,this.ubiDistricts=[],this.submited=!1,this.error=!1,this.incidenceId="",this.extensionFiles="",this.domain="https://iris2-backend-demo-iris-community.labs.apsl.io/services/iris/api-public",this.street="",this.streetNumber="",this.latitude="",this.longitude="",this.loading=!1,this._fetchFields=new b(this,{task:async([t],{signal:i})=>{const s=await fetch(`${this.getApiUrl()}/details/${t}/fields`,{headers:{"Accept-Language":this.locale},signal:i});s.ok||(this.error=!0);const n=await s.json();this.area=n.area,this.element=n.element,this.detail=n.detail,this.characteristics=n.characteristics,this.extensionFiles=n.extension_files;const e=n.mandatory_drupal_fields.ubication;return e?.street_name&&e?.number&&(this.activeMap=!0,this._loadMap()),n},args:()=>[this.detailID]}),this.detailID=void 0,this.actionUrl="",this.apiUrl="",this.area="",this.element="",this.detail="",this.extensionFiles="",this.characteristics=[],this.locale=this.locale?this.locale:"es",Os.Default.imagePath="https://unpkg.com/leaflet@1.9.4/dist/images/",this._markerIcon=new Os({iconUrl:"https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-blue.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]})}getApiUrl(){return this.apiUrl.endsWith("/")?this.apiUrl.slice(0,this.apiUrl.lastIndexOf("/")):this.apiUrl}_loadMap(){const t=this.shadowRoot?.querySelector("#map");var i,s;this._map=(i=t,s={markerZoomAnimation:!1,attributionControl:!1},new os(i,s)).setView([this.defaultLat,this.defaultLon],15),rn("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(this._map),this._map.on("click",(t=>this.onMapClick(t)))}firstUpdated(){const t=this.shadowRoot?.querySelector("form");t?.setAttribute("novalidate",""),this.addOnChangEventToInputs()}addOnChangEventToInputs(){Array.from(this.shadowRoot?.querySelectorAll("input")??[]).forEach((t=>{t.addEventListener("keyup",(()=>{t.setCustomValidity("")}))}))}connectedCallback(){super.connectedCallback(),this._fetchDistricts()}async _fetchDistricts(){const t=await fetch(`${this.getApiUrl()}/districts`,{headers:{"Accept-Language":this.locale}});if(!t.ok)throw new Error(t.statusText);(await t.json()).results.map((t=>{this.ubiDistricts.push({value:`${t.id}`,label:t.name})}))}updated(){this.addOnChangEventToInputs()}changeTab(t){this.isCitizen=t}render(){let t=c``;return t=this.error||this.submited?this.error?this.renderError():this.renderSuccess():this.renderForm(),c` ${this.renderHeader()}
194
+ `;var M;!function(t){t.Number="Number",t.Text="Text",t.Options="Options",t.Date="Date",t.Time="Time"}(M||(M={}));function x(t){var i,s,n,e;for(s=1,n=arguments.length;s<n;s++)for(i in e=arguments[s])t[i]=e[i];return t}var k=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function P(t,i){var s=Array.prototype.slice;if(t.bind)return t.bind.apply(t,s.call(arguments,1));var n=s.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(s.call(arguments)):arguments)}}var T=0;function $(t){return"_leaflet_id"in t||(t._leaflet_id=++T),t._leaflet_id}function z(t,i,s){var n=i[1],e=i[0],o=n-e;return t===n&&s?t:((t-e)%o+o)%o+e}function C(){return!1}function S(t,i){if(!1===i)return t;var s=Math.pow(10,void 0===i?6:i);return Math.round(t*s)/s}function E(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function A(t){return E(t).split(/\s+/)}function O(t,i){for(var s in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?k(t.options):{}),i)t.options[s]=i[s];return t.options}var I=/\{ *([\w_ -]+) *\}/g;var B=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function D(t,i){for(var s=0;s<t.length;s++)if(t[s]===i)return s;return-1}var Z="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function j(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var R=0;function N(t){var i=+new Date,s=Math.max(0,16-(i-R));return R=i+s,window.setTimeout(t,s)}var F=window.requestAnimationFrame||j("RequestAnimationFrame")||N,U=window.cancelAnimationFrame||j("CancelAnimationFrame")||j("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function H(t,i,s){if(!s||F!==N)return F.call(window,P(t,i));t.call(i)}function q(t){t&&U.call(window,t)}function G(){}G.extend=function(t){var i=function(){O(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=i.M=this.prototype,n=k(s);for(var e in n.constructor=i,i.prototype=n,this)Object.prototype.hasOwnProperty.call(this,e)&&"prototype"!==e&&"__super__"!==e&&(i[e]=this[e]);return t.statics&&x(i,t.statics),t.includes&&(!function(t){if("undefined"==typeof L||!L||!L.Mixin)return;t=B(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}(t.includes),x.apply(null,[n].concat(t.includes))),x(n,t),delete n.statics,delete n.includes,n.options&&(n.options=s.options?k(s.options):{},x(n.options,t.options)),n._initHooks=[],n.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=n._initHooks.length;t<i;t++)n._initHooks[t].call(this)}},i},G.include=function(t){var i=this.prototype.options;return x(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},G.mergeOptions=function(t){return x(this.prototype.options,t),this},G.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),s="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(s),this};var W={on:function(t,i,s){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var e=0,o=(t=A(t)).length;e<o;e++)this._on(t[e],i,s);return this},off:function(t,i,s){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else{t=A(t);for(var e=1===arguments.length,o=0,h=t.length;o<h;o++)e?this._off(t[o]):this._off(t[o],i,s)}else delete this._events;return this},_on:function(t,i,s,n){if("function"==typeof i){if(!1===this._listens(t,i,s)){s===this&&(s=void 0);var e={fn:i,ctx:s};n&&(e.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)}}else console.warn("wrong listener type: "+typeof i)},_off:function(t,i,s){var n,e,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if("function"==typeof i){var h=this._listens(t,i,s);if(!1!==h){var r=n[h];this._firingCount&&(r.fn=C,this._events[t]=n=n.slice()),n.splice(h,1)}}else console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(e=0,o=n.length;e<o;e++)n[e].fn=C;delete this._events[t]}},fire:function(t,i,s){if(!this.listens(t,s))return this;var n=x({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var e=this._events[t];if(e){this._firingCount=this._firingCount+1||1;for(var o=0,h=e.length;o<h;o++){var r=e[o],a=r.fn;r.once&&this.off(t,a,r.ctx),a.call(r.ctx||this,n)}this._firingCount--}}return s&&this._propagateEvent(n),this},listens:function(t,i,s,n){"string"!=typeof t&&console.warn('"string" type argument expected');var e=i;"function"!=typeof i&&(n=!!i,e=void 0,s=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,e,s))return!0;if(n)for(var h in this._eventParents)if(this._eventParents[h].listens(t,i,s,n))return!0;return!1},_listens:function(t,i,s){if(!this._events)return!1;var n=this._events[t]||[];if(!i)return!!n.length;s===this&&(s=void 0);for(var e=0,o=n.length;e<o;e++)if(n[e].fn===i&&n[e].ctx===s)return e;return!1},once:function(t,i,s){if("object"==typeof t)for(var n in t)this._on(n,t[n],i,!0);else for(var e=0,o=(t=A(t)).length;e<o;e++)this._on(t[e],i,s,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[$(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[$(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,x({layer:t.target,propagatedFrom:t.target},t),!0)}};W.addEventListener=W.on,W.removeEventListener=W.clearAllEventListeners=W.off,W.addOneTimeEventListener=W.once,W.fireEvent=W.fire,W.hasEventListeners=W.listens;var V=G.extend(W);function J(t,i,s){this.x=s?Math.round(t):t,this.y=s?Math.round(i):i}var K=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function X(t,i,s){return t instanceof J?t:B(t)?new J(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new J(t.x,t.y):new J(t,i,s)}function Y(t,i){if(t)for(var s=i?[t,i]:t,n=0,e=s.length;n<e;n++)this.extend(s[n])}function Q(t,i){return!t||t instanceof Y?t:new Y(t,i)}function tt(t,i){if(t)for(var s=i?[t,i]:t,n=0,e=s.length;n<e;n++)this.extend(s[n])}function it(t,i){return t instanceof tt?t:new tt(t,i)}function st(t,i,s){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==s&&(this.alt=+s)}function nt(t,i,s){return t instanceof st?t:B(t)&&"object"!=typeof t[0]?3===t.length?new st(t[0],t[1],t[2]):2===t.length?new st(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new st(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new st(t,i,s)}J.prototype={clone:function(){return new J(this.x,this.y)},add:function(t){return this.clone()._add(X(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(X(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 J(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new J(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=K(this.x),this.y=K(this.y),this},distanceTo:function(t){var i=(t=X(t)).x-this.x,s=t.y-this.y;return Math.sqrt(i*i+s*s)},equals:function(t){return(t=X(t)).x===this.x&&t.y===this.y},contains:function(t){return t=X(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+S(this.x)+", "+S(this.y)+")"}},Y.prototype={extend:function(t){var i,s;if(!t)return this;if(t instanceof J||"number"==typeof t[0]||"x"in t)i=s=X(t);else if(i=(t=Q(t)).min,s=t.max,!i||!s)return this;return this.min||this.max?(this.min.x=Math.min(i.x,this.min.x),this.max.x=Math.max(s.x,this.max.x),this.min.y=Math.min(i.y,this.min.y),this.max.y=Math.max(s.y,this.max.y)):(this.min=i.clone(),this.max=s.clone()),this},getCenter:function(t){return X((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return X(this.min.x,this.max.y)},getTopRight:function(){return X(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 i,s;return(t="number"==typeof t[0]||t instanceof J?X(t):Q(t))instanceof Y?(i=t.min,s=t.max):i=s=t,i.x>=this.min.x&&s.x<=this.max.x&&i.y>=this.min.y&&s.y<=this.max.y},intersects:function(t){t=Q(t);var i=this.min,s=this.max,n=t.min,e=t.max,o=e.x>=i.x&&n.x<=s.x,h=e.y>=i.y&&n.y<=s.y;return o&&h},overlaps:function(t){t=Q(t);var i=this.min,s=this.max,n=t.min,e=t.max,o=e.x>i.x&&n.x<s.x,h=e.y>i.y&&n.y<s.y;return o&&h},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var i=this.min,s=this.max,n=Math.abs(i.x-s.x)*t,e=Math.abs(i.y-s.y)*t;return Q(X(i.x-n,i.y-e),X(s.x+n,s.y+e))},equals:function(t){return!!t&&(t=Q(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},tt.prototype={extend:function(t){var i,s,n=this._southWest,e=this._northEast;if(t instanceof st)i=t,s=t;else{if(!(t instanceof tt))return t?this.extend(nt(t)||it(t)):this;if(i=t._southWest,s=t._northEast,!i||!s)return this}return n||e?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),e.lat=Math.max(s.lat,e.lat),e.lng=Math.max(s.lng,e.lng)):(this._southWest=new st(i.lat,i.lng),this._northEast=new st(s.lat,s.lng)),this},pad:function(t){var i=this._southWest,s=this._northEast,n=Math.abs(i.lat-s.lat)*t,e=Math.abs(i.lng-s.lng)*t;return new tt(new st(i.lat-n,i.lng-e),new st(s.lat+n,s.lng+e))},getCenter:function(){return new st((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 st(this.getNorth(),this.getWest())},getSouthEast:function(){return new st(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 st||"lat"in t?nt(t):it(t);var i,s,n=this._southWest,e=this._northEast;return t instanceof tt?(i=t.getSouthWest(),s=t.getNorthEast()):i=s=t,i.lat>=n.lat&&s.lat<=e.lat&&i.lng>=n.lng&&s.lng<=e.lng},intersects:function(t){t=it(t);var i=this._southWest,s=this._northEast,n=t.getSouthWest(),e=t.getNorthEast(),o=e.lat>=i.lat&&n.lat<=s.lat,h=e.lng>=i.lng&&n.lng<=s.lng;return o&&h},overlaps:function(t){t=it(t);var i=this._southWest,s=this._northEast,n=t.getSouthWest(),e=t.getNorthEast(),o=e.lat>i.lat&&n.lat<s.lat,h=e.lng>i.lng&&n.lng<s.lng;return o&&h},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=it(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},st.prototype={equals:function(t,i){return!!t&&(t=nt(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+S(this.lat,t)+", "+S(this.lng,t)+")"},distanceTo:function(t){return ht.distance(this,nt(t))},wrap:function(){return ht.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,s=i/Math.cos(Math.PI/180*this.lat);return it([this.lat-i,this.lng-s],[this.lat+i,this.lng+s])},clone:function(){return new st(this.lat,this.lng,this.alt)}};var et,ot={latLngToPoint:function(t,i){var s=this.projection.project(t),n=this.scale(i);return this.transformation._transform(s,n)},pointToLatLng:function(t,i){var s=this.scale(i),n=this.transformation.untransform(t,s);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 i=this.projection.bounds,s=this.scale(t);return new Y(this.transformation.transform(i.min,s),this.transformation.transform(i.max,s))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?z(t.lng,this.wrapLng,!0):t.lng;return new st(this.wrapLat?z(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),s=this.wrapLatLng(i),n=i.lat-s.lat,e=i.lng-s.lng;if(0===n&&0===e)return t;var o=t.getSouthWest(),h=t.getNorthEast();return new tt(new st(o.lat-n,o.lng-e),new st(h.lat-n,h.lng-e))}},ht=x({},ot,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var s=Math.PI/180,n=t.lat*s,e=i.lat*s,o=Math.sin((i.lat-t.lat)*s/2),h=Math.sin((i.lng-t.lng)*s/2),r=o*o+Math.cos(n)*Math.cos(e)*h*h,a=2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r));return this.R*a}}),rt=6378137,at={R:rt,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,s=this.MAX_LATITUDE,n=Math.max(Math.min(s,t.lat),-s),e=Math.sin(n*i);return new J(this.R*t.lng*i,this.R*Math.log((1+e)/(1-e))/2)},unproject:function(t){var i=180/Math.PI;return new st((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:(et=rt*Math.PI,new Y([-et,-et],[et,et]))};function ut(t,i,s,n){if(B(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=s,this._d=n}function ct(t,i,s,n){return new ut(t,i,s,n)}ut.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return i=i||1,t.x=i*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new J((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};var ft,lt=x({},ht,{code:"EPSG:3857",projection:at,transformation:(ft=.5/(Math.PI*at.R),ct(ft,.5,-ft,.5))}),dt=x({},lt,{code:"EPSG:900913"});function vt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function mt(t,i){var s,n,e,o,h,r,a="";for(s=0,e=t.length;s<e;s++){for(n=0,o=(h=t[s]).length;n<o;n++)a+=(n?"L":"M")+(r=h[n]).x+" "+r.y;a+=i?Qt.svg?"z":"x":""}return a||"M0 0"}var pt,gt=document.documentElement.style,wt="ActiveXObject"in window,bt=wt&&!document.addEventListener,_t="msLaunchUri"in navigator&&!("documentMode"in document),yt=Yt("webkit"),Mt=Yt("android"),xt=Yt("android 2")||Yt("android 3"),kt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Lt=Mt&&Yt("Google")&&kt<537&&!("AudioNode"in window),Pt=!!window.opera,Tt=!_t&&Yt("chrome"),$t=Yt("gecko")&&!yt&&!Pt&&!wt,zt=!Tt&&Yt("safari"),Ct=Yt("phantom"),St="OTransition"in gt,Et=0===navigator.platform.indexOf("Win"),At=wt&&"transition"in gt,Ot="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!xt,It="MozPerspective"in gt,Bt=!window.L_DISABLE_3D&&(At||Ot||It)&&!St&&!Ct,Dt="undefined"!=typeof orientation||Yt("mobile"),Zt=Dt&&yt,jt=Dt&&Ot,Rt=!window.PointerEvent&&window.MSPointerEvent,Nt=!(!window.PointerEvent&&!Rt),Ft="ontouchstart"in window||!!window.TouchEvent,Ut=!window.L_NO_TOUCH&&(Ft||Nt),Ht=Dt&&Pt,qt=Dt&&$t,Gt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Wt=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",C,i),window.removeEventListener("testPassiveEventSupport",C,i)}catch(t){}return t}(),Vt=!!document.createElement("canvas").getContext,Jt=!(!document.createElementNS||!vt("svg").createSVGRect),Kt=!!Jt&&((pt=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(pt.firstChild&&pt.firstChild.namespaceURI)),Xt=!Jt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function Yt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Qt={ie:wt,ielt9:bt,edge:_t,webkit:yt,android:Mt,android23:xt,androidStock:Lt,opera:Pt,chrome:Tt,gecko:$t,safari:zt,phantom:Ct,opera12:St,win:Et,ie3d:At,webkit3d:Ot,gecko3d:It,any3d:Bt,mobile:Dt,mobileWebkit:Zt,mobileWebkit3d:jt,msPointer:Rt,pointer:Nt,touch:Ut,touchNative:Ft,mobileOpera:Ht,mobileGecko:qt,retina:Gt,passiveEvents:Wt,canvas:Vt,svg:Jt,vml:Xt,inlineSvg:Kt,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},ti=Qt.msPointer?"MSPointerDown":"pointerdown",ii=Qt.msPointer?"MSPointerMove":"pointermove",si=Qt.msPointer?"MSPointerUp":"pointerup",ni=Qt.msPointer?"MSPointerCancel":"pointercancel",ei={touchstart:ti,touchmove:ii,touchend:si,touchcancel:ni},oi={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&ts(i);li(t,i)},touchmove:li,touchend:li,touchcancel:li},hi={},ri=!1;function ai(t,i,s){return"touchstart"===i&&(ri||(document.addEventListener(ti,ui,!0),document.addEventListener(ii,ci,!0),document.addEventListener(si,fi,!0),document.addEventListener(ni,fi,!0),ri=!0)),oi[i]?(s=oi[i].bind(this,s),t.addEventListener(ei[i],s,!1),s):(console.warn("wrong event specified:",i),C)}function ui(t){hi[t.pointerId]=t}function ci(t){hi[t.pointerId]&&(hi[t.pointerId]=t)}function fi(t){delete hi[t.pointerId]}function li(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var s in i.touches=[],hi)i.touches.push(hi[s]);i.changedTouches=[i],t(i)}}var di=200;var vi,mi,pi,gi,wi,bi=Oi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),_i=Oi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),yi="webkitTransition"===_i||"OTransition"===_i?_i+"End":"transitionend";function Mi(t,i){var s=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!s||"auto"===s)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);s=n?n[i]:null}return"auto"===s?null:s}function xi(t,i,s){var n=document.createElement(t);return n.className=i||"",s&&s.appendChild(n),n}function ki(t){var i=t.parentNode;i&&i.removeChild(t)}function Li(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function Pi(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function Ti(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function $i(t,i){if(void 0!==t.classList)return t.classList.contains(i);var s=Ei(t);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}function zi(t,i){if(void 0!==t.classList)for(var s=A(i),n=0,e=s.length;n<e;n++)t.classList.add(s[n]);else if(!$i(t,i)){var o=Ei(t);Si(t,(o?o+" ":"")+i)}}function Ci(t,i){void 0!==t.classList?t.classList.remove(i):Si(t,E((" "+Ei(t)+" ").replace(" "+i+" "," ")))}function Si(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function Ei(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function Ai(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var s=!1,n="DXImageTransform.Microsoft.Alpha";try{s=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),s?(s.Enabled=100!==i,s.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function Oi(t){for(var i=document.documentElement.style,s=0;s<t.length;s++)if(t[s]in i)return t[s];return!1}function Ii(t,i,s){var n=i||new J(0,0);t.style[bi]=(Qt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(s?" scale("+s+")":"")}function Bi(t,i){t._leaflet_pos=i,Qt.any3d?Ii(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function Di(t){return t._leaflet_pos||new J(0,0)}if("onselectstart"in document)vi=function(){Hi(window,"selectstart",ts)},mi=function(){Gi(window,"selectstart",ts)};else{var Zi=Oi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);vi=function(){if(Zi){var t=document.documentElement.style;pi=t[Zi],t[Zi]="none"}},mi=function(){Zi&&(document.documentElement.style[Zi]=pi,pi=void 0)}}function ji(){Hi(window,"dragstart",ts)}function Ri(){Gi(window,"dragstart",ts)}function Ni(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Fi(),gi=t,wi=t.style.outlineStyle,t.style.outlineStyle="none",Hi(window,"keydown",Fi))}function Fi(){gi&&(gi.style.outlineStyle=wi,gi=void 0,wi=void 0,Gi(window,"keydown",Fi))}function Ui(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}function Hi(t,i,s,n){if(i&&"object"==typeof i)for(var e in i)Ji(t,e,i[e],s);else for(var o=0,h=(i=A(i)).length;o<h;o++)Ji(t,i[o],s,n);return this}var qi="_leaflet_events";function Gi(t,i,s,n){if(1===arguments.length)Wi(t),delete t[qi];else if(i&&"object"==typeof i)for(var e in i)Ki(t,e,i[e],s);else if(i=A(i),2===arguments.length)Wi(t,(function(t){return-1!==D(i,t)}));else for(var o=0,h=i.length;o<h;o++)Ki(t,i[o],s,n);return this}function Wi(t,i){for(var s in t[qi]){var n=s.split(/\d/)[0];i&&!i(n)||Ki(t,n,null,null,s)}}var Vi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ji(t,i,s,n){var e=i+$(s)+(n?"_"+$(n):"");if(t[qi]&&t[qi][e])return this;var o=function(i){return s.call(n||t,i||window.event)},h=o;!Qt.touchNative&&Qt.pointer&&0===i.indexOf("touch")?o=ai(t,i,o):Qt.touch&&"dblclick"===i?o=function(t,i){t.addEventListener("dblclick",i);var s,n=0;function e(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var e=function(t){if(t.composedPath)return t.composedPath();for(var i=[],s=t.target;s;)i.push(s),s=s.parentNode;return i}(t);if(!e.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||e.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var o=Date.now();o-n<=di?2==++s&&i(function(t){var i,s,n={};for(s in t)i=t[s],n[s]=i&&i.bind?i.bind(t):i;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):s=1,n=o}}}else s=t.detail}return t.addEventListener("click",e),{dblclick:i,simDblclick:e}}(t,o):"addEventListener"in t?"touchstart"===i||"touchmove"===i||"wheel"===i||"mousewheel"===i?t.addEventListener(Vi[i]||i,o,!!Qt.passiveEvents&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?(o=function(i){i=i||window.event,ns(t,i)&&h(i)},t.addEventListener(Vi[i],o,!1)):t.addEventListener(i,h,!1):t.attachEvent("on"+i,o),t[qi]=t[qi]||{},t[qi][e]=o}function Ki(t,i,s,n,e){e=e||i+$(s)+(n?"_"+$(n):"");var o=t[qi]&&t[qi][e];if(!o)return this;!Qt.touchNative&&Qt.pointer&&0===i.indexOf("touch")?function(t,i,s){ei[i]?t.removeEventListener(ei[i],s,!1):console.warn("wrong event specified:",i)}(t,i,o):Qt.touch&&"dblclick"===i?function(t,i){t.removeEventListener("dblclick",i.dblclick),t.removeEventListener("click",i.simDblclick)}(t,o):"removeEventListener"in t?t.removeEventListener(Vi[i]||i,o,!1):t.detachEvent("on"+i,o),t[qi][e]=null}function Xi(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Yi(t){return Ji(t,"wheel",Xi),this}function Qi(t){return Hi(t,"mousedown touchstart dblclick contextmenu",Xi),t._leaflet_disable_click=!0,this}function ts(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function is(t){return ts(t),Xi(t),this}var ss=Qt.linux&&Qt.chrome?window.devicePixelRatio:Qt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function ns(t,i){var s=i.relatedTarget;if(!s)return!0;try{for(;s&&s!==t;)s=s.parentNode}catch(t){return!1}return s!==t}var es=V.extend({run:function(t,i,s,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=s||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=Di(t),this._offset=i.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=H(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,s=1e3*this._duration;i<s?this._runFrame(this._easeOut(i/s),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var s=this._startPos.add(this._offset.multiplyBy(t));i&&s._round(),Bi(this._el,s),this.fire("step")},_complete:function(){q(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),os=V.extend({options:{crs:lt,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,i){i=O(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=P(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(nt(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=_i&&Qt.any3d&&!Qt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Hi(this._proxy,yi,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,s){if((i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(nt(t),i,this.options.maxBounds),s=s||{},this._stop(),this._loaded&&!s.reset&&!0!==s)&&(void 0!==s.animate&&(s.zoom=x({animate:s.animate},s.zoom),s.pan=x({animate:s.animate,duration:s.duration},s.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,s.zoom):this._tryAnimatedPan(t,s.pan)))return clearTimeout(this._sizeTimer),this;return this._resetView(t,i,s.pan&&s.pan.noMoveStart),this},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return t=t||(Qt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){return t=t||(Qt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,s){var n=this.getZoomScale(i),e=this.getSize().divideBy(2),o=(t instanceof J?t:this.latLngToContainerPoint(t)).subtract(e).multiplyBy(1-1/n),h=this.containerPointToLatLng(e.add(o));return this.setView(h,i,{zoom:s})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():it(t);var s=X(i.paddingTopLeft||i.padding||[0,0]),n=X(i.paddingBottomRight||i.padding||[0,0]),e=this.getBoundsZoom(t,!1,s.add(n));if((e="number"==typeof i.maxZoom?Math.min(i.maxZoom,e):e)===1/0)return{center:t.getCenter(),zoom:e};var o=n.subtract(s).divideBy(2),h=this.project(t.getSouthWest(),e),r=this.project(t.getNorthEast(),e);return{center:this.unproject(h.add(r).divideBy(2).add(o),e),zoom:e}},fitBounds:function(t,i){if(!(t=it(t)).isValid())throw new Error("Bounds are not valid.");var s=this._getBoundsCenterZoom(t,i);return this.setView(s.center,s.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(i=i||{},!(t=X(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==i.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 es,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){zi(this._mapPane,"leaflet-pan-anim");var s=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,s,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,s){if(!1===(s=s||{}).animate||!Qt.any3d)return this.setView(t,i,s);this._stop();var n=this.project(this.getCenter()),e=this.project(t),o=this.getSize(),h=this._zoom;t=nt(t),i=void 0===i?h:i;var r=Math.max(o.x,o.y),a=r*this.getZoomScale(h,i),u=e.distanceTo(n)||1,c=1.42,f=c*c;function l(t){var i=(a*a-r*r+(t?-1:1)*f*f*u*u)/(2*(t?a:r)*f*u),s=Math.sqrt(i*i+1)-i;return s<1e-9?-18:Math.log(s)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function v(t){return(Math.exp(t)+Math.exp(-t))/2}var m=l(0);function p(t){return r*(v(m)*function(t){return d(t)/v(t)}(m+c*t)-d(m))/f}var g=Date.now(),w=(l(1)-m)/c,b=s.duration?1e3*s.duration:1e3*w*.8;return this._moveStart(!0,s.noMoveStart),function s(){var o=(Date.now()-g)/b,a=function(t){return 1-Math.pow(1-t,1.5)}(o)*w;o<=1?(this._flyToFrame=H(s,this),this._move(this.unproject(n.add(e.subtract(n).multiplyBy(p(a)/u)),h),this.getScaleZoom(r/function(t){return r*(v(m)/v(m+c*t))}(a),h),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var s=this._getBoundsCenterZoom(t,i);return this.flyTo(s.center,s.zoom,i)},setMaxBounds:function(t){return t=it(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 i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var s=this.getCenter(),n=this._limitCenter(s,this._zoom,it(t));return s.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var s=X((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=X(i.paddingBottomRight||i.padding||[0,0]),e=this.project(this.getCenter()),o=this.project(t),h=this.getPixelBounds(),r=Q([h.min.add(s),h.max.subtract(n)]),a=r.getSize();if(!r.contains(o)){this._enforcingBounds=!0;var u=o.subtract(r.getCenter()),c=r.extend(o).getSize().subtract(a);e.x+=u.x<0?-c.x:c.x,e.y+=u.y<0?-c.y:c.y,this.panTo(this.unproject(e),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=x({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),n=i.divideBy(2).round(),e=s.divideBy(2).round(),o=n.subtract(e);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(P(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:s})):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=x({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=P(this._handleGeolocationResponse,this),s=P(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,s,t):navigator.geolocation.getCurrentPosition(i,s,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 i=t.code,s=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+s+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new st(t.coords.latitude,t.coords.longitude),s=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var e=this.getBoundsZoom(s);this.setView(i,n.maxZoom?Math.min(e,n.maxZoom):e)}var o={latlng:i,bounds:s,timestamp:t.timestamp};for(var h in t.coords)"number"==typeof t.coords[h]&&(o[h]=t.coords[h]);this.fire("locationfound",o)}},addHandler:function(t,i){if(!i)return this;var s=this[t]=new i(this);return this._handlers.push(s),this.options[t]&&s.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(),ki(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(q(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ki(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var s=xi("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=s),s},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 tt(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,i,s){t=it(t),s=X(s||[0,0]);var n=this.getZoom()||0,e=this.getMinZoom(),o=this.getMaxZoom(),h=t.getNorthWest(),r=t.getSouthEast(),a=this.getSize().subtract(s),u=Q(this.project(r,n),this.project(h,n)).getSize(),c=Qt.any3d?this.options.zoomSnap:1,f=a.x/u.x,l=a.y/u.y,d=i?Math.max(f,l):Math.min(f,l);return n=this.getScaleZoom(d,n),c&&(n=Math.round(n/(c/100))*(c/100),n=i?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(e,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new J(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var s=this._getTopLeftPoint(t,i);return new Y(s,s.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,i){var s=this.options.crs;return i=void 0===i?this._zoom:i,s.scale(t)/s.scale(i)},getScaleZoom:function(t,i){var s=this.options.crs;i=void 0===i?this._zoom:i;var n=s.zoom(t*s.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(nt(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(X(t),i)},layerPointToLatLng:function(t){var i=X(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(nt(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(nt(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(it(t))},distance:function(t,i){return this.options.crs.distance(nt(t),nt(i))},containerPointToLayerPoint:function(t){return X(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return X(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(X(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(nt(t)))},mouseEventToContainerPoint:function(t){return function(t,i){if(!i)return new J(t.clientX,t.clientY);var s=Ui(i),n=s.boundingClientRect;return new J((t.clientX-n.left)/s.x-i.clientLeft,(t.clientY-n.top)/s.y-i.clientTop)}(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 i=this._container=function(t){return"string"==typeof t?document.getElementById(t):t}(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");Hi(i,"scroll",this._onScroll,this),this._containerId=$(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Qt.any3d,zi(t,"leaflet-container"+(Qt.touch?" leaflet-touch":"")+(Qt.retina?" leaflet-retina":"")+(Qt.ielt9?" leaflet-oldie":"")+(Qt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=Mi(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&"sticky"!==i&&(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),Bi(this._mapPane,new J(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(zi(t.markerPane,"leaflet-zoom-hide"),zi(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i,s){Bi(this._mapPane,new J(0,0));var n=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var e=this._zoom!==i;this._moveStart(e,s)._move(t,i)._moveEnd(e),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,s,n){void 0===i&&(i=this._zoom);var e=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?s&&s.pinch&&this.fire("zoom",s):((e||s&&s.pinch)&&this.fire("zoom",s),this.fire("move",s)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return q(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Bi(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[$(this._container)]=this;var i=t?Gi:Hi;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Qt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){q(this._resizeRequest),this._resizeRequest=H((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,i){for(var s,n=[],e="mouseout"===i||"mouseover"===i,o=t.target||t.srcElement,h=!1;o;){if((s=this._targets[$(o)])&&("click"===i||"preclick"===i)&&this._draggableMoved(s)){h=!0;break}if(s&&s.listens(i,!0)){if(e&&!ns(o,t))break;if(n.push(s),e)break}if(o===this._container)break;o=o.parentNode}return n.length||h||e||!this.listens(i,!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 i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var s=t.type;"mousedown"===s&&Ni(i),this._fireDOMEvent(t,s)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,s){if("click"===t.type){var n=x({},t);n.type="preclick",this._fireDOMEvent(n,n.type,s)}var e=this._findEventTargets(t,i);if(s){for(var o=[],h=0;h<s.length;h++)s[h].listens(i,!0)&&o.push(s[h]);e=o.concat(e)}if(e.length){"contextmenu"===i&&ts(t);var r=e[0],a={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=u?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=u?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(h=0;h<e.length;h++)if(e[h].fire(i,a,!0),a.originalEvent._stopped||!1===e[h].options.bubblingMouseEvents&&-1!==D(this._mouseEvents,i))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,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return Di(this._mapPane)||new J(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var s=this.getSize()._divideBy(2);return this.project(t,i)._subtract(s)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,s){var n=this._getNewPixelOrigin(s,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,s){var n=this._getNewPixelOrigin(s,i);return Q([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,s){if(!s)return t;var n=this.project(t,i),e=this.getSize().divideBy(2),o=new Y(n.subtract(e),n.add(e)),h=this._getBoundsOffset(o,s,i);return Math.abs(h.x)<=1&&Math.abs(h.y)<=1?t:this.unproject(n.add(h),i)},_limitOffset:function(t,i){if(!i)return t;var s=this.getPixelBounds(),n=new Y(s.min.add(t),s.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,s){var n=Q(this.project(i.getNorthEast(),s),this.project(i.getSouthWest(),s)),e=n.min.subtract(t.min),o=n.max.subtract(t.max);return new J(this._rebound(e.x,-o.x),this._rebound(e.y,-o.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),s=this.getMaxZoom(),n=Qt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(s,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Ci(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var s=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(s))&&(this.panBy(s,i),!0)},_createAnimProxy:function(){var t=this._proxy=xi("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=bi,s=this._proxy.style[i];Ii(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),s===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ki(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();Ii(this._proxy,this.project(t,i),this.getZoomScale(i,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,i,s){if(this._animatingZoom)return!0;if(s=s||{},!this._zoomAnimated||!1===s.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),e=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==s.animate&&!this.getSize().contains(e))&&(H((function(){this._moveStart(!0,s.noMoveStart||!1)._animateZoom(t,i,!0)}),this),!0)},_animateZoom:function(t,i,s,n){this._mapPane&&(s&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,zi(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(P(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Ci(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))}});var hs=G.extend({options:{position:"topright"},initialize:function(t){O(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),s=this.getPosition(),n=t._controlCorners[s];return zi(i,"leaflet-control"),-1!==s.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ki(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()}});os.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",s=this._controlContainer=xi("div",i+"control-container",this._container);function n(n,e){var o=i+n+" "+i+e;t[n+e]=xi("div",o,s)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ki(this._controlCorners[t]);ki(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var rs=hs.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,s,n){return s<n?-1:n<s?1:0}},initialize:function(t,i,s){for(var n in O(this,s),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return hs.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,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer($(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){zi(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?(zi(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):Ci(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Ci(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=xi("div",t),s=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Qi(i),Yi(i);var n=this._section=xi("section",t+"-list");s&&(this._map.on("click",this.collapse,this),Hi(i,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var e=this._layersLink=xi("a",t+"-toggle",i);e.href="#",e.title="Layers",e.setAttribute("role","button"),Hi(e,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){ts(t),this._expandSafely()}},this),s||this.expand(),this._baseLayersList=xi("div",t+"-base",n),this._separator=xi("div",t+"-separator",n),this._overlaysList=xi("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&$(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,s){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:s}),this.options.sortLayers&&this._layers.sort(P((function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Li(this._baseLayersList),Li(this._overlaysList),this._layerControlInputs=[];var t,i,s,n,e=0;for(s=0;s<this._layers.length;s++)n=this._layers[s],this._addItem(n),i=i||n.overlay,t=t||!n.overlay,e+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&e>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer($(t.target)),s=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;s&&this._map.fire(s,i)},_createRadioElement:function(t,i){var s='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=s,n.firstChild},_addItem:function(t){var i,s=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+$(this),n),this._layerControlInputs.push(i),i.layerId=$(t.layer),Hi(i,"click",this._onInputClick,this);var e=document.createElement("span");e.innerHTML=" "+t.name;var o=document.createElement("span");return s.appendChild(o),o.appendChild(i),o.appendChild(e),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(s),this._checkDisabledLayers(),s},_onInputClick:function(){if(!this._preventClick){var t,i,s=this._layerControlInputs,n=[],e=[];this._handlingClick=!0;for(var o=s.length-1;o>=0;o--)t=s[o],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||e.push(i);for(o=0;o<e.length;o++)this._map.hasLayer(e[o])&&this._map.removeLayer(e[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,i,s=this._layerControlInputs,n=this._map.getZoom(),e=s.length-1;e>=0;e--)t=s[e],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Hi(t,"click",ts),this.expand();var i=this;setTimeout((function(){Gi(t,"click",ts),i._preventClick=!1}))}}),as=hs.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",s=xi("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",s,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",s,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),s},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,i,s,n,e){var o=xi("a",s,n);return o.innerHTML=t,o.href="#",o.title=i,o.setAttribute("role","button"),o.setAttribute("aria-label",i),Qi(o),Hi(o,"click",is),Hi(o,"click",e,this),Hi(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";Ci(this._zoomInButton,i),Ci(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(zi(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(zi(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});os.mergeOptions({zoomControl:!0}),os.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new as,this.addControl(this.zoomControl))}));var us=hs.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",s=xi("div",i),n=this.options;return this._addScales(n,i+"-line",s),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),s},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,s){t.metric&&(this._mScale=xi("div",i,s)),t.imperial&&(this._iScale=xi("div",i,s))},_update:function(){var t=this._map,i=t.getSize().y/2,s=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(s)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t),s=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,s,i/t)},_updateImperial:function(t){var i,s,n,e=3.2808399*t;e>5280?(i=e/5280,s=this._getRoundNum(i),this._updateScale(this._iScale,s+" mi",s/i)):(n=this._getRoundNum(e),this._updateScale(this._iScale,n+" ft",n/e))},_updateScale:function(t,i,s){t.style.width=Math.round(this.options.maxWidth*s)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),s=t/i;return i*(s=s>=10?10:s>=5?5:s>=3?3:s>=2?2:1)}}),cs=hs.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Qt.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){O(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=xi("div","leaflet-control-attribution"),Qi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].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 i in this._attributions)this._attributions[i]&&t.push(i);var s=[];this.options.prefix&&s.push(this.options.prefix),t.length&&s.push(t.join(", ")),this._container.innerHTML=s.join(' <span aria-hidden="true">|</span> ')}}});os.mergeOptions({attributionControl:!0}),os.addInitHook((function(){this.options.attributionControl&&(new cs).addTo(this)})),hs.Layers=rs,hs.Zoom=as,hs.Scale=us,hs.Attribution=cs;var fs=G.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}});fs.addTo=function(t,i){return t.addHandler(i,this),this};var ls,ds=Qt.touch?"touchstart mousedown":"mousedown",vs=V.extend({options:{clickTolerance:3},initialize:function(t,i,s,n){O(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=s},enable:function(){this._enabled||(Hi(this._dragStartTarget,ds,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(vs._dragging===this&&this.finishDrag(!0),Gi(this._dragStartTarget,ds,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!$i(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)vs._dragging===this&&this.finishDrag();else if(!(vs._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(vs._dragging=this,this._preventOutline&&Ni(this._element),ji(),vi(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,s=function(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}(this._element);this._startPoint=new J(i.clientX,i.clientY),this._startPos=Di(this._element),this._parentScale=Ui(s);var n="mousedown"===t.type;Hi(document,n?"mousemove":"touchmove",this._onMove,this),Hi(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 i=t.touches&&1===t.touches.length?t.touches[0]:t,s=new J(i.clientX,i.clientY)._subtract(this._startPoint);(s.x||s.y)&&(Math.abs(s.x)+Math.abs(s.y)<this.options.clickTolerance||(s.x/=this._parentScale.x,s.y/=this._parentScale.y,ts(t),this._moved||(this.fire("dragstart"),this._moved=!0,zi(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),zi(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Bi(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){Ci(document.body,"leaflet-dragging"),this._lastTarget&&(Ci(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Gi(document,"mousemove touchmove",this._onMove,this),Gi(document,"mouseup touchend touchcancel",this._onUp,this),Ri(),mi();var i=this._moved&&this._moving;this._moving=!1,vs._dragging=!1,i&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function ms(t,i,s){var n,e,o,h,r,a,u,c,f,l=[1,4,2,8];for(e=0,u=t.length;e<u;e++)t[e]._code=Ms(t[e],i);for(h=0;h<4;h++){for(c=l[h],n=[],e=0,o=(u=t.length)-1;e<u;o=e++)r=t[e],a=t[o],r._code&c?a._code&c||((f=ys(a,r,c,i,s))._code=Ms(f,i),n.push(f)):(a._code&c&&((f=ys(a,r,c,i,s))._code=Ms(f,i),n.push(f)),n.push(r));t=n}return t}function ps(t){for(var i=0,s=0,n=0,e=0;e<t.length;e++){var o=nt(t[e]);i+=o.lat,s+=o.lng,n++}return nt([i/n,s/n])}function gs(t,i){if(!i||!t.length)return t.slice();var s=i*i;return t=function(t,i){for(var s=[t[0]],n=1,e=0,o=t.length;n<o;n++)xs(t[n],t[e])>i&&(s.push(t[n]),e=n);e<o-1&&s.push(t[o-1]);return s}(t,s),t=function(t,i){var s=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(s);n[0]=n[s-1]=1,bs(t,n,i,0,s-1);var e,o=[];for(e=0;e<s;e++)n[e]&&o.push(t[e]);return o}(t,s),t}function ws(t,i,s){return Math.sqrt(ks(t,i,s,!0))}function bs(t,i,s,n,e){var o,h,r,a=0;for(h=n+1;h<=e-1;h++)(r=ks(t[h],t[n],t[e],!0))>a&&(o=h,a=r);a>s&&(i[o]=1,bs(t,i,s,n,o),bs(t,i,s,o,e))}function _s(t,i,s,n,e){var o,h,r,a=n?ls:Ms(t,s),u=Ms(i,s);for(ls=u;;){if(!(a|u))return[t,i];if(a&u)return!1;r=Ms(h=ys(t,i,o=a||u,s,e),s),o===a?(t=h,a=r):(i=h,u=r)}}function ys(t,i,s,n,e){var o,h,r=i.x-t.x,a=i.y-t.y,u=n.min,c=n.max;return 8&s?(o=t.x+r*(c.y-t.y)/a,h=c.y):4&s?(o=t.x+r*(u.y-t.y)/a,h=u.y):2&s?(o=c.x,h=t.y+a*(c.x-t.x)/r):1&s&&(o=u.x,h=t.y+a*(u.x-t.x)/r),new J(o,h,e)}function Ms(t,i){var s=0;return t.x<i.min.x?s|=1:t.x>i.max.x&&(s|=2),t.y<i.min.y?s|=4:t.y>i.max.y&&(s|=8),s}function xs(t,i){var s=i.x-t.x,n=i.y-t.y;return s*s+n*n}function ks(t,i,s,n){var e,o=i.x,h=i.y,r=s.x-o,a=s.y-h,u=r*r+a*a;return u>0&&((e=((t.x-o)*r+(t.y-h)*a)/u)>1?(o=s.x,h=s.y):e>0&&(o+=r*e,h+=a*e)),r=t.x-o,a=t.y-h,n?r*r+a*a:new J(o,h)}function Ls(t){return!B(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}var Ps={project:function(t){return new J(t.lng,t.lat)},unproject:function(t){return new st(t.y,t.x)},bounds:new Y([-180,-90],[180,90])},Ts={R:6378137,R_MINOR:6356752.314245179,bounds:new Y([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,s=this.R,n=t.lat*i,e=this.R_MINOR/s,o=Math.sqrt(1-e*e),h=o*Math.sin(n),r=Math.tan(Math.PI/4-n/2)/Math.pow((1-h)/(1+h),o/2);return n=-s*Math.log(Math.max(r,1e-10)),new J(t.lng*i*s,n)},unproject:function(t){for(var i,s=180/Math.PI,n=this.R,e=this.R_MINOR/n,o=Math.sqrt(1-e*e),h=Math.exp(-t.y/n),r=Math.PI/2-2*Math.atan(h),a=0,u=.1;a<15&&Math.abs(u)>1e-7;a++)i=o*Math.sin(r),i=Math.pow((1-i)/(1+i),o/2),r+=u=Math.PI/2-2*Math.atan(h*i)-r;return new st(r*s,t.x*s/n)}},$s=x({},ht,{code:"EPSG:3395",projection:Ts,transformation:function(){var t=.5/(Math.PI*Ts.R);return ct(t,.5,-t,.5)}()}),zs=x({},ht,{code:"EPSG:4326",projection:Ps,transformation:ct(1/180,1,-1/180,.5)}),Cs=x({},ot,{projection:Ps,transformation:ct(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var s=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(s*s+n*n)},infinite:!0});ot.Earth=ht,ot.EPSG3395=$s,ot.EPSG3857=lt,ot.EPSG900913=dt,ot.EPSG4326=zs,ot.Simple=Cs;var Ss=V.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[$(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[$(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var s=this.getEvents();i.on(s,this),this.once("remove",(function(){i.off(s,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});os.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=$(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=$(t);return this._layers[i]?(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return $(t)in this._layers},eachLayer:function(t,i){for(var s in this._layers)t.call(i,this._layers[s]);return this},_addLayers:function(t){for(var i=0,s=(t=t?B(t)?t:[t]:[]).length;i<s;i++)this.addLayer(t[i])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[$(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=$(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,s=this._getZoomSpan();for(var n in this._zoomBoundLayers){var e=this._zoomBoundLayers[n].options;t=void 0===e.minZoom?t:Math.min(t,e.minZoom),i=void 0===e.maxZoom?i:Math.max(i,e.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,s!==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 Es=Ss.extend({initialize:function(t,i){var s,n;if(O(this,i),this._layers={},t)for(s=0,n=t.length;s<n;s++)this.addLayer(t[s])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],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 i,s,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(s=this._layers[i])[t]&&s[t].apply(s,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var s in this._layers)t.call(i,this._layers[s]);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 $(t)}}),As=Es.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Es.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),Es.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 tt;for(var i in this._layers){var s=this._layers[i];t.extend(s.getBounds?s.getBounds():s.getLatLng())}return t}}),Os=G.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){O(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var s=this._getIconUrl(t);if(!s){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(s,i&&"IMG"===i.tagName?i: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,i){var s=this.options,n=s[i+"Size"];"number"==typeof n&&(n=[n,n]);var e=X(n),o=X("shadow"===i&&s.shadowAnchor||s.iconAnchor||e&&e.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(s.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),e&&(t.style.width=e.x+"px",t.style.height=e.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Qt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Is=Os.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 Is.imagePath&&(Is.imagePath=this._detectIconPath()),(this.options.imagePath||Is.imagePath)+Os.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var i=function(t,i,s){var n=i.exec(t);return n&&n[s]};return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=xi("div","leaflet-default-icon-path",document.body),i=Mi(t,"background-image")||Mi(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;var s=document.querySelector('link[href$="leaflet.css"]');return s?s.href.substring(0,s.href.length-11-1):""}}),Bs=fs.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new vs(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),zi(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&&Ci(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,s=i._map,n=this._marker.options.autoPanSpeed,e=this._marker.options.autoPanPadding,o=Di(i._icon),h=s.getPixelBounds(),r=s.getPixelOrigin(),a=Q(h.min._subtract(r).add(e),h.max._subtract(r).subtract(e));if(!a.contains(o)){var u=X((Math.max(a.max.x,o.x)-a.max.x)/(h.max.x-a.max.x)-(Math.min(a.min.x,o.x)-a.min.x)/(h.min.x-a.min.x),(Math.max(a.max.y,o.y)-a.max.y)/(h.max.y-a.max.y)-(Math.min(a.min.y,o.y)-a.min.y)/(h.min.y-a.min.y)).multiplyBy(n);s.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),Bi(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=H(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&&(q(this._panRequest),this._panRequest=H(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,s=i._shadow,n=Di(i._icon),e=i._map.layerPointToLatLng(n);s&&Bi(s,n),i._latlng=e,t.latlng=e,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){q(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ds=Ss.extend({options:{icon:new Is,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,i){O(this,i),this._latlng=nt(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 i=this._latlng;return this._latlng=nt(t),this.update(),this.fire("move",{oldLatLng:i,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,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),s=t.icon.createIcon(this._icon),n=!1;s!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(s.title=t.title),"IMG"===s.tagName&&(s.alt=t.alt||"")),zi(s,i),t.keyboard&&(s.tabIndex="0",s.setAttribute("role","button")),this._icon=s,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Hi(s,"focus",this._panOnFocus,this);var e=t.icon.createShadow(this._shadow),o=!1;e!==this._shadow&&(this._removeShadow(),o=!0),e&&(zi(e,i),e.alt=""),this._shadow=e,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),e&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Gi(this._icon,"focus",this._panOnFocus,this),ki(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ki(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Bi(this._icon,t),this._shadow&&Bi(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 i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&(zi(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Bs)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Bs(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&&Ai(this._icon,t),this._shadow&&Ai(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var i=this.options.icon.options,s=i.iconSize?X(i.iconSize):X(0,0),n=i.iconAnchor?X(i.iconAnchor):X(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:s.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Zs(t,i){return new Ds(t,i)}var js=Ss.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 O(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)}}),Rs=js.extend({options:{fill:!0,radius:10},initialize:function(t,i){O(this,i),this._latlng=nt(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=nt(t),this.redraw(),this.fire("move",{oldLatLng:i,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 i=t&&t.radius||this._radius;return js.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,s=this._clickTolerance(),n=[t+s,i+s];this._pxBounds=new Y(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()}}),Ns=Rs.extend({initialize:function(t,i,s){if("number"==typeof i&&(i=x({},s,{radius:i})),O(this,i),this._latlng=nt(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 tt(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:js.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,s=this._map,n=s.options.crs;if(n.distance===ht.distance){var e=Math.PI/180,o=this._mRadius/ht.R/e,h=s.project([i+o,t]),r=s.project([i-o,t]),a=h.add(r).divideBy(2),u=s.unproject(a).lat,c=Math.acos((Math.cos(o*e)-Math.sin(i*e)*Math.sin(u*e))/(Math.cos(i*e)*Math.cos(u*e)))/e;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*i)),this._point=a.subtract(s.getPixelOrigin()),this._radius=isNaN(c)?0:a.x-s.project([u,t-c]).x,this._radiusY=a.y-h.y}else{var f=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=s.latLngToLayerPoint(this._latlng),this._radius=this._point.x-s.latLngToLayerPoint(f).x}this._updateBounds()}}),Fs=js.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){O(this,i),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 i,s,n=1/0,e=null,o=ks,h=0,r=this._parts.length;h<r;h++)for(var a=this._parts[h],u=1,c=a.length;u<c;u++){var f=o(t,i=a[u-1],s=a[u],!0);f<n&&(n=f,e=o(t,i,s))}return e&&(e.distance=Math.sqrt(n)),e},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return function(t,i){var s,n,e,o,h,r,a,u;if(!t||0===t.length)throw new Error("latlngs not passed");Ls(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=nt([0,0]),f=it(t);f.getNorthWest().distanceTo(f.getSouthWest())*f.getNorthEast().distanceTo(f.getNorthWest())<1700&&(c=ps(t));var l=t.length,d=[];for(s=0;s<l;s++){var v=nt(t[s]);d.push(i.project(nt([v.lat-c.lat,v.lng-c.lng])))}for(s=0,n=0;s<l-1;s++)n+=d[s].distanceTo(d[s+1])/2;if(0===n)u=d[0];else for(s=0,o=0;s<l-1;s++)if(h=d[s],r=d[s+1],(o+=e=h.distanceTo(r))>n){a=(o-n)/e,u=[r.x-a*(r.x-h.x),r.y-a*(r.y-h.y)];break}var m=i.unproject(X(u));return nt([m.lat+c.lat,m.lng+c.lng])}(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=nt(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new tt,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Ls(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],s=Ls(t),n=0,e=t.length;n<e;n++)s?(i[n]=nt(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new Y;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(),i=new J(t,t);this._rawPxBounds&&(this._pxBounds=new Y([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)]))},_projectLatlngs:function(t,i,s){var n,e,o=t[0]instanceof st,h=t.length;if(o){for(e=[],n=0;n<h;n++)e[n]=this._map.latLngToLayerPoint(t[n]),s.extend(e[n]);i.push(e)}else for(n=0;n<h;n++)this._projectLatlngs(t[n],i,s)},_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 i,s,n,e,o,h,r,a=this._parts;for(i=0,n=0,e=this._rings.length;i<e;i++)for(s=0,o=(r=this._rings[i]).length;s<o-1;s++)(h=_s(r[s],r[s+1],t,s,!0))&&(a[n]=a[n]||[],a[n].push(h[0]),h[1]===r[s+1]&&s!==o-2||(a[n].push(h[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,s=0,n=t.length;s<n;s++)t[s]=gs(t[s],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var s,n,e,o,h,r,a=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,o=this._parts.length;s<o;s++)for(n=0,e=(h=(r=this._parts[s]).length)-1;n<h;e=n++)if((i||0!==n)&&ws(t,r[e],r[n])<=a)return!0;return!1}});Fs._flat=function(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Ls(t)};var Us=Fs.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 function(t,i){var s,n,e,o,h,r,a,u,c;if(!t||0===t.length)throw new Error("latlngs not passed");Ls(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var f=nt([0,0]),l=it(t);l.getNorthWest().distanceTo(l.getSouthWest())*l.getNorthEast().distanceTo(l.getNorthWest())<1700&&(f=ps(t));var d=t.length,v=[];for(s=0;s<d;s++){var m=nt(t[s]);v.push(i.project(nt([m.lat-f.lat,m.lng-f.lng])))}for(r=a=u=0,s=0,n=d-1;s<d;n=s++)e=v[s],o=v[n],h=e.y*o.x-o.y*e.x,a+=(e.x+o.x)*h,u+=(e.y+o.y)*h,r+=3*h;c=0===r?v[0]:[a/r,u/r];var p=i.unproject(X(c));return nt([p.lat+f.lat,p.lng+f.lng])}(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var i=Fs.prototype._convertLatLngs.call(this,t),s=i.length;return s>=2&&i[0]instanceof st&&i[0].equals(i[s-1])&&i.pop(),i},_setLatLngs:function(t){Fs.prototype._setLatLngs.call(this,t),Ls(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Ls(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,s=new J(i,i);if(t=new Y(t.min.subtract(s),t.max.add(s)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,e=0,o=this._rings.length;e<o;e++)(n=ms(this._rings[e],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,s,n,e,o,h,r,a,u=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,r=this._parts.length;e<r;e++)for(o=0,h=(a=(i=this._parts[e]).length)-1;o<a;h=o++)s=i[o],n=i[h],s.y>t.y!=n.y>t.y&&t.x<(n.x-s.x)*(t.y-s.y)/(n.y-s.y)+s.x&&(u=!u);return u||Fs.prototype._containsPoint.call(this,t,!0)}}),Hs=As.extend({initialize:function(t,i){O(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,s,n,e=B(t)?t:t.features;if(e){for(i=0,s=e.length;i<s;i++)((n=e[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var h=qs(t,o);return h?(h.feature=Ys(t),h.defaultOptions=h.options,this.resetStyle(h),o.onEachFeature&&o.onEachFeature(t,h),this.addLayer(h)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=x({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(i){this._setLayerStyle(i,t)}),this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function qs(t,i){var s,n,e,o,h="Feature"===t.type?t.geometry:t,r=h?h.coordinates:null,a=[],u=i&&i.pointToLayer,c=i&&i.coordsToLatLng||Ws;if(!r&&!h)return null;switch(h.type){case"Point":return Gs(u,t,s=c(r),i);case"MultiPoint":for(e=0,o=r.length;e<o;e++)s=c(r[e]),a.push(Gs(u,t,s,i));return new As(a);case"LineString":case"MultiLineString":return n=Vs(r,"LineString"===h.type?0:1,c),new Fs(n,i);case"Polygon":case"MultiPolygon":return n=Vs(r,"Polygon"===h.type?1:2,c),new Us(n,i);case"GeometryCollection":for(e=0,o=h.geometries.length;e<o;e++){var f=qs({geometry:h.geometries[e],type:"Feature",properties:t.properties},i);f&&a.push(f)}return new As(a);case"FeatureCollection":for(e=0,o=h.features.length;e<o;e++){var l=qs(h.features[e],i);l&&a.push(l)}return new As(a);default:throw new Error("Invalid GeoJSON object.")}}function Gs(t,i,s,n){return t?t(i,s):new Ds(s,n&&n.markersInheritOptions&&n)}function Ws(t){return new st(t[1],t[0],t[2])}function Vs(t,i,s){for(var n,e=[],o=0,h=t.length;o<h;o++)n=i?Vs(t[o],i-1,s):(s||Ws)(t[o]),e.push(n);return e}function Js(t,i){return void 0!==(t=nt(t)).alt?[S(t.lng,i),S(t.lat,i),S(t.alt,i)]:[S(t.lng,i),S(t.lat,i)]}function Ks(t,i,s,n){for(var e=[],o=0,h=t.length;o<h;o++)e.push(i?Ks(t[o],Ls(t[o])?0:i-1,s,n):Js(t[o],n));return!i&&s&&e.length>0&&e.push(e[0].slice()),e}function Xs(t,i){return t.feature?x({},t.feature,{geometry:i}):Ys(i)}function Ys(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Qs={toGeoJSON:function(t){return Xs(this,{type:"Point",coordinates:Js(this.getLatLng(),t)})}};Ds.include(Qs),Ns.include(Qs),Rs.include(Qs),Fs.include({toGeoJSON:function(t){var i=!Ls(this._latlngs);return Xs(this,{type:(i?"Multi":"")+"LineString",coordinates:Ks(this._latlngs,i?1:0,!1,t)})}}),Us.include({toGeoJSON:function(t){var i=!Ls(this._latlngs),s=i&&!Ls(this._latlngs[0]),n=Ks(this._latlngs,s?2:i?1:0,!0,t);return i||(n=[n]),Xs(this,{type:(s?"Multi":"")+"Polygon",coordinates:n})}}),Es.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(s){i.push(s.toGeoJSON(t).geometry.coordinates)})),Xs(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var s="GeometryCollection"===i,n=[];return this.eachLayer((function(i){if(i.toGeoJSON){var e=i.toGeoJSON(t);if(s)n.push(e.geometry);else{var o=Ys(e);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}})),s?Xs(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var tn=Ss.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,s){this._url=t,this._bounds=it(i),O(this,s)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(zi(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ki(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&&Pi(this._image),this},bringToBack:function(){return this._map&&Ti(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=it(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,i=this._image=t?this._url:xi("img");zi(i,"leaflet-image-layer"),this._zoomAnimated&&zi(i,"leaflet-zoom-animated"),this.options.className&&zi(i,this.options.className),i.onselectstart=C,i.onmousemove=C,i.onload=P(this.fire,this,"load"),i.onerror=P(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),s=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ii(this._image,s,i)},_reset:function(){var t=this._image,i=new Y(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),s=i.getSize();Bi(t,i.min),t.style.width=s.x+"px",t.style.height=s.y+"px"},_updateOpacity:function(){Ai(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()}});tn.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:xi("video");if(zi(i,"leaflet-image-layer"),this._zoomAnimated&&zi(i,"leaflet-zoom-animated"),this.options.className&&zi(i,this.options.className),i.onselectstart=C,i.onmousemove=C,i.onloadeddata=P(this.fire,this,"load"),t){for(var s=i.getElementsByTagName("source"),n=[],e=0;e<s.length;e++)n.push(s[e].src);this._url=s.length>0?n:[i.src]}else{B(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var o=0;o<this._url.length;o++){var h=xi("source");h.src=this._url[o],i.appendChild(h)}}}}),tn.extend({_initImage:function(){var t=this._image=this._url;zi(t,"leaflet-image-layer"),this._zoomAnimated&&zi(t,"leaflet-zoom-animated"),this.options.className&&zi(t,this.options.className),t.onselectstart=C,t.onmousemove=C}});var sn=Ss.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,i){t&&(t instanceof st||B(t))?(this._latlng=nt(t),O(this,i)):(O(this,t),this._source=i),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&&Ai(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&Ai(this._container,1),this.bringToFront(),this.options.interactive&&(zi(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(Ai(this._container,0),this._removeTimeout=setTimeout(P(ki,void 0,this._container),200)):ki(this._container),this.options.interactive&&(Ci(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=nt(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&&Pi(this._container),this},bringToBack:function(){return this._map&&Ti(this._container),this},_prepareOpen:function(t){var i=this._source;if(!i._map)return!1;if(i instanceof As){i=null;var s=this._source._layers;for(var n in s)if(s[n]._map){i=s[n];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=X(this.options.offset),s=this._getAnchor();this._zoomAnimated?Bi(this._container,t.add(s)):i=i.add(t).add(s);var n=this._containerBottom=-i.y,e=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=e+"px"}},_getAnchor:function(){return[0,0]}});os.include({_initOverlay:function(t,i,s,n){var e=i;return e instanceof t||(e=new t(n).setContent(i)),s&&e.setLatLng(s),e}}),Ss.include({_initOverlay:function(t,i,s,n){var e=s;return e instanceof t?(O(e,n),e._source=this):(e=i&&!n?i:new t(n,this)).setContent(s),e}});var nn=sn.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,sn.prototype.openOn.call(this,t)},onAdd:function(t){sn.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof js||this._source.on("preclick",Xi))},onRemove:function(t){sn.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof js||this._source.off("preclick",Xi))},getEvents:function(){var t=sn.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",i=this._container=xi("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),s=this._wrapper=xi("div",t+"-content-wrapper",i);if(this._contentNode=xi("div",t+"-content",s),Qi(i),Yi(this._contentNode),Hi(i,"contextmenu",Xi),this._tipContainer=xi("div",t+"-tip-container",i),this._tip=xi("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=xi("a",t+"-close-button",i);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',Hi(n,"click",(function(t){ts(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var s=t.offsetWidth;s=Math.min(s,this.options.maxWidth),s=Math.max(s,this.options.minWidth),i.width=s+1+"px",i.whiteSpace="",i.height="";var n=t.offsetHeight,e=this.options.maxHeight,o="leaflet-popup-scrolled";e&&n>e?(i.height=e+"px",zi(t,o)):Ci(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),s=this._getAnchor();Bi(this._container,i.add(s))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,i=parseInt(Mi(this._container,"marginBottom"),10)||0,s=this._container.offsetHeight+i,n=this._containerWidth,e=new J(this._containerLeft,-s-this._containerBottom);e._add(Di(this._container));var o=t.layerPointToContainerPoint(e),h=X(this.options.autoPanPadding),r=X(this.options.autoPanPaddingTopLeft||h),a=X(this.options.autoPanPaddingBottomRight||h),u=t.getSize(),c=0,f=0;o.x+n+a.x>u.x&&(c=o.x+n-u.x+a.x),o.x-c-r.x<0&&(c=o.x-r.x),o.y+s+a.y>u.y&&(f=o.y+s-u.y+a.y),o.y-f-r.y<0&&(f=o.y-r.y),(c||f)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,f]))}},_getAnchor:function(){return X(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});os.mergeOptions({closePopupOnClick:!0}),os.include({openPopup:function(t,i,s){return this._initOverlay(nn,t,i,s).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Ss.include({bindPopup:function(t,i){return this._popup=this._initOverlay(nn,this._popup,t,i),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 As||(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){is(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof js?(this._popup._source=i,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 en=sn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){sn.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){sn.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=sn.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=xi("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+$(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,s,n=this._map,e=this._container,o=n.latLngToContainerPoint(n.getCenter()),h=n.layerPointToContainerPoint(t),r=this.options.direction,a=e.offsetWidth,u=e.offsetHeight,c=X(this.options.offset),f=this._getAnchor();"top"===r?(i=a/2,s=u):"bottom"===r?(i=a/2,s=0):"center"===r?(i=a/2,s=u/2):"right"===r?(i=0,s=u/2):"left"===r?(i=a,s=u/2):h.x<o.x?(r="right",i=0,s=u/2):(r="left",i=a+2*(c.x+f.x),s=u/2),t=t.subtract(X(i,s,!0)).add(c).add(f),Ci(e,"leaflet-tooltip-right"),Ci(e,"leaflet-tooltip-left"),Ci(e,"leaflet-tooltip-top"),Ci(e,"leaflet-tooltip-bottom"),zi(e,"leaflet-tooltip-"+r),Bi(e,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&Ai(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return X(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});os.include({openTooltip:function(t,i,s){return this._initOverlay(en,t,i,s).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Ss.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(en,this._tooltip,t,i),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 i=t?"off":"on",s={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?s.add=this._openTooltip:(s.mouseover=this._openTooltip,s.mouseout=this.closeTooltip,s.click=this._openTooltip,this._map?this._addFocusListeners():s.add=this._addFocusListeners),this._tooltip.options.sticky&&(s.mousemove=this._moveTooltip),this[i](s),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof As||(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 i="function"==typeof t.getElement&&t.getElement();i&&(Hi(i,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),Hi(i,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var i="function"==typeof t.getElement&&t.getElement();i&&i.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 i=this;this._map.once("moveend",(function(){i._openOnceFlag=!1,i._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var i,s,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),s=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(s)),this._tooltip.setLatLng(n)}}),Os.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),s=this.options;if(s.html instanceof Element?(Li(i),i.appendChild(s.html)):i.innerHTML=!1!==s.html?s.html:"",s.bgPos){var n=X(s.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),Os.Default=Is;var on=Ss.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Qt.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){O(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ki(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(Pi(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Ti(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,i,s,n,e,o,h,r={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=(t=this._onMoveEnd,i=this.options.updateInterval,s=this,h=function(){n=!1,e&&(o.apply(s,e),e=!1)},o=function(){n?e=arguments:(t.apply(s,arguments),setTimeout(h,i),n=!0)},o)),r.move=this._onMove),this._zoomAnimated&&(r.zoomanim=this._animateZoom),r},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof J?t:new J(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 i,s=this.getPane().children,n=-t(-1/0,1/0),e=0,o=s.length;e<o;e++)i=s[e].style.zIndex,s[e]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Qt.ielt9){Ai(this._container,this.options.opacity);var t=+new Date,i=!1,s=!1;for(var n in this._tiles){var e=this._tiles[n];if(e.current&&e.loaded){var o=Math.min(1,(t-e.loaded)/200);Ai(e.el,o),o<1?i=!0:(e.active?s=!0:this._onOpaqueTile(e),e.active=!0)}}s&&!this._noPrune&&this._pruneTiles(),i&&(q(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this))}},_onOpaqueTile:C,_initContainer:function(){this._container||(this._container=xi("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,i=this.options.maxZoom;if(void 0!==t){for(var s in this._levels)s=Number(s),this._levels[s].el.children.length||s===t?(this._levels[s].el.style.zIndex=i-Math.abs(t-s),this._onUpdateLevel(s)):(ki(this._levels[s].el),this._removeTilesAtZoom(s),this._onRemoveLevel(s),delete this._levels[s]);var n=this._levels[t],e=this._map;return n||((n=this._levels[t]={}).el=xi("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=e.project(e.unproject(e.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,e.getCenter(),e.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:C,_onRemoveLevel:C,_onCreateLevel:C,_pruneTiles:function(){if(this._map){var t,i,s=this._map.getZoom();if(s>this.options.maxZoom||s<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var n=i.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 i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ki(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,s,n){var e=Math.floor(t/2),o=Math.floor(i/2),h=s-1,r=new J(+e,+o);r.z=+h;var a=this._tileCoordsToKey(r),u=this._tiles[a];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),h>n&&this._retainParent(e,o,h,n))},_retainChildren:function(t,i,s,n){for(var e=2*t;e<2*t+2;e++)for(var o=2*i;o<2*i+2;o++){var h=new J(e,o);h.z=s+1;var r=this._tileCoordsToKey(h),a=this._tiles[r];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),s+1<n&&this._retainChildren(e,o,s+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,s,n){var e=Math.round(i);e=void 0!==this.options.maxZoom&&e>this.options.maxZoom||void 0!==this.options.minZoom&&e<this.options.minZoom?void 0:this._clampZoom(e);var o=this.options.updateWhenZooming&&e!==this._tileZoom;n&&!o||(this._tileZoom=e,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==e&&this._update(t),s||this._pruneTiles(),this._noPrune=!!s),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var s in this._levels)this._setZoomTransform(this._levels[s],t,i)},_setZoomTransform:function(t,i,s){var n=this._map.getZoomScale(s,t.zoom),e=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,s)).round();Qt.any3d?Ii(t.el,e,n):Bi(t.el,e)},_resetGrid:function(){var t=this._map,i=t.options.crs,s=this._tileSize=this.getTileSize(),n=this._tileZoom,e=this._map.getPixelWorldBounds(this._tileZoom);e&&(this._globalTileRange=this._pxBoundsToTileRange(e)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/s.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/s.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/s.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/s.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,s=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(s,this._tileZoom),e=i.project(t,this._tileZoom).floor(),o=i.getSize().divideBy(2*n);return new Y(e.subtract(o),e.add(o))},_update:function(t){var i=this._map;if(i){var s=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),e=this._pxBoundsToTileRange(n),o=e.getCenter(),h=[],r=this.options.keepBuffer,a=new Y(e.getBottomLeft().subtract([r,-r]),e.getTopRight().add([r,-r]));if(!(isFinite(e.min.x)&&isFinite(e.min.y)&&isFinite(e.max.x)&&isFinite(e.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&&a.contains(new J(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(s-this._tileZoom)>1)this._setView(t,s);else{for(var f=e.min.y;f<=e.max.y;f++)for(var l=e.min.x;l<=e.max.x;l++){var d=new J(l,f);if(d.z=this._tileZoom,this._isValidTile(d)){var v=this._tiles[this._tileCoordsToKey(d)];v?v.current=!0:h.push(d)}}if(h.sort((function(t,i){return t.distanceTo(o)-i.distanceTo(o)})),0!==h.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(l=0;l<h.length;l++)this._addTile(h[l],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var s=this._globalTileRange;if(!i.wrapLng&&(t.x<s.min.x||t.x>s.max.x)||!i.wrapLat&&(t.y<s.min.y||t.y>s.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return it(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,s=this.getTileSize(),n=t.scaleBy(s),e=n.add(s);return[i.unproject(n,t.z),i.unproject(e,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),s=new tt(i[0],i[1]);return this.options.noWrap||(s=this._map.wrapLatLngBounds(s)),s},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),s=new J(+i[0],+i[1]);return s.z=+i[2],s},_removeTile:function(t){var i=this._tiles[t];i&&(ki(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){zi(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=C,t.onmousemove=C,Qt.ielt9&&this.options.opacity<1&&Ai(t,this.options.opacity)},_addTile:function(t,i){var s=this._getTilePos(t),n=this._tileCoordsToKey(t),e=this.createTile(this._wrapCoords(t),P(this._tileReady,this,t));this._initTile(e),this.createTile.length<2&&H(P(this._tileReady,this,t,null,e)),Bi(e,s),this._tiles[n]={el:e,coords:t,current:!0},i.appendChild(e),this.fire("tileloadstart",{tile:e,coords:t})},_tileReady:function(t,i,s){i&&this.fire("tileerror",{error:i,tile:s,coords:t});var n=this._tileCoordsToKey(t);(s=this._tiles[n])&&(s.loaded=+new Date,this._map._fadeAnimated?(Ai(s.el,0),q(this._fadeFrame),this._fadeFrame=H(this._updateOpacity,this)):(s.active=!0,this._pruneTiles()),i||(zi(s.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:s.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Qt.ielt9||!this._map._fadeAnimated?H(this._pruneTiles,this):setTimeout(P(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new J(this._wrapX?z(t.x,this._wrapX):t.x,this._wrapY?z(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new Y(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),hn=on.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=O(this,i)).detectRetina&&Qt.retina&&i.maxZoom>0?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var s=document.createElement("img");return Hi(s,"load",P(this._tileOnLoad,this,i,s)),Hi(s,"error",P(this._tileOnError,this,i,s)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(s.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(s.referrerPolicy=this.options.referrerPolicy),s.alt="",s.src=this.getTileUrl(t),s},getTileUrl:function(t){var i={r:Qt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var s=this._globalTileRange.max.y-t.y;this.options.tms&&(i.y=s),i["-y"]=s}return function(t,i){return t.replace(I,(function(t,s){var n=i[s];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n}))}(this._url,x(i,this.options))},_tileOnLoad:function(t,i){Qt.ielt9?setTimeout(P(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,s){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(s,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom;return this.options.zoomReverse&&(t=i-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=C,i.onerror=C,!i.complete)){i.src=Z;var s=this._tiles[t].coords;ki(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:s})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",Z),on.prototype._removeTile.call(this,t)},_tileReady:function(t,i,s){if(this._map&&(!s||s.getAttribute("src")!==Z))return on.prototype._tileReady.call(this,t,i,s)}});function rn(t,i){return new hn(t,i)}var an=hn.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,i){this._url=t;var s=x({},this.defaultWmsParams);for(var n in i)n in this.options||(s[n]=i[n]);var e=(i=O(this,i)).detectRetina&&Qt.retina?2:1,o=this.getTileSize();s.width=o.x*e,s.height=o.y*e,this.wmsParams=s},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code,hn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),s=this._crs,n=Q(s.project(i[0]),s.project(i[1])),e=n.min,o=n.max,h=(this._wmsVersion>=1.3&&this._crs===zs?[e.y,e.x,o.y,o.x]:[e.x,e.y,o.x,o.y]).join(","),r=hn.prototype.getTileUrl.call(this,t);return r+function(t,i,s){var n=[];for(var e in t)n.push(encodeURIComponent(s?e.toUpperCase():e)+"="+encodeURIComponent(t[e]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}(this.wmsParams,r,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+h},setParams:function(t,i){return x(this.wmsParams,t),i||this.redraw(),this}});hn.WMS=an,rn.wms=function(t,i){return new an(t,i)};var un=Ss.extend({options:{padding:.1},initialize:function(t){O(this,t),$(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),zi(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,i){var s=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),e=this._map.project(this._center,i),o=n.multiplyBy(-s).add(e).subtract(this._map._getNewPixelOrigin(t,i));Qt.any3d?Ii(this._container,o,s):Bi(this._container,o)},_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,i=this._map.getSize(),s=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new Y(s,s.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),cn=un.extend({options:{tolerance:0},getEvents:function(){var t=un.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){un.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Hi(t,"mousemove",this._onMouseMove,this),Hi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Hi(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){q(this._redrawRequest),delete this._ctx,ki(this._container),Gi(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){un.prototype._update.call(this);var t=this._bounds,i=this._container,s=t.getSize(),n=Qt.retina?2:1;Bi(i,t.min),i.width=n*s.x,i.height=n*s.y,i.style.width=s.x+"px",i.style.height=s.y+"px",Qt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){un.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[$(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,s=i.next,n=i.prev;s?s.prev=n:this._drawLast=n,n?n.next=s:this._drawFirst=s,delete t._order,delete this._layers[$(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 i,s,n=t.options.dashArray.split(/[, ]+/),e=[];for(s=0;s<n.length;s++){if(i=Number(n[s]),isNaN(i))return;e.push(i)}t.options._dashArray=e}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||H(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new Y,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_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 i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.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,i=this._redrawBounds;if(this._ctx.save(),i){var s=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,s.x,s.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var s,n,e,o,h=t._parts,r=h.length,a=this._ctx;if(r){for(a.beginPath(),s=0;s<r;s++){for(n=0,e=h[s].length;n<e;n++)o=h[s][n],a[n?"lineTo":"moveTo"](o.x,o.y);i&&a.closePath()}this._fillStroke(a,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,s=this._ctx,n=Math.max(Math.round(t._radius),1),e=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==e&&(s.save(),s.scale(1,e)),s.beginPath(),s.arc(i.x,i.y/e,n,0,2*Math.PI,!1),1!==e&&s.restore(),this._fillStroke(s,t)}},_fillStroke:function(t,i){var s=i.options;s.fill&&(t.globalAlpha=s.fillOpacity,t.fillStyle=s.fillColor||s.color,t.fill(s.fillRule||"evenodd")),s.stroke&&0!==s.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=s.opacity,t.lineWidth=s.weight,t.strokeStyle=s.color,t.lineCap=s.lineCap,t.lineJoin=s.lineJoin,t.stroke())},_onClick:function(t){for(var i,s,n=this._map.mouseEventToLayerPoint(t),e=this._drawFirst;e;e=e.next)(i=e.layer).options.interactive&&i._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(s=i);this._fireEvent(!!s&&[s],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(Ci(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var s,n,e=this._drawFirst;e;e=e.next)(s=e.layer).options.interactive&&s._containsPoint(i)&&(n=s);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(zi(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(P((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,i,s){this._map._fireDOMEvent(i,s||i.type,t)},_bringToFront:function(t){var i=t._order;if(i){var s=i.next,n=i.prev;s&&(s.prev=n,n?n.next=s:s&&(this._drawFirst=s),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))}},_bringToBack:function(t){var i=t._order;if(i){var s=i.next,n=i.prev;n&&(n.next=s,s?s.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}});var fn=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">')}}(),ln={_initContainer:function(){this._container=xi("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(un.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=fn("shape");zi(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=fn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[$(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;ki(i),t.removeInteractiveTarget(i),delete this._layers[$(t)]},_updateStyle:function(t){var i=t._stroke,s=t._fill,n=t.options,e=t._container;e.stroked=!!n.stroke,e.filled=!!n.fill,n.stroke?(i||(i=t._stroke=fn("stroke")),e.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=B(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(e.removeChild(i),t._stroke=null),n.fill?(s||(s=t._fill=fn("fill")),e.appendChild(s),s.color=n.fillColor||n.color,s.opacity=n.fillOpacity):s&&(e.removeChild(s),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),s=Math.round(t._radius),n=Math.round(t._radiusY||s);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+s+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){Pi(t._container)},_bringToBack:function(t){Ti(t._container)}},dn=Qt.vml?fn:vt,vn=un.extend({_initContainer:function(){this._container=dn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=dn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ki(this._container),Gi(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){un.prototype._update.call(this);var t=this._bounds,i=t.getSize(),s=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,s.setAttribute("width",i.x),s.setAttribute("height",i.y)),Bi(s,t.min),s.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=dn("path");t.options.className&&zi(i,t.options.className),t.options.interactive&&zi(i,"leaflet-interactive"),this._updateStyle(t),this._layers[$(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ki(t._path),t.removeInteractiveTarget(t._path),delete this._layers[$(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,s=t.options;i&&(s.stroke?(i.setAttribute("stroke",s.color),i.setAttribute("stroke-opacity",s.opacity),i.setAttribute("stroke-width",s.weight),i.setAttribute("stroke-linecap",s.lineCap),i.setAttribute("stroke-linejoin",s.lineJoin),s.dashArray?i.setAttribute("stroke-dasharray",s.dashArray):i.removeAttribute("stroke-dasharray"),s.dashOffset?i.setAttribute("stroke-dashoffset",s.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),s.fill?(i.setAttribute("fill",s.fillColor||s.color),i.setAttribute("fill-opacity",s.fillOpacity),i.setAttribute("fill-rule",s.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,mt(t._parts,i))},_updateCircle:function(t){var i=t._point,s=Math.max(Math.round(t._radius),1),n="a"+s+","+(Math.max(Math.round(t._radiusY),1)||s)+" 0 1,0 ",e=t._empty()?"M0 0":"M"+(i.x-s)+","+i.y+n+2*s+",0 "+n+2*-s+",0 ";this._setPath(t,e)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){Pi(t._path)},_bringToBack:function(t){Ti(t._path)}});Qt.vml&&vn.include(ln),os.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&function(t){return Qt.canvas?new cn(t):null}(t)||function(t){return Qt.svg||Qt.vml?new vn(t):null}(t)}}),Us.extend({initialize:function(t,i){Us.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=it(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),vn.create=dn,vn.pointsToPath=mt,Hs.geometryToLayer=qs,Hs.coordsToLatLng=Ws,Hs.coordsToLatLngs=Vs,Hs.latLngToCoords=Js,Hs.latLngsToCoords=Ks,Hs.getFeature=Xs,Hs.asFeature=Ys,os.mergeOptions({boxZoom:!0});var mn=fs.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(){Hi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Gi(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ki(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(),vi(),ji(),this._startPoint=this._map.mouseEventToContainerPoint(t),Hi(document,{contextmenu:is,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=xi("div","leaflet-zoom-box",this._container),zi(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new Y(this._point,this._startPoint),s=i.getSize();Bi(this._box,i.min),this._box.style.width=s.x+"px",this._box.style.height=s.y+"px"},_finish:function(){this._moved&&(ki(this._box),Ci(this._container,"leaflet-crosshair")),mi(),Ri(),Gi(document,{contextmenu:is,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(P(this._resetState,this),0);var i=new tt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});os.addInitHook("addHandler","boxZoom",mn),os.mergeOptions({doubleClickZoom:!0});var pn=fs.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,s=i.getZoom(),n=i.options.zoomDelta,e=t.originalEvent.shiftKey?s-n:s+n;"center"===i.options.doubleClickZoom?i.setZoom(e):i.setZoomAround(t.containerPoint,e)}});os.addInitHook("addHandler","doubleClickZoom",pn),os.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var gn=fs.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new vs(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))}zi(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Ci(this._map._container,"leaflet-grab"),Ci(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 i=it(this._map.options.maxBounds);this._offsetLimit=Q(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.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 i=this._lastTime=+new Date,s=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(s),this._times.push(i),this._prunePositions(i)}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),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),s=this._initialWorldOffset,n=this._draggable._newPos.x,e=(n-i+s)%t+i-s,o=(n+i+s)%t-i-s,h=Math.abs(e+s)<Math.abs(o+s)?e:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=h},_onDragEnd:function(t){var i=this._map,s=i.options,n=!s.inertia||t.noInertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{this._prunePositions(+new Date);var e=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,h=s.easeLinearity,r=e.multiplyBy(h/o),a=r.distanceTo([0,0]),u=Math.min(s.inertiaMaxSpeed,a),c=r.multiplyBy(u/a),f=u/(s.inertiaDeceleration*h),l=c.multiplyBy(-f/2).round();l.x||l.y?(l=i._limitOffset(l,i.options.maxBounds),H((function(){i.panBy(l,{duration:f,easeLinearity:h,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}}});os.addInitHook("addHandler","dragging",gn),os.mergeOptions({keyboard:!0,keyboardPanDelta:80});var wn=fs.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"),Hi(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(),Gi(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,i=document.documentElement,s=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,s)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,s,n=this._panKeys={},e=this.keyCodes;for(i=0,s=e.left.length;i<s;i++)n[e.left[i]]=[-1*t,0];for(i=0,s=e.right.length;i<s;i++)n[e.right[i]]=[t,0];for(i=0,s=e.down.length;i<s;i++)n[e.down[i]]=[0,t];for(i=0,s=e.up.length;i<s;i++)n[e.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,s,n=this._zoomKeys={},e=this.keyCodes;for(i=0,s=e.zoomIn.length;i<s;i++)n[e.zoomIn[i]]=t;for(i=0,s=e.zoomOut.length;i<s;i++)n[e.zoomOut[i]]=-t},_addHooks:function(){Hi(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Gi(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,s=t.keyCode,n=this._map;if(s in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(i=this._panKeys[s],t.shiftKey&&(i=X(i).multiplyBy(3)),n.options.maxBounds&&(i=n._limitOffset(X(i),n.options.maxBounds)),n.options.worldCopyJump){var e=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(i)));n.panTo(e)}else n.panBy(i)}else if(s in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[s]);else{if(27!==s||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}is(t)}}});os.addInitHook("addHandler","keyboard",wn),os.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var bn=fs.extend({addHooks:function(){Hi(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Gi(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=function(t){return Qt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/ss: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}(t),s=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(s-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(P(this._performZoom,this),n),is(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),s=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),e=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=s?Math.ceil(e/s)*s:e,h=t._limitZoom(i+(this._delta>0?o:-o))-i;this._delta=0,this._startTime=null,h&&("center"===t.options.scrollWheelZoom?t.setZoom(i+h):t.setZoomAround(this._lastMousePos,i+h))}});os.addInitHook("addHandler","scrollWheelZoom",bn);os.mergeOptions({tapHold:Qt.touchNative&&Qt.safari&&Qt.mobile,tapTolerance:15});var _n=fs.extend({addHooks:function(){Hi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Gi(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new J(i.clientX,i.clientY),this._holdTimeout=setTimeout(P((function(){this._cancel(),this._isTapValid()&&(Hi(document,"touchend",ts),Hi(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),Hi(document,"touchend touchcancel contextmenu",this._cancel,this),Hi(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Gi(document,"touchend",ts),Gi(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Gi(document,"touchend touchcancel contextmenu",this._cancel,this),Gi(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new J(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var s=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});s._simulated=!0,i.target.dispatchEvent(s)}});os.addInitHook("addHandler","tapHold",_n),os.mergeOptions({touchZoom:Qt.touch,bounceAtZoomLimits:!0});var yn=fs.extend({addHooks:function(){zi(this._map._container,"leaflet-touch-zoom"),Hi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Ci(this._map._container,"leaflet-touch-zoom"),Gi(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var s=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(s.add(n)._divideBy(2))),this._startDist=s.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Hi(document,"touchmove",this._onTouchMove,this),Hi(document,"touchend touchcancel",this._onTouchEnd,this),ts(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,s=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]),e=s.distanceTo(n)/this._startDist;if(this._zoom=i.getScaleZoom(e,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&e<1||this._zoom>i.getMaxZoom()&&e>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===e)return}else{var o=s._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===e&&0===o.x&&0===o.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),q(this._animRequest);var h=P(i._move,i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=H(h,this,!0),ts(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,q(this._animRequest),Gi(document,"touchmove",this._onTouchMove,this),Gi(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}});os.addInitHook("addHandler","touchZoom",yn),os.BoxZoom=mn,os.DoubleClickZoom=pn,os.Drag=gn,os.Keyboard=wn,os.ScrollWheelZoom=bn,os.TapHold=_n,os.TouchZoom=yn;var Mn=function(t,i,s,n){for(var e,o=arguments.length,h=o<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,s):n,r=t.length-1;r>=0;r--)(e=t[r])&&(h=(o<3?e(h):o>3?e(i,s,h):e(i,s))||h);return o>3&&h&&Object.defineProperty(i,s,h),h};const{getLocale:xn,setLocale:kn}=o({sourceLocale:r,targetLocales:a,loadLocale:t=>import(`./generated/locales/${t}.js`)});let Ln=class extends u{constructor(){super(),this.defaultLat="39.5701058",this.defaultLon="2.6487098",this.locale="es",this.isCitizen=!0,this.activeMap=!1,this.ubiDistricts=[],this.submited=!1,this.error=!1,this.incidenceId="",this.extensionFiles="",this.domain="https://iris2-backend-demo-iris-community.labs.apsl.io/services/iris/api-public",this.street="",this.streetNumber="",this.latitude="",this.longitude="",this.loading=!1,this._fetchFields=new b(this,{task:async([t],{signal:i})=>{const s=await fetch(`${this.getApiUrl()}/details/${t}/fields`,{headers:{"Accept-Language":this.locale},signal:i});s.ok||(this.error=!0);const n=await s.json();this.area=n.area,this.element=n.element,this.detail=n.detail,this.characteristics=n.characteristics,this.extensionFiles=n.extension_files;const e=n.mandatory_drupal_fields.ubication;return e?.street_name&&e?.number&&(this.activeMap=!0,this._loadMap()),n},args:()=>[this.detailID]}),this.detailID=void 0,this.actionUrl="",this.apiUrl="",this.area="",this.element="",this.detail="",this.extensionFiles="",this.characteristics=[],this.locale=this.locale?this.locale:"es",Os.Default.imagePath="https://unpkg.com/leaflet@1.9.4/dist/images/",this._markerIcon=new Os({iconUrl:"https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-blue.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/images/marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]})}getApiUrl(){return this.apiUrl.endsWith("/")?this.apiUrl.slice(0,this.apiUrl.lastIndexOf("/")):this.apiUrl}_loadMap(){const t=this.shadowRoot?.querySelector("#map");var i,s;this._map=(i=t,s={markerZoomAnimation:!1,attributionControl:!1},new os(i,s)).setView([this.defaultLat,this.defaultLon],15),rn("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(this._map),this._map.on("click",(t=>this.onMapClick(t)))}firstUpdated(){const t=this.shadowRoot?.querySelector("form");t?.setAttribute("novalidate",""),this.addOnChangEventToInputs()}addOnChangEventToInputs(){Array.from(this.shadowRoot?.querySelectorAll("input")??[]).forEach((t=>{t.addEventListener("keyup",(()=>{t.setCustomValidity("")}))}))}connectedCallback(){super.connectedCallback(),this._fetchDistricts()}async _fetchDistricts(){const t=await fetch(`${this.getApiUrl()}/districts`,{headers:{"Accept-Language":this.locale}});if(!t.ok)throw new Error(t.statusText);(await t.json()).results.map((t=>{this.ubiDistricts.push({value:`${t.id}`,label:t.name})}))}updated(){this.addOnChangEventToInputs()}changeTab(t){this.isCitizen=t}render(){let t=c``;return t=this.error||this.submited?this.error?this.renderError():this.renderSuccess():this.renderForm(),c` ${this.renderHeader()}
195
195
  <main class="container">${t}</main>`}renderError(){return c`
196
196
  <section class="success-submit">
197
197
  <article class="success-submit__card success-submit__card--error ">
@@ -398,7 +398,7 @@ const w=Symbol();class b{get taskComplete(){return this.t||(1===this.i?this.t=ne
398
398
 
399
399
  <div>
400
400
  <label for="firstSurname">${f("Primer apellido")}*:</label>
401
- <input id="firstSurname" name="firstSurname" type="text" />
401
+ <input id="firstSurname" name="firstSurname" type="text" required />
402
402
  </div>
403
403
 
404
404
  <div>
@@ -479,6 +479,15 @@ const w=Symbol();class b{get taskComplete(){return this.t||(1===this.i?this.t=ne
479
479
  placeholder=${f("Escribe tu teléfono")}
480
480
  />
481
481
  </div>
482
+
483
+ <div>
484
+ <label for="language">${f("Idioma de la respuesta")}*:</label>
485
+ <select id="language" name="language" required>
486
+ <option value="es" selected>${f("Español")}</option>
487
+ <option value="ca">${f("Catalán")}</option>
488
+ <option value="en">${f("Inglés")}</option>
489
+ </select>
490
+ </div>
482
491
  `}renderCompanyForm(){return c`
483
492
  <div>
484
493
  <label for="socialReason">${f("Razón social")}*:</label>
@@ -522,8 +531,8 @@ const w=Symbol();class b{get taskComplete(){return this.t||(1===this.i?this.t=ne
522
531
  </div>
523
532
 
524
533
  <div>
525
- <label for="phone">${f("Idioma de la respuesta")}*:</label>
526
- <select id="phone" name="language" required>
534
+ <label for="language">${f("Idioma de la respuesta")}*:</label>
535
+ <select id="language" name="language" required>
527
536
  <option value="es" selected>${f("Español")}</option>
528
537
  <option value="ca">${f("Catalán")}</option>
529
538
  <option value="en">${f("Inglés")}</option>
@@ -588,7 +597,7 @@ const w=Symbol();class b{get taskComplete(){return this.t||(1===this.i?this.t=ne
588
597
  <input id="map-door" type="text" name="door" />
589
598
  </div>
590
599
  </section>
591
- `}async onSubmit(t){this.loading=!0,t.preventDefault(),t.stopImmediatePropagation();const i=t.target;if(!i.checkValidity())return i.reportValidity(),void(this.loading=!1);const s=i.file.files,n=new FormData,e=Object.fromEntries(new FormData(i).entries());if(this.activeMap?(e.location={},e.location.address=e.address,e.location.number=e.number,e.location.latitude=e.latitude,e.location.longitude=e.longitude,e.location.floor=e.floor,e.location.stair=e.stair,e.location.door=e.door):e.location={district:e.district},e.file=[],s.length>0)for(let t=0;t<s.length;t++){const i={filename:s[t].name,file:s[t]};e.file.push(i)}const o=Object.keys(e).filter((t=>t.startsWith("characteristic-")));e.characteristics=o.map((t=>{const i=t.split("-")[1],s=e[t];return delete e[t],{id:i,value:s}})),n.append("body",JSON.stringify(e));const h=await fetch(`${this.getApiUrl()}/incidences`,{headers:{"Accept-Language":this.locale},method:"POST",body:n});if(!h.ok&&400!==h.status)return this.error=!0,void(this.loading=!1);if(400===h.status){const t=await h.json();this.handlerError(t)}else{const t=await h.json();this.incidenceId=t.incidenceId,this.submited=!0}this.loading=!1}handlerError(t){const i=t;if(Object.keys(i).map((t=>{const s=this.shadowRoot?.getElementById(`${t}`);t in i&&s&&(s.setCustomValidity(i[t]),s.reportValidity())})),"characteristics"in i){const t=i.characteristics;for(const[i,s]of t.entries())if(0!==Object.keys(s).length){const t=this.shadowRoot?.getElementById(`niris-${i}`);s.value.forEach((i=>{t.setCustomValidity(i),t.reportValidity()}))}}}confirmEmail(t){const i=this.shadowRoot?.getElementById("email"),s=this.shadowRoot?.getElementById("email_confirm"),n=this.shadowRoot?.getElementById("email_confirm_error"),e=this.shadowRoot?.getElementById("submit-btn");i.value!==s.value?(n.hidden=!1,e.disabled=!0,s.classList.add("invalid")):(n.hidden=!0,e.disabled=!1,s.classList.remove("invalid")),t.target.reportValidity()}years(){const t=(new Date).getFullYear(),i=[];for(let s=t-100;s<=t;s++)i.push(s);return i.reverse(),i}async onMapClick(t){this._marker&&this._map.removeLayer(this._marker),this._marker=new Zs([t.latlng.lat,t.latlng.lng],{icon:this._markerIcon}).addTo(this._map);try{const i=await fetch(`${this.domain}/geo_proxy/ubication/reverse/?lat=${t.latlng.lat}&lon=${t.latlng.lng}`,{headers:{"Accept-Language":this.locale}});if(!i.ok)throw new Error(i.statusText);{const t=await i.json();this.street=t.street,this.streetNumber=t.street2,this.latitude=t.latitude,this.longitude=t.longitude}}catch(t){console.info(t)}}async searchAddress(){try{const t=await fetch(`${this.domain}/geo_proxy/ubication/search/?q=${this.street}, ${this.streetNumber}`,{headers:{"Accept-Language":this.locale}});this._marker&&this._map.removeLayer(this._marker);const i=await t.json();this._marker=new Zs([i[0].lat,i[0].lon]).addTo(this._map),this._map.setView([i[0].lat,i[0].lon],15)}catch(t){console.error(t)}}};Ln.styles=[y,e`
600
+ `}async onSubmit(t){this.loading=!0,t.preventDefault(),t.stopImmediatePropagation();const i=t.target;if(!i.checkValidity())return i.reportValidity(),void(this.loading=!1);const s=i.file.files,n=new FormData,e=Object.fromEntries(new FormData(i).entries());if(this.activeMap?(e.location={},e.location.address=e.address,e.location.number=e.number,e.location.latitude=e.latitude,e.location.longitude=e.longitude,e.location.floor=e.floor,e.location.stair=e.stair,e.location.door=e.door):e.location={district:e.district},e.file=[],s.length>0)for(let t=0;t<s.length;t++){const i={filename:s[t].name,file:s[t]};e.file.push(i)}const o=Object.keys(e).filter((t=>t.startsWith("characteristic-")));e.characteristics=o.map((t=>{const i=t.split("-")[1],s=e[t];return delete e[t],{id:i,value:s}})),n.append("body",JSON.stringify(e));const h=await fetch(`${this.getApiUrl()}/incidences`,{headers:{"Accept-Language":this.locale},method:"POST",body:n});if(!h.ok&&400!==h.status)return this.error=!0,void(this.loading=!1);if(400===h.status){const t=await h.json();this.handlerError(t)}else{const t=await h.json();this.incidenceId=t.incidenceId,this.submited=!0}this.loading=!1}handlerError(t){const i=t;if(Object.keys(i).map((t=>{const s=this.shadowRoot?.getElementById(`${t}`);t in i&&s&&(s.setCustomValidity(i[t]),s.reportValidity())})),"characteristics"in i){let t=i.characteristics;Array.isArray(t)||(t=Object.entries(t)),t.forEach((t=>{Object.entries(t).forEach((([t,i])=>{const s=this.shadowRoot?.getElementById(`niris-${t}`);s.setCustomValidity(i),s.reportValidity()}))}))}}confirmEmail(t){const i=this.shadowRoot?.getElementById("email"),s=this.shadowRoot?.getElementById("email_confirm"),n=this.shadowRoot?.getElementById("email_confirm_error"),e=this.shadowRoot?.getElementById("submit-btn");i.value!==s.value?(n.hidden=!1,e.disabled=!0,s.classList.add("invalid")):(n.hidden=!0,e.disabled=!1,s.classList.remove("invalid")),t.target.reportValidity()}years(){const t=(new Date).getFullYear(),i=[];for(let s=t-100;s<=t;s++)i.push(s);return i.reverse(),i}async onMapClick(t){this._marker&&this._map.removeLayer(this._marker),this._marker=new Zs([t.latlng.lat,t.latlng.lng],{icon:this._markerIcon}).addTo(this._map);try{const i=await fetch(`${this.domain}/geo_proxy/ubication/reverse/?lat=${t.latlng.lat}&lon=${t.latlng.lng}`,{headers:{"Accept-Language":this.locale}});if(!i.ok)throw new Error(i.statusText);{const t=await i.json();this.street=t.street,this.streetNumber=t.street2,this.latitude=t.latitude,this.longitude=t.longitude}}catch(t){console.info(t)}}async searchAddress(){try{const t=await fetch(`${this.domain}/geo_proxy/ubication/search/?q=${this.street}, ${this.streetNumber}`,{headers:{"Accept-Language":this.locale}});this._marker&&this._map.removeLayer(this._marker);const i=await t.json();this._marker=new Zs([i[0].lat,i[0].lon]).addTo(this._map),this._map.setView([i[0].lat,i[0].lon],15)}catch(t){console.error(t)}}};Ln.styles=[y,e`
592
601
  :host {
593
602
  --primary-color: #03599d;
594
603
  --padding: 0.7rem 0.7rem;