@geotrekce/geotrek-rando-widget 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/geotrek-rando-widget.cjs.js +2 -2
- package/dist/cjs/grw-app_7.cjs.entry.js +137 -55
- package/dist/cjs/{index-31255e29.js → index-c6f73e30.js} +36 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/departure-arrival.svg +1 -1
- package/dist/collection/components/grw-app/grw-app.css +60 -37
- package/dist/collection/components/grw-app/grw-app.js +277 -15
- package/dist/collection/components/grw-map/grw-map.css +36 -0
- package/dist/collection/components/grw-map/grw-map.js +157 -18
- package/dist/collection/components/grw-trek-card/grw-trek-card.js +87 -32
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.css +1 -1
- package/dist/collection/components/grw-trek-detail/grw-trek-detail.js +87 -32
- package/dist/collection/components/grw-treks-list/grw-treks-list.css +3 -12
- package/dist/collection/components/grw-treks-list/grw-treks-list.js +46 -4
- package/dist/collection/store/grw-trek-provider.js +28 -6
- package/dist/collection/store/grw-treks-provider.js +155 -9
- package/dist/collection/stories/App.js +31 -1
- package/dist/collection/stories/App.stories.js +21 -1
- package/dist/collection/stories/TrekCard.js +8 -3
- package/dist/collection/stories/TrekCard.stories.js +2 -0
- package/dist/collection/stories/TrekDetail.js +8 -3
- package/dist/collection/stories/TrekDetail.stories.js +2 -0
- package/dist/collection/stories/TrekMap.js +10 -3
- package/dist/collection/stories/TrekMap.stories.js +13 -1
- package/dist/collection/stories/TreksList.js +16 -3
- package/dist/collection/stories/TreksList.stories.js +10 -0
- package/dist/collection/stories/TreksMap.js +12 -3
- package/dist/collection/stories/TreksMap.stories.js +15 -1
- package/dist/components/grw-app.js +39 -6
- package/dist/components/grw-map2.js +56 -20
- package/dist/components/grw-trek-card2.js +25 -7
- package/dist/components/grw-trek-detail2.js +26 -8
- package/dist/components/grw-trek-provider2.js +10 -7
- package/dist/components/grw-treks-list2.js +10 -4
- package/dist/components/grw-treks-provider2.js +26 -11
- package/dist/esm/geotrek-rando-widget.js +2 -2
- package/dist/esm/grw-app_7.entry.js +137 -55
- package/dist/esm/{index-b36f38f5.js → index-7aa9e822.js} +36 -0
- package/dist/esm/loader.js +2 -2
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/p-332ba9ab.js +2 -0
- package/dist/geotrek-rando-widget/p-b7c66d2d.entry.js +1 -0
- package/dist/types/components/grw-app/grw-app.d.ts +21 -2
- package/dist/types/components/grw-map/grw-map.d.ts +8 -0
- package/dist/types/components/grw-trek-card/grw-trek-card.d.ts +3 -1
- package/dist/types/components/grw-trek-detail/grw-trek-detail.d.ts +2 -0
- package/dist/types/components/grw-treks-list/grw-treks-list.d.ts +2 -0
- package/dist/types/components.d.ts +70 -0
- package/dist/types/store/grw-trek-provider.d.ts +1 -0
- package/dist/types/store/grw-treks-provider.d.ts +8 -0
- package/package.json +1 -1
- package/dist/geotrek-rando-widget/p-f721481d.js +0 -2
- package/dist/geotrek-rando-widget/p-fe788eaa.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,f as i,r as e,h as n,H as s,a as o,c as r}from"./p-332ba9ab.js";const h=t=>!("isConnected"in t)||t.isConnected,a=(()=>{let t;return(...i)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let i of t.keys())t.set(i,t.get(i).filter(h))})(...i)}),2e3)}})(),{state:l,onChange:u}=(()=>{const e=((t,i=((t,i)=>t!==i))=>{let e=new Map(Object.entries(null!=t?t:{}));const n={dispose:[],get:[],set:[],reset:[]},s=()=>{e=new Map(Object.entries(null!=t?t:{})),n.reset.forEach((t=>t()))},o=t=>(n.get.forEach((i=>i(t))),e.get(t)),r=(t,s)=>{const o=e.get(t);i(s,o,t)&&(e.set(t,s),n.set.forEach((i=>i(t,s,o))))},h="undefined"==typeof Proxy?{}:new Proxy(t,{get:(t,i)=>o(i),ownKeys:()=>Array.from(e.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,i)=>e.has(i),set:(t,i,e)=>(r(i,e),!0)}),a=(t,i)=>(n[t].push(i),()=>{((t,i)=>{const e=t.indexOf(i);e>=0&&(t[e]=t[t.length-1],t.length--)})(n[t],i)});return{state:h,get:o,set:r,on:a,onChange:(i,e)=>{const n=a("set",((t,n)=>{t===i&&e(n)})),s=a("reset",(()=>e(t[i])));return()=>{n(),s()}},use:(...t)=>{const i=t.reduce(((t,i)=>(i.set&&t.push(a("set",i.set)),i.get&&t.push(a("get",i.get)),i.reset&&t.push(a("reset",i.reset)),i.dispose&&t.push(a("dispose",i.dispose)),t)),[]);return()=>i.forEach((t=>t()))},dispose:()=>{n.dispose.forEach((t=>t())),s()},reset:s,forceUpdate:t=>{const i=e.get(t);n.set.forEach((e=>e(t,i,i)))}}})({api:"",treks:[],difficulties:[],routes:[],practices:[],currentTrek:null},void 0);return e.use((()=>{if("function"!=typeof t)return{};const e=new Map;return{dispose:()=>e.clear(),get:i=>{const n=t();n&&((t,i,e)=>{const n=t.get(i);n?n.includes(e)||n.push(e):t.set(i,[e])})(e,i,n)},set:t=>{const n=e.get(t);n&&e.set(t,n.filter(i)),a(e)},reset:()=>{e.forEach((t=>t.forEach(i))),a(e)}}})()),e})(),c=class{constructor(t){e(this,t),this.showTrek=!1,this.showMap=!1,this.isLargeView=!1,this.appName="Geotrek Rando Widget",this.colorPrimary="#6b0030",this.colorPrimaryTint="#d2b2c0",this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b",this.largeViewSize=664}onTrekCardPress(t){this.currentTrekId=t.detail,this.showTrek=!this.showTrek}onWindowResize(){this.handleView()}watchPropHandler(){window.dispatchEvent(new window.Event("resize"))}componentDidLoad(){this.handleView()}onTrekDetailsClose(){this.currentTrekId=null,this.showTrek=!this.showTrek}handleView(){this.isLargeView=this.element.getBoundingClientRect().width>=this.largeViewSize,this.showMap=this.isLargeView}render(){return n(s,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},n("grw-treks-provider",{api:this.api,"in-bbox":this.inBbox,cities:this.cities,districts:this.districts,structures:this.structures,themes:this.themes,portals:this.portals,routes:this.routes,practices:this.practices}),this.showTrek&&this.currentTrekId&&n("grw-trek-provider",{api:l.api,"trek-id":this.currentTrekId}),n("div",{class:"app-container"},n("div",{class:this.isLargeView?"large-view-header-container":"header-container"},this.showTrek?n("div",{onClick:()=>this.onTrekDetailsClose(),class:"arrow-back-icon",innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="244 400 100 256 244 112" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/><line x1="120" y1="256" x2="412" y2="256" style="fill:none;stroke:#ffffff;stroke-linecap:round;stroke-linejoin:round;stroke-width:48px"/></svg>'}):n("div",{class:"title"},this.appName)),n("div",{class:"content-container"},n("div",{class:this.isLargeView?"large-view-app-treks-list-container":"app-treks-list-container",style:{display:this.showTrek?"none":"flex",position:this.showTrek?"absolute":"relative"}},n("grw-treks-list",{"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint})),this.showTrek&&!l.currentTrek&&n("div",{class:this.isLargeView?"large-view-loader-container":"loader-container"},n("span",{class:"loader"})),l.currentTrek&&n("div",{class:this.isLargeView?"large-view-app-trek-detail-container":"app-trek-detail-container"},n("grw-trek-detail",{"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint})),n("grw-map",{class:this.isLargeView?"large-view-app-map-container":"app-map-container",style:{visibility:this.showMap?"visible":"hidden"},"url-layer":this.urlLayer,center:this.center,zoom:this.zoom,attribution:this.attribution,"color-trek-line":this.colorTrekLine,"color-departure-icon":this.colorDepartureIcon,"color-arrival-icon":this.colorArrivalIcon})),n("div",{class:"map-visibility-button",style:{display:this.isLargeView?"none":"flex"}},n("div",{onClick:()=>this.showMap=!this.showMap},this.showMap?this.showTrek?"Voir la fiche":"Voir la liste":"Voir la carte"))))}get element(){return o(this)}static get watchers(){return{isLargeView:["watchPropHandler"]}}};c.style=".app-container{position:relative;height:100%;max-height:100vh}.header-container,.large-view-header-container{display:flex;align-items:center;background-color:var(--color-primary);height:64px}.header-container .title,.large-view-header-container .title{color:#ffffff;margin-left:24px}.header-container .arrow-back-icon,.large-view-header-container .arrow-back-icon{width:48px;height:auto;margin-left:24px}.header-container .arrow-back-icon svg,.large-view-header-container .arrow-back-icon svg{cursor:pointer;width:48px;height:auto}.loader-container,.large-view-loader-container{display:flex;justify-content:center;align-items:center;height:100%}.loader-container .loader,.large-view-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.content-container{position:relative;display:flex;height:calc(100% - 64px)}.app-treks-list-container,.app-trek-detail-container,.large-view-app-treks-list-container,.large-view-app-trek-detail-container{height:100%}.app-map-container,.large-view-app-map-container{width:100%;height:100%}.map-visibility-button{cursor:pointer;display:flex;justify-content:center;align-items:center;position:absolute;bottom:24px;width:100%;z-index:400;user-select:none}.map-visibility-button div{background-color:var(--color-primary);color:#ffffff;padding:12px;border-radius:24px;width:120px;text-align:center}.header-container .title{font-size:24px}.loader-container{position:absolute;width:100%}.app-treks-list-container,.app-trek-detail-container{width:100%}.app-map-container{position:relative;width:100%;position:absolute}.large-view-header-container .title{font-size:32px}.large-view-loader-container{position:relative;width:50%}.large-view-app-treks-list-container,.large-view-app-trek-detail-container{width:50%}.large-view-app-map-container{position:relative;width:50%}","undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var f,d=(function(t){function i(t){var i,e,n,s;for(e=1,n=arguments.length;e<n;e++)for(i in s=arguments[e])t[i]=s[i];return t}var e=Object.create||function(){function t(){}return function(i){return t.prototype=i,new t}}();function n(t,i){var e=Array.prototype.slice;if(t.bind)return t.bind.apply(t,e.call(arguments,1));var n=e.call(arguments,2);return function(){return t.apply(i,n.length?n.concat(e.call(arguments)):arguments)}}var s=0;function o(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function r(t,i,e){var n,s,o,r;return r=function(){n=!1,s&&(o.apply(e,s),s=!1)},o=function(){n?s=arguments:(t.apply(e,arguments),setTimeout(r,i),n=!0)}}function h(t,i,e){var n=i[1],s=i[0],o=n-s;return t===n&&e?t:((t-s)%o+o)%o+s}function a(){return!1}function l(t,i){if(!1===i)return t;var e=Math.pow(10,void 0===i?6:i);return Math.round(t*e)/e}function u(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function c(t){return u(t).split(/\s+/)}function f(t,i){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?e(t.options):{}),i)t.options[n]=i[n];return t.options}function d(t,i,e){var n=[];for(var s in t)n.push(encodeURIComponent(e?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(i&&-1!==i.indexOf("?")?"&":"?")+n.join("&")}var p=/\{ *([\w_ -]+) *\}/g;function v(t,i){return t.replace(p,(function(t,e){var n=i[e];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(i)),n}))}var m=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function g(t,i){for(var e=0;e<t.length;e++)if(t[e]===i)return e;return-1}var w="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function b(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var y=0;function x(t){var i=+new Date,e=Math.max(0,16-(i-y));return y=i+e,window.setTimeout(t,e)}var _=window.requestAnimationFrame||b("RequestAnimationFrame")||x,k=window.cancelAnimationFrame||b("CancelAnimationFrame")||b("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function M(t,i,e){if(!e||_!==x)return _.call(window,n(t,i));t.call(i)}function z(t){t&&k.call(window,t)}var P={__proto__:null,extend:i,create:e,bind:n,get lastId(){return s},stamp:o,throttle:r,wrapNum:h,falseFn:a,formatNum:l,trim:u,splitWords:c,setOptions:f,getParamString:d,template:v,isArray:m,indexOf:g,emptyImageUrl:w,requestFn:_,cancelFn:k,requestAnimFrame:M,cancelAnimFrame:z};function T(){}T.extend=function(t){var n=function(){f(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=n.__super__=this.prototype,o=e(s);for(var r in o.constructor=n,n.prototype=o,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);return t.statics&&i(n,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=m(t)?t:[t];for(var i=0;i<t.length;i++)t[i]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}(t.includes),i.apply(null,[o].concat(t.includes))),i(o,t),delete o.statics,delete o.includes,o.options&&(o.options=s.options?e(s.options):{},i(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,i=o._initHooks.length;t<i;t++)o._initHooks[t].call(this)}},n},T.include=function(t){var e=this.prototype.options;return i(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},T.mergeOptions=function(t){return i(this.prototype.options,t),this},T.addInitHook=function(t){var i=Array.prototype.slice.call(arguments,1),e="function"==typeof t?t:function(){this[t].apply(this,i)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(e),this};var C={on:function(t,i,e){if("object"==typeof t)for(var n in t)this._on(n,t[n],i);else for(var s=0,o=(t=c(t)).length;s<o;s++)this._on(t[s],i,e);return this},off:function(t,i,e){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],i);else{t=c(t);for(var s=1===arguments.length,o=0,r=t.length;o<r;o++)s?this._off(t[o]):this._off(t[o],i,e)}else delete this._events;return this},_on:function(t,i,e){if("function"==typeof i){this._events=this._events||{};var n=this._events[t];n||(this._events[t]=n=[]),e===this&&(e=void 0);for(var s={fn:i,ctx:e},o=n,r=0,h=o.length;r<h;r++)if(o[r].fn===i&&o[r].ctx===e)return;o.push(s)}else console.warn("wrong listener type: "+typeof i)},_off:function(t,i,e){var n,s,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if(e===this&&(e=void 0),"function"==typeof i){for(s=0,o=n.length;s<o;s++){var r=n[s];if(r.ctx===e&&r.fn===i)return this._firingCount&&(r.fn=a,this._events[t]=n=n.slice()),void n.splice(s,1)}console.warn("listener not found")}else console.warn("wrong listener type: "+typeof i);else{if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=a;delete this._events[t]}},fire:function(t,e,n){if(!this.listens(t,n))return this;var s=i({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var r=0,h=o.length;r<h;r++){var a=o[r];a.fn.call(a.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,i){"string"!=typeof t&&console.warn('"string" type argument expected');var e=this._events&&this._events[t];if(e&&e.length)return!0;if(i)for(var n in this._eventParents)if(this._eventParents[n].listens(t,i))return!0;return!1},once:function(t,i,e){if("object"==typeof t){for(var s in t)this.once(s,t[s],i);return this}var o=n((function(){this.off(t,i,e).off(t,o,e)}),this);return this.on(t,i,e).on(t,o,e)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,i({layer:t.target,propagatedFrom:t.target},t),!0)}};C.addEventListener=C.on,C.removeEventListener=C.clearAllEventListeners=C.off,C.addOneTimeEventListener=C.once,C.fireEvent=C.fire,C.hasEventListeners=C.listens;var S=T.extend(C);function A(t,i,e){this.x=e?Math.round(t):t,this.y=e?Math.round(i):i}var E=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function O(t,i,e){return t instanceof A?t:m(t)?new A(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new A(t.x,t.y):new A(t,i,e)}function I(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function B(t,i){return!t||t instanceof I?t:new I(t,i)}function j(t,i){if(t)for(var e=i?[t,i]:t,n=0,s=e.length;n<s;n++)this.extend(e[n])}function Z(t,i){return t instanceof j?t:new j(t,i)}function D(t,i,e){if(isNaN(t)||isNaN(i))throw new Error("Invalid LatLng object: ("+t+", "+i+")");this.lat=+t,this.lng=+i,void 0!==e&&(this.alt=+e)}function R(t,i,e){return t instanceof D?t:m(t)&&"object"!=typeof t[0]?3===t.length?new D(t[0],t[1],t[2]):2===t.length?new D(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new D(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===i?null:new D(t,i,e)}A.prototype={clone:function(){return new A(this.x,this.y)},add:function(t){return this.clone()._add(O(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(O(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 A(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new A(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=E(this.x),this.y=E(this.y),this},distanceTo:function(t){var i=(t=O(t)).x-this.x,e=t.y-this.y;return Math.sqrt(i*i+e*e)},equals:function(t){return(t=O(t)).x===this.x&&t.y===this.y},contains:function(t){return t=O(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+l(this.x)+", "+l(this.y)+")"}},I.prototype={extend:function(t){return t=O(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 A((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new A(this.min.x,this.max.y)},getTopRight:function(){return new A(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var i,e;return(t="number"==typeof t[0]||t instanceof A?O(t):B(t))instanceof I?(i=t.min,e=t.max):i=e=t,i.x>=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,s=t.max;return s.x>=i.x&&n.x<=e.x&&s.y>=i.y&&n.y<=e.y},overlaps:function(t){t=B(t);var i=this.min,e=this.max,n=t.min,s=t.max;return s.x>i.x&&n.x<e.x&&s.y>i.y&&n.y<e.y},isValid:function(){return!(!this.min||!this.max)}},j.prototype={extend:function(t){var i,e,n=this._southWest,s=this._northEast;if(t instanceof D)i=t,e=t;else{if(!(t instanceof j))return t?this.extend(R(t)||Z(t)):this;if(e=t._northEast,!(i=t._southWest)||!e)return this}return n||s?(n.lat=Math.min(i.lat,n.lat),n.lng=Math.min(i.lng,n.lng),s.lat=Math.max(e.lat,s.lat),s.lng=Math.max(e.lng,s.lng)):(this._southWest=new D(i.lat,i.lng),this._northEast=new D(e.lat,e.lng)),this},pad:function(t){var i=this._southWest,e=this._northEast,n=Math.abs(i.lat-e.lat)*t,s=Math.abs(i.lng-e.lng)*t;return new j(new D(i.lat-n,i.lng-s),new D(e.lat+n,e.lng+s))},getCenter:function(){return new D((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 D(this.getNorth(),this.getWest())},getSouthEast:function(){return new D(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 D||"lat"in t?R(t):Z(t);var i,e,n=this._southWest,s=this._northEast;return t instanceof j?(i=t.getSouthWest(),e=t.getNorthEast()):i=e=t,i.lat>=n.lat&&e.lat<=s.lat&&i.lng>=n.lng&&e.lng<=s.lng},intersects:function(t){t=Z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>=i.lat&&n.lat<=e.lat&&s.lng>=i.lng&&n.lng<=e.lng},overlaps:function(t){t=Z(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),s=t.getNorthEast();return s.lat>i.lat&&n.lat<e.lat&&s.lng>i.lng&&n.lng<e.lng},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,i){return!!t&&(t=Z(t),this._southWest.equals(t.getSouthWest(),i)&&this._northEast.equals(t.getNorthEast(),i))},isValid:function(){return!(!this._southWest||!this._northEast)}},D.prototype={equals:function(t,i){return!!t&&(t=R(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===i?1e-9:i))},toString:function(t){return"LatLng("+l(this.lat,t)+", "+l(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,R(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var i=180*t/40075017,e=i/Math.cos(Math.PI/180*this.lat);return Z([this.lat-i,this.lng-e],[this.lat+i,this.lng+e])},clone:function(){return new D(this.lat,this.lng,this.alt)}};var N,F={latLngToPoint:function(t,i){var e=this.projection.project(t),n=this.scale(i);return this.transformation._transform(e,n)},pointToLatLng:function(t,i){var e=this.scale(i),n=this.transformation.untransform(t,e);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,e=this.scale(t);return new I(this.transformation.transform(i.min,e),this.transformation.transform(i.max,e))},infinite:!1,wrapLatLng:function(t){var i=this.wrapLng?h(t.lng,this.wrapLng,!0):t.lng;return new D(this.wrapLat?h(t.lat,this.wrapLat,!0):t.lat,i,t.alt)},wrapLatLngBounds:function(t){var i=t.getCenter(),e=this.wrapLatLng(i),n=i.lat-e.lat,s=i.lng-e.lng;if(0===n&&0===s)return t;var o=t.getSouthWest(),r=t.getNorthEast();return new j(new D(o.lat-n,o.lng-s),new D(r.lat-n,r.lng-s))}},H=i({},F,{wrapLng:[-180,180],R:6371e3,distance:function(t,i){var e=Math.PI/180,n=t.lat*e,s=i.lat*e,o=Math.sin((i.lat-t.lat)*e/2),r=Math.sin((i.lng-t.lng)*e/2),h=o*o+Math.cos(n)*Math.cos(s)*r*r,a=2*Math.atan2(Math.sqrt(h),Math.sqrt(1-h));return this.R*a}}),$=6378137,U={R:$,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,e=this.MAX_LATITUDE,n=Math.max(Math.min(e,t.lat),-e),s=Math.sin(n*i);return new A(this.R*t.lng*i,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var i=180/Math.PI;return new D((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*i,t.x*i/this.R)},bounds:(N=$*Math.PI,new I([-N,-N],[N,N]))};function W(t,i,e,n){if(m(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=i,this._c=e,this._d=n}function G(t,i,e,n){return new W(t,i,e,n)}W.prototype={transform:function(t,i){return this._transform(t.clone(),i)},_transform:function(t,i){return t.x=(i=i||1)*(this._a*t.x+this._b),t.y=i*(this._c*t.y+this._d),t},untransform:function(t,i){return new A((t.x/(i=i||1)-this._b)/this._a,(t.y/i-this._d)/this._c)}};var V=i({},H,{code:"EPSG:3857",projection:U,transformation:function(){var t=.5/(Math.PI*U.R);return G(t,.5,-t,.5)}()}),q=i({},V,{code:"EPSG:900913"});function J(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function K(t,i){var e,n,s,o,r,h,a="";for(e=0,s=t.length;e<s;e++){for(n=0,o=(r=t[e]).length;n<o;n++)a+=(n?"L":"M")+(h=r[n]).x+" "+h.y;a+=i?Ot.svg?"z":"x":""}return a||"M0 0"}var X,Q=document.documentElement.style,Y="ActiveXObject"in window,tt=Y&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),et=Et("webkit"),nt=Et("android"),st=Et("android 2")||Et("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),rt=nt&&Et("Google")&&ot<537&&!("AudioNode"in window),ht=!!window.opera,at=!it&&Et("chrome"),lt=Et("gecko")&&!et&&!ht&&!Y,ut=!at&&Et("safari"),ct=Et("phantom"),ft="OTransition"in Q,dt=0===navigator.platform.indexOf("Win"),pt=Y&&"transition"in Q,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,mt="MozPerspective"in Q,gt=!window.L_DISABLE_3D&&(pt||vt||mt)&&!ft&&!ct,wt="undefined"!=typeof orientation||Et("mobile"),bt=wt&&et,yt=wt&&vt,xt=!window.PointerEvent&&window.MSPointerEvent,_t=!(!window.PointerEvent&&!xt),kt="ontouchstart"in window||!!window.TouchEvent,Mt=!window.L_NO_TOUCH&&(kt||_t),zt=wt&&ht,Pt=wt&<,Tt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,Lt=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",a,i),window.removeEventListener("testPassiveEventSupport",a,i)}catch(t){}return t}(),Ct=!!document.createElement("canvas").getContext,St=!(!document.createElementNS||!J("svg").createSVGRect),At=!!St&&((X=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(X.firstChild&&X.firstChild.namespaceURI));function Et(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Ot={ie:Y,ielt9:tt,edge:it,webkit:et,android:nt,android23:st,androidStock:rt,opera:ht,chrome:at,gecko:lt,safari:ut,phantom:ct,opera12:ft,win:dt,ie3d:pt,webkit3d:vt,gecko3d:mt,any3d:gt,mobile:wt,mobileWebkit:bt,mobileWebkit3d:yt,msPointer:xt,pointer:_t,touch:Mt,touchNative:kt,mobileOpera:zt,mobileGecko:Pt,retina:Tt,passiveEvents:Lt,canvas:Ct,svg:St,vml:!St&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}(),inlineSvg:At},It=Ot.msPointer?"MSPointerDown":"pointerdown",Bt=Ot.msPointer?"MSPointerMove":"pointermove",jt=Ot.msPointer?"MSPointerUp":"pointerup",Zt=Ot.msPointer?"MSPointerCancel":"pointercancel",Dt={touchstart:It,touchmove:Bt,touchend:jt,touchcancel:Zt},Rt={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&ji(i),Gt(t,i)},touchmove:Gt,touchend:Gt,touchcancel:Gt},Nt={},Ft=!1;function Ht(t,i,e){return"touchstart"===i&&(Ft||(document.addEventListener(It,$t,!0),document.addEventListener(Bt,Ut,!0),document.addEventListener(jt,Wt,!0),document.addEventListener(Zt,Wt,!0),Ft=!0)),Rt[i]?(e=Rt[i].bind(this,e),t.addEventListener(Dt[i],e,!1),e):(console.warn("wrong event specified:",i),L.Util.falseFn)}function $t(t){Nt[t.pointerId]=t}function Ut(t){Nt[t.pointerId]&&(Nt[t.pointerId]=t)}function Wt(t){delete Nt[t.pointerId]}function Gt(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],Nt)i.touches.push(Nt[e]);i.changedTouches=[i],t(i)}}var Vt,qt,Jt,Kt,Xt,Qt=pi(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Yt=pi(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ti="webkitTransition"===Yt||"OTransition"===Yt?Yt+"End":"transitionend";function ii(t){return"string"==typeof t?document.getElementById(t):t}function ei(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function ni(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function si(t){var i=t.parentNode;i&&i.removeChild(t)}function oi(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ri(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function hi(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function ai(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=fi(t);return e.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function li(t,i){if(void 0!==t.classList)for(var e=c(i),n=0,s=e.length;n<s;n++)t.classList.add(e[n]);else if(!ai(t,i)){var o=fi(t);ci(t,(o?o+" ":"")+i)}}function ui(t,i){void 0!==t.classList?t.classList.remove(i):ci(t,u((" "+fi(t)+" ").replace(" "+i+" "," ")))}function ci(t,i){void 0===t.className.baseVal?t.className=i:t.className.baseVal=i}function fi(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function di(t,i){"opacity"in t.style?t.style.opacity=i:"filter"in t.style&&function(t,i){var e=!1,n="DXImageTransform.Microsoft.Alpha";try{e=t.filters.item(n)}catch(t){if(1===i)return}i=Math.round(100*i),e?(e.Enabled=100!==i,e.Opacity=i):t.style.filter+=" progid:"+n+"(opacity="+i+")"}(t,i)}function pi(t){for(var i=document.documentElement.style,e=0;e<t.length;e++)if(t[e]in i)return t[e];return!1}function vi(t,i,e){var n=i||new A(0,0);t.style[Qt]=(Ot.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(e?" scale("+e+")":"")}function mi(t,i){t._leaflet_pos=i,Ot.any3d?vi(t,i):(t.style.left=i.x+"px",t.style.top=i.y+"px")}function gi(t){return t._leaflet_pos||new A(0,0)}if("onselectstart"in document)Vt=function(){Pi(window,"selectstart",ji)},qt=function(){Li(window,"selectstart",ji)};else{var wi=pi(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Vt=function(){if(wi){var t=document.documentElement.style;Jt=t[wi],t[wi]="none"}},qt=function(){wi&&(document.documentElement.style[wi]=Jt,Jt=void 0)}}function bi(){Pi(window,"dragstart",ji)}function yi(){Li(window,"dragstart",ji)}function xi(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(_i(),Kt=t,Xt=t.style.outline,t.style.outline="none",Pi(window,"keydown",_i))}function _i(){Kt&&(Kt.style.outline=Xt,Kt=void 0,Xt=void 0,Li(window,"keydown",_i))}function ki(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Mi(t){var i=t.getBoundingClientRect();return{x:i.width/t.offsetWidth||1,y:i.height/t.offsetHeight||1,boundingClientRect:i}}var zi={__proto__:null,TRANSFORM:Qt,TRANSITION:Yt,TRANSITION_END:ti,get:ii,getStyle:ei,create:ni,remove:si,empty:oi,toFront:ri,toBack:hi,hasClass:ai,addClass:li,removeClass:ui,setClass:ci,getClass:fi,setOpacity:di,testProp:pi,setTransform:vi,setPosition:mi,getPosition:gi,get disableTextSelection(){return Vt},get enableTextSelection(){return qt},disableImageDrag:bi,enableImageDrag:yi,preventOutline:xi,restoreOutline:_i,getSizedParentNode:ki,getScale:Mi};function Pi(t,i,e,n){if(i&&"object"==typeof i)for(var s in i)Ai(t,s,i[s],e);else for(var o=0,r=(i=c(i)).length;o<r;o++)Ai(t,i[o],e,n);return this}var Ti="_leaflet_events";function Li(t,i,e,n){if(1===arguments.length)Ci(t),delete t[Ti];else if(i&&"object"==typeof i)for(var s in i)Ei(t,s,i[s],e);else if(i=c(i),2===arguments.length)Ci(t,(function(t){return-1!==g(i,t)}));else for(var o=0,r=i.length;o<r;o++)Ei(t,i[o],e,n);return this}function Ci(t,i){for(var e in t[Ti]){var n=e.split(/\d/)[0];i&&!i(n)||Ei(t,n,null,null,e)}}var Si={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Ai(t,i,e,n){var s=i+o(e)+(n?"_"+o(n):"");if(t[Ti]&&t[Ti][s])return this;var r=function(i){return e.call(n||t,i||window.event)},h=r;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?r=Ht(t,i,r):Ot.touch&&"dblclick"===i?r=function(t,i){t.addEventListener("dblclick",i);var e,n=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Date.now();s-n<=200?2==++e&&i(function(t){var i,e,n={};for(e in t)n[e]=(i=t[e])&&i.bind?i.bind(t):i;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):e=1,n=s}}else e=t.detail}return t.addEventListener("click",s),{dblclick:i,simDblclick:s}}(t,r):"addEventListener"in t?"touchstart"===i||"touchmove"===i||"wheel"===i||"mousewheel"===i?t.addEventListener(Si[i]||i,r,!!Ot.passiveEvents&&{passive:!1}):"mouseenter"===i||"mouseleave"===i?t.addEventListener(Si[i],r=function(i){i=i||window.event,Fi(t,i)&&h(i)},!1):t.addEventListener(i,h,!1):t.attachEvent("on"+i,r),t[Ti]=t[Ti]||{},t[Ti][s]=r}function Ei(t,i,e,n,s){s=s||i+o(e)+(n?"_"+o(n):"");var r=t[Ti]&&t[Ti][s];if(!r)return this;!Ot.touchNative&&Ot.pointer&&0===i.indexOf("touch")?function(t,i,e){Dt[i]?t.removeEventListener(Dt[i],e,!1):console.warn("wrong event specified:",i)}(t,i,r):Ot.touch&&"dblclick"===i?function(t,i){t.removeEventListener("dblclick",i.dblclick),t.removeEventListener("click",i.simDblclick)}(t,r):"removeEventListener"in t?t.removeEventListener(Si[i]||i,r,!1):t.detachEvent("on"+i,r),t[Ti][s]=null}function Oi(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ii(t){return Ai(t,"wheel",Oi),this}function Bi(t){return Pi(t,"mousedown touchstart dblclick contextmenu",Oi),t._leaflet_disable_click=!0,this}function ji(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Zi(t){return ji(t),Oi(t),this}function Di(t,i){if(!i)return new A(t.clientX,t.clientY);var e=Mi(i),n=e.boundingClientRect;return new A((t.clientX-n.left)/e.x-i.clientLeft,(t.clientY-n.top)/e.y-i.clientTop)}var Ri=Ot.win&&Ot.chrome?2*window.devicePixelRatio:Ot.gecko?window.devicePixelRatio:1;function Ni(t){return Ot.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ri: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 Fi(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var Hi={__proto__:null,on:Pi,off:Li,stopPropagation:Oi,disableScrollPropagation:Ii,disableClickPropagation:Bi,preventDefault:ji,stop:Zi,getMousePosition:Di,getWheelDelta:Ni,isExternalTarget:Fi,addListener:Pi,removeListener:Li},$i=S.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=gi(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=M(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;i<e?this._runFrame(this._easeOut(i/e),t):(this._runFrame(1),this._complete())},_runFrame:function(t,i){var e=this._startPos.add(this._offset.multiplyBy(t));i&&e._round(),mi(this._el,e),this.fire("step")},_complete:function(){z(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),Ui=S.extend({options:{crs:V,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,i){i=f(this,i),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),i.maxBounds&&this.setMaxBounds(i.maxBounds),void 0!==i.zoom&&(this._zoom=this._limitZoom(i.zoom)),i.center&&void 0!==i.zoom&&this.setView(R(i.center),i.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Yt&&Ot.any3d&&!Ot.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Pi(this._proxy,ti,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,n){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(R(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=i({animate:n.animate},n.zoom),n.pan=i({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e),this)},setZoom:function(t,i){return this._loaded?this.setView(this.getCenter(),t,{zoom:i}):(this._zoom=t,this)},zoomIn:function(t,i){return this.setZoom(this._zoom+(t=t||(Ot.any3d?this.options.zoomDelta:1)),i)},zoomOut:function(t,i){return this.setZoom(this._zoom-(t=t||(Ot.any3d?this.options.zoomDelta:1)),i)},setZoomAround:function(t,i,e){var n=this.getZoomScale(i),s=this.getSize().divideBy(2),o=(t instanceof A?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),r=this.containerPointToLatLng(s.add(o));return this.setView(r,i,{zoom:e})},_getBoundsCenterZoom:function(t,i){i=i||{},t=t.getBounds?t.getBounds():Z(t);var e=O(i.paddingTopLeft||i.padding||[0,0]),n=O(i.paddingBottomRight||i.padding||[0,0]),s=this.getBoundsZoom(t,!1,e.add(n));if((s="number"==typeof i.maxZoom?Math.min(i.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};var o=n.subtract(e).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s);return{center:this.unproject(r.add(h).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,i){if(!(t=Z(t)).isValid())throw new Error("Bounds are not valid.");var e=this._getBoundsCenterZoom(t,i);return this.setView(e.center,e.zoom,i)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,i){return this.setView(t,this._zoom,{pan:i})},panBy:function(t,i){if(i=i||{},!(t=O(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==i.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new $i,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),i.noMoveStart||this.fire("movestart"),!1!==i.animate){li(this._mapPane,"leaflet-pan-anim");var e=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,e,i.duration||.25,i.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,i,e){if(!1===(e=e||{}).animate||!Ot.any3d)return this.setView(t,i,e);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),r=this._zoom;t=R(t),i=void 0===i?r:i;var h=Math.max(o.x,o.y),a=h*this.getZoomScale(r,i),l=s.distanceTo(n)||1,u=1.42,c=2.0164;function f(t){var i=(a*a-h*h+(t?-1:1)*c*c*l*l)/(2*(t?a:h)*c*l),e=Math.sqrt(i*i+1)-i;return e<1e-9?-18:Math.log(e)}function d(t){return(Math.exp(t)-Math.exp(-t))/2}function p(t){return(Math.exp(t)+Math.exp(-t))/2}var v=f(0);function m(t){return h*(p(v)*(d(i=v+u*t)/p(i))-d(v))/c;var i}var g=Date.now(),w=(f(1)-v)/u,b=e.duration?1e3*e.duration:1e3*w*.8;return this._moveStart(!0,e.noMoveStart),function e(){var o=(Date.now()-g)/b,a=function(t){return 1-Math.pow(1-t,1.5)}(o)*w;o<=1?(this._flyToFrame=M(e,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(m(a)/l)),r),this.getScaleZoom(h/function(t){return h*(p(v)/p(v+u*t))}(a),r),{flyTo:!0})):this._move(t,i)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,i){var e=this._getBoundsCenterZoom(t,i);return this.flyTo(e.center,e.zoom,i)},setMaxBounds:function(t){return(t=Z(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 i=this.options.minZoom;return this.options.minZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var i=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&i!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,Z(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=O((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=O(i.paddingBottomRight||i.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),r=this.getPixelBounds(),h=B([r.min.add(e),r.max.subtract(n)]),a=h.getSize();if(!h.contains(o)){this._enforcingBounds=!0;var l=o.subtract(h.getCenter()),u=h.extend(o).getSize().subtract(a);s.x+=l.x<0?-u.x:u.x,s.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(s),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),o=e.divideBy(2).round(),r=s.divideBy(2).round(),h=o.subtract(r);return h.x||h.y?(t.animate&&t.pan?this.panBy(h):(t.pan&&this._rawPanBy(h),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=n(this._handleGeolocationResponse,this),s=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,s,t):navigator.geolocation.getCurrentPosition(e,s,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new D(t.coords.latitude,t.coords.longitude),e=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(o[r]=t.coords[r]);this.fire("locationfound",o)}},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),si(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(z(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)si(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=ni("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},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 j(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=Z(t),e=O(e||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),h=t.getSouthEast(),a=this.getSize().subtract(e),l=B(this.project(h,n),this.project(r,n)).getSize(),u=Ot.any3d?this.options.zoomSnap:1,c=a.x/l.x,f=a.y/l.y,d=i?Math.max(c,f):Math.min(c,f);return n=this.getScaleZoom(d,n),u&&(n=Math.round(n/(u/100))*(u/100),n=i?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new A(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new I(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs,n=e.zoom(t*e.scale(i=void 0===i?this._zoom:i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(R(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(O(t),i)},layerPointToLatLng:function(t){var i=O(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(R(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(R(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Z(t))},distance:function(t,i){return this.options.crs.distance(R(t),R(i))},containerPointToLayerPoint:function(t){return O(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return O(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(O(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(R(t)))},mouseEventToContainerPoint:function(t){return Di(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=ii(t);if(!i)throw new Error("Map container not found.");if(i._leaflet_id)throw new Error("Map container is already initialized.");Pi(i,"scroll",this._onScroll,this),this._containerId=o(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Ot.any3d,li(t,"leaflet-container"+(Ot.touch?" leaflet-touch":"")+(Ot.retina?" leaflet-retina":"")+(Ot.ielt9?" leaflet-oldie":"")+(Ot.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=ei(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),mi(this._mapPane,new A(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(li(t.markerPane,"leaflet-zoom-hide"),li(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i){mi(this._mapPane,new A(0,0));var e=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var n=this._zoom!==i;this._moveStart(n,!1)._move(t,i)._moveEnd(n),this.fire("viewreset"),e&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e,n){void 0===i&&(i=this._zoom);var s=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?e&&e.pinch&&this.fire("zoom",e):((s||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return z(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){mi(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[o(this._container)]=this;var i=t?Li:Pi;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),Ot.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){z(this._resizeRequest),this._resizeRequest=M((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],s="mouseout"===i||"mouseover"===i,r=t.target||t.srcElement,h=!1;r;){if((e=this._targets[o(r)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){h=!0;break}if(e&&e.listens(i,!0)){if(s&&!Fi(r,t))break;if(n.push(e),s)break}if(r===this._container)break;r=r.parentNode}return n.length||h||s||!this.listens(i,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var e=t.type;"mousedown"===e&&xi(i),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var s=i({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}var o=this._findEventTargets(t,e);if(n){for(var r=[],h=0;h<n.length;h++)n[h].listens(e,!0)&&r.push(n[h]);o=r.concat(o)}if(o.length){"contextmenu"===e&&ji(t);var a=o[0],l={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=a.getLatLng&&(!a._radius||a._radius<=10);l.containerPoint=u?this.latLngToContainerPoint(a.getLatLng()):this.mouseEventToContainerPoint(t),l.layerPoint=this.containerPointToLayerPoint(l.containerPoint),l.latlng=u?a.getLatLng():this.layerPointToLatLng(l.layerPoint)}for(h=0;h<o.length;h++)if(o[h].fire(e,l,!0),l.originalEvent._stopped||!1===o[h].options.bubblingMouseEvents&&-1!==g(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,i=this._handlers.length;t<i;t++)this._handlers[t].disable()},whenReady:function(t,i){return this._loaded?t.call(i||this,{target:this}):this.on("load",t,i),this},_getMapPanePos:function(){return gi(this._mapPane)||new A(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,i){return(t&&void 0!==i?this._getNewPixelOrigin(t,i):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,i){var e=this.getSize()._divideBy(2);return this.project(t,i)._subtract(e)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return this.project(t,i)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,i,e){var n=this._getNewPixelOrigin(e,i);return B([this.project(t.getSouthWest(),i)._subtract(n),this.project(t.getNorthWest(),i)._subtract(n),this.project(t.getSouthEast(),i)._subtract(n),this.project(t.getNorthEast(),i)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,i,e){if(!e)return t;var n=this.project(t,i),s=this.getSize().divideBy(2),o=new I(n.subtract(s),n.add(s)),r=this._getBoundsOffset(o,e,i);return r.round().equals([0,0])?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new I(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=B(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new A(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=Ot.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ui(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!(!0!==(i&&i.animate)&&!this.getSize().contains(e)||(this.panBy(e,i),0))},_createAnimProxy:function(){var t=this._proxy=ni("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var i=Qt,e=this._proxy.style[i];vi(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){si(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();vi(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==e.animate&&!this.getSize().contains(s)||(M((function(){this._moveStart(!0,!1)._animateZoom(t,i,!0)}),this),0))},_animateZoom:function(t,i,e,s){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,li(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ui(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}}),Wi=T.extend({options:{position:"topright"},initialize:function(t){f(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return li(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(si(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),Gi=function(t){return new Wi(t)};Ui.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",e=this._controlContainer=ni("div",i+"control-container",this._container);function n(n,s){t[n+s]=ni("div",i+n+" "+i+s,e)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)si(this._controlCorners[t]);si(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Vi=Wi.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e<n?-1:n<e?1:0}},initialize:function(t,i,e){for(var n in f(this,e),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,t)this._addLayer(t[n],n);for(n in i)this._addLayer(i[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var i=0;i<this._layers.length;i++)this._layers[i].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return Wi.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,i){return this._addLayer(t,i),this._map?this._update():this},addOverlay:function(t,i){return this._addLayer(t,i,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var i=this._getLayer(o(t));return i&&this._layers.splice(this._layers.indexOf(i),1),this._map?this._update():this},expand:function(){li(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(li(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ui(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ui(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",i=this._container=ni("div",t),e=this.options.collapsed;i.setAttribute("aria-haspopup",!0),Bi(i),Ii(i);var n=this._section=ni("section",t+"-list");e&&(this._map.on("click",this.collapse,this),Pi(i,{mouseenter:function(){Pi(n,"click",ji),this.expand(),setTimeout((function(){Li(n,"click",ji)}))},mouseleave:this.collapse},this));var s=this._layersLink=ni("a",t+"-toggle",i);s.href="#",s.title="Layers",s.setAttribute("role","button"),Pi(s,"click",ji),Pi(s,"focus",this.expand,this),e||this.expand(),this._baseLayersList=ni("div",t+"-base",n),this._separator=ni("div",t+"-separator",n),this._overlaysList=ni("div",t+"-overlays",n),i.appendChild(n)},_getLayer:function(t){for(var i=0;i<this._layers.length;i++)if(this._layers[i]&&o(this._layers[i].layer)===t)return this._layers[i]},_addLayer:function(t,i,e){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:i,overlay:e}),this.options.sortLayers&&this._layers.sort(n((function(t,i){return this.options.sortFunction(t.layer,i.layer,t.name,i.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;oi(this._baseLayersList),oi(this._overlaysList),this._layerControlInputs=[];var t,i,e,n,s=0;for(e=0;e<this._layers.length;e++)this._addItem(n=this._layers[e]),i=i||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(this._baseLayersList.style.display=(t=t&&s>1)?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(o(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(i?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=e,n.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+o(this),n),this._layerControlInputs.push(i),i.layerId=o(t.layer),Pi(i,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("span");return e.appendChild(r),r.appendChild(i),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){var t,i,e=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=e.length-1;o>=0;o--)i=this._getLayer((t=e[o]).layerId).layer,t.checked?n.push(i):t.checked||s.push(i);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()},_checkDisabledLayers:function(){for(var t,i,e=this._layerControlInputs,n=this._map.getZoom(),s=e.length-1;s>=0;s--)i=this._getLayer((t=e[s]).layerId).layer,t.disabled=void 0!==i.options.minZoom&&n<i.options.minZoom||void 0!==i.options.maxZoom&&n>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this}}),qi=Wi.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">−</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=ni("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,s){var o=ni("a",e,n);return o.innerHTML=t,o.href="#",o.title=i,o.setAttribute("role","button"),o.setAttribute("aria-label",i),Bi(o),Pi(o,"click",Zi),Pi(o,"click",s,this),Pi(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";ui(this._zoomInButton,i),ui(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(li(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(li(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});Ui.mergeOptions({zoomControl:!0}),Ui.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new qi,this.addControl(this.zoomControl))}));var Ji=Wi.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=ni("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.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,i,e){t.metric&&(this._mScale=ni("div",i,e)),t.imperial&&(this._iScale=ni("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t);this._updateScale(this._mScale,i<1e3?i+" m":i/1e3+" km",i/t)},_updateImperial:function(t){var i,e,n,s=3.2808399*t;s>5280?(e=this._getRoundNum(i=s/5280),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e>=10?10:e>=5?5:e>=3?3:e>=2?2:1)}}),Ki=Wi.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Ot.inlineSvg?'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg> ':"")+"Leaflet</a>"},initialize:function(t){f(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=ni("div","leaflet-control-attribution"),Bi(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' <span aria-hidden="true">|</span> ')}}});Ui.mergeOptions({attributionControl:!0}),Ui.addInitHook((function(){this.options.attributionControl&&(new Ki).addTo(this)})),Wi.Layers=Vi,Wi.Zoom=qi,Wi.Scale=Ji,Wi.Attribution=Ki,Gi.layers=function(t,i,e){return new Vi(t,i,e)},Gi.zoom=function(t){return new qi(t)},Gi.scale=function(t){return new Ji(t)},Gi.attribution=function(t){return new Ki(t)};var Xi=T.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Xi.addTo=function(t,i){return t.addHandler(i,this),this};var Qi,Yi={Events:C},te=Ot.touch?"touchstart mousedown":"mousedown",ie=S.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){f(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(Pi(this._dragStartTarget,te,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ie._dragging===this&&this.finishDrag(!0),Li(this._dragStartTarget,te,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!ai(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ie._dragging===this&&this.finishDrag();else if(!(ie._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ie._dragging=this,this._preventOutline&&xi(this._element),bi(),Vt(),this._moving))){this.fire("down");var i=t.touches?t.touches[0]:t,e=ki(this._element);this._startPoint=new A(i.clientX,i.clientY),this._startPos=gi(this._element),this._parentScale=Mi(e);var n="mousedown"===t.type;Pi(document,n?"mousemove":"touchmove",this._onMove,this),Pi(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new A(i.clientX,i.clientY)._subtract(this._startPoint);(e.x||e.y)&&(Math.abs(e.x)+Math.abs(e.y)<this.options.clickTolerance||(e.x/=this._parentScale.x,e.y/=this._parentScale.y,ji(t),this._moved||(this.fire("dragstart"),this._moved=!0,li(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),li(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(e),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),mi(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){ui(document.body,"leaflet-dragging"),this._lastTarget&&(ui(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Li(document,"mousemove touchmove",this._onMove,this),Li(document,"mouseup touchend touchcancel",this._onUp,this),yi(),qt(),this._moved&&this._moving&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)}),this._moving=!1,ie._dragging=!1}});function ee(t,i){if(!i||!t.length)return t.slice();var e=i*i;return function(t,i){var e=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(e);n[0]=n[e-1]=1,se(t,n,i,0,e-1);var s,o=[];for(s=0;s<e;s++)n[s]&&o.push(t[s]);return o}(t=function(t,i){for(var e=[t[0]],n=1,s=0,o=t.length;n<o;n++)ae(t[n],t[s])>i&&(e.push(t[n]),s=n);return s<o-1&&e.push(t[o-1]),e}(t,e),e)}function ne(t,i,e){return Math.sqrt(le(t,i,e,!0))}function se(t,i,e,n,s){var o,r,h,a=0;for(r=n+1;r<=s-1;r++)(h=le(t[r],t[n],t[s],!0))>a&&(o=r,a=h);a>e&&(i[o]=1,se(t,i,e,n,o),se(t,i,e,o,s))}function oe(t,i,e,n,s){var o,r,h,a=n?Qi:he(t,e),l=he(i,e);for(Qi=l;;){if(!(a|l))return[t,i];if(a&l)return!1;h=he(r=re(t,i,o=a||l,e,s),e),o===a?(t=r,a=h):(i=r,l=h)}}function re(t,i,e,n,s){var o,r,h=i.x-t.x,a=i.y-t.y,l=n.min,u=n.max;return 8&e?(o=t.x+h*(u.y-t.y)/a,r=u.y):4&e?(o=t.x+h*(l.y-t.y)/a,r=l.y):2&e?(o=u.x,r=t.y+a*(u.x-t.x)/h):1&e&&(o=l.x,r=t.y+a*(l.x-t.x)/h),new A(o,r,s)}function he(t,i){var e=0;return t.x<i.min.x?e|=1:t.x>i.max.x&&(e|=2),t.y<i.min.y?e|=4:t.y>i.max.y&&(e|=8),e}function ae(t,i){var e=i.x-t.x,n=i.y-t.y;return e*e+n*n}function le(t,i,e,n){var s,o=i.x,r=i.y,h=e.x-o,a=e.y-r,l=h*h+a*a;return l>0&&((s=((t.x-o)*h+(t.y-r)*a)/l)>1?(o=e.x,r=e.y):s>0&&(o+=h*s,r+=a*s)),h=t.x-o,a=t.y-r,n?h*h+a*a:new A(o,r)}function ue(t){return!m(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function ce(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ue(t)}var fe={__proto__:null,simplify:ee,pointToSegmentDistance:ne,closestPointOnSegment:function(t,i,e){return le(t,i,e)},clipSegment:oe,_getEdgeIntersection:re,_getBitCode:he,_sqClosestPointOnSegment:le,isFlat:ue,_flat:ce};function de(t,i,e){var n,s,o,r,h,a,l,u,c,f=[1,4,2,8];for(s=0,l=t.length;s<l;s++)t[s]._code=he(t[s],i);for(r=0;r<4;r++){for(u=f[r],n=[],s=0,o=(l=t.length)-1;s<l;o=s++)a=t[o],(h=t[s])._code&u?a._code&u||((c=re(a,h,u,i,e))._code=he(c,i),n.push(c)):(a._code&u&&((c=re(a,h,u,i,e))._code=he(c,i),n.push(c)),n.push(h));t=n}return t}var pe={__proto__:null,clipPolygon:de},ve={project:function(t){return new A(t.lng,t.lat)},unproject:function(t){return new D(t.y,t.x)},bounds:new I([-180,-90],[180,90])},me={R:6378137,R_MINOR:6356752.314245179,bounds:new I([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,s=this.R_MINOR/e,o=Math.sqrt(1-s*s),r=o*Math.sin(n),h=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),o/2);return n=-e*Math.log(Math.max(h,1e-10)),new A(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/n),h=Math.PI/2-2*Math.atan(r),a=0,l=.1;a<15&&Math.abs(l)>1e-7;a++)i=o*Math.sin(h),i=Math.pow((1-i)/(1+i),o/2),h+=l=Math.PI/2-2*Math.atan(r*i)-h;return new D(h*e,t.x*e/n)}},ge={__proto__:null,LonLat:ve,Mercator:me,SphericalMercator:U},we=i({},H,{code:"EPSG:3395",projection:me,transformation:function(){var t=.5/(Math.PI*me.R);return G(t,.5,-t,.5)}()}),be=i({},H,{code:"EPSG:4326",projection:ve,transformation:G(1/180,1,-1/180,.5)}),ye=i({},F,{projection:ve,transformation:G(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});F.Earth=H,F.EPSG3395=we,F.EPSG3857=V,F.EPSG900913=q,F.EPSG4326=be,F.Simple=ye;var xe=S.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[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",(function(){i.off(e,this)}),this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});Ui.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var i=o(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=o(t);return this._layers[i]?(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return o(t)in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){for(var i=0,e=(t=t?m(t)?t:[t]:[]).length;i<e;i++)this.addLayer(t[i])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var i=o(t);this._zoomBoundLayers[i]&&(delete this._zoomBoundLayers[i],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,i=-1/0,e=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),i=void 0===s.maxZoom?i:Math.max(i,s.maxZoom)}this._layersMaxZoom=i===-1/0?void 0:i,this._layersMinZoom=t===1/0?void 0:t,e!==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 _e=xe.extend({initialize:function(t,i){var e,n;if(f(this,i),this._layers={},t)for(e=0,n=t.length;e<n;e++)this.addLayer(t[e])},addLayer:function(t){var i=this.getLayerId(t);return this._layers[i]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var i=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[i]&&this._map.removeLayer(this._layers[i]),delete this._layers[i],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var i,e,n=Array.prototype.slice.call(arguments,1);for(i in this._layers)(e=this._layers[i])[t]&&e[t].apply(e,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);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 o(t)}}),ke=_e.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),_e.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),_e.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 j;for(var i in this._layers){var e=this._layers[i];t.extend(e.getBounds?e.getBounds():e.getLatLng())}return t}}),Me=T.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){f(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,i){var e=this._getIconUrl(t);if(!e){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(e,i&&"IMG"===i.tagName?i:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,i){var e=this.options,n=e[i+"Size"];"number"==typeof n&&(n=[n,n]);var s=O(n),o=O("shadow"===i&&e.shadowAnchor||e.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+i+" "+(e.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return(i=i||document.createElement("img")).src=t,i},_getIconUrl:function(t){return Ot.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}}),ze=Me.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof ze.imagePath&&(ze.imagePath=this._detectIconPath()),(this.options.imagePath||ze.imagePath)+Me.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var i=function(t,i,e){var n=i.exec(t);return n&&n[e]};return(t=i(t,/^url\((['"])?(.+)\1\)$/,2))&&i(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=ni("div","leaflet-default-icon-path",document.body),i=ei(t,"background-image")||ei(t,"backgroundImage");if(document.body.removeChild(t),i=this._stripUrl(i))return i;var e=document.querySelector('link[href$="leaflet.css"]');return e?e.href.substring(0,e.href.length-"leaflet.css".length-1):""}}),Pe=Xi.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ie(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),li(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&&ui(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var i=this._marker,e=i._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=gi(i._icon),r=e.getPixelBounds(),h=e.getPixelOrigin(),a=B(r.min._subtract(h).add(s),r.max._subtract(h).subtract(s));if(!a.contains(o)){var l=O((Math.max(a.max.x,o.x)-a.max.x)/(r.max.x-a.max.x)-(Math.min(a.min.x,o.x)-a.min.x)/(r.min.x-a.min.x),(Math.max(a.max.y,o.y)-a.max.y)/(r.max.y-a.max.y)-(Math.min(a.min.y,o.y)-a.min.y)/(r.min.y-a.min.y)).multiplyBy(n);e.panBy(l,{animate:!1}),this._draggable._newPos._add(l),this._draggable._startPos._add(l),mi(i._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=M(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(z(this._panRequest),this._panRequest=M(this._adjustPan.bind(this,t)))},_onDrag:function(t){var i=this._marker,e=i._shadow,n=gi(i._icon),s=i._map.layerPointToLatLng(n);e&&mi(e,n),i._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,i.fire("move",t).fire("drag",t)},_onDragEnd:function(t){z(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Te=xe.extend({options:{icon:new ze,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,i){f(this,i),this._latlng=R(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var i=this._latlng;return this._latlng=R(t),this.update(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,i="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),e=t.icon.createIcon(this._icon),n=!1;e!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(e.title=t.title),"IMG"===e.tagName&&(e.alt=t.alt||"")),li(e,i),t.keyboard&&(e.tabIndex="0",e.setAttribute("role","button")),this._icon=e,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Pi(e,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(li(s,i),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Li(this._icon,"focus",this._panOnFocus,this),si(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&si(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&mi(this._icon,t),this._shadow&&mi(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(i)},_initInteraction:function(){if(this.options.interactive&&(li(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Pe)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Pe(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&di(this._icon,t),this._shadow&&di(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var i=this.options.icon.options,e=i.iconSize?O(i.iconSize):O(0,0),n=i.iconAnchor?O(i.iconAnchor):O(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:e.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}}),Le=xe.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 f(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Ce=Le.extend({options:{fill:!0,radius:10},initialize:function(t,i){f(this,i),this._latlng=R(t),this._radius=this.options.radius},setLatLng:function(t){var i=this._latlng;return this._latlng=R(t),this.redraw(),this.fire("move",{oldLatLng:i,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var i=t&&t.radius||this._radius;return Le.prototype.setStyle.call(this,t),this.setRadius(i),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,i=this._radiusY||t,e=this._clickTolerance(),n=[t+e,i+e];this._pxBounds=new I(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()}}),Se=Ce.extend({initialize:function(t,e,n){if("number"==typeof e&&(e=i({},n,{radius:e})),f(this,e),this._latlng=R(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 j(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Le.prototype.setStyle,_project:function(){var t=this._latlng.lng,i=this._latlng.lat,e=this._map,n=e.options.crs;if(n.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,r=e.project([i+o,t]),h=e.project([i-o,t]),a=r.add(h).divideBy(2),l=e.unproject(a).lat,u=Math.acos((Math.cos(o*s)-Math.sin(i*s)*Math.sin(l*s))/(Math.cos(i*s)*Math.cos(l*s)))/s;(isNaN(u)||0===u)&&(u=o/Math.cos(Math.PI/180*i)),this._point=a.subtract(e.getPixelOrigin()),this._radius=isNaN(u)?0:a.x-e.project([l,t-u]).x,this._radiusY=a.y-r.y}else{var c=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=e.latLngToLayerPoint(this._latlng),this._radius=this._point.x-e.latLngToLayerPoint(c).x}this._updateBounds()}}),Ae=Le.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,i){f(this,i),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var i,e,n=1/0,s=null,o=le,r=0,h=this._parts.length;r<h;r++)for(var a=this._parts[r],l=1,u=a.length;l<u;l++){var c=o(t,i=a[l-1],e=a[l],!0);c<n&&(n=c,s=o(t,i,e))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,i,e,n,s,o,r,h=this._rings[0],a=h.length;if(!a)return null;for(t=0,i=0;t<a-1;t++)i+=h[t].distanceTo(h[t+1])/2;if(0===i)return this._map.layerPointToLatLng(h[0]);for(t=0,n=0;t<a-1;t++)if((n+=e=(s=h[t]).distanceTo(o=h[t+1]))>i)return this._map.layerPointToLatLng([o.x-(r=(n-i)/e)*(o.x-s.x),o.y-r*(o.y-s.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,i){return i=i||this._defaultShape(),t=R(t),i.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new j,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return ue(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var i=[],e=ue(t),n=0,s=t.length;n<s;n++)e?(i[n]=R(t[n]),this._bounds.extend(i[n])):i[n]=this._convertLatLngs(t[n]);return i},_project:function(){var t=new I;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),i=new A(t,t);this._rawPxBounds&&(this._pxBounds=new I([this._rawPxBounds.min.subtract(i),this._rawPxBounds.max.add(i)]))},_projectLatlngs:function(t,i,e){var n,s,o=t.length;if(t[0]instanceof D){for(s=[],n=0;n<o;n++)s[n]=this._map.latLngToLayerPoint(t[n]),e.extend(s[n]);i.push(s)}else for(n=0;n<o;n++)this._projectLatlngs(t[n],i,e)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var i,e,n,s,o,r,h,a=this._parts;for(i=0,n=0,s=this._rings.length;i<s;i++)for(e=0,o=(h=this._rings[i]).length;e<o-1;e++)(r=oe(h[e],h[e+1],t,e,!0))&&(a[n]=a[n]||[],a[n].push(r[0]),r[1]===h[e+1]&&e!==o-2||(a[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,i=this.options.smoothFactor,e=0,n=t.length;e<n;e++)t[e]=ee(t[e],i)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,i){var e,n,s,o,r,h,a=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(e=0,o=this._parts.length;e<o;e++)for(n=0,s=(r=(h=this._parts[e]).length)-1;n<r;s=n++)if((i||0!==n)&&ne(t,h[s],h[n])<=a)return!0;return!1}});Ae._flat=ce;var Ee=Ae.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,i,e,n,s,o,r,h,a=this._rings[0],l=a.length;if(!l)return null;for(o=r=h=0,t=0,i=l-1;t<l;i=t++)r+=((e=a[t]).x+(n=a[i]).x)*(s=e.y*n.x-n.y*e.x),h+=(e.y+n.y)*s,o+=3*s;return this._map.layerPointToLatLng(0===o?a[0]:[r/o,h/o])},_convertLatLngs:function(t){var i=Ae.prototype._convertLatLngs.call(this,t),e=i.length;return e>=2&&i[0]instanceof D&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){Ae.prototype._setLatLngs.call(this,t),ue(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ue(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new A(i,i);if(t=new I(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s=0,o=this._rings.length;s<o;s++)(n=de(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var i,e,n,s,o,r,h,a,l=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,h=this._parts.length;s<h;s++)for(o=0,r=(a=(i=this._parts[s]).length)-1;o<a;r=o++)(e=i[o]).y>t.y!=(n=i[r]).y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(l=!l);return l||Ae.prototype._containsPoint.call(this,t,!0)}}),Oe=ke.extend({initialize:function(t,i){f(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,s=m(t)?t:t.features;if(s){for(i=0,e=s.length;i<e;i++)((n=s[i]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=Ie(t,o);return r?(r.feature=Fe(t),r.defaultOptions=r.options,this.resetStyle(r),o.onEachFeature&&o.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=i({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(i){this._setLayerStyle(i,t)}),this)},_setLayerStyle:function(t,i){t.setStyle&&("function"==typeof i&&(i=i(t.feature)),t.setStyle(i))}});function Ie(t,i){var e,n,s,o,r="Feature"===t.type?t.geometry:t,h=r?r.coordinates:null,a=[],l=i&&i.pointToLayer,u=i&&i.coordsToLatLng||je;if(!h&&!r)return null;switch(r.type){case"Point":return Be(l,t,e=u(h),i);case"MultiPoint":for(s=0,o=h.length;s<o;s++)e=u(h[s]),a.push(Be(l,t,e,i));return new ke(a);case"LineString":case"MultiLineString":return n=Ze(h,"LineString"===r.type?0:1,u),new Ae(n,i);case"Polygon":case"MultiPolygon":return n=Ze(h,"Polygon"===r.type?1:2,u),new Ee(n,i);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var c=Ie({geometry:r.geometries[s],type:"Feature",properties:t.properties},i);c&&a.push(c)}return new ke(a);default:throw new Error("Invalid GeoJSON object.")}}function Be(t,i,e,n){return t?t(i,e):new Te(e,n&&n.markersInheritOptions&&n)}function je(t){return new D(t[1],t[0],t[2])}function Ze(t,i,e){for(var n,s=[],o=0,r=t.length;o<r;o++)n=i?Ze(t[o],i-1,e):(e||je)(t[o]),s.push(n);return s}function De(t,i){return void 0!==(t=R(t)).alt?[l(t.lng,i),l(t.lat,i),l(t.alt,i)]:[l(t.lng,i),l(t.lat,i)]}function Re(t,i,e,n){for(var s=[],o=0,r=t.length;o<r;o++)s.push(i?Re(t[o],i-1,e,n):De(t[o],n));return!i&&e&&s.push(s[0]),s}function Ne(t,e){return t.feature?i({},t.feature,{geometry:e}):Fe(e)}function Fe(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var He={toGeoJSON:function(t){return Ne(this,{type:"Point",coordinates:De(this.getLatLng(),t)})}};function $e(t,i){return new Oe(t,i)}Te.include(He),Se.include(He),Ce.include(He),Ae.include({toGeoJSON:function(t){var i=!ue(this._latlngs);return Ne(this,{type:(i?"Multi":"")+"LineString",coordinates:Re(this._latlngs,i?1:0,!1,t)})}}),Ee.include({toGeoJSON:function(t){var i=!ue(this._latlngs),e=i&&!ue(this._latlngs[0]),n=Re(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),Ne(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),_e.include({toMultiPoint:function(t){var i=[];return this.eachLayer((function(e){i.push(e.toGeoJSON(t).geometry.coordinates)})),Ne(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return this.eachLayer((function(i){if(i.toGeoJSON){var s=i.toGeoJSON(t);if(e)n.push(s.geometry);else{var o=Fe(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}})),e?Ne(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Ue=$e,We=xe.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=Z(i),f(this,e)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(li(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){si(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&&ri(this._image),this},bringToBack:function(){return this._map&&hi(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Z(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:ni("img");li(i,"leaflet-image-layer"),this._zoomAnimated&&li(i,"leaflet-zoom-animated"),this.options.className&&li(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onload=n(this.fire,this,"load"),i.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=i.src:(i.src=this._url,i.alt=this.options.alt)},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;vi(this._image,e,i)},_reset:function(){var t=this._image,i=new I(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();mi(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){di(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&null!=this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ge=We.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:ni("video");if(li(i,"leaflet-image-layer"),this._zoomAnimated&&li(i,"leaflet-zoom-animated"),this.options.className&&li(i,this.options.className),i.onselectstart=a,i.onmousemove=a,i.onloadeddata=n(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),s=[],o=0;o<e.length;o++)s.push(e[o].src);this._url=e.length>0?s:[i.src]}else{m(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var h=ni("source");h.src=this._url[r],i.appendChild(h)}}}}),Ve=We.extend({_initImage:function(){var t=this._image=this._url;li(t,"leaflet-image-layer"),this._zoomAnimated&&li(t,"leaflet-zoom-animated"),this.options.className&&li(t,this.options.className),t.onselectstart=a,t.onmousemove=a}}),qe=xe.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0},initialize:function(t,i){f(this,t),this._source=i},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&di(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&di(this._container,1),this.bringToFront(),this.options.interactive&&(li(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(di(this._container,0),this._removeTimeout=setTimeout(n(si,void 0,this._container),200)):si(this._container),this.options.interactive&&(ui(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=R(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&&ri(this._container),this},bringToBack:function(){return this._map&&hi(this._container),this},_prepareOpen:function(t){var i=this._source;if(!i._map)return!1;if(i instanceof ke){i=null;var e=this._source._layers;for(var n in e)if(e[n]._map){i=e[n];break}if(!i)return!1;this._source=i}if(!t)if(i.getCenter)t=i.getCenter();else if(i.getLatLng)t=i.getLatLng();else{if(!i.getBounds)throw new Error("Unable to get source layer LatLng.");t=i.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,i="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof i)t.innerHTML=i;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(i)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),i=O(this.options.offset),e=this._getAnchor();this._zoomAnimated?mi(this._container,t.add(e)):i=i.add(t).add(e);var n=this._containerBottom=-i.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+i.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});Ui.include({_initOverlay:function(t,i,e,n){var s=i;return s instanceof t||(s=new t(n).setContent(i)),e&&s.setLatLng(e),s}}),xe.include({_initOverlay:function(t,i,e,n){var s=e;return s instanceof t?(f(s,n),s._source=this):(s=i&&!n?i:new t(n,this)).setContent(e),s}});var Je=qe.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,qe.prototype.openOn.call(this,t)},onAdd:function(t){qe.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Le||this._source.on("preclick",Oi))},onRemove:function(t){qe.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Le||this._source.off("preclick",Oi))},getEvents:function(){var t=qe.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",i=this._container=ni("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),e=this._wrapper=ni("div",t+"-content-wrapper",i);if(this._contentNode=ni("div",t+"-content",e),Bi(i),Ii(this._contentNode),Pi(i,"contextmenu",Oi),this._tipContainer=ni("div",t+"-tip-container",i),this._tip=ni("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=ni("a",t+"-close-button",i);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">×</span>',Pi(n,"click",this.close,this)}},_updateLayout:function(){var t=this._contentNode,i=t.style;i.width="",i.whiteSpace="nowrap";var e=t.offsetWidth;e=Math.min(e,this.options.maxWidth),e=Math.max(e,this.options.minWidth),i.width=e+1+"px",i.whiteSpace="",i.height="";var n=this.options.maxHeight,s="leaflet-popup-scrolled";n&&t.offsetHeight>n?(i.height=n+"px",li(t,s)):ui(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();mi(this._container,i.add(e))},_adjustPan:function(t){if(this.options.autoPan){this._map._panAnim&&this._map._panAnim.stop();var i=this._map,e=parseInt(ei(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,s=this._containerWidth,o=new A(this._containerLeft,-n-this._containerBottom);o._add(gi(this._container));var r=i.layerPointToContainerPoint(o),h=O(this.options.autoPanPadding),a=O(this.options.autoPanPaddingTopLeft||h),l=O(this.options.autoPanPaddingBottomRight||h),u=i.getSize(),c=0,f=0;r.x+s+l.x>u.x&&(c=r.x+s-u.x+l.x),r.x-c-a.x<0&&(c=r.x-a.x),r.y+n+l.y>u.y&&(f=r.y+n-u.y+l.y),r.y-f-a.y<0&&(f=r.y-a.y),(c||f)&&i.fire("autopanstart").panBy([c,f],{animate:t&&"moveend"===t.type})}},_getAnchor:function(){return O(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});Ui.mergeOptions({closePopupOnClick:!0}),Ui.include({openPopup:function(t,i,e){return this._initOverlay(Je,t,i,e).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),xe.include({bindPopup:function(t,i){return this._popup=this._initOverlay(Je,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&this._popup._prepareOpen(t)&&this._popup.openOn(this._map),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Zi(t);var i=t.layer||t.target;this._popup._source!==i||i instanceof Le?(this._popup._source=i,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ke=qe.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){qe.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){qe.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=qe.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){this._contentNode=this._container=ni("div","leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e,n=this._map,s=this._container,o=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),h=this.options.direction,a=s.offsetWidth,l=s.offsetHeight,u=O(this.options.offset),c=this._getAnchor();"top"===h?(i=a/2,e=l):"bottom"===h?(i=a/2,e=0):"center"===h?(i=a/2,e=l/2):"right"===h?(i=0,e=l/2):"left"===h?(i=a,e=l/2):r.x<o.x?(h="right",i=0,e=l/2):(h="left",i=a+2*(u.x+c.x),e=l/2),t=t.subtract(O(i,e,!0)).add(u).add(c),ui(s,"leaflet-tooltip-right"),ui(s,"leaflet-tooltip-left"),ui(s,"leaflet-tooltip-top"),ui(s,"leaflet-tooltip-bottom"),li(s,"leaflet-tooltip-"+h),mi(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&di(this._container,t)},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(i)},_getAnchor:function(){return O(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});Ui.include({openTooltip:function(t,i,e){return this._initOverlay(Ke,t,i,e).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),xe.include({bindTooltip:function(t,i){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ke,this._tooltip,t,i),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var i=t?"off":"on",e={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?e.add=this._openTooltip:(e.mouseover=this._openTooltip,e.mouseout=this.closeTooltip,e.click=this._openTooltip),this._tooltip.options.sticky&&(e.mousemove=this._moveTooltip),this[i](e),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&this._tooltip._prepareOpen(t)&&this._tooltip.openOn(this._map),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_openTooltip:function(t){!this._tooltip||!this._map||this._map.dragging&&this._map.dragging.moving()||(this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0))},_moveTooltip:function(t){var i,e,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),e=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(e)),this._tooltip.setLatLng(n)}});var Xe=Me.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:document.createElement("div"),e=this.options;if(e.html instanceof Element?(oi(i),i.appendChild(e.html)):i.innerHTML=!1!==e.html?e.html:"",e.bgPos){var n=O(e.bgPos);i.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(i,"icon"),i},createShadow:function(){return null}});Me.Default=ze;var Qe=xe.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Ot.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){f(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),si(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ri(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(hi(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={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 A?t:new A(t,t)},_updateZIndex:function(){this._container&&null!=this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var i,e=this.getPane().children,n=-t(-1/0,1/0),s=0,o=e.length;s<o;s++)i=e[s].style.zIndex,e[s]!==this._container&&i&&(n=t(n,+i));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Ot.ielt9){di(this._container,this.options.opacity);var t=+new Date,i=!1,e=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);di(s.el,o),o<1?i=!0:(s.active?e=!0:this._onOpaqueTile(s),s.active=!0)}}e&&!this._noPrune&&this._pruneTiles(),i&&(z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this))}},_onOpaqueTile:a,_initContainer:function(){this._container||(this._container=ni("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,i=this.options.maxZoom;if(void 0!==t){for(var e in this._levels)e=Number(e),this._levels[e].el.children.length||e===t?(this._levels[e].el.style.zIndex=i-Math.abs(t-e),this._onUpdateLevel(e)):(si(this._levels[e].el),this._removeTilesAtZoom(e),this._onRemoveLevel(e),delete this._levels[e]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=ni("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=i,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:a,_onRemoveLevel:a,_onCreateLevel:a,_pruneTiles:function(){if(this._map){var t,i,e=this._map.getZoom();if(e>this.options.maxZoom||e<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(i=this._tiles[t]).retain=i.current;for(t in this._tiles)if((i=this._tiles[t]).current&&!i.active){var n=i.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var i in this._tiles)this._tiles[i].coords.z===t&&this._removeTile(i)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)si(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,i,e,n){var s=Math.floor(t/2),o=Math.floor(i/2),r=e-1,h=new A(+s,+o);h.z=+r;var a=this._tileCoordsToKey(h),l=this._tiles[a];return l&&l.active?(l.retain=!0,!0):(l&&l.loaded&&(l.retain=!0),r>n&&this._retainParent(s,o,r,n))},_retainChildren:function(t,i,e,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*i;o<2*i+2;o++){var r=new A(s,o);r.z=e+1;var h=this._tileCoordsToKey(r),a=this._tiles[h];a&&a.active?a.retain=!0:(a&&a.loaded&&(a.retain=!0),e+1<n&&this._retainChildren(s,o,e+1,n))}},_resetView:function(t){var i=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),i,i)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var i=this.options;return void 0!==i.minNativeZoom&&t<i.minNativeZoom?i.minNativeZoom:void 0!==i.maxNativeZoom&&i.maxNativeZoom<t?i.maxNativeZoom:t},_setView:function(t,i,e,n){var s=Math.round(i);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s),n&&!(this.options.updateWhenZooming&&s!==this._tileZoom)||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),e||this._pruneTiles(),this._noPrune=!!e),this._setZoomTransforms(t,i)},_setZoomTransforms:function(t,i){for(var e in this._levels)this._setZoomTransform(this._levels[e],t,i)},_setZoomTransform:function(t,i,e){var n=this._map.getZoomScale(e,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(i,e)).round();Ot.any3d?vi(t.el,s,n):mi(t.el,s)},_resetGrid:function(){var t=this._map,i=t.options.crs,e=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=i.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,i.wrapLng[0]],n).x/e.x),Math.ceil(t.project([0,i.wrapLng[1]],n).x/e.y)],this._wrapY=i.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([i.wrapLat[0],0],n).y/e.x),Math.ceil(t.project([i.wrapLat[1],0],n).y/e.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var i=this._map,e=i._animatingZoom?Math.max(i._animateToZoom,i.getZoom()):i.getZoom(),n=i.getZoomScale(e,this._tileZoom),s=i.project(t,this._tileZoom).floor(),o=i.getSize().divideBy(2*n);return new I(s.subtract(o),s.add(o))},_update:function(t){var i=this._map;if(i){var e=this._clampZoom(i.getZoom());if(void 0===t&&(t=i.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),r=[],h=this.options.keepBuffer,a=new I(s.getBottomLeft().subtract([h,-h]),s.getTopRight().add([h,-h]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var l in this._tiles){var u=this._tiles[l].coords;u.z===this._tileZoom&&a.contains(new A(u.x,u.y))||(this._tiles[l].current=!1)}if(Math.abs(e-this._tileZoom)>1)this._setView(t,e);else{for(var c=s.min.y;c<=s.max.y;c++)for(var f=s.min.x;f<=s.max.x;f++){var d=new A(f,c);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort((function(t,i){return t.distanceTo(o)-i.distanceTo(o)})),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(f=0;f<r.length;f++)this._addTile(r[f],v);this._level.el.appendChild(v)}}}}},_isValidTile:function(t){var i=this._map.options.crs;if(!i.infinite){var e=this._globalTileRange;if(!i.wrapLng&&(t.x<e.min.x||t.x>e.max.x)||!i.wrapLat&&(t.y<e.min.y||t.y>e.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return Z(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),s=n.add(e);return[i.unproject(n,t.z),i.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new j(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new A(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(si(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){li(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=a,t.onmousemove=a,Ot.ielt9&&this.options.opacity<1&&di(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&M(n(this._tileReady,this,t,null,o)),mi(o,e),this._tiles[s]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var s=this._tileCoordsToKey(t);(e=this._tiles[s])&&(e.loaded=+new Date,this._map._fadeAnimated?(di(e.el,0),z(this._fadeFrame),this._fadeFrame=M(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(li(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Ot.ielt9||!this._map._fadeAnimated?M(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new A(this._wrapX?h(t.x,this._wrapX):t.x,this._wrapY?h(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new I(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),Ye=Qe.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=f(this,i)).detectRetina&&Ot.retina&&i.maxZoom>0&&(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom++):(i.zoomOffset++,i.maxZoom--),i.minZoom=Math.max(0,i.minZoom)),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return Pi(e,"load",n(this._tileOnLoad,this,i,e)),Pi(e,"error",n(this._tileOnError,this,i,e)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(e.referrerPolicy=this.options.referrerPolicy),e.alt="",e.setAttribute("role","presentation"),e.src=this.getTileUrl(t),e},getTileUrl:function(t){var e={r:Ot.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return v(this._url,i(e,this.options))},_tileOnLoad:function(t,i){Ot.ielt9?setTimeout(n(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom;return this.options.zoomReverse&&(t=this.options.maxZoom-t),t+this.options.zoomOffset},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=a,i.onerror=a,!i.complete)){i.src=w;var e=this._tiles[t].coords;si(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",w),Qe.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==w))return Qe.prototype._tileReady.call(this,t,i,e)}});function tn(t,i){return new Ye(t,i)}var en=Ye.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,e){this._url=t;var n=i({},this.defaultWmsParams);for(var s in e)s in this.options||(n[s]=e[s]);var o=(e=f(this,e)).detectRetina&&Ot.retina?2:1,r=this.getTileSize();n.width=r.x*o,n.height=r.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version),this.wmsParams[this._wmsVersion>=1.3?"crs":"srs"]=this._crs.code,Ye.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=B(e.project(i[0]),e.project(i[1])),s=n.min,o=n.max,r=(this._wmsVersion>=1.3&&this._crs===be?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),h=Ye.prototype.getTileUrl.call(this,t);return h+d(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});Ye.WMS=en,tn.wms=function(t,i){return new en(t,i)};var nn=xe.extend({options:{padding:.1},initialize:function(t){f(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),this._zoomAnimated&&li(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,i),o=n.multiplyBy(-e).add(s).subtract(this._map._getNewPixelOrigin(t,i));Ot.any3d?vi(this._container,o,e):mi(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new I(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),sn=nn.extend({options:{tolerance:0},getEvents:function(){var t=nn.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){nn.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Pi(t,"mousemove",this._onMouseMove,this),Pi(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Pi(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){z(this._redrawRequest),delete this._ctx,si(this._container),Li(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){nn.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=Ot.retina?2:1;mi(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",Ot.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){nn.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[o(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,e,n=t.options.dashArray.split(/[, ]+/),s=[];for(e=0;e<n.length;e++){if(i=Number(n[e]),isNaN(i))return;s.push(i)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||M(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var i=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new I,this._redrawBounds.extend(t._pxBounds.min.subtract([i,i])),this._redrawBounds.extend(t._pxBounds.max.add([i,i]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var i=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,i.x,i.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,i=this._redrawBounds;if(this._ctx.save(),i){var e=i.getSize();this._ctx.beginPath(),this._ctx.rect(i.min.x,i.min.y,e.x,e.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!i||t._pxBounds&&t._pxBounds.intersects(i))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,i){if(this._drawing){var e,n,s,o,r=t._parts,h=r.length,a=this._ctx;if(h){for(a.beginPath(),e=0;e<h;e++){for(n=0,s=r[e].length;n<s;n++)a[n?"lineTo":"moveTo"]((o=r[e][n]).x,o.y);i&&a.closePath()}this._fillStroke(a,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var i=t._point,e=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(e.save(),e.scale(1,s)),e.beginPath(),e.arc(i.x,i.y/s,n,0,2*Math.PI,!1),1!==s&&e.restore(),this._fillStroke(e,t)}},_fillStroke:function(t,i){var e=i.options;e.fill&&(t.globalAlpha=e.fillOpacity,t.fillStyle=e.fillColor||e.color,t.fill(e.fillRule||"evenodd")),e.stroke&&0!==e.weight&&(t.setLineDash&&t.setLineDash(i.options&&i.options._dashArray||[]),t.globalAlpha=e.opacity,t.lineWidth=e.weight,t.strokeStyle=e.color,t.lineCap=e.lineCap,t.lineJoin=e.lineJoin,t.stroke())},_onClick:function(t){for(var i,e,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(i=s.layer).options.interactive&&i._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(e=i);this._fireEvent(!!e&&[e],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var i=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,i)}},_handleMouseOut:function(t){var i=this._hoveredLayer;i&&(ui(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,i){if(!this._mouseHoverThrottled){for(var e,s,o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&(s=e);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(li(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(n((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,i,e){this._map._fireDOMEvent(i,e||i.type,t)},_bringToFront:function(t){var i=t._order;if(i){var e=i.next,n=i.prev;e&&(e.prev=n,n?n.next=e:e&&(this._drawFirst=e),i.prev=this._drawLast,this._drawLast.next=i,i.next=null,this._drawLast=i,this._requestRedraw(t))}},_bringToBack:function(t){var i=t._order;if(i){var e=i.next,n=i.prev;n&&(n.next=e,e?e.prev=n:n&&(this._drawLast=n),i.prev=null,i.next=this._drawFirst,this._drawFirst.prev=i,this._drawFirst=i,this._requestRedraw(t))}}});function on(t){return Ot.canvas?new sn(t):null}var rn=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">')}}(),hn={_initContainer:function(){this._container=ni("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(nn.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=rn("shape");li(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=rn("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;si(i),t.removeInteractiveTarget(i),delete this._layers[o(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(i||(i=t._stroke=rn("stroke")),s.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,i.dashStyle=n.dashArray?m(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):"",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(s.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=rn("fill")),s.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(s.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){ri(t._container)},_bringToBack:function(t){hi(t._container)}},an=Ot.vml?rn:J,ln=nn.extend({_initContainer:function(){this._container=an("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=an("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){si(this._container),Li(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){nn.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),mi(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=an("path");t.options.className&&li(i,t.options.className),t.options.interactive&&li(i,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){si(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,K(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n="a"+e+","+(Math.max(Math.round(t._radiusY),1)||e)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+n+2*e+",0 "+n+2*-e+",0 ";this._setPath(t,s)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){ri(t._path)},_bringToBack:function(t){hi(t._path)}});function un(t){return Ot.svg||Ot.vml?new ln(t):null}Ot.vml&&ln.include(hn),Ui.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&on(t)||un(t)}});var cn=Ee.extend({initialize:function(t,i){Ee.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=Z(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});ln.create=an,ln.pointsToPath=K,Oe.geometryToLayer=Ie,Oe.coordsToLatLng=je,Oe.coordsToLatLngs=Ze,Oe.latLngToCoords=De,Oe.latLngsToCoords=Re,Oe.getFeature=Ne,Oe.asFeature=Fe,Ui.mergeOptions({boxZoom:!0});var fn=Xi.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(){Pi(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Li(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){si(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(),Vt(),bi(),this._startPoint=this._map.mouseEventToContainerPoint(t),Pi(document,{contextmenu:Zi,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=ni("div","leaflet-zoom-box",this._container),li(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new I(this._point,this._startPoint),e=i.getSize();mi(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(si(this._box),ui(this._container,"leaflet-crosshair")),qt(),yi(),Li(document,{contextmenu:Zi,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(n(this._resetState,this),0);var i=new j(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});Ui.addInitHook("addHandler","boxZoom",fn),Ui.mergeOptions({doubleClickZoom:!0});var dn=Xi.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,s=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(s):i.setZoomAround(t.containerPoint,s)}});Ui.addInitHook("addHandler","doubleClickZoom",dn),Ui.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var pn=Xi.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ie(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))}li(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ui(this._map._container,"leaflet-grab"),ui(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=Z(this._map.options.maxBounds);this._offsetLimit=B(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.x<i.min.x&&(t.x=this._viscousLimit(t.x,i.min.x)),t.y<i.min.y&&(t.y=this._viscousLimit(t.y,i.min.y)),t.x>i.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-i+e)%t+i-e,o=(n+i+e)%t-i-e,r=Math.abs(s+e)<Math.abs(o+e)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var i=this._map,e=i.options,n=!e.inertia||t.noInertia||this._times.length<2;if(i.fire("dragend",t),n)i.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=e.easeLinearity,r=s.multiplyBy(o/((this._lastTime-this._times[0])/1e3)),h=r.distanceTo([0,0]),a=Math.min(e.inertiaMaxSpeed,h),l=r.multiplyBy(a/h),u=a/(e.inertiaDeceleration*o),c=l.multiplyBy(-u/2).round();c.x||c.y?(c=i._limitOffset(c,i.options.maxBounds),M((function(){i.panBy(c,{duration:u,easeLinearity:o,noMoveStart:!0,animate:!0})}))):i.fire("moveend")}}});Ui.addInitHook("addHandler","dragging",pn),Ui.mergeOptions({keyboard:!0,keyboardPanDelta:80});var vn=Xi.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"),Pi(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(),Li(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,i=document.documentElement,e=t.scrollTop||i.scrollTop,n=t.scrollLeft||i.scrollLeft;this._map._container.focus(),window.scrollTo(n,e)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var i,e,n=this._panKeys={},s=this.keyCodes;for(i=0,e=s.left.length;i<e;i++)n[s.left[i]]=[-1*t,0];for(i=0,e=s.right.length;i<e;i++)n[s.right[i]]=[t,0];for(i=0,e=s.down.length;i<e;i++)n[s.down[i]]=[0,t];for(i=0,e=s.up.length;i<e;i++)n[s.up[i]]=[0,-1*t]},_setZoomDelta:function(t){var i,e,n=this._zoomKeys={},s=this.keyCodes;for(i=0,e=s.zoomIn.length;i<e;i++)n[s.zoomIn[i]]=t;for(i=0,e=s.zoomOut.length;i<e;i++)n[s.zoomOut[i]]=-t},_addHooks:function(){Pi(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Li(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var i,e=t.keyCode,n=this._map;if(e in this._panKeys)n._panAnim&&n._panAnim._inProgress||(i=this._panKeys[e],t.shiftKey&&(i=O(i).multiplyBy(3)),n.panBy(i),n.options.maxBounds&&n.panInsideBounds(n.options.maxBounds));else if(e in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[e]);else{if(27!==e||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Zi(t)}}});Ui.addInitHook("addHandler","keyboard",vn),Ui.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var mn=Xi.extend({addHooks:function(){Pi(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Li(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var i=Ni(t),e=this._map.options.wheelDebounceTime;this._delta+=i,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(e-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),s),Zi(t)},_performZoom:function(){var t=this._map,i=t.getZoom(),e=this._map.options.zoomSnap||0;t._stop();var n=4*Math.log(2/(1+Math.exp(-Math.abs(this._delta/(4*this._map.options.wheelPxPerZoomLevel)))))/Math.LN2,s=e?Math.ceil(n/e)*e:n,o=t._limitZoom(i+(this._delta>0?s:-s))-i;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(i+o):t.setZoomAround(this._lastMousePos,i+o))}});Ui.addInitHook("addHandler","scrollWheelZoom",mn),Ui.mergeOptions({tapHold:Ot.touchNative&&Ot.safari&&Ot.mobile,tapTolerance:15});var gn=Xi.extend({addHooks:function(){Pi(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Li(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new A(i.clientX,i.clientY),this._holdTimeout=setTimeout(n((function(){this._cancel(),this._isTapValid()&&(Pi(document,"touchend",ji),Pi(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))}),this),600),Pi(document,"touchend touchcancel contextmenu",this._cancel,this),Pi(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Li(document,"touchend",ji),Li(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Li(document,"touchend touchcancel contextmenu",this._cancel,this),Li(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new A(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var e=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});e._simulated=!0,i.target.dispatchEvent(e)}});Ui.addInitHook("addHandler","tapHold",gn),Ui.mergeOptions({touchZoom:Ot.touch,bounceAtZoomLimits:!0});var wn=Xi.extend({addHooks:function(){li(this._map._container,"leaflet-touch-zoom"),Pi(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ui(this._map._container,"leaflet-touch-zoom"),Li(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),Pi(document,"touchmove",this._onTouchMove,this),Pi(document,"touchend touchcancel",this._onTouchEnd,this),ji(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),s=i.mouseEventToContainerPoint(t.touches[1]),o=e.distanceTo(s)/this._startDist;if(this._zoom=i.getScaleZoom(o,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoom<i.getMinZoom()&&o<1||this._zoom>i.getMaxZoom()&&o>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var r=e._add(s)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===r.x&&0===r.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),z(this._animRequest);var h=n(i._move,i,this._center,this._zoom,{pinch:!0,round:!1});this._animRequest=M(h,this,!0),ji(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,z(this._animRequest),Li(document,"touchmove",this._onTouchMove,this),Li(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});Ui.addInitHook("addHandler","touchZoom",wn),Ui.BoxZoom=fn,Ui.DoubleClickZoom=dn,Ui.Drag=pn,Ui.Keyboard=vn,Ui.ScrollWheelZoom=mn,Ui.TapHold=gn,Ui.TouchZoom=wn,t.Bounds=I,t.Browser=Ot,t.CRS=F,t.Canvas=sn,t.Circle=Se,t.CircleMarker=Ce,t.Class=T,t.Control=Wi,t.DivIcon=Xe,t.DivOverlay=qe,t.DomEvent=Hi,t.DomUtil=zi,t.Draggable=ie,t.Evented=S,t.FeatureGroup=ke,t.GeoJSON=Oe,t.GridLayer=Qe,t.Handler=Xi,t.Icon=Me,t.ImageOverlay=We,t.LatLng=D,t.LatLngBounds=j,t.Layer=xe,t.LayerGroup=_e,t.LineUtil=fe,t.Map=Ui,t.Marker=Te,t.Mixin=Yi,t.Path=Le,t.Point=A,t.PolyUtil=pe,t.Polygon=Ee,t.Polyline=Ae,t.Popup=Je,t.PosAnimation=$i,t.Projection=ge,t.Rectangle=cn,t.Renderer=nn,t.SVG=ln,t.SVGOverlay=Ve,t.TileLayer=Ye,t.Tooltip=Ke,t.Transformation=W,t.Util=P,t.VideoOverlay=Ge,t.bind=n,t.bounds=B,t.canvas=on,t.circle=function(t,i,e){return new Se(t,i,e)},t.circleMarker=function(t,i){return new Ce(t,i)},t.control=Gi,t.divIcon=function(t){return new Xe(t)},t.extend=i,t.featureGroup=function(t,i){return new ke(t,i)},t.geoJSON=$e,t.geoJson=Ue,t.gridLayer=function(t){return new Qe(t)},t.icon=function(t){return new Me(t)},t.imageOverlay=function(t,i,e){return new We(t,i,e)},t.latLng=R,t.latLngBounds=Z,t.layerGroup=function(t,i){return new _e(t,i)},t.map=function(t,i){return new Ui(t,i)},t.marker=function(t,i){return new Te(t,i)},t.point=O,t.polygon=function(t,i){return new Ee(t,i)},t.polyline=function(t,i){return new Ae(t,i)},t.popup=function(t,i){return new Je(t,i)},t.rectangle=function(t,i){return new cn(t,i)},t.setOptions=f,t.stamp=o,t.svg=un,t.svgOverlay=function(t,i,e){return new Ve(t,i,e)},t.tileLayer=tn,t.tooltip=function(t,i){return new Ke(t,i)},t.transformation=G,t.version="1.8.0",t.videoOverlay=function(t,i,e){return new Ge(t,i,e)};var bn=window.L;t.noConflict=function(){return window.L=bn,this},window.L=t}((f={path:void 0,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}).exports),f.exports);const p=class{constructor(t){e(this,t),this.mapIsReady=!1,this.center="1, 1",this.zoom=10,this.colorTrekLine="#6b0030",this.colorDepartureIcon="#006b3b",this.colorArrivalIcon="#85003b",this.colorPrimary="#6b0030",this.colorPrimaryTint="#d2b2c0"}componentDidLoad(){this.map=d.map(this.element,{center:this.center.split(",").map(Number),zoom:this.zoom}),d.tileLayer(this.urlLayer,{maxZoom:19,attribution:this.attribution}).addTo(this.map),l.currentTrek?this.addTrek():l.currentTrek&&this.addTreks(),u("treks",(()=>{l.currentTrek?this.addTrek():l.treks&&this.addTreks()})),u("currentTrek",(()=>{l.currentTrek?(this.removeTreks(),this.addTrek()):(this.addTreks(),this.removeTrek())}))}addTreks(){var t;const i=[],e={type:"FeatureCollection",features:[]};for(const n of l.treks)i.push(n.departure_geom),e.features.push({type:"Feature",properties:{practice:null===(t=l.practices.find((t=>t.id===n.practice)))||void 0===t?void 0:t.pictogram},geometry:{type:"Point",coordinates:n.departure_geom}});if(i.length>0){const t=d.latLngBounds(i.map((t=>[t[1],t[0]])));this.currentBounds=t,this.map.fitBounds(this.currentBounds)}this.treksLayer=d.geoJSON(e,{pointToLayer:(t,i)=>d.marker(i,{icon:d.divIcon({className:"trek-marker",iconSize:48,html:t.properties.practice?`<img src=${t.properties.practice} />`:""}),autoPanOnFocus:!1})}).addTo(this.map),!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady)}removeTreks(){this.treksLayer&&(this.map.removeLayer(this.treksLayer),this.treksLayer=null)}addTrek(){this.trekLayer=d.geoJSON({type:"Feature",geometry:l.currentTrek.geometry,properties:{}},{style:()=>({color:this.colorTrekLine})}).addTo(this.map);const t=d.latLngBounds(l.currentTrek.geometry.coordinates.map((t=>[t[1],t[0]])));this.currentBounds=t,this.map.fitBounds(this.currentBounds);const i=[l.currentTrek.geometry.coordinates.at(0)[0],l.currentTrek.geometry.coordinates.at(0)[1]],e=[l.currentTrek.geometry.coordinates.at(-1)[0],l.currentTrek.geometry.coordinates.at(-1)[1]],n={type:"FeatureCollection",features:[{type:"Feature",properties:{type:"departure"},geometry:{type:"Point",coordinates:i}}]};i[0]===e[0]&&i[1]===e[1]||n.features.push({type:"Feature",properties:{type:"arrival"},geometry:{type:"Point",coordinates:e}}),this.departureArrivalLayer=d.geoJSON(n,{pointToLayer:(t,i)=>d.marker(i,{icon:d.divIcon({html:'<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M80,464V68.14a8,8,0,0,1,4-6.9C91.81,56.66,112.92,48,160,48c64,0,145,48,192,48a199.53,199.53,0,0,0,77.23-15.77A2,2,0,0,1,432,82.08V301.44a4,4,0,0,1-2.39,3.65C421.37,308.7,392.33,320,352,320c-48,0-128-32-192-32s-80,16-80,16" style=";fill:#ffffff;stroke:currentColor;stroke-linecap:round;stroke-miterlimit:10;stroke-width:32px"/></svg>',className:"departure"===t.properties.type?"departure-icon":"arrival-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:!1})}).addTo(this.map),!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady)}removeTrek(){this.trekLayer&&(this.map.removeLayer(this.trekLayer),this.trekLayer=null),this.departureArrivalLayer&&(this.map.removeLayer(this.departureArrivalLayer),this.departureArrivalLayer=null)}render(){return n(s,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint,"--color-departure-icon":this.colorDepartureIcon,"--color-arrival-icon":this.colorArrivalIcon}},!this.mapIsReady&&n("div",{class:"map-loader-container"},n("span",{class:"loader"})))}get element(){return o(this)}};function v(t){let i;return t<24?(i=`${Math.floor(t)}h`,t%1>0&&(i+=`${Math.round(t%1*60)}min`)):i=t/24+"j",i}function m(t){return`${Math.round(t/1e3)} km`}function g(t){return`${t} m`}p.style='.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;left:0;top:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:transparent}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{width:1600px;height:1600px;-webkit-transform-origin:0 0}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none !important;max-height:none !important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{max-width:none !important;max-height:none !important;width:auto;padding:0}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:rgba(51, 181, 229, 0.4)}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;box-sizing:border-box;z-index:800}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{position:relative;z-index:800;pointer-events:visiblePainted;pointer-events:auto}.leaflet-top,.leaflet-bottom{position:absolute;z-index:1000;pointer-events:none}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{-webkit-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform 0.25s cubic-bezier(0,0,0.25,1);-moz-transition:-moz-transform 0.25s cubic-bezier(0,0,0.25,1);transition:transform 0.25s cubic-bezier(0,0,0.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{-webkit-transition:none;-moz-transition:none;transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{background:#ddd;outline-offset:1px}.leaflet-container a{color:#0078A8}.leaflet-zoom-box{border:2px dotted #38f;background:rgba(255,255,255,0.5)}.leaflet-container{font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;font-size:12px;font-size:0.75rem;line-height:1.5}.leaflet-bar{box-shadow:0 1px 5px rgba(0,0,0,0.65);border-radius:4px}.leaflet-bar a{background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;display:block;text-align:center;text-decoration:none;color:black}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50% 50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom-left-radius:4px;border-bottom-right-radius:4px;border-bottom:none}.leaflet-bar a.leaflet-disabled{cursor:default;background-color:#f4f4f4;color:#bbb}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{font:bold 18px \'Lucida Console\', Monaco, monospace;text-indent:1px}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{box-shadow:0 1px 5px rgba(0,0,0,0.4);background:#fff;border-radius:5px}.leaflet-control-layers-toggle{background-image:url(images/layers.png);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(images/layers-2x.png);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{padding:6px 10px 6px 6px;color:#333;background:#fff}.leaflet-control-layers-scrollbar{overflow-y:scroll;overflow-x:hidden;padding-right:5px}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{display:block;font-size:13px;font-size:1.08333em}.leaflet-control-layers-separator{height:0;border-top:1px solid #ddd;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(images/marker-icon.png)}.leaflet-container .leaflet-control-attribution{background:#fff;background:rgba(255, 255, 255, 0.8);margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{padding:0 5px;color:#333;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-control-attribution svg{display:inline !important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{border:2px solid #777;border-top:none;line-height:1.1;padding:2px 5px 1px;white-space:nowrap;overflow:hidden;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff;background:rgba(255, 255, 255, 0.5)}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{border:2px solid rgba(0,0,0,0.2);background-clip:padding-box}.leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}.leaflet-popup-content-wrapper{padding:1px;text-align:left;border-radius:12px}.leaflet-popup-content{margin:13px 24px 13px 20px;line-height:1.3;font-size:13px;font-size:1.08333em;min-height:1px}.leaflet-popup-content p{margin:17px 0;margin:1.3em 0}.leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;margin-top:-1px;margin-left:-20px;overflow:hidden;pointer-events:none}.leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;pointer-events:auto;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{background:white;color:#333;box-shadow:0 3px 14px rgba(0,0,0,0.4)}.leaflet-container a.leaflet-popup-close-button{position:absolute;top:0;right:0;border:none;text-align:center;width:24px;height:24px;font:16px/24px Tahoma, Verdana, sans-serif;color:#757575;text-decoration:none;background:transparent}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto;border-bottom:1px solid #ddd;border-top:1px solid #ddd}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{width:24px;margin:0 auto;-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";filter:progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{position:absolute;padding:6px;background-color:#fff;border:1px solid #fff;border-radius:3px;color:#222;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;box-shadow:0 1px 3px rgba(0,0,0,0.4)}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{position:absolute;pointer-events:none;border:6px solid transparent;background:transparent;content:""}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{left:50%;margin-left:-6px}.leaflet-tooltip-top:before{bottom:0;margin-bottom:-12px;border-top-color:#fff}.leaflet-tooltip-bottom:before{top:0;margin-top:-12px;margin-left:-6px;border-bottom-color:#fff}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{top:50%;margin-top:-6px}.leaflet-tooltip-left:before{right:0;margin-right:-12px;border-left-color:#fff}.leaflet-tooltip-right:before{left:0;margin-left:-12px;border-right-color:#fff}@media print{.leaflet-control{-webkit-print-color-adjust:exact;color-adjust:exact}}grw-map{display:block;height:100%;max-height:100vh}.departure-icon svg,.arrival-icon svg{width:48px;height:48px}.departure-icon svg path,.arrival-icon svg path{fill:currentColor;stroke:currentColor}.departure-icon{color:var(--color-departure-icon)}.arrival-icon{color:var(--color-arrival-icon)}.trek-marker{background-color:var(--color-primary);border-radius:50%;display:flex;justify-content:center;align-items:center}.trek-marker img{width:36px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background:rgba(255, 255, 255, 0.5);display:flex;justify-content:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-tint);border-bottom-color:var(--color-primary);border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';const w='<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="352 144 464 144 464 256" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><path d="M48,368,169.37,246.63a32,32,0,0,1,45.26,0l50.74,50.74a32,32,0,0,0,45.26,0L448,160" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>',b='<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><path d="M145.61,464H366.39c19.8,0,35.55-16.29,33.42-35.06C386.06,308,304,310,304,256s83.11-51,95.8-172.94c2-18.78-13.61-35.06-33.41-35.06H145.61c-19.8,0-35.37,16.28-33.41,35.06C124.89,205,208,201,208,256s-82.06,52-95.8,172.94C110.06,447.71,125.81,464,145.61,464Z" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><path d="M343.3,432H169.13c-15.6,0-20-18-9.06-29.16C186.55,376,240,356.78,240,326V224c0-19.85-38-35-61.51-67.2-3.88-5.31-3.49-12.8,6.37-12.8H327.59c8.41,0,10.23,7.43,6.4,12.75C310.82,189,272,204.05,272,224V326c0,30.53,55.71,47,80.4,76.87C362.35,414.91,358.87,432,343.3,432Z"/></svg>',y='<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512"><polyline points="304 96 416 96 416 208" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><line x1="405.77" y1="106.2" x2="111.98" y2="400.02" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/><polyline points="208 416 96 416 96 304" style="fill:none;stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px"/></svg>',x=class{constructor(t){e(this,t),this.trekCardPress=r(this,"trekCardPress",7),this.colorPrimary="#6b0030",this.colorPrimaryTint="#d2b2c0"}componentWillLoad(){this.currentTrek=this.trek?this.trek:l.currentTrek,this.currentTrek&&(this.difficulty=l.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=l.routes.find((t=>t.id===this.currentTrek.route)),this.practice=l.practices.find((t=>t.id===this.currentTrek.practice))),u("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:l.currentTrek,this.currentTrek&&(this.difficulty=l.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=l.routes.find((t=>t.id===this.currentTrek.route)),this.practice=l.practices.find((t=>t.id===this.currentTrek.practice)))}))}render(){var t,i,e,o,r,h,a,l;return n(s,{onClick:()=>this.trekCardPress.emit(this.currentTrek.id),style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&n("div",{class:"trek-card-container"},this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].url&&n("img",{class:"image",src:`${this.currentTrek.attachments[0].url}.400x0_q85.${this.currentTrek.attachments[0].url.slice(-3).toLowerCase()}`,loading:"lazy"}),n("div",{class:"sub-container"},n("div",{class:"name"},null===(t=this.currentTrek)||void 0===t?void 0:t.name),n("div",{class:"description",innerHTML:null===(i=this.currentTrek)||void 0===i?void 0:i.description_teaser}),n("div",{class:"icons-labels-container"},n("div",{class:"row"},n("div",{class:"icon-label difficulty"},(null===(e=this.difficulty)||void 0===e?void 0:e.pictogram)&&n("img",{src:this.difficulty.pictogram}),null===(o=this.difficulty)||void 0===o?void 0:o.label),n("div",{class:"icon-label duration"},n("div",{class:"svg-icon",innerHTML:b}),v(this.currentTrek.duration)),n("div",{class:"icon-label route"},(null===(r=this.route)||void 0===r?void 0:r.pictogram)&&n("img",{src:this.route.pictogram}),null===(h=this.route)||void 0===h?void 0:h.route)),n("div",{class:"row"},n("div",{class:"icon-label length"},n("div",{class:"svg-icon",innerHTML:y}),m(this.currentTrek.length_2d)),n("div",{class:"icon-label ascent"},n("div",{class:"svg-icon",innerHTML:w}),g(this.currentTrek.ascent)),n("div",{class:"icon-label practice"},(null===(a=this.practice)||void 0===a?void 0:a.pictogram)&&n("img",{src:this.practice.pictogram}),null===(l=this.practice)||void 0===l?void 0:l.name))))))}};x.style=".trek-card-container{width:350px;height:auto;border-radius:8px;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25);cursor:pointer}.trek-card-container .image{width:100%;height:auto}.trek-card-container .sub-container{padding:12px}.trek-card-container .sub-container .name{color:var(--color-primary);font-size:24px;font-weight:bold;margin-bottom:12px}.trek-card-container .sub-container .description{max-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px}.trek-card-container .sub-container .description p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0}.trek-card-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-card-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-card-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:12px}.trek-card-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-card-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 4px}.trek-card-container .sub-container .icons-labels-container .row .icon-label img,.trek-card-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-card-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}";const _=class{constructor(t){e(this,t),this.colorPrimary="#6b0030",this.colorPrimaryTint="#d2b2c0"}componentWillLoad(){this.currentTrek=this.trek?this.trek:l.currentTrek,this.currentTrek&&(this.difficulty=l.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=l.routes.find((t=>t.id===this.currentTrek.route)),this.practice=l.practices.find((t=>t.id===this.currentTrek.practice))),u("currentTrek",(()=>{this.currentTrek=this.trek?this.trek:l.currentTrek,this.currentTrek&&(this.difficulty=l.difficulties.find((t=>t.id===this.currentTrek.difficulty)),this.route=l.routes.find((t=>t.id===this.currentTrek.route)),this.practice=l.practices.find((t=>t.id===this.currentTrek.practice)))}))}render(){var t,i,e,o,r,h,a;return n(s,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.currentTrek&&n("div",{class:"trek-detail-container"},n("div",{class:"name"},this.currentTrek.name),this.currentTrek.attachments&&this.currentTrek.attachments[0]&&n("img",{class:"image",src:this.currentTrek.attachments[0].url,loading:"lazy"}),n("div",{class:"sub-container"},n("div",{class:"icons-labels-container"},n("div",{class:"row"},n("div",{class:"icon-label difficulty"},(null===(t=this.difficulty)||void 0===t?void 0:t.pictogram)&&n("img",{src:this.difficulty.pictogram}),null===(i=this.difficulty)||void 0===i?void 0:i.label),n("div",{class:"icon-label duration"},n("div",{class:"svg-icon",innerHTML:b}),v(null===(e=this.currentTrek)||void 0===e?void 0:e.duration)),n("div",{class:"icon-label route"},(null===(o=this.route)||void 0===o?void 0:o.pictogram)&&n("img",{src:this.route.pictogram}),null===(r=this.route)||void 0===r?void 0:r.route)),n("div",{class:"row"},n("div",{class:"icon-label length"},n("div",{class:"svg-icon",innerHTML:y}),m(this.currentTrek.length_2d)),n("div",{class:"icon-label ascent"},n("div",{class:"svg-icon",innerHTML:w}),g(this.currentTrek.ascent)),n("div",{class:"icon-label practice"},(null===(h=this.practice)||void 0===h?void 0:h.pictogram)&&n("img",{src:this.practice.pictogram}),null===(a=this.practice)||void 0===a?void 0:a.name)))),n("div",{class:"description",innerHTML:this.currentTrek.description?this.currentTrek.description:this.currentTrek.description_teaser})))}};_.style=".trek-detail-container{display:flex;flex-direction:column;height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-primary);font-size:48px;font-weight:bold;padding:24px}.trek-detail-container .image{align-self:center;width:100%;max-width:700px;height:auto;box-shadow:4px 8px 24px rgba(0, 0, 0, 0.25)}.trek-detail-container .sub-container{padding:24px}.trek-detail-container .sub-container .icons-labels-container{display:flex;justify-content:flex-start;align-items:center;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:flex;justify-content:space-between;align-items:center;width:100%}.trek-detail-container .sub-container .icons-labels-container .row:not(:last-child){margin-bottom:24px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label{display:flex;justify-content:center;align-items:center;width:33.3333333333%}.trek-detail-container .sub-container .icons-labels-container .row .icon-label:nth-child(2){margin:0px 8px}.trek-detail-container .sub-container .icons-labels-container .row .icon-label img,.trek-detail-container .sub-container .icons-labels-container .row .icon-label .svg-icon svg{width:24px;height:auto;margin-right:24px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary)}.trek-detail-container .description{padding:0px 24px 24px 24px}";const k=class{constructor(t){e(this,t),this.language="fr"}componentWillLoad(){return l.api=this.api,Promise.all([fetch(`${this.api}trek_difficulty/?language=${this.language}`),fetch(`${this.api}trek_route/?language=${this.language}`),fetch(`${this.api}trek_practice/?language=${this.language}`),fetch(`${this.api}trek/${this.trekId}/?language=${this.language}&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,route,geometry`)]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,e,n])=>{l.difficulties=t.results,l.routes=i.results,l.practices=e.results,l.currentTrek=n}))}disconnectedCallback(){l.currentTrek=null}render(){return n(s,null)}},M=class{constructor(t){e(this,t),this.treksToDisplay=[],this.colorPrimary="#6b0030",this.colorPrimaryTint="#d2b2c0",this.handleInfiniteScrollBind=this.handleInfiniteScroll.bind(this),this.step=10}componentWillLoad(){this.element.addEventListener("scroll",this.handleInfiniteScrollBind),u("treks",(()=>{this.treksToDisplay=l.treks.slice(0,this.step)}))}handleInfiniteScroll(t){t.composedPath()[0].scrollTop+t.composedPath()[0].scrollHeight/2>=t.composedPath()[0].scrollHeight&&(this.treksToDisplay.length<l.treks.length?this.treksToDisplay=l.treks.slice(0,this.treksToDisplay.length+this.step>=l.treks.length?l.treks.length:this.treksToDisplay.length+this.step):this.element.removeEventListener("scroll",this.handleInfiniteScrollBind))}render(){return n(s,{style:{"--color-primary":this.colorPrimary,"--color-primary-tint":this.colorPrimaryTint}},this.treksToDisplay.map((t=>n("grw-trek-card",{trek:t,"color-primary":this.colorPrimary,"color-primary-tint":this.colorPrimaryTint}))))}get element(){return o(this)}};M.style=":host{display:flex;flex-wrap:wrap;justify-content:space-around;height:100%;max-height:100vh;overflow-y:auto}grw-trek-card{margin:6px}";const z=class{constructor(t){e(this,t),this.language="fr"}componentWillLoad(){l.api=this.api;let t=`${this.api}trek/?language=${this.language}`;return this.inBbox&&(t+=`&in_bbox=${this.inBbox}`),this.cities&&(t+=`&cities=${this.cities}`),this.districts&&(t+=`&districts=${this.districts}`),this.structures&&(t+=`&structures=${this.structures}`),this.themes&&(t+=`&themes=${this.themes}`),this.portals&&(t+=`&portals=${this.portals}`),this.routes&&(t+=`&routes=${this.routes}`),this.practices&&(t+=`&practices=${this.practices}`),t+="&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,route,departure_geom&page_size=999",Promise.all([fetch(`${this.api}trek_difficulty/?language=${this.language}`),fetch(`${this.api}trek_route/?language=${this.language}`),fetch(`${this.api}trek_practice/?language=${this.language}`),fetch(t)]).then((t=>Promise.all(t.map((t=>t.json()))))).then((([t,i,e,n])=>{l.difficulties=t.results,l.routes=i.results,l.practices=e.results,l.treks=n.results}))}render(){return n(s,null)}};export{c as grw_app,p as grw_map,x as grw_trek_card,_ as grw_trek_detail,k as grw_trek_provider,M as grw_treks_list,z as grw_treks_provider}
|
|
@@ -1,15 +1,34 @@
|
|
|
1
1
|
export declare class GrwApp {
|
|
2
|
+
element: HTMLElement;
|
|
2
3
|
showTrek: boolean;
|
|
3
4
|
showMap: boolean;
|
|
5
|
+
isLargeView: boolean;
|
|
4
6
|
currentTrekId: number;
|
|
5
7
|
api: string;
|
|
8
|
+
inBbox: string;
|
|
9
|
+
cities: string;
|
|
10
|
+
districts: string;
|
|
11
|
+
structures: string;
|
|
12
|
+
themes: string;
|
|
6
13
|
portals: string;
|
|
14
|
+
routes: string;
|
|
15
|
+
practices: string;
|
|
7
16
|
appName: string;
|
|
17
|
+
urlLayer: string;
|
|
18
|
+
center: string;
|
|
19
|
+
zoom: any;
|
|
20
|
+
attribution: string;
|
|
8
21
|
colorPrimary: string;
|
|
9
22
|
colorPrimaryTint: string;
|
|
23
|
+
colorTrekLine: string;
|
|
24
|
+
colorDepartureIcon: string;
|
|
25
|
+
colorArrivalIcon: string;
|
|
26
|
+
largeViewSize: number;
|
|
10
27
|
onTrekCardPress(event: CustomEvent<number>): void;
|
|
11
|
-
onWindowResize(
|
|
28
|
+
onWindowResize(): void;
|
|
29
|
+
watchPropHandler(): void;
|
|
30
|
+
componentDidLoad(): void;
|
|
12
31
|
onTrekDetailsClose(): void;
|
|
13
|
-
|
|
32
|
+
handleView(): void;
|
|
14
33
|
render(): any;
|
|
15
34
|
}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import L from 'leaflet';
|
|
2
2
|
export declare class GrwMap {
|
|
3
3
|
element: HTMLElement;
|
|
4
|
+
mapIsReady: boolean;
|
|
5
|
+
urlLayer: string;
|
|
6
|
+
attribution: string;
|
|
7
|
+
center: string;
|
|
8
|
+
zoom: number;
|
|
4
9
|
colorTrekLine: string;
|
|
5
10
|
colorDepartureIcon: string;
|
|
6
11
|
colorArrivalIcon: string;
|
|
12
|
+
colorPrimary: string;
|
|
13
|
+
colorPrimaryTint: string;
|
|
7
14
|
map: L.Map;
|
|
15
|
+
currentBounds: L.LatLngBoundsExpression;
|
|
8
16
|
treksLayer: L.GeoJSON<any>;
|
|
9
17
|
trekLayer: L.GeoJSON<any>;
|
|
10
18
|
departureArrivalLayer: L.GeoJSON<any>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { Difficulty, Practice, Route, Trek } from 'types/types';
|
|
3
3
|
export declare class GrwTrekCard {
|
|
4
|
-
trek: Trek;
|
|
5
4
|
trekCardPress: EventEmitter<number>;
|
|
5
|
+
trek: Trek;
|
|
6
|
+
colorPrimary: string;
|
|
7
|
+
colorPrimaryTint: string;
|
|
6
8
|
currentTrek: Trek;
|
|
7
9
|
difficulty: Difficulty;
|
|
8
10
|
route: Route;
|
|
@@ -2,6 +2,8 @@ import { Treks } from 'types/types';
|
|
|
2
2
|
export declare class GrwTreksList {
|
|
3
3
|
element: HTMLElement;
|
|
4
4
|
treksToDisplay: Treks;
|
|
5
|
+
colorPrimary: string;
|
|
6
|
+
colorPrimaryTint: string;
|
|
5
7
|
handleInfiniteScrollBind: (event: any) => void;
|
|
6
8
|
step: number;
|
|
7
9
|
componentWillLoad(): void;
|