Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/location/osm/dist/ |
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/location/osm/dist/osm.bundle.min.js |
this.BX=this.BX||{};this.BX.Location=this.BX.Location||{};(function(t,e,i,n){"use strict";function s(t,e){a(t,e);e.add(t)}function o(t,e,i){a(t,e);e.set(t,i)}function a(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function r(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var l=new WeakMap;var h=new WeakMap;var u=new WeakMap;var c=new WeakMap;var d=new WeakSet;var f=function(t){babelHelpers.inherits(e,t);function e(t){var i;babelHelpers.classCallCheck(this,e);i=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this,t));s(babelHelpers.assertThisInitialized(i),d);o(babelHelpers.assertThisInitialized(i),l,{writable:true,value:void 0});o(babelHelpers.assertThisInitialized(i),h,{writable:true,value:void 0});o(babelHelpers.assertThisInitialized(i),u,{writable:true,value:void 0});o(babelHelpers.assertThisInitialized(i),c,{writable:true,value:void 0});babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),l,t.sourceLanguageId);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),h,t.responseConverter);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),u,t.autocompleteReplacements);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),c,t.autocompletePromptsCount);return i}babelHelpers.createClass(e,[{key:"autocomplete",value:function t(e,i){var s=this;if(e===""){return new Promise((function(t){t([])}))}var o={q:r(this,d,p).call(this,e),limit:babelHelpers.classPrivateFieldGet(this,c),lang:babelHelpers.classPrivateFieldGet(this,l)};if(i.biasPoint){var a=i.biasPoint.latitude;var u=i.biasPoint.longitude;if(a&&u){o.lat=a;o.lon=u}}var f=n.AutocompleteCache.get(ma.code,o);if(f!==null){return Promise.resolve(babelHelpers.classPrivateFieldGet(this,h).convertResponse(f.data.result,{text:e,autocompleteServiceParams:i}))}return BX.ajax.runAction("location.api.location.autocomplete",{data:{params:o}}).then((function(t){if(t){n.AutocompleteCache.set(ma.code,o,{result:t.data})}return t?babelHelpers.classPrivateFieldGet(s,h).convertResponse(t.data,{text:e,autocompleteServiceParams:i}):[]}))["catch"]((function(t){console.error(t)}))}}]);return e}(n.AutocompleteServiceBase);function p(t){var e=t;for(var i in babelHelpers.classPrivateFieldGet(this,u)){if(babelHelpers.classPrivateFieldGet(this,u).hasOwnProperty(i)){e=e.replace(i,babelHelpers.classPrivateFieldGet(this,u)[i])}}return e} /* @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 _=Object.freeze;Object.freeze=function(t){return t};function m(t){var e,i,n,s;for(i=1,n=arguments.length;i<n;i++){s=arguments[i];for(e in s){t[e]=s[e]}}return t}var v=Object.create||function(){function t(){}return function(e){t.prototype=e;return new t}}();function g(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 b=0;function y(t){t._leaflet_id=t._leaflet_id||++b;return t._leaflet_id}function w(t,e,i){var n,s,o,a;a=function t(){n=false;if(s){o.apply(i,s);s=false}};o=function o(){if(n){s=arguments}else{t.apply(i,arguments);setTimeout(a,e);n=true}};return o}function P(t,e,i){var n=e[1],s=e[0],o=n-s;return t===n&&i?t:((t-s)%o+o)%o+s}function T(){return false}function x(t,e){var i=Math.pow(10,e===undefined?6:e);return Math.round(t*i)/i}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function H(t){return z(t).split(/\s+/)}function M(t,e){if(!t.hasOwnProperty("options")){t.options=t.options?v(t.options):{}}for(var i in e){t.options[i]=e[i]}return t.options}function S(t,e,i){var n=[];for(var s in t){n.push(encodeURIComponent(i?s.toUpperCase():s)+"="+encodeURIComponent(t[s]))}return(!e||e.indexOf("?")===-1?"?":"&")+n.join("&")}var C=/\{ *([\w_-]+) *\}/g;function I(t,e){return t.replace(C,(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 k=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function E(t,e){for(var i=0;i<t.length;i++){if(t[i]===e){return i}}return-1}var A="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function O(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var F=0;function Z(t){var e=+new Date,i=Math.max(0,16-(e-F));F=e+i;return window.setTimeout(t,i)}var B=window.requestAnimationFrame||O("RequestAnimationFrame")||Z;var R=window.cancelAnimationFrame||O("CancelAnimationFrame")||O("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function G(t,e,i){if(i&&B===Z){t.call(e)}else{return B.call(window,g(t,e))}}function N(t){if(t){R.call(window,t)}}var W=(Object.freeze||Object)({freeze:_,extend:m,create:v,bind:g,lastId:b,stamp:y,throttle:w,wrapNum:P,falseFn:T,formatNum:x,trim:z,splitWords:H,setOptions:M,getParamString:S,template:I,isArray:k,indexOf:E,emptyImageUrl:A,requestFn:B,cancelFn:R,requestAnimFrame:G,cancelAnimFrame:N});function D(){}D.extend=function(t){var e=function t(){if(this.initialize){this.initialize.apply(this,arguments)}this.callInitHooks()};var i=e.__super__=this.prototype;var n=v(i);n.constructor=e;e.prototype=n;for(var s in this){if(this.hasOwnProperty(s)&&s!=="prototype"&&s!=="__super__"){e[s]=this[s]}}if(t.statics){m(e,t.statics);delete t.statics}if(t.includes){j(t.includes);m.apply(null,[n].concat(t.includes));delete t.includes}if(n.options){t.options=m(v(n.options),t.options)}m(n,t);n._initHooks=[];n.callInitHooks=function(){if(this._initHooksCalled){return}if(i.callInitHooks){i.callInitHooks.call(this)}this._initHooksCalled=true;for(var t=0,e=n._initHooks.length;t<e;t++){n._initHooks[t].call(this)}};return e};D.include=function(t){m(this.prototype,t);return this};D.mergeOptions=function(t){m(this.prototype.options,t);return this};D.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 j(t){if(typeof L==="undefined"||!L||!L.Mixin){return}t=k(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 U={on:function t(e,i,n){if(babelHelpers["typeof"](e)==="object"){for(var s in e){this._on(s,e[s],i)}}else{e=H(e);for(var o=0,a=e.length;o<a;o++){this._on(e[o],i,n)}}return this},off:function t(e,i,n){if(!e){delete this._events}else if(babelHelpers["typeof"](e)==="object"){for(var s in e){this._off(s,e[s],i)}}else{e=H(e);for(var o=0,a=e.length;o<a;o++){this._off(e[o],i,n)}}return this},_on:function t(e,i,n){this._events=this._events||{};var s=this._events[e];if(!s){s=[];this._events[e]=s}if(n===this){n=undefined}var o={fn:i,ctx:n},a=s;for(var r=0,l=a.length;r<l;r++){if(a[r].fn===i&&a[r].ctx===n){return}}a.push(o)},_off:function t(e,i,n){var s,o,a;if(!this._events){return}s=this._events[e];if(!s){return}if(!i){for(o=0,a=s.length;o<a;o++){s[o].fn=T}delete this._events[e];return}if(n===this){n=undefined}if(s){for(o=0,a=s.length;o<a;o++){var r=s[o];if(r.ctx!==n){continue}if(r.fn===i){r.fn=T;if(this._firingCount){this._events[e]=s=s.slice()}s.splice(o,1);return}}}},fire:function t(e,i,n){if(!this.listens(e,n)){return this}var s=m({},i,{type:e,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[e];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,r=o.length;a<r;a++){var l=o[a];l.fn.call(l.ctx||this,s)}this._firingCount--}}if(n){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 s in this._eventParents){if(this._eventParents[s].listens(e,i)){return true}}}return false},once:function t(e,i,n){if(babelHelpers["typeof"](e)==="object"){for(var s in e){this.once(s,e[s],i)}return this}var o=g((function(){this.off(e,i,n).off(e,o,n)}),this);return this.on(e,i,n).on(e,o,n)},addEventParent:function t(e){this._eventParents=this._eventParents||{};this._eventParents[y(e)]=e;return this},removeEventParent:function t(e){if(this._eventParents){delete this._eventParents[y(e)]}return this},_propagateEvent:function t(e){for(var i in this._eventParents){this._eventParents[i].fire(e.type,m({layer:e.target,propagatedFrom:e.target},e),true)}}};U.addEventListener=U.on;U.removeEventListener=U.clearAllEventListeners=U.off;U.addOneTimeEventListener=U.once;U.fireEvent=U.fire;U.hasEventListeners=U.listens;var V=D.extend(U);function q(t,e,i){this.x=i?Math.round(t):t;this.y=i?Math.round(e):e}var Y=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};q.prototype={clone:function t(){return new q(this.x,this.y)},add:function t(e){return this.clone()._add(K(e))},_add:function t(e){this.x+=e.x;this.y+=e.y;return this},subtract:function t(e){return this.clone()._subtract(K(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 q(this.x*e.x,this.y*e.y)},unscaleBy:function t(e){return new q(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=Y(this.x);this.y=Y(this.y);return this},distanceTo:function t(e){e=K(e);var i=e.x-this.x,n=e.y-this.y;return Math.sqrt(i*i+n*n)},equals:function t(e){e=K(e);return e.x===this.x&&e.y===this.y},contains:function t(e){e=K(e);return Math.abs(e.x)<=Math.abs(this.x)&&Math.abs(e.y)<=Math.abs(this.y)},toString:function t(){return"Point("+x(this.x)+", "+x(this.y)+")"}};function K(t,e,i){if(t instanceof q){return t}if(k(t)){return new q(t[0],t[1])}if(t===undefined||t===null){return t}if(babelHelpers["typeof"](t)==="object"&&"x"in t&&"y"in t){return new q(t.x,t.y)}return new q(t,e,i)}function X(t,e){if(!t){return}var i=e?[t,e]:t;for(var n=0,s=i.length;n<s;n++){this.extend(i[n])}}X.prototype={extend:function t(e){e=K(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 q((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,e)},getBottomLeft:function t(){return new q(this.min.x,this.max.y)},getTopRight:function t(){return new q(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 q){e=K(e)}else{e=J(e)}if(e instanceof X){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=J(e);var i=this.min,n=this.max,s=e.min,o=e.max,a=o.x>=i.x&&s.x<=n.x,r=o.y>=i.y&&s.y<=n.y;return a&&r},overlaps:function t(e){e=J(e);var i=this.min,n=this.max,s=e.min,o=e.max,a=o.x>i.x&&s.x<n.x,r=o.y>i.y&&s.y<n.y;return a&&r},isValid:function t(){return!!(this.min&&this.max)}};function J(t,e){if(!t||t instanceof X){return t}return new X(t,e)}function $(t,e){if(!t){return}var i=e?[t,e]:t;for(var n=0,s=i.length;n<s;n++){this.extend(i[n])}}$.prototype={extend:function t(e){var i=this._southWest,n=this._northEast,s,o;if(e instanceof tt){s=e;o=e}else if(e instanceof $){s=e._southWest;o=e._northEast;if(!s||!o){return this}}else{return e?this.extend(et(e)||Q(e)):this}if(!i&&!n){this._southWest=new tt(s.lat,s.lng);this._northEast=new tt(o.lat,o.lng)}else{i.lat=Math.min(s.lat,i.lat);i.lng=Math.min(s.lng,i.lng);n.lat=Math.max(o.lat,n.lat);n.lng=Math.max(o.lng,n.lng)}return this},pad:function t(e){var i=this._southWest,n=this._northEast,s=Math.abs(i.lat-n.lat)*e,o=Math.abs(i.lng-n.lng)*e;return new $(new tt(i.lat-s,i.lng-o),new tt(n.lat+s,n.lng+o))},getCenter:function t(){return new tt((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 tt(this.getNorth(),this.getWest())},getSouthEast:function t(){return new tt(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 tt||"lat"in e){e=et(e)}else{e=Q(e)}var i=this._southWest,n=this._northEast,s,o;if(e instanceof $){s=e.getSouthWest();o=e.getNorthEast()}else{s=o=e}return s.lat>=i.lat&&o.lat<=n.lat&&s.lng>=i.lng&&o.lng<=n.lng},intersects:function t(e){e=Q(e);var i=this._southWest,n=this._northEast,s=e.getSouthWest(),o=e.getNorthEast(),a=o.lat>=i.lat&&s.lat<=n.lat,r=o.lng>=i.lng&&s.lng<=n.lng;return a&&r},overlaps:function t(e){e=Q(e);var i=this._southWest,n=this._northEast,s=e.getSouthWest(),o=e.getNorthEast(),a=o.lat>i.lat&&s.lat<n.lat,r=o.lng>i.lng&&s.lng<n.lng;return a&&r},toBBoxString:function t(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function t(e,i){if(!e){return false}e=Q(e);return this._southWest.equals(e.getSouthWest(),i)&&this._northEast.equals(e.getNorthEast(),i)},isValid:function t(){return!!(this._southWest&&this._northEast)}};function Q(t,e){if(t instanceof $){return t}return new $(t,e)}function tt(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}}tt.prototype={equals:function t(e,i){if(!e){return false}e=et(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("+x(this.lat,e)+", "+x(this.lng,e)+")"},distanceTo:function t(e){return nt.distance(this,et(e))},wrap:function t(){return nt.wrapLatLng(this)},toBounds:function t(e){var i=180*e/40075017,n=i/Math.cos(Math.PI/180*this.lat);return Q([this.lat-i,this.lng-n],[this.lat+i,this.lng+n])},clone:function t(){return new tt(this.lat,this.lng,this.alt)}};function et(t,e,i){if(t instanceof tt){return t}if(k(t)&&babelHelpers["typeof"](t[0])!=="object"){if(t.length===3){return new tt(t[0],t[1],t[2])}if(t.length===2){return new tt(t[0],t[1])}return null}if(t===undefined||t===null){return t}if(babelHelpers["typeof"](t)==="object"&&"lat"in t){return new tt(t.lat,"lng"in t?t.lng:t.lon,t.alt)}if(e===undefined){return null}return new tt(t,e,i)}var it={latLngToPoint:function t(e,i){var n=this.projection.project(e),s=this.scale(i);return this.transformation._transform(n,s)},pointToLatLng:function t(e,i){var n=this.scale(i),s=this.transformation.untransform(e,n);return this.projection.unproject(s)},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),s=this.transformation.transform(i.min,n),o=this.transformation.transform(i.max,n);return new X(s,o)},infinite:false,wrapLatLng:function t(e){var i=this.wrapLng?P(e.lng,this.wrapLng,true):e.lng,n=this.wrapLat?P(e.lat,this.wrapLat,true):e.lat,s=e.alt;return new tt(n,i,s)},wrapLatLngBounds:function t(e){var i=e.getCenter(),n=this.wrapLatLng(i),s=i.lat-n.lat,o=i.lng-n.lng;if(s===0&&o===0){return e}var a=e.getSouthWest(),r=e.getNorthEast(),l=new tt(a.lat-s,a.lng-o),h=new tt(r.lat-s,r.lng-o);return new $(l,h)}};var nt=m({},it,{wrapLng:[-180,180],R:6371e3,distance:function t(e,i){var n=Math.PI/180,s=e.lat*n,o=i.lat*n,a=Math.sin((i.lat-e.lat)*n/2),r=Math.sin((i.lng-e.lng)*n/2),l=a*a+Math.cos(s)*Math.cos(o)*r*r,h=2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l));return this.R*h}});var st=6378137;var ot={R:st,MAX_LATITUDE:85.0511287798,project:function t(e){var i=Math.PI/180,n=this.MAX_LATITUDE,s=Math.max(Math.min(n,e.lat),-n),o=Math.sin(s*i);return new q(this.R*e.lng*i,this.R*Math.log((1+o)/(1-o))/2)},unproject:function t(e){var i=180/Math.PI;return new tt((2*Math.atan(Math.exp(e.y/this.R))-Math.PI/2)*i,e.x*i/this.R)},bounds:function(){var t=st*Math.PI;return new X([-t,-t],[t,t])}()};function at(t,e,i,n){if(k(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}at.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 q((e.x/i-this._b)/this._a,(e.y/i-this._d)/this._c)}};function rt(t,e,i,n){return new at(t,e,i,n)}var lt=m({},nt,{code:"EPSG:3857",projection:ot,transformation:function(){var t=.5/(Math.PI*ot.R);return rt(t,.5,-t,.5)}()});var ht=m({},lt,{code:"EPSG:900913"});function ut(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ct(t,e){var i="",n,s,o,a,r,l;for(n=0,o=t.length;n<o;n++){r=t[n];for(s=0,a=r.length;s<a;s++){l=r[s];i+=(s?"L":"M")+l.x+" "+l.y}i+=e?Dt?"z":"x":""}return i||"M0 0"}var dt=document.documentElement.style;var ft="ActiveXObject"in window;var pt=ft&&!document.addEventListener;var _t="msLaunchUri"in navigator&&!("documentMode"in document);var mt=Ut("webkit");var vt=Ut("android");var gt=Ut("android 2")||Ut("android 3");var bt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10);var yt=vt&&Ut("Google")&&bt<537&&!("AudioNode"in window);var wt=!!window.opera;var Pt=Ut("chrome");var Tt=Ut("gecko")&&!mt&&!wt&&!ft;var Lt=!Pt&&Ut("safari");var xt=Ut("phantom");var zt="OTransition"in dt;var Ht=navigator.platform.indexOf("Win")===0;var Mt=ft&&"transition"in dt;var St="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!gt;var Ct="MozPerspective"in dt;var It=!window.L_DISABLE_3D&&(Mt||St||Ct)&&!zt&&!xt;var kt=typeof orientation!=="undefined"||Ut("mobile");var Et=kt&&mt;var At=kt&&St;var Ot=!window.PointerEvent&&window.MSPointerEvent;var Ft=!mt&&!!(window.PointerEvent||Ot);var Zt=!window.L_NO_TOUCH&&(Ft||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);var Bt=kt&&wt;var Rt=kt&&Tt;var Gt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;var Nt=function t(){var e=false;try{var i=Object.defineProperty({},"passive",{get:function t(){e=true}});window.addEventListener("testPassiveEventSupport",T,i);window.removeEventListener("testPassiveEventSupport",T,i)}catch(t){}return e};var Wt=function(){return!!document.createElement("canvas").getContext}();var Dt=!!(document.createElementNS&&ut("svg").createSVGRect);var jt=!Dt&&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 Ut(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Vt=(Object.freeze||Object)({ie:ft,ielt9:pt,edge:_t,webkit:mt,android:vt,android23:gt,androidStock:yt,opera:wt,chrome:Pt,gecko:Tt,safari:Lt,phantom:xt,opera12:zt,win:Ht,ie3d:Mt,webkit3d:St,gecko3d:Ct,any3d:It,mobile:kt,mobileWebkit:Et,mobileWebkit3d:At,msPointer:Ot,pointer:Ft,touch:Zt,mobileOpera:Bt,mobileGecko:Rt,retina:Gt,passiveEvents:Nt,canvas:Wt,svg:Dt,vml:jt});var qt=Ot?"MSPointerDown":"pointerdown";var Yt=Ot?"MSPointerMove":"pointermove";var Kt=Ot?"MSPointerUp":"pointerup";var Xt=Ot?"MSPointerCancel":"pointercancel";var Jt=["INPUT","SELECT","OPTION"];var $t={};var Qt=false;var te=0;function ee(t,e,i,n){if(e==="touchstart"){ne(t,i,n)}else if(e==="touchmove"){le(t,i,n)}else if(e==="touchend"){he(t,i,n)}return this}function ie(t,e,i){var n=t["_leaflet_"+e+i];if(e==="touchstart"){t.removeEventListener(qt,n,false)}else if(e==="touchmove"){t.removeEventListener(Yt,n,false)}else if(e==="touchend"){t.removeEventListener(Kt,n,false);t.removeEventListener(Xt,n,false)}return this}function ne(t,e,i){var n=g((function(t){if(t.pointerType!=="mouse"&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(Jt.indexOf(t.target.tagName)<0){ni(t)}else{return}}re(t,e)}));t["_leaflet_touchstart"+i]=n;t.addEventListener(qt,n,false);if(!Qt){document.documentElement.addEventListener(qt,se,true);document.documentElement.addEventListener(Yt,oe,true);document.documentElement.addEventListener(Kt,ae,true);document.documentElement.addEventListener(Xt,ae,true);Qt=true}}function se(t){$t[t.pointerId]=t;te++}function oe(t){if($t[t.pointerId]){$t[t.pointerId]=t}}function ae(t){delete $t[t.pointerId];te--}function re(t,e){t.touches=[];for(var i in $t){t.touches.push($t[i])}t.changedTouches=[t];e(t)}function le(t,e,i){var n=function t(i){if((i.pointerType===i.MSPOINTER_TYPE_MOUSE||i.pointerType==="mouse")&&i.buttons===0){return}re(i,e)};t["_leaflet_touchmove"+i]=n;t.addEventListener(Yt,n,false)}function he(t,e,i){var n=function t(i){re(i,e)};t["_leaflet_touchend"+i]=n;t.addEventListener(Kt,n,false);t.addEventListener(Xt,n,false)}var ue=Ot?"MSPointerDown":Ft?"pointerdown":"touchstart";var ce=Ot?"MSPointerUp":Ft?"pointerup":"touchend";var de="_leaflet_";function fe(t,e,i){var n,s,o=false,a=250;function r(t){var e;if(Ft){if(!_t||t.pointerType==="mouse"){return}e=te}else{e=t.touches.length}if(e>1){return}var i=Date.now(),r=i-(n||i);s=t.touches?t.touches[0]:t;o=r>0&&r<=a;n=i}function l(t){if(o&&!s.cancelBubble){if(Ft){if(!_t||t.pointerType==="mouse"){return}var i={},a,r;for(r in s){a=s[r];i[r]=a&&a.bind?a.bind(s):a}s=i}s.type="dblclick";s.button=0;e(s);n=null}}t[de+ue+i]=r;t[de+ce+i]=l;t[de+"dblclick"+i]=e;t.addEventListener(ue,r,Nt?{passive:false}:false);t.addEventListener(ce,l,Nt?{passive:false}:false);t.addEventListener("dblclick",e,false);return this}function pe(t,e){var i=t[de+ue+e],n=t[de+ce+e],s=t[de+"dblclick"+e];t.removeEventListener(ue,i,Nt?{passive:false}:false);t.removeEventListener(ce,n,Nt?{passive:false}:false);if(!_t){t.removeEventListener("dblclick",s,false)}return this}var _e=ke(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);var me=ke(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);var ve=me==="webkitTransition"||me==="OTransition"?me+"End":"transitionend";function ge(t){return typeof t==="string"?document.getElementById(t):t}function be(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 ye(t,e,i){var n=document.createElement(t);n.className=e||"";if(i){i.appendChild(n)}return n}function we(t){var e=t.parentNode;if(e){e.removeChild(t)}}function Pe(t){while(t.firstChild){t.removeChild(t.firstChild)}}function Te(t){var e=t.parentNode;if(e&&e.lastChild!==t){e.appendChild(t)}}function Le(t){var e=t.parentNode;if(e&&e.firstChild!==t){e.insertBefore(t,e.firstChild)}}function xe(t,e){if(t.classList!==undefined){return t.classList.contains(e)}var i=Se(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ze(t,e){if(t.classList!==undefined){var i=H(e);for(var n=0,s=i.length;n<s;n++){t.classList.add(i[n])}}else if(!xe(t,e)){var o=Se(t);Me(t,(o?o+" ":"")+e)}}function He(t,e){if(t.classList!==undefined){t.classList.remove(e)}else{Me(t,z((" "+Se(t)+" ").replace(" "+e+" "," ")))}}function Me(t,e){if(t.className.baseVal===undefined){t.className=e}else{t.className.baseVal=e}}function Se(t){if(t.correspondingElement){t=t.correspondingElement}return t.className.baseVal===undefined?t.className:t.className.baseVal}function Ce(t,e){if("opacity"in t.style){t.style.opacity=e}else if("filter"in t.style){Ie(t,e)}}function Ie(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 ke(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 Ee(t,e,i){var n=e||new q(0,0);t.style[_e]=(Mt?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function Ae(t,e){t._leaflet_pos=e;if(It){Ee(t,e)}else{t.style.left=e.x+"px";t.style.top=e.y+"px"}}function Oe(t){return t._leaflet_pos||new q(0,0)}var Fe;var Ze;var Be;if("onselectstart"in document){Fe=function t(){Ke(window,"selectstart",ni)};Ze=function t(){Je(window,"selectstart",ni)}}else{var Re=ke(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Fe=function t(){if(Re){var e=document.documentElement.style;Be=e[Re];e[Re]="none"}};Ze=function t(){if(Re){document.documentElement.style[Re]=Be;Be=undefined}}}function Ge(){Ke(window,"dragstart",ni)}function Ne(){Je(window,"dragstart",ni)}var We;var De;function je(t){while(t.tabIndex===-1){t=t.parentNode}if(!t.style){return}Ue();We=t;De=t.style.outline;t.style.outline="none";Ke(window,"keydown",Ue)}function Ue(){if(!We){return}We.style.outline=De;We=undefined;De=undefined;Je(window,"keydown",Ue)}function Ve(t){do{t=t.parentNode}while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function qe(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ye=(Object.freeze||Object)({TRANSFORM:_e,TRANSITION:me,TRANSITION_END:ve,get:ge,getStyle:be,create:ye,remove:we,empty:Pe,toFront:Te,toBack:Le,hasClass:xe,addClass:ze,removeClass:He,setClass:Me,getClass:Se,setOpacity:Ce,testProp:ke,setTransform:Ee,setPosition:Ae,getPosition:Oe,disableTextSelection:Fe,enableTextSelection:Ze,disableImageDrag:Ge,enableImageDrag:Ne,preventOutline:je,restoreOutline:Ue,getSizedParentNode:Ve,getScale:qe});function Ke(t,e,i,n){if(babelHelpers["typeof"](e)==="object"){for(var s in e){$e(t,s,e[s],i)}}else{e=H(e);for(var o=0,a=e.length;o<a;o++){$e(t,e[o],i,n)}}return this}var Xe="_leaflet_events";function Je(t,e,i,n){if(babelHelpers["typeof"](e)==="object"){for(var s in e){Qe(t,s,e[s],i)}}else if(e){e=H(e);for(var o=0,a=e.length;o<a;o++){Qe(t,e[o],i,n)}}else{for(var r in t[Xe]){Qe(t,r,t[Xe][r])}delete t[Xe]}return this}function $e(t,e,i,n){var s=e+y(i)+(n?"_"+y(n):"");if(t[Xe]&&t[Xe][s]){return this}var o=function e(s){return i.call(n||t,s||window.event)};var a=o;if(Ft&&e.indexOf("touch")===0){ee(t,e,o,s)}else if(Zt&&e==="dblclick"&&fe&&!(Ft&&Pt)){fe(t,o,s)}else if("addEventListener"in t){if(e==="mousewheel"){t.addEventListener("onwheel"in t?"wheel":"mousewheel",o,Nt?{passive:false}:false)}else if(e==="mouseenter"||e==="mouseleave"){o=function e(i){i=i||window.event;if(ci(t,i)){a(i)}};t.addEventListener(e==="mouseenter"?"mouseover":"mouseout",o,false)}else{if(e==="click"&&vt){o=function t(e){fi(e,a)}}t.addEventListener(e,o,false)}}else if("attachEvent"in t){t.attachEvent("on"+e,o)}t[Xe]=t[Xe]||{};t[Xe][s]=o}function Qe(t,e,i,n){var s=e+y(i)+(n?"_"+y(n):""),o=t[Xe]&&t[Xe][s];if(!o){return this}if(Ft&&e.indexOf("touch")===0){ie(t,e,s)}else if(Zt&&e==="dblclick"&&pe&&!(Ft&&Pt)){pe(t,s)}else if("removeEventListener"in t){if(e==="mousewheel"){t.removeEventListener("onwheel"in t?"wheel":"mousewheel",o,Nt?{passive:false}:false)}else{t.removeEventListener(e==="mouseenter"?"mouseover":e==="mouseleave"?"mouseout":e,o,false)}}else if("detachEvent"in t){t.detachEvent("on"+e,o)}t[Xe][s]=null}function ti(t){if(t.stopPropagation){t.stopPropagation()}else if(t.originalEvent){t.originalEvent._stopped=true}else{t.cancelBubble=true}ui(t);return this}function ei(t){$e(t,"mousewheel",ti);return this}function ii(t){Ke(t,"mousedown touchstart dblclick",ti);$e(t,"click",hi);return this}function ni(t){if(t.preventDefault){t.preventDefault()}else{t.returnValue=false}return this}function si(t){ni(t);ti(t);return this}function oi(t,e){if(!e){return new q(t.clientX,t.clientY)}var i=qe(e),n=i.boundingClientRect;return new q((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var ai=Ht&&Pt?2*window.devicePixelRatio:Tt?window.devicePixelRatio:1;function ri(t){return _t?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/ai: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 li={};function hi(t){li[t.type]=true}function ui(t){var e=li[t.type];li[t.type]=false;return e}function ci(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 di;function fi(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=di&&i-di;if(n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated){si(t);return}di=i;e(t)}var pi=(Object.freeze||Object)({on:Ke,off:Je,stopPropagation:ti,disableScrollPropagation:ei,disableClickPropagation:ii,preventDefault:ni,stop:si,getMousePosition:oi,getWheelDelta:ri,fakeStop:hi,skipped:ui,isExternalTarget:ci,addListener:Ke,removeListener:Je});var _i=V.extend({run:function t(e,i,n,s){this.stop();this._el=e;this._inProgress=true;this._duration=n||.25;this._easeOutPower=1/Math.max(s||.5,.2);this._startPos=Oe(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=G(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()}Ae(this._el,n);this.fire("step")},_complete:function t(){N(this._animId);this._inProgress=false;this.fire("end")},_easeOut:function t(e){return 1-Math.pow(1-e,this._easeOutPower)}});var mi=V.extend({options:{crs:lt,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=M(this,i);this._handlers=[];this._layers={};this._zoomBoundLayers={};this._sizeChanged=true;this._initContainer(e);this._initLayout();this._onResize=g(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(et(i.center),i.zoom,{reset:true})}this.callInitHooks();this._zoomAnimated=me&&It&&!Bt&&this.options.zoomAnimation;if(this._zoomAnimated){this._createAnimProxy();Ke(this._proxy,ve,this._catchTransitionEnd,this)}this._addLayers(this.options.layers)},setView:function t(e,i,n){i=i===undefined?this._zoom:this._limitZoom(i);e=this._limitCenter(et(e),i,this.options.maxBounds);n=n||{};this._stop();if(this._loaded&&!n.reset&&n!==true){if(n.animate!==undefined){n.zoom=m({animate:n.animate},n.zoom);n.pan=m({animate:n.animate,duration:n.duration},n.pan)}var s=this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(e,i,n.zoom):this._tryAnimatedPan(e,n.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||(It?this.options.zoomDelta:1);return this.setZoom(this._zoom+e,i)},zoomOut:function t(e,i){e=e||(It?this.options.zoomDelta:1);return this.setZoom(this._zoom-e,i)},setZoomAround:function t(e,i,n){var s=this.getZoomScale(i),o=this.getSize().divideBy(2),a=e instanceof q?e:this.latLngToContainerPoint(e),r=a.subtract(o).multiplyBy(1-1/s),l=this.containerPointToLatLng(o.add(r));return this.setView(l,i,{zoom:n})},_getBoundsCenterZoom:function t(e,i){i=i||{};e=e.getBounds?e.getBounds():Q(e);var n=K(i.paddingTopLeft||i.padding||[0,0]),s=K(i.paddingBottomRight||i.padding||[0,0]),o=this.getBoundsZoom(e,false,n.add(s));o=typeof i.maxZoom==="number"?Math.min(i.maxZoom,o):o;if(o===Infinity){return{center:e.getCenter(),zoom:o}}var a=s.subtract(n).divideBy(2),r=this.project(e.getSouthWest(),o),l=this.project(e.getNorthEast(),o),h=this.unproject(r.add(l).divideBy(2).add(a),o);return{center:h,zoom:o}},fitBounds:function t(e,i){e=Q(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=K(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 _i;this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)}if(!i.noMoveStart){this.fire("movestart")}if(i.animate!==false){ze(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||!It){return this.setView(e,i,n)}this._stop();var s=this.project(this.getCenter()),o=this.project(e),a=this.getSize(),r=this._zoom;e=et(e);i=i===undefined?r:i;var l=Math.max(a.x,a.y),h=l*this.getZoomScale(r,i),u=o.distanceTo(s)||1,c=1.42,d=c*c;function f(t){var e=t?-1:1,i=t?h:l,n=h*h-l*l+e*d*d*u*u,s=2*i*d*u,o=n/s,a=Math.sqrt(o*o+1)-o;var r=a<1e-9?-18:Math.log(a);return r}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function _(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return p(t)/_(t)}var v=f(0);function g(t){return l*(_(v)/_(v+c*t))}function b(t){return l*(_(v)*m(v+c*t)-p(v))/d}function y(t){return 1-Math.pow(1-t,1.5)}var w=Date.now(),P=(f(1)-v)/c,T=n.duration?1e3*n.duration:1e3*P*.8;function L(){var t=(Date.now()-w)/T,n=y(t)*P;if(t<=1){this._flyToFrame=G(L,this);this._move(this.unproject(s.add(o.subtract(s).multiplyBy(b(n)/u)),r),this.getScaleZoom(l/g(n),r),{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=Q(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(),s=this._limitCenter(n,this._zoom,Q(e));if(!n.equals(s)){this.panTo(s,i)}this._enforcingBounds=false;return this},panInside:function t(e,i){i=i||{};var n=K(i.paddingTopLeft||i.padding||[0,0]),s=K(i.paddingBottomRight||i.padding||[0,0]),o=this.getCenter(),a=this.project(o),r=this.project(e),l=this.getPixelBounds(),h=l.getSize().divideBy(2),u=J([l.min.add(n),l.max.subtract(s)]);if(!u.contains(r)){this._enforcingBounds=true;var c=a.subtract(r),d=K(r.x+c.x,r.y+c.y);if(r.x<u.min.x||r.x>u.max.x){d.x=a.x-c.x;if(c.x>0){d.x+=h.x-n.x}else{d.x-=h.x-s.x}}if(r.y<u.min.y||r.y>u.max.y){d.y=a.y-c.y;if(c.y>0){d.y+=h.y-n.y}else{d.y-=h.y-s.y}}this.panTo(this.unproject(d),i);this._enforcingBounds=false}return this},invalidateSize:function t(e){if(!this._loaded){return this}e=m({animate:false,pan:true},e===true?{animate:true}:e);var i=this.getSize();this._sizeChanged=true;this._lastCenter=null;var n=this.getSize(),s=i.divideBy(2).round(),o=n.divideBy(2).round(),a=s.subtract(o);if(!a.x&&!a.y){return this}if(e.animate&&e.pan){this.panBy(a)}else{if(e.pan){this._rawPanBy(a)}this.fire("move");if(e.debounceMoveend){clearTimeout(this._sizeTimer);this._sizeTimer=setTimeout(g(this.fire,this,"moveend"),200)}else{this.fire("moveend")}}return this.fire("resize",{oldSize:i,newSize:n})},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=m({timeout:1e4,watch:false},e);if(!("geolocation"in navigator)){this._handleGeolocationError({code:0,message:"Geolocation not supported."});return this}var i=g(this._handleGeolocationResponse,this),n=g(this._handleGeolocationError,this);if(e.watch){this._locationWatchId=navigator.geolocation.watchPosition(i,n,e)}else{navigator.geolocation.getCurrentPosition(i,n,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,s=new tt(i,n),o=s.toBounds(e.coords.accuracy*2),a=this._locateOptions;if(a.setView){var r=this.getBoundsZoom(o);this.setView(s,a.maxZoom?Math.min(r,a.maxZoom):r)}var l={latlng:s,bounds:o,timestamp:e.timestamp};for(var h in e.coords){if(typeof e.coords[h]==="number"){l[h]=e.coords[h]}}this.fire("locationfound",l)},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();we(this._mapPane);if(this._clearControlPos){this._clearControlPos()}if(this._resizeRequest){N(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){we(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":""),s=ye("div",n,i||this._mapPane);if(e){this._panes[e]=s}return s},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 $(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=Q(e);n=K(n||[0,0]);var s=this.getZoom()||0,o=this.getMinZoom(),a=this.getMaxZoom(),r=e.getNorthWest(),l=e.getSouthEast(),h=this.getSize().subtract(n),u=J(this.project(l,s),this.project(r,s)).getSize(),c=It?this.options.zoomSnap:1,d=h.x/u.x,f=h.y/u.y,p=i?Math.max(d,f):Math.min(d,f);s=this.getScaleZoom(p,s);if(c){s=Math.round(s/(c/100))*(c/100);s=i?Math.ceil(s/c)*c:Math.floor(s/c)*c}return Math.max(o,Math.min(a,s))},getSize:function t(){if(!this._size||this._sizeChanged){this._size=new q(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 X(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 s=n.zoom(e*n.scale(i));return isNaN(s)?Infinity:s},project:function t(e,i){i=i===undefined?this._zoom:i;return this.options.crs.latLngToPoint(et(e),i)},unproject:function t(e,i){i=i===undefined?this._zoom:i;return this.options.crs.pointToLatLng(K(e),i)},layerPointToLatLng:function t(e){var i=K(e).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function t(e){var i=this.project(et(e))._round();return i._subtract(this.getPixelOrigin())},wrapLatLng:function t(e){return this.options.crs.wrapLatLng(et(e))},wrapLatLngBounds:function t(e){return this.options.crs.wrapLatLngBounds(Q(e))},distance:function t(e,i){return this.options.crs.distance(et(e),et(i))},containerPointToLayerPoint:function t(e){return K(e).subtract(this._getMapPanePos())},layerPointToContainerPoint:function t(e){return K(e).add(this._getMapPanePos())},containerPointToLatLng:function t(e){var i=this.containerPointToLayerPoint(K(e));return this.layerPointToLatLng(i)},latLngToContainerPoint:function t(e){return this.layerPointToContainerPoint(this.latLngToLayerPoint(et(e)))},mouseEventToContainerPoint:function t(e){return oi(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=ge(e);if(!i){throw new Error("Map container not found.")}else if(i._leaflet_id){throw new Error("Map container is already initialized.")}Ke(i,"scroll",this._onScroll,this);this._containerId=y(i)},_initLayout:function t(){var e=this._container;this._fadeAnimated=this.options.fadeAnimation&&It;ze(e,"leaflet-container"+(Zt?" leaflet-touch":"")+(Gt?" leaflet-retina":"")+(pt?" leaflet-oldie":"")+(Lt?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=be(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);Ae(this._mapPane,new q(0,0));this.createPane("tilePane");this.createPane("shadowPane");this.createPane("overlayPane");this.createPane("markerPane");this.createPane("tooltipPane");this.createPane("popupPane");if(!this.options.markerZoomAnimation){ze(e.markerPane,"leaflet-zoom-hide");ze(e.shadowPane,"leaflet-zoom-hide")}},_resetView:function t(e,i){Ae(this._mapPane,new q(0,0));var n=!this._loaded;this._loaded=true;i=this._limitZoom(i);this.fire("viewprereset");var s=this._zoom!==i;this._moveStart(s,false)._move(e,i)._moveEnd(s);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 s=this._zoom!==i;this._zoom=i;this._lastCenter=e;this._pixelOrigin=this._getNewPixelOrigin(e);if(s||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(){N(this._flyToFrame);if(this._panAnim){this._panAnim.stop()}return this},_rawPanBy:function t(e){Ae(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[y(this._container)]=this;var i=e?Je:Ke;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(It&&this.options.transform3DLimit){(e?this.off:this.on).call(this,"moveend",this._onMoveEnd)}},_onResize:function t(){N(this._resizeRequest);this._resizeRequest=G((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=[],s,o=i==="mouseout"||i==="mouseover",a=e.target||e.srcElement,r=false;while(a){s=this._targets[y(a)];if(s&&(i==="click"||i==="preclick")&&!e._simulated&&this._draggableMoved(s)){r=true;break}if(s&&s.listens(i,true)){if(o&&!ci(a,e)){break}n.push(s);if(o){break}}if(a===this._container){break}a=a.parentNode}if(!n.length&&!r&&!o&&ci(a,e)){n=[this]}return n},_handleDOMEvent:function t(e){if(!this._loaded||ui(e)){return}var i=e.type;if(i==="mousedown"||i==="keypress"||i==="keyup"||i==="keydown"){je(e.target||e.srcElement)}this._fireDOMEvent(e,i)},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function t(e,i,n){if(e.type==="click"){var s=m({},e);s.type="preclick";this._fireDOMEvent(s,s.type,n)}if(e._stopped){return}n=(n||[]).concat(this._findEventTargets(e,i));if(!n.length){return}var o=n[0];if(i==="contextmenu"&&o.listens(i,true)){ni(e)}var a={originalEvent:e};if(e.type!=="keypress"&&e.type!=="keydown"&&e.type!=="keyup"){var r=o.getLatLng&&(!o._radius||o._radius<=10);a.containerPoint=r?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(e);a.layerPoint=this.containerPointToLayerPoint(a.containerPoint);a.latlng=r?o.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<n.length;l++){n[l].fire(i,a,true);if(a.originalEvent._stopped||n[l].options.bubblingMouseEvents===false&&E(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 Oe(this._mapPane)||new q(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 s=this._getNewPixelOrigin(n,i);return this.project(e,i)._subtract(s)},_latLngBoundsToNewLayerBounds:function t(e,i,n){var s=this._getNewPixelOrigin(n,i);return J([this.project(e.getSouthWest(),i)._subtract(s),this.project(e.getNorthWest(),i)._subtract(s),this.project(e.getSouthEast(),i)._subtract(s),this.project(e.getNorthEast(),i)._subtract(s)])},_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 s=this.project(e,i),o=this.getSize().divideBy(2),a=new X(s.subtract(o),s.add(o)),r=this._getBoundsOffset(a,n,i);if(r.round().equals([0,0])){return e}return this.unproject(s.add(r),i)},_limitOffset:function t(e,i){if(!i){return e}var n=this.getPixelBounds(),s=new X(n.min.add(e),n.max.add(e));return e.add(this._getBoundsOffset(s,i))},_getBoundsOffset:function t(e,i,n){var s=J(this.project(i.getNorthEast(),n),this.project(i.getSouthWest(),n)),o=s.min.subtract(e.min),a=s.max.subtract(e.max),r=this._rebound(o.x,-a.x),l=this._rebound(o.y,-a.y);return new q(r,l)},_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(),s=It?this.options.zoomSnap:1;if(s){e=Math.round(e/s)*s}return Math.max(i,Math.min(n,e))},_onPanTransitionStep:function t(){this.fire("move")},_onPanTransitionEnd:function t(){He(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=ye("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(e);this.on("zoomanim",(function(t){var e=_e,i=this._proxy.style[e];Ee(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(){we(this._proxy);this.off("load moveend",this._animMoveEnd,this);delete this._proxy},_animMoveEnd:function t(){var e=this.getCenter(),i=this.getZoom();Ee(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 s=this.getZoomScale(i),o=this._getCenterOffset(e)._divideBy(1-1/s);if(n.animate!==true&&!this.getSize().contains(o)){return false}G((function(){this._moveStart(true,false)._animateZoom(e,i,true)}),this);return true},_animateZoom:function t(e,i,n,s){if(!this._mapPane){return}if(n){this._animatingZoom=true;this._animateToCenter=e;this._animateToZoom=i;ze(this._mapPane,"leaflet-zoom-anim")}this.fire("zoomanim",{center:e,zoom:i,noUpdate:s});setTimeout(g(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function t(){if(!this._animatingZoom){return}if(this._mapPane){He(this._mapPane,"leaflet-zoom-anim")}this._animatingZoom=false;this._move(this._animateToCenter,this._animateToZoom);G((function(){this._moveEnd(true)}),this)}});function vi(t,e){return new mi(t,e)}var gi=D.extend({options:{position:"topright"},initialize:function t(e){M(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(),s=e._controlCorners[n];ze(i,"leaflet-control");if(n.indexOf("bottom")!==-1){s.insertBefore(i,s.firstChild)}else{s.appendChild(i)}this._map.on("unload",this.remove,this);return this},remove:function t(){if(!this._map){return this}we(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()}}});mi.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=ye("div",i+"control-container",this._container);function s(t,s){var o=i+t+" "+i+s;e[t+s]=ye("div",o,n)}s("top","left");s("top","right");s("bottom","left");s("bottom","right")},_clearControlPos:function t(){for(var e in this._controlCorners){we(this._controlCorners[e])}we(this._controlContainer);delete this._controlCorners;delete this._controlContainer}});var bi=gi.extend({options:{collapsed:true,position:"topright",autoZIndex:true,hideSingleBase:false,sortLayers:false,sortFunction:function t(e,i,n,s){return n<s?-1:s<n?1:0}},initialize:function t(e,i,n){M(this,n);this._layerControlInputs=[];this._layers=[];this._lastZIndex=0;this._handlingClick=false;for(var s in e){this._addLayer(e[s],s)}for(s in i){this._addLayer(i[s],s,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){gi.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(y(e));if(i){this._layers.splice(this._layers.indexOf(i),1)}return this._map?this._update():this},expand:function t(){ze(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){ze(this._section,"leaflet-control-layers-scrollbar");this._section.style.height=e+"px"}else{He(this._section,"leaflet-control-layers-scrollbar")}this._checkDisabledLayers();return this},collapse:function t(){He(this._container,"leaflet-control-layers-expanded");return this},_initLayout:function t(){var e="leaflet-control-layers",i=this._container=ye("div",e),n=this.options.collapsed;i.setAttribute("aria-haspopup",true);ii(i);ei(i);var s=this._section=ye("section",e+"-list");if(n){this._map.on("click",this.collapse,this);if(!vt){Ke(i,{mouseenter:this.expand,mouseleave:this.collapse},this)}}var o=this._layersLink=ye("a",e+"-toggle",i);o.href="#";o.title="Layers";if(Zt){Ke(o,"click",si);Ke(o,"click",this.expand,this)}else{Ke(o,"focus",this.expand,this)}if(!n){this.expand()}this._baseLayersList=ye("div",e+"-base",s);this._separator=ye("div",e+"-separator",s);this._overlaysList=ye("div",e+"-overlays",s);i.appendChild(s)},_getLayer:function t(e){for(var i=0;i<this._layers.length;i++){if(this._layers[i]&&y(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(g((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}Pe(this._baseLayersList);Pe(this._overlaysList);this._layerControlInputs=[];var e,i,n,s,o=0;for(n=0;n<this._layers.length;n++){s=this._layers[n];this._addItem(s);i=i||s.overlay;e=e||!s.overlay;o+=!s.overlay?1:0}if(this.options.hideSingleBase){e=e&&o>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(y(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 s=document.createElement("div");s.innerHTML=n;return s.firstChild},_addItem:function t(e){var i=document.createElement("label"),n=this._map.hasLayer(e.layer),s;if(e.overlay){s=document.createElement("input");s.type="checkbox";s.className="leaflet-control-layers-selector";s.defaultChecked=n}else{s=this._createRadioElement("leaflet-base-layers_"+y(this),n)}this._layerControlInputs.push(s);s.layerId=y(e.layer);Ke(s,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+e.name;var a=document.createElement("div");i.appendChild(a);a.appendChild(s);a.appendChild(o);var r=e.overlay?this._overlaysList:this._baseLayersList;r.appendChild(i);this._checkDisabledLayers();return i},_onInputClick:function t(){var e=this._layerControlInputs,i,n;var s=[],o=[];this._handlingClick=true;for(var a=e.length-1;a>=0;a--){i=e[a];n=this._getLayer(i.layerId).layer;if(i.checked){s.push(n)}else if(!i.checked){o.push(n)}}for(a=0;a<o.length;a++){if(this._map.hasLayer(o[a])){this._map.removeLayer(o[a])}}for(a=0;a<s.length;a++){if(!this._map.hasLayer(s[a])){this._map.addLayer(s[a])}}this._handlingClick=false;this._refocusOnMap()},_checkDisabledLayers:function t(){var e=this._layerControlInputs,i,n,s=this._map.getZoom();for(var o=e.length-1;o>=0;o--){i=e[o];n=this._getLayer(i.layerId).layer;i.disabled=n.options.minZoom!==undefined&&s<n.options.minZoom||n.options.maxZoom!==undefined&&s>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 yi=gi.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"−",zoomOutTitle:"Zoom out"},onAdd:function t(e){var i="leaflet-control-zoom",n=ye("div",i+" leaflet-bar"),s=this.options;this._zoomInButton=this._createButton(s.zoomInText,s.zoomInTitle,i+"-in",n,this._zoomIn);this._zoomOutButton=this._createButton(s.zoomOutText,s.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,s,o){var a=ye("a",n,s);a.innerHTML=e;a.href="#";a.title=i;a.setAttribute("role","button");a.setAttribute("aria-label",i);ii(a);Ke(a,"click",si);Ke(a,"click",o,this);Ke(a,"click",this._refocusOnMap,this);return a},_updateDisabled:function t(){var e=this._map,i="leaflet-disabled";He(this._zoomInButton,i);He(this._zoomOutButton,i);if(this._disabled||e._zoom===e.getMinZoom()){ze(this._zoomOutButton,i)}if(this._disabled||e._zoom===e.getMaxZoom()){ze(this._zoomInButton,i)}}});mi.mergeOptions({zoomControl:true});mi.addInitHook((function(){if(this.options.zoomControl){this.zoomControl=new yi;this.addControl(this.zoomControl)}}));var wi=gi.extend({options:{position:"bottomleft",maxWidth:100,metric:true,imperial:true},onAdd:function t(e){var i="leaflet-control-scale",n=ye("div",i),s=this.options;this._addScales(s,i+"-line",n);e.on(s.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=ye("div",i,n)}if(e.imperial){this._iScale=ye("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,s,o;if(i>5280){n=i/5280;s=this._getRoundNum(n);this._updateScale(this._iScale,s+" mi",s/n)}else{o=this._getRoundNum(i);this._updateScale(this._iScale,o+" ft",o/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 Pi=gi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function t(e){M(this,e);this._attributions={}},onAdd:function t(e){e.attributionControl=this;this._container=ye("div","leaflet-control-attribution");ii(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(" | ")}});mi.mergeOptions({attributionControl:true});mi.addInitHook((function(){if(this.options.attributionControl){(new Pi).addTo(this)}}));gi.Layers=bi;gi.Zoom=yi;gi.Scale=wi;gi.Attribution=Pi;var Ti=D.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}});Ti.addTo=function(t,e){t.addHandler(e,this);return this};var Li=Zt?"touchstart mousedown":"mousedown";var xi={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"};var zi={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"};var Hi=V.extend({options:{clickTolerance:3},initialize:function t(e,i,n,s){M(this,s);this._element=e;this._dragStartTarget=i||e;this._preventOutline=n},enable:function t(){if(this._enabled){return}Ke(this._dragStartTarget,Li,this._onDown,this);this._enabled=true},disable:function t(){if(!this._enabled){return}if(Hi._dragging===this){this.finishDrag()}Je(this._dragStartTarget,Li,this._onDown,this);this._enabled=false;this._moved=false},_onDown:function t(e){if(e._simulated||!this._enabled){return}this._moved=false;if(xe(this._element,"leaflet-zoom-anim")){return}if(Hi._dragging||e.shiftKey||e.which!==1&&e.button!==1&&!e.touches){return}Hi._dragging=this;if(this._preventOutline){je(this._element)}Ge();Fe();if(this._moving){return}this.fire("down");var i=e.touches?e.touches[0]:e,n=Ve(this._element);this._startPoint=new q(i.clientX,i.clientY);this._parentScale=qe(n);Ke(document,zi[e.type],this._onMove,this);Ke(document,xi[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 q(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;ni(e);if(!this._moved){this.fire("dragstart");this._moved=true;this._startPos=Oe(this._element).subtract(n);ze(document.body,"leaflet-dragging");this._lastTarget=e.target||e.srcElement;if(window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance){this._lastTarget=this._lastTarget.correspondingUseElement}ze(this._lastTarget,"leaflet-drag-target")}this._newPos=this._startPos.add(n);this._moving=true;N(this._animRequest);this._lastEvent=e;this._animRequest=G(this._updatePosition,this,true)},_updatePosition:function t(){var e={originalEvent:this._lastEvent};this.fire("predrag",e);Ae(this._element,this._newPos);this.fire("drag",e)},_onUp:function t(e){if(e._simulated||!this._enabled){return}this.finishDrag()},finishDrag:function t(){He(document.body,"leaflet-dragging");if(this._lastTarget){He(this._lastTarget,"leaflet-drag-target");this._lastTarget=null}for(var e in zi){Je(document,zi[e],this._onMove,this);Je(document,xi[e],this._onUp,this)}Ne();Ze();if(this._moved&&this._moving){N(this._animRequest);this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})}this._moving=false;Hi._dragging=false}});function Mi(t,e){if(!e||!t.length){return t.slice()}var i=e*e;t=Ei(t,i);t=Ii(t,i);return t}function Si(t,e,i){return Math.sqrt(Ri(t,e,i,true))}function Ci(t,e,i){return Ri(t,e,i)}function Ii(t,e){var i=t.length,n=(typeof Uint8Array==="undefined"?"undefined":babelHelpers["typeof"](Uint8Array))!==undefined+""?Uint8Array:Array,s=new n(i);s[0]=s[i-1]=1;ki(t,s,e,0,i-1);var o,a=[];for(o=0;o<i;o++){if(s[o]){a.push(t[o])}}return a}function ki(t,e,i,n,s){var o=0,a,r,l;for(r=n+1;r<=s-1;r++){l=Ri(t[r],t[n],t[s],true);if(l>o){a=r;o=l}}if(o>i){e[a]=1;ki(t,e,i,n,a);ki(t,e,i,a,s)}}function Ei(t,e){var i=[t[0]];for(var n=1,s=0,o=t.length;n<o;n++){if(Bi(t[n],t[s])>e){i.push(t[n]);s=n}}if(s<o-1){i.push(t[o-1])}return i}var Ai;function Oi(t,e,i,n,s){var o=n?Ai:Zi(t,i),a=Zi(e,i),r,l,h;Ai=a;while(true){if(!(o|a)){return[t,e]}if(o&a){return false}r=o||a;l=Fi(t,e,r,i,s);h=Zi(l,i);if(r===o){t=l;o=h}else{e=l;a=h}}}function Fi(t,e,i,n,s){var o=e.x-t.x,a=e.y-t.y,r=n.min,l=n.max,h,u;if(i&8){h=t.x+o*(l.y-t.y)/a;u=l.y}else if(i&4){h=t.x+o*(r.y-t.y)/a;u=r.y}else if(i&2){h=l.x;u=t.y+a*(l.x-t.x)/o}else if(i&1){h=r.x;u=t.y+a*(r.x-t.x)/o}return new q(h,u,s)}function Zi(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 Bi(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Ri(t,e,i,n){var s=e.x,o=e.y,a=i.x-s,r=i.y-o,l=a*a+r*r,h;if(l>0){h=((t.x-s)*a+(t.y-o)*r)/l;if(h>1){s=i.x;o=i.y}else if(h>0){s+=a*h;o+=r*h}}a=t.x-s;r=t.y-o;return n?a*a+r*r:new q(s,o)}function Gi(t){return!k(t[0])||babelHelpers["typeof"](t[0][0])!=="object"&&typeof t[0][0]!=="undefined"}function Ni(t){console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead.");return Gi(t)}var Wi=(Object.freeze||Object)({simplify:Mi,pointToSegmentDistance:Si,closestPointOnSegment:Ci,clipSegment:Oi,_getEdgeIntersection:Fi,_getBitCode:Zi,_sqClosestPointOnSegment:Ri,isFlat:Gi,_flat:Ni});function Di(t,e,i){var n,s=[1,4,2,8],o,a,r,l,h,u,c,d;for(o=0,u=t.length;o<u;o++){t[o]._code=Zi(t[o],e)}for(r=0;r<4;r++){c=s[r];n=[];for(o=0,u=t.length,a=u-1;o<u;a=o++){l=t[o];h=t[a];if(!(l._code&c)){if(h._code&c){d=Fi(h,l,c,e,i);d._code=Zi(d,e);n.push(d)}n.push(l)}else if(!(h._code&c)){d=Fi(h,l,c,e,i);d._code=Zi(d,e);n.push(d)}}t=n}return t}var ji=(Object.freeze||Object)({clipPolygon:Di});var Ui={project:function t(e){return new q(e.lng,e.lat)},unproject:function t(e){return new tt(e.y,e.x)},bounds:new X([-180,-90],[180,90])};var Vi={R:6378137,R_MINOR:6356752.314245179,bounds:new X([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function t(e){var i=Math.PI/180,n=this.R,s=e.lat*i,o=this.R_MINOR/n,a=Math.sqrt(1-o*o),r=a*Math.sin(s);var l=Math.tan(Math.PI/4-s/2)/Math.pow((1-r)/(1+r),a/2);s=-n*Math.log(Math.max(l,1e-10));return new q(e.lng*i*n,s)},unproject:function t(e){var i=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),a=Math.exp(-e.y/n),r=Math.PI/2-2*Math.atan(a);for(var l=0,h=.1,u;l<15&&Math.abs(h)>1e-7;l++){u=o*Math.sin(r);u=Math.pow((1-u)/(1+u),o/2);h=Math.PI/2-2*Math.atan(a*u)-r;r+=h}return new tt(r*i,e.x*i/n)}};var qi=(Object.freeze||Object)({LonLat:Ui,Mercator:Vi,SphericalMercator:ot});var Yi=m({},nt,{code:"EPSG:3395",projection:Vi,transformation:function(){var t=.5/(Math.PI*Vi.R);return rt(t,.5,-t,.5)}()});var Ki=m({},nt,{code:"EPSG:4326",projection:Ui,transformation:rt(1/180,1,-1/180,.5)});var Xi=m({},it,{projection:Ui,transformation:rt(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,s=i.lat-e.lat;return Math.sqrt(n*n+s*s)},infinite:true});it.Earth=nt;it.EPSG3395=Yi;it.EPSG3857=lt;it.EPSG900913=ht;it.EPSG4326=Ki;it.Simple=Xi;var Ji=V.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[y(e)]=this;return this},removeInteractiveTarget:function t(e){delete this._map._targets[y(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})}});mi.include({addLayer:function t(e){if(!e._layerAdd){throw new Error("The provided object is not a Layer.")}var i=y(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=y(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&&y(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?k(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[y(e)]=e;this._updateZoomLevels()}},_removeZoomLimit:function t(e){var i=y(e);if(this._zoomBoundLayers[i]){delete this._zoomBoundLayers[i];this._updateZoomLevels()}},_updateZoomLevels:function t(){var e=Infinity,i=-Infinity,n=this._getZoomSpan();for(var s in this._zoomBoundLayers){var o=this._zoomBoundLayers[s].options;e=o.minZoom===undefined?e:Math.min(e,o.minZoom);i=o.maxZoom===undefined?i:Math.max(i,o.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 $i=Ji.extend({initialize:function t(e,i){M(this,i);this._layers={};var n,s;if(e){for(n=0,s=e.length;n<s;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,s;for(n in this._layers){s=this._layers[n];if(s[e]){s[e].apply(s,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 y(e)}});var Qi=$i.extend({addLayer:function t(e){if(this.hasLayer(e)){return this}e.addEventParent(this);$i.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);$i.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 $;for(var i in this._layers){var n=this._layers[i];e.extend(n.getBounds?n.getBounds():n.getLatLng())}return e}});var tn=D.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function t(e){M(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 s=this._createImg(n,i&&i.tagName==="IMG"?i:null);this._setIconStyles(s,e);return s},_setIconStyles:function t(e,i){var n=this.options;var s=n[i+"Size"];if(typeof s==="number"){s=[s,s]}var o=K(s),a=K(i==="shadow"&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,true));e.className="leaflet-marker-"+i+" "+(n.className||"");if(a){e.style.marginLeft=-a.x+"px";e.style.marginTop=-a.y+"px"}if(o){e.style.width=o.x+"px";e.style.height=o.y+"px"}},_createImg:function t(e,i){i=i||document.createElement("img");i.src=e;return i},_getIconUrl:function t(e){return Gt&&this.options[e+"RetinaUrl"]||this.options[e+"Url"]}});function en(t){return new tn(t)}var nn=tn.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(!nn.imagePath){nn.imagePath=this._detectIconPath()}return(this.options.imagePath||nn.imagePath)+tn.prototype._getIconUrl.call(this,e)},_detectIconPath:function t(){var e=ye("div","leaflet-default-icon-path",document.body);var i=be(e,"background-image")||be(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 sn=Ti.extend({initialize:function t(e){this._marker=e},addHooks:function t(){var e=this._marker._icon;if(!this._draggable){this._draggable=new Hi(e,e,true)}this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable();ze(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){He(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,s=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,a=Oe(i._icon),r=n.getPixelBounds(),l=n.getPixelOrigin();var h=J(r.min._subtract(l).add(o),r.max._subtract(l).subtract(o));if(!h.contains(a)){var u=K((Math.max(h.max.x,a.x)-h.max.x)/(r.max.x-h.max.x)-(Math.min(h.min.x,a.x)-h.min.x)/(r.min.x-h.min.x),(Math.max(h.max.y,a.y)-h.max.y)/(r.max.y-h.max.y)-(Math.min(h.min.y,a.y)-h.min.y)/(r.min.y-h.min.y)).multiplyBy(s);n.panBy(u,{animate:false});this._draggable._newPos._add(u);this._draggable._startPos._add(u);Ae(i._icon,this._draggable._newPos);this._onDrag(e);this._panRequest=G(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){N(this._panRequest);this._panRequest=G(this._adjustPan.bind(this,e))}},_onDrag:function t(e){var i=this._marker,n=i._shadow,s=Oe(i._icon),o=i._map.layerPointToLatLng(s);if(n){Ae(n,s)}i._latlng=o;e.latlng=o;e.oldLatLng=this._oldLatLng;i.fire("move",e).fire("drag",e)},_onDragEnd:function t(e){N(this._panRequest);delete this._oldLatLng;this._marker.fire("moveend").fire("dragend",e)}});var on=Ji.extend({options:{icon:new nn,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){M(this,i);this._latlng=et(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=et(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),s=false;if(n!==this._icon){if(this._icon){this._removeIcon()}s=true;if(e.title){n.title=e.title}if(n.tagName==="IMG"){n.alt=e.alt||""}}ze(n,i);if(e.keyboard){n.tabIndex="0"}this._icon=n;if(e.riseOnHover){this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex})}var o=e.icon.createShadow(this._shadow),a=false;if(o!==this._shadow){this._removeShadow();a=true}if(o){ze(o,i);o.alt=""}this._shadow=o;if(e.opacity<1){this._updateOpacity()}if(s){this.getPane().appendChild(this._icon)}this._initInteraction();if(o&&a){this.getPane(e.shadowPane).appendChild(this._shadow)}},_removeIcon:function t(){if(this.options.riseOnHover){this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex})}we(this._icon);this.removeInteractiveTarget(this._icon);this._icon=null},_removeShadow:function t(){if(this._shadow){we(this._shadow)}this._shadow=null},_setPos:function t(e){if(this._icon){Ae(this._icon,e)}if(this._shadow){Ae(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}ze(this._icon,"leaflet-interactive");this.addInteractiveTarget(this._icon);if(sn){var e=this.options.draggable;if(this.dragging){e=this.dragging.enabled();this.dragging.disable()}this.dragging=new sn(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){Ce(this._icon,e)}if(this._shadow){Ce(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 an(t,e){return new on(t,e)}var rn=Ji.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){M(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 ln=rn.extend({options:{fill:true,radius:10},initialize:function t(e,i){M(this,i);this._latlng=et(e);this._radius=this.options.radius},setLatLng:function t(e){var i=this._latlng;this._latlng=et(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;rn.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(),s=[e+n,i+n];this._pxBounds=new X(this._point.subtract(s),this._point.add(s))},_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()}});var hn=ln.extend({initialize:function t(e,i,n){if(typeof i==="number"){i=m({},n,{radius:i})}M(this,i);this._latlng=et(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 $(this._map.layerPointToLatLng(this._point.subtract(e)),this._map.layerPointToLatLng(this._point.add(e)))},setStyle:rn.prototype.setStyle,_project:function t(){var e=this._latlng.lng,i=this._latlng.lat,n=this._map,s=n.options.crs;if(s.distance===nt.distance){var o=Math.PI/180,a=this._mRadius/nt.R/o,r=n.project([i+a,e]),l=n.project([i-a,e]),h=r.add(l).divideBy(2),u=n.unproject(h).lat,c=Math.acos((Math.cos(a*o)-Math.sin(i*o)*Math.sin(u*o))/(Math.cos(i*o)*Math.cos(u*o)))/o;if(isNaN(c)||c===0){c=a/Math.cos(Math.PI/180*i)}this._point=h.subtract(n.getPixelOrigin());this._radius=isNaN(c)?0:h.x-n.project([u,e-c]).x;this._radiusY=h.y-r.y}else{var d=s.unproject(s.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng);this._radius=this._point.x-n.latLngToLayerPoint(d).x}this._updateBounds()}});var un=rn.extend({options:{smoothFactor:1,noClip:false},initialize:function t(e,i){M(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,s=Ri,o,a;for(var r=0,l=this._parts.length;r<l;r++){var h=this._parts[r];for(var u=1,c=h.length;u<c;u++){o=h[u-1];a=h[u];var d=s(e,o,a,true);if(d<i){i=d;n=s(e,o,a)}}}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,s,o,a,r,l=this._rings[0],h=l.length;if(!h){return null}for(e=0,i=0;e<h-1;e++){i+=l[e].distanceTo(l[e+1])/2}if(i===0){return this._map.layerPointToLatLng(l[0])}for(e=0,s=0;e<h-1;e++){o=l[e];a=l[e+1];n=o.distanceTo(a);s+=n;if(s>i){r=(s-i)/n;return this._map.layerPointToLatLng([a.x-r*(a.x-o.x),a.y-r*(a.y-o.y)])}}},getBounds:function t(){return this._bounds},addLatLng:function t(e,i){i=i||this._defaultShape();e=et(e);i.push(e);this._bounds.extend(e);return this.redraw()},_setLatLngs:function t(e){this._bounds=new $;this._latlngs=this._convertLatLngs(e)},_defaultShape:function t(){return Gi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function t(e){var i=[],n=Gi(e);for(var s=0,o=e.length;s<o;s++){if(n){i[s]=et(e[s]);this._bounds.extend(i[s])}else{i[s]=this._convertLatLngs(e[s])}}return i},_project:function t(){var e=new X;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 q(e,e);this._pxBounds=new X([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)])},_projectLatlngs:function t(e,i,n){var s=e[0]instanceof tt,o=e.length,a,r;if(s){r=[];for(a=0;a<o;a++){r[a]=this._map.latLngToLayerPoint(e[a]);n.extend(r[a])}i.push(r)}else{for(a=0;a<o;a++){this._projectLatlngs(e[a],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,s,o,a,r,l,h;for(n=0,o=0,a=this._rings.length;n<a;n++){h=this._rings[n];for(s=0,r=h.length;s<r-1;s++){l=Oi(h[s],h[s+1],e,s,true);if(!l){continue}i[o]=i[o]||[];i[o].push(l[0]);if(l[1]!==h[s+1]||s===r-2){i[o].push(l[1]);o++}}}},_simplifyPoints:function t(){var e=this._parts,i=this.options.smoothFactor;for(var n=0,s=e.length;n<s;n++){e[n]=Mi(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,s,o,a,r,l,h=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(e)){return false}for(n=0,a=this._parts.length;n<a;n++){l=this._parts[n];for(s=0,r=l.length,o=r-1;s<r;o=s++){if(!i&&s===0){continue}if(Si(e,l[o],l[s])<=h){return true}}}return false}});un._flat=Ni;var cn=un.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,s,o,a,r,l,h,u=this._rings[0],c=u.length;if(!c){return null}a=r=l=0;for(e=0,i=c-1;e<c;i=e++){n=u[e];s=u[i];o=n.y*s.x-s.y*n.x;r+=(n.x+s.x)*o;l+=(n.y+s.y)*o;a+=o*3}if(a===0){h=u[0]}else{h=[r/a,l/a]}return this._map.layerPointToLatLng(h)},_convertLatLngs:function t(e){var i=un.prototype._convertLatLngs.call(this,e),n=i.length;if(n>=2&&i[0]instanceof tt&&i[0].equals(i[n-1])){i.pop()}return i},_setLatLngs:function t(e){un.prototype._setLatLngs.call(this,e);if(Gi(this._latlngs)){this._latlngs=[this._latlngs]}},_defaultShape:function t(){return Gi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function t(){var e=this._renderer._bounds,i=this.options.weight,n=new q(i,i);e=new X(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 s=0,o=this._rings.length,a;s<o;s++){a=Di(this._rings[s],e,true);if(a.length){this._parts.push(a)}}},_updatePath:function t(){this._renderer._updatePoly(this,true)},_containsPoint:function t(e){var i=false,n,s,o,a,r,l,h,u;if(!this._pxBounds||!this._pxBounds.contains(e)){return false}for(a=0,h=this._parts.length;a<h;a++){n=this._parts[a];for(r=0,u=n.length,l=u-1;r<u;l=r++){s=n[r];o=n[l];if(s.y>e.y!==o.y>e.y&&e.x<(o.x-s.x)*(e.y-s.y)/(o.y-s.y)+s.x){i=!i}}}return i||un.prototype._containsPoint.call(this,e,true)}});var dn=Qi.extend({initialize:function t(e,i){M(this,i);this._layers={};if(e){this.addData(e)}},addData:function t(e){var i=k(e)?e:e.features,n,s,o;if(i){for(n=0,s=i.length;n<s;n++){o=i[n];if(o.geometries||o.geometry||o.features||o.coordinates){this.addData(o)}}return this}var a=this.options;if(a.filter&&!a.filter(e)){return this}var r=fn(e,a);if(!r){return this}r.feature=yn(e);r.defaultOptions=r.options;this.resetStyle(r);if(a.onEachFeature){a.onEachFeature(e,r)}return this.addLayer(r)},resetStyle:function t(e){if(e===undefined){return this.eachLayer(this.resetStyle,this)}e.options=m({},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,s=[],o=e&&e.pointToLayer,a=e&&e.coordsToLatLng||_n,r,l,h,u;if(!n&&!i){return null}switch(i.type){case"Point":r=a(n);return pn(o,t,r,e);case"MultiPoint":for(h=0,u=n.length;h<u;h++){r=a(n[h]);s.push(pn(o,t,r,e))}return new Qi(s);case"LineString":case"MultiLineString":l=mn(n,i.type==="LineString"?0:1,a);return new un(l,e);case"Polygon":case"MultiPolygon":l=mn(n,i.type==="Polygon"?1:2,a);return new cn(l,e);case"GeometryCollection":for(h=0,u=i.geometries.length;h<u;h++){var c=fn({geometry:i.geometries[h],type:"Feature",properties:t.properties},e);if(c){s.push(c)}}return new Qi(s);default:throw new Error("Invalid GeoJSON object.")}}function pn(t,e,i,n){return t?t(e,i):new on(i,n&&n.markersInheritOptions&&n)}function _n(t){return new tt(t[1],t[0],t[2])}function mn(t,e,i){var n=[];for(var s=0,o=t.length,a;s<o;s++){a=e?mn(t[s],e-1,i):(i||_n)(t[s]);n.push(a)}return n}function vn(t,e){e=typeof e==="number"?e:6;return t.alt!==undefined?[x(t.lng,e),x(t.lat,e),x(t.alt,e)]:[x(t.lng,e),x(t.lat,e)]}function gn(t,e,i,n){var s=[];for(var o=0,a=t.length;o<a;o++){s.push(e?gn(t[o],e-1,i,n):vn(t[o],n))}if(!e&&i){s.push(s[0])}return s}function bn(t,e){return t.feature?m({},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 wn={toGeoJSON:function t(e){return bn(this,{type:"Point",coordinates:vn(this.getLatLng(),e)})}};on.include(wn);hn.include(wn);ln.include(wn);un.include({toGeoJSON:function t(e){var i=!Gi(this._latlngs);var n=gn(this._latlngs,i?1:0,false,e);return bn(this,{type:(i?"Multi":"")+"LineString",coordinates:n})}});cn.include({toGeoJSON:function t(e){var i=!Gi(this._latlngs),n=i&&!Gi(this._latlngs[0]);var s=gn(this._latlngs,n?2:i?1:0,true,e);if(!i){s=[s]}return bn(this,{type:(n?"Multi":"")+"Polygon",coordinates:s})}});$i.include({toMultiPoint:function t(e){var i=[];this.eachLayer((function(t){i.push(t.toGeoJSON(e).geometry.coordinates)}));return bn(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",s=[];this.eachLayer((function(t){if(t.toGeoJSON){var i=t.toGeoJSON(e);if(n){s.push(i.geometry)}else{var o=yn(i);if(o.type==="FeatureCollection"){s.push.apply(s,o.features)}else{s.push(o)}}}}));if(n){return bn(this,{geometries:s,type:"GeometryCollection"})}return{type:"FeatureCollection",features:s}}});var Pn=Ji.extend({options:{opacity:1,alt:"",interactive:false,crossOrigin:false,errorOverlayUrl:"",zIndex:1,className:""},initialize:function t(e,i,n){this._url=e;this._bounds=Q(i);M(this,n)},onAdd:function t(){if(!this._image){this._initImage();if(this.options.opacity<1){this._updateOpacity()}}if(this.options.interactive){ze(this._image,"leaflet-interactive");this.addInteractiveTarget(this._image)}this.getPane().appendChild(this._image);this._reset()},onRemove:function t(){we(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){Te(this._image)}return this},bringToBack:function t(){if(this._map){Le(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=Q(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:ye("img");ze(i,"leaflet-image-layer");if(this._zoomAnimated){ze(i,"leaflet-zoom-animated")}if(this.options.className){ze(i,this.options.className)}i.onselectstart=T;i.onmousemove=T;i.onload=g(this.fire,this,"load");i.onerror=g(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;Ee(this._image,n,i)},_reset:function t(){var e=this._image,i=new X(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=i.getSize();Ae(e,i.min);e.style.width=n.x+"px";e.style.height=n.y+"px"},_updateOpacity:function t(){Ce(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 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:ye("video");ze(i,"leaflet-image-layer");if(this._zoomAnimated){ze(i,"leaflet-zoom-animated")}if(this.options.className){ze(i,this.options.className)}i.onselectstart=T;i.onmousemove=T;i.onloadeddata=g(this.fire,this,"load");if(e){var n=i.getElementsByTagName("source");var s=[];for(var o=0;o<n.length;o++){s.push(n[o].src)}this._url=n.length>0?s:[i.src];return}if(!k(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 r=ye("source");r.src=this._url[a];i.appendChild(r)}}});var Ln=Pn.extend({_initImage:function t(){var e=this._image=this._url;ze(e,"leaflet-image-layer");if(this._zoomAnimated){ze(e,"leaflet-zoom-animated")}if(this.options.className){ze(e,this.options.className)}e.onselectstart=T;e.onmousemove=T}});var xn=Ji.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function t(e,i){M(this,e);this._source=i},onAdd:function t(e){this._zoomAnimated=e._zoomAnimated;if(!this._container){this._initLayout()}if(e._fadeAnimated){Ce(this._container,0)}clearTimeout(this._removeTimeout);this.getPane().appendChild(this._container);this.update();if(e._fadeAnimated){Ce(this._container,1)}this.bringToFront()},onRemove:function t(e){if(e._fadeAnimated){Ce(this._container,0);this._removeTimeout=setTimeout(g(we,undefined,this._container),200)}else{we(this._container)}},getLatLng:function t(){return this._latlng},setLatLng:function t(e){this._latlng=et(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){Te(this._container)}return this},bringToBack:function t(){if(this._map){Le(this._container)}return this},_prepareOpen:function t(e,i,n){if(!(i instanceof Ji)){n=i;i=e}if(i instanceof Qi){for(var s in e._layers){i=e._layers[s];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=K(this.options.offset),n=this._getAnchor();if(this._zoomAnimated){Ae(this._container,e.add(n))}else{i=i.add(e).add(n)}var s=this._containerBottom=-i.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=s+"px";this._container.style.left=o+"px"},_getAnchor:function t(){return[0,0]}});var zn=xn.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){xn.prototype.onAdd.call(this,e);e.fire("popupopen",{popup:this});if(this._source){this._source.fire("popupopen",{popup:this},true);if(!(this._source instanceof rn)){this._source.on("preclick",ti)}}},onRemove:function t(e){xn.prototype.onRemove.call(this,e);e.fire("popupclose",{popup:this});if(this._source){this._source.fire("popupclose",{popup:this},true);if(!(this._source instanceof rn)){this._source.off("preclick",ti)}}},getEvents:function t(){var e=xn.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=ye("div",e+" "+(this.options.className||"")+" leaflet-zoom-animated");var n=this._wrapper=ye("div",e+"-content-wrapper",i);this._contentNode=ye("div",e+"-content",n);ii(n);ei(this._contentNode);Ke(n,"contextmenu",ti);this._tipContainer=ye("div",e+"-tip-container",i);this._tip=ye("div",e+"-tip",this._tipContainer);if(this.options.closeButton){var s=this._closeButton=ye("a",e+"-close-button",i);s.href="#close";s.innerHTML="×";Ke(s,"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 s=e.offsetHeight,o=this.options.maxHeight,a="leaflet-popup-scrolled";if(o&&s>o){i.height=o+"px";ze(e,a)}else{He(e,a)}this._containerWidth=this._container.offsetWidth},_animateZoom:function t(e){var i=this._map._latLngToNewLayerPoint(this._latlng,e.zoom,e.center),n=this._getAnchor();Ae(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(be(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+i,s=this._containerWidth,o=new q(this._containerLeft,-n-this._containerBottom);o._add(Oe(this._container));var a=e.layerPointToContainerPoint(o),r=K(this.options.autoPanPadding),l=K(this.options.autoPanPaddingTopLeft||r),h=K(this.options.autoPanPaddingBottomRight||r),u=e.getSize(),c=0,d=0;if(a.x+s+h.x>u.x){c=a.x+s-u.x+h.x}if(a.x-c-l.x<0){c=a.x-l.x}if(a.y+n+h.y>u.y){d=a.y+n-u.y+h.y}if(a.y-d-l.y<0){d=a.y-l.y}if(c||d){e.fire("autopanstart").panBy([c,d])}},_onCloseButtonClick:function t(e){this._close();si(e)},_getAnchor:function t(){return K(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});mi.mergeOptions({closePopupOnClick:true});mi.include({openPopup: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}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}});Ji.include({bindPopup:function t(e,i){if(e instanceof zn){M(e,i);this._popup=e;e._source=this}else{if(!this._popup||i){this._popup=new zn(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}si(e);if(i instanceof rn){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 Hn=xn.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:false,sticky:false,interactive:false,opacity:.9},onAdd:function t(e){xn.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){xn.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=xn.prototype.getEvents.call(this);if(Zt&&!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=ye("div",i)},_updateLayout:function t(){},_adjustPan:function t(){},_setPosition:function t(e){var i=this._map,n=this._container,s=i.latLngToContainerPoint(i.getCenter()),o=i.layerPointToContainerPoint(e),a=this.options.direction,r=n.offsetWidth,l=n.offsetHeight,h=K(this.options.offset),u=this._getAnchor();if(a==="top"){e=e.add(K(-r/2+h.x,-l+h.y+u.y,true))}else if(a==="bottom"){e=e.subtract(K(r/2-h.x,-h.y,true))}else if(a==="center"){e=e.subtract(K(r/2+h.x,l/2-u.y+h.y,true))}else if(a==="right"||a==="auto"&&o.x<s.x){a="right";e=e.add(K(h.x+u.x,u.y-l/2+h.y,true))}else{a="left";e=e.subtract(K(r+u.x-h.x,l/2-u.y-h.y,true))}He(n,"leaflet-tooltip-right");He(n,"leaflet-tooltip-left");He(n,"leaflet-tooltip-top");He(n,"leaflet-tooltip-bottom");ze(n,"leaflet-tooltip-"+a);Ae(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){Ce(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 K(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});mi.include({openTooltip:function t(e,i,n){if(!(e instanceof Hn)){e=new Hn(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}});Ji.include({bindTooltip:function t(e,i){if(e instanceof Hn){M(e,i);this._tooltip=e;e._source=this}else{if(!this._tooltip||i){this._tooltip=new Hn(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(Zt){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){ze(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){He(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,s;if(this._tooltip.options.sticky&&e.originalEvent){n=this._map.mouseEventToContainerPoint(e.originalEvent);s=this._map.containerPointToLayerPoint(n);i=this._map.layerPointToLatLng(s)}this._tooltip.setLatLng(i)}});var Mn=tn.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){Pe(i);i.appendChild(n.html)}else{i.innerHTML=n.html!==false?n.html:""}if(n.bgPos){var s=K(n.bgPos);i.style.backgroundPosition=-s.x+"px "+-s.y+"px"}this._setIconStyles(i,"icon");return i},createShadow:function t(){return null}});tn.Default=nn;var Sn=Ji.extend({options:{tileSize:256,opacity:1,updateWhenIdle:kt,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){M(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();we(this._container);e._removeZoomLimit(this);this._container=null;this._tileZoom=undefined},bringToFront:function t(){if(this._map){Te(this._container);this._setAutoZIndex(Math.max)}return this},bringToBack:function t(){if(this._map){Le(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=w(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 q?e:new q(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 s=0,o=i.length,a;s<o;s++){a=i[s].style.zIndex;if(i[s]!==this._container&&a){n=e(n,+a)}}if(isFinite(n)){this.options.zIndex=n+e(-1,1);this._updateZIndex()}},_updateOpacity:function t(){if(!this._map){return}if(pt){return}Ce(this._container,this.options.opacity);var e=+new Date,i=false,n=false;for(var s in this._tiles){var o=this._tiles[s];if(!o.current||!o.loaded){continue}var a=Math.min(1,(e-o.loaded)/200);Ce(o.el,a);if(a<1){i=true}else{if(o.active){n=true}else{this._onOpaqueTile(o)}o.active=true}}if(n&&!this._noPrune){this._pruneTiles()}if(i){N(this._fadeFrame);this._fadeFrame=G(this._updateOpacity,this)}},_onOpaqueTile:T,_initContainer:function t(){if(this._container){return}this._container=ye("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{we(this._levels[n].el);this._removeTilesAtZoom(n);this._onRemoveLevel(n);delete this._levels[n]}}var s=this._levels[e],o=this._map;if(!s){s=this._levels[e]={};s.el=ye("div","leaflet-tile-container leaflet-zoom-animated",this._container);s.el.style.zIndex=i;s.origin=o.project(o.unproject(o.getPixelOrigin()),e).round();s.zoom=e;this._setZoomTransform(s,o.getCenter(),o.getZoom());T(s.el.offsetWidth);this._onCreateLevel(s)}this._level=s;return s},_onUpdateLevel:T,_onRemoveLevel:T,_onCreateLevel:T,_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 s=i.coords;if(!this._retainParent(s.x,s.y,s.z,s.z-5)){this._retainChildren(s.x,s.y,s.z,s.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){we(this._levels[e].el);this._onRemoveLevel(e);delete this._levels[e]}this._removeAllTiles();this._tileZoom=undefined},_retainParent:function t(e,i,n,s){var o=Math.floor(e/2),a=Math.floor(i/2),r=n-1,l=new q(+o,+a);l.z=+r;var h=this._tileCoordsToKey(l),u=this._tiles[h];if(u&&u.active){u.retain=true;return true}else if(u&&u.loaded){u.retain=true}if(r>s){return this._retainParent(o,a,r,s)}return false},_retainChildren:function t(e,i,n,s){for(var o=2*e;o<2*e+2;o++){for(var a=2*i;a<2*i+2;a++){var r=new q(o,a);r.z=n+1;var l=this._tileCoordsToKey(r),h=this._tiles[l];if(h&&h.active){h.retain=true;continue}else if(h&&h.loaded){h.retain=true}if(n+1<s){this._retainChildren(o,a,n+1,s)}}}},_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,s){var o=this._clampZoom(Math.round(i));if(this.options.maxZoom!==undefined&&o>this.options.maxZoom||this.options.minZoom!==undefined&&o<this.options.minZoom){o=undefined}var a=this.options.updateWhenZooming&&o!==this._tileZoom;if(!s||a){this._tileZoom=o;if(this._abortLoading){this._abortLoading()}this._updateLevels();this._resetGrid();if(o!==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 s=this._map.getZoomScale(n,e.zoom),o=e.origin.multiplyBy(s).subtract(this._map._getNewPixelOrigin(i,n)).round();if(It){Ee(e.el,o,s)}else{Ae(e.el,o)}},_resetGrid:function t(){var e=this._map,i=e.options.crs,n=this._tileSize=this.getTileSize(),s=this._tileZoom;var o=this._map.getPixelWorldBounds(this._tileZoom);if(o){this._globalTileRange=this._pxBoundsToTileRange(o)}this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(e.project([0,i.wrapLng[0]],s).x/n.x),Math.ceil(e.project([0,i.wrapLng[1]],s).x/n.y)];this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(e.project([i.wrapLat[0],0],s).y/n.x),Math.ceil(e.project([i.wrapLat[1],0],s).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(),s=i.getZoomScale(n,this._tileZoom),o=i.project(e,this._tileZoom).floor(),a=i.getSize().divideBy(s*2);return new X(o.subtract(a),o.add(a))},_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 s=this._getTiledPixelBounds(e),o=this._pxBoundsToTileRange(s),a=o.getCenter(),r=[],l=this.options.keepBuffer,h=new X(o.getBottomLeft().subtract([l,-l]),o.getTopRight().add([l,-l]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y))){throw new Error("Attempted to load an infinite number of tiles")}for(var u in this._tiles){var c=this._tiles[u].coords;if(c.z!==this._tileZoom||!h.contains(new q(c.x,c.y))){this._tiles[u].current=false}}if(Math.abs(n-this._tileZoom)>1){this._setView(e,n);return}for(var d=o.min.y;d<=o.max.y;d++){for(var f=o.min.x;f<=o.max.x;f++){var p=new q(f,d);p.z=this._tileZoom;if(!this._isValidTile(p)){continue}var _=this._tiles[this._tileCoordsToKey(p)];if(_){_.current=true}else{r.push(p)}}}r.sort((function(t,e){return t.distanceTo(a)-e.distanceTo(a)}));if(r.length!==0){if(!this._loading){this._loading=true;this.fire("loading")}var m=document.createDocumentFragment();for(f=0;f<r.length;f++){this._addTile(r[f],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 s=this._tileCoordsToBounds(e);return Q(this.options.bounds).overlaps(s)},_keyToBounds:function t(e){return this._tileCoordsToBounds(this._keyToTileCoords(e))},_tileCoordsToNwSe:function t(e){var i=this._map,n=this.getTileSize(),s=e.scaleBy(n),o=s.add(n),a=i.unproject(s,e.z),r=i.unproject(o,e.z);return[a,r]},_tileCoordsToBounds:function t(e){var i=this._tileCoordsToNwSe(e),n=new $(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 q(+i[0],+i[1]);n.z=+i[2];return n},_removeTile:function t(e){var i=this._tiles[e];if(!i){return}we(i.el);delete this._tiles[e];this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(e)})},_initTile:function t(e){ze(e,"leaflet-tile");var i=this.getTileSize();e.style.width=i.x+"px";e.style.height=i.y+"px";e.onselectstart=T;e.onmousemove=T;if(pt&&this.options.opacity<1){Ce(e,this.options.opacity)}if(vt&&!gt){e.style.WebkitBackfaceVisibility="hidden"}},_addTile:function t(e,i){var n=this._getTilePos(e),s=this._tileCoordsToKey(e);var o=this.createTile(this._wrapCoords(e),g(this._tileReady,this,e));this._initTile(o);if(this.createTile.length<2){G(g(this._tileReady,this,e,null,o))}Ae(o,n);this._tiles[s]={el:o,coords:e,current:true};i.appendChild(o);this.fire("tileloadstart",{tile:o,coords:e})},_tileReady:function t(e,i,n){if(i){this.fire("tileerror",{error:i,tile:n,coords:e})}var s=this._tileCoordsToKey(e);n=this._tiles[s];if(!n){return}n.loaded=+new Date;if(this._map._fadeAnimated){Ce(n.el,0);N(this._fadeFrame);this._fadeFrame=G(this._updateOpacity,this)}else{n.active=true;this._pruneTiles()}if(!i){ze(n.el,"leaflet-tile-loaded");this.fire("tileload",{tile:n.el,coords:e})}if(this._noTilesToLoad()){this._loading=false;this.fire("load");if(pt||!this._map._fadeAnimated){G(this._pruneTiles,this)}else{setTimeout(g(this._pruneTiles,this),250)}}},_getTilePos:function t(e){return e.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function t(e){var i=new q(this._wrapX?P(e.x,this._wrapX):e.x,this._wrapY?P(e.y,this._wrapY):e.y);i.z=e.z;return i},_pxBoundsToTileRange:function t(e){var i=this.getTileSize();return new X(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}});var Cn=Sn.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=M(this,i);if(i.detectRetina&&Gt&&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(!vt){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");Ke(n,"load",g(this._tileOnLoad,this,i,n));Ke(n,"error",g(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:Gt?"@2x":"",s:this._getSubdomain(e),x:e.x,y:e.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-e.y;if(this.options.tms){i["y"]=n}i["-y"]=n}return I(this._url,m(i,this.options))},_tileOnLoad:function t(e,i){if(pt){setTimeout(g(e,this,null,i),0)}else{e(null,i)}},_tileOnError:function t(e,i,n){var s=this.options.errorTileUrl;if(s&&i.getAttribute("src")!==s){i.src=s}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,s=this.options.zoomOffset;if(n){e=i-e}return e+s},_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=T;i.onerror=T;if(!i.complete){i.src=A;we(i);delete this._tiles[e]}}}},_removeTile:function t(e){var i=this._tiles[e];if(!i){return}if(!yt){i.el.setAttribute("src",A)}return Sn.prototype._removeTile.call(this,e)},_tileReady:function t(e,i,n){if(!this._map||n&&n.getAttribute("src")===A){return}return Sn.prototype._tileReady.call(this,e,i,n)}});var In=Cn.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 n=m({},this.defaultWmsParams);for(var s in i){if(!(s in this.options)){n[s]=i[s]}}i=M(this,i);var o=i.detectRetina&&Gt?2:1;var a=this.getTileSize();n.width=a.x*o;n.height=a.y*o;this.wmsParams=n},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;Cn.prototype.onAdd.call(this,e)},getTileUrl:function t(e){var i=this._tileCoordsToNwSe(e),n=this._crs,s=J(n.project(i[0]),n.project(i[1])),o=s.min,a=s.max,r=(this._wmsVersion>=1.3&&this._crs===Ki?[o.y,o.x,a.y,a.x]:[o.x,o.y,a.x,a.y]).join(","),l=Cn.prototype.getTileUrl.call(this,e);return l+S(this.wmsParams,l,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function t(e,i){m(this.wmsParams,e);if(!i){this.redraw()}return this}});Cn.WMS=In;var kn=Ji.extend({options:{padding:.1,tolerance:0},initialize:function t(e){M(this,e);y(this);this._layers=this._layers||{}},onAdd:function t(){if(!this._container){this._initContainer();if(this._zoomAnimated){ze(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),s=Oe(this._container),o=this._map.getSize().multiplyBy(.5+this.options.padding),a=this._map.project(this._center,i),r=this._map.project(e,i),l=r.subtract(a),h=o.multiplyBy(-n).add(s).add(o).subtract(l);if(It){Ee(this._container,h,n)}else{Ae(this._container,h)}},_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 X(n,n.add(i.multiplyBy(1+e*2)).round());this._center=this._map.getCenter();this._zoom=this._map.getZoom()}});var En=kn.extend({getEvents:function t(){var e=kn.prototype.getEvents.call(this);e.viewprereset=this._onViewPreReset;return e},_onViewPreReset:function t(){this._postponeUpdatePaths=true},onAdd:function t(){kn.prototype.onAdd.call(this);this._draw()},_initContainer:function t(){var e=this._container=document.createElement("canvas");Ke(e,"mousemove",this._onMouseMove,this);Ke(e,"click dblclick mousedown mouseup contextmenu",this._onClick,this);Ke(e,"mouseout",this._handleMouseOut,this);this._ctx=e.getContext("2d")},_destroyContainer:function t(){N(this._redrawRequest);delete this._ctx;we(this._container);Je(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}kn.prototype._update.call(this);var e=this._bounds,i=this._container,n=e.getSize(),s=Gt?2:1;Ae(i,e.min);i.width=s*n.x;i.height=s*n.y;i.style.width=n.x+"px";i.style.height=n.y+"px";if(Gt){this._ctx.scale(2,2)}this._ctx.translate(-e.min.x,-e.min.y);this.fire("update")},_reset:function t(){kn.prototype._reset.call(this);if(this._postponeUpdatePaths){this._postponeUpdatePaths=false;this._updatePaths()}},_initPath:function t(e){this._updateDashArray(e);this._layers[y(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 s=i.prev;if(n){n.prev=s}else{this._drawLast=s}if(s){s.next=n}else{this._drawFirst=n}delete e._order;delete this._layers[y(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=[],s,o;for(o=0;o<i.length;o++){s=Number(i[o]);if(isNaN(s)){return}n.push(s)}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||G(this._redraw,this)},_extendRedrawBounds:function t(e){if(e._pxBounds){var i=(e.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new X;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 s=this._drawFirst;s;s=s.next){e=s.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,s,o,a,r=e._parts,l=r.length,h=this._ctx;if(!l){return}h.beginPath();for(n=0;n<l;n++){for(s=0,o=r[n].length;s<o;s++){a=r[n][s];h[s?"lineTo":"moveTo"](a.x,a.y)}if(i){h.closePath()}}this._fillStroke(h,e)},_updateCircle:function t(e){if(!this._drawing||e._empty()){return}var i=e._point,n=this._ctx,s=Math.max(Math.round(e._radius),1),o=(Math.max(Math.round(e._radiusY),1)||s)/s;if(o!==1){n.save();n.scale(1,o)}n.beginPath();n.arc(i.x,i.y/o,s,0,Math.PI*2,false);if(o!==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,s;for(var o=this._drawFirst;o;o=o.next){n=o.layer;if(n.options.interactive&&n._containsPoint(i)&&!this._map._draggableMoved(n)){s=n}}if(s){hi(e);this._fireEvent([s],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){He(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,s;for(var o=this._drawFirst;o;o=o.next){n=o.layer;if(n.options.interactive&&n._containsPoint(i)){s=n}}if(s!==this._hoveredLayer){this._handleMouseOut(e);if(s){ze(this._container,"leaflet-interactive");this._fireEvent([s],e,"mouseover");this._hoveredLayer=s}}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 s=i.prev;if(n){n.prev=s}else{return}if(s){s.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 s=i.prev;if(s){s.next=n}else{return}if(n){n.prev=s}else if(s){this._drawLast=s}i.prev=null;i.next=this._drawFirst;this._drawFirst.prev=i;this._drawFirst=i;this._requestRedraw(e)}});function An(t){return Wt?new En(t):null}var On=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 Fn={_initContainer:function t(){this._container=ye("div","leaflet-vml-container")},_update:function t(){if(this._map._animatingZoom){return}kn.prototype._update.call(this);this.fire("update")},_initPath:function t(e){var i=e._container=On("shape");ze(i,"leaflet-vml-shape "+(this.options.className||""));i.coordsize="1 1";e._path=On("path");i.appendChild(e._path);this._updateStyle(e);this._layers[y(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;we(i);e.removeInteractiveTarget(i);delete this._layers[y(e)]},_updateStyle:function t(e){var i=e._stroke,n=e._fill,s=e.options,o=e._container;o.stroked=!!s.stroke;o.filled=!!s.fill;if(s.stroke){if(!i){i=e._stroke=On("stroke")}o.appendChild(i);i.weight=s.weight+"px";i.color=s.color;i.opacity=s.opacity;if(s.dashArray){i.dashStyle=k(s.dashArray)?s.dashArray.join(" "):s.dashArray.replace(/( *, *)/g," ")}else{i.dashStyle=""}i.endcap=s.lineCap.replace("butt","flat");i.joinstyle=s.lineJoin}else if(i){o.removeChild(i);e._stroke=null}if(s.fill){if(!n){n=e._fill=On("fill")}o.appendChild(n);n.color=s.fillColor||s.color;n.opacity=s.fillOpacity}else if(n){o.removeChild(n);e._fill=null}},_updateCircle:function t(e){var i=e._point.round(),n=Math.round(e._radius),s=Math.round(e._radiusY||n);this._setPath(e,e._empty()?"M0 0":"AL "+i.x+","+i.y+" "+n+","+s+" 0,"+65535*360)},_setPath:function t(e,i){e._path.v=i},_bringToFront:function t(e){Te(e._container)},_bringToBack:function t(e){Le(e._container)}};var Zn=jt?On:ut;var Bn=kn.extend({getEvents:function t(){var e=kn.prototype.getEvents.call(this);e.zoomstart=this._onZoomStart;return e},_initContainer:function t(){this._container=Zn("svg");this._container.setAttribute("pointer-events","none");this._rootGroup=Zn("g");this._container.appendChild(this._rootGroup)},_destroyContainer:function t(){we(this._container);Je(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}kn.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)}Ae(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=Zn("path");if(e.options.className){ze(i,e.options.className)}if(e.options.interactive){ze(i,"leaflet-interactive")}this._updateStyle(e);this._layers[y(e)]=e},_addPath:function t(e){if(!this._rootGroup){this._initContainer()}this._rootGroup.appendChild(e._path);e.addInteractiveTarget(e._path)},_removePath:function t(e){we(e._path);e.removeInteractiveTarget(e._path);delete this._layers[y(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,ct(e._parts,i))},_updateCircle:function t(e){var i=e._point,n=Math.max(Math.round(e._radius),1),s=Math.max(Math.round(e._radiusY),1)||n,o="a"+n+","+s+" 0 1,0 ";var a=e._empty()?"M0 0":"M"+(i.x-n)+","+i.y+o+n*2+",0 "+o+-n*2+",0 ";this._setPath(e,a)},_setPath:function t(e,i){e._path.setAttribute("d",i)},_bringToFront:function t(e){Te(e._path)},_bringToBack:function t(e){Le(e._path)}});if(jt){Bn.include(Fn)}function Rn(t){return Dt||jt?new Bn(t):null}mi.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&&An(e)||Rn(e)}});var Gn=cn.extend({initialize:function t(e,i){cn.prototype.initialize.call(this,this._boundsToLatLngs(e),i)},setBounds:function t(e){return this.setLatLngs(this._boundsToLatLngs(e))},_boundsToLatLngs:function t(e){e=Q(e);return[e.getSouthWest(),e.getNorthWest(),e.getNorthEast(),e.getSouthEast()]}});Bn.create=Zn;Bn.pointsToPath=ct;dn.geometryToLayer=fn;dn.coordsToLatLng=_n;dn.coordsToLatLngs=mn;dn.latLngToCoords=vn;dn.latLngsToCoords=gn;dn.getFeature=bn;dn.asFeature=yn;mi.mergeOptions({boxZoom:true});var Nn=Ti.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(){Ke(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function t(){Je(this._container,"mousedown",this._onMouseDown,this)},moved:function t(){return this._moved},_destroy:function t(){we(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();Fe();Ge();this._startPoint=this._map.mouseEventToContainerPoint(e);Ke(document,{contextmenu:si,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function t(e){if(!this._moved){this._moved=true;this._box=ye("div","leaflet-zoom-box",this._container);ze(this._container,"leaflet-crosshair");this._map.fire("boxzoomstart")}this._point=this._map.mouseEventToContainerPoint(e);var i=new X(this._point,this._startPoint),n=i.getSize();Ae(this._box,i.min);this._box.style.width=n.x+"px";this._box.style.height=n.y+"px"},_finish:function t(){if(this._moved){we(this._box);He(this._container,"leaflet-crosshair")}Ze();Ne();Je(document,{contextmenu:si,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(g(this._resetState,this),0);var i=new $(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()}}});mi.addInitHook("addHandler","boxZoom",Nn);mi.mergeOptions({doubleClickZoom:true});var Wn=Ti.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(),s=i.options.zoomDelta,o=e.originalEvent.shiftKey?n-s:n+s;if(i.options.doubleClickZoom==="center"){i.setZoom(o)}else{i.setZoomAround(e.containerPoint,o)}}});mi.addInitHook("addHandler","doubleClickZoom",Wn);mi.mergeOptions({dragging:true,inertia:!gt,inertiaDeceleration:3400,inertiaMaxSpeed:Infinity,easeLinearity:.2,worldCopyJump:false,maxBoundsViscosity:0});var Dn=Ti.extend({addHooks:function t(){if(!this._draggable){var e=this._map;this._draggable=new Hi(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)}}ze(this._map._container,"leaflet-grab leaflet-touch-drag");this._draggable.enable();this._positions=[];this._times=[]},removeHooks:function t(){He(this._map._container,"leaflet-grab");He(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=Q(this._map.options.maxBounds);this._offsetLimit=J(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,s=this._draggable._newPos.x,o=(s-i+n)%e+i-n,a=(s+i+n)%e-i-n,r=Math.abs(o+n)<Math.abs(a+n)?o:a;this._draggable._absPos=this._draggable._newPos.clone();this._draggable._newPos.x=r},_onDragEnd:function t(e){var i=this._map,n=i.options,s=!n.inertia||this._times.length<2;i.fire("dragend",e);if(s){i.fire("moveend")}else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),a=(this._lastTime-this._times[0])/1e3,r=n.easeLinearity,l=o.multiplyBy(r/a),h=l.distanceTo([0,0]),u=Math.min(n.inertiaMaxSpeed,h),c=l.multiplyBy(u/h),d=u/(n.inertiaDeceleration*r),f=c.multiplyBy(-d/2).round();if(!f.x&&!f.y){i.fire("moveend")}else{f=i._limitOffset(f,i.options.maxBounds);G((function(){i.panBy(f,{duration:d,easeLinearity:r,noMoveStart:true,animate:true})}))}}}});mi.addInitHook("addHandler","dragging",Dn);mi.mergeOptions({keyboard:true,keyboardPanDelta:80});var jn=Ti.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"}Ke(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();Je(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,s=e.scrollLeft||i.scrollLeft;this._map._container.focus();window.scrollTo(s,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,s,o;for(s=0,o=n.left.length;s<o;s++){i[n.left[s]]=[-1*e,0]}for(s=0,o=n.right.length;s<o;s++){i[n.right[s]]=[e,0]}for(s=0,o=n.down.length;s<o;s++){i[n.down[s]]=[0,e]}for(s=0,o=n.up.length;s<o;s++){i[n.up[s]]=[0,-1*e]}},_setZoomDelta:function t(e){var i=this._zoomKeys={},n=this.keyCodes,s,o;for(s=0,o=n.zoomIn.length;s<o;s++){i[n.zoomIn[s]]=e}for(s=0,o=n.zoomOut.length;s<o;s++){i[n.zoomOut[s]]=-e}},_addHooks:function t(){Ke(document,"keydown",this._onKeyDown,this)},_removeHooks:function t(){Je(document,"keydown",this._onKeyDown,this)},_onKeyDown:function t(e){if(e.altKey||e.ctrlKey||e.metaKey){return}var i=e.keyCode,n=this._map,s;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress){s=this._panKeys[i];if(e.shiftKey){s=K(s).multiplyBy(3)}n.panBy(s);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}si(e)}});mi.addInitHook("addHandler","keyboard",jn);mi.mergeOptions({scrollWheelZoom:true,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Un=Ti.extend({addHooks:function t(){Ke(this._map._container,"mousewheel",this._onWheelScroll,this);this._delta=0},removeHooks:function t(){Je(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function t(e){var i=ri(e);var n=this._map.options.wheelDebounceTime;this._delta+=i;this._lastMousePos=this._map.mouseEventToContainerPoint(e);if(!this._startTime){this._startTime=+new Date}var s=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer);this._timer=setTimeout(g(this._performZoom,this),s);si(e)},_performZoom:function t(){var e=this._map,i=e.getZoom(),n=this._map.options.zoomSnap||0;e._stop();var s=this._delta/(this._map.options.wheelPxPerZoomLevel*4),o=4*Math.log(2/(1+Math.exp(-Math.abs(s))))/Math.LN2,a=n?Math.ceil(o/n)*n:o,r=e._limitZoom(i+(this._delta>0?a:-a))-i;this._delta=0;this._startTime=null;if(!r){return}if(e.options.scrollWheelZoom==="center"){e.setZoom(i+r)}else{e.setZoomAround(this._lastMousePos,i+r)}}});mi.addInitHook("addHandler","scrollWheelZoom",Un);mi.mergeOptions({tap:true,tapTolerance:15});var Vn=Ti.extend({addHooks:function t(){Ke(this._map._container,"touchstart",this._onDown,this)},removeHooks:function t(){Je(this._map._container,"touchstart",this._onDown,this)},_onDown:function t(e){if(!e.touches){return}ni(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 q(i.clientX,i.clientY);if(n.tagName&&n.tagName.toLowerCase()==="a"){ze(n,"leaflet-active")}this._holdTimeout=setTimeout(g((function(){if(this._isTapValid()){this._fireClick=false;this._onUp();this._simulateEvent("contextmenu",i)}}),this),1e3);this._simulateEvent("mousedown",i);Ke(document,{touchmove:this._onMove,touchend:this._onUp},this)},_onUp:function t(e){clearTimeout(this._holdTimeout);Je(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"){He(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 q(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(Zt&&!Ft){mi.addInitHook("addHandler","tap",Vn)}mi.mergeOptions({touchZoom:Zt&&!gt,bounceAtZoomLimits:true});var qn=Ti.extend({addHooks:function t(){ze(this._map._container,"leaflet-touch-zoom");Ke(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function t(){He(this._map._container,"leaflet-touch-zoom");Je(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]),s=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(s)._divideBy(2))}this._startDist=n.distanceTo(s);this._startZoom=i.getZoom();this._moved=false;this._zooming=true;i._stop();Ke(document,"touchmove",this._onTouchMove,this);Ke(document,"touchend",this._onTouchEnd,this);ni(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]),s=i.mouseEventToContainerPoint(e.touches[1]),o=n.distanceTo(s)/this._startDist;this._zoom=i.getScaleZoom(o,this._startZoom);if(!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&o>1)){this._zoom=i._limitZoom(this._zoom)}if(i.options.touchZoom==="center"){this._center=this._startLatLng;if(o===1){return}}else{var a=n._add(s)._divideBy(2)._subtract(this._centerPoint);if(o===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}N(this._animRequest);var r=g(i._move,i,this._center,this._zoom,{pinch:true,round:false});this._animRequest=G(r,this,true);ni(e)},_onTouchEnd:function t(){if(!this._moved||!this._zooming){this._zooming=false;return}this._zooming=false;N(this._animRequest);Je(document,"touchmove",this._onTouchMove);Je(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))}}});mi.addInitHook("addHandler","touchZoom",qn);mi.BoxZoom=Nn;mi.DoubleClickZoom=Wn;mi.Drag=Dn;mi.Keyboard=jn;mi.ScrollWheelZoom=Un;mi.Tap=Vn;mi.TouchZoom=qn;Object.freeze=_;function Yn(t,e,i){Kn(t,e);e.set(t,i)}function Kn(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}var Xn=new WeakMap;var Jn=new WeakMap;var $n=new WeakMap;var Qn=new WeakMap;var ts=function(){function t(e){babelHelpers.classCallCheck(this,t);Yn(this,Xn,{writable:true,value:void 0});Yn(this,Jn,{writable:true,value:void 0});Yn(this,$n,{writable:true,value:false});Yn(this,Qn,{writable:true,value:null});babelHelpers.classPrivateFieldSet(this,Xn,e.token);babelHelpers.classPrivateFieldSet(this,Jn,e.sourceRepository)}babelHelpers.createClass(t,[{key:"refreshToken",value:function t(){var e=this;if(babelHelpers.classPrivateFieldGet(this,$n)){return babelHelpers.classPrivateFieldGet(this,Qn)}babelHelpers.classPrivateFieldSet(this,Qn,babelHelpers.classPrivateFieldGet(this,Jn).getProps().then((function(t){e.token=t.sourceParams.token;babelHelpers.classPrivateFieldSet(e,$n,false);return t.sourceParams.token}))["catch"]((function(t){babelHelpers.classPrivateFieldSet(e,$n,false);console.error(t)})));babelHelpers.classPrivateFieldSet(this,$n,true);return babelHelpers.classPrivateFieldGet(this,Qn)}},{key:"token",get:function t(){return babelHelpers.classPrivateFieldGet(this,Xn)},set:function t(e){babelHelpers.classPrivateFieldSet(this,Xn,e)}}]);return t}();function es(t,e){ns(t,e);e.add(t)}function is(t,e,i){ns(t,e);e.set(t,i)}function ns(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function ss(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var os=new WeakMap;var as=new WeakMap;var rs=new WeakMap;var ls=new WeakMap;var hs=new WeakSet;var us=function(t){babelHelpers.inherits(e,t);function e(){var t;var i;babelHelpers.classCallCheck(this,e);for(var n=arguments.length,s=new Array(n),o=0;o<n;o++){s[o]=arguments[o]}i=babelHelpers.possibleConstructorReturn(this,(t=babelHelpers.getPrototypeOf(e)).call.apply(t,[this].concat(s)));es(babelHelpers.assertThisInitialized(i),hs);is(babelHelpers.assertThisInitialized(i),os,{writable:true,value:void 0});is(babelHelpers.assertThisInitialized(i),as,{writable:true,value:void 0});is(babelHelpers.assertThisInitialized(i),rs,{writable:true,value:[]});is(babelHelpers.assertThisInitialized(i),ls,{writable:true,value:false});return i}babelHelpers.createClass(e,[{key:"setTokenContainer",value:function t(e){babelHelpers.classPrivateFieldSet(this,os,e)}},{key:"setHostName",value:function t(e){babelHelpers.classPrivateFieldSet(this,as,e)}},{key:"requestTile",value:function t(e,i,n,s){var o=this;fetch(e,{method:"GET",cache:"force-cache",headers:new Headers({Authorization:"Bearer ".concat(babelHelpers.classPrivateFieldGet(this,os).token),"Bx-Location-Osm-Host":babelHelpers.classPrivateFieldGet(this,as)})}).then((function(t){if(t.status===200){return t.blob()}if(t.status===401&&!s){ss(o,hs,cs).call(o,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 s=document.createElement("img");if(babelHelpers.classPrivateFieldGet(this,ls)){babelHelpers.classPrivateFieldGet(this,rs).push([n,s,i])}else{this.requestTile(n,s,i,false)}return s}}]);return e}(Cn);function cs(t,e,i){var n=this;babelHelpers.classPrivateFieldSet(this,ls,true);babelHelpers.classPrivateFieldGet(this,rs).push([t,e,i]);babelHelpers.classPrivateFieldGet(this,os).refreshToken().then((function(t){var e=function t(){var e=babelHelpers.classPrivateFieldGet(n,rs).pop();setTimeout((function(){n.requestTile(e[0],e[1],e[2],true)}),1)};while(babelHelpers.classPrivateFieldGet(n,rs).length>0){e()}babelHelpers.classPrivateFieldSet(n,ls,false)}))}tn.Default.imagePath="/bitrix/js/location/osm/leaflet/images/";var ds;function fs(t,e){_s(t,e);e.add(t)}function ps(t,e,i){_s(t,e);e.set(t,i)}function _s(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function ms(t,e,i){gs(t,e);vs(i,"get");return bs(t,i)}function vs(t,e){if(t===undefined){throw new TypeError("attempted to "+e+" private static field before its declaration")}}function gs(t,e){if(t!==e){throw new TypeError("Private static access of wrong provenance")}}function bs(t,e){if(e.get){return e.get.call(t)}return e.value}function ys(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var ws=new WeakMap;var Ps=new WeakMap;var Ts=new WeakMap;var Ls=new WeakMap;var xs=new WeakMap;var zs=new WeakMap;var Hs=new WeakMap;var Ms=new WeakMap;var Ss=new WeakMap;var Cs=new WeakMap;var Is=new WeakMap;var ks=new WeakMap;var Es=new WeakMap;var As=new WeakMap;var Os=new WeakMap;var Fs=new WeakMap;var Zs=new WeakMap;var Bs=new WeakMap;var Rs=new WeakSet;var Gs=new WeakSet;var Ns=new WeakSet;var Ws=new WeakSet;var Ds=new WeakSet;var js=new WeakSet;var Us=new WeakSet;var Vs=function(t){babelHelpers.inherits(e,t);function e(t){var i;babelHelpers.classCallCheck(this,e);i=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this,t));fs(babelHelpers.assertThisInitialized(i),Us);fs(babelHelpers.assertThisInitialized(i),js);fs(babelHelpers.assertThisInitialized(i),Ds);fs(babelHelpers.assertThisInitialized(i),Ws);fs(babelHelpers.assertThisInitialized(i),Ns);fs(babelHelpers.assertThisInitialized(i),Gs);fs(babelHelpers.assertThisInitialized(i),Rs);ps(babelHelpers.assertThisInitialized(i),ws,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Ps,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Ts,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Ls,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),xs,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),zs,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Hs,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Ms,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Ss,{writable:true,value:false});ps(babelHelpers.assertThisInitialized(i),Cs,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Is,{writable:true,value:700});ps(babelHelpers.assertThisInitialized(i),ks,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Es,{writable:true,value:'<a href="https://leafletjs.com" title="A JS library for interactive maps" target="_blank">Leaflet</a> | Map data © <a href="https://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors'});ps(babelHelpers.assertThisInitialized(i),As,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Os,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Fs,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Zs,{writable:true,value:void 0});ps(babelHelpers.assertThisInitialized(i),Bs,{writable:true,value:false});babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Ls,t.languageId);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),xs,t.sourceLanguageId);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Ms,t.geocodingService);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),As,t.mapFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Os,t.markerFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Fs,t.tileLayerFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),ks,"".concat(t.mapServiceUrl,"/hot/en/{z}/{x}/{y}.png"));babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Zs,t.locationRepository);return i}babelHelpers.createClass(e,[{key:"onLocationChangedEventSubscribe",value:function t(i){this.subscribe(ms(e,e,to),i)}},{key:"onStartChangingSubscribe",value:function t(i){this.subscribe(ms(e,e,eo),i)}},{key:"onEndChangingSubscribe",value:function t(i){this.subscribe(ms(e,e,io),i)}},{key:"onMapViewChangedSubscribe",value:function t(i){this.subscribe(ms(e,e,no),i)}},{key:"render",value:function t(s){var o=this;babelHelpers.classPrivateFieldSet(this,Ps,s.mode);babelHelpers.classPrivateFieldSet(this,Ts,s.location||null);var a=i.Tag.render(ds||(ds=babelHelpers.taggedTemplateLiteral(['<div class="location-osm-map-container"></div>'])));s.mapContainer.appendChild(a);return new Promise((function(t){babelHelpers.classPrivateFieldSet(o,zs,babelHelpers.classPrivateFieldGet(o,As).call(o,a,{attributionControl:false,zoomControl:BX.prop.getBoolean(s,"zoomControl",true)}));babelHelpers.classPrivateFieldGet(o,zs).on("load",(function(){t()}));babelHelpers.classPrivateFieldGet(o,zs).on("click",(function(t){ys(o,Gs,Ys).call(o,t.latlng.lat,t.latlng.lng)}));window.addEventListener("resize",(function(t){babelHelpers.classPrivateFieldSet(o,Bs,true);ys(o,Us,Qs).call(o)}));babelHelpers.classPrivateFieldSet(o,Hs,babelHelpers.classPrivateFieldGet(o,Os).call(o,[babelHelpers.classPrivateFieldGet(o,Ts).latitude,babelHelpers.classPrivateFieldGet(o,Ts).longitude],{draggable:babelHelpers.classPrivateFieldGet(o,Ps)===n.ControlMode.edit,autoPan:true}));babelHelpers.classPrivateFieldGet(o,Hs).addTo(babelHelpers.classPrivateFieldGet(o,zs));babelHelpers.classPrivateFieldGet(o,Hs).on("move",(function(t){ys(o,js,$s).call(o,t.latlng.lat,t.latlng.lng)}));babelHelpers.classPrivateFieldGet(o,zs).setView([babelHelpers.classPrivateFieldGet(o,Ts).latitude,babelHelpers.classPrivateFieldGet(o,Ts).longitude],e.getZoomByLocation(babelHelpers.classPrivateFieldGet(o,Ts)));var i=babelHelpers.classPrivateFieldGet(o,Fs).call();i.initialize(babelHelpers.classPrivateFieldGet(o,ks),{maxZoom:18});i.addTo(babelHelpers.classPrivateFieldGet(o,zs));babelHelpers.classPrivateFieldGet(o,zs).on("zoomend",(function(){babelHelpers.classPrivateFieldSet(o,ws,babelHelpers.classPrivateFieldGet(o,zs).getZoom())}));var r=new gi.Attribution;r.setPrefix("");r.addAttribution(babelHelpers.classPrivateFieldGet(o,Es));babelHelpers.classPrivateFieldGet(o,zs).addControl(r)}))}},{key:"onMapShow",value:function t(){if(babelHelpers.classPrivateFieldGet(this,Bs)){babelHelpers.classPrivateFieldSet(this,Bs,false);ys(this,Us,Qs).call(this)}}},{key:"destroy",value:function t(){i.Event.unbindAll(this);babelHelpers.classPrivateFieldGet(this,zs).remove();babelHelpers.classPrivateFieldGet(this,Hs).remove();babelHelpers.get(babelHelpers.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"mode",set:function t(e){babelHelpers.classPrivateFieldSet(this,Ps,e);if(babelHelpers.classPrivateFieldGet(this,Hs)){babelHelpers.classPrivateFieldGet(this,Hs).draggable=e===n.ControlMode.edit}},get:function t(){return babelHelpers.classPrivateFieldGet(this,Ps)}},{key:"map",get:function t(){return babelHelpers.classPrivateFieldGet(this,zs)},set:function t(e){babelHelpers.classPrivateFieldSet(this,zs,e)}},{key:"marker",get:function t(){return babelHelpers.classPrivateFieldGet(this,Hs)},set:function t(e){babelHelpers.classPrivateFieldSet(this,Hs,e)}},{key:"zoom",get:function t(){return babelHelpers.classPrivateFieldGet(this,ws)},set:function t(e){babelHelpers.classPrivateFieldSet(this,ws,e);if(babelHelpers.classPrivateFieldGet(this,zs)){babelHelpers.classPrivateFieldGet(this,zs).setZoom(e)}}},{key:"location",set:function t(e){babelHelpers.classPrivateFieldSet(this,Ts,e);if(e){if(babelHelpers.classPrivateFieldGet(this,Hs)){babelHelpers.classPrivateFieldSet(this,Ss,true);babelHelpers.classPrivateFieldGet(this,Hs).setLatLng([e.latitude,e.longitude]);babelHelpers.classPrivateFieldSet(this,Ss,false)}if(babelHelpers.classPrivateFieldGet(this,zs)){if(!babelHelpers.classPrivateFieldGet(this,zs).hasLayer(babelHelpers.classPrivateFieldGet(this,Hs))){babelHelpers.classPrivateFieldGet(this,Hs).addTo(babelHelpers.classPrivateFieldGet(this,zs))}babelHelpers.classPrivateFieldGet(this,zs).panTo([e.latitude,e.longitude])}}else if(babelHelpers.classPrivateFieldGet(this,Hs)){babelHelpers.classPrivateFieldGet(this,Hs).remove()}ys(this,Rs,qs).call(this)},get:function t(){return babelHelpers.classPrivateFieldGet(this,Ts)}}]);return e}(n.MapBase);function qs(){if(!babelHelpers.classPrivateFieldGet(this,Ts)){return}var t=Vs.getZoomByLocation(babelHelpers.classPrivateFieldGet(this,Ts));if(t!==null&&t!==babelHelpers.classPrivateFieldGet(this,ws)){this.zoom=t}}function Ys(t,e){if(babelHelpers.classPrivateFieldGet(this,Ps)===n.ControlMode.edit){if(!babelHelpers.classPrivateFieldGet(this,zs).hasLayer(babelHelpers.classPrivateFieldGet(this,Hs))){babelHelpers.classPrivateFieldGet(this,Hs).addTo(babelHelpers.classPrivateFieldGet(this,zs))}babelHelpers.classPrivateFieldGet(this,Hs).setLatLng([t,e]);ys(this,Ns,Ks).call(this,t,e)}}function Ks(t,e){var s=this;if(babelHelpers.classPrivateFieldGet(this,Cs)!==null){clearTimeout(babelHelpers.classPrivateFieldGet(this,Cs))}babelHelpers.classPrivateFieldSet(this,Cs,setTimeout((function(){var o=i.Text.getRandom();s.emit(ms(Vs,Vs,eo),{requestId:o});babelHelpers.classPrivateFieldSet(s,Cs,null);babelHelpers.classPrivateFieldGet(s,zs).panTo([t,e]);var a=new n.Point(t,e);babelHelpers.classPrivateFieldGet(s,Ms).reverse(a,ys(s,Ws,Xs).call(s)).then((function(t){var e;if(t){e=babelHelpers.classPrivateFieldGet(s,Zs).findByExternalId(t.externalId,ma.code,babelHelpers.classPrivateFieldGet(s,Ls)).then((function(t){if(t){t.longitude=a.longitude;if(t.address){t.address.longitude=a.longitude}t.latitude=a.latitude;if(t.address){t.address.latitude=a.latitude}}return t}))}else{e=new Promise((function(t){t(null)}))}return e})).then((function(t){s.emit(ms(Vs,Vs,io),{requestId:o});ys(s,Ds,Js).call(s,t)}))["catch"]((function(t){s.emit(ms(Vs,Vs,io),{requestId:o});n.ErrorPublisher.getInstance().notify(t.errors)}))}),babelHelpers.classPrivateFieldGet(this,Is)))}function Xs(){return babelHelpers.classPrivateFieldGet(this,ws)>=15?18:babelHelpers.classPrivateFieldGet(this,ws)}function Js(t){if(babelHelpers.classPrivateFieldGet(this,Ps)===n.ControlMode.edit){this.emit(ms(Vs,Vs,to),{location:t})}}function $s(t,e){if(!babelHelpers.classPrivateFieldGet(this,Ss)&&babelHelpers.classPrivateFieldGet(this,Ps)===n.ControlMode.edit){ys(this,Ns,Ks).call(this,t,e)}}function Qs(){var t=this;setTimeout((function(){babelHelpers.classPrivateFieldGet(t,zs).invalidateSize()}),10)}var to={writable:true,value:"onChanged"};var eo={writable:true,value:"onStartChanging"};var io={writable:true,value:"onEndChanging"};var no={writable:true,value:"onMapViewChanged"};var so,oo;function ao(t,e){lo(t,e);e.add(t)}function ro(t,e,i){lo(t,e);e.set(t,i)}function lo(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function ho(t,e,i){co(t,e);uo(i,"get");return fo(t,i)}function uo(t,e){if(t===undefined){throw new TypeError("attempted to "+e+" private static field before its declaration")}}function co(t,e){if(t!==e){throw new TypeError("Private static access of wrong provenance")}}function fo(t,e){if(e.get){return e.get.call(t)}return e.value}function po(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var _o=new WeakMap;var mo=new WeakMap;var vo=new WeakMap;var go=new WeakMap;var bo=new WeakMap;var yo=new WeakMap;var wo=new WeakMap;var Po=new WeakMap;var To=new WeakMap;var Lo=new WeakMap;var xo=new WeakMap;var zo=new WeakMap;var Ho=new WeakMap;var Mo=new WeakMap;var So=new WeakMap;var Co=new WeakMap;var Io=new WeakMap;var ko=new WeakMap;var Eo=new WeakMap;var Ao=new WeakSet;var Oo=new WeakSet;var Fo=new WeakSet;var Zo=new WeakSet;var Bo=new WeakSet;var Ro=new WeakSet;var Go=new WeakSet;var No=new WeakSet;var Wo=new WeakSet;var Do=function(t){babelHelpers.inherits(e,t);function e(t){var i;babelHelpers.classCallCheck(this,e);i=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this,t));ao(babelHelpers.assertThisInitialized(i),Wo);ao(babelHelpers.assertThisInitialized(i),No);ao(babelHelpers.assertThisInitialized(i),Go);ao(babelHelpers.assertThisInitialized(i),Ro);ao(babelHelpers.assertThisInitialized(i),Bo);ao(babelHelpers.assertThisInitialized(i),Zo);ao(babelHelpers.assertThisInitialized(i),Fo);ao(babelHelpers.assertThisInitialized(i),Oo);ao(babelHelpers.assertThisInitialized(i),Ao);ro(babelHelpers.assertThisInitialized(i),_o,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),mo,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),vo,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),go,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),bo,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),yo,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),wo,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),Po,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),To,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),Lo,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),xo,{writable:true,value:700});ro(babelHelpers.assertThisInitialized(i),zo,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),Ho,{writable:true,value:'<a href="https://leafletjs.com" title="A JS library for interactive maps" target="_blank">Leaflet</a> | Map data © <a href="https://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> contributors'});ro(babelHelpers.assertThisInitialized(i),Mo,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),So,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),Co,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),Io,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),ko,{writable:true,value:void 0});ro(babelHelpers.assertThisInitialized(i),Eo,{writable:true,value:false});babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),go,t.languageId);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),bo,t.sourceLanguageId);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),To,t.geocodingService);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Mo,t.mapFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),So,t.markerFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Co,t.iconFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),Io,t.tileLayerFactoryMethod);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),zo,"".concat(t.mapServiceUrl,"/hot/en/{z}/{x}/{y}.png"));babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),ko,t.locationRepository);return i}babelHelpers.createClass(e,[{key:"panTo",value:function t(e,i){if(babelHelpers.classPrivateFieldGet(this,yo)){babelHelpers.classPrivateFieldGet(this,yo).panTo([e,i])}}},{key:"onLocationChangedEventSubscribe",value:function t(i){this.subscribe(ho(e,e,Qo),i)}},{key:"onStartChangingSubscribe",value:function t(i){this.subscribe(ho(e,e,ta),i)}},{key:"onEndChangingSubscribe",value:function t(i){this.subscribe(ho(e,e,ea),i)}},{key:"onMapViewChangedSubscribe",value:function t(i){this.subscribe(ho(e,e,ia),i)}},{key:"render",value:function t(s){var o=this;babelHelpers.classPrivateFieldSet(this,mo,s.mode);babelHelpers.classPrivateFieldSet(this,vo,s.location||null);var a=i.Tag.render(so||(so=babelHelpers.taggedTemplateLiteral(['<div class="location-osm-map-mobile-container"></div>'])));s.mapContainer.appendChild(a);return new Promise((function(t){babelHelpers.classPrivateFieldSet(o,yo,babelHelpers.classPrivateFieldGet(o,Mo).call(o,a,{attributionControl:false,zoomControl:BX.prop.getBoolean(s,"zoomControl",true)}));babelHelpers.classPrivateFieldGet(o,yo).on("load",(function(){t()}));if(babelHelpers.classPrivateFieldGet(o,mo)===n.ControlMode.edit){babelHelpers.classPrivateFieldSet(o,Po,i.Tag.render(oo||(oo=babelHelpers.taggedTemplateLiteral(['<div class="location-map-mobile-center-marker"></div>']))));a.appendChild(babelHelpers.classPrivateFieldGet(o,Po))}else{babelHelpers.classPrivateFieldSet(o,wo,babelHelpers.classPrivateFieldGet(o,So).call(o,[babelHelpers.classPrivateFieldGet(o,vo).latitude,babelHelpers.classPrivateFieldGet(o,vo).longitude],{icon:babelHelpers.classPrivateFieldGet(o,Co).call(o,{iconUrl:"/bitrix/js/location/css/image/marker.png",iconSize:[26,37],iconAnchor:[13,37]})}));babelHelpers.classPrivateFieldGet(o,wo).addTo(babelHelpers.classPrivateFieldGet(o,yo))}babelHelpers.classPrivateFieldGet(o,yo).setView([babelHelpers.classPrivateFieldGet(o,vo).latitude,babelHelpers.classPrivateFieldGet(o,vo).longitude],e.getZoomByLocation(babelHelpers.classPrivateFieldGet(o,vo)));var r=babelHelpers.classPrivateFieldGet(o,Io).call();r.initialize(babelHelpers.classPrivateFieldGet(o,zo),{maxZoom:18});r.addTo(babelHelpers.classPrivateFieldGet(o,yo));babelHelpers.classPrivateFieldGet(o,yo).on("zoomstart",(function(t){return po(o,Bo,Yo).call(o)}));babelHelpers.classPrivateFieldGet(o,yo).on("zoomend",(function(t){return po(o,Ro,Ko).call(o)}));var l=new gi.Attribution;l.setPrefix("");l.addAttribution(babelHelpers.classPrivateFieldGet(o,Ho));babelHelpers.classPrivateFieldGet(o,yo).addControl(l);babelHelpers.classPrivateFieldGet(o,yo).on("move",(function(t){return po(o,Oo,Uo).call(o)}));babelHelpers.classPrivateFieldGet(o,yo).on("movestart",(function(t){return po(o,Fo,Vo).call(o)}));babelHelpers.classPrivateFieldGet(o,yo).on("moveend",(function(t){return po(o,Zo,qo).call(o)}));if(s.searchOnRender){var h=babelHelpers.classPrivateFieldGet(o,yo).getCenter();po(o,Go,Xo).call(o,h.lat,h.lng)}}))}},{key:"destroy",value:function t(){i.Event.unbindAll(this);babelHelpers.classPrivateFieldGet(this,yo).remove();babelHelpers.get(babelHelpers.getPrototypeOf(e.prototype),"destroy",this).call(this)}},{key:"mode",set:function t(e){babelHelpers.classPrivateFieldSet(this,mo,e)},get:function t(){return babelHelpers.classPrivateFieldGet(this,mo)}},{key:"map",get:function t(){return babelHelpers.classPrivateFieldGet(this,yo)},set:function t(e){babelHelpers.classPrivateFieldSet(this,yo,e)}},{key:"zoom",get:function t(){return babelHelpers.classPrivateFieldGet(this,_o)},set:function t(e){babelHelpers.classPrivateFieldSet(this,_o,e);if(babelHelpers.classPrivateFieldGet(this,yo)){babelHelpers.classPrivateFieldGet(this,yo).setZoom(e)}}},{key:"location",set:function t(e){babelHelpers.classPrivateFieldSet(this,vo,e);if(e){this.panTo(e.latitude,e.longitude)}po(this,Ao,jo).call(this)},get:function t(){return babelHelpers.classPrivateFieldGet(this,vo)}}]);return e}(n.MapBase);function jo(){if(!babelHelpers.classPrivateFieldGet(this,vo)){return}var t=Do.getZoomByLocation(babelHelpers.classPrivateFieldGet(this,vo));if(t!==null&&t!==babelHelpers.classPrivateFieldGet(this,_o)){this.zoom=t}}function Uo(){if(babelHelpers.classPrivateFieldGet(this,Lo)!==null){clearTimeout(babelHelpers.classPrivateFieldGet(this,Lo))}}function Vo(){if(babelHelpers.classPrivateFieldGet(this,mo)===n.ControlMode.edit){babelHelpers.classPrivateFieldSet(this,Eo,true);i.Dom.addClass(babelHelpers.classPrivateFieldGet(this,Po),"location-map-mobile-center-marker-up")}this.emit(ho(Do,Do,ia))}function qo(){if(babelHelpers.classPrivateFieldGet(this,mo)===n.ControlMode.edit){if(babelHelpers.classPrivateFieldGet(this,Eo)===false){return}var t="location-map-mobile-center-marker-up";if(i.Dom.hasClass(babelHelpers.classPrivateFieldGet(this,Po),t)){i.Dom.removeClass(babelHelpers.classPrivateFieldGet(this,Po),t)}var e=babelHelpers.classPrivateFieldGet(this,yo).getCenter();po(this,Go,Xo).call(this,e.lat,e.lng);babelHelpers.classPrivateFieldSet(this,Eo,false)}}function Yo(){this.emit(ho(Do,Do,ia))}function Ko(){babelHelpers.classPrivateFieldSet(this,_o,babelHelpers.classPrivateFieldGet(this,yo).getZoom())}function Xo(t,e){var s=this;if(babelHelpers.classPrivateFieldGet(this,Lo)!==null){clearTimeout(babelHelpers.classPrivateFieldGet(this,Lo))}babelHelpers.classPrivateFieldSet(this,Lo,setTimeout((function(){var o=i.Text.getRandom();s.emit(ho(Do,Do,ta),{requestId:o});babelHelpers.classPrivateFieldSet(s,Lo,null);var a=new n.Point(t,e);babelHelpers.classPrivateFieldGet(s,To).reverse(a,po(s,No,Jo).call(s)).then((function(t){var e;if(t){e=babelHelpers.classPrivateFieldGet(s,ko).findByExternalId(t.externalId,ma.code,babelHelpers.classPrivateFieldGet(s,go)).then((function(t){if(t){t.longitude=a.longitude;if(t.address){t.address.longitude=a.longitude}t.latitude=a.latitude;if(t.address){t.address.latitude=a.latitude}}return t}))}else{e=new Promise((function(t){t(null)}))}return e})).then((function(t){s.emit(ho(Do,Do,ea),{requestId:o});po(s,Wo,$o).call(s,t)}))["catch"]((function(t){s.emit(ho(Do,Do,ea),{requestId:o});n.ErrorPublisher.getInstance().notify(t.errors)}))}),babelHelpers.classPrivateFieldGet(this,xo)))}function Jo(){return babelHelpers.classPrivateFieldGet(this,_o)>=15?18:babelHelpers.classPrivateFieldGet(this,_o)}function $o(t){if(babelHelpers.classPrivateFieldGet(this,mo)===n.ControlMode.edit){this.emit(ho(Do,Do,Qo),{location:t})}}var Qo={writable:true,value:"onChanged"};var ta={writable:true,value:"onStartChanging"};var ea={writable:true,value:"onEndChanging"};var ia={writable:true,value:"onMapViewChanged"};function na(t,e,i){sa(t,e);e.set(t,i)}function sa(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}var oa=new WeakMap;var aa=new WeakMap;var ra=function(t){babelHelpers.inherits(e,t);function e(t){var i;babelHelpers.classCallCheck(this,e);i=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this));na(babelHelpers.assertThisInitialized(i),oa,{writable:true,value:void 0});na(babelHelpers.assertThisInitialized(i),aa,{writable:true,value:void 0});babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),oa,t.searchRequester);babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(i),aa,t.reverseRequester);return i}babelHelpers.createClass(e,[{key:"geocodeConcrete",value:function t(e){return babelHelpers.classPrivateFieldGet(this,oa).request({query:e})}},{key:"reverse",value:function t(e,i){return babelHelpers.classPrivateFieldGet(this,aa).request({point:e,zoom:i})}}]);return e}(n.GeocodingServiceBase);function la(t,e,i){ha(t,e);e.set(t,i)}function ha(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}var ua=new WeakMap;var ca=new WeakMap;var da=new WeakMap;var fa=new WeakMap;var pa=new WeakMap;var _a=new WeakMap;var ma=function(t){babelHelpers.inherits(e,t);function e(t){var s;babelHelpers.classCallCheck(this,e);s=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).call(this,t));la(babelHelpers.assertThisInitialized(s),ua,{writable:true,value:""});la(babelHelpers.assertThisInitialized(s),ca,{writable:true,value:""});la(babelHelpers.assertThisInitialized(s),da,{writable:true,value:void 0});la(babelHelpers.assertThisInitialized(s),fa,{writable:true,value:void 0});la(babelHelpers.assertThisInitialized(s),pa,{writable:true,value:void 0});la(babelHelpers.assertThisInitialized(s),_a,{writable:true,value:void 0});if(!i.Type.isString(t.languageId)||t.languageId.trim()===""){throw new n.SourceCreationError("props.languageId must be a string")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),ua,t.languageId);if(!i.Type.isString(t.sourceLanguageId)||t.sourceLanguageId.trim()===""){throw new n.SourceCreationError("props.sourceLanguageId must be a string")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),ca,t.sourceLanguageId);if(!(t.mapService instanceof Vs)){throw new n.SourceCreationError("props.mapService must be instanceof MapService")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),da,t.mapService);if(!(t.mapMobileService instanceof Do)){throw new n.SourceCreationError("props.mapMobileService must be instanceof MapMobileService")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),fa,t.mapMobileService);if(!(t.autocompleteService instanceof f)){throw new n.SourceCreationError("props.autocompleteService must be instanceof AutocompleteService")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),_a,t.autocompleteService);if(!(t.geocodingService instanceof ra)){throw new n.SourceCreationError("props.geocodingService must be instanceof GeocodingService")}babelHelpers.classPrivateFieldSet(babelHelpers.assertThisInitialized(s),pa,t.geocodingService);return s}babelHelpers.createClass(e,[{key:"sourceCode",get:function t(){return e.code}},{key:"map",get:function t(){return this.mapService}},{key:"mapService",get:function t(){return babelHelpers.classPrivateFieldGet(this,da)}},{key:"mapMobile",get:function t(){return babelHelpers.classPrivateFieldGet(this,fa)}},{key:"autocompleteService",get:function t(){return babelHelpers.classPrivateFieldGet(this,_a)}},{key:"geocodingService",get:function t(){return babelHelpers.classPrivateFieldGet(this,pa)}},{key:"languageId",get:function t(){return babelHelpers.classPrivateFieldGet(this,ua)}}]);return e}(n.BaseSource);babelHelpers.defineProperty(ma,"code","OSM");function va(t,e){ba(t,e);e.add(t)}function ga(t,e,i){ba(t,e);e.set(t,i)}function ba(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function ya(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var wa=new WeakMap;var Pa=new WeakMap;var Ta=new WeakMap;var La=new WeakSet;var xa=new WeakSet;var za=function(){function t(e){babelHelpers.classCallCheck(this,t);va(this,xa);va(this,La);ga(this,wa,{writable:true,value:void 0});ga(this,Pa,{writable:true,value:void 0});ga(this,Ta,{writable:true,value:void 0});this.serviceUrl=e.serviceUrl;this.languageId=e.languageId;this.sourceLanguageId=e.sourceLanguageId;babelHelpers.classPrivateFieldSet(this,wa,e.responseConverter);babelHelpers.classPrivateFieldSet(this,Pa,e.hostName);babelHelpers.classPrivateFieldSet(this,Ta,e.tokenContainer)}babelHelpers.createClass(t,[{key:"createUrl",value:function t(e){throw new Error("Not implemented")}},{key:"request",value:function t(e){var i=this;return ya(this,La,Ha).call(this,e).then((function(t){return t?babelHelpers.classPrivateFieldGet(i,wa).convertResponse(t,e):[]}))["catch"]((function(t){console.error(t)}))}}]);return t}();function Ha(t){var e=this;var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return fetch(this.createUrl(t),{method:"GET",headers:new Headers({Authorization:"Bearer ".concat(babelHelpers.classPrivateFieldGet(this,Ta).token),"Bx-Location-Osm-Host":babelHelpers.classPrivateFieldGet(this,Pa)}),referrerPolicy:"no-referrer"}).then((function(s){if(s.status===200){return s.json()}if(s.status===401&&!n){return ya(e,xa,Ma).call(e,t)}console.error("Response status: ".concat(s.status));s.text().then((function(t){i.Runtime.debug(t)}));return null}))}function Ma(t){var e=this;return babelHelpers.classPrivateFieldGet(this,Ta).refreshToken().then((function(){return ya(e,La,Ha).call(e,t,true)}))}var Sa=function(t){babelHelpers.inherits(e,t);function e(){babelHelpers.classCallCheck(this,e);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).apply(this,arguments))}babelHelpers.createClass(e,[{key:"createUrl",value:function t(e){var i;var n=(i=e.limit)!==null&&i!==void 0?i:5;var s="".concat(this.serviceUrl,"/?\n\t\t\taction=osmgateway.location.search\n\t\t\t¶ms[q]=").concat(encodeURIComponent(e.query),"\n\t\t\t¶ms[format]=json\n\t\t\t¶ms[limit]=").concat(n,"\n\t\t\t¶ms[accept-language]=").concat(this.sourceLanguageId);if(e.viewbox){s+="¶ms[viewbox]=".concat(e.viewbox)}return s}}]);return e}(za);var Ca=function(t){babelHelpers.inherits(e,t);function e(){babelHelpers.classCallCheck(this,e);return babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(e).apply(this,arguments))}babelHelpers.createClass(e,[{key:"createUrl",value:function t(e){var i=e.zoom||18;return"".concat(this.serviceUrl,"/?\n\t\t\taction=osmgateway.location.reverse\n\t\t\t¶ms[lat]=").concat(e.point.latitude,"\n\t\t\t¶ms[lon]=").concat(e.point.longitude,"\n\t\t\t¶ms[format]=json\n\t\t\t¶ms[zoom]=").concat(i,"\n\t\t\t¶ms[addressdetails]=0\t\t\t\n\t\t\t¶ms[accept-language]=").concat(this.sourceLanguageId)}}]);return e}(za);var Ia=function(){function t(e){var i;babelHelpers.classCallCheck(this,t);this.languageId=e.languageId;this.sourceCode=(i=e.sourceCode)!==null&&i!==void 0?i:ma.code}babelHelpers.createClass(t,[{key:"convertResponse",value:function t(e,i){throw new Error('Method "convertResponse()" not implemented')}}]);return t}();function ka(t,e){Ea(t,e);e.add(t)}function Ea(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function Aa(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var Oa=new WeakSet;var Fa=new WeakSet;var Za=new WeakSet;var Ba=function(t){babelHelpers.inherits(e,t);function e(){var t;var i;babelHelpers.classCallCheck(this,e);for(var n=arguments.length,s=new Array(n),o=0;o<n;o++){s[o]=arguments[o]}i=babelHelpers.possibleConstructorReturn(this,(t=babelHelpers.getPrototypeOf(e)).call.apply(t,[this].concat(s)));ka(babelHelpers.assertThisInitialized(i),Za);ka(babelHelpers.assertThisInitialized(i),Fa);ka(babelHelpers.assertThisInitialized(i),Oa);return i}babelHelpers.createClass(e,[{key:"convertResponse",value:function t(e,i){var n=this;var s=null;if(Array.isArray(e)){s=[];if(e.length>0){e.forEach((function(t){var e=Aa(n,Oa,Ra).call(n,t);if(e){s.push(e)}}))}}else if(babelHelpers["typeof"](e)==="object"){s=Aa(this,Oa,Ra).call(this,e)}return s}}]);return e}(Ia);function Ra(t){var e=Aa(this,Za,Na).call(this,t.osm_type,t.osm_id);if(!e){return null}return new n.Location({externalId:e,latitude:t.lat,longitude:t.lon,type:Aa(this,Fa,Ga).call(this,t.type),name:t.display_name,languageId:this.languageId,sourceCode:this.sourceCode})}function Ga(t){var e={country:n.LocationType.COUNTRY,municipality:n.LocationType.LOCALITY,city:n.LocationType.LOCALITY,town:n.LocationType.LOCALITY,village:n.LocationType.LOCALITY,postal_town:n.LocationType.LOCALITY,road:n.LocationType.STREET,street_address:n.LocationType.ADDRESS_LINE_1,county:n.LocationType.ADM_LEVEL_4,state_district:n.LocationType.ADM_LEVEL_3,state:n.LocationType.ADM_LEVEL_2,region:n.LocationType.ADM_LEVEL_1,floor:n.LocationType.FLOOR,postal_code:n.AddressType.POSTAL_CODE,room:n.LocationType.ROOM,sublocality:n.LocationType.SUB_LOCALITY,city_district:n.LocationType.SUB_LOCALITY_LEVEL_1,district:n.LocationType.SUB_LOCALITY_LEVEL_1,borough:n.LocationType.SUB_LOCALITY_LEVEL_1,suburb:n.LocationType.SUB_LOCALITY_LEVEL_1,subdivision:n.LocationType.SUB_LOCALITY_LEVEL_1,house_number:n.LocationType.BUILDING,house_name:n.LocationType.BUILDING,building:n.LocationType.BUILDING};var i=n.LocationType.UNKNOWN;if(typeof e[t]!=="undefined"){i=e[t]}return i}function Na(t,e){if(!t||!e){return null}return t.substr(0,1).toLocaleUpperCase()+e}function Wa(t,e){Da(t,e);e.add(t)}function Da(t,e){if(e.has(t)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function ja(t,e,i){if(!e.has(t)){throw new TypeError("attempted to get private field on non-instance")}return i}var Ua=new WeakSet;var Va=new WeakSet;var qa=new WeakSet;var Ya=new WeakSet;var Ka=new WeakSet;var Xa=new WeakSet;var Ja=new WeakSet;var $a=new WeakSet;var Qa=function(t){babelHelpers.inherits(e,t);function e(){var t;var i;babelHelpers.classCallCheck(this,e);for(var n=arguments.length,s=new Array(n),o=0;o<n;o++){s[o]=arguments[o]}i=babelHelpers.possibleConstructorReturn(this,(t=babelHelpers.getPrototypeOf(e)).call.apply(t,[this].concat(s)));Wa(babelHelpers.assertThisInitialized(i),$a);Wa(babelHelpers.assertThisInitialized(i),Ja);Wa(babelHelpers.assertThisInitialized(i),Xa);Wa(babelHelpers.assertThisInitialized(i),Ka);Wa(babelHelpers.assertThisInitialized(i),Ya);Wa(babelHelpers.assertThisInitialized(i),qa);Wa(babelHelpers.assertThisInitialized(i),Va);Wa(babelHelpers.assertThisInitialized(i),Ua);return i}babelHelpers.createClass(e,[{key:"convertResponse",value:function t(e,i){var s=this;if(!e||!Array.isArray(e.features)||e.features.length===0){return[]}var o=[];var a=[];var r=e.address_tail?e.address_tail:"";e.features.forEach((function(t){if(babelHelpers["typeof"](t.properties)!=="object"){return}var e=ja(s,Xa,or).call(s,t.properties);if(a.indexOf(e)!==-1){return}a.push(e);var l=ja(s,Ua,tr).call(s,t,i.autocompleteServiceParams);if(l){if(l.address&&r){l.address.setFieldValue(n.AddressType.ADDRESS_LINE_2,r)}o.push(l)}}));return o}}]);return e}(Ia);function tr(t,e){if(!t.properties){return null}var i=t.properties;var s=ja(this,$a,rr).call(this,i.osm_type,i.osm_id);if(!s){return null}var o=ja(this,Ya,nr).call(this,t);if(o===""){return null}var a=ja(this,Ja,ar).call(this,i.type);var r=ja(this,Ka,sr).call(this,t,a);var l=new n.Location({address:r,externalId:s,sourceCode:this.sourceCode,type:a,name:o,languageId:this.languageId});if(t.geometry&&t.geometry.coordinates&&t.geometry.coordinates[0]&&t.geometry.coordinates[1]){l.latitude=String(t.geometry.coordinates[1]);l.longitude=String(t.geometry.coordinates[0])}if(r){var h=ja(this,qa,ir).call(this,r);if(h!==""){l.setFieldValue(n.LocationType.TMP_TYPE_CLARIFICATION,h)}}if(i.osm_value&&i.osm_key){var u=ja(this,Va,er).call(this,i.osm_key,i.osm_value);if(u!==""){l.setFieldValue(n.LocationType.TMP_TYPE_HINT,u)}}return l}function er(t,e){var n="";if(e==="city"||e==="town"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_CITY")}else if(e==="village"||e==="hamlet"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_VILLAGE")}else if(e==="locality"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_LOCALITY")}else if(e==="hotel"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_HOTEL")}else if(e==="suburb"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_SUBURB")}else if(e==="island"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_ISLAND")}else if(e==="cafe"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_CAFE")}else if(e==="restaurant"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_RESTAURANT")}else if(e==="river"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_RIVER")}else if(t==="shop"){n=i.Loc.getMessage("LOCATION_OSM_AUTOCOMPLETE_TYPE_SHOP")}return n}function ir(t){var e="";if(t.getFieldValue(n.AddressType.LOCALITY)){e+=t.getFieldValue(n.AddressType.LOCALITY)}if(t.getFieldValue(n.AddressType.ADM_LEVEL_1)){if(e!==""){e+=", "}e+=t.getFieldValue(n.AddressType.ADM_LEVEL_1)}if(t.getFieldValue(n.AddressType.COUNTRY)){if(e!==""){e+=", "}e+=t.getFieldValue(n.AddressType.COUNTRY)}return e}function nr(t){var e;if(!t.properties){return""}var i=t.properties;var n=(e=i===null||i===void 0?void 0:i.name)!==null&&e!==void 0?e:"";if(i.street){if(n!==""){n+=", "}n+=i.street}if(i.housenumber){if(n!==""){n+=", "}n+=i.housenumber}return n}function sr(t,e){if(!t.properties){return null}var i=t.properties;var s=new n.Address({languageId:this.languageId});if(t.geometry&&t.geometry.coordinates&&t.geometry.coordinates[0]&&t.geometry.coordinates[1]){s.latitude=String(t.geometry.coordinates[1]);s.longitude=String(t.geometry.coordinates[0])}if(i.name){s.setFieldValue(e,i.name)}if(i.housenumber){s.setFieldValue(n.AddressType.BUILDING,i.housenumber)}if(i.street){s.setFieldValue(n.AddressType.STREET,i.street)}if(i.city){s.setFieldValue(n.AddressType.LOCALITY,i.city)}if(i.state&&i.state!==i.city){s.setFieldValue(n.AddressType.ADM_LEVEL_1,i.state)}if(i.country){s.setFieldValue(n.AddressType.COUNTRY,i.country)}if(i.postcode){s.setFieldValue(n.AddressType.POSTAL_CODE,i.postcode)}return s}function or(t){var e,i,n,s,o,a,r,l,h;var u="";u+=(e=t===null||t===void 0?void 0:t.country)!==null&&e!==void 0?e:"";u+=(i=t===null||t===void 0?void 0:t.state)!==null&&i!==void 0?i:"";u+=(n=t===null||t===void 0?void 0:t.county)!==null&&n!==void 0?n:"";u+=(s=t===null||t===void 0?void 0:t.locality)!==null&&s!==void 0?s:"";u+=(o=t===null||t===void 0?void 0:t.city)!==null&&o!==void 0?o:"";u+=(a=t===null||t===void 0?void 0:t.street)!==null&&a!==void 0?a:"";u+=(r=t===null||t===void 0?void 0:t.name)!==null&&r!==void 0?r:"";u+=(l=t===null||t===void 0?void 0:t.housenumber)!==null&&l!==void 0?l:"";u+=(h=t===null||t===void 0?void 0:t.type)!==null&&h!==void 0?h:"";return u}function ar(t){var e={postcode:n.AddressType.POSTAL_CODE,housenumber:n.LocationType.BUILDING,house:n.LocationType.BUILDING,name:n.AddressType.ADDRESS_LINE_2,country:n.LocationType.COUNTRY,city:n.LocationType.LOCALITY,district:n.LocationType.SUB_LOCALITY_LEVEL_1,locality:n.LocationType.LOCALITY,street:n.LocationType.STREET,state:n.LocationType.ADM_LEVEL_1,region:n.LocationType.ADM_LEVEL_1,county:n.LocationType.ADM_LEVEL_2};var i=n.LocationType.UNKNOWN;if(typeof e[t]!=="undefined"){i=e[t]}else{console.warn("Unknown response location type: ",t)}return i}function rr(t,e){if(!t||!e){return null}return t.substr(0,1).toLocaleUpperCase()+e}var lr=function(){function t(){babelHelpers.classCallCheck(this,t)}babelHelpers.createClass(t,null,[{key:"createOSMSource",value:function t(e){var i=new ts({token:e.token,sourceRepository:new n.SourceRepository});var s={languageId:e.languageId,sourceLanguageId:e.sourceLanguageId};var o=new Ba({languageId:e.languageId});var a=new Sa({languageId:e.languageId,sourceLanguageId:e.sourceLanguageId,tokenContainer:i,serviceUrl:e.serviceUrl,hostName:e.hostName,responseConverter:o});var r=new Ca({languageId:e.languageId,sourceLanguageId:e.sourceLanguageId,serviceUrl:e.serviceUrl,hostName:e.hostName,tokenContainer:i,responseConverter:o});var l=new Qa({languageId:e.languageId});s.autocompleteService=new f({languageId:e.languageId,autocompletePromptsCount:e.autocompletePromptsCount||7,sourceLanguageId:e.sourceLanguageId,responseConverter:l,autocompleteReplacements:e.autocompleteReplacements});var h=new ra({searchRequester:a,reverseRequester:r});s.geocodingService=h;s.mapService=new Vs({languageId:e.languageId,geocodingService:h,mapFactoryMethod:vi,markerFactoryMethod:an,locationRepository:new n.LocationRepository,sourceLanguageId:e.sourceLanguageId,tileLayerFactoryMethod:function t(){var n=new us;n.setTokenContainer(i);n.setHostName(e.hostName);return n},serviceUrl:e.serviceUrl,mapServiceUrl:e.mapServiceUrl});s.mapMobileService=new Do({languageId:e.languageId,geocodingService:h,mapFactoryMethod:vi,markerFactoryMethod:an,iconFactoryMethod:en,locationRepository:new n.LocationRepository,sourceLanguageId:e.sourceLanguageId,tileLayerFactoryMethod:function t(){var n=new us;n.setTokenContainer(i);n.setHostName(e.hostName);return n},serviceUrl:e.serviceUrl,mapServiceUrl:e.mapServiceUrl});return new ma(s)}}]);return t}();t.OSM=ma;t.OSMFactory=lr})(this.BX.Location.OSM=this.BX.Location.OSM||{},BX,BX,BX.Location.Core); //# sourceMappingURL=osm.bundle.map.js