Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/location/osm/leaflet/dist/ |
Upload File : |
this.BX=this.BX||{};this.BX.Location=this.BX.Location||{};(function(t){"use strict"; /* @preserve * Leaflet 1.6.0+Detached: 0c81bdf904d864fd12a286e3d1979f47aba17991.0c81bdf, a JS library for interactive maps. http://leafletjs.com * (c) 2010-2019 Vladimir Agafonkin, (c) 2010-2011 CloudMade */var e="1.6.0+HEAD.0c81bdf";var i=Object.freeze;Object.freeze=function(t){return t};function n(t){var e,i,n,o;for(i=1,n=arguments.length;i<n;i++){o=arguments[i];for(e in o){t[e]=o[e]}}return t}var o=Object.create||function(){function t(){}return function(e){t.prototype=e;return new t}}();function s(t,e){var i=Array.prototype.slice;if(t.bind){return t.bind.apply(t,i.call(arguments,1))}var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var r=0;function a(t){t._leaflet_id=t._leaflet_id||++r;return t._leaflet_id}function h(t,e,i){var n,o,s,r;r=function t(){n=false;if(o){s.apply(i,o);o=false}};s=function s(){if(n){o=arguments}else{t.apply(i,arguments);setTimeout(r,e);n=true}};return s}function u(t,e,i){var n=e[1],o=e[0],s=n-o;return t===n&&i?t:((t-o)%s+s)%s+o}function l(){return false}function c(t,e){var i=Math.pow(10,e===undefined?6:e);return Math.round(t*i)/i}function f(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return f(t).split(/\s+/)}function _(t,e){if(!t.hasOwnProperty("options")){t.options=t.options?o(t.options):{}}for(var i in e){t.options[i]=e[i]}return t.options}function p(t,e,i){var n=[];for(var o in t){n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]))}return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var m=/\{ *([\w_-]+) *\}/g;function v(t,e){return t.replace(m,(function(t,i){var n=e[i];if(n===undefined){throw new Error("No value provided for variable "+t)}else if(typeof n==="function"){n=n(e)}return n}))}var g=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function y(t,e){for(var i=0;i<t.length;i++){if(t[i]===e){return i}}return-1}var x="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function w(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var b=0;function P(t){var e=+new Date,i=Math.max(0,16-(e-b));b=e+i;return window.setTimeout(t,i)}var T=window.requestAnimationFrame||w("RequestAnimationFrame")||P;var z=window.cancelAnimationFrame||w("CancelAnimationFrame")||w("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,e,i){if(i&&T===P){t.call(e)}else{return T.call(window,s(t,e))}}function C(t){if(t){z.call(window,t)}}var S=(Object.freeze||Object)({freeze:i,extend:n,create:o,bind:s,lastId:r,stamp:a,throttle:h,wrapNum:u,falseFn:l,formatNum:c,trim:f,splitWords:d,setOptions:_,getParamString:p,template:v,isArray:g,indexOf:y,emptyImageUrl:x,requestFn:T,cancelFn:z,requestAnimFrame:M,cancelAnimFrame:C});function k(){}k.extend=function(t){var e=function t(){if(this.initialize){this.initialize.apply(this,arguments)}this.callInitHooks()};var i=e.__super__=this.prototype;var s=o(i);s.constructor=e;e.prototype=s;for(var r in this){if(this.hasOwnProperty(r)&&r!=="prototype"&&r!=="__super__"){e[r]=this[r]}}if(t.statics){n(e,t.statics);delete t.statics}if(t.includes){E(t.includes);n.apply(null,[s].concat(t.includes));delete t.includes}if(s.options){t.options=n(o(s.options),t.options)}n(s,t);s._initHooks=[];s.callInitHooks=function(){if(this._initHooksCalled){return}if(i.callInitHooks){i.callInitHooks.call(this)}this._initHooksCalled=true;for(var t=0,e=s._initHooks.length;t<e;t++){s._initHooks[t].call(this)}};return e};k.include=function(t){n(this.prototype,t);return this};k.mergeOptions=function(t){n(this.prototype.options,t);return this};k.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1);var i=typeof t==="function"?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[];this.prototype._initHooks.push(i);return this};function E(t){if(typeof L==="undefined"||!L||!L.Mixin){return}t=g(t)?t:[t];for(var e=0;e<t.length;e++){if(t[e]===L.Mixin.Events){console.warn("Deprecated include of L.Mixin.Events: "+"this property will be removed in future releases, "+"please inherit from L.Evented instead.",(new Error).stack)}}}var Z={on:function t(e,i,n){if(babelHelpers["typeof"](e)==="object"){for(var o in e){this._on(o,e[o],i)}}else{e=d(e);for(var s=0,r=e.length;s<r;s++){this._on(e[s],i,n)}}return this},off:function t(e,i,n){if(!e){delete this._events}else if(babelHelpers["typeof"](e)==="object"){for(var o in e){this._off(o,e[o],i)}}else{e=d(e);for(var s=0,r=e.length;s<r;s++){this._off(e[s],i,n)}}return this},_on:function t(e,i,n){this._events=this._events||{};var o=this._events[e];if(!o){o=[];this._events[e]=o}if(n===this){n=undefined}var s={fn:i,ctx:n},r=o;for(var a=0,h=r.length;a<h;a++){if(r[a].fn===i&&r[a].ctx===n){return}}r.push(s)},_off:function t(e,i,n){var o,s,r;if(!this._events){return}o=this._events[e];if(!o){return}if(!i){for(s=0,r=o.length;s<r;s++){o[s].fn=l}delete this._events[e];return}if(n===this){n=undefined}if(o){for(s=0,r=o.length;s<r;s++){var a=o[s];if(a.ctx!==n){continue}if(a.fn===i){a.fn=l;if(this._firingCount){this._events[e]=o=o.slice()}o.splice(s,1);return}}}},fire:function t(e,i,o){if(!this.listens(e,o)){return this}var s=n({},i,{type:e,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var r=this._events[e];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,h=r.length;a<h;a++){var u=r[a];u.fn.call(u.ctx||this,s)}this._firingCount--}}if(o){this._propagateEvent(s)}return this},listens:function t(e,i){var n=this._events&&this._events[e];if(n&&n.length){return true}if(i){for(var o in this._eventParents){if(this._eventParents[o].listens(e,i)){return true}}}return false},once:function t(e,i,n){if(babelHelpers["typeof"](e)==="object"){for(var o in e){this.once(o,e[o],i)}return this}var r=s((function(){this.off(e,i,n).off(e,r,n)}),this);return this.on(e,i,n).on(e,r,n)},addEventParent:function t(e){this._eventParents=this._eventParents||{};this._eventParents[a(e)]=e;return this},removeEventParent:function t(e){if(this._eventParents){delete this._eventParents[a(e)]}return this},_propagateEvent:function t(e){for(var i in this._eventParents){this._eventParents[i].fire(e.type,n({layer:e.target,propagatedFrom:e.target},e),true)}}};Z.addEventListener=Z.on;Z.removeEventListener=Z.clearAllEventListeners=Z.off;Z.addOneTimeEventListener=Z.once;Z.fireEvent=Z.fire;Z.hasEventListeners=Z.listens;var I=k.extend(Z);function B(t,e,i){this.x=i?Math.round(t):t;this.y=i?Math.round(e):e}var A=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};B.prototype={clone:function t(){return new B(this.x,this.y)},add:function t(e){return this.clone()._add(O(e))},_add:function t(e){this.x+=e.x;this.y+=e.y;return this},subtract:function t(e){return this.clone()._subtract(O(e))},_subtract:function t(e){this.x-=e.x;this.y-=e.y;return this},divideBy:function t(e){return this.clone()._divideBy(e)},_divideBy:function t(e){this.x/=e;this.y/=e;return this},multiplyBy:function t(e){return this.clone()._multiplyBy(e)},_multiplyBy:function t(e){this.x*=e;this.y*=e;return this},scaleBy:function t(e){return new B(this.x*e.x,this.y*e.y)},unscaleBy:function t(e){return new B(this.x/e.x,this.y/e.y)},round:function t(){return this.clone()._round()},_round:function t(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},floor:function t(){return this.clone()._floor()},_floor:function t(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function t(){return this.clone()._ceil()},_ceil:function t(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},trunc:function t(){return this.clone()._trunc()},_trunc:function t(){this.x=A(this.x);this.y=A(this.y);return this},distanceTo:function t(e){e=O(e);var i=e.x-this.x,n=e.y-this.y;return Math.sqrt(i*i+n*n)},equals:function t(e){e=O(e);return e.x===this.x&&e.y===this.y},contains:function t(e){e=O(e);return Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function t(){return"Point("+c(this.x)+", "+c(this.y)+")"}};function O(t,e,i){if(t instanceof B){return t}if(g(t)){return new B(t[0],t[1])}if(t===undefined||t===null){return t}if(babelHelpers["typeof"](t)==="object"&&"x"in t&&"y"in t){return new B(t.x,t.y)}return new B(t,e,i)}function R(t,e){if(!t){return}var i=e?[t,e]:t;for(var n=0,o=i.length;n<o;n++){this.extend(i[n])}}R.prototype={extend:function t(e){e=O(e);if(!this.min&&!this.max){this.min=e.clone();this.max=e.clone()}else{this.min.x=Math.min(e.x,this.min.x);this.max.x=Math.max(e.x,this.max.x);this.min.y=Math.min(e.y,this.min.y);this.max.y=Math.max(e.y,this.max.y)}return this},getCenter:function t(e){return new B((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function t(){return new B(this.min.x,this.max.y)},getTopRight:function t(){return new B(this.max.x,this.min.y)},getTopLeft:function t(){return this.min},getBottomRight:function t(){return this.max},getSize:function t(){return this.max.subtract(this.min)},contains:function t(e){var i,n;if(typeof e[0]==="number"||e instanceof B){e=O(e)}else{e=N(e)}if(e instanceof R){i=e.min;n=e.max}else{i=n=e}return i.x>=this.min.x&&n.x<=this.max.x&&i.y>=this.min.y&&n.y<=this.max.y},intersects:function t(e){e=N(e);var i=this.min,n=this.max,o=e.min,s=e.max,r=s.x>=i.x&&o.x<=n.x,a=s.y>=i.y&&o.y<=n.y;return r&&a},overlaps:function t(e){e=N(e);var i=this.min,n=this.max,o=e.min,s=e.max,r=s.x>i.x&&o.x<n.x,a=s.y>i.y&&o.y<n.y;return r&&a},isValid:function t(){return!!(this.min&&this.max)}};function N(t,e){if(!t||t instanceof R){return t}return new R(t,e)}function D(t,e){if(!t){return}var i=e?[t,e]:t;for(var n=0,o=i.length;n<o;n++){this.extend(i[n])}}D.prototype={extend:function t(e){var i=this._southWest,n=this._northEast,o,s;if(e instanceof H){o=e;s=e}else if(e instanceof D){o=e._southWest;s=e._northEast;if(!o||!s){return this}}else{return e?this.extend(W(e)||j(e)):this}if(!i&&!n){this._southWest=new H(o.lat,o.lng);this._northEast=new H(s.lat,s.lng)}else{i.lat=Math.min(o.lat,i.lat);i.lng=Math.min(o.lng,i.lng);n.lat=Math.max(s.lat,n.lat);n.lng=Math.max(s.lng,n.lng)}return this},pad:function t(e){var i=this._southWest,n=this._northEast,o=Math.abs(i.lat-n.lat)*e,s=Math.abs(i.lng-n.lng)*e;return new D(new H(i.lat-o,i.lng-s),new H(n.lat+o,n.lng+s))},getCenter:function t(){return new H((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function t(){return this._southWest},getNorthEast:function t(){return this._northEast},getNorthWest:function t(){return new H(this.getNorth(),this.getWest())},getSouthEast:function t(){return new H(this.getSouth(),this.getEast())},getWest:function t(){return this._southWest.lng},getSouth:function t(){return this._southWest.lat},getEast:function t(){return this._northEast.lng},getNorth:function t(){return this._northEast.lat},contains:function t(e){if(typeof e[0]==="number"||e instanceof H||"lat"in e){e=W(e)}else{e=j(e)}var i=this._southWest,n=this._northEast,o,s;if(e instanceof D){o=e.getSouthWest();s=e.getNorthEast()}else{o=s=e}return o.lat>=i.lat&&s.lat<=n.lat&&o.lng>=i.lng&&s.lng<=n.lng},intersects:function t(e){e=j(e);var i=this._southWest,n=this._northEast,o=e.getSouthWest(),s=e.getNorthEast(),r=s.lat>=i.lat&&o.lat<=n.lat,a=s.lng>=i.lng&&o.lng<=n.lng;return r&&a},overlaps:function t(e){e=j(e);var i=this._southWest,n=this._northEast,o=e.getSouthWest(),s=e.getNorthEast(),r=s.lat>i.lat&&o.lat<n.lat,a=s.lng>i.lng&&o.lng<n.lng;return r&&a},toBBoxString:function t(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function t(e,i){if(!e){return false}e=j(e);return this._southWest.equals(e.getSouthWest(),i)&&this._northEast.equals(e.getNorthEast(),i)},isValid:function t(){return!!(this._southWest&&this._northEast)}};function j(t,e){if(t instanceof D){return t}return new D(t,e)}function H(t,e,i){if(isNaN(t)||isNaN(e)){throw new Error("Invalid LatLng object: ("+t+", "+e+")")}this.lat=+t;this.lng=+e;if(i!==undefined){this.alt=+i}}H.prototype={equals:function t(e,i){if(!e){return false}e=W(e);var n=Math.max(Math.abs(this.lat-e.lat),Math.abs(this.lng-e.lng));return n<=(i===undefined?1e-9:i)},toString:function t(e){return"LatLng("+c(this.lat,e)+", "+c(this.lng,e)+")"},distanceTo:function t(e){return U.distance(this,W(e))},wrap:function t(){return U.wrapLatLng(this)},toBounds:function t(e){var i=180*e/40075017,n=i/Math.cos(Math.PI/180*this.lat);return j([this.lat-i,this.lng-n],[this.lat+i,this.lng+n])},clone:function t(){return new H(this.lat,this.lng,this.alt)}};function W(t,e,i){if(t instanceof H){return t}if(g(t)&&babelHelpers["typeof"](t[0])!=="object"){if(t.length===3){return new H(t[0],t[1],t[2])}if(t.length===2){return new H(t[0],t[1])}return null}if(t===undefined||t===null){return t}if(babelHelpers["typeof"](t)==="object"&&"lat"in t){return new H(t.lat,"lng"in t?t.lng:t.lon,t.alt)}if(e===undefined){return null}return new H(t,e,i)}var F={latLngToPoint:function t(e,i){var n=this.projection.project(e),o=this.scale(i);return this.transformation._transform(n,o)},pointToLatLng:function t(e,i){var n=this.scale(i),o=this.transformation.untransform(e,n);return this.projection.unproject(o)},project:function t(e){return this.projection.project(e)},unproject:function t(e){return this.projection.unproject(e)},scale:function t(e){return 256*Math.pow(2,e)},zoom:function t(e){return Math.log(e/256)/Math.LN2},getProjectedBounds:function t(e){if(this.infinite){return null}var i=this.projection.bounds,n=this.scale(e),o=this.transformation.transform(i.min,n),s=this.transformation.transform(i.max,n);return new R(o,s)},infinite:false,wrapLatLng:function t(e){var i=this.wrapLng?u(e.lng,this.wrapLng,true):e.lng,n=this.wrapLat?u(e.lat,this.wrapLat,true):e.lat,o=e.alt;return new H(n,i,o)},wrapLatLngBounds:function t(e){var i=e.getCenter(),n=this.wrapLatLng(i),o=i.lat-n.lat,s=i.lng-n.lng;if(o===0&&s===0){return e}var r=e.getSouthWest(),a=e.getNorthEast(),h=new H(r.lat-o,r.lng-s),u=new H(a.lat-o,a.lng-s);return new D(h,u)}};var U=n({},F,{wrapLng:[-180,180],R:6371e3,distance:function t(e,i){var n=Math.PI/180,o=e.lat*n,s=i.lat*n,r=Math.sin((i.lat-e.lat)*n/2),a=Math.sin((i.lng-e.lng)*n/2),h=r*r+Math.cos(o)*Math.cos(s)*a*a,u=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return this.R*u}});var G=6378137;var V={R:G,MAX_LATITUDE:85.0511287798,project:function t(e){var i=Math.PI/180,n=this.MAX_LATITUDE,o=Math.max(Math.min(n,e.lat),-n),s=Math.sin(o*i);return new B(this.R*e.lng*i,this.R*Math.log((1+s)/(1-s))/2)},unproject:function t(e){var i=180/Math.PI;return new H((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*i,e.x*i/this.R)},bounds:function(){var t=G*Math.PI;return new R([-t,-t],[t,t])}()};function q(t,e,i,n){if(g(t)){this._a=t[0];this._b=t[1];this._c=t[2];this._d=t[3];return}this._a=t;this._b=e;this._c=i;this._d=n}q.prototype={transform:function t(e,i){return this._transform(e.clone(),i)},_transform:function t(e,i){i=i||1;e.x=i*(this._a*e.x+this._b);e.y=i*(this._c*e.y+this._d);return e},untransform:function t(e,i){i=i||1;return new B((e.x/i-this._b)/this._a,(e.y/i-this._d)/this._c)}};function K(t,e,i,n){return new q(t,e,i,n)}var Y=n({},U,{code:"EPSG:3857",projection:V,transformation:function(){var t=.5/(Math.PI*V.R);return K(t,.5,-t,.5)}()});var X=n({},Y,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function $(t,e){var i="",n,o,s,r,a,h;for(n=0,s=t.length;n<s;n++){a=t[n];for(o=0,r=a.length;o<r;o++){h=a[o];i+=(o?"L":"M")+h.x+" "+h.y}i+=e?kt?"z":"x":""}return i||"M0 0"}var Q=document.documentElement.style;var tt="ActiveXObject"in window;var et=tt&&!document.addEventListener;var it="msLaunchUri"in navigator&&!("documentMode"in document);var nt=Zt("webkit");var ot=Zt("android");var st=Zt("android 2")||Zt("android 3");var rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10);var at=ot&&Zt("Google")&&rt<537&&!("AudioNode"in window);var ht=!!window.opera;var ut=Zt("chrome");var lt=Zt("gecko")&&!nt&&!ht&&!tt;var ct=!ut&&Zt("safari");var ft=Zt("phantom");var dt="OTransition"in Q;var _t=navigator.platform.indexOf("Win")===0;var pt=tt&&"transition"in Q;var mt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st;var vt="MozPerspective"in Q;var gt=!window.L_DISABLE_3D&&(pt||mt||vt)&&!dt&&!ft;var yt=typeof orientation!=="undefined"||Zt("mobile");var xt=yt&&nt;var wt=yt&&mt;var bt=!window.PointerEvent&&window.MSPointerEvent;var Pt=!nt&&!!(window.PointerEvent||bt);var Lt=!window.L_NO_TOUCH&&(Pt||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);var Tt=yt&&ht;var zt=yt&<var Mt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;var Ct=function t(){var e=false;try{var i=Object.defineProperty({},"passive",{get:function t(){e=true}});window.addEventListener("testPassiveEventSupport",l,i);window.removeEventListener("testPassiveEventSupport",l,i)}catch(t){}return e};var St=function(){return!!document.createElement("canvas").getContext}();var kt=!!(document.createElementNS&&J("svg").createSVGRect);var Et=!kt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;e.style.behavior="url(#default#VML)";return e&&babelHelpers["typeof"](e.adj)==="object"}catch(t){return false}}();function Zt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var It=(Object.freeze||Object)({ie:tt,ielt9:et,edge:it,webkit:nt,android:ot,android23:st,androidStock:at,opera:ht,chrome:ut,gecko:lt,safari:ct,phantom:ft,opera12:dt,win:_t,ie3d:pt,webkit3d:mt,gecko3d:vt,any3d:gt,mobile:yt,mobileWebkit:xt,mobileWebkit3d:wt,msPointer:bt,pointer:Pt,touch:Lt,mobileOpera:Tt,mobileGecko:zt,retina:Mt,passiveEvents:Ct,canvas:St,svg:kt,vml:Et});var Bt=bt?"MSPointerDown":"pointerdown";var At=bt?"MSPointerMove":"pointermove";var Ot=bt?"MSPointerUp":"pointerup";var Rt=bt?"MSPointerCancel":"pointercancel";var Nt=["INPUT","SELECT","OPTION"];var Dt={};var jt=false;var Ht=0;function Wt(t,e,i,n){if(e==="touchstart"){Ut(t,i,n)}else if(e==="touchmove"){Yt(t,i,n)}else if(e==="touchend"){Xt(t,i,n)}return this}function Ft(t,e,i){var n=t["_leaflet_"+e+i];if(e==="touchstart"){t.removeEventListener(Bt,n,false)}else if(e==="touchmove"){t.removeEventListener(At,n,false)}else if(e==="touchend"){t.removeEventListener(Ot,n,false);t.removeEventListener(Rt,n,false)}return this}function Ut(t,e,i){var n=s((function(t){if(t.pointerType!=="mouse"&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(Nt.indexOf(t.target.tagName)<0){Ue(t)}else{return}}Kt(t,e)}));t["_leaflet_touchstart"+i]=n;t.addEventListener(Bt,n,false);if(!jt){document.documentElement.addEventListener(Bt,Gt,true);document.documentElement.addEventListener(At,Vt,true);document.documentElement.addEventListener(Ot,qt,true);document.documentElement.addEventListener(Rt,qt,true);jt=true}}function Gt(t){Dt[t.pointerId]=t;Ht++}function Vt(t){if(Dt[t.pointerId]){Dt[t.pointerId]=t}}function qt(t){delete Dt[t.pointerId];Ht--}function Kt(t,e){t.touches=[];for(var i in Dt){t.touches.push(Dt[i])}t.changedTouches=[t];e(t)}function Yt(t,e,i){var n=function t(i){if((i.pointerType===i.MSPOINTER_TYPE_MOUSE||i.pointerType==="mouse")&&i.buttons===0){return}Kt(i,e)};t["_leaflet_touchmove"+i]=n;t.addEventListener(At,n,false)}function Xt(t,e,i){var n=function t(i){Kt(i,e)};t["_leaflet_touchend"+i]=n;t.addEventListener(Ot,n,false);t.addEventListener(Rt,n,false)}var Jt=bt?"MSPointerDown":Pt?"pointerdown":"touchstart";var $t=bt?"MSPointerUp":Pt?"pointerup":"touchend";var Qt="_leaflet_";function te(t,e,i){var n,o,s=false,r=250;function a(t){var e;if(Pt){if(!it||t.pointerType==="mouse"){return}e=Ht}else{e=t.touches.length}if(e>1){return}var i=Date.now(),a=i-(n||i);o=t.touches?t.touches[0]:t;s=a>0&&a<=r;n=i}function h(t){if(s&&!o.cancelBubble){if(Pt){if(!it||t.pointerType==="mouse"){return}var i={},r,a;for(a in o){r=o[a];i[a]=r&&r.bind?r.bind(o):r}o=i}o.type="dblclick";o.button=0;e(o);n=null}}t[Qt+Jt+i]=a;t[Qt+$t+i]=h;t[Qt+"dblclick"+i]=e;t.addEventListener(Jt,a,Ct?{passive:false}:false);t.addEventListener($t,h,Ct?{passive:false}:false);t.addEventListener("dblclick",e,false);return this}function ee(t,e){var i=t[Qt+Jt+e],n=t[Qt+$t+e],o=t[Qt+"dblclick"+e];t.removeEventListener(Jt,i,Ct?{passive:false}:false);t.removeEventListener($t,n,Ct?{passive:false}:false);if(!it){t.removeEventListener("dblclick",o,false)}return this}var ie=ye(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);var ne=ye(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);var oe=ne==="webkitTransition"||ne==="OTransition"?ne+"End":"transitionend";function se(t){return typeof t==="string"?document.getElementById(t):t}function re(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||i==="auto")&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return i==="auto"?null:i}function ae(t,e,i){var n=document.createElement(t);n.className=e||"";if(i){i.appendChild(n)}return n}function he(t){var e=t.parentNode;if(e){e.removeChild(t)}}function ue(t){while(t.firstChild){t.removeChild(t.firstChild)}}function le(t){var e=t.parentNode;if(e&&e.lastChild!==t){e.appendChild(t)}}function ce(t){var e=t.parentNode;if(e&&e.firstChild!==t){e.insertBefore(t,e.firstChild)}}function fe(t,e){if(t.classList!==undefined){return t.classList.contains(e)}var i=me(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function de(t,e){if(t.classList!==undefined){var i=d(e);for(var n=0,o=i.length;n<o;n++){t.classList.add(i[n])}}else if(!fe(t,e)){var s=me(t);pe(t,(s?s+" ":"")+e)}}function _e(t,e){if(t.classList!==undefined){t.classList.remove(e)}else{pe(t,f((" "+me(t)+" ").replace(" "+e+" "," ")))}}function pe(t,e){if(t.className.baseVal===undefined){t.className=e}else{t.className.baseVal=e}}function me(t){if(t.correspondingElement){t=t.correspondingElement}return t.className.baseVal===undefined?t.className:t.className.baseVal}function ve(t,e){if("opacity"in t.style){t.style.opacity=e}else if("filter"in t.style){ge(t,e)}}function ge(t,e){var i=false,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(e===1){return}}e=Math.round(e*100);if(i){i.Enabled=e!==100;i.Opacity=e}else{t.style.filter+=" progid:"+n+"(opacity="+e+")"}}function ye(t){var e=document.documentElement.style;for(var i=0;i<t.length;i++){if(t[i]in e){return t[i]}}return false}function xe(t,e,i){var n=e||new B(0,0);t.style[ie]=(pt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function we(t,e){t._leaflet_pos=e;if(gt){xe(t,e)}else{t.style.left=e.x+"px";t.style.top=e.y+"px"}}function be(t){return t._leaflet_pos||new B(0,0)}var Pe;var Le;var Te;if("onselectstart"in document){Pe=function t(){Oe(window,"selectstart",Ue)};Le=function t(){Ne(window,"selectstart",Ue)}}else{var ze=ye(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Pe=function t(){if(ze){var e=document.documentElement.style;Te=e[ze];e[ze]="none"}};Le=function t(){if(ze){document.documentElement.style[ze]=Te;Te=undefined}}}function Me(){Oe(window,"dragstart",Ue)}function Ce(){Ne(window,"dragstart",Ue)}var Se;var ke;function Ee(t){while(t.tabIndex===-1){t=t.parentNode}if(!t.style){return}Ze();Se=t;ke=t.style.outline;t.style.outline="none";Oe(window,"keydown",Ze)}function Ze(){if(!Se){return}Se.style.outline=ke;Se=undefined;ke=undefined;Ne(window,"keydown",Ze)}function Ie(t){do{t=t.parentNode}while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Be(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ae=(Object.freeze||Object)({TRANSFORM:ie,TRANSITION:ne,TRANSITION_END:oe,get:se,getStyle:re,create:ae,remove:he,empty:ue,toFront:le,toBack:ce,hasClass:fe,addClass:de,removeClass:_e,setClass:pe,getClass:me,setOpacity:ve,testProp:ye,setTransform:xe,setPosition:we,getPosition:be,disableTextSelection:Pe,enableTextSelection:Le,disableImageDrag:Me,enableImageDrag:Ce,preventOutline:Ee,restoreOutline:Ze,getSizedParentNode:Ie,getScale:Be});function Oe(t,e,i,n){if(babelHelpers["typeof"](e)==="object"){for(var o in e){De(t,o,e[o],i)}}else{e=d(e);for(var s=0,r=e.length;s<r;s++){De(t,e[s],i,n)}}return this}var Re="_leaflet_events";function Ne(t,e,i,n){if(babelHelpers["typeof"](e)==="object"){for(var o in e){je(t,o,e[o],i)}}else if(e){e=d(e);for(var s=0,r=e.length;s<r;s++){je(t,e[s],i,n)}}else{for(var a in t[Re]){je(t,a,t[Re][a])}delete t[Re]}return this}function De(t,e,i,n){var o=e+a(i)+(n?"_"+a(n):"");if(t[Re]&&t[Re][o]){return this}var s=function e(o){return i.call(n||t,o||window.event)};var r=s;if(Pt&&e.indexOf("touch")===0){Wt(t,e,s,o)}else if(Lt&&e==="dblclick"&&te&&!(Pt&&ut)){te(t,s,o)}else if("addEventListener"in t){if(e==="mousewheel"){t.addEventListener("onwheel"in t?"wheel":"mousewheel",s,Ct?{passive:false}:false)}else if(e==="mouseenter"||e==="mouseleave"){s=function e(i){i=i||window.event;if($e(t,i)){r(i)}};t.addEventListener(e==="mouseenter"?"mouseover":"mouseout",s,false)}else{if(e==="click"&&ot){s=function t(e){ti(e,r)}}t.addEventListener(e,s,false)}}else if("attachEvent"in t){t.attachEvent("on"+e,s)}t[Re]=t[Re]||{};t[Re][o]=s}function je(t,e,i,n){var o=e+a(i)+(n?"_"+a(n):""),s=t[Re]&&t[Re][o];if(!s){return this}if(Pt&&e.indexOf("touch")===0){Ft(t,e,o)}else if(Lt&&e==="dblclick"&&ee&&!(Pt&&ut)){ee(t,o)}else if("removeEventListener"in t){if(e==="mousewheel"){t.removeEventListener("onwheel"in t?"wheel":"mousewheel",s,Ct?{passive:false}:false)}else{t.removeEventListener(e==="mouseenter"?"mouseover":e==="mouseleave"?"mouseout":e,s,false)}}else if("detachEvent"in t){t.detachEvent("on"+e,s)}t[Re][o]=null}function He(t){if(t.stopPropagation){t.stopPropagation()}else if(t.originalEvent){t.originalEvent._stopped=true}else{t.cancelBubble=true}Je(t);return this}function We(t){De(t,"mousewheel",He);return this}function Fe(t){Oe(t,"mousedown touchstart dblclick",He);De(t,"click",Xe);return this}function Ue(t){if(t.preventDefault){t.preventDefault()}else{t.returnValue=false}return this}function Ge(t){Ue(t);He(t);return this}function Ve(t,e){if(!e){return new B(t.clientX,t.clientY)}var i=Be(e),n=i.boundingClientRect;return new B((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var qe=_t&&ut?2*window.devicePixelRatio:lt?window.devicePixelRatio:1;function Ke(t){return it?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/qe:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}var Ye={};function Xe(t){Ye[t.type]=true}function Je(t){var e=Ye[t.type];Ye[t.type]=false;return e}function $e(t,e){var i=e.relatedTarget;if(!i){return true}try{while(i&&i!==t){i=i.parentNode}}catch(t){return false}return i!==t}var Qe;function ti(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=Qe&&i-Qe;if(n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated){Ge(t);return}Qe=i;e(t)}var ei=(Object.freeze||Object)({on:Oe,off:Ne,stopPropagation:He,disableScrollPropagation:We,disableClickPropagation:Fe,preventDefault:Ue,stop:Ge,getMousePosition:Ve,getWheelDelta:Ke,fakeStop:Xe,skipped:Je,isExternalTarget:$e,addListener:Oe,removeListener:Ne});var ii=I.extend({run:function t(e,i,n,o){this.stop();this._el=e;this._inProgress=true;this._duration=n||.25;this._easeOutPower=1/Math.max(o||.5,.2);this._startPos=be(e);this._offset=i.subtract(this._startPos);this._startTime=+new Date;this.fire("start");this._animate()},stop:function t(){if(!this._inProgress){return}this._step(true);this._complete()},_animate:function t(){this._animId=M(this._animate,this);this._step()},_step:function t(e){var i=+new Date-this._startTime,n=this._duration*1e3;if(i<n){this._runFrame(this._easeOut(i/n),e)}else{this._runFrame(1);this._complete()}},_runFrame:function t(e,i){var n=this._startPos.add(this._offset.multiplyBy(e));if(i){n._round()}we(this._el,n);this.fire("step")},_complete:function t(){C(this._animId);this._inProgress=false;this.fire("end")},_easeOut:function t(e){return 1-Math.pow(1-e,this._easeOutPower)}});var ni=I.extend({options:{crs:Y,center:undefined,zoom:undefined,minZoom:undefined,maxZoom:undefined,layers:[],maxBounds:undefined,renderer:undefined,zoomAnimation:true,zoomAnimationThreshold:4,fadeAnimation:true,markerZoomAnimation:true,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:true},initialize:function t(e,i){i=_(this,i);this._handlers=[];this._layers={};this._zoomBoundLayers={};this._sizeChanged=true;this._initContainer(e);this._initLayout();this._onResize=s(this._onResize,this);this._initEvents();if(i.maxBounds){this.setMaxBounds(i.maxBounds)}if(i.zoom!==undefined){this._zoom=this._limitZoom(i.zoom)}if(i.center&&i.zoom!==undefined){this.setView(W(i.center),i.zoom,{reset:true})}this.callInitHooks();this._zoomAnimated=ne&>&&!Tt&&this.options.zoomAnimation;if(this._zoomAnimated){this._createAnimProxy();Oe(this._proxy,oe,this._catchTransitionEnd,this)}this._addLayers(this.options.layers)},setView:function t(e,i,o){i=i===undefined?this._zoom:this._limitZoom(i);e=this._limitCenter(W(e),i,this.options.maxBounds);o=o||{};this._stop();if(this._loaded&&!o.reset&&o!==true){if(o.animate!==undefined){o.zoom=n({animate:o.animate},o.zoom);o.pan=n({animate:o.animate,duration:o.duration},o.pan)}var s=this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,i,o.zoom):this._tryAnimatedPan(e,o.pan);if(s){clearTimeout(this._sizeTimer);return this}}this._resetView(e,i);return this},setZoom:function t(e,i){if(!this._loaded){this._zoom=e;return this}return this.setView(this.getCenter(),e,{zoom:i})},zoomIn:function t(e,i){e=e||(gt?this.options.zoomDelta:1);return this.setZoom(this._zoom+e,i)},zoomOut:function t(e,i){e=e||(gt?this.options.zoomDelta:1);return this.setZoom(this._zoom-e,i)},setZoomAround:function t(e,i,n){var o=this.getZoomScale(i),s=this.getSize().divideBy(2),r=e instanceof B?e:this.latLngToContainerPoint(e),a=r.subtract(s).multiplyBy(1-1/o),h=this.containerPointToLatLng(s.add(a));return this.setView(h,i,{zoom:n})},_getBoundsCenterZoom:function t(e,i){i=i||{};e=e.getBounds?e.getBounds():j(e);var n=O(i.paddingTopLeft||i.padding||[0,0]),o=O(i.paddingBottomRight||i.padding||[0,0]),s=this.getBoundsZoom(e,false,n.add(o));s=typeof i.maxZoom==="number"?Math.min(i.maxZoom,s):s;if(s===Infinity){return{center:e.getCenter(),zoom:s}}var r=o.subtract(n).divideBy(2),a=this.project(e.getSouthWest(),s),h=this.project(e.getNorthEast(),s),u=this.unproject(a.add(h).divideBy(2).add(r),s);return{center:u,zoom:s}},fitBounds:function t(e,i){e=j(e);if(!e.isValid()){throw new Error("Bounds are not valid.")}var n=this._getBoundsCenterZoom(e,i);return this.setView(n.center,n.zoom,i)},fitWorld:function t(e){return this.fitBounds([[-90,-180],[90,180]],e)},panTo:function t(e,i){return this.setView(e,this._zoom,{pan:i})},panBy:function t(e,i){e=O(e).round();i=i||{};if(!e.x&&!e.y){return this.fire("moveend")}if(i.animate!==true&&!this.getSize().contains(e)){this._resetView(this.unproject(this.project(this.getCenter()).add(e)),this.getZoom());return this}if(!this._panAnim){this._panAnim=new ii;this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)}if(!i.noMoveStart){this.fire("movestart")}if(i.animate!==false){de(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(e).round();this._panAnim.run(this._mapPane,n,i.duration||.25,i.easeLinearity)}else{this._rawPanBy(e);this.fire("move").fire("moveend")}return this},flyTo:function t(e,i,n){n=n||{};if(n.animate===false||!gt){return this.setView(e,i,n)}this._stop();var o=this.project(this.getCenter()),s=this.project(e),r=this.getSize(),a=this._zoom;e=W(e);i=i===undefined?a:i;var h=Math.max(r.x,r.y),u=h*this.getZoomScale(a,i),l=s.distanceTo(o)||1,c=1.42,f=c*c;function d(t){var e=t?-1:1,i=t?u:h,n=u*u-h*h+e*f*f*l*l,o=2*i*f*l,s=n/o,r=Math.sqrt(s*s+1)-s;var a=r<1e-9?-18:Math.log(r);return a}function _(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return _(t)/p(t)}var v=d(0);function g(t){return h*(p(v)/p(v+c*t))}function y(t){return h*(p(v)*m(v+c*t)-_(v))/f}function x(t){return 1-Math.pow(1-t,1.5)}var w=Date.now(),b=(d(1)-v)/c,P=n.duration?1e3*n.duration:1e3*b*.8;function L(){var t=(Date.now()-w)/P,n=x(t)*b;if(t<=1){this._flyToFrame=M(L,this);this._move(this.unproject(o.add(s.subtract(o).multiplyBy(y(n)/l)),a),this.getScaleZoom(h/g(n),a),{flyTo:true})}else{this._move(e,i)._moveEnd(true)}}this._moveStart(true,n.noMoveStart);L.call(this);return this},flyToBounds:function t(e,i){var n=this._getBoundsCenterZoom(e,i);return this.flyTo(n.center,n.zoom,i)},setMaxBounds:function t(e){e=j(e);if(!e.isValid()){this.options.maxBounds=null;return this.off("moveend",this._panInsideMaxBounds)}else if(this.options.maxBounds){this.off("moveend",this._panInsideMaxBounds)}this.options.maxBounds=e;if(this._loaded){this._panInsideMaxBounds()}return this.on("moveend",this._panInsideMaxBounds)},setMinZoom:function t(e){var i=this.options.minZoom;this.options.minZoom=e;if(this._loaded&&i!==e){this.fire("zoomlevelschange");if(this.getZoom()<this.options.minZoom){return this.setZoom(e)}}return this},setMaxZoom:function t(e){var i=this.options.maxZoom;this.options.maxZoom=e;if(this._loaded&&i!==e){this.fire("zoomlevelschange");if(this.getZoom()>this.options.maxZoom){return this.setZoom(e)}}return this},panInsideBounds:function t(e,i){this._enforcingBounds=true;var n=this.getCenter(),o=this._limitCenter(n,this._zoom,j(e));if(!n.equals(o)){this.panTo(o,i)}this._enforcingBounds=false;return this},panInside:function t(e,i){i=i||{};var n=O(i.paddingTopLeft||i.padding||[0,0]),o=O(i.paddingBottomRight||i.padding||[0,0]),s=this.getCenter(),r=this.project(s),a=this.project(e),h=this.getPixelBounds(),u=h.getSize().divideBy(2),l=N([h.min.add(n),h.max.subtract(o)]);if(!l.contains(a)){this._enforcingBounds=true;var c=r.subtract(a),f=O(a.x+c.x,a.y+c.y);if(a.x<l.min.x||a.x>l.max.x){f.x=r.x-c.x;if(c.x>0){f.x+=u.x-n.x}else{f.x-=u.x-o.x}}if(a.y<l.min.y||a.y>l.max.y){f.y=r.y-c.y;if(c.y>0){f.y+=u.y-n.y}else{f.y-=u.y-o.y}}this.panTo(this.unproject(f),i);this._enforcingBounds=false}return this},invalidateSize:function t(e){if(!this._loaded){return this}e=n({animate:false,pan:true},e===true?{animate:true}:e);var i=this.getSize();this._sizeChanged=true;this._lastCenter=null;var o=this.getSize(),r=i.divideBy(2).round(),a=o.divideBy(2).round(),h=r.subtract(a);if(!h.x&&!h.y){return this}if(e.animate&&e.pan){this.panBy(h)}else{if(e.pan){this._rawPanBy(h)}this.fire("move");if(e.debounceMoveend){clearTimeout(this._sizeTimer);this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)}else{this.fire("moveend")}}return this.fire("resize",{oldSize:i,newSize:o})},stop:function t(){this.setZoom(this._limitZoom(this._zoom));if(!this.options.zoomSnap){this.fire("viewreset")}return this._stop()},locate:function t(e){e=this._locateOptions=n({timeout:1e4,watch:false},e);if(!("geolocation"in navigator)){this._handleGeolocationError({code:0,message:"Geolocation not supported."});return this}var i=s(this._handleGeolocationResponse,this),o=s(this._handleGeolocationError,this);if(e.watch){this._locationWatchId=navigator.geolocation.watchPosition(i,o,e)}else{navigator.geolocation.getCurrentPosition(i,o,e)}return this},stopLocate:function t(){if(navigator.geolocation&&navigator.geolocation.clearWatch){navigator.geolocation.clearWatch(this._locationWatchId)}if(this._locateOptions){this._locateOptions.setView=false}return this},_handleGeolocationError:function t(e){var i=e.code,n=e.message||(i===1?"permission denied":i===2?"position unavailable":"timeout");if(this._locateOptions.setView&&!this._loaded){this.fitWorld()}this.fire("locationerror",{code:i,message:"Geolocation error: "+n+"."})},_handleGeolocationResponse:function t(e){var i=e.coords.latitude,n=e.coords.longitude,o=new H(i,n),s=o.toBounds(e.coords.accuracy*2),r=this._locateOptions;if(r.setView){var a=this.getBoundsZoom(s);this.setView(o,r.maxZoom?Math.min(a,r.maxZoom):a)}var h={latlng:o,bounds:s,timestamp:e.timestamp};for(var u in e.coords){if(typeof e.coords[u]==="number"){h[u]=e.coords[u]}}this.fire("locationfound",h)},addHandler:function t(e,i){if(!i){return this}var n=this[e]=new i(this);this._handlers.push(n);if(this.options[e]){n.enable()}return this},remove:function t(){this._initEvents(true);if(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=undefined;this._containerId=undefined}if(this._locationWatchId!==undefined){this.stopLocate()}this._stop();he(this._mapPane);if(this._clearControlPos){this._clearControlPos()}if(this._resizeRequest){C(this._resizeRequest);this._resizeRequest=null}this._clearHandlers();if(this._loaded){this.fire("unload")}var e;for(e in this._layers){this._layers[e].remove()}for(e in this._panes){he(this._panes[e])}this._layers=[];this._panes=[];delete this._mapPane;delete this._renderer;return this},createPane:function t(e,i){var n="leaflet-pane"+(e?" leaflet-"+e.replace("Pane","")+"-pane":""),o=ae("div",n,i||this._mapPane);if(e){this._panes[e]=o}return o},getCenter:function t(){this._checkIfLoaded();if(this._lastCenter&&!this._moved()){return this._lastCenter}return this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function t(){return this._zoom},getBounds:function t(){var e=this.getPixelBounds(),i=this.unproject(e.getBottomLeft()),n=this.unproject(e.getTopRight());return new D(i,n)},getMinZoom:function t(){return this.options.minZoom===undefined?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function t(){return this.options.maxZoom===undefined?this._layersMaxZoom===undefined?Infinity:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function t(e,i,n){e=j(e);n=O(n||[0,0]);var o=this.getZoom()||0,s=this.getMinZoom(),r=this.getMaxZoom(),a=e.getNorthWest(),h=e.getSouthEast(),u=this.getSize().subtract(n),l=N(this.project(h,o),this.project(a,o)).getSize(),c=gt?this.options.zoomSnap:1,f=u.x/l.x,d=u.y/l.y,_=i?Math.max(f,d):Math.min(f,d);o=this.getScaleZoom(_,o);if(c){o=Math.round(o/(c/100))*(c/100);o=i?Math.ceil(o/c)*c:Math.floor(o/c)*c}return Math.max(s,Math.min(r,o))},getSize:function t(){if(!this._size||this._sizeChanged){this._size=new B(this._container.clientWidth||0,this._container.clientHeight||0);this._sizeChanged=false}return this._size.clone()},getPixelBounds:function t(e,i){var n=this._getTopLeftPoint(e,i);return new R(n,n.add(this.getSize()))},getPixelOrigin:function t(){this._checkIfLoaded();return this._pixelOrigin},getPixelWorldBounds:function t(e){return this.options.crs.getProjectedBounds(e===undefined?this.getZoom():e)},getPane:function t(e){return typeof e==="string"?this._panes[e]:e},getPanes:function t(){return this._panes},getContainer:function t(){return this._container},getZoomScale:function t(e,i){var n=this.options.crs;i=i===undefined?this._zoom:i;return n.scale(e)/n.scale(i)},getScaleZoom:function t(e,i){var n=this.options.crs;i=i===undefined?this._zoom:i;var o=n.zoom(e*n.scale(i));return isNaN(o)?Infinity:o},project:function t(e,i){i=i===undefined?this._zoom:i;return this.options.crs.latLngToPoint(W(e),i)},unproject:function t(e,i){i=i===undefined?this._zoom:i;return this.options.crs.pointToLatLng(O(e),i)},layerPointToLatLng:function t(e){var i=O(e).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function t(e){var i=this.project(W(e))._round();return i._subtract(this.getPixelOrigin())},wrapLatLng:function t(e){return this.options.crs.wrapLatLng(W(e))},wrapLatLngBounds:function t(e){return this.options.crs.wrapLatLngBounds(j(e))},distance:function t(e,i){return this.options.crs.distance(W(e),W(i))},containerPointToLayerPoint:function t(e){return O(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function t(e){return O(e).add(this._getMapPanePos())},containerPointToLatLng:function t(e){var i=this.containerPointToLayerPoint(O(e));return this.layerPointToLatLng(i)},latLngToContainerPoint:function t(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(W(e)))},mouseEventToContainerPoint:function t(e){return Ve(e,this._container)},mouseEventToLayerPoint:function t(e){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e))},mouseEventToLatLng:function t(e){return this.layerPointToLatLng(this.mouseEventToLayerPoint(e))},_initContainer:function t(e){var i=this._container=se(e);if(!i){throw new Error("Map container not found.")}else if(i._leaflet_id){throw new Error("Map container is already initialized.")}Oe(i,"scroll",this._onScroll,this);this._containerId=a(i)},_initLayout:function t(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&>de(e,"leaflet-container"+(Lt?" leaflet-touch":"")+(Mt?" leaflet-retina":"")+(et?" leaflet-oldie":"")+(ct?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=re(e,"position");if(i!=="absolute"&&i!=="relative"&&i!=="fixed"){e.style.position="relative"}this._initPanes();if(this._initControlPos){this._initControlPos()}},_initPanes:function t(){var e=this._panes={};this._paneRenderers={};this._mapPane=this.createPane("mapPane",this._container);we(this._mapPane,new B(0,0));this.createPane("tilePane");this.createPane("shadowPane");this.createPane("overlayPane");this.createPane("markerPane");this.createPane("tooltipPane");this.createPane("popupPane");if(!this.options.markerZoomAnimation){de(e.markerPane,"leaflet-zoom-hide");de(e.shadowPane,"leaflet-zoom-hide")}},_resetView:function t(e,i){we(this._mapPane,new B(0,0));var n=!this._loaded;this._loaded=true;i=this._limitZoom(i);this.fire("viewprereset");var o=this._zoom!==i;this._moveStart(o,false)._move(e,i)._moveEnd(o);this.fire("viewreset");if(n){this.fire("load")}},_moveStart:function t(e,i){if(e){this.fire("zoomstart")}if(!i){this.fire("movestart")}return this},_move:function t(e,i,n){if(i===undefined){i=this._zoom}var o=this._zoom!==i;this._zoom=i;this._lastCenter=e;this._pixelOrigin=this._getNewPixelOrigin(e);if(o||n&&n.pinch){this.fire("zoom",n)}return this.fire("move",n)},_moveEnd:function t(e){if(e){this.fire("zoomend")}return this.fire("moveend")},_stop:function t(){C(this._flyToFrame);if(this._panAnim){this._panAnim.stop()}return this},_rawPanBy:function t(e){we(this._mapPane,this._getMapPanePos().subtract(e))},_getZoomSpan:function t(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function t(){if(!this._enforcingBounds){this.panInsideBounds(this.options.maxBounds)}},_checkIfLoaded:function t(){if(!this._loaded){throw new Error("Set map center and zoom first.")}},_initEvents:function t(e){this._targets={};this._targets[a(this._container)]=this;var i=e?Ne:Oe;i(this._container,"click dblclick mousedown mouseup "+"mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this);if(this.options.trackResize){i(window,"resize",this._onResize,this)}if(gt&&this.options.transform3DLimit){(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)}},_onResize:function t(){C(this._resizeRequest);this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:true})}),this)},_onScroll:function t(){this._container.scrollTop=0;this._container.scrollLeft=0},_onMoveEnd:function t(){var e=this._getMapPanePos();if(Math.max(Math.abs(e.x),Math.abs(e.y))>=this.options.transform3DLimit){this._resetView(this.getCenter(),this.getZoom())}},_findEventTargets:function t(e,i){var n=[],o,s=i==="mouseout"||i==="mouseover",r=e.target||e.srcElement,h=false;while(r){o=this._targets[a(r)];if(o&&(i==="click"||i==="preclick")&&!e._simulated&&this._draggableMoved(o)){h=true;break}if(o&&o.listens(i,true)){if(s&&!$e(r,e)){break}n.push(o);if(s){break}}if(r===this._container){break}r=r.parentNode}if(!n.length&&!h&&!s&&$e(r,e)){n=[this]}return n},_handleDOMEvent:function t(e){if(!this._loaded||Je(e)){return}var i=e.type;if(i==="mousedown"||i==="keypress"||i==="keyup"||i==="keydown"){Ee(e.target||e.srcElement)}this._fireDOMEvent(e,i)},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function t(e,i,o){if(e.type==="click"){var s=n({},e);s.type="preclick";this._fireDOMEvent(s,s.type,o)}if(e._stopped){return}o=(o||[]).concat(this._findEventTargets(e,i));if(!o.length){return}var r=o[0];if(i==="contextmenu"&&r.listens(i,true)){Ue(e)}var a={originalEvent:e};if(e.type!=="keypress"&&e.type!=="keydown"&&e.type!=="keyup"){var h=r.getLatLng&&(!r._radius||r._radius<=10);a.containerPoint=h?this.latLngToContainerPoint(r.getLatLng()):this.mouseEventToContainerPoint(e);a.layerPoint=this.containerPointToLayerPoint(a.containerPoint);a.latlng=h?r.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var u=0;u<o.length;u++){o[u].fire(i,a,true);if(a.originalEvent._stopped||o[u].options.bubblingMouseEvents===false&&y(this._mouseEvents,i)!==-1){return}}},_draggableMoved:function t(e){e=e.dragging&&e.dragging.enabled()?e:this;return e.dragging&&e.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function t(){for(var e=0,i=this._handlers.length;e<i;e++){this._handlers[e].disable()}},whenReady:function t(e,i){if(this._loaded){e.call(i||this,{target:this})}else{this.on("load",e,i)}return this},_getMapPanePos:function t(){return be(this._mapPane)||new B(0,0)},_moved:function t(){var e=this._getMapPanePos();return e&&!e.equals([0,0])},_getTopLeftPoint:function t(e,i){var n=e&&i!==undefined?this._getNewPixelOrigin(e,i):this.getPixelOrigin();return n.subtract(this._getMapPanePos())},_getNewPixelOrigin:function t(e,i){var n=this.getSize()._divideBy(2);return this.project(e,i)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function t(e,i,n){var o=this._getNewPixelOrigin(n,i);return this.project(e,i)._subtract(o)},_latLngBoundsToNewLayerBounds:function t(e,i,n){var o=this._getNewPixelOrigin(n,i);return N([this.project(e.getSouthWest(),i)._subtract(o),this.project(e.getNorthWest(),i)._subtract(o),this.project(e.getSouthEast(),i)._subtract(o),this.project(e.getNorthEast(),i)._subtract(o)])},_getCenterLayerPoint:function t(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function t(e){return this.latLngToLayerPoint(e).subtract(this._getCenterLayerPoint())},_limitCenter:function t(e,i,n){if(!n){return e}var o=this.project(e,i),s=this.getSize().divideBy(2),r=new R(o.subtract(s),o.add(s)),a=this._getBoundsOffset(r,n,i);if(a.round().equals([0,0])){return e}return this.unproject(o.add(a),i)},_limitOffset:function t(e,i){if(!i){return e}var n=this.getPixelBounds(),o=new R(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(o,i))},_getBoundsOffset:function t(e,i,n){var o=N(this.project(i.getNorthEast(),n),this.project(i.getSouthWest(),n)),s=o.min.subtract(e.min),r=o.max.subtract(e.max),a=this._rebound(s.x,-r.x),h=this._rebound(s.y,-r.y);return new B(a,h)},_rebound:function t(e,i){return e+i>0?Math.round(e-i)/2:Math.max(0,Math.ceil(e))-Math.max(0,Math.floor(i))},_limitZoom:function t(e){var i=this.getMinZoom(),n=this.getMaxZoom(),o=gt?this.options.zoomSnap:1;if(o){e=Math.round(e/o)*o}return Math.max(i,Math.min(n,e))},_onPanTransitionStep:function t(){this.fire("move")},_onPanTransitionEnd:function t(){_e(this._mapPane,"leaflet-pan-anim");this.fire("moveend")},_tryAnimatedPan:function t(e,i){var n=this._getCenterOffset(e)._trunc();if((i&&i.animate)!==true&&!this.getSize().contains(n)){return false}this.panBy(n,i);return true},_createAnimProxy:function t(){var e=this._proxy=ae("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e);this.on("zoomanim",(function(t){var e=ie,i=this._proxy.style[e];xe(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1));if(i===this._proxy.style[e]&&this._animatingZoom){this._onZoomTransitionEnd()}}),this);this.on("load moveend",this._animMoveEnd,this);this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function t(){he(this._proxy);this.off("load moveend",this._animMoveEnd,this);delete this._proxy},_animMoveEnd:function t(){var e=this.getCenter(),i=this.getZoom();xe(this._proxy,this.project(e,i),this.getZoomScale(i,1))},_catchTransitionEnd:function t(e){if(this._animatingZoom&&e.propertyName.indexOf("transform")>=0){this._onZoomTransitionEnd()}},_nothingToAnimate:function t(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function t(e,i,n){if(this._animatingZoom){return true}n=n||{};if(!this._zoomAnimated||n.animate===false||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold){return false}var o=this.getZoomScale(i),s=this._getCenterOffset(e)._divideBy(1-1/o);if(n.animate!==true&&!this.getSize().contains(s)){return false}M((function(){this._moveStart(true,false)._animateZoom(e,i,true)}),this);return true},_animateZoom:function t(e,i,n,o){if(!this._mapPane){return}if(n){this._animatingZoom=true;this._animateToCenter=e;this._animateToZoom=i;de(this._mapPane,"leaflet-zoom-anim")}this.fire("zoomanim",{center:e,zoom:i,noUpdate:o});setTimeout(s(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function t(){if(!this._animatingZoom){return}if(this._mapPane){_e(this._mapPane,"leaflet-zoom-anim")}this._animatingZoom=false;this._move(this._animateToCenter,this._animateToZoom);M((function(){this._moveEnd(true)}),this)}});function oi(t,e){return new ni(t,e)}var si=k.extend({options:{position:"topright"},initialize:function t(e){_(this,e)},getPosition:function t(){return this.options.position},setPosition:function t(e){var i=this._map;if(i){i.removeControl(this)}this.options.position=e;if(i){i.addControl(this)}return this},getContainer:function t(){return this._container},addTo:function t(e){this.remove();this._map=e;var i=this._container=this.onAdd(e),n=this.getPosition(),o=e._controlCorners[n];de(i,"leaflet-control");if(n.indexOf("bottom")!==-1){o.insertBefore(i,o.firstChild)}else{o.appendChild(i)}this._map.on("unload",this.remove,this);return this},remove:function t(){if(!this._map){return this}he(this._container);if(this.onRemove){this.onRemove(this._map)}this._map.off("unload",this.remove,this);this._map=null;return this},_refocusOnMap:function t(e){if(this._map&&e&&e.screenX>0&&e.screenY>0){this._map.getContainer().focus()}}});var ri=function t(e){return new si(e)};ni.include({addControl:function t(e){e.addTo(this);return this},removeControl:function t(e){e.remove();return this},_initControlPos:function t(){var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=ae("div",i+"control-container",this._container);function o(t,o){var s=i+t+" "+i+o;e[t+o]=ae("div",s,n)}o("top","left");o("top","right");o("bottom","left");o("bottom","right")},_clearControlPos:function t(){for(var e in this._controlCorners){he(this._controlCorners[e])}he(this._controlContainer);delete this._controlCorners;delete this._controlContainer}});var ai=si.extend({options:{collapsed:true,position:"topright",autoZIndex:true,hideSingleBase:false,sortLayers:false,sortFunction:function t(e,i,n,o){return n<o?-1:o<n?1:0}},initialize:function t(e,i,n){_(this,n);this._layerControlInputs=[];this._layers=[];this._lastZIndex=0;this._handlingClick=false;for(var o in e){this._addLayer(e[o],o)}for(o in i){this._addLayer(i[o],o,true)}},onAdd:function t(e){this._initLayout();this._update();this._map=e;e.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(e){si.prototype.addTo.call(this,e);return this._expandIfNotCollapsed()},onRemove:function t(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++){this._layers[e].layer.off("add remove",this._onLayerChange,this)}},addBaseLayer:function t(e,i){this._addLayer(e,i);return this._map?this._update():this},addOverlay:function t(e,i){this._addLayer(e,i,true);return this._map?this._update():this},removeLayer:function t(e){e.off("add remove",this._onLayerChange,this);var i=this._getLayer(a(e));if(i){this._layers.splice(this._layers.indexOf(i),1)}return this._map?this._update():this},expand:function t(){de(this._container,"leaflet-control-layers-expanded");this._section.style.height=null;var e=this._map.getSize().y-(this._container.offsetTop+50);if(e<this._section.clientHeight){de(this._section,"leaflet-control-layers-scrollbar");this._section.style.height=e+"px"}else{_e(this._section,"leaflet-control-layers-scrollbar")}this._checkDisabledLayers();return this},collapse:function t(){_e(this._container,"leaflet-control-layers-expanded");return this},_initLayout:function t(){var e="leaflet-control-layers",i=this._container=ae("div",e),n=this.options.collapsed;i.setAttribute("aria-haspopup",true);Fe(i);We(i);var o=this._section=ae("section",e+"-list");if(n){this._map.on("click",this.collapse,this);if(!ot){Oe(i,{mouseenter:this.expand,mouseleave:this.collapse},this)}}var s=this._layersLink=ae("a",e+"-toggle",i);s.href="#";s.title="Layers";if(Lt){Oe(s,"click",Ge);Oe(s,"click",this.expand,this)}else{Oe(s,"focus",this.expand,this)}if(!n){this.expand()}this._baseLayersList=ae("div",e+"-base",o);this._separator=ae("div",e+"-separator",o);this._overlaysList=ae("div",e+"-overlays",o);i.appendChild(o)},_getLayer:function t(e){for(var i=0;i<this._layers.length;i++){if(this._layers[i]&&a(this._layers[i].layer)===e){return this._layers[i]}}},_addLayer:function t(e,i,n){if(this._map){e.on("add remove",this._onLayerChange,this)}this._layers.push({layer:e,name:i,overlay:n});if(this.options.sortLayers){this._layers.sort(s((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this))}if(this.options.autoZIndex&&e.setZIndex){this._lastZIndex++;e.setZIndex(this._lastZIndex)}this._expandIfNotCollapsed()},_update:function t(){if(!this._container){return this}ue(this._baseLayersList);ue(this._overlaysList);this._layerControlInputs=[];var e,i,n,o,s=0;for(n=0;n<this._layers.length;n++){o=this._layers[n];this._addItem(o);i=i||o.overlay;e=e||!o.overlay;s+=!o.overlay?1:0}if(this.options.hideSingleBase){e=e&&s>1;this._baseLayersList.style.display=e?"":"none"}this._separator.style.display=i&&e?"":"none";return this},_onLayerChange:function t(e){if(!this._handlingClick){this._update()}var i=this._getLayer(a(e.target));var n=i.overlay?e.type==="add"?"overlayadd":"overlayremove":e.type==="add"?"baselayerchange":null;if(n){this._map.fire(n,i)}},_createRadioElement:function t(e,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+e+'"'+(i?' checked="checked"':"")+"/>";var o=document.createElement("div");o.innerHTML=n;return o.firstChild},_addItem:function t(e){var i=document.createElement("label"),n=this._map.hasLayer(e.layer),o;if(e.overlay){o=document.createElement("input");o.type="checkbox";o.className="leaflet-control-layers-selector";o.defaultChecked=n}else{o=this._createRadioElement("leaflet-base-layers_"+a(this),n)}this._layerControlInputs.push(o);o.layerId=a(e.layer);Oe(o,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+e.name;var r=document.createElement("div");i.appendChild(r);r.appendChild(o);r.appendChild(s);var h=e.overlay?this._overlaysList:this._baseLayersList;h.appendChild(i);this._checkDisabledLayers();return i},_onInputClick:function t(){var e=this._layerControlInputs,i,n;var o=[],s=[];this._handlingClick=true;for(var r=e.length-1;r>=0;r--){i=e[r];n=this._getLayer(i.layerId).layer;if(i.checked){o.push(n)}else if(!i.checked){s.push(n)}}for(r=0;r<s.length;r++){if(this._map.hasLayer(s[r])){this._map.removeLayer(s[r])}}for(r=0;r<o.length;r++){if(!this._map.hasLayer(o[r])){this._map.addLayer(o[r])}}this._handlingClick=false;this._refocusOnMap()},_checkDisabledLayers:function t(){var e=this._layerControlInputs,i,n,o=this._map.getZoom();for(var s=e.length-1;s>=0;s--){i=e[s];n=this._getLayer(i.layerId).layer;i.disabled=n.options.minZoom!==undefined&&o<n.options.minZoom||n.options.maxZoom!==undefined&&o>n.options.maxZoom}},_expandIfNotCollapsed:function t(){if(this._map&&!this.options.collapsed){this.expand()}return this},_expand:function t(){return this.expand()},_collapse:function t(){return this.collapse()}});var hi=function t(e,i,n){return new ai(e,i,n)};var ui=si.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function t(e){var i="leaflet-control-zoom",n=ae("div",i+" leaflet-bar"),o=this.options;this._zoomInButton=this._createButton(o.zoomInText,o.zoomInTitle,i+"-in",n,this._zoomIn);this._zoomOutButton=this._createButton(o.zoomOutText,o.zoomOutTitle,i+"-out",n,this._zoomOut);this._updateDisabled();e.on("zoomend zoomlevelschange",this._updateDisabled,this);return n},onRemove:function t(e){e.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function t(){this._disabled=true;this._updateDisabled();return this},enable:function t(){this._disabled=false;this._updateDisabled();return this},_zoomIn:function t(e){if(!this._disabled&&this._map._zoom<this._map.getMaxZoom()){this._map.zoomIn(this._map.options.zoomDelta*(e.shiftKey?3:1))}},_zoomOut:function t(e){if(!this._disabled&&this._map._zoom>this._map.getMinZoom()){this._map.zoomOut(this._map.options.zoomDelta*(e.shiftKey?3:1))}},_createButton:function t(e,i,n,o,s){var r=ae("a",n,o);r.innerHTML=e;r.href="#";r.title=i;r.setAttribute("role","button");r.setAttribute("aria-label",i);Fe(r);Oe(r,"click",Ge);Oe(r,"click",s,this);Oe(r,"click",this._refocusOnMap,this);return r},_updateDisabled:function t(){var e=this._map,i="leaflet-disabled";_e(this._zoomInButton,i);_e(this._zoomOutButton,i);if(this._disabled||e._zoom===e.getMinZoom()){de(this._zoomOutButton,i)}if(this._disabled||e._zoom===e.getMaxZoom()){de(this._zoomInButton,i)}}});ni.mergeOptions({zoomControl:true});ni.addInitHook((function(){if(this.options.zoomControl){this.zoomControl=new ui;this.addControl(this.zoomControl)}}));var li=function t(e){return new ui(e)};var ci=si.extend({options:{position:"bottomleft",maxWidth:100,metric:true,imperial:true},onAdd:function t(e){var i="leaflet-control-scale",n=ae("div",i),o=this.options;this._addScales(o,i+"-line",n);e.on(o.updateWhenIdle?"moveend":"move",this._update,this);e.whenReady(this._update,this);return n},onRemove:function t(e){e.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function t(e,i,n){if(e.metric){this._mScale=ae("div",i,n)}if(e.imperial){this._iScale=ae("div",i,n)}},_update:function t(){var e=this._map,i=e.getSize().y/2;var n=e.distance(e.containerPointToLatLng([0,i]),e.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(n)},_updateScales:function t(e){if(this.options.metric&&e){this._updateMetric(e)}if(this.options.imperial&&e){this._updateImperial(e)}},_updateMetric:function t(e){var i=this._getRoundNum(e),n=i<1e3?i+" m":i/1e3+" km";this._updateScale(this._mScale,n,i/e)},_updateImperial:function t(e){var i=e*3.2808399,n,o,s;if(i>5280){n=i/5280;o=this._getRoundNum(n);this._updateScale(this._iScale,o+" mi",o/n)}else{s=this._getRoundNum(i);this._updateScale(this._iScale,s+" ft",s/i)}},_updateScale:function t(e,i,n){e.style.width=Math.round(this.options.maxWidth*n)+"px";e.innerHTML=i},_getRoundNum:function t(e){var i=Math.pow(10,(Math.floor(e)+"").length-1),n=e/i;n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1;return i*n}});var fi=function t(e){return new ci(e)};var di=si.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function t(e){_(this,e);this._attributions={}},onAdd:function t(e){e.attributionControl=this;this._container=ae("div","leaflet-control-attribution");Fe(this._container);for(var i in e._layers){if(e._layers[i].getAttribution){this.addAttribution(e._layers[i].getAttribution())}}this._update();return this._container},setPrefix:function t(e){this.options.prefix=e;this._update();return this},addAttribution:function t(e){if(!e){return this}if(!this._attributions[e]){this._attributions[e]=0}this._attributions[e]++;this._update();return this},removeAttribution:function t(e){if(!e){return this}if(this._attributions[e]){this._attributions[e]--;this._update()}return this},_update:function t(){if(!this._map){return}var e=[];for(var i in this._attributions){if(this._attributions[i]){e.push(i)}}var n=[];if(this.options.prefix){n.push(this.options.prefix)}if(e.length){n.push(e.join(", "))}this._container.innerHTML=n.join(" | ")}});ni.mergeOptions({attributionControl:true});ni.addInitHook((function(){if(this.options.attributionControl){(new di).addTo(this)}}));var _i=function t(e){return new di(e)};si.Layers=ai;si.Zoom=ui;si.Scale=ci;si.Attribution=di;ri.layers=hi;ri.zoom=li;ri.scale=fi;ri.attribution=_i;var pi=k.extend({initialize:function t(e){this._map=e},enable:function t(){if(this._enabled){return this}this._enabled=true;this.addHooks();return this},disable:function t(){if(!this._enabled){return this}this._enabled=false;this.removeHooks();return this},enabled:function t(){return!!this._enabled}});pi.addTo=function(t,e){t.addHandler(e,this);return this};var mi={Events:Z};var vi=Lt?"touchstart mousedown":"mousedown";var gi={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"};var yi={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"};var xi=I.extend({options:{clickTolerance:3},initialize:function t(e,i,n,o){_(this,o);this._element=e;this._dragStartTarget=i||e;this._preventOutline=n},enable:function t(){if(this._enabled){return}Oe(this._dragStartTarget,vi,this._onDown,this);this._enabled=true},disable:function t(){if(!this._enabled){return}if(xi._dragging===this){this.finishDrag()}Ne(this._dragStartTarget,vi,this._onDown,this);this._enabled=false;this._moved=false},_onDown:function t(e){if(e._simulated||!this._enabled){return}this._moved=false;if(fe(this._element,"leaflet-zoom-anim")){return}if(xi._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches){return}xi._dragging=this;if(this._preventOutline){Ee(this._element)}Me();Pe();if(this._moving){return}this.fire("down");var i=e.touches?e.touches[0]:e,n=Ie(this._element);this._startPoint=new B(i.clientX,i.clientY);this._parentScale=Be(n);Oe(document,yi[e.type],this._onMove,this);Oe(document,gi[e.type],this._onUp,this)},_onMove:function t(e){if(e._simulated||!this._enabled){return}if(e.touches&&e.touches.length>1){this._moved=true;return}var i=e.touches&&e.touches.length===1?e.touches[0]:e,n=new B(i.clientX,i.clientY)._subtract(this._startPoint);if(!n.x&&!n.y){return}if(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance){return}n.x/=this._parentScale.x;n.y/=this._parentScale.y;Ue(e);if(!this._moved){this.fire("dragstart");this._moved=true;this._startPos=be(this._element).subtract(n);de(document.body,"leaflet-dragging");this._lastTarget=e.target||e.srcElement;if(window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance){this._lastTarget=this._lastTarget.correspondingUseElement}de(this._lastTarget,"leaflet-drag-target")}this._newPos=this._startPos.add(n);this._moving=true;C(this._animRequest);this._lastEvent=e;this._animRequest=M(this._updatePosition,this,true)},_updatePosition:function t(){var e={originalEvent:this._lastEvent};this.fire("predrag",e);we(this._element,this._newPos);this.fire("drag",e)},_onUp:function t(e){if(e._simulated||!this._enabled){return}this.finishDrag()},finishDrag:function t(){_e(document.body,"leaflet-dragging");if(this._lastTarget){_e(this._lastTarget,"leaflet-drag-target");this._lastTarget=null}for(var e in yi){Ne(document,yi[e],this._onMove,this);Ne(document,gi[e],this._onUp,this)}Ce();Le();if(this._moved&&this._moving){C(this._animRequest);this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})}this._moving=false;xi._dragging=false}});function wi(t,e){if(!e||!t.length){return t.slice()}var i=e*e;t=zi(t,i);t=Li(t,i);return t}function bi(t,e,i){return Math.sqrt(Zi(t,e,i,true))}function Pi(t,e,i){return Zi(t,e,i)}function Li(t,e){var i=t.length,n=(typeof Uint8Array==="undefined"?"undefined":babelHelpers["typeof"](Uint8Array))!==undefined+""?Uint8Array:Array,o=new n(i);o[0]=o[i-1]=1;Ti(t,o,e,0,i-1);var s,r=[];for(s=0;s<i;s++){if(o[s]){r.push(t[s])}}return r}function Ti(t,e,i,n,o){var s=0,r,a,h;for(a=n+1;a<=o-1;a++){h=Zi(t[a],t[n],t[o],true);if(h>s){r=a;s=h}}if(s>i){e[r]=1;Ti(t,e,i,n,r);Ti(t,e,i,r,o)}}function zi(t,e){var i=[t[0]];for(var n=1,o=0,s=t.length;n<s;n++){if(Ei(t[n],t[o])>e){i.push(t[n]);o=n}}if(o<s-1){i.push(t[s-1])}return i}var Mi;function Ci(t,e,i,n,o){var s=n?Mi:ki(t,i),r=ki(e,i),a,h,u;Mi=r;while(true){if(!(s|r)){return[t,e]}if(s&r){return false}a=s||r;h=Si(t,e,a,i,o);u=ki(h,i);if(a===s){t=h;s=u}else{e=h;r=u}}}function Si(t,e,i,n,o){var s=e.x-t.x,r=e.y-t.y,a=n.min,h=n.max,u,l;if(i&8){u=t.x+s*(h.y-t.y)/r;l=h.y}else if(i&4){u=t.x+s*(a.y-t.y)/r;l=a.y}else if(i&2){u=h.x;l=t.y+r*(h.x-t.x)/s}else if(i&1){u=a.x;l=t.y+r*(a.x-t.x)/s}return new B(u,l,o)}function ki(t,e){var i=0;if(t.x<e.min.x){i|=1}else if(t.x>e.max.x){i|=2}if(t.y<e.min.y){i|=4}else if(t.y>e.max.y){i|=8}return i}function Ei(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Zi(t,e,i,n){var o=e.x,s=e.y,r=i.x-o,a=i.y-s,h=r*r+a*a,u;if(h>0){u=((t.x-o)*r+(t.y-s)*a)/h;if(u>1){o=i.x;s=i.y}else if(u>0){o+=r*u;s+=a*u}}r=t.x-o;a=t.y-s;return n?r*r+a*a:new B(o,s)}function Ii(t){return!g(t[0])||babelHelpers["typeof"](t[0][0])!=="object"&&typeof t[0][0]!=="undefined"}function Bi(t){console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead.");return Ii(t)}var Ai=(Object.freeze||Object)({simplify:wi,pointToSegmentDistance:bi,closestPointOnSegment:Pi,clipSegment:Ci,_getEdgeIntersection:Si,_getBitCode:ki,_sqClosestPointOnSegment:Zi,isFlat:Ii,_flat:Bi});function Oi(t,e,i){var n,o=[1,4,2,8],s,r,a,h,u,l,c,f;for(s=0,l=t.length;s<l;s++){t[s]._code=ki(t[s],e)}for(a=0;a<4;a++){c=o[a];n=[];for(s=0,l=t.length,r=l-1;s<l;r=s++){h=t[s];u=t[r];if(!(h._code&c)){if(u._code&c){f=Si(u,h,c,e,i);f._code=ki(f,e);n.push(f)}n.push(h)}else if(!(u._code&c)){f=Si(u,h,c,e,i);f._code=ki(f,e);n.push(f)}}t=n}return t}var Ri=(Object.freeze||Object)({clipPolygon:Oi});var Ni={project:function t(e){return new B(e.lng,e.lat)},unproject:function t(e){return new H(e.y,e.x)},bounds:new R([-180,-90],[180,90])};var Di={R:6378137,R_MINOR:6356752.314245179,bounds:new R([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function t(e){var i=Math.PI/180,n=this.R,o=e.lat*i,s=this.R_MINOR/n,r=Math.sqrt(1-s*s),a=r*Math.sin(o);var h=Math.tan(Math.PI/4-o/2)/Math.pow((1-a)/(1+a),r/2);o=-n*Math.log(Math.max(h,1e-10));return new B(e.lng*i*n,o)},unproject:function t(e){var i=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-e.y/n),a=Math.PI/2-2*Math.atan(r);for(var h=0,u=.1,l;h<15&&Math.abs(u)>1e-7;h++){l=s*Math.sin(a);l=Math.pow((1-l)/(1+l),s/2);u=Math.PI/2-2*Math.atan(r*l)-a;a+=u}return new H(a*i,e.x*i/n)}};var ji=(Object.freeze||Object)({LonLat:Ni,Mercator:Di,SphericalMercator:V});var Hi=n({},U,{code:"EPSG:3395",projection:Di,transformation:function(){var t=.5/(Math.PI*Di.R);return K(t,.5,-t,.5)}()});var Wi=n({},U,{code:"EPSG:4326",projection:Ni,transformation:K(1/180,1,-1/180,.5)});var Fi=n({},F,{projection:Ni,transformation:K(1,0,-1,0),scale:function t(e){return Math.pow(2,e)},zoom:function t(e){return Math.log(e)/Math.LN2},distance:function t(e,i){var n=i.lng-e.lng,o=i.lat-e.lat;return Math.sqrt(n*n+o*o)},infinite:true});F.Earth=U;F.EPSG3395=Hi;F.EPSG3857=Y;F.EPSG900913=X;F.EPSG4326=Wi;F.Simple=Fi;var Ui=I.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:true},addTo:function t(e){e.addLayer(this);return this},remove:function t(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function t(e){if(e){e.removeLayer(this)}return this},getPane:function t(e){return this._map.getPane(e?this.options[e]||e:this.options.pane)},addInteractiveTarget:function t(e){this._map._targets[a(e)]=this;return this},removeInteractiveTarget:function t(e){delete this._map._targets[a(e)];return this},getAttribution:function t(){return this.options.attribution},_layerAdd:function t(e){var i=e.target;if(!i.hasLayer(this)){return}this._map=i;this._zoomAnimated=i._zoomAnimated;if(this.getEvents){var n=this.getEvents();i.on(n,this);this.once("remove",(function(){i.off(n,this)}),this)}this.onAdd(i);if(this.getAttribution&&i.attributionControl){i.attributionControl.addAttribution(this.getAttribution())}this.fire("add");i.fire("layeradd",{layer:this})}});ni.include({addLayer:function t(e){if(!e._layerAdd){throw new Error("The provided object is not a Layer.")}var i=a(e);if(this._layers[i]){return this}this._layers[i]=e;e._mapToAdd=this;if(e.beforeAdd){e.beforeAdd(this)}this.whenReady(e._layerAdd,e);return this},removeLayer:function t(e){var i=a(e);if(!this._layers[i]){return this}if(this._loaded){e.onRemove(this)}if(e.getAttribution&&this.attributionControl){this.attributionControl.removeAttribution(e.getAttribution())}delete this._layers[i];if(this._loaded){this.fire("layerremove",{layer:e});e.fire("remove")}e._map=e._mapToAdd=null;return this},hasLayer:function t(e){return!!e&&a(e)in this._layers},eachLayer:function t(e,i){for(var n in this._layers){e.call(i,this._layers[n])}return this},_addLayers:function t(e){e=e?g(e)?e:[e]:[];for(var i=0,n=e.length;i<n;i++){this.addLayer(e[i])}},_addZoomLimit:function t(e){if(isNaN(e.options.maxZoom)||!isNaN(e.options.minZoom)){this._zoomBoundLayers[a(e)]=e;this._updateZoomLevels()}},_removeZoomLimit:function t(e){var i=a(e);if(this._zoomBoundLayers[i]){delete this._zoomBoundLayers[i];this._updateZoomLevels()}},_updateZoomLevels:function t(){var e=Infinity,i=-Infinity,n=this._getZoomSpan();for(var o in this._zoomBoundLayers){var s=this._zoomBoundLayers[o].options;e=s.minZoom===undefined?e:Math.min(e,s.minZoom);i=s.maxZoom===undefined?i:Math.max(i,s.maxZoom)}this._layersMaxZoom=i===-Infinity?undefined:i;this._layersMinZoom=e===Infinity?undefined:e;if(n!==this._getZoomSpan()){this.fire("zoomlevelschange")}if(this.options.maxZoom===undefined&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom){this.setZoom(this._layersMaxZoom)}if(this.options.minZoom===undefined&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom){this.setZoom(this._layersMinZoom)}}});var Gi=Ui.extend({initialize:function t(e,i){_(this,i);this._layers={};var n,o;if(e){for(n=0,o=e.length;n<o;n++){this.addLayer(e[n])}}},addLayer:function t(e){var i=this.getLayerId(e);this._layers[i]=e;if(this._map){this._map.addLayer(e)}return this},removeLayer:function t(e){var i=e in this._layers?e:this.getLayerId(e);if(this._map&&this._layers[i]){this._map.removeLayer(this._layers[i])}delete this._layers[i];return this},hasLayer:function t(e){return!!e&&(e in this._layers||this.getLayerId(e)in this._layers)},clearLayers:function t(){return this.eachLayer(this.removeLayer,this)},invoke:function t(e){var i=Array.prototype.slice.call(arguments,1),n,o;for(n in this._layers){o=this._layers[n];if(o[e]){o[e].apply(o,i)}}return this},onAdd:function t(e){this.eachLayer(e.addLayer,e)},onRemove:function t(e){this.eachLayer(e.removeLayer,e)},eachLayer:function t(e,i){for(var n in this._layers){e.call(i,this._layers[n])}return this},getLayer:function t(e){return this._layers[e]},getLayers:function t(){var e=[];this.eachLayer(e.push,e);return e},setZIndex:function t(e){return this.invoke("setZIndex",e)},getLayerId:function t(e){return a(e)}});var Vi=function t(e,i){return new Gi(e,i)};var qi=Gi.extend({addLayer:function t(e){if(this.hasLayer(e)){return this}e.addEventParent(this);Gi.prototype.addLayer.call(this,e);return this.fire("layeradd",{layer:e})},removeLayer:function t(e){if(!this.hasLayer(e)){return this}if(e in this._layers){e=this._layers[e]}e.removeEventParent(this);Gi.prototype.removeLayer.call(this,e);return this.fire("layerremove",{layer:e})},setStyle:function t(e){return this.invoke("setStyle",e)},bringToFront:function t(){return this.invoke("bringToFront")},bringToBack:function t(){return this.invoke("bringToBack")},getBounds:function t(){var e=new D;for(var i in this._layers){var n=this._layers[i];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}});var Ki=function t(e){return new qi(e)};var Yi=k.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function t(e){_(this,e)},createIcon:function t(e){return this._createIcon("icon",e)},createShadow:function t(e){return this._createIcon("shadow",e)},_createIcon:function t(e,i){var n=this._getIconUrl(e);if(!n){if(e==="icon"){throw new Error("iconUrl not set in Icon options (see the docs).")}return null}var o=this._createImg(n,i&&i.tagName==="IMG"?i:null);this._setIconStyles(o,e);return o},_setIconStyles:function t(e,i){var n=this.options;var o=n[i+"Size"];if(typeof o==="number"){o=[o,o]}var s=O(o),r=O(i==="shadow"&&n.shadowAnchor||n.iconAnchor||s&&s.divideBy(2,true));e.className="leaflet-marker-"+i+" "+(n.className||"");if(r){e.style.marginLeft=-r.x+"px";e.style.marginTop=-r.y+"px"}if(s){e.style.width=s.x+"px";e.style.height=s.y+"px"}},_createImg:function t(e,i){i=i||document.createElement("img");i.src=e;return i},_getIconUrl:function t(e){return Mt&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function Xi(t){return new Yi(t)}var Ji=Yi.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(e){if(!Ji.imagePath){Ji.imagePath=this._detectIconPath()}return(this.options.imagePath||Ji.imagePath)+Yi.prototype._getIconUrl.call(this,e)},_detectIconPath:function t(){var e=ae("div","leaflet-default-icon-path",document.body);var i=re(e,"background-image")||re(e,"backgroundImage");document.body.removeChild(e);if(i===null||i.indexOf("url")!==0){i=""}else{i=i.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}return i}});var $i=pi.extend({initialize:function t(e){this._marker=e},addHooks:function t(){var e=this._marker._icon;if(!this._draggable){this._draggable=new xi(e,e,true)}this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable();de(e,"leaflet-marker-draggable")},removeHooks:function t(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable();if(this._marker._icon){_e(this._marker._icon,"leaflet-marker-draggable")}},moved:function t(){return this._draggable&&this._draggable._moved},_adjustPan:function t(e){var i=this._marker,n=i._map,o=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,r=be(i._icon),a=n.getPixelBounds(),h=n.getPixelOrigin();var u=N(a.min._subtract(h).add(s),a.max._subtract(h).subtract(s));if(!u.contains(r)){var l=O((Math.max(u.max.x,r.x)-u.max.x)/(a.max.x-u.max.x)-(Math.min(u.min.x,r.x)-u.min.x)/(a.min.x-u.min.x),(Math.max(u.max.y,r.y)-u.max.y)/(a.max.y-u.max.y)-(Math.min(u.min.y,r.y)-u.min.y)/(a.min.y-u.min.y)).multiplyBy(o);n.panBy(l,{animate:false});this._draggable._newPos._add(l);this._draggable._startPos._add(l);we(i._icon,this._draggable._newPos);this._onDrag(e);this._panRequest=M(this._adjustPan.bind(this,e))}},_onDragStart:function t(){this._oldLatLng=this._marker.getLatLng();this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function t(e){if(this._marker.options.autoPan){C(this._panRequest);this._panRequest=M(this._adjustPan.bind(this,e))}},_onDrag:function t(e){var i=this._marker,n=i._shadow,o=be(i._icon),s=i._map.layerPointToLatLng(o);if(n){we(n,o)}i._latlng=s;e.latlng=s;e.oldLatLng=this._oldLatLng;i.fire("move",e).fire("drag",e)},_onDragEnd:function t(e){C(this._panRequest);delete this._oldLatLng;this._marker.fire("moveend").fire("dragend",e)}});var Qi=Ui.extend({options:{icon:new Ji,interactive:true,keyboard:true,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:false,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:false,draggable:false,autoPan:false,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function t(e,i){_(this,i);this._latlng=W(e)},onAdd:function t(e){this._zoomAnimated=this._zoomAnimated&&e.options.markerZoomAnimation;if(this._zoomAnimated){e.on("zoomanim",this._animateZoom,this)}this._initIcon();this.update()},onRemove:function t(e){if(this.dragging&&this.dragging.enabled()){this.options.draggable=true;this.dragging.removeHooks()}delete this.dragging;if(this._zoomAnimated){e.off("zoomanim",this._animateZoom,this)}this._removeIcon();this._removeShadow()},getEvents:function t(){return{zoom:this.update,viewreset:this.update}},getLatLng:function t(){return this._latlng},setLatLng:function t(e){var i=this._latlng;this._latlng=W(e);this.update();return this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function t(e){this.options.zIndexOffset=e;return this.update()},getIcon:function t(){return this.options.icon},setIcon:function t(e){this.options.icon=e;if(this._map){this._initIcon();this.update()}if(this._popup){this.bindPopup(this._popup,this._popup.options)}return this},getElement:function t(){return this._icon},update:function t(){if(this._icon&&this._map){var e=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(e)}return this},_initIcon:function t(){var e=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");var n=e.icon.createIcon(this._icon),o=false;if(n!==this._icon){if(this._icon){this._removeIcon()}o=true;if(e.title){n.title=e.title}if(n.tagName==="IMG"){n.alt=e.alt||""}}de(n,i);if(e.keyboard){n.tabIndex="0"}this._icon=n;if(e.riseOnHover){this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex})}var s=e.icon.createShadow(this._shadow),r=false;if(s!==this._shadow){this._removeShadow();r=true}if(s){de(s,i);s.alt=""}this._shadow=s;if(e.opacity<1){this._updateOpacity()}if(o){this.getPane().appendChild(this._icon)}this._initInteraction();if(s&&r){this.getPane(e.shadowPane).appendChild(this._shadow)}},_removeIcon:function t(){if(this.options.riseOnHover){this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex})}he(this._icon);this.removeInteractiveTarget(this._icon);this._icon=null},_removeShadow:function t(){if(this._shadow){he(this._shadow)}this._shadow=null},_setPos:function t(e){if(this._icon){we(this._icon,e)}if(this._shadow){we(this._shadow,e)}this._zIndex=e.y+this.options.zIndexOffset;this._resetZIndex()},_updateZIndex:function t(e){if(this._icon){this._icon.style.zIndex=this._zIndex+e}},_animateZoom:function t(e){var i=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center).round();this._setPos(i)},_initInteraction:function t(){if(!this.options.interactive){return}de(this._icon,"leaflet-interactive");this.addInteractiveTarget(this._icon);if($i){var e=this.options.draggable;if(this.dragging){e=this.dragging.enabled();this.dragging.disable()}this.dragging=new $i(this);if(e){this.dragging.enable()}}},setOpacity:function t(e){this.options.opacity=e;if(this._map){this._updateOpacity()}return this},_updateOpacity:function t(){var e=this.options.opacity;if(this._icon){ve(this._icon,e)}if(this._shadow){ve(this._shadow,e)}},_bringToFront:function t(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function t(){this._updateZIndex(0)},_getPopupAnchor:function t(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function t(){return this.options.icon.options.tooltipAnchor}});function tn(t,e){return new Qi(t,e)}var en=Ui.extend({options:{stroke:true,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:false,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:true,bubblingMouseEvents:true},beforeAdd:function t(e){this._renderer=e.getRenderer(this)},onAdd:function t(){this._renderer._initPath(this);this._reset();this._renderer._addPath(this)},onRemove:function t(){this._renderer._removePath(this)},redraw:function t(){if(this._map){this._renderer._updatePath(this)}return this},setStyle:function t(e){_(this,e);if(this._renderer){this._renderer._updateStyle(this);if(this.options.stroke&&e&&e.hasOwnProperty("weight")){this._updateBounds()}}return this},bringToFront:function t(){if(this._renderer){this._renderer._bringToFront(this)}return this},bringToBack:function t(){if(this._renderer){this._renderer._bringToBack(this)}return this},getElement:function t(){return this._path},_reset:function t(){this._project();this._update()},_clickTolerance:function t(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}});var nn=en.extend({options:{fill:true,radius:10},initialize:function t(e,i){_(this,i);this._latlng=W(e);this._radius=this.options.radius},setLatLng:function t(e){var i=this._latlng;this._latlng=W(e);this.redraw();return this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function t(){return this._latlng},setRadius:function t(e){this.options.radius=this._radius=e;return this.redraw()},getRadius:function t(){return this._radius},setStyle:function t(e){var i=e&&e.radius||this._radius;en.prototype.setStyle.call(this,e);this.setRadius(i);return this},_project:function t(){this._point=this._map.latLngToLayerPoint(this._latlng);this._updateBounds()},_updateBounds:function t(){var e=this._radius,i=this._radiusY||e,n=this._clickTolerance(),o=[e+n,i+n];this._pxBounds=new R(this._point.subtract(o),this._point.add(o))},_update:function t(){if(this._map){this._updatePath()}},_updatePath:function t(){this._renderer._updateCircle(this)},_empty:function t(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function t(e){return e.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function on(t,e){return new nn(t,e)}var sn=nn.extend({initialize:function t(e,i,o){if(typeof i==="number"){i=n({},o,{radius:i})}_(this,i);this._latlng=W(e);if(isNaN(this.options.radius)){throw new Error("Circle radius cannot be NaN")}this._mRadius=this.options.radius},setRadius:function t(e){this._mRadius=e;return this.redraw()},getRadius:function t(){return this._mRadius},getBounds:function t(){var e=[this._radius,this._radiusY||this._radius];return new D(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:en.prototype.setStyle,_project:function t(){var e=this._latlng.lng,i=this._latlng.lat,n=this._map,o=n.options.crs;if(o.distance===U.distance){var s=Math.PI/180,r=this._mRadius/U.R/s,a=n.project([i+r,e]),h=n.project([i-r,e]),u=a.add(h).divideBy(2),l=n.unproject(u).lat,c=Math.acos((Math.cos(r*s)-Math.sin(i*s)*Math.sin(l*s))/(Math.cos(i*s)*Math.cos(l*s)))/s;if(isNaN(c)||c===0){c=r/Math.cos(Math.PI/180*i)}this._point=u.subtract(n.getPixelOrigin());this._radius=isNaN(c)?0:u.x-n.project([l,e-c]).x;this._radiusY=u.y-a.y}else{var f=o.unproject(o.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng);this._radius=this._point.x-n.latLngToLayerPoint(f).x}this._updateBounds()}});function rn(t,e,i){return new sn(t,e,i)}var an=en.extend({options:{smoothFactor:1,noClip:false},initialize:function t(e,i){_(this,i);this._setLatLngs(e)},getLatLngs:function t(){return this._latlngs},setLatLngs:function t(e){this._setLatLngs(e);return this.redraw()},isEmpty:function t(){return!this._latlngs.length},closestLayerPoint:function t(e){var i=Infinity,n=null,o=Zi,s,r;for(var a=0,h=this._parts.length;a<h;a++){var u=this._parts[a];for(var l=1,c=u.length;l<c;l++){s=u[l-1];r=u[l];var f=o(e,s,r,true);if(f<i){i=f;n=o(e,s,r)}}}if(n){n.distance=Math.sqrt(i)}return n},getCenter:function t(){if(!this._map){throw new Error("Must add layer to map before using getCenter()")}var e,i,n,o,s,r,a,h=this._rings[0],u=h.length;if(!u){return null}for(e=0,i=0;e<u-1;e++){i+=h[e].distanceTo(h[e+1])/2}if(i===0){return this._map.layerPointToLatLng(h[0])}for(e=0,o=0;e<u-1;e++){s=h[e];r=h[e+1];n=s.distanceTo(r);o+=n;if(o>i){a=(o-i)/n;return this._map.layerPointToLatLng([r.x-a*(r.x-s.x),r.y-a*(r.y-s.y)])}}},getBounds:function t(){return this._bounds},addLatLng:function t(e,i){i=i||this._defaultShape();e=W(e);i.push(e);this._bounds.extend(e);return this.redraw()},_setLatLngs:function t(e){this._bounds=new D;this._latlngs=this._convertLatLngs(e)},_defaultShape:function t(){return Ii(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function t(e){var i=[],n=Ii(e);for(var o=0,s=e.length;o<s;o++){if(n){i[o]=W(e[o]);this._bounds.extend(i[o])}else{i[o]=this._convertLatLngs(e[o])}}return i},_project:function t(){var e=new R;this._rings=[];this._projectLatlngs(this._latlngs,this._rings,e);if(this._bounds.isValid()&&e.isValid()){this._rawPxBounds=e;this._updateBounds()}},_updateBounds:function t(){var e=this._clickTolerance(),i=new B(e,e);this._pxBounds=new R([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)])},_projectLatlngs:function t(e,i,n){var o=e[0]instanceof H,s=e.length,r,a;if(o){a=[];for(r=0;r<s;r++){a[r]=this._map.latLngToLayerPoint(e[r]);n.extend(a[r])}i.push(a)}else{for(r=0;r<s;r++){this._projectLatlngs(e[r],i,n)}}},_clipPoints:function t(){var e=this._renderer._bounds;this._parts=[];if(!this._pxBounds||!this._pxBounds.intersects(e)){return}if(this.options.noClip){this._parts=this._rings;return}var i=this._parts,n,o,s,r,a,h,u;for(n=0,s=0,r=this._rings.length;n<r;n++){u=this._rings[n];for(o=0,a=u.length;o<a-1;o++){h=Ci(u[o],u[o+1],e,o,true);if(!h){continue}i[s]=i[s]||[];i[s].push(h[0]);if(h[1]!==u[o+1]||o===a-2){i[s].push(h[1]);s++}}}},_simplifyPoints:function t(){var e=this._parts,i=this.options.smoothFactor;for(var n=0,o=e.length;n<o;n++){e[n]=wi(e[n],i)}},_update:function t(){if(!this._map){return}this._clipPoints();this._simplifyPoints();this._updatePath()},_updatePath:function t(){this._renderer._updatePoly(this)},_containsPoint:function t(e,i){var n,o,s,r,a,h,u=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e)){return false}for(n=0,r=this._parts.length;n<r;n++){h=this._parts[n];for(o=0,a=h.length,s=a-1;o<a;s=o++){if(!i&&o===0){continue}if(bi(e,h[s],h[o])<=u){return true}}}return false}});function hn(t,e){return new an(t,e)}an._flat=Bi;var un=an.extend({options:{fill:true},isEmpty:function t(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function t(){if(!this._map){throw new Error("Must add layer to map before using getCenter()")}var e,i,n,o,s,r,a,h,u,l=this._rings[0],c=l.length;if(!c){return null}r=a=h=0;for(e=0,i=c-1;e<c;i=e++){n=l[e];o=l[i];s=n.y*o.x-o.y*n.x;a+=(n.x+o.x)*s;h+=(n.y+o.y)*s;r+=s*3}if(r===0){u=l[0]}else{u=[a/r,h/r]}return this._map.layerPointToLatLng(u)},_convertLatLngs:function t(e){var i=an.prototype._convertLatLngs.call(this,e),n=i.length;if(n>=2&&i[0]instanceof H&&i[0].equals(i[n-1])){i.pop()}return i},_setLatLngs:function t(e){an.prototype._setLatLngs.call(this,e);if(Ii(this._latlngs)){this._latlngs=[this._latlngs]}},_defaultShape:function t(){return Ii(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function t(){var e=this._renderer._bounds,i=this.options.weight,n=new B(i,i);e=new R(e.min.subtract(n),e.max.add(n));this._parts=[];if(!this._pxBounds||!this._pxBounds.intersects(e)){return}if(this.options.noClip){this._parts=this._rings;return}for(var o=0,s=this._rings.length,r;o<s;o++){r=Oi(this._rings[o],e,true);if(r.length){this._parts.push(r)}}},_updatePath:function t(){this._renderer._updatePoly(this,true)},_containsPoint:function t(e){var i=false,n,o,s,r,a,h,u,l;if(!this._pxBounds||!this._pxBounds.contains(e)){return false}for(r=0,u=this._parts.length;r<u;r++){n=this._parts[r];for(a=0,l=n.length,h=l-1;a<l;h=a++){o=n[a];s=n[h];if(o.y>e.y!==s.y>e.y&&e.x<(s.x-o.x)*(e.y-o.y)/(s.y-o.y)+o.x){i=!i}}}return i||an.prototype._containsPoint.call(this,e,true)}});function ln(t,e){return new un(t,e)}var cn=qi.extend({initialize:function t(e,i){_(this,i);this._layers={};if(e){this.addData(e)}},addData:function t(e){var i=g(e)?e:e.features,n,o,s;if(i){for(n=0,o=i.length;n<o;n++){s=i[n];if(s.geometries||s.geometry||s.features||s.coordinates){this.addData(s)}}return this}var r=this.options;if(r.filter&&!r.filter(e)){return this}var a=fn(e,r);if(!a){return this}a.feature=yn(e);a.defaultOptions=a.options;this.resetStyle(a);if(r.onEachFeature){r.onEachFeature(e,a)}return this.addLayer(a)},resetStyle:function t(e){if(e===undefined){return this.eachLayer(this.resetStyle,this)}e.options=n({},e.defaultOptions);this._setLayerStyle(e,this.options.style);return this},setStyle:function t(e){return this.eachLayer((function(t){this._setLayerStyle(t,e)}),this)},_setLayerStyle:function t(e,i){if(e.setStyle){if(typeof i==="function"){i=i(e.feature)}e.setStyle(i)}}});function fn(t,e){var i=t.type==="Feature"?t.geometry:t,n=i?i.coordinates:null,o=[],s=e&&e.pointToLayer,r=e&&e.coordsToLatLng||_n,a,h,u,l;if(!n&&!i){return null}switch(i.type){case"Point":a=r(n);return dn(s,t,a,e);case"MultiPoint":for(u=0,l=n.length;u<l;u++){a=r(n[u]);o.push(dn(s,t,a,e))}return new qi(o);case"LineString":case"MultiLineString":h=pn(n,i.type==="LineString"?0:1,r);return new an(h,e);case"Polygon":case"MultiPolygon":h=pn(n,i.type==="Polygon"?1:2,r);return new un(h,e);case"GeometryCollection":for(u=0,l=i.geometries.length;u<l;u++){var c=fn({geometry:i.geometries[u],type:"Feature",properties:t.properties},e);if(c){o.push(c)}}return new qi(o);default:throw new Error("Invalid GeoJSON object.")}}function dn(t,e,i,n){return t?t(e,i):new Qi(i,n&&n.markersInheritOptions&&n)}function _n(t){return new H(t[1],t[0],t[2])}function pn(t,e,i){var n=[];for(var o=0,s=t.length,r;o<s;o++){r=e?pn(t[o],e-1,i):(i||_n)(t[o]);n.push(r)}return n}function mn(t,e){e=typeof e==="number"?e:6;return t.alt!==undefined?[c(t.lng,e),c(t.lat,e),c(t.alt,e)]:[c(t.lng,e),c(t.lat,e)]}function vn(t,e,i,n){var o=[];for(var s=0,r=t.length;s<r;s++){o.push(e?vn(t[s],e-1,i,n):mn(t[s],n))}if(!e&&i){o.push(o[0])}return o}function gn(t,e){return t.feature?n({},t.feature,{geometry:e}):yn(e)}function yn(t){if(t.type==="Feature"||t.type==="FeatureCollection"){return t}return{type:"Feature",properties:{},geometry:t}}var xn={toGeoJSON:function t(e){return gn(this,{type:"Point",coordinates:mn(this.getLatLng(),e)})}};Qi.include(xn);sn.include(xn);nn.include(xn);an.include({toGeoJSON:function t(e){var i=!Ii(this._latlngs);var n=vn(this._latlngs,i?1:0,false,e);return gn(this,{type:(i?"Multi":"")+"LineString",coordinates:n})}});un.include({toGeoJSON:function t(e){var i=!Ii(this._latlngs),n=i&&!Ii(this._latlngs[0]);var o=vn(this._latlngs,n?2:i?1:0,true,e);if(!i){o=[o]}return gn(this,{type:(n?"Multi":"")+"Polygon",coordinates:o})}});Gi.include({toMultiPoint:function t(e){var i=[];this.eachLayer((function(t){i.push(t.toGeoJSON(e).geometry.coordinates)}));return gn(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function t(e){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(i==="MultiPoint"){return this.toMultiPoint(e)}var n=i==="GeometryCollection",o=[];this.eachLayer((function(t){if(t.toGeoJSON){var i=t.toGeoJSON(e);if(n){o.push(i.geometry)}else{var s=yn(i);if(s.type==="FeatureCollection"){o.push.apply(o,s.features)}else{o.push(s)}}}}));if(n){return gn(this,{geometries:o,type:"GeometryCollection"})}return{type:"FeatureCollection",features:o}}});function wn(t,e){return new cn(t,e)}var bn=wn;var Pn=Ui.extend({options:{opacity:1,alt:"",interactive:false,crossOrigin:false,errorOverlayUrl:"",zIndex:1,className:""},initialize:function t(e,i,n){this._url=e;this._bounds=j(i);_(this,n)},onAdd:function t(){if(!this._image){this._initImage();if(this.options.opacity<1){this._updateOpacity()}}if(this.options.interactive){de(this._image,"leaflet-interactive");this.addInteractiveTarget(this._image)}this.getPane().appendChild(this._image);this._reset()},onRemove:function t(){he(this._image);if(this.options.interactive){this.removeInteractiveTarget(this._image)}},setOpacity:function t(e){this.options.opacity=e;if(this._image){this._updateOpacity()}return this},setStyle:function t(e){if(e.opacity){this.setOpacity(e.opacity)}return this},bringToFront:function t(){if(this._map){le(this._image)}return this},bringToBack:function t(){if(this._map){ce(this._image)}return this},setUrl:function t(e){this._url=e;if(this._image){this._image.src=e}return this},setBounds:function t(e){this._bounds=j(e);if(this._map){this._reset()}return this},getEvents:function t(){var e={zoom:this._reset,viewreset:this._reset};if(this._zoomAnimated){e.zoomanim=this._animateZoom}return e},setZIndex:function t(e){this.options.zIndex=e;this._updateZIndex();return this},getBounds:function t(){return this._bounds},getElement:function t(){return this._image},_initImage:function t(){var e=this._url.tagName==="IMG";var i=this._image=e?this._url:ae("img");de(i,"leaflet-image-layer");if(this._zoomAnimated){de(i,"leaflet-zoom-animated")}if(this.options.className){de(i,this.options.className)}i.onselectstart=l;i.onmousemove=l;i.onload=s(this.fire,this,"load");i.onerror=s(this._overlayOnError,this,"error");if(this.options.crossOrigin||this.options.crossOrigin===""){i.crossOrigin=this.options.crossOrigin===true?"":this.options.crossOrigin}if(this.options.zIndex){this._updateZIndex()}if(e){this._url=i.src;return}i.src=this._url;i.alt=this.options.alt},_animateZoom:function t(e){var i=this._map.getZoomScale(e.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,e.zoom,e.center).min;xe(this._image,n,i)},_reset:function t(){var e=this._image,i=new R(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=i.getSize();we(e,i.min);e.style.width=n.x+"px";e.style.height=n.y+"px"},_updateOpacity:function t(){ve(this._image,this.options.opacity)},_updateZIndex:function t(){if(this._image&&this.options.zIndex!==undefined&&this.options.zIndex!==null){this._image.style.zIndex=this.options.zIndex}},_overlayOnError:function t(){this.fire("error");var e=this.options.errorOverlayUrl;if(e&&this._url!==e){this._url=e;this._image.src=e}}});var Ln=function t(e,i,n){return new Pn(e,i,n)};var Tn=Pn.extend({options:{autoplay:true,loop:true,keepAspectRatio:true},_initImage:function t(){var e=this._url.tagName==="VIDEO";var i=this._image=e?this._url:ae("video");de(i,"leaflet-image-layer");if(this._zoomAnimated){de(i,"leaflet-zoom-animated")}if(this.options.className){de(i,this.options.className)}i.onselectstart=l;i.onmousemove=l;i.onloadeddata=s(this.fire,this,"load");if(e){var n=i.getElementsByTagName("source");var o=[];for(var r=0;r<n.length;r++){o.push(n[r].src)}this._url=n.length>0?o:[i.src];return}if(!g(this._url)){this._url=[this._url]}if(!this.options.keepAspectRatio&&i.style.hasOwnProperty("objectFit")){i.style["objectFit"]="fill"}i.autoplay=!!this.options.autoplay;i.loop=!!this.options.loop;for(var a=0;a<this._url.length;a++){var h=ae("source");h.src=this._url[a];i.appendChild(h)}}});function zn(t,e,i){return new Tn(t,e,i)}var Mn=Pn.extend({_initImage:function t(){var e=this._image=this._url;de(e,"leaflet-image-layer");if(this._zoomAnimated){de(e,"leaflet-zoom-animated")}if(this.options.className){de(e,this.options.className)}e.onselectstart=l;e.onmousemove=l}});function Cn(t,e,i){return new Mn(t,e,i)}var Sn=Ui.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function t(e,i){_(this,e);this._source=i},onAdd:function t(e){this._zoomAnimated=e._zoomAnimated;if(!this._container){this._initLayout()}if(e._fadeAnimated){ve(this._container,0)}clearTimeout(this._removeTimeout);this.getPane().appendChild(this._container);this.update();if(e._fadeAnimated){ve(this._container,1)}this.bringToFront()},onRemove:function t(e){if(e._fadeAnimated){ve(this._container,0);this._removeTimeout=setTimeout(s(he,undefined,this._container),200)}else{he(this._container)}},getLatLng:function t(){return this._latlng},setLatLng:function t(e){this._latlng=W(e);if(this._map){this._updatePosition();this._adjustPan()}return this},getContent:function t(){return this._content},setContent:function t(e){this._content=e;this.update();return this},getElement:function t(){return this._container},update:function t(){if(!this._map){return}this._container.style.visibility="hidden";this._updateContent();this._updateLayout();this._updatePosition();this._container.style.visibility="";this._adjustPan()},getEvents:function t(){var e={zoom:this._updatePosition,viewreset:this._updatePosition};if(this._zoomAnimated){e.zoomanim=this._animateZoom}return e},isOpen:function t(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function t(){if(this._map){le(this._container)}return this},bringToBack:function t(){if(this._map){ce(this._container)}return this},_prepareOpen:function t(e,i,n){if(!(i instanceof Ui)){n=i;i=e}if(i instanceof qi){for(var o in e._layers){i=e._layers[o];break}}if(!n){if(i.getCenter){n=i.getCenter()}else if(i.getLatLng){n=i.getLatLng()}else{throw new Error("Unable to get source layer LatLng.")}}this._source=i;this.update();return n},_updateContent:function t(){if(!this._content){return}var e=this._contentNode;var i=typeof this._content==="function"?this._content(this._source||this):this._content;if(typeof i==="string"){e.innerHTML=i}else{while(e.hasChildNodes()){e.removeChild(e.firstChild)}e.appendChild(i)}this.fire("contentupdate")},_updatePosition:function t(){if(!this._map){return}var e=this._map.latLngToLayerPoint(this._latlng),i=O(this.options.offset),n=this._getAnchor();if(this._zoomAnimated){we(this._container,e.add(n))}else{i=i.add(e).add(n)}var o=this._containerBottom=-i.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=o+"px";this._container.style.left=s+"px"},_getAnchor:function t(){return[0,0]}});var kn=Sn.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:true,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:false,closeButton:true,autoClose:true,closeOnEscapeKey:true,className:""},openOn:function t(e){e.openPopup(this);return this},onAdd:function t(e){Sn.prototype.onAdd.call(this,e);e.fire("popupopen",{popup:this});if(this._source){this._source.fire("popupopen",{popup:this},true);if(!(this._source instanceof en)){this._source.on("preclick",He)}}},onRemove:function t(e){Sn.prototype.onRemove.call(this,e);e.fire("popupclose",{popup:this});if(this._source){this._source.fire("popupclose",{popup:this},true);if(!(this._source instanceof en)){this._source.off("preclick",He)}}},getEvents:function t(){var e=Sn.prototype.getEvents.call(this);if(this.options.closeOnClick!==undefined?this.options.closeOnClick:this._map.options.closePopupOnClick){e.preclick=this._close}if(this.options.keepInView){e.moveend=this._adjustPan}return e},_close:function t(){if(this._map){this._map.closePopup(this)}},_initLayout:function t(){var e="leaflet-popup",i=this._container=ae("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated");var n=this._wrapper=ae("div",e+"-content-wrapper",i);this._contentNode=ae("div",e+"-content",n);Fe(n);We(this._contentNode);Oe(n,"contextmenu",He);this._tipContainer=ae("div",e+"-tip-container",i);this._tip=ae("div",e+"-tip",this._tipContainer);if(this.options.closeButton){var o=this._closeButton=ae("a",e+"-close-button",i);o.href="#close";o.innerHTML="×";Oe(o,"click",this._onCloseButtonClick,this)}},_updateLayout:function t(){var e=this._contentNode,i=e.style;i.width="";i.whiteSpace="nowrap";var n=e.offsetWidth;n=Math.min(n,this.options.maxWidth);n=Math.max(n,this.options.minWidth);i.width=n+1+"px";i.whiteSpace="";i.height="";var o=e.offsetHeight,s=this.options.maxHeight,r="leaflet-popup-scrolled";if(s&&o>s){i.height=s+"px";de(e,r)}else{_e(e,r)}this._containerWidth=this._container.offsetWidth},_animateZoom:function t(e){var i=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();we(this._container,i.add(n))},_adjustPan:function t(){if(!this.options.autoPan){return}if(this._map._panAnim){this._map._panAnim.stop()}var e=this._map,i=parseInt(re(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+i,o=this._containerWidth,s=new B(this._containerLeft,-n-this._containerBottom);s._add(be(this._container));var r=e.layerPointToContainerPoint(s),a=O(this.options.autoPanPadding),h=O(this.options.autoPanPaddingTopLeft||a),u=O(this.options.autoPanPaddingBottomRight||a),l=e.getSize(),c=0,f=0;if(r.x+o+u.x>l.x){c=r.x+o-l.x+u.x}if(r.x-c-h.x<0){c=r.x-h.x}if(r.y+n+u.y>l.y){f=r.y+n-l.y+u.y}if(r.y-f-h.y<0){f=r.y-h.y}if(c||f){e.fire("autopanstart").panBy([c,f])}},_onCloseButtonClick:function t(e){this._close();Ge(e)},_getAnchor:function t(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});var En=function t(e,i){return new kn(e,i)};ni.mergeOptions({closePopupOnClick:true});ni.include({openPopup:function t(e,i,n){if(!(e instanceof kn)){e=new kn(n).setContent(e)}if(i){e.setLatLng(i)}if(this.hasLayer(e)){return this}if(this._popup&&this._popup.options.autoClose){this.closePopup()}this._popup=e;return this.addLayer(e)},closePopup:function t(e){if(!e||e===this._popup){e=this._popup;this._popup=null}if(e){this.removeLayer(e)}return this}});Ui.include({bindPopup:function t(e,i){if(e instanceof kn){_(e,i);this._popup=e;e._source=this}else{if(!this._popup||i){this._popup=new kn(i,this)}this._popup.setContent(e)}if(!this._popupHandlersAdded){this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=true}return this},unbindPopup:function t(){if(this._popup){this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup});this._popupHandlersAdded=false;this._popup=null}return this},openPopup:function t(e,i){if(this._popup&&this._map){i=this._popup._prepareOpen(this,e,i);this._map.openPopup(this._popup,i)}return this},closePopup:function t(){if(this._popup){this._popup._close()}return this},togglePopup:function t(e){if(this._popup){if(this._popup._map){this.closePopup()}else{this.openPopup(e)}}return this},isPopupOpen:function t(){return this._popup?this._popup.isOpen():false},setPopupContent:function t(e){if(this._popup){this._popup.setContent(e)}return this},getPopup:function t(){return this._popup},_openPopup:function t(e){var i=e.layer||e.target;if(!this._popup){return}if(!this._map){return}Ge(e);if(i instanceof en){this.openPopup(e.layer||e.target,e.latlng);return}if(this._map.hasLayer(this._popup)&&this._popup._source===i){this.closePopup()}else{this.openPopup(i,e.latlng)}},_movePopup:function t(e){this._popup.setLatLng(e.latlng)},_onKeyPress:function t(e){if(e.originalEvent.keyCode===13){this._openPopup(e)}}});var Zn=Sn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:false,sticky:false,interactive:false,opacity:.9},onAdd:function t(e){Sn.prototype.onAdd.call(this,e);this.setOpacity(this.options.opacity);e.fire("tooltipopen",{tooltip:this});if(this._source){this._source.fire("tooltipopen",{tooltip:this},true)}},onRemove:function t(e){Sn.prototype.onRemove.call(this,e);e.fire("tooltipclose",{tooltip:this});if(this._source){this._source.fire("tooltipclose",{tooltip:this},true)}},getEvents:function t(){var e=Sn.prototype.getEvents.call(this);if(Lt&&!this.options.permanent){e.preclick=this._close}return e},_close:function t(){if(this._map){this._map.closeTooltip(this)}},_initLayout:function t(){var e="leaflet-tooltip",i=e+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=ae("div",i)},_updateLayout:function t(){},_adjustPan:function t(){},_setPosition:function t(e){var i=this._map,n=this._container,o=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(e),r=this.options.direction,a=n.offsetWidth,h=n.offsetHeight,u=O(this.options.offset),l=this._getAnchor();if(r==="top"){e=e.add(O(-a/2+u.x,-h+u.y+l.y,true))}else if(r==="bottom"){e=e.subtract(O(a/2-u.x,-u.y,true))}else if(r==="center"){e=e.subtract(O(a/2+u.x,h/2-l.y+u.y,true))}else if(r==="right"||r==="auto"&&s.x<o.x){r="right";e=e.add(O(u.x+l.x,l.y-h/2+u.y,true))}else{r="left";e=e.subtract(O(a+l.x-u.x,h/2-l.y-u.y,true))}_e(n,"leaflet-tooltip-right");_e(n,"leaflet-tooltip-left");_e(n,"leaflet-tooltip-top");_e(n,"leaflet-tooltip-bottom");de(n,"leaflet-tooltip-"+r);we(n,e)},_updatePosition:function t(){var e=this._map.latLngToLayerPoint(this._latlng);this._setPosition(e)},setOpacity:function t(e){this.options.opacity=e;if(this._container){ve(this._container,e)}},_animateZoom:function t(e){var i=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center);this._setPosition(i)},_getAnchor:function t(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});var In=function t(e,i){return new Zn(e,i)};ni.include({openTooltip:function t(e,i,n){if(!(e instanceof Zn)){e=new Zn(n).setContent(e)}if(i){e.setLatLng(i)}if(this.hasLayer(e)){return this}return this.addLayer(e)},closeTooltip:function t(e){if(e){this.removeLayer(e)}return this}});Ui.include({bindTooltip:function t(e,i){if(e instanceof Zn){_(e,i);this._tooltip=e;e._source=this}else{if(!this._tooltip||i){this._tooltip=new Zn(i,this)}this._tooltip.setContent(e)}this._initTooltipInteractions();if(this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)){this.openTooltip()}return this},unbindTooltip:function t(){if(this._tooltip){this._initTooltipInteractions(true);this.closeTooltip();this._tooltip=null}return this},_initTooltipInteractions:function t(e){if(!e&&this._tooltipHandlersAdded){return}var i=e?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};if(!this._tooltip.options.permanent){n.mouseover=this._openTooltip;n.mouseout=this.closeTooltip;if(this._tooltip.options.sticky){n.mousemove=this._moveTooltip}if(Lt){n.click=this._openTooltip}}else{n.add=this._openTooltip}this[i](n);this._tooltipHandlersAdded=!e},openTooltip:function t(e,i){if(this._tooltip&&this._map){i=this._tooltip._prepareOpen(this,e,i);this._map.openTooltip(this._tooltip,i);if(this._tooltip.options.interactive&&this._tooltip._container){de(this._tooltip._container,"leaflet-clickable");this.addInteractiveTarget(this._tooltip._container)}}return this},closeTooltip:function t(){if(this._tooltip){this._tooltip._close();if(this._tooltip.options.interactive&&this._tooltip._container){_e(this._tooltip._container,"leaflet-clickable");this.removeInteractiveTarget(this._tooltip._container)}}return this},toggleTooltip:function t(e){if(this._tooltip){if(this._tooltip._map){this.closeTooltip()}else{this.openTooltip(e)}}return this},isTooltipOpen:function t(){return this._tooltip.isOpen()},setTooltipContent:function t(e){if(this._tooltip){this._tooltip.setContent(e)}return this},getTooltip:function t(){return this._tooltip},_openTooltip:function t(e){var i=e.layer||e.target;if(!this._tooltip||!this._map){return}this.openTooltip(i,this._tooltip.options.sticky?e.latlng:undefined)},_moveTooltip:function t(e){var i=e.latlng,n,o;if(this._tooltip.options.sticky&&e.originalEvent){n=this._map.mouseEventToContainerPoint(e.originalEvent);o=this._map.containerPointToLayerPoint(n);i=this._map.layerPointToLatLng(o)}this._tooltip.setLatLng(i)}});var Bn=Yi.extend({options:{iconSize:[12,12],html:false,bgPos:null,className:"leaflet-div-icon"},createIcon:function t(e){var i=e&&e.tagName==="DIV"?e:document.createElement("div"),n=this.options;if(n.html instanceof Element){ue(i);i.appendChild(n.html)}else{i.innerHTML=n.html!==false?n.html:""}if(n.bgPos){var o=O(n.bgPos);i.style.backgroundPosition=-o.x+"px "+-o.y+"px"}this._setIconStyles(i,"icon");return i},createShadow:function t(){return null}});function An(t){return new Bn(t)}Yi.Default=Ji;var On=Ui.extend({options:{tileSize:256,opacity:1,updateWhenIdle:yt,updateWhenZooming:true,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:undefined,maxNativeZoom:undefined,minNativeZoom:undefined,noWrap:false,pane:"tilePane",className:"",keepBuffer:2},initialize:function t(e){_(this,e)},onAdd:function t(){this._initContainer();this._levels={};this._tiles={};this._resetView();this._update()},beforeAdd:function t(e){e._addZoomLimit(this)},onRemove:function t(e){this._removeAllTiles();he(this._container);e._removeZoomLimit(this);this._container=null;this._tileZoom=undefined},bringToFront:function t(){if(this._map){le(this._container);this._setAutoZIndex(Math.max)}return this},bringToBack:function t(){if(this._map){ce(this._container);this._setAutoZIndex(Math.min)}return this},getContainer:function t(){return this._container},setOpacity:function t(e){this.options.opacity=e;this._updateOpacity();return this},setZIndex:function t(e){this.options.zIndex=e;this._updateZIndex();return this},isLoading:function t(){return this._loading},redraw:function t(){if(this._map){this._removeAllTiles();this._update()}return this},getEvents:function t(){var e={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};if(!this.options.updateWhenIdle){if(!this._onMove){this._onMove=h(this._onMoveEnd,this.options.updateInterval,this)}e.move=this._onMove}if(this._zoomAnimated){e.zoomanim=this._animateZoom}return e},createTile:function t(){return document.createElement("div")},getTileSize:function t(){var e=this.options.tileSize;return e instanceof B?e:new B(e,e)},_updateZIndex:function t(){if(this._container&&this.options.zIndex!==undefined&&this.options.zIndex!==null){this._container.style.zIndex=this.options.zIndex}},_setAutoZIndex:function t(e){var i=this.getPane().children,n=-e(-Infinity,Infinity);for(var o=0,s=i.length,r;o<s;o++){r=i[o].style.zIndex;if(i[o]!==this._container&&r){n=e(n,+r)}}if(isFinite(n)){this.options.zIndex=n+e(-1,1);this._updateZIndex()}},_updateOpacity:function t(){if(!this._map){return}if(et){return}ve(this._container,this.options.opacity);var e=+new Date,i=false,n=false;for(var o in this._tiles){var s=this._tiles[o];if(!s.current||!s.loaded){continue}var r=Math.min(1,(e-s.loaded)/200);ve(s.el,r);if(r<1){i=true}else{if(s.active){n=true}else{this._onOpaqueTile(s)}s.active=true}}if(n&&!this._noPrune){this._pruneTiles()}if(i){C(this._fadeFrame);this._fadeFrame=M(this._updateOpacity,this)}},_onOpaqueTile:l,_initContainer:function t(){if(this._container){return}this._container=ae("div","leaflet-layer "+(this.options.className||""));this._updateZIndex();if(this.options.opacity<1){this._updateOpacity()}this.getPane().appendChild(this._container)},_updateLevels:function t(){var e=this._tileZoom,i=this.options.maxZoom;if(e===undefined){return undefined}for(var n in this._levels){if(this._levels[n].el.children.length||n===e){this._levels[n].el.style.zIndex=i-Math.abs(e-n);this._onUpdateLevel(n)}else{he(this._levels[n].el);this._removeTilesAtZoom(n);this._onRemoveLevel(n);delete this._levels[n]}}var o=this._levels[e],s=this._map;if(!o){o=this._levels[e]={};o.el=ae("div","leaflet-tile-container leaflet-zoom-animated",this._container);o.el.style.zIndex=i;o.origin=s.project(s.unproject(s.getPixelOrigin()),e).round();o.zoom=e;this._setZoomTransform(o,s.getCenter(),s.getZoom());l(o.el.offsetWidth);this._onCreateLevel(o)}this._level=o;return o},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function t(){if(!this._map){return}var e,i;var n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom){this._removeAllTiles();return}for(e in this._tiles){i=this._tiles[e];i.retain=i.current}for(e in this._tiles){i=this._tiles[e];if(i.current&&!i.active){var o=i.coords;if(!this._retainParent(o.x,o.y,o.z,o.z-5)){this._retainChildren(o.x,o.y,o.z,o.z+2)}}}for(e in this._tiles){if(!this._tiles[e].retain){this._removeTile(e)}}},_removeTilesAtZoom:function t(e){for(var i in this._tiles){if(this._tiles[i].coords.z!==e){continue}this._removeTile(i)}},_removeAllTiles:function t(){for(var e in this._tiles){this._removeTile(e)}},_invalidateAll:function t(){for(var e in this._levels){he(this._levels[e].el);this._onRemoveLevel(e);delete this._levels[e]}this._removeAllTiles();this._tileZoom=undefined},_retainParent:function t(e,i,n,o){var s=Math.floor(e/2),r=Math.floor(i/2),a=n-1,h=new B(+s,+r);h.z=+a;var u=this._tileCoordsToKey(h),l=this._tiles[u];if(l&&l.active){l.retain=true;return true}else if(l&&l.loaded){l.retain=true}if(a>o){return this._retainParent(s,r,a,o)}return false},_retainChildren:function t(e,i,n,o){for(var s=2*e;s<2*e+2;s++){for(var r=2*i;r<2*i+2;r++){var a=new B(s,r);a.z=n+1;var h=this._tileCoordsToKey(a),u=this._tiles[h];if(u&&u.active){u.retain=true;continue}else if(u&&u.loaded){u.retain=true}if(n+1<o){this._retainChildren(s,r,n+1,o)}}}},_resetView:function t(e){var i=e&&(e.pinch||e.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function t(e){this._setView(e.center,e.zoom,true,e.noUpdate)},_clampZoom:function t(e){var i=this.options;if(undefined!==i.minNativeZoom&&e<i.minNativeZoom){return i.minNativeZoom}if(undefined!==i.maxNativeZoom&&i.maxNativeZoom<e){return i.maxNativeZoom}return e},_setView:function t(e,i,n,o){var s=this._clampZoom(Math.round(i));if(this.options.maxZoom!==undefined&&s>this.options.maxZoom||this.options.minZoom!==undefined&&s<this.options.minZoom){s=undefined}var r=this.options.updateWhenZooming&&s!==this._tileZoom;if(!o||r){this._tileZoom=s;if(this._abortLoading){this._abortLoading()}this._updateLevels();this._resetGrid();if(s!==undefined){this._update(e)}if(!n){this._pruneTiles()}this._noPrune=!!n}this._setZoomTransforms(e,i)},_setZoomTransforms:function t(e,i){for(var n in this._levels){this._setZoomTransform(this._levels[n],e,i)}},_setZoomTransform:function t(e,i,n){var o=this._map.getZoomScale(n,e.zoom),s=e.origin.multiplyBy(o).subtract(this._map._getNewPixelOrigin(i,n)).round();if(gt){xe(e.el,s,o)}else{we(e.el,s)}},_resetGrid:function t(){var e=this._map,i=e.options.crs,n=this._tileSize=this.getTileSize(),o=this._tileZoom;var s=this._map.getPixelWorldBounds(this._tileZoom);if(s){this._globalTileRange=this._pxBoundsToTileRange(s)}this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,i.wrapLng[0]],o).x/n.x),Math.ceil(e.project([0,i.wrapLng[1]],o).x/n.y)];this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([i.wrapLat[0],0],o).y/n.x),Math.ceil(e.project([i.wrapLat[1],0],o).y/n.y)]},_onMoveEnd:function t(){if(!this._map||this._map._animatingZoom){return}this._update()},_getTiledPixelBounds:function t(e){var i=this._map,n=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),o=i.getZoomScale(n,this._tileZoom),s=i.project(e,this._tileZoom).floor(),r=i.getSize().divideBy(o*2);return new R(s.subtract(r),s.add(r))},_update:function t(e){var i=this._map;if(!i){return}var n=this._clampZoom(i.getZoom());if(e===undefined){e=i.getCenter()}if(this._tileZoom===undefined){return}var o=this._getTiledPixelBounds(e),s=this._pxBoundsToTileRange(o),r=s.getCenter(),a=[],h=this.options.keepBuffer,u=new R(s.getBottomLeft().subtract([h,-h]),s.getTopRight().add([h,-h]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y))){throw new Error("Attempted to load an infinite number of tiles")}for(var l in this._tiles){var c=this._tiles[l].coords;if(c.z!==this._tileZoom||!u.contains(new B(c.x,c.y))){this._tiles[l].current=false}}if(Math.abs(n-this._tileZoom)>1){this._setView(e,n);return}for(var f=s.min.y;f<=s.max.y;f++){for(var d=s.min.x;d<=s.max.x;d++){var _=new B(d,f);_.z=this._tileZoom;if(!this._isValidTile(_)){continue}var p=this._tiles[this._tileCoordsToKey(_)];if(p){p.current=true}else{a.push(_)}}}a.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)}));if(a.length!==0){if(!this._loading){this._loading=true;this.fire("loading")}var m=document.createDocumentFragment();for(d=0;d<a.length;d++){this._addTile(a[d],m)}this._level.el.appendChild(m)}},_isValidTile:function t(e){var i=this._map.options.crs;if(!i.infinite){var n=this._globalTileRange;if(!i.wrapLng&&(e.x<n.min.x||e.x>n.max.x)||!i.wrapLat&&(e.y<n.min.y||e.y>n.max.y)){return false}}if(!this.options.bounds){return true}var o=this._tileCoordsToBounds(e);return j(this.options.bounds).overlaps(o)},_keyToBounds:function t(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function t(e){var i=this._map,n=this.getTileSize(),o=e.scaleBy(n),s=o.add(n),r=i.unproject(o,e.z),a=i.unproject(s,e.z);return[r,a]},_tileCoordsToBounds:function t(e){var i=this._tileCoordsToNwSe(e),n=new D(i[0],i[1]);if(!this.options.noWrap){n=this._map.wrapLatLngBounds(n)}return n},_tileCoordsToKey:function t(e){return e.x+":"+e.y+":"+e.z},_keyToTileCoords:function t(e){var i=e.split(":"),n=new B(+i[0],+i[1]);n.z=+i[2];return n},_removeTile:function t(e){var i=this._tiles[e];if(!i){return}he(i.el);delete this._tiles[e];this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(e)})},_initTile:function t(e){de(e,"leaflet-tile");var i=this.getTileSize();e.style.width=i.x+"px";e.style.height=i.y+"px";e.onselectstart=l;e.onmousemove=l;if(et&&this.options.opacity<1){ve(e,this.options.opacity)}if(ot&&!st){e.style.WebkitBackfaceVisibility="hidden"}},_addTile:function t(e,i){var n=this._getTilePos(e),o=this._tileCoordsToKey(e);var r=this.createTile(this._wrapCoords(e),s(this._tileReady,this,e));this._initTile(r);if(this.createTile.length<2){M(s(this._tileReady,this,e,null,r))}we(r,n);this._tiles[o]={el:r,coords:e,current:true};i.appendChild(r);this.fire("tileloadstart",{tile:r,coords:e})},_tileReady:function t(e,i,n){if(i){this.fire("tileerror",{error:i,tile:n,coords:e})}var o=this._tileCoordsToKey(e);n=this._tiles[o];if(!n){return}n.loaded=+new Date;if(this._map._fadeAnimated){ve(n.el,0);C(this._fadeFrame);this._fadeFrame=M(this._updateOpacity,this)}else{n.active=true;this._pruneTiles()}if(!i){de(n.el,"leaflet-tile-loaded");this.fire("tileload",{tile:n.el,coords:e})}if(this._noTilesToLoad()){this._loading=false;this.fire("load");if(et||!this._map._fadeAnimated){M(this._pruneTiles,this)}else{setTimeout(s(this._pruneTiles,this),250)}}},_getTilePos:function t(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function t(e){var i=new B(this._wrapX?u(e.x,this._wrapX):e.x,this._wrapY?u(e.y,this._wrapY):e.y);i.z=e.z;return i},_pxBoundsToTileRange:function t(e){var i=this.getTileSize();return new R(e.min.unscaleBy(i).floor(),e.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function t(){for(var e in this._tiles){if(!this._tiles[e].loaded){return false}}return true}});function Rn(t){return new On(t)}var Nn=On.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:false,zoomReverse:false,detectRetina:false,crossOrigin:false},initialize:function t(e,i){this._url=e;i=_(this,i);if(i.detectRetina&&Mt&&i.maxZoom>0){i.tileSize=Math.floor(i.tileSize/2);if(!i.zoomReverse){i.zoomOffset++;i.maxZoom--}else{i.zoomOffset--;i.minZoom++}i.minZoom=Math.max(0,i.minZoom)}if(typeof i.subdomains==="string"){i.subdomains=i.subdomains.split("")}if(!ot){this.on("tileunload",this._onTileRemove)}},setUrl:function t(e,i){if(this._url===e&&i===undefined){i=true}this._url=e;if(!i){this.redraw()}return this},createTile:function t(e,i){var n=document.createElement("img");Oe(n,"load",s(this._tileOnLoad,this,i,n));Oe(n,"error",s(this._tileOnError,this,i,n));if(this.options.crossOrigin||this.options.crossOrigin===""){n.crossOrigin=this.options.crossOrigin===true?"":this.options.crossOrigin}n.alt="";n.setAttribute("role","presentation");n.src=this.getTileUrl(e);return n},getTileUrl:function t(e){var i={r:Mt?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var o=this._globalTileRange.max.y-e.y;if(this.options.tms){i["y"]=o}i["-y"]=o}return v(this._url,n(i,this.options))},_tileOnLoad:function t(e,i){if(et){setTimeout(s(e,this,null,i),0)}else{e(null,i)}},_tileOnError:function t(e,i,n){var o=this.options.errorTileUrl;if(o&&i.getAttribute("src")!==o){i.src=o}e(n,i)},_onTileRemove:function t(e){e.tile.onload=null},_getZoomForUrl:function t(){var e=this._tileZoom,i=this.options.maxZoom,n=this.options.zoomReverse,o=this.options.zoomOffset;if(n){e=i-e}return e+o},_getSubdomain:function t(e){var i=Math.abs(e.x+e.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function t(){var e,i;for(e in this._tiles){if(this._tiles[e].coords.z!==this._tileZoom){i=this._tiles[e].el;i.onload=l;i.onerror=l;if(!i.complete){i.src=x;he(i);delete this._tiles[e]}}}},_removeTile:function t(e){var i=this._tiles[e];if(!i){return}if(!at){i.el.setAttribute("src",x)}return On.prototype._removeTile.call(this,e)},_tileReady:function t(e,i,n){if(!this._map||n&&n.getAttribute("src")===x){return}return On.prototype._tileReady.call(this,e,i,n)}});function Dn(t,e){return new Nn(t,e)}var jn=Nn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:false,version:"1.1.1"},options:{crs:null,uppercase:false},initialize:function t(e,i){this._url=e;var o=n({},this.defaultWmsParams);for(var s in i){if(!(s in this.options)){o[s]=i[s]}}i=_(this,i);var r=i.detectRetina&&Mt?2:1;var a=this.getTileSize();o.width=a.x*r;o.height=a.y*r;this.wmsParams=o},onAdd:function t(e){this._crs=this.options.crs||e.options.crs;this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code;Nn.prototype.onAdd.call(this,e)},getTileUrl:function t(e){var i=this._tileCoordsToNwSe(e),n=this._crs,o=N(n.project(i[0]),n.project(i[1])),s=o.min,r=o.max,a=(this._wmsVersion>=1.3&&this._crs===Wi?[s.y,s.x,r.y,r.x]:[s.x,s.y,r.x,r.y]).join(","),h=Nn.prototype.getTileUrl.call(this,e);return h+p(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function t(e,i){n(this.wmsParams,e);if(!i){this.redraw()}return this}});function Hn(t,e){return new jn(t,e)}Nn.WMS=jn;Dn.wms=Hn;var Wn=Ui.extend({options:{padding:.1,tolerance:0},initialize:function t(e){_(this,e);a(this);this._layers=this._layers||{}},onAdd:function t(){if(!this._container){this._initContainer();if(this._zoomAnimated){de(this._container,"leaflet-zoom-animated")}}this.getPane().appendChild(this._container);this._update();this.on("update",this._updatePaths,this)},onRemove:function t(){this.off("update",this._updatePaths,this);this._destroyContainer()},getEvents:function t(){var e={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};if(this._zoomAnimated){e.zoomanim=this._onAnimZoom}return e},_onAnimZoom:function t(e){this._updateTransform(e.center,e.zoom)},_onZoom:function t(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function t(e,i){var n=this._map.getZoomScale(i,this._zoom),o=be(this._container),s=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,i),a=this._map.project(e,i),h=a.subtract(r),u=s.multiplyBy(-n).add(o).add(s).subtract(h);if(gt){xe(this._container,u,n)}else{we(this._container,u)}},_reset:function t(){this._update();this._updateTransform(this._center,this._zoom);for(var e in this._layers){this._layers[e]._reset()}},_onZoomEnd:function t(){for(var e in this._layers){this._layers[e]._project()}},_updatePaths:function t(){for(var e in this._layers){this._layers[e]._update()}},_update:function t(){var e=this.options.padding,i=this._map.getSize(),n=this._map.containerPointToLayerPoint(i.multiplyBy(-e)).round();this._bounds=new R(n,n.add(i.multiplyBy(1+e*2)).round());this._center=this._map.getCenter();this._zoom=this._map.getZoom()}});var Fn=Wn.extend({getEvents:function t(){var e=Wn.prototype.getEvents.call(this);e.viewprereset=this._onViewPreReset;return e},_onViewPreReset:function t(){this._postponeUpdatePaths=true},onAdd:function t(){Wn.prototype.onAdd.call(this);this._draw()},_initContainer:function t(){var e=this._container=document.createElement("canvas");Oe(e,"mousemove",this._onMouseMove,this);Oe(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this);Oe(e,"mouseout",this._handleMouseOut,this);this._ctx=e.getContext("2d")},_destroyContainer:function t(){C(this._redrawRequest);delete this._ctx;he(this._container);Ne(this._container);delete this._container},_updatePaths:function t(){if(this._postponeUpdatePaths){return}var e;this._redrawBounds=null;for(var i in this._layers){e=this._layers[i];e._update()}this._redraw()},_update:function t(){if(this._map._animatingZoom&&this._bounds){return}Wn.prototype._update.call(this);var e=this._bounds,i=this._container,n=e.getSize(),o=Mt?2:1;we(i,e.min);i.width=o*n.x;i.height=o*n.y;i.style.width=n.x+"px";i.style.height=n.y+"px";if(Mt){this._ctx.scale(2,2)}this._ctx.translate(-e.min.x,-e.min.y);this.fire("update")},_reset:function t(){Wn.prototype._reset.call(this);if(this._postponeUpdatePaths){this._postponeUpdatePaths=false;this._updatePaths()}},_initPath:function t(e){this._updateDashArray(e);this._layers[a(e)]=e;var i=e._order={layer:e,prev:this._drawLast,next:null};if(this._drawLast){this._drawLast.next=i}this._drawLast=i;this._drawFirst=this._drawFirst||this._drawLast},_addPath:function t(e){this._requestRedraw(e)},_removePath:function t(e){var i=e._order;var n=i.next;var o=i.prev;if(n){n.prev=o}else{this._drawLast=o}if(o){o.next=n}else{this._drawFirst=n}delete e._order;delete this._layers[a(e)];this._requestRedraw(e)},_updatePath:function t(e){this._extendRedrawBounds(e);e._project();e._update();this._requestRedraw(e)},_updateStyle:function t(e){this._updateDashArray(e);this._requestRedraw(e)},_updateDashArray:function t(e){if(typeof e.options.dashArray==="string"){var i=e.options.dashArray.split(/[, ]+/),n=[],o,s;for(s=0;s<i.length;s++){o=Number(i[s]);if(isNaN(o)){return}n.push(o)}e.options._dashArray=n}else{e.options._dashArray=e.options.dashArray}},_requestRedraw:function t(e){if(!this._map){return}this._extendRedrawBounds(e);this._redrawRequest=this._redrawRequest||M(this._redraw,this)},_extendRedrawBounds:function t(e){if(e._pxBounds){var i=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new R;this._redrawBounds.extend(e._pxBounds.min.subtract([i,i]));this._redrawBounds.extend(e._pxBounds.max.add([i,i]))}},_redraw:function t(){this._redrawRequest=null;if(this._redrawBounds){this._redrawBounds.min._floor();this._redrawBounds.max._ceil()}this._clear();this._draw();this._redrawBounds=null},_clear:function t(){var e=this._redrawBounds;if(e){var i=e.getSize();this._ctx.clearRect(e.min.x,e.min.y,i.x,i.y)}else{this._ctx.clearRect(0,0,this._container.width,this._container.height)}},_draw:function t(){var e,i=this._redrawBounds;this._ctx.save();if(i){var n=i.getSize();this._ctx.beginPath();this._ctx.rect(i.min.x,i.min.y,n.x,n.y);this._ctx.clip()}this._drawing=true;for(var o=this._drawFirst;o;o=o.next){e=o.layer;if(!i||e._pxBounds&&e._pxBounds.intersects(i)){e._updatePath()}}this._drawing=false;this._ctx.restore()},_updatePoly:function t(e,i){if(!this._drawing){return}var n,o,s,r,a=e._parts,h=a.length,u=this._ctx;if(!h){return}u.beginPath();for(n=0;n<h;n++){for(o=0,s=a[n].length;o<s;o++){r=a[n][o];u[o?"lineTo":"moveTo"](r.x,r.y)}if(i){u.closePath()}}this._fillStroke(u,e)},_updateCircle:function t(e){if(!this._drawing||e._empty()){return}var i=e._point,n=this._ctx,o=Math.max(Math.round(e._radius),1),s=(Math.max(Math.round(e._radiusY),1)||o)/o;if(s!==1){n.save();n.scale(1,s)}n.beginPath();n.arc(i.x,i.y/s,o,0,Math.PI*2,false);if(s!==1){n.restore()}this._fillStroke(n,e)},_fillStroke:function t(e,i){var n=i.options;if(n.fill){e.globalAlpha=n.fillOpacity;e.fillStyle=n.fillColor||n.color;e.fill(n.fillRule||"evenodd")}if(n.stroke&&n.weight!==0){if(e.setLineDash){e.setLineDash(i.options&&i.options._dashArray||[])}e.globalAlpha=n.opacity;e.lineWidth=n.weight;e.strokeStyle=n.color;e.lineCap=n.lineCap;e.lineJoin=n.lineJoin;e.stroke()}},_onClick:function t(e){var i=this._map.mouseEventToLayerPoint(e),n,o;for(var s=this._drawFirst;s;s=s.next){n=s.layer;if(n.options.interactive&&n._containsPoint(i)&&!this._map._draggableMoved(n)){o=n}}if(o){Xe(e);this._fireEvent([o],e)}},_onMouseMove:function t(e){if(!this._map||this._map.dragging.moving()||this._map._animatingZoom){return}var i=this._map.mouseEventToLayerPoint(e);this._handleMouseHover(e,i)},_handleMouseOut:function t(e){var i=this._hoveredLayer;if(i){_e(this._container,"leaflet-interactive");this._fireEvent([i],e,"mouseout");this._hoveredLayer=null;this._mouseHoverThrottled=false}},_handleMouseHover:function t(e,i){if(this._mouseHoverThrottled){return}var n,o;for(var s=this._drawFirst;s;s=s.next){n=s.layer;if(n.options.interactive&&n._containsPoint(i)){o=n}}if(o!==this._hoveredLayer){this._handleMouseOut(e);if(o){de(this._container,"leaflet-interactive");this._fireEvent([o],e,"mouseover");this._hoveredLayer=o}}if(this._hoveredLayer){this._fireEvent([this._hoveredLayer],e)}this._mouseHoverThrottled=true;setTimeout(L.bind((function(){this._mouseHoverThrottled=false}),this),32)},_fireEvent:function t(e,i,n){this._map._fireDOMEvent(i,n||i.type,e)},_bringToFront:function t(e){var i=e._order;if(!i){return}var n=i.next;var o=i.prev;if(n){n.prev=o}else{return}if(o){o.next=n}else if(n){this._drawFirst=n}i.prev=this._drawLast;this._drawLast.next=i;i.next=null;this._drawLast=i;this._requestRedraw(e)},_bringToBack:function t(e){var i=e._order;if(!i){return}var n=i.next;var o=i.prev;if(o){o.next=n}else{return}if(n){n.prev=o}else if(o){this._drawLast=o}i.prev=null;i.next=this._drawFirst;this._drawFirst.prev=i;this._drawFirst=i;this._requestRedraw(e)}});function Un(t){return St?new Fn(t):null}var Gn=function(){try{document.namespaces.add("lvml","urn:schemas-microsoft-com:vml");return 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">')}}}();var Vn={_initContainer:function t(){this._container=ae("div","leaflet-vml-container")},_update:function t(){if(this._map._animatingZoom){return}Wn.prototype._update.call(this);this.fire("update")},_initPath:function t(e){var i=e._container=Gn("shape");de(i,"leaflet-vml-shape "+(this.options.className||""));i.coordsize="1 1";e._path=Gn("path");i.appendChild(e._path);this._updateStyle(e);this._layers[a(e)]=e},_addPath:function t(e){var i=e._container;this._container.appendChild(i);if(e.options.interactive){e.addInteractiveTarget(i)}},_removePath:function t(e){var i=e._container;he(i);e.removeInteractiveTarget(i);delete this._layers[a(e)]},_updateStyle:function t(e){var i=e._stroke,n=e._fill,o=e.options,s=e._container;s.stroked=!!o.stroke;s.filled=!!o.fill;if(o.stroke){if(!i){i=e._stroke=Gn("stroke")}s.appendChild(i);i.weight=o.weight+"px";i.color=o.color;i.opacity=o.opacity;if(o.dashArray){i.dashStyle=g(o.dashArray)?o.dashArray.join(" "):o.dashArray.replace(/( *, *)/g," ")}else{i.dashStyle=""}i.endcap=o.lineCap.replace("butt","flat");i.joinstyle=o.lineJoin}else if(i){s.removeChild(i);e._stroke=null}if(o.fill){if(!n){n=e._fill=Gn("fill")}s.appendChild(n);n.color=o.fillColor||o.color;n.opacity=o.fillOpacity}else if(n){s.removeChild(n);e._fill=null}},_updateCircle:function t(e){var i=e._point.round(),n=Math.round(e._radius),o=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+i.x+","+i.y+" "+n+","+o+" 0,"+65535*360)},_setPath:function t(e,i){e._path.v=i},_bringToFront:function t(e){le(e._container)},_bringToBack:function t(e){ce(e._container)}};var qn=Et?Gn:J;var Kn=Wn.extend({getEvents:function t(){var e=Wn.prototype.getEvents.call(this);e.zoomstart=this._onZoomStart;return e},_initContainer:function t(){this._container=qn("svg");this._container.setAttribute("pointer-events","none");this._rootGroup=qn("g");this._container.appendChild(this._rootGroup)},_destroyContainer:function t(){he(this._container);Ne(this._container);delete this._container;delete this._rootGroup;delete this._svgSize},_onZoomStart:function t(){this._update()},_update:function t(){if(this._map._animatingZoom&&this._bounds){return}Wn.prototype._update.call(this);var e=this._bounds,i=e.getSize(),n=this._container;if(!this._svgSize||!this._svgSize.equals(i)){this._svgSize=i;n.setAttribute("width",i.x);n.setAttribute("height",i.y)}we(n,e.min);n.setAttribute("viewBox",[e.min.x,e.min.y,i.x,i.y].join(" "));this.fire("update")},_initPath:function t(e){var i=e._path=qn("path");if(e.options.className){de(i,e.options.className)}if(e.options.interactive){de(i,"leaflet-interactive")}this._updateStyle(e);this._layers[a(e)]=e},_addPath:function t(e){if(!this._rootGroup){this._initContainer()}this._rootGroup.appendChild(e._path);e.addInteractiveTarget(e._path)},_removePath:function t(e){he(e._path);e.removeInteractiveTarget(e._path);delete this._layers[a(e)]},_updatePath:function t(e){e._project();e._update()},_updateStyle:function t(e){var i=e._path,n=e.options;if(!i){return}if(n.stroke){i.setAttribute("stroke",n.color);i.setAttribute("stroke-opacity",n.opacity);i.setAttribute("stroke-width",n.weight);i.setAttribute("stroke-linecap",n.lineCap);i.setAttribute("stroke-linejoin",n.lineJoin);if(n.dashArray){i.setAttribute("stroke-dasharray",n.dashArray)}else{i.removeAttribute("stroke-dasharray")}if(n.dashOffset){i.setAttribute("stroke-dashoffset",n.dashOffset)}else{i.removeAttribute("stroke-dashoffset")}}else{i.setAttribute("stroke","none")}if(n.fill){i.setAttribute("fill",n.fillColor||n.color);i.setAttribute("fill-opacity",n.fillOpacity);i.setAttribute("fill-rule",n.fillRule||"evenodd")}else{i.setAttribute("fill","none")}},_updatePoly:function t(e,i){this._setPath(e,$(e._parts,i))},_updateCircle:function t(e){var i=e._point,n=Math.max(Math.round(e._radius),1),o=Math.max(Math.round(e._radiusY),1)||n,s="a"+n+","+o+" 0 1,0 ";var r=e._empty()?"M0 0":"M"+(i.x-n)+","+i.y+s+n*2+",0 "+s+-n*2+",0 ";this._setPath(e,r)},_setPath:function t(e,i){e._path.setAttribute("d",i)},_bringToFront:function t(e){le(e._path)},_bringToBack:function t(e){ce(e._path)}});if(Et){Kn.include(Vn)}function Yn(t){return kt||Et?new Kn(t):null}ni.include({getRenderer:function t(e){var i=e.options.renderer||this._getPaneRenderer(e.options.pane)||this.options.renderer||this._renderer;if(!i){i=this._renderer=this._createRenderer()}if(!this.hasLayer(i)){this.addLayer(i)}return i},_getPaneRenderer:function t(e){if(e==="overlayPane"||e===undefined){return false}var i=this._paneRenderers[e];if(i===undefined){i=this._createRenderer({pane:e});this._paneRenderers[e]=i}return i},_createRenderer:function t(e){return this.options.preferCanvas&&Un(e)||Yn(e)}});var Xn=un.extend({initialize:function t(e,i){un.prototype.initialize.call(this,this._boundsToLatLngs(e),i)},setBounds:function t(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function t(e){e=j(e);return[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});function Jn(t,e){return new Xn(t,e)}Kn.create=qn;Kn.pointsToPath=$;cn.geometryToLayer=fn;cn.coordsToLatLng=_n;cn.coordsToLatLngs=pn;cn.latLngToCoords=mn;cn.latLngsToCoords=vn;cn.getFeature=gn;cn.asFeature=yn;ni.mergeOptions({boxZoom:true});var $n=pi.extend({initialize:function t(e){this._map=e;this._container=e._container;this._pane=e._panes.overlayPane;this._resetStateTimeout=0;e.on("unload",this._destroy,this)},addHooks:function t(){Oe(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function t(){Ne(this._container,"mousedown",this._onMouseDown,this)},moved:function t(){return this._moved},_destroy:function t(){he(this._pane);delete this._pane},_resetState:function t(){this._resetStateTimeout=0;this._moved=false},_clearDeferredResetState:function t(){if(this._resetStateTimeout!==0){clearTimeout(this._resetStateTimeout);this._resetStateTimeout=0}},_onMouseDown:function t(e){if(!e.shiftKey||e.which!==1&&e.button!==1){return false}this._clearDeferredResetState();this._resetState();Pe();Me();this._startPoint=this._map.mouseEventToContainerPoint(e);Oe(document,{contextmenu:Ge,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function t(e){if(!this._moved){this._moved=true;this._box=ae("div","leaflet-zoom-box",this._container);de(this._container,"leaflet-crosshair");this._map.fire("boxzoomstart")}this._point=this._map.mouseEventToContainerPoint(e);var i=new R(this._point,this._startPoint),n=i.getSize();we(this._box,i.min);this._box.style.width=n.x+"px";this._box.style.height=n.y+"px"},_finish:function t(){if(this._moved){he(this._box);_e(this._container,"leaflet-crosshair")}Le();Ce();Ne(document,{contextmenu:Ge,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function t(e){if(e.which!==1&&e.button!==1){return}this._finish();if(!this._moved){return}this._clearDeferredResetState();this._resetStateTimeout=setTimeout(s(this._resetState,this),0);var i=new D(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})},_onKeyDown:function t(e){if(e.keyCode===27){this._finish()}}});ni.addInitHook("addHandler","boxZoom",$n);ni.mergeOptions({doubleClickZoom:true});var Qn=pi.extend({addHooks:function t(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function t(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function t(e){var i=this._map,n=i.getZoom(),o=i.options.zoomDelta,s=e.originalEvent.shiftKey?n-o:n+o;if(i.options.doubleClickZoom==="center"){i.setZoom(s)}else{i.setZoomAround(e.containerPoint,s)}}});ni.addInitHook("addHandler","doubleClickZoom",Qn);ni.mergeOptions({dragging:true,inertia:!st,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:.2,worldCopyJump:false,maxBoundsViscosity:0});var to=pi.extend({addHooks:function t(){if(!this._draggable){var e=this._map;this._draggable=new xi(e._mapPane,e._container);this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this);this._draggable.on("predrag",this._onPreDragLimit,this);if(e.options.worldCopyJump){this._draggable.on("predrag",this._onPreDragWrap,this);e.on("zoomend",this._onZoomEnd,this);e.whenReady(this._onZoomEnd,this)}}de(this._map._container,"leaflet-grab leaflet-touch-drag");this._draggable.enable();this._positions=[];this._times=[]},removeHooks:function t(){_e(this._map._container,"leaflet-grab");_e(this._map._container,"leaflet-touch-drag");this._draggable.disable()},moved:function t(){return this._draggable&&this._draggable._moved},moving:function t(){return this._draggable&&this._draggable._moving},_onDragStart:function t(){var e=this._map;e._stop();if(this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=j(this._map.options.maxBounds);this._offsetLimit=N(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}e.fire("movestart").fire("dragstart");if(e.options.inertia){this._positions=[];this._times=[]}},_onDrag:function t(e){if(this._map.options.inertia){var i=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n);this._times.push(i);this._prunePositions(i)}this._map.fire("move",e).fire("drag",e)},_prunePositions:function t(e){while(this._positions.length>1&&e-this._times[0]>50){this._positions.shift();this._times.shift()}},_onZoomEnd:function t(){var e=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(e).x;this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function t(e,i){return e-(e-i)*this._viscosity},_onPreDragLimit:function t(){if(!this._viscosity||!this._offsetLimit){return}var e=this._draggable._newPos.subtract(this._draggable._startPos);var i=this._offsetLimit;if(e.x<i.min.x){e.x=this._viscousLimit(e.x,i.min.x)}if(e.y<i.min.y){e.y=this._viscousLimit(e.y,i.min.y)}if(e.x>i.max.x){e.x=this._viscousLimit(e.x,i.max.x)}if(e.y>i.max.y){e.y=this._viscousLimit(e.y,i.max.y)}this._draggable._newPos=this._draggable._startPos.add(e)},_onPreDragWrap:function t(){var e=this._worldWidth,i=Math.round(e/2),n=this._initialWorldOffset,o=this._draggable._newPos.x,s=(o-i+n)%e+i-n,r=(o+i+n)%e-i-n,a=Math.abs(s+n)<Math.abs(r+n)?s:r;this._draggable._absPos=this._draggable._newPos.clone();this._draggable._newPos.x=a},_onDragEnd:function t(e){var i=this._map,n=i.options,o=!n.inertia||this._times.length<2;i.fire("dragend",e);if(o){i.fire("moveend")}else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,a=n.easeLinearity,h=s.multiplyBy(a/r),u=h.distanceTo([0,0]),l=Math.min(n.inertiaMaxSpeed,u),c=h.multiplyBy(l/u),f=l/(n.inertiaDeceleration*a),d=c.multiplyBy(-f/2).round();if(!d.x&&!d.y){i.fire("moveend")}else{d=i._limitOffset(d,i.options.maxBounds);M((function(){i.panBy(d,{duration:f,easeLinearity:a,noMoveStart:true,animate:true})}))}}}});ni.addInitHook("addHandler","dragging",to);ni.mergeOptions({keyboard:true,keyboardPanDelta:80});var eo=pi.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function t(e){this._map=e;this._setPanDelta(e.options.keyboardPanDelta);this._setZoomDelta(e.options.zoomDelta)},addHooks:function t(){var e=this._map._container;if(e.tabIndex<=0){e.tabIndex="0"}Oe(e,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this);this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function t(){this._removeHooks();Ne(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 t(){if(this._focused){return}var e=document.body,i=document.documentElement,n=e.scrollTop||i.scrollTop,o=e.scrollLeft||i.scrollLeft;this._map._container.focus();window.scrollTo(o,n)},_onFocus:function t(){this._focused=true;this._map.fire("focus")},_onBlur:function t(){this._focused=false;this._map.fire("blur")},_setPanDelta:function t(e){var i=this._panKeys={},n=this.keyCodes,o,s;for(o=0,s=n.left.length;o<s;o++){i[n.left[o]]=[-1*e,0]}for(o=0,s=n.right.length;o<s;o++){i[n.right[o]]=[e,0]}for(o=0,s=n.down.length;o<s;o++){i[n.down[o]]=[0,e]}for(o=0,s=n.up.length;o<s;o++){i[n.up[o]]=[0,-1*e]}},_setZoomDelta:function t(e){var i=this._zoomKeys={},n=this.keyCodes,o,s;for(o=0,s=n.zoomIn.length;o<s;o++){i[n.zoomIn[o]]=e}for(o=0,s=n.zoomOut.length;o<s;o++){i[n.zoomOut[o]]=-e}},_addHooks:function t(){Oe(document,"keydown",this._onKeyDown,this)},_removeHooks:function t(){Ne(document,"keydown",this._onKeyDown,this)},_onKeyDown:function t(e){if(e.altKey||e.ctrlKey||e.metaKey){return}var i=e.keyCode,n=this._map,o;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress){o=this._panKeys[i];if(e.shiftKey){o=O(o).multiplyBy(3)}n.panBy(o);if(n.options.maxBounds){n.panInsideBounds(n.options.maxBounds)}}}else if(i in this._zoomKeys){n.setZoom(n.getZoom()+(e.shiftKey?3:1)*this._zoomKeys[i])}else if(i===27&&n._popup&&n._popup.options.closeOnEscapeKey){n.closePopup()}else{return}Ge(e)}});ni.addInitHook("addHandler","keyboard",eo);ni.mergeOptions({scrollWheelZoom:true,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var io=pi.extend({addHooks:function t(){Oe(this._map._container,"mousewheel",this._onWheelScroll,this);this._delta=0},removeHooks:function t(){Ne(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function t(e){var i=Ke(e);var n=this._map.options.wheelDebounceTime;this._delta+=i;this._lastMousePos=this._map.mouseEventToContainerPoint(e);if(!this._startTime){this._startTime=+new Date}var o=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer);this._timer=setTimeout(s(this._performZoom,this),o);Ge(e)},_performZoom:function t(){var e=this._map,i=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var o=this._delta/(this._map.options.wheelPxPerZoomLevel*4),s=4*Math.log(2/(1+Math.exp(-Math.abs(o))))/Math.LN2,r=n?Math.ceil(s/n)*n:s,a=e._limitZoom(i+(this._delta>0?r:-r))-i;this._delta=0;this._startTime=null;if(!a){return}if(e.options.scrollWheelZoom==="center"){e.setZoom(i+a)}else{e.setZoomAround(this._lastMousePos,i+a)}}});ni.addInitHook("addHandler","scrollWheelZoom",io);ni.mergeOptions({tap:true,tapTolerance:15});var no=pi.extend({addHooks:function t(){Oe(this._map._container,"touchstart",this._onDown,this)},removeHooks:function t(){Ne(this._map._container,"touchstart",this._onDown,this)},_onDown:function t(e){if(!e.touches){return}Ue(e);this._fireClick=true;if(e.touches.length>1){this._fireClick=false;clearTimeout(this._holdTimeout);return}var i=e.touches[0],n=i.target;this._startPos=this._newPos=new B(i.clientX,i.clientY);if(n.tagName&&n.tagName.toLowerCase()==="a"){de(n,"leaflet-active")}this._holdTimeout=setTimeout(s((function(){if(this._isTapValid()){this._fireClick=false;this._onUp();this._simulateEvent("contextmenu",i)}}),this),1e3);this._simulateEvent("mousedown",i);Oe(document,{touchmove:this._onMove,touchend:this._onUp},this)},_onUp:function t(e){clearTimeout(this._holdTimeout);Ne(document,{touchmove:this._onMove,touchend:this._onUp},this);if(this._fireClick&&e&&e.changedTouches){var i=e.changedTouches[0],n=i.target;if(n&&n.tagName&&n.tagName.toLowerCase()==="a"){_e(n,"leaflet-active")}this._simulateEvent("mouseup",i);if(this._isTapValid()){this._simulateEvent("click",i)}}},_isTapValid:function t(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function t(e){var i=e.touches[0];this._newPos=new B(i.clientX,i.clientY);this._simulateEvent("mousemove",i)},_simulateEvent:function t(e,i){var n=document.createEvent("MouseEvents");n._simulated=true;i.target._simulatedClick=true;n.initMouseEvent(e,true,true,window,1,i.screenX,i.screenY,i.clientX,i.clientY,false,false,false,false,0,null);i.target.dispatchEvent(n)}});if(Lt&&!Pt){ni.addInitHook("addHandler","tap",no)}ni.mergeOptions({touchZoom:Lt&&!st,bounceAtZoomLimits:true});var oo=pi.extend({addHooks:function t(){de(this._map._container,"leaflet-touch-zoom");Oe(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function t(){_e(this._map._container,"leaflet-touch-zoom");Ne(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function t(e){var i=this._map;if(!e.touches||e.touches.length!==2||i._animatingZoom||this._zooming){return}var n=i.mouseEventToContainerPoint(e.touches[0]),o=i.mouseEventToContainerPoint(e.touches[1]);this._centerPoint=i.getSize()._divideBy(2);this._startLatLng=i.containerPointToLatLng(this._centerPoint);if(i.options.touchZoom!=="center"){this._pinchStartLatLng=i.containerPointToLatLng(n.add(o)._divideBy(2))}this._startDist=n.distanceTo(o);this._startZoom=i.getZoom();this._moved=false;this._zooming=true;i._stop();Oe(document,"touchmove",this._onTouchMove,this);Oe(document,"touchend",this._onTouchEnd,this);Ue(e)},_onTouchMove:function t(e){if(!e.touches||e.touches.length!==2||!this._zooming){return}var i=this._map,n=i.mouseEventToContainerPoint(e.touches[0]),o=i.mouseEventToContainerPoint(e.touches[1]),r=n.distanceTo(o)/this._startDist;this._zoom=i.getScaleZoom(r,this._startZoom);if(!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&r<1||this._zoom>i.getMaxZoom()&&r>1)){this._zoom=i._limitZoom(this._zoom)}if(i.options.touchZoom==="center"){this._center=this._startLatLng;if(r===1){return}}else{var a=n._add(o)._divideBy(2)._subtract(this._centerPoint);if(r===1&&a.x===0&&a.y===0){return}this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}if(!this._moved){i._moveStart(true,false);this._moved=true}C(this._animRequest);var h=s(i._move,i,this._center,this._zoom,{pinch:true,round:false});this._animRequest=M(h,this,true);Ue(e)},_onTouchEnd:function t(){if(!this._moved||!this._zooming){this._zooming=false;return}this._zooming=false;C(this._animRequest);Ne(document,"touchmove",this._onTouchMove);Ne(document,"touchend",this._onTouchEnd);if(this._map.options.zoomAnimation){this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),true,this._map.options.zoomSnap)}else{this._map._resetView(this._center,this._map._limitZoom(this._zoom))}}});ni.addInitHook("addHandler","touchZoom",oo);ni.BoxZoom=$n;ni.DoubleClickZoom=Qn;ni.Drag=to;ni.Keyboard=eo;ni.ScrollWheelZoom=io;ni.Tap=no;ni.TouchZoom=oo;Object.freeze=i;var so=Object.freeze({version:e,Control:si,control:ri,Browser:It,Evented:I,Mixin:mi,Util:S,Class:k,Handler:pi,extend:n,bind:s,stamp:a,setOptions:_,DomEvent:ei,DomUtil:Ae,PosAnimation:ii,Draggable:xi,LineUtil:Ai,PolyUtil:Ri,Point:B,point:O,Bounds:R,bounds:N,Transformation:q,transformation:K,Projection:ji,LatLng:H,latLng:W,LatLngBounds:D,latLngBounds:j,CRS:F,GeoJSON:cn,geoJSON:wn,geoJson:bn,Layer:Ui,LayerGroup:Gi,layerGroup:Vi,FeatureGroup:qi,featureGroup:Ki,ImageOverlay:Pn,imageOverlay:Ln,VideoOverlay:Tn,videoOverlay:zn,SVGOverlay:Mn,svgOverlay:Cn,DivOverlay:Sn,Popup:kn,popup:En,Tooltip:Zn,tooltip:In,Icon:Yi,icon:Xi,DivIcon:Bn,divIcon:An,Marker:Qi,marker:tn,TileLayer:Nn,tileLayer:Dn,GridLayer:On,gridLayer:Rn,SVG:Kn,svg:Yn,Renderer:Wn,Canvas:Fn,canvas:Un,Path:en,CircleMarker:nn,circleMarker:on,Circle:sn,circle:rn,Polyline:an,polyline:hn,Polygon:un,polygon:ln,Rectangle:Xn,rectangle:Jn,Map:ni,map:oi});function ro(t,e,i){ao(t,e);e.set(t,i)}function ao(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}var ho=new WeakMap;var uo=new WeakMap;var lo=new WeakMap;var co=new WeakMap;var fo=function(){function t(e){babelHelpers.classCallCheck(this,t);ro(this,ho,{writable:true,value:void 0});ro(this,uo,{writable:true,value:void 0});ro(this,lo,{writable:true,value:false});ro(this,co,{writable:true,value:null});babelHelpers.classPrivateFieldSet(this,ho,e.token);babelHelpers.classPrivateFieldSet(this,uo,e.sourceRepository)}babelHelpers.createClass(t,[{key:"refreshToken",value:function t(){var e=this;if(babelHelpers.classPrivateFieldGet(this,lo)){return babelHelpers.classPrivateFieldGet(this,co)}babelHelpers.classPrivateFieldSet(this,co,babelHelpers.classPrivateFieldGet(this,uo).getProps().then((function(t){e.token=t.sourceParams.token;babelHelpers.classPrivateFieldSet(e,lo,false);return t.sourceParams.token}))["catch"]((function(t){babelHelpers.classPrivateFieldSet(e,lo,false);console.error(t)})));babelHelpers.classPrivateFieldSet(this,lo,true);return babelHelpers.classPrivateFieldGet(this,co)}},{key:"token",get:function t(){return babelHelpers.classPrivateFieldGet(this,ho)},set:function t(e){babelHelpers.classPrivateFieldSet(this,ho,e)}}]);return t}();function _o(t,e){mo(t,e);e.add(t)}function po(t,e,i){mo(t,e);e.set(t,i)}function mo(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function vo(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var go=new WeakMap;var yo=new WeakMap;var xo=new WeakMap;var wo=new WeakMap;var bo=new WeakSet;var Po=function(t){babelHelpers.inherits(e,t);function e(){var t;var i;babelHelpers.classCallCheck(this,e);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++){o[s]=arguments[s]}i=babelHelpers.possibleConstructorReturn(this,(t=babelHelpers.getPrototypeOf(e)).call.apply(t,[this].concat(o)));_o(babelHelpers.assertThisInitialized(i),bo);po(babelHelpers.assertThisInitialized(i),go,{writable:true,value:void 0});po(babelHelpers.assertThisInitialized(i),yo,{writable:true,value:void 0});po(babelHelpers.assertThisInitialized(i),xo,{writable:true,value:[]});po(babelHelpers.assertThisInitialized(i),wo,{writable:true,value:false});return i}babelHelpers.createClass(e,[{key:"setTokenContainer",value:function t(e){babelHelpers.classPrivateFieldSet(this,go,e)}},{key:"setHostName",value:function t(e){babelHelpers.classPrivateFieldSet(this,yo,e)}},{key:"requestTile",value:function t(e,i,n,o){var s=this;fetch(e,{method:"GET",cache:"force-cache",headers:new Headers({Authorization:"Bearer ".concat(babelHelpers.classPrivateFieldGet(this,go).token),"Bx-Location-Osm-Host":babelHelpers.classPrivateFieldGet(this,yo)})}).then((function(t){if(t.status===200){return t.blob()}if(t.status===401&&!o){vo(s,bo,Lo).call(s,e,i,n);return null}console.error("Response status: ".concat(t.status))})).then((function(t){if(t){var e=new FileReader;e.onload=function(){i.src=e.result};e.readAsDataURL(t);n(null,i)}}))["catch"]((function(t){console.error(t)}))}},{key:"createTile",value:function t(e,i){var n=this.getTileUrl(e);var o=document.createElement("img");if(babelHelpers.classPrivateFieldGet(this,wo)){babelHelpers.classPrivateFieldGet(this,xo).push([n,o,i])}else{this.requestTile(n,o,i,false)}return o}}]);return e}(Nn);function Lo(t,e,i){var n=this;babelHelpers.classPrivateFieldSet(this,wo,true);babelHelpers.classPrivateFieldGet(this,xo).push([t,e,i]);babelHelpers.classPrivateFieldGet(this,go).refreshToken().then((function(t){var e=function t(){var e=babelHelpers.classPrivateFieldGet(n,xo).pop();setTimeout((function(){n.requestTile(e[0],e[1],e[2],true)}),1)};while(babelHelpers.classPrivateFieldGet(n,xo).length>0){e()}babelHelpers.classPrivateFieldSet(n,wo,false)}))}Yi.Default.imagePath="/bitrix/js/location/osm/leaflet/images/";t.Leaflet=so;t.TileLayerAuth=Po})(this.BX.Location.OSM=this.BX.Location.OSM||{}); //# sourceMappingURL=leaflet.bundle.map.js