UNPKG

@senx/discovery-plugin-marauder

Version:

Discovery plugin - Marauder's map

5 lines 164 kB
import{c as commonjsGlobal}from"./utils-7a8be8c0.js";var domToImage={exports:{}};(function(t){(function(i){var n=_();var e=y();var s=M();var r=b();var h={imagePlaceholder:undefined,cacheBust:false};var o={toSvg:u,toPng:f,toJpeg:c,toBlob:l,toPixelData:a,impl:{fontFaces:s,images:r,util:n,inliner:e,options:{}}};t.exports=o;function u(t,i){i=i||{};d(i);return Promise.resolve(t).then((function(t){return m(t,i.filter,true)})).then(p).then(g).then(e).then((function(e){return w(e,i.width||n.width(t),i.height||n.height(t))}));function e(t){if(i.bgcolor)t.style.backgroundColor=i.bgcolor;if(i.width)t.style.width=i.width+"px";if(i.height)t.style.height=i.height+"px";if(i.style)Object.keys(i.style).forEach((function(n){t.style[n]=i.style[n]}));return t}}function a(t,i){return v(t,i||{}).then((function(i){return i.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))}function f(t,i){return v(t,i||{}).then((function(t){return t.toDataURL()}))}function c(t,i){i=i||{};return v(t,i).then((function(t){return t.toDataURL("image/jpeg",i.quality||1)}))}function l(t,i){return v(t,i||{}).then(n.canvasToBlob)}function d(t){if(typeof t.imagePlaceholder==="undefined"){o.impl.options.imagePlaceholder=h.imagePlaceholder}else{o.impl.options.imagePlaceholder=t.imagePlaceholder}if(typeof t.cacheBust==="undefined"){o.impl.options.cacheBust=h.cacheBust}else{o.impl.options.cacheBust=t.cacheBust}}function v(t,i){return u(t,i).then(n.makeImage).then(n.delay(100)).then((function(i){var n=e(t);n.getContext("2d").drawImage(i,0,0);return n}));function e(t){var e=document.createElement("canvas");e.width=i.width||n.width(t);e.height=i.height||n.height(t);if(i.bgcolor){var s=e.getContext("2d");s.fillStyle=i.bgcolor;s.fillRect(0,0,e.width,e.height)}return e}}function m(t,i,e){if(!e&&i&&!i(t))return Promise.resolve();return Promise.resolve(t).then(s).then((function(n){return r(t,n,i)})).then((function(i){return h(t,i)}));function s(t){if(t instanceof HTMLCanvasElement)return n.makeImage(t.toDataURL());return t.cloneNode(false)}function r(t,i,e){var s=t.childNodes;if(s.length===0)return Promise.resolve(i);return r(i,n.asArray(s),e).then((function(){return i}));function r(t,i,n){var e=Promise.resolve();i.forEach((function(i){e=e.then((function(){return m(i,n)})).then((function(i){if(i)t.appendChild(i)}))}));return e}}function h(t,i){if(!(i instanceof Element))return i;return Promise.resolve().then(e).then(s).then(r).then(h).then((function(){return i}));function e(){e(window.getComputedStyle(t),i.style);function e(t,i){if(t.cssText)i.cssText=t.cssText;else e(t,i);function e(t,i){n.asArray(t).forEach((function(n){i.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}}}function s(){[":before",":after"].forEach((function(t){e(t)}));function e(e){var s=window.getComputedStyle(t,e);var r=s.getPropertyValue("content");if(r===""||r==="none")return;var h=n.uid();i.className=i.className+" "+h;var o=document.createElement("style");o.appendChild(u(h,e,s));i.appendChild(o);function u(t,i,e){var s="."+t+":"+i;var r=e.cssText?h(e):o(e);return document.createTextNode(s+"{"+r+"}");function h(t){var i=t.getPropertyValue("content");return t.cssText+" content: "+i+";"}function o(t){return n.asArray(t).map(i).join("; ")+";";function i(i){return i+": "+t.getPropertyValue(i)+(t.getPropertyPriority(i)?" !important":"")}}}}}function r(){if(t instanceof HTMLTextAreaElement)i.innerHTML=t.value;if(t instanceof HTMLInputElement)i.setAttribute("value",t.value)}function h(){if(!(i instanceof SVGElement))return;i.setAttribute("xmlns","http://www.w3.org/2000/svg");if(!(i instanceof SVGRectElement))return;["width","height"].forEach((function(t){var n=i.getAttribute(t);if(!n)return;i.style.setProperty(t,n)}))}}}function p(t){return s.resolveAll().then((function(i){var n=document.createElement("style");t.appendChild(n);n.appendChild(document.createTextNode(i));return t}))}function g(t){return r.inlineAll(t).then((function(){return t}))}function w(t,i,e){return Promise.resolve(t).then((function(t){t.setAttribute("xmlns","http://www.w3.org/1999/xhtml");return(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+i+'" height="'+e+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}function _(){return{escape:l,parseExtension:i,mimeType:n,dataAsUrl:c,isDataUrl:e,canvasToBlob:r,resolveUrl:h,getAndEncode:f,uid:u(),delay:d,asArray:v,escapeXhtml:m,makeImage:a,width:p,height:g};function t(){var t="application/font-woff";var i="image/jpeg";return{woff:t,woff2:t,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i,jpeg:i,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"}}function i(t){var i=/\.([^\.\/]*?)$/g.exec(t);if(i)return i[1];else return""}function n(n){var e=i(n).toLowerCase();return t()[e]||""}function e(t){return t.search(/^(data:)/)!==-1}function s(t){return new Promise((function(i){var n=window.atob(t.toDataURL().split(",")[1]);var e=n.length;var s=new Uint8Array(e);for(var r=0;r<e;r++)s[r]=n.charCodeAt(r);i(new Blob([s],{type:"image/png"}))}))}function r(t){if(t.toBlob)return new Promise((function(i){t.toBlob(i)}));return s(t)}function h(t,i){var n=document.implementation.createHTMLDocument();var e=n.createElement("base");n.head.appendChild(e);var s=n.createElement("a");n.body.appendChild(s);e.href=i;s.href=t;return s.href}function u(){var t=0;return function(){return"u"+i()+t++;function i(){return("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)}}}function a(t){return new Promise((function(i,n){var e=new Image;e.onload=function(){i(e)};e.onerror=n;e.src=t}))}function f(t){var i=3e4;if(o.impl.options.cacheBust){t+=(/\?/.test(t)?"&":"?")+(new Date).getTime()}return new Promise((function(n){var e=new XMLHttpRequest;e.onreadystatechange=h;e.ontimeout=u;e.responseType="blob";e.timeout=i;e.open("GET",t,true);e.send();var s;if(o.impl.options.imagePlaceholder){var r=o.impl.options.imagePlaceholder.split(/,/);if(r&&r[1]){s=r[1]}}function h(){if(e.readyState!==4)return;if(e.status!==200){if(s){n(s)}else{a("cannot fetch resource: "+t+", status: "+e.status)}return}var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];n(t)};i.readAsDataURL(e.response)}function u(){if(s){n(s)}else{a("timeout of "+i+"ms occured while fetching resource: "+t)}}function a(t){console.error(t);n("")}}))}function c(t,i){return"data:"+i+";base64,"+t}function l(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")}function d(t){return function(i){return new Promise((function(n){setTimeout((function(){n(i)}),t)}))}}function v(t){var i=[];var n=t.length;for(var e=0;e<n;e++)i.push(t[e]);return i}function m(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")}function p(t){var i=w(t,"border-left-width");var n=w(t,"border-right-width");return t.scrollWidth+i+n}function g(t){var i=w(t,"border-top-width");var n=w(t,"border-bottom-width");return t.scrollHeight+i+n}function w(t,i){var n=window.getComputedStyle(t).getPropertyValue(i);return parseFloat(n.replace("px",""))}}function y(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:r,shouldProcess:i,impl:{readUrls:e,inline:s}};function i(i){return i.search(t)!==-1}function e(i){var e=[];var s;while((s=t.exec(i))!==null){e.push(s[1])}return e.filter((function(t){return!n.isDataUrl(t)}))}function s(t,i,e,s){return Promise.resolve(i).then((function(t){return e?n.resolveUrl(t,e):t})).then(s||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(i))})).then((function(n){return t.replace(r(i),"$1"+n+"$3")}));function r(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}}function r(t,n,r){if(h())return Promise.resolve(t);return Promise.resolve(t).then(e).then((function(i){var e=Promise.resolve(t);i.forEach((function(t){e=e.then((function(i){return s(i,t,n,r)}))}));return e}));function h(){return!i(t)}}}function M(){return{resolveAll:t,impl:{readAll:i}};function t(){return i().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))}function i(){return Promise.resolve(n.asArray(document.styleSheets)).then(i).then(t).then((function(t){return t.map(s)}));function t(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return e.shouldProcess(t.style.getPropertyValue("src"))}))}function i(t){var i=[];t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(i.push.bind(i))}catch(i){console.log("Error while reading CSS rules from "+t.href,i.toString())}}));return i}function s(t){return{resolve:function i(){var n=(t.parentStyleSheet||{}).href;return e.inlineAll(t.cssText,n)},src:function(){return t.style.getPropertyValue("src")}}}}}function b(){return{inlineAll:i,impl:{newImage:t}};function t(t){return{inline:i};function i(i){if(n.isDataUrl(t.src))return Promise.resolve();return Promise.resolve(t.src).then(i||n.getAndEncode).then((function(i){return n.dataAsUrl(i,n.mimeType(t.src))})).then((function(i){return new Promise((function(n,e){t.onload=n;t.onerror=e;t.src=i}))}))}}function i(s){if(!(s instanceof Element))return Promise.resolve(s);return r(s).then((function(){if(s instanceof HTMLImageElement)return t(s).inline();else return Promise.all(n.asArray(s.childNodes).map((function(t){return i(t)})))}));function r(t){var i=t.style.getPropertyValue("background");if(!i)return Promise.resolve(t);return e.inlineAll(i).then((function(i){t.style.setProperty("background",i,t.style.getPropertyPriority("background"))})).then((function(){return t}))}}}})()})(domToImage);var domtoimage=domToImage.exports;var leafletSrc={exports:{}}; /* @preserve * Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com * (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade */(function(t,i){(function(t,n){n(i)})(commonjsGlobal,(function(t){var i="1.9.4";function n(t){var i,n,e,s;for(n=1,e=arguments.length;n<e;n++){s=arguments[n];for(i in s){t[i]=s[i]}}return t}var e=Object.create||function(){function t(){}return function(i){t.prototype=i;return new t}}();function s(t,i){var n=Array.prototype.slice;if(t.bind){return t.bind.apply(t,n.call(arguments,1))}var e=n.call(arguments,2);return function(){return t.apply(i,e.length?e.concat(n.call(arguments)):arguments)}}var r=0;function h(t){if(!("_leaflet_id"in t)){t["_leaflet_id"]=++r}return t._leaflet_id}function o(t,i,n){var e,s,r,h;h=function(){e=false;if(s){r.apply(n,s);s=false}};r=function(){if(e){s=arguments}else{t.apply(n,arguments);setTimeout(h,i);e=true}};return r}function u(t,i,n){var e=i[1],s=i[0],r=e-s;return t===e&&n?t:((t-s)%r+r)%r+s}function a(){return false}function f(t,i){if(i===false){return t}var n=Math.pow(10,i===undefined?6:i);return Math.round(t*n)/n}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function l(t){return c(t).split(/\s+/)}function d(t,i){if(!Object.prototype.hasOwnProperty.call(t,"options")){t.options=t.options?e(t.options):{}}for(var n in i){t.options[n]=i[n]}return t.options}function v(t,i,n){var e=[];for(var s in t){e.push(encodeURIComponent(n?s.toUpperCase():s)+"="+encodeURIComponent(t[s]))}return(!i||i.indexOf("?")===-1?"?":"&")+e.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function p(t,i){return t.replace(m,(function(t,n){var e=i[n];if(e===undefined){throw new Error("No value provided for variable "+t)}else if(typeof e==="function"){e=e(i)}return e}))}var g=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function w(t,i){for(var n=0;n<t.length;n++){if(t[n]===i){return n}}return-1}var _="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var M=0;function b(t){var i=+new Date,n=Math.max(0,16-(i-M));M=i+n;return window.setTimeout(t,n)}var P=window.requestAnimationFrame||y("RequestAnimationFrame")||b;var T=window.cancelAnimationFrame||y("CancelAnimationFrame")||y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,i,n){if(n&&P===b){t.call(i)}else{return P.call(window,s(t,i))}}function x(t){if(t){T.call(window,t)}}var z={__proto__:null,extend:n,create:e,bind:s,get lastId(){return r},stamp:h,throttle:o,wrapNum:u,falseFn:a,formatNum:f,trim:c,splitWords:l,setOptions:d,getParamString:v,template:p,isArray:g,indexOf:w,emptyImageUrl:_,requestFn:P,cancelFn:T,requestAnimFrame:k,cancelAnimFrame:x};function S(){}S.extend=function(t){var i=function(){d(this);if(this.initialize){this.initialize.apply(this,arguments)}this.callInitHooks()};var s=i.__super__=this.prototype;var r=e(s);r.constructor=i;i.prototype=r;for(var h in this){if(Object.prototype.hasOwnProperty.call(this,h)&&h!=="prototype"&&h!=="__super__"){i[h]=this[h]}}if(t.statics){n(i,t.statics)}if(t.includes){E(t.includes);n.apply(null,[r].concat(t.includes))}n(r,t);delete r.statics;delete r.includes;if(r.options){r.options=s.options?e(s.options):{};n(r.options,t.options)}r._initHooks=[];r.callInitHooks=function(){if(this._initHooksCalled){return}if(s.callInitHooks){s.callInitHooks.call(this)}this._initHooksCalled=true;for(var t=0,i=r._initHooks.length;t<i;t++){r._initHooks[t].call(this)}};return i};S.include=function(t){var i=this.prototype.options;n(this.prototype,t);if(t.options){this.prototype.options=i;this.mergeOptions(t.options)}return this};S.mergeOptions=function(t){n(this.prototype.options,t);return this};S.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1);var n=typeof t==="function"?t:function(){this[t].apply(this,i)};this.prototype._initHooks=this.prototype._initHooks||[];this.prototype._initHooks.push(n);return this};function E(t){if(typeof L==="undefined"||!L||!L.Mixin){return}t=g(t)?t:[t];for(var i=0;i<t.length;i++){if(t[i]===L.Mixin.Events){console.warn("Deprecated include of L.Mixin.Events: "+"this property will be removed in future releases, "+"please inherit from L.Evented instead.",(new Error).stack)}}}var A={on:function(t,i,n){if(typeof t==="object"){for(var e in t){this._on(e,t[e],i)}}else{t=l(t);for(var s=0,r=t.length;s<r;s++){this._on(t[s],i,n)}}return this},off:function(t,i,n){if(!arguments.length){delete this._events}else if(typeof t==="object"){for(var e in t){this._off(e,t[e],i)}}else{t=l(t);var s=arguments.length===1;for(var r=0,h=t.length;r<h;r++){if(s){this._off(t[r])}else{this._off(t[r],i,n)}}}return this},_on:function(t,i,n,e){if(typeof i!=="function"){console.warn("wrong listener type: "+typeof i);return}if(this._listens(t,i,n)!==false){return}if(n===this){n=undefined}var s={fn:i,ctx:n};if(e){s.once=true}this._events=this._events||{};this._events[t]=this._events[t]||[];this._events[t].push(s)},_off:function(t,i,n){var e,s,r;if(!this._events){return}e=this._events[t];if(!e){return}if(arguments.length===1){if(this._firingCount){for(s=0,r=e.length;s<r;s++){e[s].fn=a}}delete this._events[t];return}if(typeof i!=="function"){console.warn("wrong listener type: "+typeof i);return}var h=this._listens(t,i,n);if(h!==false){var o=e[h];if(this._firingCount){o.fn=a;this._events[t]=e=e.slice()}e.splice(h,1)}},fire:function(t,i,e){if(!this.listens(t,e)){return this}var s=n({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var h=0,o=r.length;h<o;h++){var u=r[h];var a=u.fn;if(u.once){this.off(t,a,u.ctx)}a.call(u.ctx||this,s)}this._firingCount--}}if(e){this._propagateEvent(s)}return this},listens:function(t,i,n,e){if(typeof t!=="string"){console.warn('"string" type argument expected')}var s=i;if(typeof i!=="function"){e=!!i;s=undefined;n=undefined}var r=this._events&&this._events[t];if(r&&r.length){if(this._listens(t,s,n)!==false){return true}}if(e){for(var h in this._eventParents){if(this._eventParents[h].listens(t,i,n,e)){return true}}}return false},_listens:function(t,i,n){if(!this._events){return false}var e=this._events[t]||[];if(!i){return!!e.length}if(n===this){n=undefined}for(var s=0,r=e.length;s<r;s++){if(e[s].fn===i&&e[s].ctx===n){return s}}return false},once:function(t,i,n){if(typeof t==="object"){for(var e in t){this._on(e,t[e],i,true)}}else{t=l(t);for(var s=0,r=t.length;s<r;s++){this._on(t[s],i,n,true)}}return this},addEventParent:function(t){this._eventParents=this._eventParents||{};this._eventParents[h(t)]=t;return this},removeEventParent:function(t){if(this._eventParents){delete this._eventParents[h(t)]}return this},_propagateEvent:function(t){for(var i in this._eventParents){this._eventParents[i].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),true)}}};A.addEventListener=A.on;A.removeEventListener=A.clearAllEventListeners=A.off;A.addOneTimeEventListener=A.once;A.fireEvent=A.fire;A.hasEventListeners=A.listens;var I=S.extend(A);function C(t,i,n){this.x=n?Math.round(t):t;this.y=n?Math.round(i):i}var O=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};C.prototype={clone:function(){return new C(this.x,this.y)},add:function(t){return this.clone()._add(B(t))},_add:function(t){this.x+=t.x;this.y+=t.y;return this},subtract:function(t){return this.clone()._subtract(B(t))},_subtract:function(t){this.x-=t.x;this.y-=t.y;return this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){this.x/=t;this.y/=t;return this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){this.x*=t;this.y*=t;return this},scaleBy:function(t){return new C(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new C(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this},floor:function(){return this.clone()._floor()},_floor:function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this},ceil:function(){return this.clone()._ceil()},_ceil:function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this},trunc:function(){return this.clone()._trunc()},_trunc:function(){this.x=O(this.x);this.y=O(this.y);return this},distanceTo:function(t){t=B(t);var i=t.x-this.x,n=t.y-this.y;return Math.sqrt(i*i+n*n)},equals:function(t){t=B(t);return t.x===this.x&&t.y===this.y},contains:function(t){t=B(t);return Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+f(this.x)+", "+f(this.y)+")"}};function B(t,i,n){if(t instanceof C){return t}if(g(t)){return new C(t[0],t[1])}if(t===undefined||t===null){return t}if(typeof t==="object"&&"x"in t&&"y"in t){return new C(t.x,t.y)}return new C(t,i,n)}function Z(t,i){if(!t){return}var n=i?[t,i]:t;for(var e=0,s=n.length;e<s;e++){this.extend(n[e])}}Z.prototype={extend:function(t){var i,n;if(!t){return this}if(t instanceof C||typeof t[0]==="number"||"x"in t){i=n=B(t)}else{t=D(t);i=t.min;n=t.max;if(!i||!n){return this}}if(!this.min&&!this.max){this.min=i.clone();this.max=n.clone()}else{this.min.x=Math.min(i.x,this.min.x);this.max.x=Math.max(n.x,this.max.x);this.min.y=Math.min(i.y,this.min.y);this.max.y=Math.max(n.y,this.max.y)}return this},getCenter:function(t){return B((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return B(this.min.x,this.max.y)},getTopRight:function(){return B(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,n;if(typeof t[0]==="number"||t instanceof C){t=B(t)}else{t=D(t)}if(t instanceof Z){i=t.min;n=t.max}else{i=n=t}return i.x>=this.min.x&&n.x<=this.max.x&&i.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=D(t);var i=this.min,n=this.max,e=t.min,s=t.max,r=s.x>=i.x&&e.x<=n.x,h=s.y>=i.y&&e.y<=n.y;return r&&h},overlaps:function(t){t=D(t);var i=this.min,n=this.max,e=t.min,s=t.max,r=s.x>i.x&&e.x<n.x,h=s.y>i.y&&e.y<n.y;return r&&h},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var i=this.min,n=this.max,e=Math.abs(i.x-n.x)*t,s=Math.abs(i.y-n.y)*t;return D(B(i.x-e,i.y-s),B(n.x+e,n.y+s))},equals:function(t){if(!t){return false}t=D(t);return this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())}};function D(t,i){if(!t||t instanceof Z){return t}return new Z(t,i)}function R(t,i){if(!t){return}var n=i?[t,i]:t;for(var e=0,s=n.length;e<s;e++){this.extend(n[e])}}R.prototype={extend:function(t){var i=this._southWest,n=this._northEast,e,s;if(t instanceof N){e=t;s=t}else if(t instanceof R){e=t._southWest;s=t._northEast;if(!e||!s){return this}}else{return t?this.extend(F(t)||j(t)):this}if(!i&&!n){this._southWest=new N(e.lat,e.lng);this._northEast=new N(s.lat,s.lng)}else{i.lat=Math.min(e.lat,i.lat);i.lng=Math.min(e.lng,i.lng);n.lat=Math.max(s.lat,n.lat);n.lng=Math.max(s.lng,n.lng)}return this},pad:function(t){var i=this._southWest,n=this._northEast,e=Math.abs(i.lat-n.lat)*t,s=Math.abs(i.lng-n.lng)*t;return new R(new N(i.lat-e,i.lng-s),new N(n.lat+e,n.lng+s))},getCenter:function(){return new N((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new N(this.getNorth(),this.getWest())},getSouthEast:function(){return new N(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){if(typeof t[0]==="number"||t instanceof N||"lat"in t){t=F(t)}else{t=j(t)}var i=this._southWest,n=this._northEast,e,s;if(t instanceof R){e=t.getSouthWest();s=t.getNorthEast()}else{e=s=t}return e.lat>=i.lat&&s.lat<=n.lat&&e.lng>=i.lng&&s.lng<=n.lng},intersects:function(t){t=j(t);var i=this._southWest,n=this._northEast,e=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>=i.lat&&e.lat<=n.lat,h=s.lng>=i.lng&&e.lng<=n.lng;return r&&h},overlaps:function(t){t=j(t);var i=this._southWest,n=this._northEast,e=t.getSouthWest(),s=t.getNorthEast(),r=s.lat>i.lat&&e.lat<n.lat,h=s.lng>i.lng&&e.lng<n.lng;return r&&h},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){if(!t){return false}t=j(t);return this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i)},isValid:function(){return!!(this._southWest&&this._northEast)}};function j(t,i){if(t instanceof R){return t}return new R(t,i)}function N(t,i,n){if(isNaN(t)||isNaN(i)){throw new Error("Invalid LatLng object: ("+t+", "+i+")")}this.lat=+t;this.lng=+i;if(n!==undefined){this.alt=+n}}N.prototype={equals:function(t,i){if(!t){return false}t=F(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return n<=(i===undefined?1e-9:i)},toString:function(t){return"LatLng("+f(this.lat,t)+", "+f(this.lng,t)+")"},distanceTo:function(t){return U.distance(this,F(t))},wrap:function(){return U.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,n=i/Math.cos(Math.PI/180*this.lat);return j([this.lat-i,this.lng-n],[this.lat+i,this.lng+n])},clone:function(){return new N(this.lat,this.lng,this.alt)}};function F(t,i,n){if(t instanceof N){return t}if(g(t)&&typeof t[0]!=="object"){if(t.length===3){return new N(t[0],t[1],t[2])}if(t.length===2){return new N(t[0],t[1])}return null}if(t===undefined||t===null){return t}if(typeof t==="object"&&"lat"in t){return new N(t.lat,"lng"in t?t.lng:t.lon,t.alt)}if(i===undefined){return null}return new N(t,i,n)}var H={latLngToPoint:function(t,i){var n=this.projection.project(t),e=this.scale(i);return this.transformation._transform(n,e)},pointToLatLng:function(t,i){var n=this.scale(i),e=this.transformation.untransform(t,n);return this.projection.unproject(e)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite){return null}var i=this.projection.bounds,n=this.scale(t),e=this.transformation.transform(i.min,n),s=this.transformation.transform(i.max,n);return new Z(e,s)},infinite:false,wrapLatLng:function(t){var i=this.wrapLng?u(t.lng,this.wrapLng,true):t.lng,n=this.wrapLat?u(t.lat,this.wrapLat,true):t.lat,e=t.alt;return new N(n,i,e)},wrapLatLngBounds:function(t){var i=t.getCenter(),n=this.wrapLatLng(i),e=i.lat-n.lat,s=i.lng-n.lng;if(e===0&&s===0){return t}var r=t.getSouthWest(),h=t.getNorthEast(),o=new N(r.lat-e,r.lng-s),u=new N(h.lat-e,h.lng-s);return new R(o,u)}};var U=n({},H,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var n=Math.PI/180,e=t.lat*n,s=i.lat*n,r=Math.sin((i.lat-t.lat)*n/2),h=Math.sin((i.lng-t.lng)*n/2),o=r*r+Math.cos(e)*Math.cos(s)*h*h,u=2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o));return this.R*u}});var G=6378137;var W={R:G,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,n=this.MAX_LATITUDE,e=Math.max(Math.min(n,t.lat),-n),s=Math.sin(e*i);return new C(this.R*t.lng*i,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var i=180/Math.PI;return new N((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:function(){var t=G*Math.PI;return new Z([-t,-t],[t,t])}()};function V(t,i,n,e){if(g(t)){this._a=t[0];this._b=t[1];this._c=t[2];this._d=t[3];return}this._a=t;this._b=i;this._c=n;this._d=e}V.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){i=i||1;t.x=i*(this._a*t.x+this._b);t.y=i*(this._c*t.y+this._d);return t},untransform:function(t,i){i=i||1;return new C((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}};function q(t,i,n,e){return new V(t,i,n,e)}var $=n({},U,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return q(t,.5,-t,.5)}()});var J=n({},$,{code:"EPSG:900913"});function X(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t,i){var n="",e,s,r,h,o,u;for(e=0,r=t.length;e<r;e++){o=t[e];for(s=0,h=o.length;s<h;s++){u=o[s];n+=(s?"L":"M")+u.x+" "+u.y}n+=i?Zt.svg?"z":"x":""}return n||"M0 0"}var Q=document.documentElement.style;var Y="ActiveXObject"in window;var tt=Y&&!document.addEventListener;var it="msLaunchUri"in navigator&&!("documentMode"in document);var nt=Bt("webkit");var et=Bt("android");var st=Bt("android 2")||Bt("android 3");var rt=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10);var ht=et&&Bt("Google")&&rt<537&&!("AudioNode"in window);var ot=!!window.opera;var ut=!it&&Bt("chrome");var at=Bt("gecko")&&!nt&&!ot&&!Y;var ft=!ut&&Bt("safari");var ct=Bt("phantom");var lt="OTransition"in Q;var dt=navigator.platform.indexOf("Win")===0;var vt=Y&&"transition"in Q;var mt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st;var pt="MozPerspective"in Q;var gt=!window.L_DISABLE_3D&&(vt||mt||pt)&&!lt&&!ct;var wt=typeof orientation!=="undefined"||Bt("mobile");var _t=wt&&nt;var yt=wt&&mt;var Mt=!window.PointerEvent&&window.MSPointerEvent;var bt=!!(window.PointerEvent||Mt);var Pt="ontouchstart"in window||!!window.TouchEvent;var Tt=!window.L_NO_TOUCH&&(Pt||bt);var Lt=wt&&ot;var kt=wt&&at;var xt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1;var zt=function(){var t=false;try{var i=Object.defineProperty({},"passive",{get:function(){t=true}});window.addEventListener("testPassiveEventSupport",a,i);window.removeEventListener("testPassiveEventSupport",a,i)}catch(t){}return t}();var St=function(){return!!document.createElement("canvas").getContext}();var Et=!!(document.createElementNS&&X("svg").createSVGRect);var At=!!Et&&function(){var t=document.createElement("div");t.innerHTML="<svg/>";return(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}();var It=!Et&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;i.style.behavior="url(#default#VML)";return i&&typeof i.adj==="object"}catch(t){return false}}();var Ct=navigator.platform.indexOf("Mac")===0;var Ot=navigator.platform.indexOf("Linux")===0;function Bt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Zt={ie:Y,ielt9:tt,edge:it,webkit:nt,android:et,android23:st,androidStock:ht,opera:ot,chrome:ut,gecko:at,safari:ft,phantom:ct,opera12:lt,win:dt,ie3d:vt,webkit3d:mt,gecko3d:pt,any3d:gt,mobile:wt,mobileWebkit:_t,mobileWebkit3d:yt,msPointer:Mt,pointer:bt,touch:Tt,touchNative:Pt,mobileOpera:Lt,mobileGecko:kt,retina:xt,passiveEvents:zt,canvas:St,svg:Et,vml:It,inlineSvg:At,mac:Ct,linux:Ot};var Dt=Zt.msPointer?"MSPointerDown":"pointerdown";var Rt=Zt.msPointer?"MSPointerMove":"pointermove";var jt=Zt.msPointer?"MSPointerUp":"pointerup";var Nt=Zt.msPointer?"MSPointerCancel":"pointercancel";var Ft={touchstart:Dt,touchmove:Rt,touchend:jt,touchcancel:Nt};var Ht={touchstart:Qt,touchmove:Kt,touchend:Kt,touchcancel:Kt};var Ut={};var Gt=false;function Wt(t,i,n){if(i==="touchstart"){Xt()}if(!Ht[i]){console.warn("wrong event specified:",i);return a}n=Ht[i].bind(this,n);t.addEventListener(Ft[i],n,false);return n}function Vt(t,i,n){if(!Ft[i]){console.warn("wrong event specified:",i);return}t.removeEventListener(Ft[i],n,false)}function qt(t){Ut[t.pointerId]=t}function $t(t){if(Ut[t.pointerId]){Ut[t.pointerId]=t}}function Jt(t){delete Ut[t.pointerId]}function Xt(){if(!Gt){document.addEventListener(Dt,qt,true);document.addEventListener(Rt,$t,true);document.addEventListener(jt,Jt,true);document.addEventListener(Nt,Jt,true);Gt=true}}function Kt(t,i){if(i.pointerType===(i.MSPOINTER_TYPE_MOUSE||"mouse")){return}i.touches=[];for(var n in Ut){i.touches.push(Ut[n])}i.changedTouches=[i];t(i)}function Qt(t,i){if(i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH){qi(i)}Kt(t,i)}function Yt(t){var i={},n,e;for(e in t){n=t[e];i[e]=n&&n.bind?n.bind(t):n}t=i;i.type="dblclick";i.detail=2;i.isTrusted=false;i._simulated=true;return i}var ti=200;function ii(t,i){t.addEventListener("dblclick",i);var n=0,e;function s(t){if(t.detail!==1){e=t.detail;return}if(t.pointerType==="mouse"||t.sourceCapabilities&&!t.sourceCapabilities.firesTouchEvents){return}var s=Ji(t);if(s.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))&&!s.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){return}var r=Date.now();if(r-n<=ti){e++;if(e===2){i(Yt(t))}}else{e=1}n=r}t.addEventListener("click",s);return{dblclick:i,simDblclick:s}}function ni(t,i){t.removeEventListener("dblclick",i.dblclick);t.removeEventListener("click",i.simDblclick)}var ei=yi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);var si=yi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);var ri=si==="webkitTransition"||si==="OTransition"?si+"End":"transitionend";function hi(t){return typeof t==="string"?document.getElementById(t):t}function oi(t,i){var n=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!n||n==="auto")&&document.defaultView){var e=document.defaultView.getComputedStyle(t,null);n=e?e[i]:null}return n==="auto"?null:n}function ui(t,i,n){var e=document.createElement(t);e.className=i||"";if(n){n.appendChild(e)}return e}function ai(t){var i=t.parentNode;if(i){i.removeChild(t)}}function fi(t){while(t.firstChild){t.removeChild(t.firstChild)}}function ci(t){var i=t.parentNode;if(i&&i.lastChild!==t){i.appendChild(t)}}function li(t){var i=t.parentNode;if(i&&i.firstChild!==t){i.insertBefore(t,i.firstChild)}}function di(t,i){if(t.classList!==undefined){return t.classList.contains(i)}var n=gi(t);return n.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(n)}function vi(t,i){if(t.classList!==undefined){var n=l(i);for(var e=0,s=n.length;e<s;e++){t.classList.add(n[e])}}else if(!di(t,i)){var r=gi(t);pi(t,(r?r+" ":"")+i)}}function mi(t,i){if(t.classList!==undefined){t.classList.remove(i)}else{pi(t,c((" "+gi(t)+" ").replace(" "+i+" "," ")))}}function pi(t,i){if(t.className.baseVal===undefined){t.className=i}else{t.className.baseVal=i}}function gi(t){if(t.correspondingElement){t=t.correspondingElement}return t.className.baseVal===undefined?t.className:t.className.baseVal}function wi(t,i){if("opacity"in t.style){t.style.opacity=i}else if("filter"in t.style){_i(t,i)}}function _i(t,i){var n=false,e="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(e)}catch(t){if(i===1){return}}i=Math.round(i*100);if(n){n.Enabled=i!==100;n.Opacity=i}else{t.style.filter+=" progid:"+e+"(opacity="+i+")"}}function yi(t){var i=document.documentElement.style;for(var n=0;n<t.length;n++){if(t[n]in i){return t[n]}}return false}function Mi(t,i,n){var e=i||new C(0,0);t.style[ei]=(Zt.ie3d?"translate("+e.x+"px,"+e.y+"px)":"translate3d("+e.x+"px,"+e.y+"px,0)")+(n?" scale("+n+")":"")}function bi(t,i){t._leaflet_pos=i;if(Zt.any3d){Mi(t,i)}else{t.style.left=i.x+"px";t.style.top=i.y+"px"}}function Pi(t){return t._leaflet_pos||new C(0,0)}var Ti;var Li;var ki;if("onselectstart"in document){Ti=function(){Di(window,"selectstart",qi)};Li=function(){ji(window,"selectstart",qi)}}else{var xi=yi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Ti=function(){if(xi){var t=document.documentElement.style;ki=t[xi];t[xi]="none"}};Li=function(){if(xi){document.documentElement.style[xi]=ki;ki=undefined}}}function zi(){Di(window,"dragstart",qi)}function Si(){ji(window,"dragstart",qi)}var Ei,Ai;function Ii(t){while(t.tabIndex===-1){t=t.parentNode}if(!t.style){return}Ci();Ei=t;Ai=t.style.outlineStyle;t.style.outlineStyle="none";Di(window,"keydown",Ci)}function Ci(){if(!Ei){return}Ei.style.outlineStyle=Ai;Ei=undefined;Ai=undefined;ji(window,"keydown",Ci)}function Oi(t){do{t=t.parentNode}while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Bi(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}var Zi={__proto__:null,TRANSFORM:ei,TRANSITION:si,TRANSITION_END:ri,get:hi,getStyle:oi,create:ui,remove:ai,empty:fi,toFront:ci,toBack:li,hasClass:di,addClass:vi,removeClass:mi,setClass:pi,getClass:gi,setOpacity:wi,testProp:yi,setTransform:Mi,setPosition:bi,getPosition:Pi,get disableTextSelection(){return Ti},get enableTextSelection(){return Li},disableImageDrag:zi,enableImageDrag:Si,preventOutline:Ii,restoreOutline:Ci,getSizedParentNode:Oi,getScale:Bi};function Di(t,i,n,e){if(i&&typeof i==="object"){for(var s in i){Hi(t,s,i[s],n)}}else{i=l(i);for(var r=0,h=i.length;r<h;r++){Hi(t,i[r],n,e)}}return this}var Ri="_leaflet_events";function ji(t,i,n,e){if(arguments.length===1){Ni(t);delete t[Ri]}else if(i&&typeof i==="object"){for(var s in i){Ui(t,s,i[s],n)}}else{i=l(i);if(arguments.length===2){Ni(t,(function(t){return w(i,t)!==-1}))}else{for(var r=0,h=i.length;r<h;r++){Ui(t,i[r],n,e)}}}return this}function Ni(t,i){for(var n in t[Ri]){var e=n.split(/\d/)[0];if(!i||i(e)){Ui(t,e,null,null,n)}}}var Fi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Hi(t,i,n,e){var s=i+h(n)+(e?"_"+h(e):"");if(t[Ri]&&t[Ri][s]){return this}var r=function(i){return n.call(e||t,i||window.event)};var o=r;if(!Zt.touchNative&&Zt.pointer&&i.indexOf("touch")===0){r=Wt(t,i,r)}else if(Zt.touch&&i==="dblclick"){r=ii(t,r)}else if("addEventListener"in t){if(i==="touchstart"||i==="touchmove"||i==="wheel"||i==="mousewheel"){t.addEventListener(Fi[i]||i,r,Zt.passiveEvents?{passive:false}:false)}else if(i==="mouseenter"||i==="mouseleave"){r=function(i){i=i||window.event;if(Yi(t,i)){o(i)}};t.addEventListener(Fi[i],r,false)}else{t.addEventListener(i,o,false)}}else{t.attachEvent("on"+i,r)}t[Ri]=t[Ri]||{};t[Ri][s]=r}function Ui(t,i,n,e,s){s=s||i+h(n)+(e?"_"+h(e):"");var r=t[Ri]&&t[Ri][s];if(!r){return this}if(!Zt.touchNative&&Zt.pointer&&i.indexOf("touch")===0){Vt(t,i,r)}else if(Zt.touch&&i==="dblclick"){ni(t,r)}else if("removeEventListener"in t){t.removeEventListener(Fi[i]||i,r,false)}else{t.detachEvent("on"+i,r)}t[Ri][s]=null}function Gi(t){if(t.stopPropagation){t.stopPropagation()}else if(t.originalEvent){t.originalEvent._stopped=true}else{t.cancelBubble=true}return this}function Wi(t){Hi(t,"wheel",Gi);return this}function Vi(t){Di(t,"mousedown touchstart dblclick contextmenu",Gi);t["_leaflet_disable_click"]=true;return this}function qi(t){if(t.preventDefault){t.preventDefault()}else{t.returnValue=false}return this}function $i(t){qi(t);Gi(t);return this}function Ji(t){if(t.composedPath){return t.composedPath()}var i=[];var n=t.target;while(n){i.push(n);n=n.parentNode}return i}function Xi(t,i){if(!i){return new C(t.clientX,t.clientY)}var n=Bi(i),e=n.boundingClientRect;return new C((t.clientX-e.left)/n.x-i.clientLeft,(t.clientY-e.top)/n.y-i.clientTop)}var Ki=Zt.linux&&Zt.chrome?window.devicePixelRatio:Zt.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function Qi(t){return Zt.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Ki: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}function Yi(t,i){var n=i.relatedTarget;if(!n){return true}try{while(n&&n!==t){n=n.parentNode}}catch(t){return false}return n!==t}var tn={__proto__:null,on:Di,off:ji,stopPropagation:Gi,disableScrollPropagation:Wi,disableClickPropagation:Vi,preventDefault:qi,stop:$i,getPropagationPath:Ji,getMousePosition:Xi,getWheelDelta:Qi,isExternalTarget:Yi,addListener:Di,removeListener:ji};var nn=I.extend({run:function(t,i,n,e){this.stop();this._el=t;this._inProgress=true;this._duration=n||.25;this._easeOutPower=1/Math.max(e||.5,.2);this._startPos=Pi(t);this._offset=i.subtract(this._startPos);this._startTime=+new Date;this.fire("start");this._animate()},stop:function(){if(!this._inProgress){return}this._step(true);this._complete()},_animate:function(){this._animId=k(this._animate,this);this._step()},_step:function(t){var i=+new Date-this._startTime,n=this._duration*1e3;if(i<n){this._runFrame(this._easeOut(i/n),t)}else{this._runFrame(1);this._complete()}},_runFrame:function(t,i){var n=this._startPos.add(this._offset.multiplyBy(t));if(i){n._round()}bi(this._el,n);this.fire("step")},_complete:function(){x(this._animId);this._inProgress=false;this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}});var en=I.extend({options:{crs:$,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,i){i=d(this,i);this._handlers=[];this._layers={};this._zoomBoundLayers={};this._sizeChanged=true;this._initContainer(t);this._initLayout();this._onResize=s(this._onResize,this);this._initEvents();if(i.maxBounds){this.setMaxBounds(i.maxBounds)}if(i.zoom!==undefined){this._zoom=this._limitZoom(i.zoom)}if(i.center&&i.zoom!==undefined){this.setView(F(i.center),i.zoom,{reset:true})}this.callInitHooks();this._zoomAnimated=si&&Zt.any3d&&!Zt.mobileOpera&&this.options.zoomAnimation;if(this._zoomAnimated){this._createAnimProxy();Di(this._proxy,ri,this._catchTransitionEnd,this)}this._addLayers(this.options.layers)},setView:function(t,i,e){i=i===undefined?this._zoom:this._limitZoom(i);t=this._limitCenter(F(t),i,this.options.maxBounds);e=e||{};this._stop();if(this._loaded&&!e.reset&&e!==true){if(e.animate!==undefined){e.zoom=n({animate:e.animate},e.zoom);e.pan=n({animate:e.animate,duration:e.duration},e.pan)}var s=this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,e.zoom):this._tryAnimatedPan(t,e.pan);if(s){clearTimeout(this._sizeTimer);return this}}this._resetView(t,i,e.pan&&e.pan.noMoveStart);return this},setZoom:function(t,i){if(!this._loaded){this._zoom=t;return this}return this.setView(this.getCenter(),t,{zoom:i})},zoomIn:function(t,i){t=t||(Zt.any3d?this.options.zoomDelta:1);return this.setZoom(this._zoom+t,i)},zoomOut:function(t,i){t=t||(Zt.any3d?this.options.zoomDelta:1);return this.setZoom(this._zoom-t,i)},setZoomAround:function(t,i,n){var e=this.getZoomScale(i),s=this.getSize().divideBy(2),r=t instanceof C?t:this.latLngToContainerPoint(t),h=r.subtract(s).multiplyBy(1-1/e),o=this.containerPointToLatLng(s.add(h));return this.setView(o,i,{zoom:n})},_getBoundsCenterZoom:function(t,i){i=i||{};t=t.getBounds?t.getBounds():j(t);var n=B(i.paddingTopLeft||i.padding||[0,0]),e=B(i.paddingBottomRight||i.padding||[0,0]),s=this.getBoundsZoom(t,false,n.add(e));s=typeof i.maxZoom==="number"?Math.min(i.maxZoom,s):s;if(s===Infinity){return{center:t.getCenter(),zoom:s}}var r=e.subtract(n).divideBy(2),h=this.project(t.getSouthWest(),s),o=this.project(t.getNorthEast(),s),u=this.unproject(h.add(o).divideBy(2).add(r),s);return{center:u,zoom:s}},fitBounds:function(t,i){t=j(t);if(!t.isValid()){throw new Error("Bounds are not valid.")}var n=this._getBoundsCenterZoom(t,i);return this.setView(n.center,n.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){t=B(t).round();i=i||{};if(!t.x&&!t.y){return this.fire("moveend")}if(i.animate!==true&&!this.getSize().contains(t)){this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom());return this}if(!this._panAnim){this._panAnim=new nn;this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)}if(!i.noMoveStart){this.fire("movestart")}if(i.animate!==false){vi(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,i.duration||.25,i.easeLinearity)}else{this._rawPanBy(t);this.fire("move").fire("moveend")}return this},flyTo:function(t,i,n){n=n||{};if(n.animate===false||!Zt.any3d){return this.setView(t,i,n)}this._stop();var e=this.project(this.getCenter()),s=this.project(t),r=this.getSize(),h=this._zoom;t=F(t);i=i===undefined?h:i;var o=Math.max(r.x,r.y),u=o*this.getZoomScale(h,i),a=s.distanceTo(e)||1,f=1.42,c=f*f;function l(t){var i=t?-1:1,n=t?u:o,e=u*u-o*o+i*c*c*a*a,s=2*n*c*a,r=e/s,h=Math.sqrt(r*r+1)-r;var f=h<1e-9?-18:Math.log(h);return f}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function v(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return d(t)/v(t)}var p=l(0);function g(t){return o*(v(p)/v(p+f*t))}function w(t){return o*(v(p)*m(p+f*t)-d(p))/c}function _(t){return 1-Math.pow(1-t,1.5)}var y=Date.now(),M=(l(1)-p)/f,b=n.duration?1e3*n.duration:1e3*M*.8;function P(){var n=(Date.now()-y)/b,r=_(n)*M;if(n<=1){this._flyToFrame=k(P,this);this._move(this.unproject(e.add(s.subtract(e).multiplyBy(w(r)/a)),h),this.getScaleZoom(o/g(r),h),{flyTo:true})}else{this._move(t,i)._moveEnd(true)}}this._moveStart(true,n.noMoveStart);P.call(this);return this},flyToBounds:function(t,i){var n=this._getBoundsCenterZoom(t,i);return this.flyTo(n.center,n.zoom,i)},setMaxBounds:function(t){t=j(t);if(this.listens("moveend",this._panInsideMaxBounds)){this.off("moveend",this._panInsideMaxBounds)}if(!t.isValid()){this.options.maxBounds=null;return this}this.options.maxBounds=t;if(this._loaded){this._panInsideMaxBounds()}return this.on("moveend",this._panInsideMaxBounds)},setMinZoom:function(t){var i=this.options.minZoom;this.options.minZoom=t;if(this._loaded&&i!==t){this.fire("zoomlevelschange");if(this.getZoom()<this.options.minZoom){return this.setZoom(t)}}return this},setMaxZoom:function(t){var i=this.options.maxZoom;this.options.maxZoom=t;if(this._loaded&&i!==t){this.fire("zoomlevelschange");if(this.getZoom()>this.options.maxZoom){return this.setZoom(t)}}return this},panInsideBounds:function(t,i){this._enforcingBounds=true;var n=this.getCenter(),e=this._limitCenter(n,this._zoom,j(t));if(!n.equals(e)){this.panTo(e,i)}this._enforcingBounds=false;return this},panInside:function(t,i){i=i||{};var n=B(i.paddingTopLeft||i.padding||[0,0]),e=B(i.paddingBottomRight||i.padding||[0,0]),s=this.project(this.getCenter()),r=this.project(t),h=this.getPixelBounds(),o=D([h.min.add(n),h.max.subtract(e)]),u=o.getSize();if(!o.contains(r)){this._enforcingBounds=true;var a=r.subtract(o.getCenter());var f=o.extend(r).getSize().subtract(u);s.x+=a.x<0?-f.x:f.x;s.y+=a.y<0?-f.y:f.y;this.panTo(this.unproject(s),i);this._enforcingBounds=false}return this},invalidateSize:function(t){if(!this._loaded){return this}t=n({animate:false,pan:true},t===true?{animate:true}:t);var i=this.getSize();this._sizeChanged=true;this._lastCenter=null;var e=this.getSize(),r=i.divideBy(2).round(),h=e.divideBy(2).round(),o=r.subtract(h);if(!o.x&&!o.y){return this}if(t.animate&&t.pan){this.panBy(o)}else{if(t.pan){this._rawPanBy(o)}this.fire("move");if(t.debounceMoveend){clearTimeout(this._sizeTimer);this._sizeTimer=setTimeout(s(this.fire,this,"moveend"),200)}else{this.fire("moveend")}}return this.fire("resize",{oldSize:i,newSize:e})},stop:function(){this.setZoom(this._limitZoom(this._zoom));if(!this.options.zoomSnap){this.fire("viewreset")}return this._stop()},locate:function(t){t=this._locateOptions=n({timeout:1e4,watch:false},t);if(!("geolocation"in navigator)){this._handleGeolocationError({code:0,message:"Geolocation not supported."});return this}var i=s(this._handleGeolocationResponse,this),e=s(this._handleGeolocationError,this);if(t.watch){this._locationWatchId=navigator.geolocation.watchPosition(i,e,t)}else{navigator.geolocation.getCurrentPosition(i,e,t)}return this},stopLocate:function(){if(navigator.geolocation&&navigator.geolocation.clearWatch){navigator.geolocation.clearWatch(this._locationWatchId)}if(this._locateOptions){this._locateOptions.setView=false}return this},_handleGeolocationError:function(t){if(!this._container._leaflet_id){return}var i=t.code,n=t.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){if(!this._container._leaflet_id){return}var i=t.coords.latitude,n=t.coords.longitude,e=new N(i,n),s=e.toBounds(t.coords.accuracy*2),r=this._locateOptions;if(r.setView){var h=this.getBoundsZoom(s);this.setView(e,r.maxZoom?Math.min(h,r.maxZoom):h)}var o={latlng:e,bounds:s,timestamp:t.timestamp};for(var u in t.coords){if(typeof t.coords[u]==="number"){o[u]=t.coords[u]}}this.fire("locationfound",o)},addHandler:function(t,i){if(!i){return this}var n=this[t]=new i(this);this._handlers.push(n);if(this.options[t]){n.enable()}return this},remove:function(){this._initEvents(true);if(this.options.maxBounds){this.off("moveend",this._panInsideMaxBounds)}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();ai(this._mapPane);if(this._clearControlPos){this._clearControlPos()}if(this._resizeRequest){x(this._resizeRequest);this._resizeRequest=null}this._clearHandlers();if(this._loaded){this.fire("unload")}var t;for(t in this._layers){this._layers[t].remove()}for(t in this._panes){ai(this._panes[t])}this._layers=[];this._panes=[];delete this._mapPane;delete this._renderer;return this},createPane:function(t,i){var n="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e=ui("div",n,i||this._mapPane);if(t){this._panes[t]=e}return e},getCenter:function(){this._checkIfLoaded();if(this._lastCenter&&!this._moved()){return this._lastCenter.clone()}return this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),i=this.unproject(t.getBottomLeft()),n=this.unproject(t.getTopRight());return new R(i,n)},getMinZoom:function(){return this.options.minZoom===undefined?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===undefined?this._layersMaxZoom===undefined?Infinity:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,n){t=j(t);n=B(n||[0,0]);var e=this.getZoom()||0,s=this.getMinZoom(),r=this.getMaxZoom(),h=t.getNorthWest(),o=t.getSouthEast(),u=this.getSize().subtract(n),a=D(this.project(o,e),this.project(h,e)).getSize(),f=Zt.any3d?this.options.zoomSnap:1,c=u.x/a.x,l=u.y/a.y,d=i?Math.max(c,l):Math.min(c,l);e=this.getScaleZoom(d,e);if(f){e=Math.round(e/(f/100))*(f/100);e=i?Math.ceil(e/f)*f:Math.floor(e/f)*f}return Math.max(s,Math.min(r,e))},getSize:function(){if(!this._size||this._sizeChanged){this._size=new C(this._container.clientWidth||0,this._container.clientHeight||0);this._sizeChanged=false}return this._size.clone()},getPixelBounds:function(t,i){var n=this._getTopLeftPoint(t,i);return new Z(n,n.add(this.getSize()))},getPixelOrigin:function(){this._checkIfLoaded();return this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===undefined?this.getZoom():t)},getPane:function(t){return typeof t==="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var n=this.options.crs;i=i===undefined?this._zoom:i;return n.scale(t)/n.scale(i)},getScaleZoom:function(t,i){var n=this.options.crs;i=i===undefined?this._zoom:i;var e=n.zoom(t*n.scale(i));return isNaN(e)?Infinity:e},project:function(t,i){i=i===undefined?this._zoom:i;return this.options.crs.latLngToPoint(F(t),i)},unproject:function(t,i){i=i===undefined?this._zoom:i;return this.options.crs.pointToLatLng(B(t),i)},layerPointToLatLng:function(t){var i=B(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){var i=this.project(F(t))._round();return i._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(F(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(j(t))},distance:function(t,i){return this.options.c