Skip to content

Instantly share code, notes, and snippets.

@adriano-silva
Created December 10, 2018 15:28
Show Gist options
  • Select an option

  • Save adriano-silva/f0de1ced34b5426dbe6b4a12f839cfae to your computer and use it in GitHub Desktop.

Select an option

Save adriano-silva/f0de1ced34b5426dbe6b4a12f839cfae to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
!function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports.tomtom=e():t.tomtom=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var r=i[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=100)}([function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(25)],void 0!==(r=function(t){function e(e){return t.isArray(e)}function i(e){return t.isObject(e)}function n(e){return t.isFinite(e)}function r(e){return t.isString(e)&&e.length>0}function a(e){return t.isNaN(e)}function s(t){return void 0!==t&&null!==t&&!a(t)}function l(t){return function(e){return e instanceof t}}function u(t,i){var n;for(n in t)t.hasOwnProperty(n)&&(e(t[n])?i[n]=t[n].slice(0):"object"===o(t[n])?(i[n]={},u(t[n],i[n])):i[n]=t[n])}function c(t){return void 0===t?{}:t}function h(t,e,i){var n;t[e]=c(t[e]);for(n in i[e])i[e].hasOwnProperty(n)&&(t[e][n]=i[e][n])}function p(t){var i;return t instanceof L.LatLng?i=t:e(t)?i=L.latLng(t):t&&t.lat&&t.lon?i=L.latLng([t.lat,t.lon]):t&&t.lat&&t.lng&&(i=L.latLng([t.lat,t.lng])),i}function f(t,e){var i;for(i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}return{isArray:e,isEqual:t.isEqual,isObject:i,isString:t.isString,isValidNumber:n,isValidValue:s,isNonEmptyString:r,createInstanceChecker:l,convertToLatLng:p,addFields:function(t,e){var i,n=e||this.defaultFields||{};for(i in t)t.hasOwnProperty(i)&&h(n,i,t);return n},clone:function(t){var e={};return u(t,e),e},encodeQuery:function(t){return encodeURIComponent(t)},encodeStringForRegex:function(t){return t.replace(/[-[\]\/{}()*+?.\\^$|]/g,"\\$&")},extend:f,addDeprecatedProperty:function(t,e,i){Object.defineProperty(t,e,{get:function(){return console.warn("Usage of "+e+" property is deprecated. Please use "+i+" property."),this[i]}})},pointRegex:/(-?\d+(?:\.\d+)?)(?:\s+|\s*,\s*)(-?\d+(?:\.\d+)?)/,circleRegex:/circle\((-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s*,\s*(\d+)\)/,debounce:function(t,e,i){var n;return function(){var r=function(){n=null,e.apply(t,arguments)};clearTimeout(n),n=setTimeout(r,i)}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){/* @preserve
* Leaflet 1.3.0, a JS library for interactive maps. http://leafletjs.com
* (c) 2010-2017 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
!function(t,i){i(e)}(0,function(t){"use strict";function e(t){var e,i,n,r;for(i=1,n=arguments.length;i<n;i++){r=arguments[i];for(e in r)t[e]=r[e]}return t}function i(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)}}function n(t){return t._leaflet_id=t._leaflet_id||++te,t._leaflet_id}function r(t,e,i){var n,r,o,a;return a=function(){n=!1,r&&(o.apply(i,r),r=!1)},o=function(){n?r=arguments:(t.apply(i,arguments),setTimeout(a,e),n=!0)}}function o(t,e,i){var n=e[1],r=e[0],o=n-r;return t===n&&i?t:((t-r)%o+o)%o+r}function a(){return!1}function s(t,e){var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function l(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function u(t){return l(t).split(/\s+/)}function c(t,e){t.hasOwnProperty("options")||(t.options=t.options?$t(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function h(t,e,i){var n=[];for(var r in t)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}function p(t,e){return t.replace(ee,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}function f(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}function d(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function m(t){var e=+new Date,i=Math.max(0,16-(e-re));return re=e+i,window.setTimeout(t,i)}function _(t,e,n){if(!n||oe!==m)return oe.call(window,i(t,e));t.call(e)}function g(t){t&&ae.call(window,t)}function y(){}function v(t){if("undefined"!=typeof L&&L&&L.Mixin){t=ie(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}function b(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}function x(t,e,i){return t instanceof b?t:ie(t)?new b(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new b(t.x,t.y):new b(t,e,i)}function w(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;n<r;n++)this.extend(i[n])}function k(t,e){return!t||t instanceof w?t:new w(t,e)}function T(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;n<r;n++)this.extend(i[n])}function E(t,e){return t instanceof T?t:new T(t,e)}function S(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}function C(t,e,i){return t instanceof S?t:ie(t)&&"object"!=typeof t[0]?3===t.length?new S(t[0],t[1],t[2]):2===t.length?new S(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new S(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new S(t,e,i)}function A(t,e,i,n){if(ie(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function P(t,e,i,n){return new A(t,e,i,n)}function I(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function M(t,e){var i,n,r,o,a,s,l="";for(i=0,r=t.length;i<r;i++){for(n=0,o=(a=t[i]).length;n<o;n++)s=a[n],l+=(n?"L":"M")+s.x+" "+s.y;l+=e?Xe?"z":"x":""}return l||"M0 0"}function z(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}function R(t,e,i,n){return"touchstart"===e?O(t,i,n):"touchmove"===e?U(t,i,n):"touchend"===e&&V(t,i,n),this}function B(t,e,i){var n=t["_leaflet_"+e+i];return"touchstart"===e?t.removeEventListener($e,n,!1):"touchmove"===e?t.removeEventListener(ti,n,!1):"touchend"===e&&(t.removeEventListener(ei,n,!1),t.removeEventListener(ii,n,!1)),this}function O(t,e,n){var r=i(function(t){if("mouse"!==t.pointerType&&t.MSPOINTER_TYPE_MOUSE&&t.pointerType!==t.MSPOINTER_TYPE_MOUSE){if(!(ni.indexOf(t.target.tagName)<0))return;Q(t)}j(t,e)});t["_leaflet_touchstart"+n]=r,t.addEventListener($e,r,!1),oi||(document.documentElement.addEventListener($e,D,!0),document.documentElement.addEventListener(ti,N,!0),document.documentElement.addEventListener(ei,F,!0),document.documentElement.addEventListener(ii,F,!0),oi=!0)}function D(t){ri[t.pointerId]=t,ai++}function N(t){ri[t.pointerId]&&(ri[t.pointerId]=t)}function F(t){delete ri[t.pointerId],ai--}function j(t,e){t.touches=[];for(var i in ri)t.touches.push(ri[i]);t.changedTouches=[t],e(t)}function U(t,e,i){var n=function(t){(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons)&&j(t,e)};t["_leaflet_touchmove"+i]=n,t.addEventListener(ti,n,!1)}function V(t,e,i){var n=function(t){j(t,e)};t["_leaflet_touchend"+i]=n,t.addEventListener(ei,n,!1),t.addEventListener(ii,n,!1)}function Z(t,e,i){function n(t){var e;if(qe){if(!ke||"mouse"===t.pointerType)return;e=ai}else e=t.touches.length;if(!(e>1)){var i=Date.now(),n=i-(o||i);a=t.touches?t.touches[0]:t,s=n>0&&n<=l,o=i}}function r(t){if(s&&!a.cancelBubble){if(qe){if(!ke||"mouse"===t.pointerType)return;var i,n,r={};for(n in a)i=a[n],r[n]=i&&i.bind?i.bind(a):i;a=r}a.type="dblclick",e(a),o=null}}var o,a,s=!1,l=250;return t[ui+si+i]=n,t[ui+li+i]=r,t[ui+"dblclick"+i]=e,t.addEventListener(si,n,!1),t.addEventListener(li,r,!1),t.addEventListener("dblclick",e,!1),this}function q(t,e){var i=t[ui+si+e],n=t[ui+li+e],r=t[ui+"dblclick"+e];return t.removeEventListener(si,i,!1),t.removeEventListener(li,n,!1),ke||t.removeEventListener("dblclick",r,!1),this}function G(t,e,i,n){if("object"==typeof e)for(var r in e)W(t,r,e[r],i);else for(var o=0,a=(e=u(e)).length;o<a;o++)W(t,e[o],i,n);return this}function H(t,e,i,n){if("object"==typeof e)for(var r in e)K(t,r,e[r],i);else if(e)for(var o=0,a=(e=u(e)).length;o<a;o++)K(t,e[o],i,n);else{for(var s in t[ci])K(t,s,t[ci][s]);delete t[ci]}return this}function W(t,e,i,r){var o=e+n(i)+(r?"_"+n(r):"");if(t[ci]&&t[ci][o])return this;var a=function(e){return i.call(r||t,e||window.event)},s=a;qe&&0===e.indexOf("touch")?R(t,e,a,o):!Ge||"dblclick"!==e||!Z||qe&&Pe?"addEventListener"in t?"mousewheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):"mouseenter"===e||"mouseleave"===e?(a=function(e){e=e||window.event,rt(t,e)&&s(e)},t.addEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1)):("click"===e&&Ee&&(a=function(t){ot(t,s)}),t.addEventListener(e,a,!1)):"attachEvent"in t&&t.attachEvent("on"+e,a):Z(t,a,o),t[ci]=t[ci]||{},t[ci][o]=a}function K(t,e,i,r){var o=e+n(i)+(r?"_"+n(r):""),a=t[ci]&&t[ci][o];if(!a)return this;qe&&0===e.indexOf("touch")?B(t,e,o):!Ge||"dblclick"!==e||!q||qe&&Pe?"removeEventListener"in t?"mousewheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",a,!1):t.removeEventListener("mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a):q(t,o),t[ci][o]=null}function J(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,nt(t),this}function X(t){return W(t,"mousewheel",J),this}function Y(t){return G(t,"mousedown touchstart dblclick",J),W(t,"click",it),this}function Q(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function $(t){return Q(t),J(t),this}function tt(t,e){if(!e)return new b(t.clientX,t.clientY);var i=e.getBoundingClientRect(),n=i.width/e.offsetWidth||1,r=i.height/e.offsetHeight||1;return new b(t.clientX/n-i.left-e.clientLeft,t.clientY/r-i.top-e.clientTop)}function et(t){return ke?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/hi:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function it(t){pi[t.type]=!0}function nt(t){var e=pi[t.type];return pi[t.type]=!1,e}function rt(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}function ot(t,e){var i=t.timeStamp||t.originalEvent&&t.originalEvent.timeStamp,n=de&&i-de;n&&n>100&&n<500||t.target._simulatedClick&&!t._simulated?$(t):(de=i,e(t))}function at(t){return"string"==typeof t?document.getElementById(t):t}function st(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function lt(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function ut(t){var e=t.parentNode;e&&e.removeChild(t)}function ct(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ht(t){var e=t.parentNode;e.lastChild!==t&&e.appendChild(t)}function pt(t){var e=t.parentNode;e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function ft(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=gt(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function dt(t,e){if(void 0!==t.classList)for(var i=u(e),n=0,r=i.length;n<r;n++)t.classList.add(i[n]);else if(!ft(t,e)){var o=gt(t);_t(t,(o?o+" ":"")+e)}}function mt(t,e){void 0!==t.classList?t.classList.remove(e):_t(t,l((" "+gt(t)+" ").replace(" "+e+" "," ")))}function _t(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function gt(t){return void 0===t.className.baseVal?t.className:t.className.baseVal}function yt(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&vt(t,e)}function vt(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}function bt(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function xt(t,e,i){var n=e||new b(0,0);t.style[di]=(Oe?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function wt(t,e){t._leaflet_pos=e,Fe?xt(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function kt(t){return t._leaflet_pos||new b(0,0)}function Tt(){G(window,"dragstart",Q)}function Et(){H(window,"dragstart",Q)}function Lt(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(St(),yi=t,vi=t.style.outline,t.style.outline="none",G(window,"keydown",St))}function St(){yi&&(yi.style.outline=vi,yi=void 0,vi=void 0,H(window,"keydown",St))}function Ct(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=Mt(t,i),t=Pt(t,i)}function At(t,e,i){return Math.sqrt(Dt(t,e,i,!0))}function Pt(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,It(t,n,e,0,i-1);var r,o=[];for(r=0;r<i;r++)n[r]&&o.push(t[r]);return o}function It(t,e,i,n,r){var o,a,s,l=0;for(a=n+1;a<=r-1;a++)(s=Dt(t[a],t[n],t[r],!0))>l&&(o=a,l=s);l>i&&(e[o]=1,It(t,e,i,n,o),It(t,e,i,o,r))}function Mt(t,e){for(var i=[t[0]],n=1,r=0,o=t.length;n<o;n++)Ot(t[n],t[r])>e&&(i.push(t[n]),r=n);return r<o-1&&i.push(t[o-1]),i}function zt(t,e,i,n,r){var o,a,s,l=n?Pi:Bt(t,i),u=Bt(e,i);for(Pi=u;;){if(!(l|u))return[t,e];if(l&u)return!1;s=Bt(a=Rt(t,e,o=l||u,i,r),i),o===l?(t=a,l=s):(e=a,u=s)}}function Rt(t,e,i,n,r){var o,a,s=e.x-t.x,l=e.y-t.y,u=n.min,c=n.max;return 8&i?(o=t.x+s*(c.y-t.y)/l,a=c.y):4&i?(o=t.x+s*(u.y-t.y)/l,a=u.y):2&i?(o=c.x,a=t.y+l*(c.x-t.x)/s):1&i&&(o=u.x,a=t.y+l*(u.x-t.x)/s),new b(o,a,r)}function Bt(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function Ot(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function Dt(t,e,i,n){var r,o=e.x,a=e.y,s=i.x-o,l=i.y-a,u=s*s+l*l;return u>0&&((r=((t.x-o)*s+(t.y-a)*l)/u)>1?(o=i.x,a=i.y):r>0&&(o+=s*r,a+=l*r)),s=t.x-o,l=t.y-a,n?s*s+l*l:new b(o,a)}function Nt(t){return!ie(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Ft(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Nt(t)}function jt(t,e,i){var n,r,o,a,s,l,u,c,h,p=[1,4,2,8];for(r=0,u=t.length;r<u;r++)t[r]._code=Bt(t[r],e);for(a=0;a<4;a++){for(c=p[a],n=[],r=0,o=(u=t.length)-1;r<u;o=r++)s=t[r],l=t[o],s._code&c?l._code&c||((h=Rt(l,s,c,e,i))._code=Bt(h,e),n.push(h)):(l._code&c&&((h=Rt(l,s,c,e,i))._code=Bt(h,e),n.push(h)),n.push(s));t=n}return t}function Ut(t,e){var i,n,r,o,a="Feature"===t.type?t.geometry:t,s=a?a.coordinates:null,l=[],u=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Vt;if(!s&&!a)return null;switch(a.type){case"Point":return i=c(s),u?u(t,i):new Xi(i);case"MultiPoint":for(r=0,o=s.length;r<o;r++)i=c(s[r]),l.push(u?u(t,i):new Xi(i));return new Hi(l);case"LineString":case"MultiLineString":return n=Zt(s,"LineString"===a.type?0:1,c),new tn(n,e);case"Polygon":case"MultiPolygon":return n=Zt(s,"Polygon"===a.type?1:2,c),new en(n,e);case"GeometryCollection":for(r=0,o=a.geometries.length;r<o;r++){var h=Ut({geometry:a.geometries[r],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Hi(l);default:throw new Error("Invalid GeoJSON object.")}}function Vt(t){return new S(t[1],t[0],t[2])}function Zt(t,e,i){for(var n,r=[],o=0,a=t.length;o<a;o++)n=e?Zt(t[o],e-1,i):(i||Vt)(t[o]),r.push(n);return r}function qt(t,e){return e="number"==typeof e?e:6,void 0!==t.alt?[s(t.lng,e),s(t.lat,e),s(t.alt,e)]:[s(t.lng,e),s(t.lat,e)]}function Gt(t,e,i,n){for(var r=[],o=0,a=t.length;o<a;o++)r.push(e?Gt(t[o],e-1,i,n):qt(t[o],n));return!e&&i&&r.push(r[0]),r}function Ht(t,i){return t.feature?e({},t.feature,{geometry:i}):Wt(i)}function Wt(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}function Kt(t,e){return new nn(t,e)}function Jt(t,e){return new fn(t,e)}function Xt(t){return Je?new _n(t):null}function Yt(t){return Xe||Ye?new bn(t):null}var Qt=Object.freeze;Object.freeze=function(t){return t};var $t=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}(),te=0,ee=/\{ *([\w_-]+) *\}/g,ie=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},ne="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",re=0,oe=window.requestAnimationFrame||d("RequestAnimationFrame")||m,ae=window.cancelAnimationFrame||d("CancelAnimationFrame")||d("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)},se=(Object.freeze||Object)({freeze:Qt,extend:e,create:$t,bind:i,lastId:te,stamp:n,throttle:r,wrapNum:o,falseFn:a,formatNum:s,trim:l,splitWords:u,setOptions:c,getParamString:h,template:p,isArray:ie,indexOf:f,emptyImageUrl:ne,requestFn:oe,cancelFn:ae,requestAnimFrame:_,cancelAnimFrame:g});y.extend=function(t){var i=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=i.__super__=this.prototype,r=$t(n);r.constructor=i,i.prototype=r;for(var o in this)this.hasOwnProperty(o)&&"prototype"!==o&&"__super__"!==o&&(i[o]=this[o]);return t.statics&&(e(i,t.statics),delete t.statics),t.includes&&(v(t.includes),e.apply(null,[r].concat(t.includes)),delete t.includes),r.options&&(t.options=e($t(r.options),t.options)),e(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},i},y.include=function(t){return e(this.prototype,t),this},y.mergeOptions=function(t){return e(this.prototype.options,t),this},y.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var le={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var r=0,o=(t=u(t)).length;r<o;r++)this._on(t[r],e,i);return this},off:function(t,e,i){if(t)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else for(var r=0,o=(t=u(t)).length;r<o;r++)this._off(t[r],e,i);else delete this._events;return this},_on:function(t,e,i){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var r={fn:e,ctx:i},o=n,a=0,s=o.length;a<s;a++)if(o[a].fn===e&&o[a].ctx===i)return;o.push(r)},_off:function(t,e,i){var n,r,o;if(this._events&&(n=this._events[t]))if(e){if(i===this&&(i=void 0),n)for(r=0,o=n.length;r<o;r++){var s=n[r];if(s.ctx===i&&s.fn===e)return s.fn=a,this._firingCount&&(this._events[t]=n=n.slice()),void n.splice(r,1)}}else{for(r=0,o=n.length;r<o;r++)n[r].fn=a;delete this._events[t]}},fire:function(t,i,n){if(!this.listens(t,n))return this;var r=e({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var a=0,s=o.length;a<s;a++){var l=o[a];l.fn.call(l.ctx||this,r)}this._firingCount--}}return n&&this._propagateEvent(r),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,e,n){if("object"==typeof t){for(var r in t)this.once(r,t[r],e);return this}var o=i(function(){this.off(t,e,n).off(t,o,n)},this);return this.on(t,e,n).on(t,o,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[n(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[n(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};le.addEventListener=le.on,le.removeEventListener=le.clearAllEventListeners=le.off,le.addOneTimeEventListener=le.once,le.fireEvent=le.fire,le.hasEventListeners=le.listens;var ue=y.extend(le),ce=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};b.prototype={clone:function(){return new b(this.x,this.y)},add:function(t){return this.clone()._add(x(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(x(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new b(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new b(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=ce(this.x),this.y=ce(this.y),this},distanceTo:function(t){var e=(t=x(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=x(t)).x===this.x&&t.y===this.y},contains:function(t){return t=x(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+s(this.x)+", "+s(this.y)+")"}},w.prototype={extend:function(t){return t=x(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new b((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new b(this.min.x,this.max.y)},getTopRight:function(){return new 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 e,i;return(t="number"==typeof t[0]||t instanceof b?x(t):k(t))instanceof w?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=k(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>=e.x&&n.x<=i.x,a=r.y>=e.y&&n.y<=i.y;return o&&a},overlaps:function(t){t=k(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>e.x&&n.x<i.x,a=r.y>e.y&&n.y<i.y;return o&&a},isValid:function(){return!(!this.min||!this.max)}},T.prototype={extend:function(t){var e,i,n=this._southWest,r=this._northEast;if(t instanceof S)e=t,i=t;else{if(!(t instanceof T))return t?this.extend(C(t)||E(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||r?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),r.lat=Math.max(i.lat,r.lat),r.lng=Math.max(i.lng,r.lng)):(this._southWest=new S(e.lat,e.lng),this._northEast=new S(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,r=Math.abs(e.lng-i.lng)*t;return new T(new S(e.lat-n,e.lng-r),new S(i.lat+n,i.lng+r))},getCenter:function(){return new S((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 S(this.getNorth(),this.getWest())},getSouthEast:function(){return new S(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof S||"lat"in t?C(t):E(t);var e,i,n=this._southWest,r=this._northEast;return t instanceof T?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=r.lat&&e.lng>=n.lng&&i.lng<=r.lng},intersects:function(t){t=E(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&n.lat<=i.lat,a=r.lng>=e.lng&&n.lng<=i.lng;return o&&a},overlaps:function(t){t=E(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&n.lat<i.lat,a=r.lng>e.lng&&n.lng<i.lng;return o&&a},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=E(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},S.prototype={equals:function(t,e){return!!t&&(t=C(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+s(this.lat,t)+", "+s(this.lng,t)+")"},distanceTo:function(t){return pe.distance(this,C(t))},wrap:function(){return pe.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return E([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new S(this.lat,this.lng,this.alt)}};var he={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,i=this.scale(t);return new w(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?o(t.lng,this.wrapLng,!0):t.lng;return new S(this.wrapLat?o(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,r=e.lng-i.lng;if(0===n&&0===r)return t;var o=t.getSouthWest(),a=t.getNorthEast();return new T(new S(o.lat-n,o.lng-r),new S(a.lat-n,a.lng-r))}},pe=e({},he,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),a=Math.sin((e.lng-t.lng)*i/2),s=o*o+Math.cos(n)*Math.cos(r)*a*a,l=2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s));return this.R*l}}),fe={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),r=Math.sin(n*e);return new b(this.R*t.lng*e,this.R*Math.log((1+r)/(1-r))/2)},unproject:function(t){var e=180/Math.PI;return new S((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return new w([-t,-t],[t,t])}()};A.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new b((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var de,me,_e,ge,ye=e({},pe,{code:"EPSG:3857",projection:fe,transformation:function(){var t=.5/(Math.PI*fe.R);return P(t,.5,-t,.5)}()}),ve=e({},ye,{code:"EPSG:900913"}),be=document.documentElement.style,xe="ActiveXObject"in window,we=xe&&!document.addEventListener,ke="msLaunchUri"in navigator&&!("documentMode"in document),Te=z("webkit"),Ee=z("android"),Le=z("android 2")||z("android 3"),Se=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),Ce=Ee&&z("Google")&&Se<537&&!("AudioNode"in window),Ae=!!window.opera,Pe=z("chrome"),Ie=z("gecko")&&!Te&&!Ae&&!xe,Me=!Pe&&z("safari"),ze=z("phantom"),Re="OTransition"in be,Be=0===navigator.platform.indexOf("Win"),Oe=xe&&"transition"in be,De="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!Le,Ne="MozPerspective"in be,Fe=!window.L_DISABLE_3D&&(Oe||De||Ne)&&!Re&&!ze,je="undefined"!=typeof orientation||z("mobile"),Ue=je&&Te,Ve=je&&De,Ze=!window.PointerEvent&&window.MSPointerEvent,qe=!(!window.PointerEvent&&!Ze),Ge=!window.L_NO_TOUCH&&(qe||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),He=je&&Ae,We=je&&Ie,Ke=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Je=!!document.createElement("canvas").getContext,Xe=!(!document.createElementNS||!I("svg").createSVGRect),Ye=!Xe&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),Qe=(Object.freeze||Object)({ie:xe,ielt9:we,edge:ke,webkit:Te,android:Ee,android23:Le,androidStock:Ce,opera:Ae,chrome:Pe,gecko:Ie,safari:Me,phantom:ze,opera12:Re,win:Be,ie3d:Oe,webkit3d:De,gecko3d:Ne,any3d:Fe,mobile:je,mobileWebkit:Ue,mobileWebkit3d:Ve,msPointer:Ze,pointer:qe,touch:Ge,mobileOpera:He,mobileGecko:We,retina:Ke,canvas:Je,svg:Xe,vml:Ye}),$e=Ze?"MSPointerDown":"pointerdown",ti=Ze?"MSPointerMove":"pointermove",ei=Ze?"MSPointerUp":"pointerup",ii=Ze?"MSPointerCancel":"pointercancel",ni=["INPUT","SELECT","OPTION"],ri={},oi=!1,ai=0,si=Ze?"MSPointerDown":qe?"pointerdown":"touchstart",li=Ze?"MSPointerUp":qe?"pointerup":"touchend",ui="_leaflet_",ci="_leaflet_events",hi=Be&&Pe?2*window.devicePixelRatio:Ie?window.devicePixelRatio:1,pi={},fi=(Object.freeze||Object)({on:G,off:H,stopPropagation:J,disableScrollPropagation:X,disableClickPropagation:Y,preventDefault:Q,stop:$,getMousePosition:tt,getWheelDelta:et,fakeStop:it,skipped:nt,isExternalTarget:rt,addListener:G,removeListener:H}),di=bt(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),mi=bt(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),_i="webkitTransition"===mi||"OTransition"===mi?mi+"End":"transitionend";if("onselectstart"in document)me=function(){G(window,"selectstart",Q)},_e=function(){H(window,"selectstart",Q)};else{var gi=bt(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);me=function(){if(gi){var t=document.documentElement.style;ge=t[gi],t[gi]="none"}},_e=function(){gi&&(document.documentElement.style[gi]=ge,ge=void 0)}}var yi,vi,bi=(Object.freeze||Object)({TRANSFORM:di,TRANSITION:mi,TRANSITION_END:_i,get:at,getStyle:st,create:lt,remove:ut,empty:ct,toFront:ht,toBack:pt,hasClass:ft,addClass:dt,removeClass:mt,setClass:_t,getClass:gt,setOpacity:yt,testProp:bt,setTransform:xt,setPosition:wt,getPosition:kt,disableTextSelection:me,enableTextSelection:_e,disableImageDrag:Tt,enableImageDrag:Et,preventOutline:Lt,restoreOutline:St}),xi=ue.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=kt(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=_(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),wt(this._el,i),this.fire("step")},_complete:function(){g(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),wi=ue.extend({options:{crs:ye,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=c(this,e),this._initContainer(t),this._initLayout(),this._onResize=i(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(C(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this.callInitHooks(),this._zoomAnimated=mi&&Fe&&!He&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),G(this._proxy,_i,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,i,n){return i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(C(t),i,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=e({animate:n.animate},n.zoom),n.pan=e({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,i),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Fe?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Fe?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),r=this.getSize().divideBy(2),o=(t instanceof b?t:this.latLngToContainerPoint(t)).subtract(r).multiplyBy(1-1/n),a=this.containerPointToLatLng(r.add(o));return this.setView(a,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():E(t);var i=x(e.paddingTopLeft||e.padding||[0,0]),n=x(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,i.add(n));if((r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r)===1/0)return{center:t.getCenter(),zoom:r};var o=n.subtract(i).divideBy(2),a=this.project(t.getSouthWest(),r),s=this.project(t.getNorthEast(),r);return{center:this.unproject(a.add(s).divideBy(2).add(o),r),zoom:r}},fitBounds:function(t,e){if(!(t=E(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=x(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new xi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){dt(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){function n(t){var e=(g*g-m*m+(t?-1:1)*b*b*y*y)/(2*(t?g:m)*b*y),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function r(t){return(Math.exp(t)-Math.exp(-t))/2}function o(t){return(Math.exp(t)+Math.exp(-t))/2}function a(t){return r(t)/o(t)}function s(t){return m*(o(x)/o(x+v*t))}function l(t){return m*(o(x)*a(x+v*t)-r(x))/b}function u(t){return 1-Math.pow(1-t,1.5)}function c(){var i=(Date.now()-w)/T,n=u(i)*k;i<=1?(this._flyToFrame=_(c,this),this._move(this.unproject(h.add(p.subtract(h).multiplyBy(l(n)/y)),d),this.getScaleZoom(m/s(n),d),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}if(!1===(i=i||{}).animate||!Fe)return this.setView(t,e,i);this._stop();var h=this.project(this.getCenter()),p=this.project(t),f=this.getSize(),d=this._zoom;t=C(t),e=void 0===e?d:e;var m=Math.max(f.x,f.y),g=m*this.getZoomScale(d,e),y=p.distanceTo(h)||1,v=1.42,b=v*v,x=n(0),w=Date.now(),k=(n(1)-x)/v,T=i.duration?1e3*i.duration:1e3*k*.8;return this._moveStart(!0,i.noMoveStart),c.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return(t=E(t)).isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,E(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var r=this.getSize(),o=n.divideBy(2).round(),a=r.divideBy(2).round(),s=o.subtract(a);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:r})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=i(this._handleGeolocationResponse,this),r=i(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,r,t):navigator.geolocation.getCurrentPosition(n,r,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=new S(t.coords.latitude,t.coords.longitude),i=e.toBounds(t.coords.accuracy),n=this._locateOptions;if(n.setView){var r=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(r,n.maxZoom):r)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var a in t.coords)"number"==typeof t.coords[a]&&(o[a]=t.coords[a]);this.fire("locationfound",o)},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ut(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)ut(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=lt("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new T(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=E(t),i=x(i||[0,0]);var n=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),a=t.getNorthWest(),s=t.getSouthEast(),l=this.getSize().subtract(i),u=k(this.project(s,n),this.project(a,n)).getSize(),c=Fe?this.options.zoomSnap:1,h=l.x/u.x,p=l.y/u.y,f=e?Math.max(h,p):Math.min(h,p);return n=this.getScaleZoom(f,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(r,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new b(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new w(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(C(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(x(t),e)},layerPointToLatLng:function(t){var e=x(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(C(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(C(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(E(t))},distance:function(t,e){return this.options.crs.distance(C(t),C(e))},containerPointToLayerPoint:function(t){return x(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return x(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(x(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(C(t)))},mouseEventToContainerPoint:function(t){return tt(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=at(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");G(e,"scroll",this._onScroll,this),this._containerId=n(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Fe,dt(t,"leaflet-container"+(Ge?" leaflet-touch":"")+(Ke?" leaflet-retina":"")+(we?" leaflet-oldie":"")+(Me?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=st(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),wt(this._mapPane,new b(0,0)),this.createPane("tilePane"),this.createPane("shadowPane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(dt(t.markerPane,"leaflet-zoom-hide"),dt(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e){wt(this._mapPane,new b(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var n=this._zoom!==e;this._moveStart(n,!1)._move(t,e)._moveEnd(n),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return g(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){wt(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[n(this._container)]=this;var e=t?H:G;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Fe&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){g(this._resizeRequest),this._resizeRequest=_(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,r=[],o="mouseout"===e||"mouseover"===e,a=t.target||t.srcElement,s=!1;a;){if((i=this._targets[n(a)])&&("click"===e||"preclick"===e)&&!t._simulated&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(e,!0)){if(o&&!rt(a,t))break;if(r.push(i),o)break}if(a===this._container)break;a=a.parentNode}return r.length||s||o||!rt(a,t)||(r=[this]),r},_handleDOMEvent:function(t){if(this._loaded&&!nt(t)){var e=t.type;"mousedown"!==e&&"keypress"!==e||Lt(t.target||t.srcElement),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){if("click"===t.type){var r=e({},t);r.type="preclick",this._fireDOMEvent(r,r.type,n)}if(!t._stopped&&(n=(n||[]).concat(this._findEventTargets(t,i))).length){var o=n[0];"contextmenu"===i&&o.listens(i,!0)&&Q(t);var a={originalEvent:t};if("keypress"!==t.type){var s=o.getLatLng&&(!o._radius||o._radius<=10);a.containerPoint=s?this.latLngToContainerPoint(o.getLatLng()):this.mouseEventToContainerPoint(t),a.layerPoint=this.containerPointToLayerPoint(a.containerPoint),a.latlng=s?o.getLatLng():this.layerPointToLatLng(a.layerPoint)}for(var l=0;l<n.length;l++)if(n[l].fire(i,a,!0),a.originalEvent._stopped||!1===n[l].options.bubblingMouseEvents&&-1!==f(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return kt(this._mapPane)||new b(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return k([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),r=this.getSize().divideBy(2),o=new w(n.subtract(r),n.add(r)),a=this._getBoundsOffset(o,i,e);return a.round().equals([0,0])?t:this.unproject(n.add(a),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new w(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=k(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),o=n.max.subtract(t.max);return new b(this._rebound(r.x,-o.x),this._rebound(r.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=Fe?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){mt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=lt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=di,i=this._proxy.style[e];xt(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",function(){var t=this.getCenter(),e=this.getZoom();xt(this._proxy,this.project(t,e),this.getZoomScale(e,1))},this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ut(this._proxy),delete this._proxy},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(r))&&(_(function(){this._moveStart(!0,!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,n,r){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,dt(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:r}),setTimeout(i(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&mt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),_(function(){this._moveEnd(!0)},this))}}),ki=y.extend({options:{position:"topright"},initialize:function(t){c(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return dt(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},remove:function(){return this._map?(ut(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Ti=function(t){return new ki(t)};wi.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,r){var o=i+t+" "+i+r;e[t+r]=lt("div",o,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=lt("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ut(this._controlCorners[t]);ut(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Ei=ki.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){c(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ki.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(n(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){dt(this._container,"leaflet-control-layers-expanded"),this._form.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._form.clientHeight?(dt(this._form,"leaflet-control-layers-scrollbar"),this._form.style.height=t+"px"):mt(this._form,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return mt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=lt("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Y(e),X(e);var n=this._form=lt("form",t+"-list");i&&(this._map.on("click",this.collapse,this),Ee||G(e,{mouseenter:this.expand,mouseleave:this.collapse},this));var r=this._layersLink=lt("a",t+"-toggle",e);r.href="#",r.title="Layers",Ge?(G(r,"click",$),G(r,"click",this.expand,this)):G(r,"focus",this.expand,this),i||this.expand(),this._baseLayersList=lt("div",t+"-base",n),this._separator=lt("div",t+"-separator",n),this._overlaysList=lt("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&n(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(i(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ct(this._baseLayersList),ct(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,r=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,r+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&r>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(n(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),r=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=r):e=this._createRadioElement("leaflet-base-layers",r),this._layerControlInputs.push(e),e.layerId=n(t.layer),G(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var a=document.createElement("div");return i.appendChild(a),a.appendChild(e),a.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){var t,e,i=this._layerControlInputs,n=[],r=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||r.push(e);for(o=0;o<r.length;o++)this._map.hasLayer(r[o])&&this._map.removeLayer(r[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),r=i.length-1;r>=0;r--)t=i[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expand:function(){return this.expand()},_collapse:function(){return this.collapse()}}),Li=ki.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"&#x2212;",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=lt("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,r){var o=lt("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Y(o),G(o,"click",$),G(o,"click",r,this),G(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";mt(this._zoomInButton,e),mt(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&dt(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&dt(this._zoomInButton,e)}});wi.mergeOptions({zoomControl:!0}),wi.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Li,this.addControl(this.zoomControl))});var Si=ki.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e=lt("div","leaflet-control-scale"),i=this.options;return this._addScales(i,"leaflet-control-scale-line",e),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=lt("div",e,i)),t.imperial&&(this._iScale=lt("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,r=3.2808399*t;r>5280?(e=r/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(r),this._updateScale(this._iScale,n+" ft",n/r))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),Ci=ki.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){c(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=lt("div","leaflet-control-attribution"),Y(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}});wi.mergeOptions({attributionControl:!0}),wi.addInitHook(function(){this.options.attributionControl&&(new Ci).addTo(this)}),ki.Layers=Ei,ki.Zoom=Li,ki.Scale=Si,ki.Attribution=Ci,Ti.layers=function(t,e,i){return new Ei(t,e,i)},Ti.zoom=function(t){return new Li(t)},Ti.scale=function(t){return new Si(t)},Ti.attribution=function(t){return new Ci(t)};var Ai=y.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Ai.addTo=function(t,e){return t.addHandler(e,this),this};var Pi,Ii={Events:le},Mi=Ge?"touchstart mousedown":"mousedown",zi={mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},Ri={mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"},Bi=ue.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){c(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(G(this._dragStartTarget,Mi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(Bi._dragging===this&&this.finishDrag(),H(this._dragStartTarget,Mi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!t._simulated&&this._enabled&&(this._moved=!1,!ft(this._element,"leaflet-zoom-anim")&&!(Bi._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(Bi._dragging=this,this._preventOutline&&Lt(this._element),Tt(),me(),this._moving)))){this.fire("down");var e=t.touches?t.touches[0]:t;this._startPoint=new b(e.clientX,e.clientY),G(document,Ri[t.type],this._onMove,this),G(document,zi[t.type],this._onUp,this)}},_onMove:function(t){if(!t._simulated&&this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new b(e.clientX,e.clientY).subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(Q(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=kt(this._element).subtract(i),dt(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),dt(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,g(this._animRequest),this._lastEvent=t,this._animRequest=_(this._updatePosition,this,!0)))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),wt(this._element,this._newPos),this.fire("drag",t)},_onUp:function(t){!t._simulated&&this._enabled&&this.finishDrag()},finishDrag:function(){mt(document.body,"leaflet-dragging"),this._lastTarget&&(mt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in Ri)H(document,Ri[t],this._onMove,this),H(document,zi[t],this._onUp,this);Et(),_e(),this._moved&&this._moving&&(g(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1,Bi._dragging=!1}}),Oi=(Object.freeze||Object)({simplify:Ct,pointToSegmentDistance:At,closestPointOnSegment:function(t,e,i){return Dt(t,e,i)},clipSegment:zt,_getEdgeIntersection:Rt,_getBitCode:Bt,_sqClosestPointOnSegment:Dt,isFlat:Nt,_flat:Ft}),Di=(Object.freeze||Object)({clipPolygon:jt}),Ni={project:function(t){return new b(t.lng,t.lat)},unproject:function(t){return new S(t.y,t.x)},bounds:new w([-180,-90],[180,90])},Fi={R:6378137,R_MINOR:6356752.314245179,bounds:new w([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),a=o*Math.sin(n),s=Math.tan(Math.PI/4-n/2)/Math.pow((1-a)/(1+a),o/2);return n=-i*Math.log(Math.max(s,1e-10)),new b(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),a=Math.exp(-t.y/n),s=Math.PI/2-2*Math.atan(a),l=0,u=.1;l<15&&Math.abs(u)>1e-7;l++)e=o*Math.sin(s),e=Math.pow((1-e)/(1+e),o/2),s+=u=Math.PI/2-2*Math.atan(a*e)-s;return new S(s*i,t.x*i/n)}},ji=(Object.freeze||Object)({LonLat:Ni,Mercator:Fi,SphericalMercator:fe}),Ui=e({},pe,{code:"EPSG:3395",projection:Fi,transformation:function(){var t=.5/(Math.PI*Fi.R);return P(t,.5,-t,.5)}()}),Vi=e({},pe,{code:"EPSG:4326",projection:Ni,transformation:P(1/180,1,-1/180,.5)}),Zi=e({},he,{projection:Ni,transformation:P(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});he.Earth=pe,he.EPSG3395=Ui,he.EPSG3857=ye,he.EPSG900913=ve,he.EPSG4326=Vi,he.Simple=Zi;var qi=ue.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[n(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[n(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.getAttribution&&e.attributionControl&&e.attributionControl.addAttribution(this.getAttribution()),this.fire("add"),e.fire("layeradd",{layer:this})}}});wi.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=n(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=n(t);return this._layers[e]?(this._loaded&&t.onRemove(this),t.getAttribution&&this.attributionControl&&this.attributionControl.removeAttribution(t.getAttribution()),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&n(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?ie(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){!isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[n(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=n(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var r=this._zoomBoundLayers[n].options;t=void 0===r.minZoom?t:Math.min(t,r.minZoom),e=void 0===r.maxZoom?e:Math.max(e,r.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Gi=qi.extend({initialize:function(t,e){c(this,e),this._layers={};var i,n;if(t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return n(t)}}),Hi=Gi.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Gi.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),Gi.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new T;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Wi=y.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0]},initialize:function(t){c(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var r=x(n),o=x("shadow"===e&&i.shadowAnchor||i.iconAnchor||r&&r.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),r&&(t.style.width=r.x+"px",t.style.height=r.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return Ke&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),Ki=Wi.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return Ki.imagePath||(Ki.imagePath=this._detectIconPath()),(this.options.imagePath||Ki.imagePath)+Wi.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=lt("div","leaflet-default-icon-path",document.body),e=st(t,"background-image")||st(t,"backgroundImage");return document.body.removeChild(t),e=null===e||0!==e.indexOf("url")?"":e.replace(/^url\(["']?/,"").replace(/marker-icon\.png["']?\)$/,"")}}),Ji=Ai.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new Bi(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),dt(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&mt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,r=this._marker.options.autoPanPadding,o=L.DomUtil.getPosition(e._icon),a=i.getPixelBounds(),s=i.getPixelOrigin(),l=k(a.min._subtract(s).add(r),a.max._subtract(s).subtract(r));if(!l.contains(o)){var u=x((Math.max(l.max.x,o.x)-l.max.x)/(a.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(a.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(a.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(a.min.y-l.min.y)).multiplyBy(n);i.panBy(u,{animate:!1}),this._draggable._newPos._add(u),this._draggable._startPos._add(u),L.DomUtil.setPosition(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=_(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup().fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(g(this._panRequest),this._panRequest=_(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=kt(e._icon),r=e._map.layerPointToLatLng(n);i&&wt(i,n),e._latlng=r,t.latlng=r,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){g(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Xi=qi.extend({options:{icon:new Ki,interactive:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",bubblingMouseEvents:!1},initialize:function(t,e){c(this,e),this._latlng=C(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=C(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),dt(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex});var r=t.icon.createShadow(this._shadow),o=!1;r!==this._shadow&&(this._removeShadow(),o=!0),r&&(dt(r,e),r.alt=""),this._shadow=r,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),r&&o&&this.getPane("shadowPane").appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),ut(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ut(this._shadow),this._shadow=null},_setPos:function(t){wt(this._icon,t),this._shadow&&wt(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(dt(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ji)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ji(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;yt(this._icon,t),this._shadow&&yt(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Yi=qi.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return c(this,t),this._renderer&&this._renderer._updateStyle(this),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+this._renderer.options.tolerance}}),Qi=Yi.extend({options:{fill:!0,radius:10},initialize:function(t,e){c(this,e),this._latlng=C(t),this._radius=this.options.radius},setLatLng:function(t){return this._latlng=C(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return Yi.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new w(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}}),$i=Qi.extend({initialize:function(t,i,n){if("number"==typeof i&&(i=e({},n,{radius:i})),c(this,i),this._latlng=C(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new T(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Yi.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===pe.distance){var r=Math.PI/180,o=this._mRadius/pe.R/r,a=i.project([e+o,t]),s=i.project([e-o,t]),l=a.add(s).divideBy(2),u=i.unproject(l).lat,c=Math.acos((Math.cos(o*r)-Math.sin(e*r)*Math.sin(u*r))/(Math.cos(e*r)*Math.cos(u*r)))/r;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([u,t-c]).x,this._radiusY=l.y-a.y}else{var h=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(h).x}this._updateBounds()}}),tn=Yi.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){c(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,r=null,o=Dt,a=0,s=this._parts.length;a<s;a++)for(var l=this._parts[a],u=1,c=l.length;u<c;u++){var h=o(t,e=l[u-1],i=l[u],!0);h<n&&(n=h,r=o(t,e,i))}return r&&(r.distance=Math.sqrt(n)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,o,a,s=this._rings[0],l=s.length;if(!l)return null;for(t=0,e=0;t<l-1;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,n=0;t<l-1;t++)if(r=s[t],o=s[t+1],i=r.distanceTo(o),(n+=i)>e)return a=(n-e)/i,this._map.layerPointToLatLng([o.x-a*(o.x-r.x),o.y-a*(o.y-r.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=C(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new T,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Nt(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=Nt(t),n=0,r=t.length;n<r;n++)i?(e[n]=C(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new w;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new b(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t)},_projectLatlngs:function(t,e,i){var n,r,o=t[0]instanceof S,a=t.length;if(o){for(r=[],n=0;n<a;n++)r[n]=this._map.latLngToLayerPoint(t[n]),i.extend(r[n]);e.push(r)}else for(n=0;n<a;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,i,n,r,o,a,s,l=this._parts;for(e=0,n=0,r=this._rings.length;e<r;e++)for(i=0,o=(s=this._rings[e]).length;i<o-1;i++)(a=zt(s[i],s[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(a[0]),a[1]===s[i+1]&&i!==o-2||(l[n].push(a[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=Ct(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,r,o,a,s,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,r=(a=(s=this._parts[i]).length)-1;n<a;r=n++)if((e||0!==n)&&At(t,s[r],s[n])<=l)return!0;return!1}});tn._flat=Ft;var en=tn.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,o,a,s,l,u=this._rings[0],c=u.length;if(!c)return null;for(o=a=s=0,t=0,e=c-1;t<c;e=t++)i=u[t],n=u[e],r=i.y*n.x-n.y*i.x,a+=(i.x+n.x)*r,s+=(i.y+n.y)*r,o+=3*r;return l=0===o?u[0]:[a/o,s/o],this._map.layerPointToLatLng(l)},_convertLatLngs:function(t){var e=tn.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof S&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){tn.prototype._setLatLngs.call(this,t),Nt(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Nt(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new b(e,e);if(t=new w(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,r=0,o=this._rings.length;r<o;r++)(n=jt(this._rings[r],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,r,o,a,s,l,u=!1;if(!this._pxBounds.contains(t))return!1;for(r=0,s=this._parts.length;r<s;r++)for(o=0,a=(l=(e=this._parts[r]).length)-1;o<l;a=o++)i=e[o],n=e[a],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u||tn.prototype._containsPoint.call(this,t,!0)}}),nn=Hi.extend({initialize:function(t,e){c(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,r=ie(t)?t:t.features;if(r){for(e=0,i=r.length;e<i;e++)((n=r[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var a=Ut(t,o);return a?(a.feature=Wt(t),a.defaultOptions=a.options,this.resetStyle(a),o.onEachFeature&&o.onEachFeature(t,a),this.addLayer(a)):this},resetStyle:function(t){return t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),rn={toGeoJSON:function(t){return Ht(this,{type:"Point",coordinates:qt(this.getLatLng(),t)})}};Xi.include(rn),$i.include(rn),Qi.include(rn),tn.include({toGeoJSON:function(t){var e=!Nt(this._latlngs),i=Gt(this._latlngs,e?1:0,!1,t);return Ht(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),en.include({toGeoJSON:function(t){var e=!Nt(this._latlngs),i=e&&!Nt(this._latlngs[0]),n=Gt(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Ht(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Gi.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Ht(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var r=e.toGeoJSON(t);if(i)n.push(r.geometry);else{var o=Wt(r);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),i?Ht(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var on=Kt,an=qi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=E(e),c(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(dt(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ut(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&ht(this._image),this},bringToBack:function(){return this._map&&pt(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=E(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:lt("img");dt(e,"leaflet-image-layer"),this._zoomAnimated&&dt(e,"leaflet-zoom-animated"),this.options.className&&dt(e,this.options.className),e.onselectstart=a,e.onmousemove=a,e.onload=i(this.fire,this,"load"),e.onerror=i(this._overlayOnError,this,"error"),this.options.crossOrigin&&(e.crossOrigin=""),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;xt(this._image,i,e)},_reset:function(){var t=this._image,e=new w(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();wt(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){yt(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)}}),sn=an.extend({options:{autoplay:!0,loop:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:lt("video");if(dt(e,"leaflet-image-layer"),this._zoomAnimated&&dt(e,"leaflet-zoom-animated"),e.onselectstart=a,e.onmousemove=a,e.onloadeddata=i(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),r=[],o=0;o<n.length;o++)r.push(n[o].src);this._url=n.length>0?r:[e.src]}else{ie(this._url)||(this._url=[this._url]),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop;for(var s=0;s<this._url.length;s++){var l=lt("source");l.src=this._url[s],e.appendChild(l)}}}}),ln=qi.extend({options:{offset:[0,7],className:"",pane:"popupPane"},initialize:function(t,e){c(this,t),this._source=e},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&yt(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&yt(this._container,1),this.bringToFront()},onRemove:function(t){t._fadeAnimated?(yt(this._container,0),this._removeTimeout=setTimeout(i(ut,void 0,this._container),200)):ut(this._container)},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=C(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&ht(this._container),this},bringToBack:function(){return this._map&&pt(this._container),this},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=x(this.options.offset),i=this._getAnchor();this._zoomAnimated?wt(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,r=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=r+"px"}},_getAnchor:function(){return[0,0]}}),un=ln.extend({options:{maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t.openPopup(this),this},onAdd:function(t){ln.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Yi||this._source.on("preclick",J))},onRemove:function(t){ln.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Yi||this._source.off("preclick",J))},getEvents:function(){var t=ln.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t="leaflet-popup",e=this._container=lt("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=lt("div",t+"-content-wrapper",e);if(this._contentNode=lt("div",t+"-content",i),Y(i),X(this._contentNode),G(i,"contextmenu",J),this._tipContainer=lt("div",t+"-tip-container",e),this._tip=lt("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=lt("a",t+"-close-button",e);n.href="#close",n.innerHTML="&#215;",G(n,"click",this._onCloseButtonClick,this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,r=this.options.maxHeight;r&&n>r?(e.height=r+"px",dt(t,"leaflet-popup-scrolled")):mt(t,"leaflet-popup-scrolled"),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();wt(this._container,e.add(i))},_adjustPan:function(){if(!(!this.options.autoPan||this._map._panAnim&&this._map._panAnim._inProgress)){var t=this._map,e=parseInt(st(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,r=new b(this._containerLeft,-i-this._containerBottom);r._add(kt(this._container));var o=t.layerPointToContainerPoint(r),a=x(this.options.autoPanPadding),s=x(this.options.autoPanPaddingTopLeft||a),l=x(this.options.autoPanPaddingBottomRight||a),u=t.getSize(),c=0,h=0;o.x+n+l.x>u.x&&(c=o.x+n-u.x+l.x),o.x-c-s.x<0&&(c=o.x-s.x),o.y+i+l.y>u.y&&(h=o.y+i-u.y+l.y),o.y-h-s.y<0&&(h=o.y-s.y),(c||h)&&t.fire("autopanstart").panBy([c,h])}},_onCloseButtonClick:function(t){this._close(),$(t)},_getAnchor:function(){return x(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});wi.mergeOptions({closePopupOnClick:!0}),wi.include({openPopup:function(t,e,i){return t instanceof un||(t=new un(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:(this._popup&&this._popup.options.autoClose&&this.closePopup(),this._popup=t,this.addLayer(t))},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&this.removeLayer(t),this}}),qi.include({bindPopup:function(t,e){return t instanceof un?(c(t,e),this._popup=t,t._source=this):(this._popup&&!e||(this._popup=new un(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t,e){if(t instanceof qi||(e=t,t=this),t instanceof Hi)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._popup&&this._map&&(this._popup._source=t,this._popup.update(),this._map.openPopup(this._popup,e)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(t){return this._popup&&(this._popup._map?this.closePopup():this.openPopup(t)),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){var e=t.layer||t.target;this._popup&&this._map&&($(t),e instanceof Yi?this.openPopup(t.layer||t.target,t.latlng):this._map.hasLayer(this._popup)&&this._popup._source===e?this.closePopup():this.openPopup(e,t.latlng))},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var cn=ln.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,interactive:!1,opacity:.9},onAdd:function(t){ln.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&this._source.fire("tooltipopen",{tooltip:this},!0)},onRemove:function(t){ln.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&this._source.fire("tooltipclose",{tooltip:this},!0)},getEvents:function(){var t=ln.prototype.getEvents.call(this);return Ge&&!this.options.permanent&&(t.preclick=this._close),t},_close:function(){this._map&&this._map.closeTooltip(this)},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=lt("div",t)},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e=this._map,i=this._container,n=e.latLngToContainerPoint(e.getCenter()),r=e.layerPointToContainerPoint(t),o=this.options.direction,a=i.offsetWidth,s=i.offsetHeight,l=x(this.options.offset),u=this._getAnchor();"top"===o?t=t.add(x(-a/2+l.x,-s+l.y+u.y,!0)):"bottom"===o?t=t.subtract(x(a/2-l.x,-l.y,!0)):"center"===o?t=t.subtract(x(a/2+l.x,s/2-u.y+l.y,!0)):"right"===o||"auto"===o&&r.x<n.x?(o="right",t=t.add(x(l.x+u.x,u.y-s/2+l.y,!0))):(o="left",t=t.subtract(x(a+u.x-l.x,s/2-u.y-l.y,!0))),mt(i,"leaflet-tooltip-right"),mt(i,"leaflet-tooltip-left"),mt(i,"leaflet-tooltip-top"),mt(i,"leaflet-tooltip-bottom"),dt(i,"leaflet-tooltip-"+o),wt(i,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&yt(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return x(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});wi.include({openTooltip:function(t,e,i){return t instanceof cn||(t=new cn(i).setContent(t)),e&&t.setLatLng(e),this.hasLayer(t)?this:this.addLayer(t)},closeTooltip:function(t){return t&&this.removeLayer(t),this}}),qi.include({bindTooltip:function(t,e){return t instanceof cn?(c(t,e),this._tooltip=t,t._source=this):(this._tooltip&&!e||(this._tooltip=new cn(e,this)),this._tooltip.setContent(t)),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),Ge&&(i.click=this._openTooltip)),this[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t,e){if(t instanceof qi||(e=t,t=this),t instanceof Hi)for(var i in this._layers){t=this._layers[i];break}return e||(e=t.getCenter?t.getCenter():t.getLatLng()),this._tooltip&&this._map&&(this._tooltip._source=t,this._tooltip.update(),this._map.openTooltip(this._tooltip,e),this._tooltip.options.interactive&&this._tooltip._container&&(dt(this._tooltip._container,"leaflet-clickable"),this.addInteractiveTarget(this._tooltip._container))),this},closeTooltip:function(){return this._tooltip&&(this._tooltip._close(),this._tooltip.options.interactive&&this._tooltip._container&&(mt(this._tooltip._container,"leaflet-clickable"),this.removeInteractiveTarget(this._tooltip._container))),this},toggleTooltip:function(t){return this._tooltip&&(this._tooltip._map?this.closeTooltip():this.openTooltip(t)),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){var e=t.layer||t.target;this._tooltip&&this._map&&this.openTooltip(e,this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var hn=Wi.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=x(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Wi.Default=Ki;var pn=qi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:je,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){c(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ut(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ht(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(pt(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=r(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof b?t:new b(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),r=0,o=i.length;r<o;r++)e=i[r].style.zIndex,i[r]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!we){yt(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var r=this._tiles[n];if(r.current&&r.loaded){var o=Math.min(1,(t-r.loaded)/200);yt(r.el,o),o<1?e=!0:(r.active?i=!0:this._onOpaqueTile(r),r.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(g(this._fadeFrame),this._fadeFrame=_(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=lt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(ut(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],r=this._map;return n||((n=this._levels[t]={}).el=lt("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=r.project(r.unproject(r.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,r.getCenter(),r.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ut(this._levels[t].el),this._onRemoveLevel(t),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,i,n){var r=Math.floor(t/2),o=Math.floor(e/2),a=i-1,s=new b(+r,+o);s.z=+a;var l=this._tileCoordsToKey(s),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),a>n&&this._retainParent(r,o,a,n))},_retainChildren:function(t,e,i,n){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var a=new b(r,o);a.z=i+1;var s=this._tileCoordsToKey(a),l=this._tiles[s];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(r,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var r=this._clampZoom(Math.round(e));(void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom)&&(r=void 0);var o=this.options.updateWhenZooming&&r!==this._tileZoom;n&&!o||(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),r=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Fe?xt(t.el,r,n):wt(t.el,r)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),r=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*n);return new w(r.subtract(o),r.add(o))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),r=this._pxBoundsToTileRange(n),o=r.getCenter(),a=[],s=this.options.keepBuffer,l=new w(r.getBottomLeft().subtract([s,-s]),r.getTopRight().add([s,-s]));if(!(isFinite(r.min.x)&&isFinite(r.min.y)&&isFinite(r.max.x)&&isFinite(r.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var u in this._tiles){var c=this._tiles[u].coords;c.z===this._tileZoom&&l.contains(new b(c.x,c.y))||(this._tiles[u].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var h=r.min.y;h<=r.max.y;h++)for(var p=r.min.x;p<=r.max.x;p++){var f=new b(p,h);if(f.z=this._tileZoom,this._isValidTile(f)){var d=this._tiles[this._tileCoordsToKey(f)];d?d.current=!0:a.push(f)}}if(a.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==a.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(p=0;p<a.length;p++)this._addTile(a[p],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return E(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i);return[e.unproject(n,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new T(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new b(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(Ce||e.el.setAttribute("src",ne),ut(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){dt(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=a,t.onmousemove=a,we&&this.options.opacity<1&&yt(t,this.options.opacity),Ee&&!Le&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var n=this._getTilePos(t),r=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&_(i(this._tileReady,this,t,null,o)),wt(o,n),this._tiles[r]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,n){if(this._map){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var r=this._tileCoordsToKey(t);(n=this._tiles[r])&&(n.loaded=+new Date,this._map._fadeAnimated?(yt(n.el,0),g(this._fadeFrame),this._fadeFrame=_(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(dt(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),we||!this._map._fadeAnimated?_(this._pruneTiles,this):setTimeout(i(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new b(this._wrapX?o(t.x,this._wrapX):t.x,this._wrapY?o(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new w(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),fn=pn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,(e=c(this,e)).detectRetina&&Ke&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),Ee||this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return G(n,"load",i(this._tileOnLoad,this,e,n)),G(n,"error",i(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var i={r:Ke?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:t.z?t.z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(i.y=n),i["-y"]=n}return p(this._url,e(i,this.options))},_tileOnLoad:function(t,e){we?setTimeout(i(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=a,e.onerror=a,e.complete||(e.src=ne,ut(e),delete this._tiles[t]))}}),dn=fn.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,i){this._url=t;var n=e({},this.defaultWmsParams);for(var r in i)r in this.options||(n[r]=i[r]);var o=(i=c(this,i)).detectRetina&&Ke?2:1,a=this.getTileSize();n.width=a.x*o,n.height=a.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,fn.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=k(i.project(e[0]),i.project(e[1])),r=n.min,o=n.max,a=(this._wmsVersion>=1.3&&this._crs===Vi?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),s=L.TileLayer.prototype.getTileUrl.call(this,t);return s+h(this.wmsParams,s,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+a},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});fn.WMS=dn,Jt.wms=function(t,e){return new dn(t,e)};var mn=qi.extend({options:{padding:.1,tolerance:0},initialize:function(t){c(this,t),n(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&dt(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=kt(this._container),r=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),a=this._map.project(t,e).subtract(o),s=r.multiplyBy(-i).add(n).add(r).subtract(a);Fe?xt(this._container,s,i):wt(this._container,s)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new w(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),_n=mn.extend({getEvents:function(){var t=mn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){mn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");G(t,"mousemove",r(this._onMouseMove,32,this),this),G(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),G(t,"mouseout",this._handleMouseOut,this),this._ctx=t.getContext("2d")},_destroyContainer:function(){delete this._ctx,ut(this._container),H(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){this._redrawBounds=null;for(var t in this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){this._drawnLayers={},mn.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Ke?2:1;wt(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Ke&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){mn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[n(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[L.stamp(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(t.options.dashArray){var e,i=t.options.dashArray.split(","),n=[];for(e=0;e<i.length;e++)n.push(Number(i[e]));t.options._dashArray=n}},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||_(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new w,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.clearRect(0,0,this._container.width,this._container.height)},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,r,o,a=t._parts,s=a.length,l=this._ctx;if(s){for(this._drawnLayers[t._leaflet_id]=t,l.beginPath(),i=0;i<s;i++){for(n=0,r=a[i].length;n<r;n++)o=a[i][n],l[n?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),r=(Math.max(Math.round(t._radiusY),1)||n)/n;this._drawnLayers[t._leaflet_id]=t,1!==r&&(i.save(),i.scale(1,r)),i.beginPath(),i.arc(e.x,e.y/r,n,0,2*Math.PI,!1),1!==r&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var e,i,n=this._map.mouseEventToLayerPoint(t),r=this._drawFirst;r;r=r.next)(e=r.layer).options.interactive&&e._containsPoint(n)&&!this._map._draggableMoved(e)&&(i=e);i&&(it(t),this._fireEvent([i],t))},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(mt(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null)},_handleMouseHover:function(t,e){for(var i,n,r=this._drawFirst;r;r=r.next)(i=r.layer).options.interactive&&i._containsPoint(e)&&(n=i);n!==this._hoveredLayer&&(this._handleMouseOut(t),n&&(dt(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseover"),this._hoveredLayer=n)),this._hoveredLayer&&this._fireEvent([this._hoveredLayer],t)},_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order,i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))},_bringToBack:function(t){var e=t._order,i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}),gn=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),yn={_initContainer:function(){this._container=lt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(mn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=gn("shape");dt(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=gn("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ut(e),t.removeInteractiveTarget(e),delete this._layers[n(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,r=t._container;r.stroked=!!n.stroke,r.filled=!!n.fill,n.stroke?(e||(e=t._stroke=gn("stroke")),r.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=ie(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(r.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=gn("fill")),r.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(r.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ht(t._container)},_bringToBack:function(t){pt(t._container)}},vn=Ye?gn:I,bn=mn.extend({getEvents:function(){var t=mn.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_initContainer:function(){this._container=vn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=vn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ut(this._container),H(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_onZoomStart:function(){this._update()},_update:function(){if(!this._map._animatingZoom||!this._bounds){mn.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),wt(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=vn("path");t.options.className&&dt(e,t.options.className),t.options.interactive&&dt(e,"leaflet-interactive"),this._updateStyle(t),this._layers[n(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ut(t._path),t.removeInteractiveTarget(t._path),delete this._layers[n(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,M(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",r=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,r)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ht(t._path)},_bringToBack:function(t){pt(t._path)}});Ye&&bn.include(yn),wi.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this.options.preferCanvas&&Xt()||Yt()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=bn&&Yt({pane:t})||_n&&Xt({pane:t}),this._paneRenderers[t]=e),e}});var xn=en.extend({initialize:function(t,e){en.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=E(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});bn.create=vn,bn.pointsToPath=M,nn.geometryToLayer=Ut,nn.coordsToLatLng=Vt,nn.coordsToLatLngs=Zt,nn.latLngToCoords=qt,nn.latLngsToCoords=Gt,nn.getFeature=Ht,nn.asFeature=Wt,wi.mergeOptions({boxZoom:!0});var wn=Ai.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){G(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){H(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ut(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),me(),Tt(),this._startPoint=this._map.mouseEventToContainerPoint(t),G(document,{contextmenu:$,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=lt("div","leaflet-zoom-box",this._container),dt(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new w(this._point,this._startPoint),i=e.getSize();wt(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(ut(this._box),mt(this._container,"leaflet-crosshair")),_e(),Et(),H(document,{contextmenu:$,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(i(this._resetState,this),0);var e=new T(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}});wi.addInitHook("addHandler","boxZoom",wn),wi.mergeOptions({doubleClickZoom:!0});var kn=Ai.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,r=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});wi.addInitHook("addHandler","doubleClickZoom",kn),wi.mergeOptions({dragging:!0,inertia:!Le,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Tn=Ai.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new Bi(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}dt(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){mt(this._map._container,"leaflet-grab"),mt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=E(this._map.options.maxBounds);this._offsetLimit=k(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,r=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,a=Math.abs(r+i)<Math.abs(o+i)?r:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var r=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,a=i.easeLinearity,s=r.multiplyBy(a/o),l=s.distanceTo([0,0]),u=Math.min(i.inertiaMaxSpeed,l),c=s.multiplyBy(u/l),h=u/(i.inertiaDeceleration*a),p=c.multiplyBy(-h/2).round();p.x||p.y?(p=e._limitOffset(p,e.options.maxBounds),_(function(){e.panBy(p,{duration:h,easeLinearity:a,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});wi.addInitHook("addHandler","dragging",Tn),wi.mergeOptions({keyboard:!0,keyboardPanDelta:80});var En=Ai.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),G(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),H(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},r=this.keyCodes;for(e=0,i=r.left.length;e<i;e++)n[r.left[e]]=[-1*t,0];for(e=0,i=r.right.length;e<i;e++)n[r.right[e]]=[t,0];for(e=0,i=r.down.length;e<i;e++)n[r.down[e]]=[0,t];for(e=0,i=r.up.length;e<i;e++)n[r.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},r=this.keyCodes;for(e=0,i=r.zoomIn.length;e<i;e++)n[r.zoomIn[e]]=t;for(e=0,i=r.zoomOut.length;e<i;e++)n[r.zoomOut[e]]=-t},_addHooks:function(){G(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){H(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(n._panAnim&&n._panAnim._inProgress)return;e=this._panKeys[i],t.shiftKey&&(e=x(e).multiplyBy(3)),n.panBy(e),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}$(t)}}});wi.addInitHook("addHandler","keyboard",En),wi.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Ln=Ai.extend({addHooks:function(){G(this._map._container,"mousewheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){H(this._map._container,"mousewheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=et(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(i(this._performZoom,this),r),$(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=i?Math.ceil(r/i)*i:r,a=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,a&&("center"===t.options.scrollWheelZoom?t.setZoom(e+a):t.setZoomAround(this._lastMousePos,e+a))}});wi.addInitHook("addHandler","scrollWheelZoom",Ln),wi.mergeOptions({tap:!0,tapTolerance:15});var Sn=Ai.extend({addHooks:function(){G(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){H(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(Q(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var e=t.touches[0],n=e.target;this._startPos=this._newPos=new b(e.clientX,e.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&dt(n,"leaflet-active"),this._holdTimeout=setTimeout(i(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",e))},this),1e3),this._simulateEvent("mousedown",e),G(document,{touchmove:this._onMove,touchend:this._onUp},this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),H(document,{touchmove:this._onMove,touchend:this._onUp},this),this._fireClick&&t&&t.changedTouches){var e=t.changedTouches[0],i=e.target;i&&i.tagName&&"a"===i.tagName.toLowerCase()&&mt(i,"leaflet-active"),this._simulateEvent("mouseup",e),this._isTapValid()&&this._simulateEvent("click",e)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new b(e.clientX,e.clientY),this._simulateEvent("mousemove",e)},_simulateEvent:function(t,e){var i=document.createEvent("MouseEvents");i._simulated=!0,e.target._simulatedClick=!0,i.initMouseEvent(t,!0,!0,window,1,e.screenX,e.screenY,e.clientX,e.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(i)}});Ge&&!qe&&wi.addInitHook("addHandler","tap",Sn),wi.mergeOptions({touchZoom:Ge&&!Le,bounceAtZoomLimits:!0});var Cn=Ai.extend({addHooks:function(){dt(this._map._container,"leaflet-touch-zoom"),G(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){mt(this._map._container,"leaflet-touch-zoom"),H(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),G(document,"touchmove",this._onTouchMove,this),G(document,"touchend",this._onTouchEnd,this),Q(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),r=e.mouseEventToContainerPoint(t.touches[1]),o=n.distanceTo(r)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var a=n._add(r)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===a.x&&0===a.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(a),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),g(this._animRequest);var s=i(e._move,e,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=_(s,this,!0),Q(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,g(this._animRequest),H(document,"touchmove",this._onTouchMove),H(document,"touchend",this._onTouchEnd),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});wi.addInitHook("addHandler","touchZoom",Cn),wi.BoxZoom=wn,wi.DoubleClickZoom=kn,wi.Drag=Tn,wi.Keyboard=En,wi.ScrollWheelZoom=Ln,wi.Tap=Sn,wi.TouchZoom=Cn;var An=window.L;window.L=t,Object.freeze=Qt,t.version="1.3.0",t.noConflict=function(){return window.L=An,this},t.Control=ki,t.control=Ti,t.Browser=Qe,t.Evented=ue,t.Mixin=Ii,t.Util=se,t.Class=y,t.Handler=Ai,t.extend=e,t.bind=i,t.stamp=n,t.setOptions=c,t.DomEvent=fi,t.DomUtil=bi,t.PosAnimation=xi,t.Draggable=Bi,t.LineUtil=Oi,t.PolyUtil=Di,t.Point=b,t.point=x,t.Bounds=w,t.bounds=k,t.Transformation=A,t.transformation=P,t.Projection=ji,t.LatLng=S,t.latLng=C,t.LatLngBounds=T,t.latLngBounds=E,t.CRS=he,t.GeoJSON=nn,t.geoJSON=Kt,t.geoJson=on,t.Layer=qi,t.LayerGroup=Gi,t.layerGroup=function(t,e){return new Gi(t,e)},t.FeatureGroup=Hi,t.featureGroup=function(t){return new Hi(t)},t.ImageOverlay=an,t.imageOverlay=function(t,e,i){return new an(t,e,i)},t.VideoOverlay=sn,t.videoOverlay=function(t,e,i){return new sn(t,e,i)},t.DivOverlay=ln,t.Popup=un,t.popup=function(t,e){return new un(t,e)},t.Tooltip=cn,t.tooltip=function(t,e){return new cn(t,e)},t.Icon=Wi,t.icon=function(t){return new Wi(t)},t.DivIcon=hn,t.divIcon=function(t){return new hn(t)},t.Marker=Xi,t.marker=function(t,e){return new Xi(t,e)},t.TileLayer=fn,t.tileLayer=Jt,t.GridLayer=pn,t.gridLayer=function(t){return new pn(t)},t.SVG=bn,t.svg=Yt,t.Renderer=mn,t.Canvas=_n,t.canvas=Xt,t.Path=Yi,t.CircleMarker=Qi,t.circleMarker=function(t,e){return new Qi(t,e)},t.Circle=$i,t.circle=function(t,e,i){return new $i(t,e,i)},t.Polyline=tn,t.polyline=function(t,e){return new tn(t,e)},t.Polygon=en,t.polygon=function(t,e){return new en(t,e)},t.Rectangle=xn,t.rectangle=function(t,e){return new xn(t,e)},t.Map=wi,t.map=function(t,e){return new wi(t,e)}})},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(57),i(33),i(0)],void 0!==(r=function(t,e,i){function n(t){return/(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/.test(t.toString())}function r(t,e,i){if(-1===e.indexOf(t))throw new TypeError(i);return t}function a(t){return t.hasOwnProperty("minLon")&&t.hasOwnProperty("maxLon")&&t.hasOwnProperty("minLat")&&t.hasOwnProperty("maxLat")}function s(t){return parseFloat(t.maxLat)<=parseFloat(t.minLat)||parseFloat(t.maxLon)<=parseFloat(t.minLon)}function l(t){return!isFinite(t)||t%1!==0}function u(t,e,i){return l(t)||t<=e||t>i}function c(t,e,i){return!isFinite(t)||t<e||t>i}function h(t){return t.constructor.toString().indexOf("Array")<0}function p(t,e){if(t)throw new TypeError(e)}function f(t){if(!i.isString(t)||!i.pointRegex.test(t))throw new TypeError("A point is expected, but "+t+" ["+("undefined"===typeof value?"undefined":o(value))+"] given");return!0}function d(t){var e=parseFloat(t);if(c(e,-180,180))throw new TypeError("an longitude <-180,180> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e}function m(t){var e=parseFloat(t);if(c(e,-90,90))throw new TypeError("an latitude <-90,90> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e}function _(t){var e,i;if(Array.isArray(t)){if(2!==t.length||2!==t.filter(isFinite).length)throw new TypeError("Ivalid point array in route points");e=t[0],i=t[1]}else{if(!isFinite(t.lat)||!isFinite(t.lon)&&!isFinite(t.lng))throw new TypeError("Ivalid point object in route points");e=t.lat,i="undefined"!==typeof t.lon?t.lon:t.lng}if(!("number"===typeof e||e instanceof Number)||!("number"===typeof i||i instanceof Number))throw new TypeError("Lat and lon components of point should be finite numbers");d(i),m(e)}var g=["LimitedAccess","Arterial","Terminal","Ramp","Rotary","LocalStreet"],y=["ar","af-ZA","bg-BG","zh-TW","cs-CZ","da-DK","nl-NL","en-GB","en-US","fi-FI","fr-FR","de-DE","el-GR","hu-HU","id-ID","it-IT","ko-KR","lt-LT","ms-MY","nb-NO","pl-PL","pt-BR","pt-PT","ru-RU","sk-SK","sl-SI","es-ES","es-MX","sv-SE","th-TH","tr-TR"],v=["ca","cs","da","de","en","es","fi","fr","hu","it","nl","no","pl","pt","sk","sv","tr"],b=["af-ZA","ar","bg-BG","ca-ES","zh-CN","zh-TW","cs-CZ","da-DK","nl-BE","nl-NL","en-AU","en-NZ","en-GB","en-US","et-EE","fi-FI","fr-CA","fr-FR","de-DE","el-GR","hr-HR","hu-HU","it-IT","lv-LV","lt-LT","ms-MY","no-NO","pl-PL","pt-BR","pt-PT","ru-RU","sk-SK","sl-SI","es-ES","es-419","sv-SE","tr-TR","eu-ES","gl-ES","he-IL","id-ID","kk-KZ","ro-RO","sr-RS","th-TH","uk-UA","vi-VN"];return{bool:function(t){return"false"!==t&&Boolean(t)},number:function(t){var e=parseFloat(t);if(!isFinite(e))throw new TypeError("a number is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},naturalInteger:function(t){var e=parseFloat(t);if(l(e)||e<0)throw new TypeError("a natural integer (greater than or equal 0) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},positiveInteger:function(t){var e=parseFloat(t);if(l(e)||e<=0)throw new TypeError("a positive integer (greater than 0) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},integer:function(t){var e=parseFloat(t);if(l(e))throw new TypeError("an integer is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},longitude:d,latitude:m,boundingBox:function(t){return p(!a(t),"a bounding box is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),p(c(t.minLat,-90,90),"a bounding box minimal latitude is expected "+t.minLat+" ["+o(t.minLat)+"] given"),p(c(t.maxLat,-90,90),"a bounding box maximal latitude is expected "+t.maxLat+" ["+o(t.maxLat)+"] given"),p(c(t.minLon,-270,180),"a bounding box minimal longitude is expected "+t.minLon+" ["+o(t.minLon)+"] given"),p(c(t.maxLon,-180,270),"a bounding box maximal longitude is expected "+t.maxLon+" ["+o(t.maxLon)+"] given"),p(s(t),"a bounding box expected but max <= min"),t},numberInInterval:function(t,e){if(2!==arguments.length)throw new TypeError("Number in interval validator requires min and max value parameters");return function(i){var n=parseFloat(i);if(c(n,t,e))throw new TypeError("a number in interval <"+t+", "+e+"> is expected, but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given");return n}},integerInInterval:function(t,e){if(2!==arguments.length)throw new TypeError("Number in interval validator requires min and max value parameters");return function(i){var n=parseFloat(i);if(u(n,t,e))throw new TypeError("an integer in interval <"+(t+1)+", "+e+"> is expected, but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given");return n}},string:function(t){if(!i.isString(t))throw new TypeError("a string is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},geometriesZoom:function(t){var e=parseFloat(t);if(c(t,0,22))throw new TypeError("an geometies zoom <0, 22> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},zoomLevel:function(t){var e=parseFloat(t);if(c(e,0,18))throw new TypeError("an zoom level <0, 18> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},functionType:function(t){if("function"!==typeof t)throw new TypeError("a function is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},countryCode:function(t){if(!i.isString(t)||3!==t.length&&2!==t.length)throw new TypeError("a 2 or 3-characters long country name is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},languageCode:function(t){if(!i.isString(t)||b.indexOf(t)<0)throw new TypeError("One of pre-defined language codes was expected: "+b+", but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},countrySet:function(t){var e;return p(!i.isString(t)&&h(t),"An array of string country names or string (divided with commas) of country names (two or three-characters long) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),e=i.isString(t)?t:t.join(),p(!e.match(/^([a-zA-z]{2,3},)*[a-zA-z]{2,3}$/),"An array of string country names or string (divided with commas) of country names (two or three-characters long) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),e},countrySetAlpha3:function(t,e){var n;return p(!i.isString(e)&&h(e),"An array of string country names or string (divided with commas) of country names (three-characters long) is expected, but "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] given"),n=i.isString(e)?e:e.join(),t&&""===n?e:(p(!n.match(/^([a-zA-z]{3},)*[a-zA-z]{3}$/),"An array of string country names or string (divided with commas) of country names (three-characters long) is expected, but "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] given"),e)},point:function(t){return f(t),t},fuzzinessLevel:function(t){var e=parseFloat(t);if(u(e,0,4))throw new TypeError("Fuzziness level value (a positive integer lower than 5) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},limit:function(t){var e=parseFloat(t);if(u(e,0,100))throw new TypeError("Limit value (a positive integer lower than 100) is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},offset:function(t){var e=parseFloat(t);if(u(e,-1,1900))throw new TypeError("Offset an integer value <0, 1900> is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return e},plainObject:function(t){if("object"!==("undefined"===typeof t?"undefined":o(t))||t.constructor!==Object)throw new TypeError("an object is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},arrayType:function(t){if(h(t))throw new TypeError("an array is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},arrayOf:function(t){return function(e){return e.forEach(function(e){var i;for(i in t)if(t.hasOwnProperty(i)&&(e.hasOwnProperty(i)&&"function"===typeof t[i].validator&&(e[i]=t[i].validator(e[i])),!0===t[i].required&&!e.hasOwnProperty(i)))throw new Error("Missing required "+i)}),e}},objectOf:function(t){return function(e){var i;for(i in t)if(t.hasOwnProperty(i)&&(e.hasOwnProperty(i)&&"function"===typeof t[i].validator&&(e[i]=t[i].validator(e[i])),!0===t[i].required&&!e.hasOwnProperty(i)))throw new Error("Missing required "+i);return e}},roadUse:function(t){var e,n;for(p(!i.isString(t)||!t.match(/^\[("\w*",?)+\]$/),"Road use is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),e=t.replace(/["[\]]/g,"").split(","),n=0;n<e.length;n+=1)p(g.indexOf(e[n])<0,"Road use ("+g+") is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},oneOfValue:function(t,e){return function(i){var n="Supported "+e+" is expected (one of: "+t+"), but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given";return r(i,t,n)}},arrayOfValues:function(t,e){return function(i){var n,a="Supported "+e+" type is expected (array with one of: "+t+"), but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given";if(h(i))throw new TypeError("an array is expected, but "+i+" ["+("undefined"===typeof i?"undefined":o(i))+"] given");for(n=0;n<i.length;n+=1)r(i[n],t,a);return i}},departAt:function(t){if("now"===t||n(t)&&Date.now()<Date.parse(t))return t;throw new TypeError("Supported departAt is now or rfc3339 format and no earlier than now(), but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given")},arriveAt:function(t){if(n(t)&&Date.now()<Date.parse(t))return t;throw new TypeError("Supported arriveAt is rfc3339 format, but and no earlier than now() "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given")},dateRfc3339:function(t){if(n(t))return t;throw new TypeError("Expecting date in RFC3339 format, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given")},routingGuidanceLanguage:function(t){var e="Supported routing guidance language is expected to be one of: "+y+"), but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given";return r(t,y,e)},trafficIncidentsLanguage:function(t){var e="Supported traffic incidents language is expected to be one of: "+v+"), but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given";return r(t,v,e)},routingLocations:function(t){var e,n=i.pointRegex,r=i.circleRegex;if(t.constructor.toString().indexOf("Array")>-1&&(t=t.join(":")),e=new RegExp("^"+n.source+":(?:(?:"+n.source+"|"+r.source+"):)*"+n.source+"$"),!t.match(e))throw new TypeError("Routing location is expected. But "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},circle:function(t){var e;return p(!i.isString(t),"Expecting circle but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),e=t.match(/circle\(-?\d*(?:\.\d*)?\s*,\s*-?\d*(?:\.\d*)?\s*,\s*(\d+)\)/),p(!e||parseFloat(e[1])>2005e4,"Expecting circle but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),t},geometryList:function(t){var e,i;if(p(h(t),"An array of geometry objects is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given"),!(t.length>0))throw new TypeError("An array of geometry objects is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");for(e=0;e<t.length;e+=1)i=t[e],p(!i.hasOwnProperty("type")||!i.hasOwnProperty("vertices")&&(!i.hasOwnProperty("position")||!i.hasOwnProperty("radius")),"An array of geometry objects is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t},locale:function(e){return function(i){return p(!t(i,e),'Provided language code "'+i+'" is not valid for a given service type: "'+e+'"'),i}},geopolView:function(t,i){if(!t)throw new Error("Please specify a service type.");return function(n){return p(-1===e.getSupportedViews(t,"all").map(function(t){return t.code}).indexOf(n),i+': Provided geopolitical view code "'+n+'" is not valid'),n}},route:function(t){var e;if("undefined"===typeof t.points)throw new TypeError("Invalid structure of the route object");if((e=t.points)&&!(Array.isArray(e)&&e.length>2))throw new TypeError("Provided route array "+e+" is not valid. It should be an array with at least 2 points.");return e.forEach(_),t},supportingPoints:function(t){if(!i.isArray(t))throw new TypeError("Invalid structure of the supporting points");if(!t.length||t.length<2)throw new TypeError("There should be at least two supporting points");return t}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(21),i(109),i(26),i(8),i(53),i(122),i(125),i(135),i(136),i(138),i(139),i(69),i(39),i(38),i(37),i(30),i(29),i(33),i(32),i(70),i(0),i(76),i(143)],void 0!==(r=function(t,e,i,n,r,o,a,s,l,u,c,h,p,f,d,m,_,g,y,v,b,x,w){function k(t,e){"raster"===e&&t.setZoom(Math.floor(t.getZoom()))}function T(t){var e,i,n=/^(raster|vector)$/,r=t.length,o=[];for(i=0;i<r;i++)e=String(t[i]).toLowerCase(),n.test(t[i])&&o.push(e);return o}function E(t){var e=t.options.source||["raster"],i=["raster"];return x.isString(e)&&(e=[e]),e=T(e),e.length>0?e:i}function L(){return window.navigator.userAgent.indexOf("MSIE ")>-1}function S(t){t.options.traffic&&t.addLayer(s(t.options.traffic))}function C(t){t.options.trafficFlow&&t.addLayer(l(t.options.trafficFlow)),t.options.vectorTrafficFlow&&(t.options.vectorTrafficFlow.basePath||(t.options.vectorTrafficFlow.basePath=t.options.basePath),t.addLayer(u(t.options.vectorTrafficFlow)))}function A(e){var i,r,o=E(e);e._ttLabelsLayers={},-1===o.indexOf("raster")||e.options.noLabelsOnTop||L()||(i=c(e.options),i.registerEventHandlers(e),t.stamp(i),e._ttLabelsLayers.raster=i),-1!==o.indexOf("vector")&&!e.options.noLabelsOnTop&&n.isMapboxSet()&&(r=new h(e.options),r.registerEventHandlers(e),t.stamp(r),e._ttLabelsLayers.vector=r)}function P(t){"MacIntel"===navigator.platform&&t._handlers.filter(function(t){return"_performZoom"in t}).forEach(function(t){var e=t._performZoom;t._performZoom=function(){t._delta*=13.25,e.apply(t)}})}function I(e){var i=t.DomUtil.create("div","tomtom-webgl-error");i.appendChild(document.createTextNode("Unable to initialize vector layer - browser doesn't support WebGL!")),e._controlContainer&&e._controlContainer.appendChild(i)}function M(){var t=document.createElement("canvas"),e=t.getContext("webgl")||t.getContext("experimental-webgl");return!!(e&&e instanceof WebGLRenderingContext)}function z(t){var e=/^(error|raster)$/,i=E(t),r=t.options.vector?String(t.options.vector.fallback).toLowerCase():"";if(r=e.test(r)?r:"error",!(-1===i.indexOf("vector")||n.isMapboxSupported()&&M()))switch(r){case"raster":t.options.source=["raster"];break;case"error":if(M())throw new Error("MapBox failed to load. Make sure you're using vector library.");throw I(t),new Error("Unable to initialize vector layer - browser doesn't support WebGL!");default:throw new Error("Something went wrong with vectorFallback!")}}function R(t,e){var i;return t.options.geopolView?(i=x.clone(t.options),i.geopolView=t._geopolViewService.getCurrentGeopolView().getValueFor("maps",e),i):t.options}function B(e){var i,n=this,r=n._ttBaseLayers?n._ttBaseLayers[e]:void 0;r&&(i="vector"===e?new f(R(n,"vector")):new t.TomTomLayer(R(n,"raster")),t.stamp(i),n._ttBaseLayers[e]=i,w.findLayersByName(e,n).length>0&&(n.addLayer(i),n.removeLayer(r)))}function O(t){this.options.language=t.getValueFor("maps"),B.call(this,"vector"),B.call(this,"raster")}function D(t){this.options.geopolView=t.getCode(),B.call(this,"vector"),B.call(this,"raster")}function N(e){var i,r=E(e),o=[];for(e._ttBaseLayers={},-1!==r.indexOf("raster")&&(e._ttBaseLayers.raster=p(R(e,"raster")),t.stamp(e._ttBaseLayers.raster)),n.tryToSetMapbox()&&-1!==r.indexOf("vector")&&(e._ttBaseLayers.vector=new f(R(e,"vector")),t.stamp(e._ttBaseLayers.vector)),i=0;i<e.options.layers.length;i++)e.options.layers[i].wmsParams&&o.push(t.tileLayer.wms(e.options.layers[i]._url,e.options.layers[i].wmsParams));if(!o.length)switch(r[0]){case"vector":if(void 0===e._ttBaseLayers.vector)throw new Error("Can not add vector layer. Mapbox-gl-js dependency not met.");o=[e._ttBaseLayers.vector];break;case"raster":o=[e._ttBaseLayers.raster];break;default:throw new Error("Something went wrong with sources!")}e.options.layers=o}function F(t){isFinite(t.options.zoomDelta)&&(t.options.zoomDelta=parseFloat(t.options.zoomDelta)),isFinite(t.options.zoomSnap)&&(t.options.zoomSnap=parseFloat(t.options.zoomSnap)),isFinite(t.options.wheelPxPerZoomLevel)&&(t.options.wheelPxPerZoomLevel=parseInt(t.options.wheelPxPerZoomLevel,10))}function j(t){t._routingContext=new b}function U(t){t._localeService.cleanEvents(),t._geopolViewService.cleanEvents()}function V(t){t._unitService=new d(m)}function Z(e){e._localeService=new _(g),e._localeService.on(t.LocaleService.Events.LOCALE_CHANGED,O.bind(e)),e.options.language=e._localeService.getCurrentLocale().getLanguageCode()}function q(e){e._geopolViewService=new y(v),e._geopolViewService.on(t.GeopolViewService.Events.GEOPOL_VIEW_CHANGED,D.bind(e)),e.options.geopolView&&e._geopolViewService.setCurrentGeopolView(e.options.geopolView)}function G(){var e,n=this,s="";t.Icon.Default.imagePath=i.get(this),V(n),Z(n),q(n);try{z(n),r.setKey(n.options.key),F(n),N(n),A(n),C(n),S(n),j(n),P(n),void 0===n.getZoom()&&n.setView([0,0],2),n.options.maxBounds||n.setMaxBounds(t.latLngBounds([[-90,-18e3],[90,18e3]])),o().go(function(i){n.attributionControl&&(e=n.attributionControl.addAttribution,n.attributionControl.addAttribution=function(){e.apply(this,arguments),a.updateEventHandler(n)},s+='<a class="tomtomAttribution">',s+=i,s+="</a>",n.attributionControl.addAttribution(s),n.fire(t.Map.Events.ATTRIBUTION_LOAD_END,{data:s}))})}catch(t){throw console.error(t),U(n),t}}var H={ATTRIBUTION_LOAD_END:"tomtom.attributionloadend"};return t.Map.Events=H,t.Map.mergeOptions({worldCopyJump:!0}),delete t.Map.prototype.options.minZoom,delete t.Map.prototype.options.maxZoom,t.Map.prototype.setMapSource=function(t){var e,i,n,r;if(i=this,e=i._ttBaseLayers,n=e[t]){for(r in e)e.hasOwnProperty(r)&&this.removeLayer(e[r]);k(i,t),i.addLayer(n)}},t.Map.prototype.getBaseLayers=function(){return this._ttBaseLayers},t.Map.prototype.getLocaleService=function(){return this._localeService},t.Map.prototype.getUnitService=function(){return this._unitService},t.Map.prototype.getGeopolViewService=function(){return this._geopolViewService},t.Control.Attribution.prototype.options={position:"bottomleft",prefix:""},t.Icon.Default=e,t.Icon.Default.imagePath=i.get(),t.Marker.mergeOptions({icon:new t.Icon.Default}),t.Map.addInitHook(G),t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(0),i(31)],void 0!==(r=function(t,e){function i(t){return"function"===typeof t}function n(t){return!!t&&t.constructor.toString().indexOf("Array")>-1}function r(t){return t.hasOwnProperty("lat")&&(t.hasOwnProperty("lon")||t.hasOwnProperty("lng"))}function a(t,e){return void 0===t?e:t}function s(t){return t<0?-1:1}function l(t,e){if(t)throw new TypeError(e)}function u(t){var e,i=parseFloat(t);if(!isFinite(i))throw new TypeError("an number is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return i<-90||i>90?(e=Math.ceil(Math.abs(i)/180),i-180*s(i)*e):i}function c(t){var e,i=parseFloat(t);if(!isFinite(i))throw new TypeError("an number is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return i<-180||i>180?(e=Math.ceil(Math.abs(i)/360),i-360*s(i)*e):i}function h(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")}function p(t){return t.hasOwnProperty("latitude")&&t.hasOwnProperty("longitude")}function f(t){return i(t.lat)&&i(t.lng)}function d(e){var i;if(n(e)&&2===e.length)return e;if(t.isString(e))return i=e.match(t.pointRegex),l(!i||!i[1]||!i[2],"A point is expected, but "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] given"),[i[1],i[2]];if(f(e))return[e.lat(),e.lng()];if(r(e))return[e.lat,a(e.lon,e.lng)];if(h(e))return[e.y,e.x];if(p(e))return[e.latitude,e.longitude];throw new TypeError("A point is expected, but "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] given")}function m(t){return t.hasOwnProperty("minLon")&&t.hasOwnProperty("minLat")&&t.hasOwnProperty("maxLon")&&t.hasOwnProperty("maxLat")}function _(t){return t.hasOwnProperty("left")&&t.hasOwnProperty("bottom")&&t.hasOwnProperty("right")&&t.hasOwnProperty("top")}function g(t){return i(t.getWest)&&i(t.getEast)&&i(t.getSouth)&&i(t.getNorth)}function y(e){var r,a;if(m(e))return e;if(_(e))return{minLon:e.left,minLat:e.bottom,maxLon:e.right,maxLat:e.top};if(g(e))return{minLon:e.getWest(),minLat:e.getSouth(),maxLon:e.getEast(),maxLat:e.getNorth()};if(i(e.getNorthEast)&&i(e.getSouthWest))return a=d(e.getNorthEast()),r=d(e.getSouthWest()),{minLon:r[1],minLat:r[0],maxLon:a[1],maxLat:a[0]};if(n(e)&&4===e.length)return{minLon:e[0],minLat:e[1],maxLon:e[2],maxLat:e[3]};if(n(e)&&2===e.length)return r=d(e[0]),a=d(e[1]),{minLon:r[1],minLat:r[0],maxLon:a[1],maxLat:a[0]};if(t.isString(e)&&(e=e.trim().split(/\s*,\s*/),4===e.length))return{minLon:parseFloat(e[0]),minLat:parseFloat(e[1]),maxLon:parseFloat(e[2]),maxLat:parseFloat(e[3])};throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to bounding box")}function v(t){var e,i,n=t.minLon,r=t.maxLon,o=t.minLat,a=t.maxLat;return r-n>360?(r=180,n=-180):(r>270&&(e=Math.ceil(n/360),r-=360*e,n-=360*e),n<-270&&(i=Math.ceil(-r/360),r+=360*i,n+=360*i)),o=o<-90?-90:o,a=a>90?90:a,{minLon:n,minLat:o,maxLon:r,maxLat:a}}function b(e){var i,n,r,a=e.match(t.circleRegex);return l(!a||!a[1]||!a[2]||!a[3],"Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to circle"),i=parseFloat(a[1]),n=parseFloat(a[2]),r=parseFloat(a[3]),l(!isFinite(i)||!isFinite(n),"Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to circle"),"circle("+i+","+n+","+r+")"}function x(t){var e=d(t);return u(e[0])+","+c(e[1])}function w(e){return t.isString(e)&&e.indexOf("circle")>-1?b(e):n(e)&&3===e.length?"circle("+u(e[0])+","+c(e[1])+","+e[2]+")":x(e)}function k(t){var e,i=[];for(e in t)t.hasOwnProperty(e)&&i.push(x(t[e]));return i}function T(t){var e;return"string"!==typeof t?t:(e=t.split(","),{latitude:e[0],longitude:e[1]})}function E(t){return t.map(T)}var L,S;return L={ca:["ca","cat","ca-fr","ca_fr","ca-es","ca_es","catalan"],cs:["cs","cze","cs-cz","cs_cz","czech"],da:["da","dan","da-dk","da_dk","danish"],de:["de","ger","de-de","de_de","german"],en:["en","eng","en-gb","en_gb","english","us","ame","en-us","en_us","english US","default"],es:["es","spa","es-es","es_es","spanish","mx","spm","es-mx","es_mx","spanish MX"],fi:["fi","fin","fi-fi","fi_fi","finnish"],fr:["fr","fre","fr-fr","fr_fr","french"],hu:["hu","hun","hu-hu","hu_hu","hungarian"],it:["it","ita","it-it","it_it","italian"],nl:["nl","dut","nl-nl","nl_nl","dutch"],no:["no","nor","no-no","no_no","norwegian"],pl:["pl","pol","pl-pl","pl_pl","polish"],pt:["br","por","pt-br","pt_br","portuguese","pt","pob","pt-pt","pt_pt","portuguese BR"],sk:["sk","slo","sk-sk","sk_sk","slovak"],sv:["sv","swe","sv-se","sv_se","swedish"],tr:["tr","tur","tr-tr","tr_tr","turkish"],defaultValue:"en"},S={ar:["ar","ara","ar-ar","ar_ar","arabic"],"af-ZA":["af","afr","af-za","af_za","afrikaans"],"bg-BG":["bg","bul","bg-bg","bg_bg","bulgarian"],"zh-TW":["zh","chi","zh-tw","zh_tw","chinese"],"cs-CZ":["cs","cz","cze","cs-cz","cs_cz","czech"],"da-DK":["da","dan","da-dk","da_dk","danish"],"nl-NL":["nl","dut","nl-nl","nl_nl","dutch"],"en-GB":["en","eng","en-gb","en_gb","english","default"],"en-US":["us","ame","en-us","en_us","english US"],"fi-FI":["fi","fin","fi-fi","fi_fi","finnish"],"fr-FR":["fr","fre","fr-fr","fr_fr","french"],"de-DE":["de","ger","de-de","de_de","german"],"el-GR":["el","gre","el-gr","el_gr","greek"],"hu-HU":["hu","hun","hu-hu","hu_hu","hungarian"],"id-ID":["id","ind","id-id","id_id","indonesian"],"it-IT":["it","ita","it-it","it_it","italian"],"ko-KR":["ko","kor","ko-kr","ko_kr","korean"],"lt-LT":["lt","lit","lt-lt","lt_lt","lithuanian"],"ms-MY":["ms","mal","ms-my","ms_my","malay"],"nb-NO":["nb","nor","nb-no","nb_no","norwegian"],"pl-PL":["pl","pol","pl-pl","pl_pl","polish"],"pt-BR":["br","por","pt-br","pt_br","portuguese"],"pt-PT":["pt","pob","pt-pt","pt_pt","portuguese BR"],"ru-RU":["ru","rus","ru-ru","ru_ru","russian"],"sk-SK":["sk","slo","sk-sk","sk_sk","slovak"],"sl-SI":["sl","slv","sl-si","sl_si","slovenian"],"es-ES":["es","spa","es-es","es_es","spanish"],"es-MX":["mx","spm","es-mx","es_mx","spanish MX"],"sv-SE":["sv","swe","sv-se","sv_se","swedish"],"th-TH":["th","tha","th-th","th_th","thai"],"tr-TR":["tr","tur","tr-tr","tr_tr","turkish"],defaultValue:"en-GB"},{boundingBox:function(t){return v(y(t))},longitude:function(t){return c(t)},latitude:function(t){return u(t)},point:function(t){return x(t)},dateTime:function(e){if(e&&e instanceof Date)return e.toISOString();if(!e||!t.isString(e))throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to datetime value.");return"now"!==e&&(e=e.replace(/([0-9]{2})-([0-9]{2})-([0-9]{2})/,"$1/$2/$3"),e=e.replace(/([0-9])T([0-9])/,"$1 $2"),e=new Date(e).toISOString()),e},geometryList:function(t){var e,i;l(!t||!n(t),"Unable to cast "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] to geometry list (array)");for(e in t)t.hasOwnProperty(e)&&(i=t[e],"POLYGON"===i.type?i.vertices=k(i.vertices):"CIRCLE"===i.type&&(i.position=x(i.position)));return t},language:function(t,i){var n;return i&&i.data&&i.data.__serviceType?(n=new e(t),n.getValueFor(i.data.__serviceType)):t},routingGuidanceLanguage:function(t){var e;t=t.toLowerCase();for(e in S)if(S.hasOwnProperty(e)&&S[e].indexOf(t)>-1)return e;return S.defaultValue},trafficIncidentsLanguage:function(t){var e;t=t.toLowerCase();for(e in L)if(L.hasOwnProperty(e)&&L[e].indexOf(t)>-1)return e;return L.defaultValue},routingLocations:function(e){var i,r=[];if(t.isString(e))return e;if(n(e)){for(l(e.length<2,"Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to routing locations string"),r.push(x(e[0])),i=1;i<e.length-1;i+=1)r.push(w(e[i]));return r.push(x(e[e.length-1])),r.join(":")}throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to routing locations string")},roadUse:function(e){var i;if(t.isString(e))return'["'+e.replace(/["']|^\s+|\s+$/g,"").split(/[\s,]+/).join('","')+'"]';if(n(e)){for(i=0;i<e.length;i+=1)e[i]=String(e[i]).replace(/["']|^\s+|\s+$/g,"");return'["'+e.join('","')+'"]'}throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to road use string")},arrayOf:function(t){return function(e){var i;for(i in t)t.hasOwnProperty(i)&&t[i].hasOwnProperty("defaultValue")&&e.forEach(function(t,e){return function(i){i.hasOwnProperty(t)||(i[t]=e)}}(i,t[i].defaultValue));return e.forEach(function(e){var i;for(i in e)e.hasOwnProperty(i)&&t.hasOwnProperty(i)&&"function"===typeof t[i].converter&&(e[i]=t[i].converter(e[i]))}),e}},objectOf:function(t){return function(e){var i;for(i in e)e.hasOwnProperty(i)&&t.hasOwnProperty(i)&&"function"===typeof t[i].converter&&(e[i]=t[i].converter(e[i]));return e}},arrayOfStrings:function(e){if(!e)return[];if(t.isString(e))return e=e.trim().replace(/\s*[,;]\s*/g,","),e.split(/[,;]+/);if(n(e))return e;throw new TypeError("Unable to cast "+e+" ["+("undefined"===typeof e?"undefined":o(e))+"] to array of strings")},route:function(t){return{points:t.map(d).map(function(t){return{lat:t[0],lon:t[1]}})}},queryString:function(e){return t.encodeQuery(e)},integer:function(t){return Math.round(Number(t))},supportingPoints:function(e){var i,r=[];if(t.isString(e)&&(e=e.split(":")),n(e))for(i=0;i<e.length;i++)r.push(x(e[i]));else r.push(x(e));return E(r)},constantSpeedConsumption:function(t){if("string"===typeof t)return t;if(!n(t))throw new TypeError("An array is required");return t.join(":")},avoidAreas:function(t){if(!n(t))throw new TypeError("An array is required");return{rectangles:t.map(function(t){return{southWestCorner:T(x(t.southWestCorner)),northEastCorner:T(x(t.northEastCorner))}})}}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n=i(17);t.exports={copyrightsWorld:n["endpoints.copyrightsWorld"],copyrightsBounds:n["endpoints.copyrightsBounds"],caption:n["endpoints.caption"],geocode:n["endpoints.geocode"],batchGeocodeQuery:n["endpoints.batchGeocodeQuery"],structuredGeocode:n["endpoints.structuredGeocode"],batchStructuredGeocodeQuery:n["endpoints.batchStructuredGeocodeQuery"],search:n["endpoints.search"],batchSearch:n["endpoints.batchSearch"],batchSyncSearch:n["endpoints.batchSyncSearch"],batchSearchQuery:n["endpoints.batchSearchQuery"],adp:n["endpoints.adp"],reverseGeocode:n["endpoints.reverseGeocode"],batchReverseGeocodeQuery:n["endpoints.batchReverseGeocodeQuery"],trafficIncidents:n["endpoints.trafficIncidents"],trafficViewport:n["endpoints.trafficViewport"],flowSegmentData:n["endpoints.flowSegmentData"],incidentRegions:n["endpoints.incidentRegions"],trafficLayer:n["endpoints.trafficLayer"],trafficFlowLayer:n["endpoints.trafficFlowLayer"],tileLayer:n["endpoints.tileLayer"],routing:n["endpoints.routing"],reachableRange:n["endpoints.reachableRange"],batchRoutingQuery:n["endpoints.batchRoutingQuery"],batchRouting:n["endpoints.batchRouting"],batchSyncRouting:n["endpoints.batchSyncRouting"],matrixRouting:n["endpoints.matrixRouting"],matrixSyncRouting:n["endpoints.matrixSyncRouting"],batchReachableRangeQuery:n["endpoints.batchReachableRangeQuery"],origin:n.origin}},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{POST:"POST",PATH:"PATH",QUERY:"QUERY",OTHER:"OTHER"}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};n=[i(0),i(29),i(57),i(32),i(121),i(34),i(6)],void 0!==(r=function(t,e,i,n,r,a,s){function l(t){if("function"!==typeof t)throw new TypeError("a function is expected, but "+t+" ["+("undefined"===typeof t?"undefined":o(t))+"] given");return t}function u(t){return void 0===t}function c(t){return"function"===typeof t}function h(t,e,i,n,r){var o={data:t,name:e};return u(i)?u(t[e])?null:t[e]:(c(r)&&(i=r.call(this,i,o)),c(n)&&(i=n.call(this,i,o)),t[e]=i,this)}function p(t,e){var i,n;for(i in t)if(t.hasOwnProperty(i)&&(n=t[i].name||i,!0===t[i].required&&!e.hasOwnProperty(n)))throw new Error("Missing required "+i)}function f(e,i){function n(t){t.call(o,i[r],i,r)}var r,o=this;for(r in e)e.hasOwnProperty(r)&&(t.isArray(e[r].postValidator)?e[r].postValidator.forEach(n):u(e[r].postValidator)||e[r].postValidator.call(this,i[r],i,r))}function d(t,e,i){return function(n){var r=e[t].name||t;return h.call(this,i,r,n,e[t].validator,e[t].converter)}}function m(t){var n,r=t.__serviceType;!r||t.language&&i(t.language,r)||(n=e.getCurrentLocale(),t.language=n.getValueFor(r))}function _(t){var e,i=t.__serviceType,o=a.getSupportedServices();!i||-1===o.indexOf(i)||t.view&&r(t.view,i)||(e=n.getCurrentGeopolView(),t.view=e.getValueFor(i))}return function(e,i,n){var r,o,a={},c=this;n=n||{},a.__serviceType=n.__serviceType,m(n),_(n),e.callback={validator:l},e.fail={validator:l,defaultValue:function(e){throw t.isObject(e)&&(e=JSON.stringify(e)),console.error(e||"Unknown Error"),new Error(e||"Unknown Error")},application:s.OTHER},r={go:function(n,r){var o;return n&&(a.callback=l(n)),r&&(a.fail=l(r)),p(e,a),f(e,a),a.callback?(o=a.callback,delete a.callback,void i.call(c,t.clone(a),o)):new Promise(function(e,n){a.fail=function(t){n(t)},i.call(c,t.clone(a),function(t){e(t)})})}};for(o in e)e.hasOwnProperty(o)&&(r[o]=d(o,e,a),u(e[o].defaultValue)||r[o].call(this,e[o].defaultValue),n&&n.hasOwnProperty(o)&&r[o].call(this,n[o]),!1===e[o].visible&&delete r[o]);return n&&n.fail&&(a.fail=n.fail),r}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(0)],void 0!==(r=function(t){function e(e,i){if(!t.isString(e))throw new TypeError(i)}var i={};return{setKey:function(t,n){1===arguments.length&&(n=t,t="*"),n&&(e(t,"Module name needs to be of type string"),e(n,"API key needs to be of type string"),i[t]=n)},_clearKeys:function(){i={}},setKeyForName:function(t){return e(t,"Module name needs to be of type string"),function(n){e(n,"API key needs to be of type string"),i[t]=n}},getKey:function(t){return t&&e(t,"Module name needs to be of type string"),i[t]||i["*"]||null}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n;void 0!==(n=function(){var t={display:"services/display",vector:"services/display/vector",trafficFlow:"services/trafficFlow",traffic:"services/traffic",search:"services/search",routing:"services/routing"};return Object.freeze(t)}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n,r;n=[i(27),i(11),i(8),i(28),i(25),i(55)],void 0!==(r=function(t,e,i,n,r,o){return function(a,s){return function(l,u,c){var h,p,f=n(o.setField(l),o.setValue(u)),d=f.pathParams,m=f.queryParams,_=f.otherParams;m.key=t.or(u.key,i.getKey(s)),m.key=t.required(m.key),h={url:"{protocol}://"+a,pathParameters:d,queryParameters:m,callbackParam:"callback",callback:c,fail:_.fail},p=f.postParams,r.isEmpty(p)?e.get(h):(h.bodyParameters=p,e.post(h))}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(111),i(113)],void 0!==(r=function(t,e){var i=!1,n=!1;return{useJsonp:function(t){i=t},useHttp:function(t){n=t},protocol:function(){return n?"http":"https"},get:function(n){return n.protocol=n.protocol||this.protocol(),i?e.get(n):t.get(n)},post:function(e){return i&&console.warn("Jsonp is not supported, using json request."),e.protocol=e.protocol||this.protocol(),t.post(e)}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(17)],void 0!==(r=function(t){var e,i=t["analytics.header.sdkName"]+"/"+t["sdk.version"],n=t["analytics.header.name"];return{getHeaderName:function(){return n},getHeaderContent:function(){return i+(void 0!==e?" "+e:"")},setProductInfo:function(t,i){var n;if(!t)throw new Error("ProductId needs to be set");n=i||0===i?"/"+i:"",e=t+n},getProductInfo:function(){return e},addAnalyticsHeader:function(t){return t.header(n,this.getHeaderContent()),t},getAnalyticsHeader:function(){var t={};return t[n]=this.getHeaderContent(),t},customCreateTile:function(t,e,i){var n=document.createElement("img"),r=i.getTileUrl(t),o=i.options&&i.options.errorTileUrl,a=new XMLHttpRequest;return a.onreadystatechange=function(){a.readyState===XMLHttpRequest.DONE&&(200===a.status?n.src=URL.createObjectURL(a.response):o&&(n.src=o),e(null,n))},a.open("GET",r,!0),a.responseType="blob",a.setRequestHeader(this.getHeaderName(),this.getHeaderContent()),a.send(),i.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("original-src",r),n.setAttribute("role","presentation"),n}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t){return void 0!==t&&t.constructor.toString().indexOf("Array")>-1}function e(t,e){var i;for(i=0;i<t.length;i+=1)n(t[i],e)}function i(t,e){var i,n="*"+e.trim().split(/\s*,\s*/).join("*")+"*";for(i in t)t.hasOwnProperty(i)&&n.indexOf("*"+i+"*")<0&&delete t[i]}function n(n,r){return r?(t(n)?e(n,r):i(n,r),n):n}function r(t,e){var i,n=[];for(i=0;i<t.length;i+=1)t[i][e]&&n.push(t[i][e]);return n}return function(e,i,o){var a,s=e,l=i.trim().split(".");for(a=0;a<l.length;a+=1){if(!s)return null;s=t(s)?r(s,l[a]):s[l[a]]}return n(s,o)}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(37)],void 0!==(r=function(t,e){function i(t){return t<10?"0"+t:t}function n(t){return 1.0936133*t}function r(t){return.000621371192*t}function o(t){var e=n(t),i=r(t);return i<1?Math.round(e)+" yd":Math.round(10*i)/10+" mi"}function a(t){var e=Math.round(t);return e>=1e3?Math.round(e/100)/10+" km":e+" m"}return new(t.Evented.extend({convertYardsToMeters:function(t){return Math.round(t/1.0936133)},convertMetersToYards:n,formatTime:function(t){var e,n,r,o,a;if(void 0!==t)return e=parseInt(t,10),n=Math.floor(e/3600),r=Math.floor((e-3600*n)/60),e<60?e+" s":(e%=60,o=i(e),r%=60,a=i(r),n>0?n+":"+a+" h":r+":"+o+" min")},formatHourAndMinute:function(t){var e=new Date(t);return e.getHours()+":"+i(e.getMinutes())},formatDistance:function(t,e){if(void 0!==t)return e?o(t):a(t)},unitsScheme:function(t){return console.warn("Deprecated. Please use unitService class."),t?(e.setCurrentUnit(t),this.fire("change",{newScheme:t}),t):e.getCurrentUnit().getLabel()}}))}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{metric:"metric",imperial:"imperial"}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(92),i(91),i(7),i(2),i(4),i(22),i(0),i(158),i(45),i(159)],void 0!==(r=function(t,e,i,n,r,o,a,s,l,u){function c(t,e){return t.topLeft=[e.maxLat,e.minLon],t.btmRight=[e.minLat,e.maxLon],t}function h(t,e){return function(i){e(t?i[0]:i)}}function p(t){this.options=t,this.defaultFields=a.clone(_),this.fields={}}function f(e){var i=u.modifyFields(e);return function(e,n){return t.search(i,e,n)}}function d(t){return new p(t).construct()}var m={search:l.search,poi:l.poi,category:l.category,geometry:l.geometry,nearby:l.nearby,lowBandwidth:l.lowBandwidth},_=u.create();return p.prototype.TYPE=m,p.prototype.model=e,p.prototype.construct=function(){this.fields=a.addFields.call(this,this.fields);var t={batchItems:{validator:n.arrayOf(this.fields),converter:r.arrayOf(this.fields)}};return this.options=this.options||{},this.options.__serviceType="search",Array.isArray(this.options)?i.call(this,t,this.handleBatchChain,{batchItems:this.options}):i.call(this,this.fields,this.handleChain,this.options)},p.prototype.handleBatchChain=function(e,i){e.batchItems.forEach(u.modifyRequestOptions),t.batch(u.modifyFields(this.fields),e,function(t){i.call(this,s(t))})},p.prototype.handleChain=function(t,e){u.modifyRequestOptions(t),o(f(this.fields),this.model,t,h(Boolean(t.bestResult),e),c)},d.prototype.constructor=p,d}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n;void 0!==(n=function(){var t="api.tomtom.com";return{"mapboxgl.version":"0.50.0","sdk.version":"4.43.11","analytics.header.name":"TomTom-User-Agent","analytics.header.sdkName":"MapsWebSDK",origin:t,"endpoints.copyrightsWorld":t+"/map/1/copyrights.{contentType}","endpoints.copyrightsBounds":t+"/map/1/copyrights/{minLon}/{minLat}/{maxLon}/{maxLat}.{contentType}","endpoints.caption":t+"/map/1/copyrights/caption.{contentType}","endpoints.geocode":t+"/search/2/geocode/{query}.{contentType}","endpoints.batchGeocodeQuery":"/geocode/{query}.{contentType}","endpoints.structuredGeocode":t+"/search/2/structuredGeocode.{contentType}","endpoints.batchStructuredGeocodeQuery":"/structuredGeocode.{contentType}","endpoints.search":t+"/search/2/{type}/{query}.{contentType}","endpoints.batchSearch":t+"/search/2/batch.{contentType}","endpoints.batchSyncSearch":t+"/search/2/batch/sync.{contentType}","endpoints.batchSearchQuery":"/{type}/{query}.{contentType}","endpoints.adp":t+"/search/2/additionalData.{contentType}","endpoints.reverseGeocode":t+"/search/2/{type}/{position}.{contentType}","endpoints.batchReverseGeocodeQuery":"/{type}/{position}.{contentType}","endpoints.trafficIncidents":t+"/traffic/services/4/incidentDetails/{style}/{minLat},{minLon},{maxLat},{maxLon}/{zoom}/{trafficModelID}/{contentType}","endpoints.trafficViewport":t+"/traffic/services/4/incidentViewport/0,0,.1,.1/0/0,0,.1,.1/0/false/{contentType}","endpoints.flowSegmentData":t+"/traffic/services/4/flowSegmentData/{style}/{zoom}/{contentType}","endpoints.incidentRegions":t+"/traffic/services/4/incidentRegions/{contentType}","endpoints.trafficLayer":"{s}."+t+"/traffic/map/4/tile/incidents/{style}/{z}/{x}/{y}.png","endpoints.trafficFlowLayer":"{s}."+t+"/traffic/map/4/tile/flow/{style}/{z}/{x}/{y}.png","endpoints.tileLayer":"{s}."+t+"/map/1/tile/{layer}/{style}/{z}/{x}/{y}.png","endpoints.routing":t+"/routing/1/calculateRoute/{locations}/{contentType}","endpoints.reachableRange":t+"/routing/1/calculateReachableRange/{origin}/{contentType}","endpoints.batchRouting":t+"/routing/1/batch/{contentType}","endpoints.batchSyncRouting":t+"/routing/1/batch/sync/{contentType}","endpoints.batchRoutingQuery":"/calculateRoute/{locations}/{contentType}","endpoints.batchReachableRangeQuery":"/calculateReachableRange/{origin}/{contentType}","endpoints.matrixRouting":t+"/routing/1/matrix/{contentType}","endpoints.matrixSyncRouting":t+"/routing/1/matrix/sync/{contentType}","endpoints.staticMapImage":"https://"+t+"/map/1/staticimage","vector.glyphs":"https://"+t+"/maps-sdk-js/4.43.11/glyphs/{fontstack}/{range}.pbf","vector.sprites":"https://"+t+"/maps-sdk-js/4.43.11/sprites/sprite"}}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n,r;n=[i(27),i(11),i(8),i(51),i(28),i(25),i(55),i(74)],void 0!==(r=function(t,e,i,n,r,o,a,s){return function(l,u,c){return function(h,p,f){var d,m,_={},g={},y=f;_.key=t.required(i.getKey(c)),d=t.required(p.batchItems),h=a.setField(h),g.batchItems=d.map(function(t){var e,i=r(h,a.setValue(t)),s=i.pathParams,l=i.queryParams,c=i.postParams;return e={query:n(u.single,s,l)},o.isEmpty(c)||(e.post=c),e}),g.batchItems.length<=l?m=u.batchSync:(m=u.batch,_.redirectMode="manual",y=s(f,p)),e.post({url:"{protocol}://"+m,queryParameters:_,bodyParameters:g,callbackParam:"callback",callback:y,fail:p.fail,requestType:"batch"})}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){var t=function(){};return t.prototype.simplify=function(){return Object.assign({},this)},t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){function t(t,e){this._htmlElement=t,this._wrapFunction=e}return t.prototype.getHtmlElement=function(){return this._htmlElement},t.prototype.wrap=function(){this._wrapFunction(this._htmlElement)},t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(1),i(0)],void 0!==(r=function(t,e){function i(e,i){var n;e.iconAnchor&&(n=t.point(e.iconAnchor),i.style.marginLeft=-n.x+"px",i.style.marginTop=-n.y+"px")}function n(t,e){var i;for(i in t.style)t.style.hasOwnProperty(i)&&(e.style[i]=t.style[i])}function r(t,e){t.style.width=e.iconSize[0]+"px",t.style.height=e.iconSize[1]+"px",t.style.backgroundSize=e.iconSize[0]+"px "+e.iconSize[1]+"px",i(e,t),t.style.position="absolute",t.style.textAlign="center",t.style.verticalAlign="middle",t.style.lineHeight=e.iconSize[1]+"px",e.style&&n(e,t)}function o(t,e){var i,n,r;i=t.cloneNode(),i.style.display="none",document.body.appendChild(i),r=window.getComputedStyle(i).getPropertyValue("background-image"),document.body.removeChild(i),r&&(n=r.match(/(%3Csvg[^"']+%3C%2Fsvg%3E)/i))&&(r=decodeURIComponent(n[1]),t.innerHTML=r,t.firstChild.setAttribute("width",e.iconSize[0]+"px"),t.firstChild.setAttribute("height",e.iconSize[1]+"px"),t.firstChild.setAttribute("style","display: block; position: absolute;"),t.style.backgroundImage="none")}function a(t){return t.filter(function(t){return e.isNonEmptyString(t)}).join(" ")}function s(e,i,n){var s=a(["icon",e.icon||"content",n]),l=t.DomUtil.create("div",s,i);return r(l,e),e.icon&&!e.noPlainSVG&&o(l,e,e.icon),e.content&&(l.innerHTML=e.content),l}function l(e,i){var n=t.DomUtil.create("div","icon-image",i),o=t.DomUtil.create("img","icon-image-img",n);return o.style.width=e.iconSize[0]+"px",o.style.height=e.iconSize[1]+"px",/^http/i.test(e.icon)?o.src=e.icon:o.src=t.Icon.Default.imagePath+"/"+e.icon,r(n,e),n}function u(t){return/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(t)}function c(e,i,n){return t.Browser.svg&&!u(e.icon)?s(e,i,n):l(e,i)}function h(e,i,n){i.hasOwnProperty(n)&&(e[n]=i[n]?t.extend({},p[n],i[n]):null)}var p;return p={background:{iconSize:[30,36],iconAnchor:[15,36],icon:"icon-marker-black",noPlainSVG:!1},icon:{iconSize:[30,30],iconAnchor:[0,0],icon:"icon-flag-white",noPlainSVG:!1},popupAnchor:[0,-30],opacity:.8},t.SVGIcon=t.Icon.extend({initialize:function(e){this.options=t.Util.extend({},p,e),e&&(h(this.options,e,"background"),h(this.options,e,"icon"))},createIcon:function(){var e=this.options;return this.container=c(e.background||e.icon,null,"icon-marker"),e.background&&e.icon&&e.icon.icon&&c(e.icon,this.container,null),e.content&&(this.contentContainer=s(e.content,this.container,null)),t.DomUtil.setOpacity(this.container,e.opacity),this.container},setContent:function(t){this.contentContainer&&(this.contentContainer.innerHTML=t)},setOpacity:function(e){this.options.opacity=e,t.DomUtil.setOpacity(this.container,e)}}),t.svgIcon=function(e){return new t.SVGIcon(e)},t.SVGIcon}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(0)],void 0!==(r=function(t){function e(t){return t.minLon<-180?[{minLon:-180,minLat:t.minLat,maxLon:t.maxLon,maxLat:t.maxLat},{minLon:360+t.minLon,minLat:t.minLat,maxLon:180,maxLat:t.maxLat}]:t.maxLon>180?[{minLon:t.minLon,minLat:t.minLat,maxLon:180,maxLat:t.maxLat},{minLon:-180,minLat:t.minLat,maxLon:t.maxLon-360,maxLat:t.maxLat}]:[t]}function i(t){return t?e(t):[]}function n(t,e,i,n){return function(r){e.push(r),e.length===t&&(e=1===e.length?e[0]:e,i(n(e)))}}function r(t){var e={topLeftPoint:L.latLng(t.topLeftPoint.lat,t.topLeftPoint.lon).wrap(),btmRightPoint:L.latLng(t.btmRightPoint.lat,t.btmRightPoint.lon).wrap()};return e.topLeftPoint.lng>0&&e.btmRightPoint.lng<0?{topLeftPoint:{lat:e.topLeftPoint.lat,lon:e.topLeftPoint.lng},btmRightPoint:{lat:e.btmRightPoint.lat,lon:e.btmRightPoint.lng+360}}:t}function o(t){return t.map(function(t){return t.boundingBox&&(t.boundingBox=r(t.boundingBox)),t.viewport&&(t.viewport=r(t.viewport)),t})}function a(t,e){return t.unwrapBbox?function(t){e(o(t))}:(delete t.unwrapBbox,e)}function s(e){return e.boundingBox?e.boundingBox:t.isValidValue(e.minLat)&&t.isValidValue(e.minLon)&&t.isValidValue(e.maxLat)&&t.isValidValue(e.maxLon)?{minLat:e.minLat,minLon:e.minLon,maxLat:e.maxLat,maxLon:e.maxLon}:null}return function(t,e,r,o,l){var u,c=i(s(r)),h=c.length||1,p=[];for(delete r.boundingBox,o=a(r,o),u=0;u<h;u+=1)r=c[u]?l(r,c[u]):r,t(r,n(h,p,o,e))}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(62),i(126),i(8)],void 0!==(r=function(t,e,i){return{add:function(e,i){var n=3e4;if(t.isNotNull(e)){if(e._noRefresher)return;if(e.noRefresh)return void i();n=e.refresh>=3e4&&isFinite(e.refresh)?e.refresh:3e4}return setInterval(i,n)},remove:function(t){t&&clearInterval(t)},addRefresherWithModelId:function(t,n,r){function o(){s.go().then(function(t){n.call(r,t)})}var a=t||r.options,s=e({key:i.getKey("services/traffic")});if(!a)throw new Error('"options" should be provided');return a._noRefresher?null:(o(),this.add(a,o))}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(83),i(85),i(44)],void 0!==(r=function(t,e,i){function n(t){r.call(this,t),this.fields=e(i.reverseGeocode)}var r=t.prototype.constructor;return n.prototype=new r,n.prototype.constructor=n,function(t){return new n(t).construct()}}.apply(e,n))&&(t.exports=r)},function(t,e,i){(function(t,n){var r;(function(){function o(t,e){return t.push.apply(t,e),t}function a(t,e,i,n){for(var r=t.length,o=i+(n?1:-1);n?o--:++o<r;)if(e(t[o],o,t))return o;return-1}function s(t){return function(e){return null==e?Qt:e[t]}}function l(t,e,i,n,r){return r(t,function(t,r,o){i=n?(n=!1,t):e(i,t,r,o)}),i}function u(t,e){return A(e,function(e){return t[e]})}function c(t){return t instanceof h?t:new h(t)}function h(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e}function p(t,e,i){var n=t[e];Ae.call(t,e)&&wt(n,i)&&(i!==Qt||e in t)||f(t,e,i)}function f(t,e,i){t[e]=i}function d(t,e,i){if("function"!=typeof t)throw new TypeError($t);return setTimeout(function(){t.apply(Qt,i)},e)}function m(t,e){var i=!0;return Fe(t,function(t,n,r){return i=!!e(t,n,r)}),i}function _(t,e,i){for(var n=-1,r=t.length;++n<r;){var o=t[n],a=e(o);if(null!=a&&(s===Qt?a===a&&!0:i(a,s)))var s=a,l=o}return l}function g(t,e){var i=[];return Fe(t,function(t,n,r){e(t,n,r)&&i.push(t)}),i}function y(t,e,i,n,r){var a=-1,s=t.length;for(i||(i=G),r||(r=[]);++a<s;){var l=t[a];e>0&&i(l)?e>1?y(l,e-1,i,n,r):o(r,l):n||(r[r.length]=l)}return r}function v(t,e){return t&&je(t,e,ii)}function b(t,e){return g(e,function(e){return Ct(t[e])})}function x(t){return J(t)}function w(t,e){return t>e}function k(t){return It(t)&&x(t)==ue}function T(t,e,i,n,r){return t===e||(null==t||null==e||!It(t)&&!It(e)?t!==t&&e!==e:E(t,e,i,n,T,r))}function E(t,e,i,n,r,o){var a=Ke(t),s=Ke(e),l=a?ae:x(t),u=s?ae:x(e);l=l==oe?de:l,u=u==oe?de:u;var c=l==de,h=u==de,p=l==u;o||(o=[]);var f=Ze(o,function(e){return e[0]==t}),d=Ze(o,function(t){return t[0]==e});if(f&&d)return f[1]==e;if(o.push([t,e]),o.push([e,t]),p&&!c){var m=a?V(t,e,i,n,r,o):Z(t,e,l,i,n,r,o);return o.pop(),m}if(!(i&te)){var _=c&&Ae.call(t,"__wrapped__"),g=h&&Ae.call(e,"__wrapped__");if(_||g){var y=_?t.value():t,v=g?e.value():e,m=r(y,v,i,n,o);return o.pop(),m}}if(!p)return!1;var m=q(t,e,i,n,r,o);return o.pop(),m}function L(t){return It(t)&&x(t)==_e}function S(t){return"function"==typeof t?t:null==t?qt:("object"==typeof t?P:s)(t)}function C(t,e){return t<e}function A(t,e){var i=-1,n=kt(t)?Array(t.length):[];return Fe(t,function(t,r,o){n[++i]=e(t,r,o)}),n}function P(t){var e=Oe(t);return function(i){var n=e.length;if(null==i)return!n;for(i=Object(i);n--;){var r=e[n];if(!(r in i&&T(t[r],i[r],te|ee)))return!1}return!0}}function I(t,e){return t=Object(t),dt(e,function(e,i){return i in t&&(e[i]=t[i]),e},{})}function M(t,e){return Ve(X(t,e,qt),t+"")}function z(t,e,i){var n=-1,r=t.length;e<0&&(e=-e>r?0:r+e),i=i>r?r:i,i<0&&(i+=r),r=e>i?0:i-e>>>0,e>>>=0;for(var o=Array(r);++n<r;)o[n]=t[n+e];return o}function R(t){return z(t,0,t.length)}function B(t,e){var i;return Fe(t,function(t,n,r){return!(i=e(t,n,r))}),!!i}function O(t,e){var i=t;return dt(e,function(t,e){return e.func.apply(e.thisArg,o([t],e.args))},i)}function D(t,e){if(t!==e){var i=t!==Qt,n=null===t,r=t===t,o=e!==Qt,a=null===e,s=e===e;if(!a&&t>e||n&&o&&s||!i&&s||!r)return 1;if(!n&&t<e||a&&i&&r||!o&&r||!s)return-1}return 0}function N(t,e,i,n){var r=!i;i||(i={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=n?n(i[s],t[s],s,i,t):Qt;l===Qt&&(l=t[s]),r?f(i,s,l):p(i,s,l)}return i}function F(t){return M(function(e,i){var n=-1,r=i.length,o=r>1?i[r-1]:Qt;for(o=t.length>3&&"function"==typeof o?(r--,o):Qt,e=Object(e);++n<r;){var a=i[n];a&&t(e,a,n,o)}return e})}function j(t){return function(){var e=arguments,i=Ne(t.prototype),n=t.apply(i,e);return Pt(n)?n:i}}function U(t,e,i,n){function r(){for(var e=-1,s=arguments.length,l=-1,u=n.length,c=Array(u+s),h=this&&this!==Te&&this instanceof r?a:t;++l<u;)c[l]=n[l];for(;s--;)c[l++]=arguments[++e];return h.apply(o?i:this,c)}if("function"!=typeof t)throw new TypeError($t);var o=e&ie,a=j(t);return r}function V(t,e,i,n,r,o){var a=i&te,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;for(var u=-1,c=!0,h=i&ee?[]:Qt;++u<s;){var p=t[u],f=e[u];if(void 0!==Qt){c=!1;break}if(h){if(!B(e,function(t,e){if(!nt(h,e)&&(p===t||r(p,t,i,n,o)))return h.push(e)})){c=!1;break}}else if(p!==f&&!r(p,f,i,n,o)){c=!1;break}}return c}function Z(t,e,i,n,r,o,a){switch(i){case le:case ue:case fe:return wt(+t,+e);case ce:return t.name==e.name&&t.message==e.message;case _e:case ge:return t==e+""}return!1}function q(t,e,i,n,r,o){var a=i&te,s=ii(t),l=s.length;if(l!=ii(e).length&&!a)return!1;for(var u=l;u--;){var c=s[u];if(!(a?c in e:Ae.call(e,c)))return!1}for(var h=!0,p=a;++u<l;){c=s[u];var f=t[c],d=e[c];if(!(void 0===Qt?f===d||r(f,d,i,n,o):void 0)){h=!1;break}p||(p="constructor"==c)}if(h&&!p){var m=t.constructor,_=e.constructor;m!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(h=!1)}return h}function G(t){return Ke(t)||We(t)}function H(t,e){var i=typeof t;return!!(e=null==e?re:e)&&("number"==i||"symbol"!=i&&be.test(t))&&t>-1&&t%1==0&&t<e}function W(t,e,i){if(!Pt(i))return!1;var n=typeof e;return!!("number"==n?kt(i)&&H(e,i.length):"string"==n&&e in i)&&wt(i[e],t)}function K(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}function J(t){return Ie.call(t)}function X(t,e,i){return e=De(e===Qt?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=De(n.length-e,0),a=Array(o);++r<o;)a[r]=n[e+r];r=-1;for(var s=Array(e+1);++r<e;)s[r]=n[r];return s[e]=i(a),t.apply(this,s)}}function Y(t){return g(t,Boolean)}function Q(){var t=arguments.length;if(!t)return[];for(var e=Array(t-1),i=arguments[0],n=t;n--;)e[n-1]=arguments[n];return o(Ke(i)?R(i):[i],y(e,1))}function $(t,e,i){var n=null==t?0:t.length;if(!n)return-1;var r=null==i?0:Ye(i);return r<0&&(r=De(n+r,0)),a(t,S(e,3),r)}function tt(t){return(null==t?0:t.length)?y(t,1):[]}function et(t){return(null==t?0:t.length)?y(t,ne):[]}function it(t){return t&&t.length?t[0]:Qt}function nt(t,e,i){var n=null==t?0:t.length;i="number"==typeof i?i<0?De(n+i,0):i:0;for(var r=(i||0)-1,o=e===e;++r<n;){var a=t[r];if(o?a===e:a!==a)return r}return-1}function rt(t){var e=null==t?0:t.length;return e?t[e-1]:Qt}function ot(t,e,i){var n=null==t?0:t.length;return e=null==e?0:+e,i=i===Qt?n:+i,n?z(t,e,i):[]}function at(t){var e=c(t);return e.__chain__=!0,e}function st(t,e){return e(t),t}function lt(t,e){return e(t)}function ut(){return O(this.__wrapped__,this.__actions__)}function ct(t,e,i){return e=i?Qt:e,m(t,S(e))}function ht(t,e){return g(t,S(e))}function pt(t,e){return Fe(t,S(e))}function ft(t,e){return A(t,S(e))}function dt(t,e,i){return l(t,S(e),i,arguments.length<3,Fe)}function mt(t){return null==t?0:(t=kt(t)?t:Oe(t),t.length)}function _t(t,e,i){return e=i?Qt:e,B(t,S(e))}function gt(t,e){var i=0;return e=S(e),A(A(t,function(t,n,r){return{value:t,index:i++,criteria:e(t,n,r)}}).sort(function(t,e){return D(t.criteria,e.criteria)||t.index-e.index}),s("value"))}function yt(t,e){var i;if("function"!=typeof e)throw new TypeError($t);return t=Ye(t),function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=Qt),i}}function vt(t){if("function"!=typeof t)throw new TypeError($t);return function(){var e=arguments;return!t.apply(this,e)}}function bt(t){return yt(2,t)}function xt(t){return Pt(t)?Ke(t)?R(t):N(t,Oe(t)):t}function wt(t,e){return t===e||t!==t&&e!==e}function kt(t){return null!=t&&At(t.length)&&!Ct(t)}function Tt(t){return!0===t||!1===t||It(t)&&x(t)==le}function Et(t){return kt(t)&&(Ke(t)||Bt(t)||Ct(t.splice)||We(t))?!t.length:!Oe(t).length}function Lt(t,e){return T(t,e)}function St(t){return"number"==typeof t&&Be(t)}function Ct(t){if(!Pt(t))return!1;var e=x(t);return e==he||e==pe||e==se||e==me}function At(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=re}function Pt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function It(t){return null!=t&&"object"==typeof t}function Mt(t){return Rt(t)&&t!=+t}function zt(t){return null===t}function Rt(t){return"number"==typeof t||It(t)&&x(t)==fe}function Bt(t){return"string"==typeof t||!Ke(t)&&It(t)&&x(t)==ge}function Ot(t){return t===Qt}function Dt(t){return kt(t)?t.length?R(t):[]:Vt(t)}function Nt(t){return"string"==typeof t?t:null==t?"":t+""}function Ft(t,e){var i=Ne(t);return null==e?i:$e(i,e)}function jt(t,e){return null!=t&&Ae.call(t,e)}function Ut(t,e,i){var n=null==t?Qt:t[e];return n===Qt&&(n=i),Ct(n)?n.call(t):n}function Vt(t){return null==t?[]:u(t,ii(t))}function Zt(t){return t=Nt(t),t&&ve.test(t)?t.replace(ye,Le):t}function qt(t){return t}function Gt(t){return P($e({},t))}function Ht(t,e,i){var n=ii(e),r=b(e,n);null!=i||Pt(e)&&(r.length||!n.length)||(i=e,e=t,t=this,r=b(e,ii(e)));var a=!(Pt(i)&&"chain"in i)||!!i.chain,s=Ct(t);return Fe(r,function(i){var n=e[i];t[i]=n,s&&(t.prototype[i]=function(){var e=this.__chain__;if(a||e){var i=t(this.__wrapped__);return(i.__actions__=R(this.__actions__)).push({func:n,args:arguments,thisArg:t}),i.__chain__=e,i}return n.apply(t,o([this.value()],arguments))})}),t}function Wt(){return Te._===this&&(Te._=Me),this}function Kt(){}function Jt(t){var e=++Pe;return Nt(t)+e}function Xt(t){return t&&t.length?_(t,qt,w):Qt}function Yt(t){return t&&t.length?_(t,qt,C):Qt}var Qt,$t="Expected a function",te=1,ee=2,ie=1,ne=1/0,re=9007199254740991,oe="[object Arguments]",ae="[object Array]",se="[object AsyncFunction]",le="[object Boolean]",ue="[object Date]",ce="[object Error]",he="[object Function]",pe="[object GeneratorFunction]",fe="[object Number]",de="[object Object]",me="[object Proxy]",_e="[object RegExp]",ge="[object String]",ye=/[&<>"']/g,ve=RegExp(ye.source),be=/^(?:0|[1-9]\d*)$/,xe={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},we="object"==typeof t&&t&&t.Object===Object&&t,ke="object"==typeof self&&self&&self.Object===Object&&self,Te=we||ke||Function("return this")(),Ee="object"==typeof e&&e&&!e.nodeType&&e,Le=(Ee&&"object"==typeof n&&n&&n.nodeType,function(t){return function(e){return null==t?Qt:t[e]}}(xe)),Se=Array.prototype,Ce=Object.prototype,Ae=Ce.hasOwnProperty,Pe=0,Ie=Ce.toString,Me=Te._,ze=Object.create,Re=Ce.propertyIsEnumerable,Be=Te.isFinite,Oe=function(t,e){return function(i){return t(e(i))}}(Object.keys,Object),De=Math.max,Ne=function(){function t(){}return function(e){if(!Pt(e))return{};if(ze)return ze(e);t.prototype=e;var i=new t;return t.prototype=Qt,i}}();h.prototype=Ne(c.prototype),h.prototype.constructor=h;var Fe=function(t,e){return function(i,n){if(null==i)return i;if(!kt(i))return t(i,n);for(var r=i.length,o=e?r:-1,a=Object(i);(e?o--:++o<r)&&!1!==n(a[o],o,a););return i}}(v),je=function(t){return function(e,i,n){for(var r=-1,o=Object(e),a=n(e),s=a.length;s--;){var l=a[t?s:++r];if(!1===i(o[l],l,o))break}return e}}(),Ue=Kt,Ve=qt,Ze=function(t){return function(e,i,n){var r=Object(e);if(!kt(e)){var o=S(i,3);e=ii(e),i=function(t){return o(r[t],t,r)}}var a=t(e,i,n);return a>-1?r[o?e[a]:a]:Qt}}($),qe=M(function(t,e,i){return U(t,32|ie,e,i)}),Ge=M(function(t,e){return d(t,1,e)}),He=M(function(t,e,i){return d(t,Qe(e)||0,i)}),We=Ue(function(){return arguments}())?Ue:function(t){return It(t)&&Ae.call(t,"callee")&&!Re.call(t,"callee")},Ke=Array.isArray,Je=k,Xe=L,Ye=Number,Qe=Number,$e=F(function(t,e){N(e,Oe(e),t)}),ti=F(function(t,e){N(e,K(e),t)}),ei=M(function(t,e){t=Object(t);var i=-1,n=e.length,r=n>2?e[2]:Qt;for(r&&W(e[0],e[1],r)&&(n=1);++i<n;)for(var o=e[i],a=ni(o),s=-1,l=a.length;++s<l;){var u=a[s],c=t[u];(c===Qt||wt(c,Ce[u])&&!Ae.call(t,u))&&(t[u]=o[u])}return t}),ii=Oe,ni=K,ri=function(t){return Ve(X(t,Qt,tt),t+"")}(function(t,e){return null==t?{}:I(t,e)}),oi=S;c.assignIn=ti,c.before=yt,c.bind=qe,c.chain=at,c.compact=Y,c.concat=Q,c.create=Ft,c.defaults=ei,c.defer=Ge,c.delay=He,c.filter=ht,c.flatten=tt,c.flattenDeep=et,c.iteratee=oi,c.keys=ii,c.map=ft,c.matches=Gt,c.mixin=Ht,c.negate=vt,c.once=bt,c.pick=ri,c.slice=ot,c.sortBy=gt,c.tap=st,c.thru=lt,c.toArray=Dt,c.values=Vt,c.extend=ti,Ht(c,c),c.clone=xt,c.escape=Zt,c.every=ct,c.find=Ze,c.forEach=pt,c.has=jt,c.head=it,c.identity=qt,c.indexOf=nt,c.isArguments=We,c.isArray=Ke,c.isBoolean=Tt,c.isDate=Je,c.isEmpty=Et,c.isEqual=Lt,c.isFinite=St,c.isFunction=Ct,c.isNaN=Mt,c.isNull=zt,c.isNumber=Rt,c.isObject=Pt,c.isRegExp=Xe,c.isString=Bt,c.isUndefined=Ot,c.last=rt,c.max=Xt,c.min=Yt,c.noConflict=Wt,c.noop=Kt,c.reduce=dt,c.result=Ut,c.size=mt,c.some=_t,c.uniqueId=Jt,c.each=pt,c.first=it,Ht(c,function(){var t={};return v(c,function(e,i){Ae.call(c.prototype,i)||(t[i]=e)}),t}(),{chain:!1}),c.VERSION="4.17.5",Fe(["pop","join","replace","reverse","split","push","shift","sort","splice","unshift"],function(t){var e=(/^(?:replace|split)$/.test(t)?String.prototype:Se)[t],i=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|join|replace|shift)$/.test(t);c.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var r=this.value();return e.apply(Ke(r)?r:[],t)}return this[i](function(i){return e.apply(Ke(i)?i:[],t)})}}),c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=ut,Te._=c,(r=function(){return c}.call(e,i,e,n))!==Qt&&(n.exports=r)}).call(this)}).call(e,i(48),i(108)(t))},function(t,e,i){"use strict";var n;void 0!==(n=function(t){function e(){var t,e,n;try{return t=i(118),a||(e=i(119),n=window.URL.createObjectURL(new window.Blob([e],{type:"text/javascript"})),t.setRTLTextPlugin(n),a=!0),r.modifySetStyle(t),t}catch(t){return null}}var n,r=i(110),o=i(17),a=!1;return n=e(),{setMapbox:function(t){t&&t.version!==o["mapboxgl.version"]&&console.warn('TomTom Maps SDK for Web expects mapboxgl "'+o["mapboxgl.version"]+'" version.'),n=t,r.modifySetStyle(n)},tryToSetMapbox:function(){return this.isMapboxSet()||(n=e()),this.isMapboxSet()},getMapbox:function(){if(!this.isMapboxSet())throw new Error("You should provide Mapbox GL JS reference first.");return n},isMapboxSet:function(){return Boolean(n)},isMapboxSupported:function(){return this.tryToSetMapbox()&&n.supported()}}}.call(e,i,e,t))&&(t.exports=n)},function(t,e,i){"use strict";var n,r;n=[],void 0!==(r=function(){return{or:function(t,e){return t||e},required:function(t,e){if(void 0===t||null===t)throw new TypeError(e);return t}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(6)],void 0!==(r=function(t){function e(e){var i=e[1];return!i.application||i.application===t.QUERY}function i(e){return e[1].application===t.PATH}function n(e){return e[1].application===t.POST}function r(e){return e[1].application===t.OTHER}function o(t){return t[0]}function a(t){return function(e){return[t[e]&&t[e].name||e,t[e]]}}function s(t,e){return Object.keys(t).map(a(t)).filter(e).map(o)}function l(t){return s(t,e)}function u(t){return s(t,i)}function c(t){return s(t,n)}function h(t){return s(t,r)}function p(t,e,i){var n={};return e(t).forEach(function(t){t in i&&(n[t]=i[t])}),n}function f(t,e){return p(t,u,e)}return function(t,e){return{pathParams:f(t,e),queryParams:p(t,l,e),postParams:p(t,c,e),otherParams:p(t,h,e)}}}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(30)],void 0!==(r=function(t){return new t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(31),i(1),i(56),i(0)],void 0!==(r=function(t,e,i,n){function r(e){var n,r,o=[];for(n in i)i.hasOwnProperty(n)&&(r=i[n],(!e&&-1===f.indexOf(n)||r[e]&&!0===r[e].isNative)&&o.push(new t(n)));return o.sort(function(t,e){return t.getLabel().localeCompare(e.getLabel())})}function o(t){this.setCurrentLocale(t.getLanguageCode())}var a,s,l,u,c,h,p,f=["NGT","NGT-Latn"];return a=r(null),s=r("traffic"),l=r("routing"),u=r("search"),c=r("maps"),p={LOCALE_CHANGED:"config.locale.changed"},h=e.Evented.extend({Events:p,initialize:function(e){e instanceof h?(this.currentLocale=new t(e.getCurrentLocale().getLanguageCode()),this.parent=e,e.on(p.LOCALE_CHANGED,o,this)):this.currentLocale=new t("en-GB")},setCurrentLocale:function(e){this.currentLocale=e instanceof t?e:new t(e),this.fire(p.LOCALE_CHANGED,this.currentLocale)},getCurrentLocale:function(){return this.currentLocale},cleanEvents:function(){this.parent.off(p.LOCALE_CHANGED,o,this),this.off()}}),h.Events=p,n.addDeprecatedProperty(h.prototype,"EVENTS","Events"),h.getLocalesFor=function(t){switch(t){case"traffic":return s;case"routing":return l;case"search":case"reverseGeocoder":return u;case"maps":return c;default:return a}},e.LocaleService=h,e.localeService=function(t){return new h(t)},e.localeService}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(56)],void 0!==(r=function(t){function e(t){return n.indexOf(t)>-1}function i(e){t.hasOwnProperty(e)||(console.warn("Incorrect language code passed to Locale constructor. Defaulting to en-GB"),e="en-GB"),this._languageCode=e}var n=["routing","search","traffic","maps","reverseGeocoder"];return i.prototype.getLabel=function(){return t[this._languageCode].label},i.prototype.getLanguageCode=function(){return this._languageCode},i.prototype.getValueFor=function(i){var r;return i?(e(i)||(console.warn("Unsupported type passed to getValueFor function in Locale.Expecting: "+n.join(", ")+". Defaulting to search"),i="search"),"reverseGeocoder"===i&&(i="search"),r=t[this._languageCode][i].fallback,void 0!==r?r:this._languageCode):this._languageCode},i}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(33)],void 0!==(r=function(t){return new t}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(34),i(1),i(58),i(0)],void 0!==(r=function(t,e,i,n){function r(){return new t(a)}var o,a="Unified",s={GEOPOL_VIEW_CHANGED:"config.geopolView.changed"};return o=e.Evented.extend({Events:s,initialize:function(e){e instanceof o?(this.current=new t(e.getCurrentGeopolView().getCode()),this._enslaveTo(e)):this.current=r()},setCurrentGeopolView:function(e){n.isString(e)&&(e=new t(e)),this.current.getCode()!==e.getCode()&&(this.current=new t(e.getCode()),this.fire(s.GEOPOL_VIEW_CHANGED,this.current))},getCurrentGeopolView:function(){return this.current},cleanEvents:function(){this.parent&&(this.parent.off(s.GEOPOL_VIEW_CHANGED,this.setCurrentGeopolView,this),this.parent=void 0),this.off()},_enslaveTo:function(t){this.parent=t,t.on(s.GEOPOL_VIEW_CHANGED,this.setCurrentGeopolView,this)}}),o.getSupportedViews=function(e,n){var r=t.getSupportedServices(),o=[];return n=n||"all",0===arguments.length?Object.keys(i).map(function(e){return new t(e)}):-1===r.indexOf(e)?(console.warn(e+" is not supported. Supported services: "+r.join(", ")),[]):"maps"!==e&&"all"!==n||"maps"===e&&-1===["raster","vector","all"].indexOf(n)?(console.warn("Please specify a valid subType for this service. Expecting: raster, vector or all (for the full list). Returning undefined."),[]):(Object.keys(i).forEach(function(r){var a=i[r][e];a&&"all"!==n&&(a=a[n]),a&&a.fallback||o.push(new t(r))}),o)},o.Events=s,n.addDeprecatedProperty(o.prototype,"EVENTS","Events"),e.geopolViewService=function(t){return new o(t)},e.GeopolViewService=o,e.GeopolViewService}.apply(e,n))&&(t.exports=r)},function(t,e,i){"use strict";var n,r;n=[i(58)],void 0!==(r=function(t){function e(t){return n.indexOf(t)>-1}function i(e){t.hasOwnProperty(e)||(e="Unified",console.warn("Incorrect geopolitical view code passed to GeopolViewService.",'Defaulting to "'+e+'".')),this.code=e}var n=["search","maps","reverseGeocoder"];return i.prototype.getCode=function(){return this.code},i.prototype.getLabel=function(){return t[this.code].label},i.prototype.getValueFor=function(i,r){var o,a;return i?e(i)?"maps"!==i&&r||"maps"===i&&-1===["raster","vector"].indexOf(r)?void console.warn("Please specify a valid subType for this service. Expecting: raster or vector. Returning undefined."):(a=t[this.code][i],a&&r&&(a=a[r]),a&&a.fallback?(o=a.fallback,console.warn(this.code+' is not supported by the service "'+i+(r?" - "+r:"")+'". Falling back to '+o+"."),o):this.code):void console.warn("Unsupported service type passed to getValueFor function in geopolView. Expecting: "+n.join(", ")+". Returning undefined."):this.code},i.getSupportedServices=function(){return n},Object.defineProperty(i.prototype,"toString",{enumerable:!1,value:function(){return this.getCode()}}),i}.apply(e,n))&&(t.exports=r)},function(t,e,i){var n,r;/*
_ _
| | (_)
| |_ _ ___
| __| | / __|
| |_ _| \__ \
\__(_) |___/
_/ |
|__/
t.js
a micro-templating framework in ~400 bytes gzipped
@author Jason Mooberry <[email protected]>
@license MIT
@version 0.1.0
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment