@geotrekce/geotrek-rando-widget 0.3.2 → 0.3.3
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/grw-filter_7.cjs.entry.js +2 -2
- package/dist/cjs/grw-filter_7.cjs.entry.js.br +0 -0
- package/dist/cjs/grw-filter_7.cjs.entry.js.gz +0 -0
- package/dist/cjs/grw-filter_7.cjs.entry.js.map +1 -1
- package/dist/collection/components/grw-map/grw-map.js +2 -2
- package/dist/collection/components/grw-map/grw-map.js.br +0 -0
- package/dist/collection/components/grw-map/grw-map.js.gz +0 -0
- package/dist/collection/components/grw-map/grw-map.js.map +1 -1
- package/dist/esm/grw-filter_7.entry.js +2 -2
- package/dist/esm/grw-filter_7.entry.js.br +0 -0
- package/dist/esm/grw-filter_7.entry.js.gz +0 -0
- package/dist/esm/grw-filter_7.entry.js.map +1 -1
- package/dist/esm-es5/grw-filter_7.entry.js +1 -1
- package/dist/esm-es5/grw-filter_7.entry.js.br +0 -0
- package/dist/esm-es5/grw-filter_7.entry.js.gz +0 -0
- package/dist/esm-es5/grw-filter_7.entry.js.map +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js +1 -1
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.br +0 -0
- package/dist/geotrek-rando-widget/geotrek-rando-widget.esm.js.gz +0 -0
- package/dist/geotrek-rando-widget/p-148f5f1d.system.js +1 -1
- package/dist/geotrek-rando-widget/p-148f5f1d.system.js.br +0 -0
- package/dist/geotrek-rando-widget/p-148f5f1d.system.js.gz +0 -0
- package/dist/geotrek-rando-widget/{p-d14b4797.system.entry.js → p-b7b00edf.system.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-b7b00edf.system.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/{p-d14b4797.system.entry.js.gz → p-b7b00edf.system.entry.js.gz} +0 -0
- package/dist/geotrek-rando-widget/{p-d14b4797.system.entry.js.map → p-b7b00edf.system.entry.js.map} +1 -1
- package/dist/geotrek-rando-widget/{p-15e3da4d.entry.js → p-f0811cf9.entry.js} +2 -2
- package/dist/geotrek-rando-widget/p-f0811cf9.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/{p-15e3da4d.entry.js.gz → p-f0811cf9.entry.js.gz} +0 -0
- package/dist/geotrek-rando-widget/{p-15e3da4d.entry.js.map → p-f0811cf9.entry.js.map} +1 -1
- package/package.json +1 -1
- package/dist/geotrek-rando-widget/p-15e3da4d.entry.js.br +0 -0
- package/dist/geotrek-rando-widget/p-d14b4797.system.entry.js.br +0 -0
|
@@ -10,5 +10,5 @@ var __awaiter=this&&this.__awaiter||function(t,e,i,n){function o(t){return t ins
|
|
|
10
10
|
This file is part of the leaflet locate control. It is licensed under the MIT license.
|
|
11
11
|
You can find the project at: https://github.com/domoritz/leaflet-locatecontrol
|
|
12
12
|
*/
|
|
13
|
-
(function(e,i){{if(typeof i!=="undefined"&&i.L){t.exports=e(L)}else{t.exports=e(leafletSrc)}}if(typeof i!=="undefined"&&i.L){i.L.Control.Locate=e(L)}})((function(t){var e=function(e,i,n){n=n.split(" ");n.forEach((function(n){t.DomUtil[e].call(this,i,n)}))};var i=function(t,i){return e("addClass",t,i)};var n=function(t,i){return e("removeClass",t,i)};var o=t.Marker.extend({initialize:function(e,i){t.Util.setOptions(this,i);this._latlng=e;this.createIcon()},createIcon:function(){var e=this.options;var i="";if(e.color!==undefined){i+="stroke:".concat(e.color,";")}if(e.weight!==undefined){i+="stroke-width:".concat(e.weight,";")}if(e.fillColor!==undefined){i+="fill:".concat(e.fillColor,";")}if(e.fillOpacity!==undefined){i+="fill-opacity:".concat(e.fillOpacity,";")}if(e.opacity!==undefined){i+="opacity:".concat(e.opacity,";")}var n=this._getIconSVG(e,i);this._locationIcon=t.divIcon({className:n.className,html:n.svg,iconSize:[n.w,n.h]});this.setIcon(this._locationIcon)},_getIconSVG:function(t,e){var i=t.radius;var n=t.weight;var o=i+n;var r=o*2;var a='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(r,'" height="').concat(r,'" version="1.1" viewBox="-').concat(o," -").concat(o," ").concat(r," ").concat(r,'">')+'<circle r="'+i+'" style="'+e+'" />'+"</svg>";return{className:"leaflet-control-locate-location",svg:a,w:r,h:r}},setStyle:function(e){t.Util.setOptions(this,e);this.createIcon()}});var r=o.extend({initialize:function(e,i,n){t.Util.setOptions(this,n);this._latlng=e;this._heading=i;this.createIcon()},setHeading:function(t){this._heading=t},_getIconSVG:function(t,e){var i=t.radius;var n=t.width+t.weight;var o=(i+t.depth+t.weight)*2;var r="M0,0 l".concat(t.width/2,",").concat(t.depth," l-").concat(n,",0 z");var a="transform: rotate(".concat(this._heading,"deg)");var s='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(n,'" height="').concat(o,'" version="1.1" viewBox="-').concat(n/2," 0 ").concat(n," ").concat(o,'" style="').concat(a,'">')+'<path d="'+r+'" style="'+e+'" />'+"</svg>";return{className:"leaflet-control-locate-heading",svg:s,w:n,h:o}}});var a=t.Control.extend({options:{position:"topleft",layer:undefined,setView:"untilPanOrZoom",keepCurrentZoomLevel:false,initialZoomLevel:false,getLocationBounds:function(t){return t.bounds},flyTo:false,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:false,cacheLocation:true,drawCircle:true,drawMarker:true,showCompass:true,markerClass:o,compassClass:r,circleStyle:{className:"leaflet-control-locate-circle",color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:0},markerStyle:{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9},compassStyle:{fillColor:"#2A93EE",fillOpacity:1,weight:0,color:"#fff",opacity:1,radius:9,width:9,depth:6},followCircleStyle:{},followMarkerStyle:{},followCompassStyle:{},icon:"leaflet-control-locate-location-arrow",iconLoading:"leaflet-control-locate-spinner",iconElementTag:"span",textElementTag:"small",circlePadding:[0,0],metric:true,createButtonCallback:function(e,i){var n=t.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",e);n.title=i.strings.title;n.href="#";n.setAttribute("role","button");var o=t.DomUtil.create(i.iconElementTag,i.icon,n);if(i.strings.text!==undefined){var r=t.DomUtil.create(i.textElementTag,"leaflet-locate-text",n);r.textContent=i.strings.text;n.classList.add("leaflet-locate-text-active");n.parentNode.style.display="flex";if(i.icon.length>0){o.classList.add("leaflet-locate-icon")}}return{link:n,icon:o}},onLocationError:function(t,e){alert(t.message)},onLocationOutsideMapBounds:function(t){t.stop();alert(t.options.strings.outsideMapBoundsMsg)},showPopup:true,strings:{title:"Show me where I am",metersUnit:"meters",feetUnit:"feet",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:Infinity,watch:true,setView:false}},initialize:function(e){for(var i in e){if(typeof this.options[i]==="object"){t.extend(this.options[i],e[i])}else{this.options[i]=e[i]}}this.options.followMarkerStyle=t.extend({},this.options.markerStyle,this.options.followMarkerStyle);this.options.followCircleStyle=t.extend({},this.options.circleStyle,this.options.followCircleStyle);this.options.followCompassStyle=t.extend({},this.options.compassStyle,this.options.followCompassStyle)},onAdd:function(e){var i=t.DomUtil.create("div","leaflet-control-locate leaflet-bar leaflet-control");this._container=i;this._map=e;this._layer=this.options.layer||new t.LayerGroup;this._layer.addTo(e);this._event=undefined;this._compassHeading=null;this._prevBounds=null;var n=this.options.createButtonCallback(i,this.options);this._link=n.link;this._icon=n.icon;t.DomEvent.on(this._link,"click",(function(e){t.DomEvent.stopPropagation(e);t.DomEvent.preventDefault(e);this._onClick()}),this).on(this._link,"dblclick",t.DomEvent.stopPropagation);this._resetVariables();this._map.on("unload",this._unload,this);return i},_onClick:function(){this._justClicked=true;var t=this._isFollowing();this._userPanned=false;this._userZoomed=false;if(this._active&&!this._event){this.stop()}else if(this._active){var e=this.options.clickBehavior;var i=e.outOfView;if(this._map.getBounds().contains(this._event.latlng)){i=t?e.inView:e.inViewNotFollowing}if(e[i]){i=e[i]}switch(i){case"setView":this.setView();break;case"stop":this.stop();if(this.options.returnToPrevBounds){var n=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds;n.bind(this._map)(this._prevBounds)}break}}else{if(this.options.returnToPrevBounds){this._prevBounds=this._map.getBounds()}this.start()}this._updateContainerStyle()},start:function(){this._activate();if(this._event){this._drawMarker(this._map);if(this.options.setView){this.setView()}}this._updateContainerStyle()},stop:function(){this._deactivate();this._cleanClasses();this._resetVariables();this._removeMarker()},stopFollowing:function(){this._userPanned=true;this._updateContainerStyle();this._drawMarker()},_activate:function(){if(this._active||!this._map){return}this._map.locate(this.options.locateOptions);this._map.fire("locateactivate",this);this._active=true;this._map.on("locationfound",this._onLocationFound,this);this._map.on("locationerror",this._onLocationError,this);this._map.on("dragstart",this._onDrag,this);this._map.on("zoomstart",this._onZoom,this);this._map.on("zoomend",this._onZoomEnd,this);if(this.options.showCompass){var e="ondeviceorientationabsolute"in window;if(e||"ondeviceorientation"in window){var i=this;var n=function(){t.DomEvent.on(window,e?"deviceorientationabsolute":"deviceorientation",i._onDeviceOrientation,i)};if(DeviceOrientationEvent&&typeof DeviceOrientationEvent.requestPermission==="function"){DeviceOrientationEvent.requestPermission().then((function(t){if(t==="granted"){n()}}))}else{n()}}}},_deactivate:function(){if(!this._active||!this._map){return}this._map.stopLocate();this._map.fire("locatedeactivate",this);this._active=false;if(!this.options.cacheLocation){this._event=undefined}this._map.off("locationfound",this._onLocationFound,this);this._map.off("locationerror",this._onLocationError,this);this._map.off("dragstart",this._onDrag,this);this._map.off("zoomstart",this._onZoom,this);this._map.off("zoomend",this._onZoomEnd,this);if(this.options.showCompass){this._compassHeading=null;if("ondeviceorientationabsolute"in window){t.DomEvent.off(window,"deviceorientationabsolute",this._onDeviceOrientation,this)}else if("ondeviceorientation"in window){t.DomEvent.off(window,"deviceorientation",this._onDeviceOrientation,this)}}},setView:function(){this._drawMarker();if(this._isOutsideMapBounds()){this._event=undefined;this.options.onLocationOutsideMapBounds(this)}else{if(this._justClicked&&this.options.initialZoomLevel!==false){var e=this.options.flyTo?this._map.flyTo:this._map.setView;e.bind(this._map)([this._event.latitude,this._event.longitude],this.options.initialZoomLevel)}else if(this.options.keepCurrentZoomLevel){var e=this.options.flyTo?this._map.flyTo:this._map.panTo;e.bind(this._map)([this._event.latitude,this._event.longitude])}else{var e=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds;this._ignoreEvent=true;e.bind(this._map)(this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.initialZoomLevel||this.options.locateOptions.maxZoom});t.Util.requestAnimFrame((function(){this._ignoreEvent=false}),this)}}},_drawCompass:function(){if(!this._event){return}var t=this._event.latlng;if(this.options.showCompass&&t&&this._compassHeading!==null){var e=this._isFollowing()?this.options.followCompassStyle:this.options.compassStyle;if(!this._compass){this._compass=new this.options.compassClass(t,this._compassHeading,e).addTo(this._layer)}else{this._compass.setLatLng(t);this._compass.setHeading(this._compassHeading);if(this._compass.setStyle){this._compass.setStyle(e)}}}if(this._compass&&(!this.options.showCompass||this._compassHeading===null)){this._compass.removeFrom(this._layer);this._compass=null}},_drawMarker:function(){if(this._event.accuracy===undefined){this._event.accuracy=0}var e=this._event.accuracy;var i=this._event.latlng;if(this.options.drawCircle){var n=this._isFollowing()?this.options.followCircleStyle:this.options.circleStyle;if(!this._circle){this._circle=t.circle(i,e,n).addTo(this._layer)}else{this._circle.setLatLng(i).setRadius(e).setStyle(n)}}var o;var r;if(this.options.metric){o=e.toFixed(0);r=this.options.strings.metersUnit}else{o=(e*3.2808399).toFixed(0);r=this.options.strings.feetUnit}if(this.options.drawMarker){var a=this._isFollowing()?this.options.followMarkerStyle:this.options.markerStyle;if(!this._marker){this._marker=new this.options.markerClass(i,a).addTo(this._layer)}else{this._marker.setLatLng(i);if(this._marker.setStyle){this._marker.setStyle(a)}}}this._drawCompass();var s=this.options.strings.popup;function l(){if(typeof s==="string"){return t.Util.template(s,{distance:o,unit:r})}else if(typeof s==="function"){return s({distance:o,unit:r})}else{return s}}if(this.options.showPopup&&s&&this._marker){this._marker.bindPopup(l())._popup.setLatLng(i)}if(this.options.showPopup&&s&&this._compass){this._compass.bindPopup(l())._popup.setLatLng(i)}},_removeMarker:function(){this._layer.clearLayers();this._marker=undefined;this._circle=undefined},_unload:function(){this.stop();this._map.off("unload",this._unload,this)},_setCompassHeading:function(e){if(!isNaN(parseFloat(e))&&isFinite(e)){e=Math.round(e);this._compassHeading=e;t.Util.requestAnimFrame(this._drawCompass,this)}else{this._compassHeading=null}},_onCompassNeedsCalibration:function(){this._setCompassHeading()},_onDeviceOrientation:function(t){if(!this._active){return}if(t.webkitCompassHeading){this._setCompassHeading(t.webkitCompassHeading)}else if(t.absolute&&t.alpha){this._setCompassHeading(360-t.alpha)}},_onLocationError:function(t){if(t.code==3&&this.options.locateOptions.watch){return}this.stop();this.options.onLocationError(t,this)},_onLocationFound:function(t){if(this._event&&this._event.latlng.lat===t.latlng.lat&&this._event.latlng.lng===t.latlng.lng&&this._event.accuracy===t.accuracy){return}if(!this._active){return}this._event=t;this._drawMarker();this._updateContainerStyle();switch(this.options.setView){case"once":if(this._justClicked){this.setView()}break;case"untilPan":if(!this._userPanned){this.setView()}break;case"untilPanOrZoom":if(!this._userPanned&&!this._userZoomed){this.setView()}break;case"always":this.setView();break}this._justClicked=false},_onDrag:function(){if(this._event&&!this._ignoreEvent){this._userPanned=true;this._updateContainerStyle();this._drawMarker()}},_onZoom:function(){if(this._event&&!this._ignoreEvent){this._userZoomed=true;this._updateContainerStyle();this._drawMarker()}},_onZoomEnd:function(){if(this._event){this._drawCompass()}if(this._event&&!this._ignoreEvent){if(this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())){this._userPanned=true;this._updateContainerStyle();this._drawMarker()}}},_isFollowing:function(){if(!this._active){return false}if(this.options.setView==="always"){return true}else if(this.options.setView==="untilPan"){return!this._userPanned}else if(this.options.setView==="untilPanOrZoom"){return!this._userPanned&&!this._userZoomed}},_isOutsideMapBounds:function(){if(this._event===undefined){return false}return this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng)},_updateContainerStyle:function(){if(!this._container){return}if(this._active&&!this._event){this._setClasses("requesting")}else if(this._isFollowing()){this._setClasses("following")}else if(this._active){this._setClasses("active")}else{this._cleanClasses()}},_setClasses:function(t){if(t=="requesting"){n(this._container,"active following");i(this._container,"requesting");n(this._icon,this.options.icon);i(this._icon,this.options.iconLoading)}else if(t=="active"){n(this._container,"requesting following");i(this._container,"active");n(this._icon,this.options.iconLoading);i(this._icon,this.options.icon)}else if(t=="following"){n(this._container,"requesting");i(this._container,"active following");n(this._icon,this.options.iconLoading);i(this._icon,this.options.icon)}},_cleanClasses:function(){t.DomUtil.removeClass(this._container,"requesting");t.DomUtil.removeClass(this._container,"active");t.DomUtil.removeClass(this._container,"following");n(this._icon,this.options.iconLoading);i(this._icon,this.options.icon)},_resetVariables:function(){this._active=false;this._justClicked=false;this._userPanned=false;this._userZoomed=false}});t.control.locate=function(e){return new t.Control.Locate(e)};return a}),window)}));var punycode=createCommonjsModule((function(t,e){(function(i){var n=e&&!e.nodeType&&e;var o=t&&!t.nodeType&&t;var r=typeof commonjsGlobal=="object"&&commonjsGlobal;if(r.global===r||r.window===r||r.self===r){i=r}var a,s=2147483647,l=36,c=1,h=26,u=38,p=700,d=72,f=128,m="-",_=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=l-c,w=Math.floor,x=String.fromCharCode,k;function L(t){throw new RangeError(y[t])}function P(t,e){var i=t.length;var n=[];while(i--){n[i]=e(t[i])}return n}function T(t,e){var i=t.split("@");var n="";if(i.length>1){n=i[0]+"@";t=i[1]}t=t.replace(v,".");var o=t.split(".");var r=P(o,e).join(".");return n+r}function S(t){var e=[],i=0,n=t.length,o,r;while(i<n){o=t.charCodeAt(i++);if(o>=55296&&o<=56319&&i<n){r=t.charCodeAt(i++);if((r&64512)==56320){e.push(((o&1023)<<10)+(r&1023)+65536)}else{e.push(o);i--}}else{e.push(o)}}return e}function A(t){return P(t,(function(t){var e="";if(t>65535){t-=65536;e+=x(t>>>10&1023|55296);t=56320|t&1023}e+=x(t);return e})).join("")}function C(t){if(t-48<10){return t-22}if(t-65<26){return t-65}if(t-97<26){return t-97}return l}function M(t,e){return t+22+75*(t<26)-((e!=0)<<5)}function O(t,e,i){var n=0;t=i?w(t/p):t>>1;t+=w(t/e);for(;t>b*h>>1;n+=l){t=w(t/b)}return w(n+(b+1)*t/(t+u))}function z(t){var e=[],i=t.length,n,o=0,r=f,a=d,u,p,_,g,v,y,b,x,k;u=t.lastIndexOf(m);if(u<0){u=0}for(p=0;p<u;++p){if(t.charCodeAt(p)>=128){L("not-basic")}e.push(t.charCodeAt(p))}for(_=u>0?u+1:0;_<i;){for(g=o,v=1,y=l;;y+=l){if(_>=i){L("invalid-input")}b=C(t.charCodeAt(_++));if(b>=l||b>w((s-o)/v)){L("overflow")}o+=b*v;x=y<=a?c:y>=a+h?h:y-a;if(b<x){break}k=l-x;if(v>w(s/k)){L("overflow")}v*=k}n=e.length+1;a=O(o-g,n,g==0);if(w(o/n)>s-r){L("overflow")}r+=w(o/n);o%=n;e.splice(o++,0,r)}return A(e)}function E(t){var e,i,n,o,r,a,u,p,_,g,v,y=[],b,k,P,T;t=S(t);b=t.length;e=f;i=0;r=d;for(a=0;a<b;++a){v=t[a];if(v<128){y.push(x(v))}}n=o=y.length;if(o){y.push(m)}while(n<b){for(u=s,a=0;a<b;++a){v=t[a];if(v>=e&&v<u){u=v}}k=n+1;if(u-e>w((s-i)/k)){L("overflow")}i+=(u-e)*k;e=u;for(a=0;a<b;++a){v=t[a];if(v<e&&++i>s){L("overflow")}if(v==e){for(p=i,_=l;;_+=l){g=_<=r?c:_>=r+h?h:_-r;if(p<g){break}T=p-g;P=l-g;y.push(x(M(g+T%P,0)));p=w(T/P)}y.push(x(M(p,0)));r=O(i,k,n==o);i=0;++n}}++i;++e}return y.join("")}function I(t){return T(t,(function(t){return _.test(t)?z(t.slice(4).toLowerCase()):t}))}function B(t){return T(t,(function(t){return g.test(t)?"xn--"+E(t):t}))}a={version:"1.4.1",ucs2:{decode:S,encode:A},decode:z,encode:E,toASCII:B,toUnicode:I};if(n&&o){if(t.exports==n){o.exports=a}else{for(k in a){a.hasOwnProperty(k)&&(n[k]=a[k])}}}else{i.punycode=a}})(commonjsGlobal)}));var shams=function t(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var i=Symbol("test");var n=Object(i);if(typeof i==="string"){return false}if(Object.prototype.toString.call(i)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(n)!=="[object Symbol]"){return false}var o=42;e[i]=o;for(i in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==i){return false}if(!Object.prototype.propertyIsEnumerable.call(e,i)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var a=Object.getOwnPropertyDescriptor(e,i);if(a.value!==o||a.enumerable!==true){return false}}return true};var origSymbol=typeof Symbol!=="undefined"&&Symbol;var hasSymbols$1=function t(){if(typeof origSymbol!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof origSymbol("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return shams()};var test={foo:{}};var $Object=Object;var hasProto$1=function t(){return{__proto__:test}.foo===test.foo&&!({__proto__:null}instanceof $Object)};var ERROR_MESSAGE="Function.prototype.bind called on incompatible ";var slice=Array.prototype.slice;var toStr$1=Object.prototype.toString;var funcType="[object Function]";var implementation=function t(e){var i=this;if(typeof i!=="function"||toStr$1.call(i)!==funcType){throw new TypeError(ERROR_MESSAGE+i)}var n=slice.call(arguments,1);var o;var r=function(){if(this instanceof o){var t=i.apply(this,n.concat(slice.call(arguments)));if(Object(t)===t){return t}return this}else{return i.apply(e,n.concat(slice.call(arguments)))}};var a=Math.max(0,i.length-n.length);var s=[];for(var l=0;l<a;l++){s.push("$"+l)}o=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(r);if(i.prototype){var c=function t(){};c.prototype=i.prototype;o.prototype=new c;c.prototype=null}return o};var functionBind=Function.prototype.bind||implementation;var src=functionBind.call(Function.call,Object.prototype.hasOwnProperty);var undefined$1;var $SyntaxError=SyntaxError;var $Function=Function;var $TypeError$1=TypeError;var getEvalledConstructor=function(t){try{return $Function('"use strict"; return ('+t+").constructor;")()}catch(e){}};var $gOPD=Object.getOwnPropertyDescriptor;var throwTypeError=function(){throw new $TypeError$1};var ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(t){try{return $gOPD(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError;var hasSymbols=hasSymbols$1();var hasProto=hasProto$1();var getProto=Object.getPrototypeOf||(hasProto?function(t){return t.__proto__}:null);var needsEval={};var TypedArray=typeof Uint8Array==="undefined"||!getProto?undefined$1:getProto(Uint8Array);var INTRINSICS={"%AggregateError%":typeof AggregateError==="undefined"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics==="undefined"?undefined$1:Atomics,"%BigInt%":typeof BigInt==="undefined"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array==="undefined"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array==="undefined"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON==="object"?JSON:undefined$1,"%Map%":typeof Map==="undefined"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!hasSymbols||!getProto?undefined$1:getProto((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?undefined$1:Promise,"%Proxy%":typeof Proxy==="undefined"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect==="undefined"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!hasSymbols||!getProto?undefined$1:getProto((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$1,"%Uint8Array%":typeof Uint8Array==="undefined"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap==="undefined"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?undefined$1:WeakSet};var doEval=function t(e){var i;if(e==="%AsyncFunction%"){i=getEvalledConstructor("async function () {}")}else if(e==="%GeneratorFunction%"){i=getEvalledConstructor("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){i=getEvalledConstructor("async function* () {}")}else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");if(n){i=n.prototype}}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");if(o&&getProto){i=getProto(o.prototype)}}INTRINSICS[e]=i;return i};var LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var $concat$1=functionBind.call(Function.call,Array.prototype.concat);var $spliceApply=functionBind.call(Function.apply,Array.prototype.splice);var $replace$1=functionBind.call(Function.call,String.prototype.replace);var $strSlice=functionBind.call(Function.call,String.prototype.slice);var $exec=functionBind.call(Function.call,RegExp.prototype.exec);var rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=function t(e){var i=$strSlice(e,0,1);var n=$strSlice(e,-1);if(i==="%"&&n!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`")}else if(n==="%"&&i!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`")}var o=[];$replace$1(e,rePropName,(function(t,e,i,n){o[o.length]=i?$replace$1(n,reEscapeChar,"$1"):e||t}));return o};var getBaseIntrinsic=function t(e,i){var n=e;var o;if(src(LEGACY_ALIASES,n)){o=LEGACY_ALIASES[n];n="%"+o[0]+"%"}if(src(INTRINSICS,n)){var r=INTRINSICS[n];if(r===needsEval){r=doEval(n)}if(typeof r==="undefined"&&!i){throw new $TypeError$1("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:o,name:n,value:r}}throw new $SyntaxError("intrinsic "+e+" does not exist!")};var getIntrinsic=function t(e,i){if(typeof e!=="string"||e.length===0){throw new $TypeError$1("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof i!=="boolean"){throw new $TypeError$1('"allowMissing" argument must be a boolean')}if($exec(/^%?[^%]*%?$/,e)===null){throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var n=stringToPath(e);var o=n.length>0?n[0]:"";var r=getBaseIntrinsic("%"+o+"%",i);var a=r.name;var s=r.value;var l=false;var c=r.alias;if(c){o=c[0];$spliceApply(n,$concat$1([0,1],c))}for(var h=1,u=true;h<n.length;h+=1){var p=n[h];var d=$strSlice(p,0,1);var f=$strSlice(p,-1);if((d==='"'||d==="'"||d==="`"||(f==='"'||f==="'"||f==="`"))&&d!==f){throw new $SyntaxError("property names with quotes must have matching quotes")}if(p==="constructor"||!u){l=true}o+="."+p;a="%"+o+"%";if(src(INTRINSICS,a)){s=INTRINSICS[a]}else if(s!=null){if(!(p in s)){if(!i){throw new $TypeError$1("base intrinsic for "+e+" exists, but the property is not available.")}return void undefined$1}if($gOPD&&h+1>=n.length){var m=$gOPD(s,p);u=!!m;if(u&&"get"in m&&!("originalValue"in m.get)){s=m.get}else{s=s[p]}}else{u=src(s,p);s=s[p]}if(u&&!l){INTRINSICS[a]=s}}}return s};var callBind=createCommonjsModule((function(t){var e=getIntrinsic("%Function.prototype.apply%");var i=getIntrinsic("%Function.prototype.call%");var n=getIntrinsic("%Reflect.apply%",true)||functionBind.call(i,e);var o=getIntrinsic("%Object.getOwnPropertyDescriptor%",true);var r=getIntrinsic("%Object.defineProperty%",true);var a=getIntrinsic("%Math.max%");if(r){try{r({},"a",{value:1})}catch(l){r=null}}t.exports=function t(e){var s=n(functionBind,i,arguments);if(o&&r){var l=o(s,"length");if(l.configurable){r(s,"length",{value:1+a(0,e.length-(arguments.length-1))})}}return s};var s=function t(){return n(functionBind,e,arguments)};if(r){r(t.exports,"apply",{value:s})}else{t.exports.apply=s}}));var $indexOf=callBind(getIntrinsic("String.prototype.indexOf"));var callBound=function t(e,i){var n=getIntrinsic(e,!!i);if(typeof n==="function"&&$indexOf(e,".prototype.")>-1){return callBind(n)}return n};var _nodeResolve_empty={};var _nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty});var utilInspect=getAugmentedNamespace(_nodeResolve_empty$1);var hasMap=typeof Map==="function"&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==="function"?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==="function"&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==="function"?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==="function"&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==="function"&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==="function"&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;var bigIntValueOf=typeof BigInt==="function"?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==="function"&&typeof Symbol.iterator==="object";var toStringTag=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols?"object":"symbol")?Symbol.toStringTag:null;var isEnumerable=Object.prototype.propertyIsEnumerable;var gPO=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function addNumericSeparator(t,e){if(t===Infinity||t===-Infinity||t!==t||t&&t>-1e3&&t<1e3||$test.call(/e/,e)){return e}var i=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t==="number"){var n=t<0?-$floor(-t):$floor(t);if(n!==t){var o=String(n);var r=$slice.call(e,o.length+1);return $replace.call(o,i,"$&_")+"."+$replace.call($replace.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,i,"$&_")}var inspectCustom=utilInspect.custom;var inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null;var objectInspect=function t(e,i,n,o){var r=i||{};if(has$3(r,"quoteStyle")&&(r.quoteStyle!=="single"&&r.quoteStyle!=="double")){throw new TypeError('option "quoteStyle" must be "single" or "double"')}if(has$3(r,"maxStringLength")&&(typeof r.maxStringLength==="number"?r.maxStringLength<0&&r.maxStringLength!==Infinity:r.maxStringLength!==null)){throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`')}var a=has$3(r,"customInspect")?r.customInspect:true;if(typeof a!=="boolean"&&a!=="symbol"){throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`")}if(has$3(r,"indent")&&r.indent!==null&&r.indent!=="\t"&&!(parseInt(r.indent,10)===r.indent&&r.indent>0)){throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`')}if(has$3(r,"numericSeparator")&&typeof r.numericSeparator!=="boolean"){throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`')}var s=r.numericSeparator;if(typeof e==="undefined"){return"undefined"}if(e===null){return"null"}if(typeof e==="boolean"){return e?"true":"false"}if(typeof e==="string"){return inspectString(e,r)}if(typeof e==="number"){if(e===0){return Infinity/e>0?"0":"-0"}var l=String(e);return s?addNumericSeparator(e,l):l}if(typeof e==="bigint"){var c=String(e)+"n";return s?addNumericSeparator(e,c):c}var h=typeof r.depth==="undefined"?5:r.depth;if(typeof n==="undefined"){n=0}if(n>=h&&h>0&&typeof e==="object"){return isArray$3(e)?"[Array]":"[Object]"}var u=getIndent(r,n);if(typeof o==="undefined"){o=[]}else if(indexOf(o,e)>=0){return"[Circular]"}function p(e,i,a){if(i){o=$arrSlice.call(o);o.push(i)}if(a){var s={depth:r.depth};if(has$3(r,"quoteStyle")){s.quoteStyle=r.quoteStyle}return t(e,s,n+1,o)}return t(e,r,n+1,o)}if(typeof e==="function"&&!isRegExp$1(e)){var d=nameOf(e);var f=arrObjKeys(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(f.length>0?" { "+$join.call(f,", ")+" }":"")}if(isSymbol(e)){var m=hasShammedSymbols?$replace.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(e);return typeof e==="object"&&!hasShammedSymbols?markBoxed(m):m}if(isElement(e)){var _="<"+$toLowerCase.call(String(e.nodeName));var g=e.attributes||[];for(var v=0;v<g.length;v++){_+=" "+g[v].name+"="+wrapQuotes(quote(g[v].value),"double",r)}_+=">";if(e.childNodes&&e.childNodes.length){_+="..."}_+="</"+$toLowerCase.call(String(e.nodeName))+">";return _}if(isArray$3(e)){if(e.length===0){return"[]"}var y=arrObjKeys(e,p);if(u&&!singleLineValues(y)){return"["+indentedJoin(y,u)+"]"}return"[ "+$join.call(y,", ")+" ]"}if(isError(e)){var b=arrObjKeys(e,p);if(!("cause"in Error.prototype)&&"cause"in e&&!isEnumerable.call(e,"cause")){return"{ ["+String(e)+"] "+$join.call($concat.call("[cause]: "+p(e.cause),b),", ")+" }"}if(b.length===0){return"["+String(e)+"]"}return"{ ["+String(e)+"] "+$join.call(b,", ")+" }"}if(typeof e==="object"&&a){if(inspectSymbol&&typeof e[inspectSymbol]==="function"&&utilInspect){return utilInspect(e,{depth:h-n})}else if(a!=="symbol"&&typeof e.inspect==="function"){return e.inspect()}}if(isMap(e)){var w=[];if(mapForEach){mapForEach.call(e,(function(t,i){w.push(p(i,e,true)+" => "+p(t,e))}))}return collectionOf("Map",mapSize.call(e),w,u)}if(isSet(e)){var x=[];if(setForEach){setForEach.call(e,(function(t){x.push(p(t,e))}))}return collectionOf("Set",setSize.call(e),x,u)}if(isWeakMap(e)){return weakCollectionOf("WeakMap")}if(isWeakSet(e)){return weakCollectionOf("WeakSet")}if(isWeakRef(e)){return weakCollectionOf("WeakRef")}if(isNumber(e)){return markBoxed(p(Number(e)))}if(isBigInt(e)){return markBoxed(p(bigIntValueOf.call(e)))}if(isBoolean(e)){return markBoxed(booleanValueOf.call(e))}if(isString(e)){return markBoxed(p(String(e)))}if(!isDate(e)&&!isRegExp$1(e)){var k=arrObjKeys(e,p);var L=gPO?gPO(e)===Object.prototype:e instanceof Object||e.constructor===Object;var P=e instanceof Object?"":"null prototype";var T=!L&&toStringTag&&Object(e)===e&&toStringTag in e?$slice.call(toStr(e),8,-1):P?"Object":"";var S=L||typeof e.constructor!=="function"?"":e.constructor.name?e.constructor.name+" ":"";var A=S+(T||P?"["+$join.call($concat.call([],T||[],P||[]),": ")+"] ":"");if(k.length===0){return A+"{}"}if(u){return A+"{"+indentedJoin(k,u)+"}"}return A+"{ "+$join.call(k,", ")+" }"}return String(e)};function wrapQuotes(t,e,i){var n=(i.quoteStyle||e)==="double"?'"':"'";return n+t+n}function quote(t){return $replace.call(String(t),/"/g,""")}function isArray$3(t){return toStr(t)==="[object Array]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isDate(t){return toStr(t)==="[object Date]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isRegExp$1(t){return toStr(t)==="[object RegExp]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isError(t){return toStr(t)==="[object Error]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isString(t){return toStr(t)==="[object String]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isNumber(t){return toStr(t)==="[object Number]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isBoolean(t){return toStr(t)==="[object Boolean]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isSymbol(t){if(hasShammedSymbols){return t&&typeof t==="object"&&t instanceof Symbol}if(typeof t==="symbol"){return true}if(!t||typeof t!=="object"||!symToString){return false}try{symToString.call(t);return true}catch(e){}return false}function isBigInt(t){if(!t||typeof t!=="object"||!bigIntValueOf){return false}try{bigIntValueOf.call(t);return true}catch(e){}return false}var hasOwn=Object.prototype.hasOwnProperty||function(t){return t in this};function has$3(t,e){return hasOwn.call(t,e)}function toStr(t){return objectToString.call(t)}function nameOf(t){if(t.name){return t.name}var e=$match.call(functionToString.call(t),/^function\s*([\w$]+)/);if(e){return e[1]}return null}function indexOf(t,e){if(t.indexOf){return t.indexOf(e)}for(var i=0,n=t.length;i<n;i++){if(t[i]===e){return i}}return-1}function isMap(t){if(!mapSize||!t||typeof t!=="object"){return false}try{mapSize.call(t);try{setSize.call(t)}catch(e){return true}return t instanceof Map}catch(i){}return false}function isWeakMap(t){if(!weakMapHas||!t||typeof t!=="object"){return false}try{weakMapHas.call(t,weakMapHas);try{weakSetHas.call(t,weakSetHas)}catch(e){return true}return t instanceof WeakMap}catch(i){}return false}function isWeakRef(t){if(!weakRefDeref||!t||typeof t!=="object"){return false}try{weakRefDeref.call(t);return true}catch(e){}return false}function isSet(t){if(!setSize||!t||typeof t!=="object"){return false}try{setSize.call(t);try{mapSize.call(t)}catch(e){return true}return t instanceof Set}catch(i){}return false}function isWeakSet(t){if(!weakSetHas||!t||typeof t!=="object"){return false}try{weakSetHas.call(t,weakSetHas);try{weakMapHas.call(t,weakMapHas)}catch(e){return true}return t instanceof WeakSet}catch(i){}return false}function isElement(t){if(!t||typeof t!=="object"){return false}if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){return true}return typeof t.nodeName==="string"&&typeof t.getAttribute==="function"}function inspectString(t,e){if(t.length>e.maxStringLength){var i=t.length-e.maxStringLength;var n="... "+i+" more character"+(i>1?"s":"");return inspectString($slice.call(t,0,e.maxStringLength),e)+n}var o=$replace.call($replace.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(o,"single",e)}function lowbyte(t){var e=t.charCodeAt(0);var i={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];if(i){return"\\"+i}return"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(t){return"Object("+t+")"}function weakCollectionOf(t){return t+" { ? }"}function collectionOf(t,e,i,n){var o=n?indentedJoin(i,n):$join.call(i,", ");return t+" ("+e+") {"+o+"}"}function singleLineValues(t){for(var e=0;e<t.length;e++){if(indexOf(t[e],"\n")>=0){return false}}return true}function getIndent(t,e){var i;if(t.indent==="\t"){i="\t"}else if(typeof t.indent==="number"&&t.indent>0){i=$join.call(Array(t.indent+1)," ")}else{return null}return{base:i,prev:$join.call(Array(e+1),i)}}function indentedJoin(t,e){if(t.length===0){return""}var i="\n"+e.prev+e.base;return i+$join.call(t,","+i)+"\n"+e.prev}function arrObjKeys(t,e){var i=isArray$3(t);var n=[];if(i){n.length=t.length;for(var o=0;o<t.length;o++){n[o]=has$3(t,o)?e(t[o],t):""}}var r=typeof gOPS==="function"?gOPS(t):[];var a;if(hasShammedSymbols){a={};for(var s=0;s<r.length;s++){a["$"+r[s]]=r[s]}}for(var l in t){if(!has$3(t,l)){continue}if(i&&String(Number(l))===l&&l<t.length){continue}if(hasShammedSymbols&&a["$"+l]instanceof Symbol){continue}else if($test.call(/[^\w$]/,l)){n.push(e(l,t)+": "+e(t[l],t))}else{n.push(l+": "+e(t[l],t))}}if(typeof gOPS==="function"){for(var c=0;c<r.length;c++){if(isEnumerable.call(t,r[c])){n.push("["+e(r[c])+"]: "+e(t[r[c]],t))}}}return n}var $TypeError=getIntrinsic("%TypeError%");var $WeakMap=getIntrinsic("%WeakMap%",true);var $Map=getIntrinsic("%Map%",true);var $weakMapGet=callBound("WeakMap.prototype.get",true);var $weakMapSet=callBound("WeakMap.prototype.set",true);var $weakMapHas=callBound("WeakMap.prototype.has",true);var $mapGet=callBound("Map.prototype.get",true);var $mapSet=callBound("Map.prototype.set",true);var $mapHas=callBound("Map.prototype.has",true);var listGetNode=function(t,e){for(var i=t,n;(n=i.next)!==null;i=n){if(n.key===e){i.next=n.next;n.next=t.next;t.next=n;return n}}};var listGet=function(t,e){var i=listGetNode(t,e);return i&&i.value};var listSet=function(t,e,i){var n=listGetNode(t,e);if(n){n.value=i}else{t.next={key:e,next:t.next,value:i}}};var listHas=function(t,e){return!!listGetNode(t,e)};var sideChannel=function t(){var e;var i;var n;var o={assert:function(t){if(!o.has(t)){throw new $TypeError("Side channel does not contain "+objectInspect(t))}},get:function(t){if($WeakMap&&t&&(typeof t==="object"||typeof t==="function")){if(e){return $weakMapGet(e,t)}}else if($Map){if(i){return $mapGet(i,t)}}else{if(n){return listGet(n,t)}}},has:function(t){if($WeakMap&&t&&(typeof t==="object"||typeof t==="function")){if(e){return $weakMapHas(e,t)}}else if($Map){if(i){return $mapHas(i,t)}}else{if(n){return listHas(n,t)}}return false},set:function(t,o){if($WeakMap&&t&&(typeof t==="object"||typeof t==="function")){if(!e){e=new $WeakMap}$weakMapSet(e,t,o)}else if($Map){if(!i){i=new $Map}$mapSet(i,t,o)}else{if(!n){n={key:{},next:null}}listSet(n,t,o)}}};return o};var replace=String.prototype.replace;var percentTwenties=/%20/g;var Format={RFC1738:"RFC1738",RFC3986:"RFC3986"};var formats={default:Format.RFC3986,formatters:{RFC1738:function(t){return replace.call(t,percentTwenties,"+")},RFC3986:function(t){return String(t)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986};var has$2=Object.prototype.hasOwnProperty;var isArray$2=Array.isArray;var hexTable=function(){var t=[];for(var e=0;e<256;++e){t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase())}return t}();var compactQueue=function t(e){while(e.length>1){var i=e.pop();var n=i.obj[i.prop];if(isArray$2(n)){var o=[];for(var r=0;r<n.length;++r){if(typeof n[r]!=="undefined"){o.push(n[r])}}i.obj[i.prop]=o}}};var arrayToObject=function t(e,i){var n=i&&i.plainObjects?Object.create(null):{};for(var o=0;o<e.length;++o){if(typeof e[o]!=="undefined"){n[o]=e[o]}}return n};var merge=function t(e,i,n){if(!i){return e}if(typeof i!=="object"){if(isArray$2(e)){e.push(i)}else if(e&&typeof e==="object"){if(n&&(n.plainObjects||n.allowPrototypes)||!has$2.call(Object.prototype,i)){e[i]=true}}else{return[e,i]}return e}if(!e||typeof e!=="object"){return[e].concat(i)}var o=e;if(isArray$2(e)&&!isArray$2(i)){o=arrayToObject(e,n)}if(isArray$2(e)&&isArray$2(i)){i.forEach((function(i,o){if(has$2.call(e,o)){var r=e[o];if(r&&typeof r==="object"&&i&&typeof i==="object"){e[o]=t(r,i,n)}else{e.push(i)}}else{e[o]=i}}));return e}return Object.keys(i).reduce((function(e,o){var r=i[o];if(has$2.call(e,o)){e[o]=t(e[o],r,n)}else{e[o]=r}return e}),o)};var assign=function t(e,i){return Object.keys(i).reduce((function(t,e){t[e]=i[e];return t}),e)};var decode=function(t,e,i){var n=t.replace(/\+/g," ");if(i==="iso-8859-1"){return n.replace(/%[0-9a-f]{2}/gi,unescape)}try{return decodeURIComponent(n)}catch(o){return n}};var encode=function t(e,i,n,o,r){if(e.length===0){return e}var a=e;if(typeof e==="symbol"){a=Symbol.prototype.toString.call(e)}else if(typeof e!=="string"){a=String(e)}if(n==="iso-8859-1"){return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}))}var s="";for(var l=0;l<a.length;++l){var c=a.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||r===formats.RFC1738&&(c===40||c===41)){s+=a.charAt(l);continue}if(c<128){s=s+hexTable[c];continue}if(c<2048){s=s+(hexTable[192|c>>6]+hexTable[128|c&63]);continue}if(c<55296||c>=57344){s=s+(hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|c&63]);continue}l+=1;c=65536+((c&1023)<<10|a.charCodeAt(l)&1023);s+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|c&63]}return s};var compact=function t(e){var i=[{obj:{o:e},prop:"o"}];var n=[];for(var o=0;o<i.length;++o){var r=i[o];var a=r.obj[r.prop];var s=Object.keys(a);for(var l=0;l<s.length;++l){var c=s[l];var h=a[c];if(typeof h==="object"&&h!==null&&n.indexOf(h)===-1){i.push({obj:a,prop:c});n.push(h)}}}compactQueue(i);return e};var isRegExp=function t(e){return Object.prototype.toString.call(e)==="[object RegExp]"};var isBuffer=function t(e){if(!e||typeof e!=="object"){return false}return!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))};var combine=function t(e,i){return[].concat(e,i)};var maybeMap=function t(e,i){if(isArray$2(e)){var n=[];for(var o=0;o<e.length;o+=1){n.push(i(e[o]))}return n}return i(e)};var utils={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isRegExp:isRegExp,maybeMap:maybeMap,merge:merge};var has$1=Object.prototype.hasOwnProperty;var arrayPrefixGenerators={brackets:function t(e){return e+"[]"},comma:"comma",indices:function t(e,i){return e+"["+i+"]"},repeat:function t(e){return e}};var isArray$1=Array.isArray;var push=Array.prototype.push;var pushToArray=function(t,e){push.apply(t,isArray$1(e)?e:[e])};var toISO=Date.prototype.toISOString;var defaultFormat=formats["default"];var defaults$1={addQueryPrefix:false,allowDots:false,charset:"utf-8",charsetSentinel:false,delimiter:"&",encode:true,encoder:utils.encode,encodeValuesOnly:false,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:false,serializeDate:function t(e){return toISO.call(e)},skipNulls:false,strictNullHandling:false};var isNonNullishPrimitive=function t(e){return typeof e==="string"||typeof e==="number"||typeof e==="boolean"||typeof e==="symbol"||typeof e==="bigint"};var sentinel={};var stringify=function t(e,i,n,o,r,a,s,l,c,h,u,p,d,f,m,_){var g=e;var v=_;var y=0;var b=false;while((v=v.get(sentinel))!==void undefined&&!b){var w=v.get(e);y+=1;if(typeof w!=="undefined"){if(w===y){throw new RangeError("Cyclic object value")}else{b=true}}if(typeof v.get(sentinel)==="undefined"){y=0}}if(typeof l==="function"){g=l(i,g)}else if(g instanceof Date){g=u(g)}else if(n==="comma"&&isArray$1(g)){g=utils.maybeMap(g,(function(t){if(t instanceof Date){return u(t)}return t}))}if(g===null){if(r){return s&&!f?s(i,defaults$1.encoder,m,"key",p):i}g=""}if(isNonNullishPrimitive(g)||utils.isBuffer(g)){if(s){var x=f?i:s(i,defaults$1.encoder,m,"key",p);return[d(x)+"="+d(s(g,defaults$1.encoder,m,"value",p))]}return[d(i)+"="+d(String(g))]}var k=[];if(typeof g==="undefined"){return k}var L;if(n==="comma"&&isArray$1(g)){if(f&&s){g=utils.maybeMap(g,s)}L=[{value:g.length>0?g.join(",")||null:void undefined}]}else if(isArray$1(l)){L=l}else{var P=Object.keys(g);L=c?P.sort(c):P}var T=o&&isArray$1(g)&&g.length===1?i+"[]":i;for(var S=0;S<L.length;++S){var A=L[S];var C=typeof A==="object"&&typeof A.value!=="undefined"?A.value:g[A];if(a&&C===null){continue}var M=isArray$1(g)?typeof n==="function"?n(T,A):T:T+(h?"."+A:"["+A+"]");_.set(e,y);var O=sideChannel();O.set(sentinel,_);pushToArray(k,t(C,M,n,o,r,a,n==="comma"&&f&&isArray$1(g)?null:s,l,c,h,u,p,d,f,m,O))}return k};var normalizeStringifyOptions=function t(e){if(!e){return defaults$1}if(e.encoder!==null&&typeof e.encoder!=="undefined"&&typeof e.encoder!=="function"){throw new TypeError("Encoder has to be a function.")}var i=e.charset||defaults$1.charset;if(typeof e.charset!=="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1"){throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined")}var n=formats["default"];if(typeof e.format!=="undefined"){if(!has$1.call(formats.formatters,e.format)){throw new TypeError("Unknown format option provided.")}n=e.format}var o=formats.formatters[n];var r=defaults$1.filter;if(typeof e.filter==="function"||isArray$1(e.filter)){r=e.filter}return{addQueryPrefix:typeof e.addQueryPrefix==="boolean"?e.addQueryPrefix:defaults$1.addQueryPrefix,allowDots:typeof e.allowDots==="undefined"?defaults$1.allowDots:!!e.allowDots,charset:i,charsetSentinel:typeof e.charsetSentinel==="boolean"?e.charsetSentinel:defaults$1.charsetSentinel,delimiter:typeof e.delimiter==="undefined"?defaults$1.delimiter:e.delimiter,encode:typeof e.encode==="boolean"?e.encode:defaults$1.encode,encoder:typeof e.encoder==="function"?e.encoder:defaults$1.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==="boolean"?e.encodeValuesOnly:defaults$1.encodeValuesOnly,filter:r,format:n,formatter:o,serializeDate:typeof e.serializeDate==="function"?e.serializeDate:defaults$1.serializeDate,skipNulls:typeof e.skipNulls==="boolean"?e.skipNulls:defaults$1.skipNulls,sort:typeof e.sort==="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling==="boolean"?e.strictNullHandling:defaults$1.strictNullHandling}};var stringify_1=function(t,e){var i=t;var n=normalizeStringifyOptions(e);var o;var r;if(typeof n.filter==="function"){r=n.filter;i=r("",i)}else if(isArray$1(n.filter)){r=n.filter;o=r}var a=[];if(typeof i!=="object"||i===null){return""}var s;if(e&&e.arrayFormat in arrayPrefixGenerators){s=e.arrayFormat}else if(e&&"indices"in e){s=e.indices?"indices":"repeat"}else{s="indices"}var l=arrayPrefixGenerators[s];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!=="boolean"){throw new TypeError("`commaRoundTrip` must be a boolean, or absent")}var c=l==="comma"&&e&&e.commaRoundTrip;if(!o){o=Object.keys(i)}if(n.sort){o.sort(n.sort)}var h=sideChannel();for(var u=0;u<o.length;++u){var p=o[u];if(n.skipNulls&&i[p]===null){continue}pushToArray(a,stringify(i[p],p,l,c,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,h))}var d=a.join(n.delimiter);var f=n.addQueryPrefix===true?"?":"";if(n.charsetSentinel){if(n.charset==="iso-8859-1"){f+="utf8=%26%2310003%3B&"}else{f+="utf8=%E2%9C%93&"}}return d.length>0?f+d:""};var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var defaults={allowDots:false,allowPrototypes:false,allowSparse:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:utils.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var interpretNumericEntities=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))};var parseArrayValue=function(t,e){if(t&&typeof t==="string"&&e.comma&&t.indexOf(",")>-1){return t.split(",")}return t};var isoSentinel="utf8=%26%2310003%3B";var charsetSentinel="utf8=%E2%9C%93";var parseValues=function t(e,i){var n={__proto__:null};var o=i.ignoreQueryPrefix?e.replace(/^\?/,""):e;var r=i.parameterLimit===Infinity?undefined:i.parameterLimit;var a=o.split(i.delimiter,r);var s=-1;var l;var c=i.charset;if(i.charsetSentinel){for(l=0;l<a.length;++l){if(a[l].indexOf("utf8=")===0){if(a[l]===charsetSentinel){c="utf-8"}else if(a[l]===isoSentinel){c="iso-8859-1"}s=l;l=a.length}}}for(l=0;l<a.length;++l){if(l===s){continue}var h=a[l];var u=h.indexOf("]=");var p=u===-1?h.indexOf("="):u+1;var d,f;if(p===-1){d=i.decoder(h,defaults.decoder,c,"key");f=i.strictNullHandling?null:""}else{d=i.decoder(h.slice(0,p),defaults.decoder,c,"key");f=utils.maybeMap(parseArrayValue(h.slice(p+1),i),(function(t){return i.decoder(t,defaults.decoder,c,"value")}))}if(f&&i.interpretNumericEntities&&c==="iso-8859-1"){f=interpretNumericEntities(f)}if(h.indexOf("[]=")>-1){f=isArray(f)?[f]:f}if(has.call(n,d)){n[d]=utils.combine(n[d],f)}else{n[d]=f}}return n};var parseObject=function(t,e,i,n){var o=n?e:parseArrayValue(e,i);for(var r=t.length-1;r>=0;--r){var a;var s=t[r];if(s==="[]"&&i.parseArrays){a=[].concat(o)}else{a=i.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s;var c=parseInt(l,10);if(!i.parseArrays&&l===""){a={0:o}}else if(!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&(i.parseArrays&&c<=i.arrayLimit)){a=[];a[c]=o}else if(l!=="__proto__"){a[l]=o}}o=a}return o};var parseKeys=function t(e,i,n,o){if(!e){return}var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;var a=/(\[[^[\]]*])/;var s=/(\[[^[\]]*])/g;var l=n.depth>0&&a.exec(r);var c=l?r.slice(0,l.index):r;var h=[];if(c){if(!n.plainObjects&&has.call(Object.prototype,c)){if(!n.allowPrototypes){return}}h.push(c)}var u=0;while(n.depth>0&&(l=s.exec(r))!==null&&u<n.depth){u+=1;if(!n.plainObjects&&has.call(Object.prototype,l[1].slice(1,-1))){if(!n.allowPrototypes){return}}h.push(l[1])}if(l){h.push("["+r.slice(l.index)+"]")}return parseObject(h,i,n,o)};var normalizeParseOptions=function t(e){if(!e){return defaults}if(e.decoder!==null&&e.decoder!==undefined&&typeof e.decoder!=="function"){throw new TypeError("Decoder has to be a function.")}if(typeof e.charset!=="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1"){throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined")}var i=typeof e.charset==="undefined"?defaults.charset:e.charset;return{allowDots:typeof e.allowDots==="undefined"?defaults.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes==="boolean"?e.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof e.allowSparse==="boolean"?e.allowSparse:defaults.allowSparse,arrayLimit:typeof e.arrayLimit==="number"?e.arrayLimit:defaults.arrayLimit,charset:i,charsetSentinel:typeof e.charsetSentinel==="boolean"?e.charsetSentinel:defaults.charsetSentinel,comma:typeof e.comma==="boolean"?e.comma:defaults.comma,decoder:typeof e.decoder==="function"?e.decoder:defaults.decoder,delimiter:typeof e.delimiter==="string"||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:typeof e.depth==="number"||e.depth===false?+e.depth:defaults.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===true,interpretNumericEntities:typeof e.interpretNumericEntities==="boolean"?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==="number"?e.parameterLimit:defaults.parameterLimit,parseArrays:e.parseArrays!==false,plainObjects:typeof e.plainObjects==="boolean"?e.plainObjects:defaults.plainObjects,strictNullHandling:typeof e.strictNullHandling==="boolean"?e.strictNullHandling:defaults.strictNullHandling}};var parse$1=function(t,e){var i=normalizeParseOptions(e);if(t===""||t===null||typeof t==="undefined"){return i.plainObjects?Object.create(null):{}}var n=typeof t==="string"?parseValues(t,i):t;var o=i.plainObjects?Object.create(null):{};var r=Object.keys(n);for(var a=0;a<r.length;++a){var s=r[a];var l=parseKeys(s,n[s],i,typeof t==="string");o=utils.merge(o,l,i)}if(i.allowSparse===true){return o}return utils.compact(o)};var lib={formats:formats,parse:parse$1,stringify:stringify_1};function Url(){this.protocol=null;this.slashes=null;this.auth=null;this.host=null;this.port=null;this.hostname=null;this.hash=null;this.search=null;this.query=null;this.pathname=null;this.path=null;this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true};function urlParse(t,e,i){if(t&&typeof t==="object"&&t instanceof Url){return t}var n=new Url;n.parse(t,e,i);return n}Url.prototype.parse=function(t,e,i){if(typeof t!=="string"){throw new TypeError("Parameter 'url' must be a string, not "+typeof t)}var n=t.indexOf("?"),o=n!==-1&&n<t.indexOf("#")?"?":"#",r=t.split(o),a=/\\/g;r[0]=r[0].replace(a,"/");t=r.join(o);var s=t;s=s.trim();if(!i&&t.split("#").length===1){var l=simplePathPattern.exec(s);if(l){this.path=s;this.href=s;this.pathname=l[1];if(l[2]){this.search=l[2];if(e){this.query=lib.parse(this.search.substr(1))}else{this.query=this.search.substr(1)}}else if(e){this.search="";this.query={}}return this}}var c=protocolPattern.exec(s);if(c){c=c[0];var h=c.toLowerCase();this.protocol=h;s=s.substr(c.length)}if(i||c||s.match(/^\/\/[^@/]+@[^@/]+/)){var u=s.substr(0,2)==="//";if(u&&!(c&&hostlessProtocol[c])){s=s.substr(2);this.slashes=true}}if(!hostlessProtocol[c]&&(u||c&&!slashedProtocol[c])){var p=-1;for(var d=0;d<hostEndingChars.length;d++){var f=s.indexOf(hostEndingChars[d]);if(f!==-1&&(p===-1||f<p)){p=f}}var m,_;if(p===-1){_=s.lastIndexOf("@")}else{_=s.lastIndexOf("@",p)}if(_!==-1){m=s.slice(0,_);s=s.slice(_+1);this.auth=decodeURIComponent(m)}p=-1;for(var d=0;d<nonHostChars.length;d++){var f=s.indexOf(nonHostChars[d]);if(f!==-1&&(p===-1||f<p)){p=f}}if(p===-1){p=s.length}this.host=s.slice(0,p);s=s.slice(p);this.parseHost();this.hostname=this.hostname||"";var g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){var v=this.hostname.split(/\./);for(var d=0,y=v.length;d<y;d++){var b=v[d];if(!b){continue}if(!b.match(hostnamePartPattern)){var w="";for(var x=0,k=b.length;x<k;x++){if(b.charCodeAt(x)>127){w+="x"}else{w+=b[x]}}if(!w.match(hostnamePartPattern)){var L=v.slice(0,d);var P=v.slice(d+1);var T=b.match(hostnamePartStart);if(T){L.push(T[1]);P.unshift(T[2])}if(P.length){s="/"+P.join(".")+s}this.hostname=L.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!g){this.hostname=punycode.toASCII(this.hostname)}var S=this.port?":"+this.port:"";var A=this.hostname||"";this.host=A+S;this.href+=this.host;if(g){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(s[0]!=="/"){s="/"+s}}}if(!unsafeProtocol[h]){for(var d=0,y=autoEscape.length;d<y;d++){var C=autoEscape[d];if(s.indexOf(C)===-1){continue}var M=encodeURIComponent(C);if(M===C){M=escape(C)}s=s.split(C).join(M)}}var O=s.indexOf("#");if(O!==-1){this.hash=s.substr(O);s=s.slice(0,O)}var z=s.indexOf("?");if(z!==-1){this.search=s.substr(z);this.query=s.substr(z+1);if(e){this.query=lib.parse(this.query)}s=s.slice(0,z)}else if(e){this.search="";this.query={}}if(s){this.pathname=s}if(slashedProtocol[h]&&this.hostname&&!this.pathname){this.pathname="/"}if(this.pathname||this.search){var S=this.pathname||"";var E=this.search||"";this.path=S+E}this.href=this.format();return this};function urlFormat(t){if(typeof t==="string"){t=urlParse(t)}if(!(t instanceof Url)){return Url.prototype.format.call(t)}return t.format()}Url.prototype.format=function(){var t=this.auth||"";if(t){t=encodeURIComponent(t);t=t.replace(/%3A/i,":");t+="@"}var e=this.protocol||"",i=this.pathname||"",n=this.hash||"",o=false,r="";if(this.host){o=t+this.host}else if(this.hostname){o=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]");if(this.port){o+=":"+this.port}}if(this.query&&typeof this.query==="object"&&Object.keys(this.query).length){r=lib.stringify(this.query)}var a=this.search||r&&"?"+r||"";if(e&&e.substr(-1)!==":"){e+=":"}if(this.slashes||(!e||slashedProtocol[e])&&o!==false){o="//"+(o||"");if(i&&i.charAt(0)!=="/"){i="/"+i}}else if(!o){o=""}if(n&&n.charAt(0)!=="#"){n="#"+n}if(a&&a.charAt(0)!=="?"){a="?"+a}i=i.replace(/[?#]/g,(function(t){return encodeURIComponent(t)}));a=a.replace("#","%23");return e+o+i+a+n};function urlResolve(t,e){return urlParse(t,false,true).resolve(e)}Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,false,true)).format()};function urlResolveObject(t,e){if(!t){return e}return urlParse(t,false,true).resolveObject(e)}Url.prototype.resolveObject=function(t){if(typeof t==="string"){var e=new Url;e.parse(t,false,true);t=e}var i=new Url;var n=Object.keys(this);for(var o=0;o<n.length;o++){var r=n[o];i[r]=this[r]}i.hash=t.hash;if(t.href===""){i.href=i.format();return i}if(t.slashes&&!t.protocol){var a=Object.keys(t);for(var s=0;s<a.length;s++){var l=a[s];if(l!=="protocol"){i[l]=t[l]}}if(slashedProtocol[i.protocol]&&i.hostname&&!i.pathname){i.pathname="/";i.path=i.pathname}i.href=i.format();return i}if(t.protocol&&t.protocol!==i.protocol){if(!slashedProtocol[t.protocol]){var c=Object.keys(t);for(var h=0;h<c.length;h++){var u=c[h];i[u]=t[u]}i.href=i.format();return i}i.protocol=t.protocol;if(!t.host&&!hostlessProtocol[t.protocol]){var p=(t.pathname||"").split("/");while(p.length&&!(t.host=p.shift())){}if(!t.host){t.host=""}if(!t.hostname){t.hostname=""}if(p[0]!==""){p.unshift("")}if(p.length<2){p.unshift("")}i.pathname=p.join("/")}else{i.pathname=t.pathname}i.search=t.search;i.query=t.query;i.host=t.host||"";i.auth=t.auth;i.hostname=t.hostname||t.host;i.port=t.port;if(i.pathname||i.search){var d=i.pathname||"";var f=i.search||"";i.path=d+f}i.slashes=i.slashes||t.slashes;i.href=i.format();return i}var m=i.pathname&&i.pathname.charAt(0)==="/",_=t.host||t.pathname&&t.pathname.charAt(0)==="/",g=_||m||i.host&&t.pathname,v=g,y=i.pathname&&i.pathname.split("/")||[],p=t.pathname&&t.pathname.split("/")||[],b=i.protocol&&!slashedProtocol[i.protocol];if(b){i.hostname="";i.port=null;if(i.host){if(y[0]===""){y[0]=i.host}else{y.unshift(i.host)}}i.host="";if(t.protocol){t.hostname=null;t.port=null;if(t.host){if(p[0]===""){p[0]=t.host}else{p.unshift(t.host)}}t.host=null}g=g&&(p[0]===""||y[0]==="")}if(_){i.host=t.host||t.host===""?t.host:i.host;i.hostname=t.hostname||t.hostname===""?t.hostname:i.hostname;i.search=t.search;i.query=t.query;y=p}else if(p.length){if(!y){y=[]}y.pop();y=y.concat(p);i.search=t.search;i.query=t.query}else if(t.search!=null){if(b){i.host=y.shift();i.hostname=i.host;var w=i.host&&i.host.indexOf("@")>0?i.host.split("@"):false;if(w){i.auth=w.shift();i.hostname=w.shift();i.host=i.hostname}}i.search=t.search;i.query=t.query;if(i.pathname!==null||i.search!==null){i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")}i.href=i.format();return i}if(!y.length){i.pathname=null;if(i.search){i.path="/"+i.search}else{i.path=null}i.href=i.format();return i}var x=y.slice(-1)[0];var k=(i.host||t.host||y.length>1)&&(x==="."||x==="..")||x==="";var L=0;for(var P=y.length;P>=0;P--){x=y[P];if(x==="."){y.splice(P,1)}else if(x===".."){y.splice(P,1);L++}else if(L){y.splice(P,1);L--}}if(!g&&!v){for(;L--;L){y.unshift("..")}}if(g&&y[0]!==""&&(!y[0]||y[0].charAt(0)!=="/")){y.unshift("")}if(k&&y.join("/").substr(-1)!=="/"){y.push("")}var T=y[0]===""||y[0]&&y[0].charAt(0)==="/";if(b){i.hostname=T?"":y.length?y.shift():"";i.host=i.hostname;var w=i.host&&i.host.indexOf("@")>0?i.host.split("@"):false;if(w){i.auth=w.shift();i.hostname=w.shift();i.host=i.hostname}}g=g||i.host&&y.length;if(g&&!T){y.unshift("")}if(y.length>0){i.pathname=y.join("/")}else{i.pathname=null;i.path=null}if(i.pathname!==null||i.search!==null){i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")}i.auth=t.auth||i.auth;i.slashes=i.slashes||t.slashes;i.href=i.format();return i};Url.prototype.parseHost=function(){var t=this.host;var e=portPattern.exec(t);if(e){e=e[0];if(e!==":"){this.port=e.substr(1)}t=t.substr(0,t.length-e.length)}if(t){this.hostname=t}};var parse=urlParse;var resolve=urlResolve;var resolveObject=urlResolveObject;var format=urlFormat;var Url_1=Url;var url={parse:parse,resolve:resolve,resolveObject:resolveObject,format:format,Url:Url_1};!function(t){t()}((function(){var t={lightblue:{area:"#3366CC",alpha:.45,stroke:"#3366CC"},magenta:{area:"#FF005E"},yellow:{area:"#FF0"},purple:{area:"#732C7B"},steelblue:{area:"#4682B4"},red:{area:"#F00"},lime:{area:"#9CC222",line:"#566B13"}},e=6e4,i=60*e,n=24*i;function o(t,e){return new URL(t,t.startsWith("../")||t.startsWith("./")?e:void 0).toString()}function r(t,e){var i=m("a","",{href:t,target:"_new",download:e||"",style:"display:none;"}),n=document.body;n.appendChild(i),i.click(),n.removeChild(i)}function a(t,e,i){var n=this;return t&&function(o){var r=o.props,a=o.point,l=o.id,c=o.isMulti;if(r)for(var h=0,u=t;h<u.length;h++){var p=u[h];if(p in r){a.meta[e]=(i||s).call(n,c?r[p][c]:r[p],l);break}}}}var s=function(t,e){return parseInt("object"==typeof t?t[e]:t)},l=function(t,e){return t&&e.split(" ").every((function(e){return e&&L.DomUtil.addClass(t,e)}))},c=function(t,e){return t&&e.split(" ").every((function(e){return e&&L.DomUtil.removeClass(t,e)}))},h=function(t,e,i){return(i?l:c)(t,e)},u=function(t,e,i){return e&&c(t,e)||i&&l(t,i)},p=function(t,e,i){return void 0===i&&L.DomUtil.getStyle(t,e)||t.style.setProperty(e,i)},d=function(t,e){for(var i in e)t.setAttribute(i,e[i])},f=function(t,e,i,n){return t[n?"on":"off"](e,i)},m=function(t,e,i,n){var o=L.DomUtil.create(t,e||"");return i&&d(o,i),n&&_(n,o),o},_=function(t,e){return t.appendChild(e)},g=function(t,e,i){return t.insertAdjacentElement(i,e)},v=function(t,e){return(e||document).querySelector(t)},y=function(t,e){for(var i in t)e(t[i],i)},b=function(){return Math.random().toString(36).substr(2,9)},w=L.DomEvent,x=w.on,k=w.off,P=L.Util,T=P.throttle,S=P.wrapNum,A=L.DomUtil.hasClass,C=L.Util.formatNum,M=function(t,e){return e?t<e[0]?e[0]:t>e[1]?e[1]:t:t},O=function(t,e,i){return Math.abs(t-e)>i?e+i*Math.sign(t-e):t};function z(t,e,i){if(e===void 0){e=[]}if(i===void 0){i=[]}switch(!t||typeof t){case"object":var n=i.filter((function(e){return t===e.original}))[0];if(n)return n.copy;var o=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return i.push({original:t,copy:o}),Object.getOwnPropertyNames(t).forEach((function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,r.get||r.set?r:{writable:r.writable,configurable:r.configurable,enumerable:r.enumerable,value:e.includes(n)?r.value:z(r.value,e,i)})})),o;case"function":case"symbol":console.warn("cloneDeep: "+typeof t+"s not fully supported:",t);default:return t}}var E=Object.freeze({__proto__:null,Colors:t,addClass:l,append:_,clamp:M,cloneDeep:z,coordPropsToMeta:a,create:m,drawCanvas:function(t,e){e.classed("canvas-path",!0),t.beginPath(),t.moveTo(0,0);var i=new Path2D(e.attr("d"));t.strokeStyle=e.attr("stroke"),t.fillStyle=e.attr("fill"),t.lineWidth=1.25,t.globalCompositeOperation="source-over",t.globalAlpha=e.attr("stroke-opacity")||.3,t.stroke(i),t.globalAlpha=e.attr("fill-opacity")||.45,t.fill(i),t.globalAlpha=1,t.closePath()},each:y,formatDate:function(t){return t?"time"==t?function(t){return new Date(t).toLocaleTimeString()}:"date"==t?function(t){return new Date(t).toLocaleDateString()}:function(e){return t(e)}:function(t){return new Date(t).toLocaleString().replaceAll("/","-").replaceAll(","," ")}},formatTime:function(t){var o=Math.floor(t/n),r=Math.floor((t-o*n)/i),a=Math.floor((t-o*n-r*i)/e),s=Math.round((t-o*n-r*i-a*e)/1e3);return 60===s&&(a++,s=0),60===a&&(r++,a=0),24===r&&(o++,r=0),(o?o+"d ":"")+r.toString().padStart(2,0)+":"+a.toString().padStart(2,0)+"'"+s.toString().padStart(2,0)+'"'},hasClass:A,iAvg:function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=1}return(t+e*(i-1))/i},iMax:function(t,e){if(e===void 0){e=-1/0}return t>e?t:e},iMin:function(t,e){if(e===void 0){e=1/0}return t<e?t:e},iSum:function(t,e){if(e===void 0){e=0}return t+e},insert:g,off:k,on:x,parseDate:function(t,e){return new Date(Date.parse("object"==typeof t?t[e]:t))},parseNumeric:s,randomId:b,removeClass:c,replaceClass:u,resolveURL:o,round:C,saveFile:r,select:v,setAttributes:d,style:p,throttle:T,toggleClass:h,toggleEvent:f,toggleStyle:function(t,e,i,n){return p(t,e,n?i:"")},wrapDelta:O,wrapNum:S}),I={autofitBounds:!0,autohide:!1,autohideMarker:!0,almostover:!0,altitude:!0,closeBtn:!0,collapsed:!1,detached:!0,distance:!0,distanceMarkers:{lazy:!0,distance:!0,direction:!0},dragging:!L.Browser.mobile,downloadLink:"link",elevationDiv:"#elevation-div",edgeScale:{bar:!0,icon:!1,coords:!1},followMarker:!0,imperial:!1,legend:!0,handlers:["Distance","Time","Altitude","Slope","Speed","Acceleration"],hotline:"elevation",marker:"elevation-line",markerIcon:L.divIcon({className:"elevation-position-marker",html:'<i class="elevation-position-icon"></i>',iconSize:[32,32],iconAnchor:[16,16]}),position:"topright",polyline:{className:"elevation-polyline",color:"#000",opacity:.75,weight:5,lineCap:"round"},polylineSegments:{className:"elevation-polyline-segments",color:"#F00",interactive:!1},preferCanvas:!1,reverseCoords:!1,ruler:!0,theme:"lightblue-theme",summary:"inline",slope:!1,speed:!1,time:!0,timeFactor:3600,timestamps:!1,trkStart:{className:"start-marker",radius:6,weight:2,color:"#fff",fillColor:"#00d800",fillOpacity:1,interactive:!1},trkEnd:{className:"end-marker",radius:6,weight:2,color:"#fff",fillColor:"#ff0606",fillOpacity:1,interactive:!1},waypoints:!0,wptIcons:{"":L.divIcon({className:"elevation-waypoint-marker",html:'<i class="elevation-waypoint-icon default"></i>',iconSize:[30,30],iconAnchor:[8,30]})},wptLabels:!0,xAttr:"dist",xLabel:"km",yAttr:"z",yLabel:"m",zFollow:!1,zooming:!L.Browser.Mobile,margins:{top:30,right:30,bottom:30,left:40},height:.3*screen.height||200,width:.6*screen.width||600,xTicks:void 0,yTicks:void 0,decimalsX:2,decimalsY:0,forceAxisBounds:!1,interpolation:"curveLinear",yAxisMax:void 0,yAxisMin:void 0,srcFolder:(document.currentScript&&document.currentScript.src||{url:"undefined"==typeof document&&"undefined"==typeof location?url.pathToFileURL(__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("leaflet-elevation.min.js",document.baseURI).href}&&("undefined"==typeof document&&"undefined"==typeof location?url.pathToFileURL(__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("leaflet-elevation.min.js",document.baseURI).href)).split("/").slice(0,-1).join("/")+"/"};L._&&L.i18n||(L._=L.i18n=function(t,e){return t});var B=L.Control.Elevation=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:I,__mileFactor:.621371,__footFactor:3.28084,__D3:"https://unpkg.com/d3@7.8.4/dist/d3.min.js",__TOGEOJSON:"https://unpkg.com/@tmcw/togeojson@5.6.0/dist/togeojson.umd.js",__LGEOMUTIL:"https://unpkg.com/leaflet-geometryutil@0.10.1/src/leaflet.geometryutil.js",__LALMOSTOVER:"https://unpkg.com/leaflet-almostover@1.0.1/src/leaflet.almostover.js",__LHOTLINE:"../libs/leaflet-hotline.min.js",__LDISTANCEM:"../libs/leaflet-distance-marker.min.js",__LEDGESCALE:"../libs/leaflet-edgescale.min.js",__LCHART:"../src/components/chart.js",__LMARKER:"../src/components/marker.js",__LSUMMARY:"../src/components/summary.js",__modulesFolder:"../src/handlers/",__btnIcon:"../images/elevation.svg",addData:function(t,e){var i=this;this.import(this.__D3).then((function(){i._modulesLoaded?(e=e!==null&&e!==void 0?e:t.on&&t,i._addData(t),i._addLayer(e),i._fireEvt("eledata_added",{data:t,layer:e,track_info:i.track_info})):i.once("modules_loaded",(function(){return i.addData(t,e)}))}))},addTo:function(t){if(this.options.detached){var e=v(this.options.elevationDiv),i=this.onAdd(t);e?_(e,i):g(t.getContainer(),i,"afterend")}else L.Control.prototype.addTo.call(this,t);return this},clear:function(){this._marker&&this._marker.remove(),this._chart&&this._clearChart(),this._layers&&this._clearLayers(this._layers),this._markers&&this._clearLayers(this._markers),this._circleMarkers&&this._circleMarkers.remove(),this._hotline&&this._hotline.eachLayer((function(t){return t.options.renderer.remove()})),this._hotline&&this._clearLayers(this._hotline),this._data=[],this.track_info={},this._fireEvt("eledata_clear"),this._updateChart()},_clearChart:function(){var t=this;this._events&&this._events.elechart_updated&&this._events.elechart_updated.forEach((function(e){var i=e.fn,n=e.ctx;return t.off("elechart_updated",i,n)})),this._chart&&this._chart._container&&(this._chart._container.selectAll("g.point .point").remove(),this._chart.clear())},_clearLayers:function(t){(t=t||this._layers)&&t.eachLayer&&(t.eachLayer((function(t){return t.remove()})),t.clearLayers())},disableBrush:function(){this._chart._brushEnabled=!1,this._resetDrag()},enableBrush:function(){this._chart._brushEnabled=!0},disableZoom:function(){this._chart._zoomEnabled=!1,this._chart._resetZoom()},enableZoom:function(){this._chart._zoomEnabled=!0},fitBounds:function(t){t=t||this.getBounds(),this._map&&t.isValid()&&this._map.fitBounds(t)},getBounds:function(t){return L.latLngBounds((t||this._data).map((function(t){return t.latlng})))},getZFollow:function(){return this.options.zFollow},hide:function(){p(this._container,"display","none")},initialize:function(e){e=L.setOptions(this,L.extend({},z(I),e)),this._data=[],this._layers=L.featureGroup(),this._markers=L.featureGroup(),this._hotline=L.featureGroup(),this._circleMarkers=L.featureGroup(),this._markedSegments=L.polyline([]),this._start=L.circleMarker([0,0],e.trkStart||I.trkStart),this._end=L.circleMarker([0,0],e.trkEnd||I.trkEnd),this._chartEnabled=!0,this._yCoordMax=-1/0,this.track_info={},e.followMarker&&(this._setMapView=T(this._setMapView,300,this)),e.legend&&(e.margins.bottom+=30),e.theme&&(e.polylineSegments.className+=" "+e.theme),!0===e.wptIcons&&(e.wptIcons=I.wptIcons),!0===e.distanceMarkers&&(e.distanceMarkers=I.distanceMarkers),e.trkStart&&this._start.addTo(this._circleMarkers),e.trkEnd&&this._end.addTo(this._circleMarkers),this._markedSegments.setStyle(e.polylineSegments),L.extend(t,e.colors||{}),this._fixCanvasPaths(),this._fixTooltipSize()},import:function(t,e){switch(t){case this.__D3:e="object"!=typeof d3;break;case this.__TOGEOJSON:e="object"!=typeof toGeoJSON;break;case this.__LGEOMUTIL:e="object"!=typeof L.GeometryUtil;break;case this.__LALMOSTOVER:e="function"!=typeof L.Handler.AlmostOver;break;case this.__LDISTANCEM:e="function"!=typeof L.DistanceMarkers;break;case this.__LEDGESCALE:e="function"!=typeof L.Control.EdgeScale;break;case this.__LHOTLINE:e="function"!=typeof L.Hotline}return!1!==e?import(o(t,this.options.srcFolder)):Promise.resolve()},load:function(t){var e=this;this._parseFromString(t).then((function(i){return i?e._loadLayer(i):e._loadFile(t)}))},onAdd:function(t){var e=this;this._map=t;var i=this._container=m("div","elevation-control "+this.options.theme+" "+(this.options.detached?"elevation-detached":"leaflet-control"),this.options.detached?{id:"elevation-"+b()}:{});return this.eleDiv||(this.eleDiv=i),this._loadModules(this.options.handlers).then((function(){e._initChart(i),e._initButton(i),e._initSummary(i),e._initMarker(t),e._initLayer(t),e._modulesLoaded=!0,e.fire("modules_loaded")})),this.fire("add"),i},onRemove:function(t){this._container=null,t.off("zoom viewreset zoomanim",this._hideMarker,this).off("resize",this._resetView,this).off("resize",this._resizeChart,this).off("mousedown",this._resetDrag,this),k(t.getContainer(),"mousewheel",this._resetDrag,this),k(t.getContainer(),"touchstart",this._resetDrag,this),k(document,"keydown",this._onKeyDown,this),this.off("eledata_added eledata_loaded",this._updateChart,this).off("eledata_added eledata_loaded",this._updateSummary,this),this.fire("remove")},redraw:function(){this._resizeChart()},setZFollow:function(t){this.options.zFollow=t},show:function(){p(this._container,"display","block")},_addData:function(t){var e=this;if(t){if("FeatureCollection"===t.type)return y(t.features,(function(t){return e._addData(t)}));if("Feature"===t.type){var i=t.geometry;if(i)switch(i.type){case"LineString":return this._addGeoJSONData(i.coordinates,t.properties);case"MultiLineString":return y(i.coordinates,(function(i,n){return e._addGeoJSONData(i,t.properties,n)}));default:return console.warn("Unsopperted GeoJSON feature geometry type:"+i.type)}}return t._latlngs?this._addGeoJSONData(t._latlngs,t.feature&&t.feature.properties):void 0}},_addGeoJSONData:function(t,e,i){var n=this;var o=e&&e.coordinateProperties||e;t.forEach((function(t,e){var r,a,s,l,c;t.meta=(r=t.meta)!==null&&r!==void 0?r:{time:null,ele:null},t.prev=function(t){return t?n._data[e>0?e-1:0][t]:n._data[e>0?e-1:0]},n.fire("elepoint_init",{point:t,props:o,id:e,isMulti:i}),n._addPoint((a=t.lat)!==null&&a!==void 0?a:t[1],(s=t.lng)!==null&&s!==void 0?s:t[0],(c=(l=t.alt)!==null&&l!==void 0?l:t.meta.ele)!==null&&c!==void 0?c:t[2]),n.fire("elepoint_added",{point:t,index:n._data.length-1}),n._yCoordMax<n._data[n._data.length-1][n.options.yAttr]&&(n._yCoordMax=n._data[n._data.length-1][n.options.yAttr])})),this.fire("eletrack_added",{coords:t,index:this._data.length-1})},_addPoint:function(t,e,i){var n;this.options.reverseCoords&&(n=[e,t],t=n[0],e=n[1],n),this._data.push({x:t,y:e,z:i,latlng:L.latLng(t,e,i)}),this.fire("eledata_updated",{index:this._data.length-1})},_addLayer:function(t){return t&&this._layers.addLayer(t),t&&this.options.distanceMarkers&&this.options.distanceMarkers.lazy&&t.on("add remove",(function(t){var e=t.target,i=t.type;return L.DistanceMarkers&&e instanceof L.Polyline&&e[i+"DistanceMarkers"]()})),t},_addMarker:function(t){return t&&this._markers.addLayer(t),t},_initAlmostOverHandler:function(t,e){var i=this;return t&&this.options.almostOver&&!L.Browser.mobile?Promise.all([this.import(this.__LGEOMUTIL),this.import(this.__LALMOSTOVER)]).then((function(){t.addHandler("almostOver",L.Handler.AlmostOver),L.GeometryUtil&&t.almostOver&&t.almostOver.enabled()&&(t.almostOver.addLayer(e),t.on("almost:move",i._onMouseMoveLayer,i).on("almost:out",i._onMouseOut,i),i.once("eledata_clear",(function(){t.almostOver.removeLayer(e),t.off("almost:move",i._onMouseMoveLayer,i).off("almost:out",i._onMouseOut,i)})))})):Promise.resolve()},_initDistanceMarkers:function(){return this.options.distanceMarkers?Promise.all([this.import(this.__LGEOMUTIL),this.import(this.__LDISTANCEM)]):Promise.resolve()},_initEdgeScale:function(t){var e=this;return this.options.edgeScale?Promise.all([this.import(this.__LEDGESCALE)]).then((function(){t.edgeScaleControl=t.edgeScaleControl||L.control.edgeScale("boolean"!=typeof e.options.edgeScale?e.options.edgeScale:{}).addTo(t)})):Promise.resolve()},_initHotLine:function(t){var e=this;var i="string"==typeof this.options.hotline?this.options.hotline:"elevation";return this.options.hotline?this.import(this.__LHOTLINE).then((function(){t.eachLayer((function(t){if("Point"!=t.feature.geometry.type){var n=L.geoJson(t.toGeoJSON(),{coordsToLatLng:function(t){return L.latLng(t[0],t[1],t[2]*(e.options.altitudeFactor||1))}}),o=L.hotline(n.toGeoJSON().features[0].geometry.coordinates,{renderer:L.Hotline.renderer(),min:isFinite(e.track_info[i+"_min"])?e.track_info[i+"_min"]:0,max:isFinite(e.track_info[i+"_max"])?e.track_info[i+"_max"]:1,palette:{0:"#008800",.5:"#ffff00",1:"#ff0000"},weight:5,outlineColor:"#000000",outlineWidth:1}).addTo(e._hotline),r=t.options.style&&t.options.style.opacity||1;t.on("add remove",(function(e){var i=e.type;t.setStyle({opacity:"add"==i?0:r}),o["add"==i?"addTo":"removeFrom"](t._map),o._renderer&&o._renderer._container.parentElement.insertBefore(o._renderer._container,o._renderer._container.parentElement.firstChild)}))}}))})):Promise.resolve()},_initMapIntegrations:function(t){var e=this;var i=this._map;i?(this._data.length&&(this._start.setLatLng(this._data[0].latlng),this._end.setLatLng(this._data[this._data.length-1].latlng)),Promise.all([this._initHotLine(t),this._initAlmostOverHandler(i,t),this._initDistanceMarkers(),this._initEdgeScale(i)]).then((function(){e.options.polyline&&(e._layers.addLayer(t.addTo(i)),e._circleMarkers.addTo(i)),e.options.autofitBounds&&e.fitBounds(t.getBounds()),i.invalidateSize()}))):this.once("add",(function(){return e._initMapIntegrations(t)}))},_collapse:function(){u(this._container,"elevation-expanded","elevation-collapsed"),this._map&&this._map.invalidateSize()},_expand:function(){u(this._container,"elevation-collapsed","elevation-expanded"),this._map&&this._map.invalidateSize()},_fixCanvasPaths:function(){var e=L.Canvas.prototype._fillStroke,i=this,n=this.options.theme.split(" ")[0].replace("-theme",""),o=t[n]||{};L.Canvas.include({_fillStroke:function(t,r){if(i._layers.hasLayer(r)){var a=r.options;if(a.color=o.line||o.area||n,a.stroke=!!a.color,e.call(this,t,r),a.stroke&&0!==a.weight){var s=t.globalCompositeOperation||"source-over";t.globalCompositeOperation="destination-over",t.strokeStyle=o.outline||"#FFF",t.lineWidth=1.75*a.weight,t.stroke(),t.globalCompositeOperation=s}}else e.call(this,t,r)}})},_fixTooltipSize:function(){var t=this;this.on("elechart_init",(function(){return t.once("elechart_change elechart_hover",(function(e){var i=e.data,n=e.xCoord;t._chartEnabled&&(t._chart._showDiagramIndicator(i,n),t._chart._showDiagramIndicator(i,n)),t._updateMarker(i)}))}))},_findItemForLatLng:function(t){return this._data[this._chart._findIndexForLatLng(t)]},_findItemForX:function(t){return this._data[this._chart._findIndexForXCoord(t)]},_fireEvt:function(t,e,i){this.fire&&this.fire(t,e,i),this._map&&this._map.fire(t,e,i)},_hideMarker:function(){this.options.autohideMarker&&this._marker.remove()},_initChart:function(t){var e=this;var i=this.options,n=this._map;if(i.detached){var o=this.eleDiv,r=o.offsetWidth,a=o.offsetHeight;r>0&&(i.width=r),a>20&&(i.height=a-20)}else{var s=n.getContainer().clientWidth;i._maxWidth=i._maxWidth>i.width?i._maxWidth:i.width,this._container.style.maxWidth=i._maxWidth+"px",i._maxWidth>s&&(i.width=s-30)}Promise.all([this.import(this.__D3),this.import(this.__LCHART)]).then((function(o){var r=e._chart=new(o[1]||B).Chart(i,e);e._x=e._chart._x,e._y=e._chart._y,d3.select(t).call(r.render()),r.on("reset_drag",e._hideMarker,e).on("mouse_enter",e._onMouseEnter,e).on("dragged",e._onDragEnd,e).on("mouse_move",e._onMouseMove,e).on("mouse_out",e._onMouseOut,e).on("ruler_filter",e._onRulerFilter,e).on("zoom",e._updateChart,e).on("elepath_toggle",e._onToggleChart,e).on("margins_updated",e._resizeChart,e),e.fire("elechart_init"),n.on("zoom viewreset zoomanim",e._hideMarker,e).on("resize",e._resetView,e).on("resize",e._resizeChart,e).on("rotate",e._rotateMarker,e).on("mousedown",e._resetDrag,e),x(n.getContainer(),"mousewheel",e._resetDrag,e),x(n.getContainer(),"touchstart",e._resetDrag,e),x(document,"keydown",e._onKeyDown,e),e.on("eledata_added eledata_loaded",e._updateChart,e).on("eledata_added eledata_loaded",e._updateSummary,e),e._updateChart(),e._updateSummary()}))},_initLayer:function(){var t=this;this._layers.on("layeradd layerremove",(function(e){var i=e.layer,n=e.type;var o=i.getElement&&i.getElement();h(o,t.options.polyline.className+" "+t.options.theme,"layeradd"==n),f(i,"mousemove",t._onMouseMoveLayer.bind(t),"layeradd"==n),f(i,"mouseout",t._onMouseOut.bind(t),"layeradd"==n)}))},_initMarker:function(t){var e=this;var i=t.getPane("elevationPane");i||(i=this._pane=t.createPane("elevationPane",t.getPane("norotatePane")||t.getPane("mapPane")),i.style.zIndex=625,i.style.pointerEvents="none"),this._renderer&&this._renderer.remove(),this._renderer=L.svg({pane:"elevationPane"}).addTo(this._map),Promise.all([this.import(this.__D3),this.import(this.__LMARKER)]).then((function(t){e._marker=new(t[1]||B).Marker(e.options,e),e.fire("elechart_marker")}))},_initButton:function(t){if(L.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),this.options.collapsed?this._collapse():this._expand(),this.options.autohide&&(x(t,"mouseover",this._expand,this),x(t,"mouseout",this._collapse,this),this._map.on("click",this._collapse,this)),this.options.closeBtn){var e=this._button=m("a","elevation-toggle-icon",{href:"#",title:L._("Elevation")},t);x(e,"click",L.DomEvent.stop),x(e,"click",this._toggle,this),x(e,"focus",this._toggle,this),fetch(o(this.__btnIcon,this.options.srcFolder)).then((function(t){return t.ok&&t.text().then((function(t){return e.innerHTML=t}))}))}},_initSummary:function(t){var e=this;this.import(this.__LSUMMARY).then((function(i){e._summary=new(i||B).Summary({summary:e.options.summary},e),e.on("elechart_init",(function(){d3.select(t).call(e._summary.render())}))}))},_loadFile:function(t){var e=this;fetch(t).then((function(t){return t.text()})).then((function(i){e._downloadURL=t,e._parseFromString(i).then((function(t){return t&&e._loadLayer(t)}))})).catch((function(t){return console.warn(t)}))},_loadModules:function(t){var e=this;var i=(t=t.map((function(t){return"string"==typeof t&&void 0!==B[t]?B[t]:t}))).map((function(t){return"string"==typeof t&&e.import(e.__modulesFolder+t.toLowerCase()+".js")||t instanceof Promise&&t||Promise.resolve()}));return Promise.all(i).then((function(i){y(i,(function(e,i){var n;var o=e&&Object.keys(e)[0];o&&(t[i]=B[o]=(n=B[o])!==null&&n!==void 0?n:e[o])})),y(t,(function(t){return["function","object"].includes(typeof t)&&e._registerHandler(t)}))}))},_loadLayer:function(t){var e=this;var i=this.options,n=i.polyline,o=i.theme,r=i.waypoints,a=i.wptIcons,s=i.wptLabels,l=i.distanceMarkers,c=L.extend({},n);o&&(c.className+=" "+o),t.name&&(this.track_info.name=t.name);var h=L.geoJson(t,{distanceMarkers:l,style:c,pointToLayer:function(t,i){if(r){var n=t.properties,o=n.desc,l=n.name,c=n.sym;if(o=o||"",l=l||"",[!0,"dots"].includes(r)&&e._registerCheckPoint({latlng:i,label:[!0,"dots"].includes(s)?l:""}),[!0,"markers"].includes(r)&&0!=a)return e._registerMarker({latlng:i,sym:(c!==null&&c!==void 0?c:l).replace(" ","-").replace('"',"").replace("'","").toLowerCase(),content:[!0,"markers"].includes(s)&&(l||o)&&decodeURI("<b>"+l+"</b>"+(o.length>0?"<br>"+o:""))})}},onEachFeature:function(t,i){return t.geometry&&"Point"!=t.geometry.type&&e.addData(t,i)}});return this.import(this.__D3).then((function(){e._initMapIntegrations(h);var i={data:t,layer:h,name:e.track_info.name,track_info:e.track_info};e._modulesLoaded?e._fireEvt("eledata_loaded",i):e.once("modules_loaded",(function(){return e._fireEvt("eledata_loaded",i)}))})),h},_onDragEnd:function(t){var e=t.dragstart,i=t.dragend;this._hideMarker(),this.fitBounds(L.latLngBounds([e.latlng,i.latlng])),this.fire("elechart_dragged")},_onKeyDown:function(t){var e=t.key;this.options.detached||"Escape"!==e||this._collapse()},_onMouseEnter:function(){this.fire("elechart_enter")},_onMouseMove:function(t){var e=t.xCoord;if(this._chartEnabled&&this._data.length){var i=this._findItemForX(e);i&&(this._chartEnabled&&this._chart._showDiagramIndicator(i,e),this._updateMarker(i),this._setMapView(i),this._map&&l(this._map.getContainer(),"elechart-hover"),this.fire("elechart_change",{data:i,xCoord:e}),this.fire("elechart_hover",{data:i,xCoord:e}))}},_onMouseMoveLayer:function(t){var e=t.latlng;if(this._data.length){var i=this._findItemForLatLng(e);if(i){var n=i.xDiagCoord;this._chartEnabled&&this._chart._showDiagramIndicator(i,n),this._updateMarker(i),this.fire("elechart_change",{data:i,xCoord:n})}}},_onMouseOut:function(){this.options.detached||(this._hideMarker(),this._chart._hideDiagramIndicator()),this._map&&c(this._map.getContainer(),"elechart-hover"),this.fire("elechart_leave")},_onRulerFilter:function(t){var e=t.coords;this._updateMapSegments(e)},_onToggleChart:function(t){var e=this;var i=t.name,n=t.enabled;this._chartEnabled=this._chart._hasActiveLayers(),this._layers.eachLayer((function(t){return h(t.getElement&&t.getElement(),e.options.polyline.className+" "+e.options.theme,e._chartEnabled)})),this.options[i]=n||"disabled"!=this.options[i]?"disabled":"enabled",this._chartEnabled||(this._chart._hideDiagramIndicator(),this._marker.remove())},_parseFromGeoJSONString:function(t){try{return JSON.parse(t)}catch(t){}},_parseFromString:function(t){var e=this;return new Promise((function(i){return e.import(e.__TOGEOJSON).then((function(){var n;try{n=e._parseFromXMLString(t.trim())}catch(i){n=e._parseFromGeoJSONString(t.toString())}n&&(n.name=n.name||(e._downloadURL||"").split("/").pop().split("#")[0].split("?")[0]),i(n)}))}))},_parseFromXMLString:function(t){var e;if(0!=t.indexOf("<"))throw"Invalid XML";var i=(new DOMParser).parseFromString(t,"text/xml"),n=i.documentElement.tagName.toLowerCase(),o=i.getElementsByTagName("name");if(i.getElementsByTagName("parsererror").length)throw"Invalid XML";n in toGeoJSON||(n="TrainingCenterDatabase"==i.documentElement.tagName?"tcx":"gpx");var r=toGeoJSON[n](i);return r.name=o.length>0?((e=Array.from(o).find((function(t){return"trk"==t.parentElement.tagName})))!==null&&e!==void 0?e:o[0]).textContent:"",r},_registerAreaPath:function(t){var e=this;this.on("elechart_init",(function(){return e._chart._registerAreaPath(t)}))},_registerAxisGrid:function(t){var e=this;this.on("elechart_axis",(function(){return e._chart._registerAxisGrid(t)}))},_registerAxisScale:function(t){var e=this;this.on("elechart_axis",(function(){return e._chart._registerAxisScale(t)}))},_registerCheckPoint:function(t){var e=this;var i=function(){return e._chart._registerCheckPoint(t)};this.on("elechart_updated",i).once("eledata_clear",(function(){return e.off("elechart_updated",i)}))},_registerDataAttribute:function(t){var e=this;t.coordPropsToMeta&&this.on("elepoint_init",(function(i){return t.coordPropsToMeta.call(e,i)}));var i,n,o,r=t.attr||t.name,a={};this.on("elepoint_added",(function(s){var l=s.index,c=s.point;if(i=l,o=n!==null&&n!==void 0?n:e._data[i],n=e._data[i],n[r]=t.pointToAttr.call(e,c,i),i>0&&isNaN(o[r])&&(isNaN(a[r])||isNaN(n[r])?isNaN(a[r])?isNaN(n[r])||(o[r]=n[r]):o[r]=a[r]:o[r]=(a[r]+n[r])/2,t.meta&&(o[t.meta]=o[r])),!isNaN(n[r])){if(a[r]=n[r],t.deltaMax&&(n[r]=O(n[r],o[r],t.deltaMax)),t.clampRange&&(n[r]=M(n[r],t.clampRange)),isNaN(t.decimals)||(n[r]=C(n[r],t.decimals)),t.stats)for(var h in t.stats){var u=(t.statsName||r)+(""!=h?"_":"");e.track_info[u+h]=t.stats[h].call(e,n[r],e.track_info[u+h],e._data.length)}t.onPointAdded&&t.onPointAdded.call(e,n[r],i,c)}}))},_registerHandler:function(t){var e=this;if("function"==typeof t)return this._registerHandler(t.call(this));var i=t.name,n=t.attr,o=t.required,r=t.deltaMax,s=t.clampRange,l=t.decimals,c=t.meta,h=t.unit,u=t.coordinateProperties,p=t.coordPropsToMeta,d=t.pointToAttr,f=t.onPointAdded,m=t.stats,_=t.statsName,g=t.grid,v=t.scale,b=t.path,w=t.tooltip,x=t.summary;(this.options[i]||o)&&(this._registerDataAttribute({name:i,attr:n,meta:c,deltaMax:r,clampRange:s,decimals:l,coordPropsToMeta:a(u,c||i,p),pointToAttr:d,onPointAdded:f,stats:m,statsName:_}),g&&this._registerAxisGrid(L.extend({name:i},g)),"summary"!==this.options[i]&&(v&&this._registerAxisScale(L.extend({name:i,label:h},v)),b&&this._registerAreaPath(L.extend({name:i},b))),(w||t.tooltips)&&y(__spreadArray([w],t.tooltips||[],true),(function(t){return t&&e._registerTooltip(L.extend({name:i},t))})),x&&(y(x,(function(t,e){return x[e]=L.extend({unit:h},t)})),this._registerSummary(x)))},_registerMarker:function(t){var e=t.latlng,i=t.sym,n=t.content;var o=this.options.wptIcons;o.hasOwnProperty(i)||(o[i]=L.divIcon(L.extend({},o[""].options,{html:'<i class="elevation-waypoint-icon '+i+'"></i>'})));var r=L.marker(e,{icon:o[i]});return n&&(r.bindPopup(n,{className:"elevation-popup",keepInView:!0}).openPopup(),r.bindTooltip(n,{className:"elevation-tooltip",direction:"auto",sticky:!0,opacity:1}).openTooltip()),this._addMarker(r)},_registerTooltip:function(t){var e=this;t.chart&&this.on("elechart_init",(function(){return e._chart._registerTooltip(L.extend({},t,{value:t.chart}))})),t.marker&&this.on("elechart_marker",(function(){return e._marker._registerTooltip(L.extend({},t,{value:t.marker}))}))},_registerSummary:function(t){var e=this;this.on("elechart_summary",(function(){return e._summary._registerSummary(t)}))},_resetDrag:function(){this._chart._resetDrag(),this._hideMarker()},_resetView:function(){this._map&&this._map._isFullscreen||(this._resetDrag(),this._hideMarker(),this.options.autofitBounds&&this.fitBounds())},_resizeChart:function(){if(this._container&&"none"!=p(this._container,"display")){var t=this.options,e=t.detached?(this.eleDiv||this._container).offsetWidth:M(t._maxWidth,[0,this._map.getContainer().clientWidth-30]);e&&(t.width=e,this._chart&&this._chart._chart&&(this._chart._chart._resize(t),this._updateChart())),this._updateMapSegments()}},_toggle:function(){A(this._container,"elevation-expanded")?this._collapse():this._expand()},_setMapView:function(t){if(this._map&&this.options.followMarker){var e=this._map.getZoom(),i=this.options.zFollow;"number"==typeof i?this._map.setView(t.latlng,e<i?i:e,{animate:!0,duration:.25}):this._map.getBounds().contains(t.latlng)||this._map.setView(t.latlng,e,{animate:!0,duration:.25})}},_updateChart:function(){this._chart&&this._container&&(this.fire("elechart_axis"),this._chart.update({data:this._data,options:this.options}),this._x=this._chart._x,this._y=this._chart._y,this.fire("elechart_updated"))},_updateMarker:function(t){this._marker&&this._marker.update({map:this._map,item:t,yCoordMax:this._yCoordMax||0,options:this.options})},_rotateMarker:function(){this._marker&&this._marker.update()},_updateMapSegments:function(t){this._markedSegments.setLatLngs(t||[]),t&&this._map&&!this._map.hasLayer(this._markedSegments)&&this._markedSegments.addTo(this._map)},_updateSummary:function(){var t=this;this._summary&&(this._summary.reset(),this.options.summary&&(this.fire("elechart_summary"),this._summary.update()),this.options.downloadLink&&this._downloadURL&&(this._summary._container.innerHTML+='<span class="download"><a href="#">'+L._("Download")+"</a></span>",v(".download a",this._summary._container).onclick=function(e){e.preventDefault();var i={downloadLink:t.options.downloadLink,confirm:r.bind(t,t._downloadURL)};"modal"==t.options.downloadLink&&"function"==typeof CustomEvent?document.dispatchEvent(new CustomEvent("eletrack_download",{detail:i})):"link"!=t.options.downloadLink&&!0!==t.options.downloadLink||i.confirm(),t.fire("eletrack_download",i)}))},_width:function(){if(this._chart)return this._chart._width();var t=this.options,e=t.width,i=t.margins;return e-i.left-i.right},_height:function(){if(this._chart)return this._chart._height();var t=this.options,e=t.height,i=t.margins;return e-i.top-i.bottom}});B.Utils=E,L.control.elevation=function(t){return new B(t)}}));createCommonjsModule((function(t,e){!function(t,i){i(e)}(commonjsGlobal,(function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):(t.getLatLng?this._map?t.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow())):(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t})):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t})),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,o=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,c=0,h=!0;if(this._map){var u=(new Date).getTime(),p=L.bind((function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();c<l;c++){if(r&&c%200==0){var f=(new Date).getTime()-d;if(a<f)break}if((i=t[c])instanceof L.LayerGroup)h&&(t=t.slice(),h=!1),this._extractNonGroupLayers(i,t),l=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var m=i.__parent.getAllChildMarkers(),_=m[0]===i?m[1]:m[0];n.removeLayer(_)}}else o.addLayer(i),e||this.fire("layeradd",{layer:i})}s&&s(c,l,(new Date).getTime()-u),c===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)}),this);p()}else for(var d=this._needsClustering;c<l;c++)(i=t[c])instanceof L.LayerGroup?(h&&(t=t.slice(),h=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||d.push(i):o.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,o=this._featureGroup,r=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),r.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=n;for(e=0;e<l;e++)(i=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,s),l=s.length):this._unspiderfyLayer(i)}for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(r.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;0<=e;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,r=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),n=r.length-1;0<=n;n--){for(i=!0,o=a.length-1;0<=o;o--)if(a[o].layer===r[n]){i=!1;break}i&&t.call(e,r[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(i){L.stamp(i)===t&&(e=i)})),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;0<=e;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;0<=e;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;"function"!=typeof e&&(e=function(){});var n=function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;0<=i;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());o<=e&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,a=this._map,s=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,c=t.__parent,h=c._markers;for(this._arraySplice(h,t);c&&(c._childCount--,c._boundsNeedUpdate=!0,!(c._zoom<s));)e&&c._childCount<=1?(l=c._markers[0]===t?c._markers[1]:c._markers[0],n[c._zoom].removeObject(c,a.project(c._cLatLng,c._zoom)),o[c._zoom].addObject(l,a.project(l.getLatLng(),c._zoom)),this._arraySplice(c.__parent._childClusters,c),c.__parent._markers.push(l),l.__parent=c.__parent,c._icon&&(r.removeLayer(c),i||r.addLayer(l))):c._iconNeedsUpdate=!0,c=c.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom;(e||n||o)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),2<t.layer.getChildCount()&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,o=this._map;(t||i||n)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),o.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;e<=o;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,o=this._gridClusters,r=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);a<=e;e--){i=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(i);if(s)return s._addChild(t),void(t.__parent=s);if(s=r[e].getNearObject(i)){var l=s.__parent;l&&this._removeLayer(s,!1);var c=new this._markerCluster(this,e,s,t);o[e].addObject(c,this._map.project(c._cLatLng,e)),s.__parent=c;var h=t.__parent=c;for(n=e-1;n>l._zoom;n--)h=new this._markerCluster(this,n,h),o[n].addObject(h,this._map.project(s.getLatLng(),n));return l._addChild(h),void this._removeFromGridUnclustered(s,e)}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),o=this._featureGroup,r=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,r,(function(r){var a,s=r._latlng,l=r._markers;for(n.contains(s)||(s=null),r._isSingleParent()&&t+1===e?(o.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.clusterHide(),r._recursivelyAddChildrenToMap(s,e,n)),i=l.length-1;0<=i;i--)a=l[i],n.contains(a._latlng)||o.removeLayer(a)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),o.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(n,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(n,t,r,(function(t){o.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(2<e._childCount?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()}))):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue((function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(n,i,o,(function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)}));r._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var n=this._markers.length-1;0<=n;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,o=n.getBoundsZoom(this._bounds),r=this._zoom+1,a=n.getZoom();0<i.length&&r<o;){r++;var s=[];for(e=0;e<i.length;e++)s=s.concat(i[e]._childClusters);i=s}r<o?this._group._map.setView(this._latlng,r):o<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,o=this._markers,r=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)i=o[t]._latlng,this._bounds.extend(i),a+=i.lat,s+=i.lng;for(t=0;t<r.length;t++)(e=r[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,a+=i.lat*n,s+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,(function(t){var i,n,o=t._markers;for(i=o.length-1;0<=i;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}),(function(t){var i,n,o=t._childClusters;for(i=o.length-1;0<=i;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,(function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,(function(n){if(e!==n._zoom)for(var o=n._markers.length-1;0<=o;o--){var r=n._markers[o];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),n._group._featureGroup.addLayer(r))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;0<=e;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;0<=o;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,r;this._recursively(t,e-1,i-1,(function(t){for(r=t._markers.length-1;0<=r;r--)o=t._markers[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}),(function(t){for(r=t._childClusters.length-1;0<=r;r--)o=t._childClusters[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}))},_recursively:function(t,e,i,n,o){var r,a,s=this._childClusters,l=this._zoom;if(e<=l&&(n&&n(this),o&&l===i&&o(this)),l<e||l<i)for(r=s.length-1;0<=r;r--)(a=s[r])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,i,n,o)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,r=o[n]=o[n]||{},a=r[i]=r[i]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),r=this._getCoord(e.y),a=this._grid,s=a[r]=a[r]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i<n;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete s[o],!0},eachObject:function(t,e){var i,n,o,r,a,s,l=this._grid;for(i in l)for(n in a=l[i])for(o=0,r=(s=a[n]).length;o<r;o++)t.call(e,s[o])&&(o--,r--)},getNearObject:function(t){var e,i,n,o,r,a,s,l,c=this._getCoord(t.x),h=this._getCoord(t.y),u=this._objectPoint,p=this._sqCellSize,d=null;for(e=h-1;e<=h+1;e++)if(o=this._grid[e])for(i=c-1;i<=c+1;i++)if(r=o[i])for(n=0,a=r.length;n<a;n++)s=r[n],((l=this._sqDist(u[L.Util.stamp(s)],t))<p||l<=p&&null===d)&&(p=l,d=s);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,o,r=0,a=null,s=[];for(i=e.length-1;0<=i;i--)n=e[i],0<(o=this.getDistant(n,t))&&(s.push(n),r<o&&(r=o,a=n));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,o=!1,r=!1,a=null,s=null,l=null,c=null,h=null,u=null;for(e=t.length-1;0<=e;e--){var p=t[e];(!1===i||p.lat>i)&&(i=(a=p).lat),(!1===n||p.lat<n)&&(n=(s=p).lat),(!1===o||p.lng>o)&&(o=(l=p).lng),(!1===r||p.lng<r)&&(r=(c=p).lng)}return h=n!==i?(u=s,a):(u=c,l),[].concat(this.buildConvexHull([u,h],t),this.buildConvexHull([h,u],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;0<=e;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),t=(this._group._spiderfied=this)._group.options.spiderfyShapePositions?this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(e.length,i):(i.y+=10,this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,r=this._2PI/t,a=[];for(o=Math.max(o,35),a.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*r,a[i]=new L.Point(e.x+o*Math.cos(n),e.y+o*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,o=n*this._spiralLengthStart,r=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,s=0,l=[];for(i=l.length=t;0<=i;i--)i<t&&(l[i]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=a/(s+=r/o+5e-4*i);return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,r=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=r.length-1;0<=e;e--)t=r[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:r}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,r,a=this._group,s=a._map,l=a._featureGroup,c=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,i=0;i<t.length;i++)r=s.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,r],c),s.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,r,a,s,l=this,c=this._group,h=c._map,u=c._featureGroup,p=this._latlng,d=h.latLngToLayerPoint(p),f=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),_=m.opacity;for(void 0===_&&(_=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=_,c._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],s=h.layerPointToLatLng(e[i]),o=new L.Polyline([p,s],m),h.addLayer(o),n._spiderLeg=o,f&&(a=(r=o._path).getTotalLength()+.1,r.style.strokeDasharray=a,r.style.strokeDashoffset=a),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),u.addLayer(n),n._setPos&&n._setPos(d);for(c._forceLayout(),c._animationStart(),i=t.length-1;0<=i;i--)s=h.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.clusterShow&&n.clusterShow(),f&&((r=(o=n._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:_}));this.setOpacity(.3),c._ignoreMove=!1,setTimeout((function(){c._animationEnd(),c.fire("spiderfied",{cluster:l,markers:t})}),200)},_animationUnspiderfy:function(t){var e,i,n,o,r,a,s=this,l=this._group,c=l._map,h=l._featureGroup,u=t?c._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):c.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=p.length-1;0<=i;i--)(e=p[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(u),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&h.removeLayer(e),d&&(r=(o=(n=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=r,n.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout((function(){var t=0;for(i=p.length-1;0<=i;i--)(e=p[i])._spiderLeg&&t++;for(i=p.length-1;0<=i;i--)(e=p[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),1<t&&h.removeLayer(e),c.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:p})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}))}));function getTrekGeometry(t){return fetch("".concat(state.api,"trek/").concat(t,"/?language=").concat(state.language,"&published=true&fields=geometry"),{cache:"default"}).then((function(t){return t.json()}))}var grwMapCss='@charset "UTF-8";.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;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.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 img.leaflet-tile{mix-blend-mode:plus-lighter}.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{-webkit-filter:inherit;filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;-webkit-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:-webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1);transition:transform 0.25s cubic-bezier(0, 0, 0.25, 1);transition:transform 0.25s cubic-bezier(0, 0, 0.25, 1), -webkit-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{-webkit-box-shadow:0 1px 5px rgba(0, 0, 0, 0.65);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{-webkit-box-shadow:0 1px 5px rgba(0, 0, 0, 0.4);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-attribution-flag{display:inline !important;vertical-align:baseline !important;width:1em;height:0.6669em}.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;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(255, 255, 255, 0.8);text-shadow:1px 1px #fff}.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{-webkit-box-shadow:none;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;-webkit-box-shadow:0 3px 14px rgba(0, 0, 0, 0.4);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}.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;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.4);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;print-color-adjust:exact}}.leaflet-control-locate a{cursor:pointer}.leaflet-control-locate a .leaflet-control-locate-location-arrow{display:inline-block;width:16px;height:16px;margin:7px;background-image:url(\'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="black" d="M445 4 29 195c-48 23-32 93 19 93h176v176c0 51 70 67 93 19L508 67c16-38-25-79-63-63z"/></svg>\')}.leaflet-control-locate a .leaflet-control-locate-spinner{display:inline-block;width:16px;height:16px;margin:7px;background-image:url(\'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="black" d="M304 48a48 48 0 1 1-96 0 48 48 0 0 1 96 0zm-48 368a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm208-208a48 48 0 1 0 0 96 48 48 0 0 0 0-96zM96 256a48 48 0 1 0-96 0 48 48 0 0 0 96 0zm13 99a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm294 0a48 48 0 1 0 0 96 48 48 0 0 0 0-96zM109 61a48 48 0 1 0 0 96 48 48 0 0 0 0-96z"/></svg>\');-webkit-animation:leaflet-control-locate-spin 2s linear infinite;animation:leaflet-control-locate-spin 2s linear infinite}.leaflet-control-locate.active a .leaflet-control-locate-location-arrow{background-image:url(\'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="rgb(32, 116, 182)" d="M445 4 29 195c-48 23-32 93 19 93h176v176c0 51 70 67 93 19L508 67c16-38-25-79-63-63z"/></svg>\')}.leaflet-control-locate.following a .leaflet-control-locate-location-arrow{background-image:url(\'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="rgb(252, 132, 40)" d="M445 4 29 195c-48 23-32 93 19 93h176v176c0 51 70 67 93 19L508 67c16-38-25-79-63-63z"/></svg>\')}.leaflet-touch .leaflet-bar .leaflet-locate-text-active{width:100%;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0 10px}.leaflet-touch .leaflet-bar .leaflet-locate-text-active .leaflet-locate-icon{padding:0 5px 0 0}.leaflet-control-locate-location circle{-webkit-animation:leaflet-control-locate-throb 4s ease infinite;animation:leaflet-control-locate-throb 4s ease infinite}@-webkit-keyframes leaflet-control-locate-throb{0%{stroke-width:1}50%{stroke-width:3;-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}100%{stroke-width:1}}@keyframes leaflet-control-locate-throb{0%{stroke-width:1}50%{stroke-width:3;-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}100%{stroke-width:1}}@-webkit-keyframes leaflet-control-locate-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes leaflet-control-locate-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.leaflet-hidden{visibility:hidden}.legend{cursor:pointer}.leaflet-container{z-index:0}.elevation-control .background{background-color:var(--ele-bg, rgba(70, 130, 180, 0.2));border-radius:5px;display:block;max-width:100%;overflow:visible;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elevation-control .area>foreignObject,.elevation-control .axis,.elevation-control .grid,.elevation-control .tooltip,.height-focus.line{pointer-events:none}.elevation-control .axis line,.elevation-control .axis path{stroke:var(--ele-axis, #2d1130);stroke-width:1;fill:none}.elevation-control .grid .tick line{stroke:var(--ele-grid, #eee);stroke-width:1px;shape-rendering:crispEdges}.elevation-control .grid path{stroke-width:0}.elevation-control .axis text,.elevation-control .legend text,.elevation-control .point text{fill:#000;stroke:#fff;stroke-width:2px;font-weight:700;paint-order:stroke fill}.elevation-control .y.axis text{text-anchor:end}.elevation-control .area{fill:var(--ele-area, #4682b4);stroke:var(--ele-stroke, #000);stroke-width:1.2;paint-order:stroke fill}.elevation-control .horizontal-drag-line{stroke:transparent;stroke-dasharray:5;stroke-width:1.1;cursor:row-resize}.elevation-control .active .horizontal-drag-line{stroke:#000}.elevation-control .horizontal-drag-label{fill:#000;stroke:#fff;stroke-width:2px;font-weight:700;paint-order:stroke}.elevation-control .ruler{color:#000;cursor:row-resize}.elevation-control .mouse-focus-line{stroke:#000;stroke-width:1}.elevation-control .mouse-focus-label-rect{fill:#000;fill-opacity:0.75;stroke-width:1;stroke:#444}.elevation-control .mouse-focus-label-text{fill:#fff;font-size:10px}.elevation-control .brush .overlay{cursor:unset}.elevation-control .brush .selection{fill:var(--ele-brush, rgba(23, 74, 117, 0.4));stroke:none;fill-opacity:unset}.elevation-summary{font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif;font-size:12px;margin:var(--ele-sum-margin, 0 auto);text-shadow:var(--ele-sum-shadow, 1px 0 0 #fff, -1px 0 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff)}.elevation-summary>span:not(:last-child):after{content:var(--ele-sum-sep, "")}.multiline-summary>span{display:block}.multiline-summary .download{float:right;font-size:1.2em;font-weight:700;margin-right:2em;margin-top:-3em}.elevation-summary .summaryvalue{font-weight:700}.elevation-toggle-icon{background-color:#fff;border-radius:5px;-webkit-box-shadow:0 1px 7px rgba(0, 0, 0, 0.4);box-shadow:0 1px 7px rgba(0, 0, 0, 0.4);cursor:pointer;display:inline-block;height:var(--ele-toggle-size, 36px);position:var(--ele-toggle-pos, relative);right:5px;top:5px;width:var(--ele-toggle-size, 36px)}.elevation-toggle-icon:before{color:#000;content:"✖";display:var(--ele-close-btn, none);font-size:15px;font-weight:700;line-height:20px;text-align:center;width:100%}.leaflet-elevation-pane .height-focus,.leaflet-overlay-pane .height-focus{stroke:#000;fill:var(--ele-circle, var(--ele-area, #fff))}.leaflet-elevation-pane .height-focus.line,.leaflet-overlay-pane .height-focus.line{stroke-width:2}.leaflet-elevation-pane .height-focus-label,.leaflet-overlay-pane .height-focus-label{fill:#000;stroke:#fff;stroke-width:2px;font-size:12px;font-weight:600;paint-order:stroke}.elevation-position-icon:before,.elevation-waypoint-icon:before{background:var(--ele-marker) no-repeat center center/contain;content:"";display:inline-block;height:100%;width:100%}.elevation-polyline{stroke:var(--ele-poly, var(--ele-area, #000));-webkit-filter:drop-shadow(1px 1px 0 #FFF) drop-shadow(-1px -1px 0 #FFF) drop-shadow(1px -1px 0 #FFF) drop-shadow(-1px 1px 0 #FFF);filter:drop-shadow(1px 1px 0 #FFF) drop-shadow(-1px -1px 0 #FFF) drop-shadow(1px -1px 0 #FFF) drop-shadow(-1px 1px 0 #FFF)}.elevation-detached{font:12px/1.5 Helvetica Neue, Arial, Helvetica, sans-serif;height:auto;position:relative;width:100%;z-index:0}.elevation-detached .area{fill-opacity:var(--ele-alpha, 0.8)}.elevation-detached.elevation-collapsed .elevation-summary{display:block}.elevation-detached.elevation-collapsed .elevation-toggle-icon{bottom:5px;margin:auto;right:9px;top:5px}.elevation-control.elevation-collapsed>*{display:none}.elevation-control.elevation-collapsed>.elevation-toggle-icon{display:inline-block}.elevation-detached{--ele-sum-margin:12px 35px;--ele-sum-shadow:none;--ele-toggle-pos:absolute}.elevation-expanded{--ele-close-btn:inline-block;--ele-toggle-bg:none;--ele-toggle-pos:absolute;--ele-toggle-size:20px}.inline-summary{--ele-sum-sep:" — "}.elevation-waypoint-icon{--ele-marker:url(../images/elevation-pushpin.svg)}.elevation-position-icon{--ele-marker:url(../images/elevation-position.svg)}.lime-theme{--ele-bg:rgba(156,194,34,.2);--ele-axis:#566b13;--ele-area:#9cc222;--ele-grid:#ccc;--ele-brush:rgba(99,126,11,.4);--ele-poly:#566b13;--ele-line:#70ab00}.steelblue-theme{--ele-axis:#0d1821;--ele-area:#4682b4;--ele-brush:rgba(23,74,117,.4);--ele-line:#174a75}.purple-theme{--ele-bg:rgba(115,44,123,.2);--ele-area:#732c7b;--ele-brush:rgba(74,14,80,.4);--ele-line:#732c7b}.yellow-theme{--ele-area:#ff0}.red-theme{--ele-area:red}.magenta-theme{--ele-bg:hsla(0,0%,100%,.47);--ele-area:#ff005e}.lightblue-theme{--ele-area:#36c;--ele-alpha:0.45;--ele-stroke:#4682b4;--ele-circle:#fff;--ele-line:#000}.elevation-detached.lightblue-theme .area{stroke:#36c}.dist-marker{background:#fff;border:1px solid #777;border-radius:10px;color:#000;font-size:0.5rem;text-align:center}.leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:-webkit-transform 0.3s ease-out, opacity 0.3s ease-in;-moz-transition:-moz-transform 0.3s ease-out, opacity 0.3s ease-in;-o-transition:-o-transform 0.3s ease-out, opacity 0.3s ease-in;-webkit-transition:opacity 0.3s ease-in, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-in, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-in;transition:transform 0.3s ease-out, opacity 0.3s ease-in, -webkit-transform 0.3s ease-out}.leaflet-cluster-spider-leg{-webkit-transition:-webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;-moz-transition:-moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;-o-transition:-o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;-webkit-transition:stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;transition:stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}#map{position:relative;font-family:"Roboto";display:block}.leaflet-retina .leaflet-control-layers-toggle{background-image:var(--layers-image-src)}.treks-map{height:100%}.trek-map{height:calc(100% - 250px - var(--map-bottom-space-height))}#elevation{position:relative;background-color:#ffffff}.elevation-control .background{border-radius:0px}.custom-theme.elevation-control .axis text{fill:var(--color-on-surface)}.custom-theme.elevation-control .axis line,.custom-theme.elevation-control .axis path{stroke:var(--color-on-surface)}.custom-theme.elevation-control .mouse-focus-label-rect{fill:var(--color-primary-container);stroke:var(--color-on-primary-container)}.custom-theme.elevation-control .mouse-focus-label-text{fill:var(--color-on-primary-container)}.custom-theme.elevation-control .background{background-color:var(--color-background)}.custom-theme.elevation-control .mouse-focus-line{stroke:var(--color-on-surface)}.use-theme-color.elevation-control .area path.altitude,.use-theme-color .legend-altitude rect.area{fill:var(--color-primary-app);stroke:var(--color-trek-line)}.custom-theme.height-focus.circle-lower{fill:#ffffff;stroke:var(--color-on-surface)}.custom-theme.elevation-polyline{stroke:var(--color-trek-line)}.custom-theme.height-focus.line,.custom-theme.height-focus-label{display:none}.treks-marker-cluster-group-icon{background-color:var(--color-primary-app);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--color-on-primary);font-size:16px}.trek-marker div,.selected-trek-marker div{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:50% 50% 50% 0;border:2px solid #ffffff;width:32px;height:32px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:var(--color-surface)}.trek-marker div img,.selected-trek-marker div img{-webkit-transform:rotate(45deg);transform:rotate(45deg);position:absolute;z-index:20;width:24px !important}.selected-trek-marker div{width:64px;height:64px}.selected-trek-marker div img{width:48px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background-color:var(--color-background);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-container);border-bottom-color:var(--color-on-primary-container);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.trek-departure-popup img{border-top-left-radius:8px;border-top-right-radius:8px}.trek-departure-popup .trek-name{font-weight:400;font-size:16px;line-height:24px;padding:8px}.trek-departure-popup .trek-button{margin:0px 8px 8px 8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:var(--color-background);color:var(--color-on-surface);padding:12px 24px;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1000000015px;font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.poi-tooltip .sensitive-area-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name,.information-desks-tooltip .sensitive-area-name,.sensitive-area-tooltip .poi-name,.sensitive-area-tooltip .information-desks-name,.sensitive-area-tooltip .sensitive-area-name{color:var(--color-primary-app);font-weight:400;font-size:16px;line-height:24px}.sensitiveAreasCheckboxContainer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:48px;height:48px;font-size:48px;color:#ffffff}.point-reference-icon{background-color:#ff0000;border:1px solid #ffffff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:24px;height:24px;font-size:24px;color:#ffffff}.map-bottom-space{min-height:var(--map-bottom-space-height);height:var(--map-bottom-space-height);width:100%;background-color:var(--color-background)}.leaflet-popup-content-wrapper{cursor:default;padding:0px;background-color:var(--color-background);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}';var GrwMap=function(){function t(t){registerInstance(this,t);this.trekCardPress=createEvent(this,"trekCardPress",7);this.userLayersState={};this.tileLayer=[];this.handleTreksWithinBoundsBind=this.handleTreksWithinBounds.bind(this);this.mapIsReady=false;this.nameLayer=undefined;this.urlLayer=undefined;this.attributionLayer=undefined;this.center="1, 1";this.zoom=10;this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorBackground="#fef7ff";this.colorTrekLine="#6b0030";this.colorSensitiveArea="\t#4974a5";this.colorPoiIcon="#974c6e";this.useGradient=false;this.resetStoreOnDisconnected=true;this.isLargeView=false}t.prototype.onCenterOnMap=function(t){this.map.setView(new leafletSrc.LatLng(t.detail.latitude,t.detail.longitude),17,{animate:false})};t.prototype.descriptionReferenceIsInViewport=function(t){if(this.currentPointsReferenceLayer){this.handleLayerVisibility(t.detail,this.currentPointsReferenceLayer)}};t.prototype.parkingIsInViewport=function(t){if(this.currentParkingLayer){this.handleLayerVisibility(t.detail,this.currentParkingLayer)}};t.prototype.onInformationDesksIsInViewport=function(t){if(this.currentInformationDesksLayer){this.handleLayerVisibility(t.detail,this.currentInformationDesksLayer)}};t.prototype.sensitiveAreaIsInViewport=function(t){if(this.currentSensitiveAreasLayer){this.handleLayerVisibility(t.detail,this.currentSensitiveAreasLayer)}};t.prototype.poiIsInViewport=function(t){if(this.currentPoisLayer){this.handleLayerVisibility(t.detail,this.currentPoisLayer)}};t.prototype.onCardTrekMouseOver=function(t){if(!state.selectedTrekId||state.selectedTrekId!==t.detail){state.selectedTrekId=t.detail;this.hideTrekLine();this.showTrekLine(t.detail);this.addSelectedCurrentTrek(t.detail)}};t.prototype.oncardTrekMouseLeave=function(){if(!this.trekPopupIsOpen){this.trekPopupIsOpen=false;state.selectedTrekId=null;this.hideTrekLine();this.removeSelectedCurrentTrek()}};t.prototype.componentDidLoad=function(){var t=this;this.map=leafletSrc.map(this.mapRef,{center:this.center.split(",").map(Number),zoom:this.zoom});leafletSrc.control.scale({metric:true,imperial:false}).addTo(this.map);leafletSrc.control.locate({showPopup:false}).addTo(this.map);var e=this.nameLayer?this.nameLayer.split(","):["base-layer"];var i=this.urlLayer.split(",http").map((function(t,e){return e===0?t:"http"+t}));var n=this.attributionLayer.split(",");i.forEach((function(i,o){t.tileLayer.push({key:"".concat(e[o]),value:leafletSrc.tileLayer(i,{maxZoom:19,attribution:"".concat(n[o]&&n[o]!==""?n[o].concat(" | "):"",'Powered by <a target="_blank" href="https://geotrek.fr/">Geotrek</a>')})})}));this.tileLayer[0].value.addTo(this.map);if(i.length>1){this.layersControl=leafletSrc.control.layers(this.tileLayer.reduce((function(t,e){var i;return Object.assign(t,(i={},i[e.key]=e.value,i))}),{}),{},{collapsed:true}).addTo(this.map);leafletSrc.Control.Contract=leafletSrc.Control.extend({onAdd:function(){var e=leafletSrc.DomUtil.create("div");e.className="leaflet-bar leaflet-control";var i=e.appendChild(leafletSrc.DomUtil.create("a"));i.href="#";i.style.backgroundImage="var(--contract-image-src)";e.onclick=function(e){t.bounds&&t.map.fitBounds(t.bounds);e.preventDefault()};return e}});leafletSrc.control.contract=function(t){return new leafletSrc.Control.Contract(t)};leafletSrc.control.contract({position:"topleft"}).addTo(this.map)}if(state.currentTrek){this.addTrek()}else if(state.currentTreks){this.addTreks()}onChange("currentTreks",(function(){if(state.currentTrek){t.removeTreks();t.addTrek()}else if(state.currentTreks){t.removeTrek();t.addTreks()}}));onChange("currentTrek",(function(){if(state.currentTrek){t.removeTreks();t.addTrek()}else{t.removeTrek();t.addTreks()}}))};t.prototype.handleLayerVisibility=function(t,e){if(t&&!this.map.hasLayer(e)){e.addTo(this.map)}else if(this.map.hasLayer(e)&&!this.userLayersState[e._leaflet_id]){this.map.removeLayer(e)}this.handleLayersControlEvent()};t.prototype.addTreks=function(){var t=this;var e;var i=[];var n={type:"FeatureCollection",features:[]};if(state.currentTreks){var o=function(t){i.push(t.departure_geom);n.features.push({type:"Feature",geometry:{type:"Point",coordinates:t.departure_geom},properties:{id:t.id,name:t.name,practice:(e=state.practices.find((function(e){return e.id===t.practice})))===null||e===void 0?void 0:e.pictogram,imgSrc:t.attachments&&t.attachments.length>0&&t.attachments[0].thumbnail}})};for(var r=0,a=state.currentTreks;r<a.length;r++){var s=a[r];o(s)}}if(!this.treksLayer){if(i.length>0&&!state.currentMapTreksBounds){this.bounds=leafletSrc.latLngBounds(i.map((function(t){return[t[1],t[0]]})))}else{if(state.currentMapTreksBounds){this.bounds=state.currentMapTreksBounds}}this.treksLayer=leafletSrc.geoJSON(n,{pointToLayer:function(t,e){return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:t.properties.practice?"<div><img src=".concat(t.properties.practice," /><img/></div>"):"<div/></div>",className:"trek-marker",iconSize:32,iconAnchor:[18,0]}),autoPanOnFocus:false})},onEachFeature:function(e,i){i.once("click",(function(){var n=leafletSrc.DomUtil.create("div");n.className="trek-departure-popup";if(e.properties.imgSrc){var o=leafletSrc.DomUtil.create("img");o.src=e.properties.imgSrc;n.appendChild(o)}var r=leafletSrc.DomUtil.create("div");r.innerHTML=e.properties.name;r.className="trek-name";n.appendChild(r);var a=leafletSrc.DomUtil.create("button");a.innerHTML="Afficher le détail";a.className="trek-button";a.onclick=function(){return t.trekCardPress.emit(e.properties.id)};n.appendChild(a);i.bindPopup(n,{interactive:true,autoPan:false,closeButton:false}).openPopup()}));i.on("mouseover",(function(i){t.hideTrekLine();t.showTrekLine(e.properties.id);t.addSelectedCurrentTrek(e.properties.id,i.latlng)}))}});this.treksMarkerClusterGroup=leafletSrc.markerClusterGroup({showCoverageOnHover:false,removeOutsideVisibleBounds:false,iconCreateFunction:function(t){return leafletSrc.divIcon({html:"<div>"+t.getChildCount()+"</div>",className:"treks-marker-cluster-group-icon",iconSize:48,iconAnchor:[24,24]})}});this.treksMarkerClusterGroup.addLayer(this.treksLayer);this.map.addLayer(this.treksMarkerClusterGroup)}else{if(i.length>0){this.bounds=leafletSrc.latLngBounds(i.map((function(t){return[t[1],t[0]]})))}else{this.map.fire("moveend")}this.treksLayer.clearLayers();this.treksLayer.addData(n);this.treksMarkerClusterGroup.clearLayers();this.treksMarkerClusterGroup.addLayer(this.treksLayer)}this.bounds&&this.map.fitBounds(this.bounds);!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady);this.map.on("moveend",this.handleTreksWithinBoundsBind)};t.prototype.removeTreks=function(){if(this.treksLayer){state.currentMapTreksBounds=this.map.getBounds();this.map.removeLayer(this.treksMarkerClusterGroup);this.treksLayer=null;this.treksMarkerClusterGroup=null;this.map.off("moveend",this.handleTreksWithinBoundsBind)}};t.prototype.handleTreksWithinBounds=function(){var t=this;if(state.currentTreks&&!state.currentMapTreksBounds||state.currentTreks&&state.currentMapTreksBounds&&state.currentMapTreksBounds.toBBoxString()!==this.map.getBounds().toBBoxString()){state.treksWithinBounds=state.currentTreks.filter((function(e){return t.map.getBounds().contains(leafletSrc.latLng(e.departure_geom[1],e.departure_geom[0]))}))}};t.prototype.addTrek=function(){var t=this;var e;this.trekPopupIsOpen=false;state.selectedTrekId=null;this.hideTrekLine();this.removeSelectedCurrentTrek();var i={type:"Feature",geometry:state.currentTrek.geometry,properties:{}};this.currentTrekLayer=leafletSrc.geoJSON(i,{style:function(){return{color:"transparent"}},interactive:false}).addTo(this.map);if(state.currentTrek.parking_location){var n={type:"Feature",properties:{},geometry:{type:"Point",coordinates:state.currentTrek.parking_location}};this.currentParkingLayer=leafletSrc.geoJSON(n,{pointToLayer:function(t,e){return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:"<div>P</div>",className:"parking-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:false,interactive:false})}})}if(state.currentSensitiveAreas&&state.currentSensitiveAreas.length>0){var o={type:"FeatureCollection",features:[]};for(var r=0,a=state.currentSensitiveAreas;r<a.length;r++){var s=a[r];o.features.push({type:"Feature",properties:{name:s.name},geometry:s.geometry})}this.currentSensitiveAreasLayer=leafletSrc.geoJSON(o,{onEachFeature:function(t,e){e.once("mouseover",(function(){var i=leafletSrc.DomUtil.create("div");i.className="sensitive-area-tooltip";var n=leafletSrc.DomUtil.create("div");n.innerHTML=t.properties.name;n.className="sensitive-area-name";i.appendChild(n);e.bindTooltip(i).openTooltip()}))},style:function(){return{color:t.colorSensitiveArea}}})}if(state.currentPois&&state.currentPois.length>0){var l={type:"FeatureCollection",features:[]};var c=function(t){l.features.push({type:"Feature",properties:{name:t.name,type_pictogram:(e=state.poiTypes.find((function(e){return e.id===t.type})))===null||e===void 0?void 0:e.pictogram},geometry:t.geometry})};for(var h=0,u=state.currentPois;h<u.length;h++){var p=u[h];c(p)}this.currentPoisLayer=leafletSrc.geoJSON(l,{pointToLayer:function(t,e){return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:t.properties.type_pictogram?"<img src=".concat(t.properties.type_pictogram," />"):"<img />",className:"poi-icon",iconSize:48}),autoPanOnFocus:false})},onEachFeature:function(t,e){e.once("mouseover",(function(){var i=leafletSrc.DomUtil.create("div");i.className="poi-tooltip";var n=leafletSrc.DomUtil.create("div");n.innerHTML=t.properties.name;n.className="poi-name";i.appendChild(n);e.bindTooltip(i).openTooltip()}))}})}if(state.currentInformationDesks&&state.currentInformationDesks.length>0){var d={type:"FeatureCollection",features:[]};for(var f=0,m=state.currentInformationDesks.filter((function(t){return state.currentTrek.information_desks.includes(t.id)}));f<m.length;f++){var _=m[f];if(_.latitude&&_.longitude){d.features.push({type:"Feature",properties:{name:_.name,type_pictogram:_.type.pictogram},geometry:{type:"Point",coordinates:[Number(_.longitude),Number(_.latitude)]}})}}this.currentInformationDesksLayer=leafletSrc.geoJSON(d,{pointToLayer:function(t,e){return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:t.properties.type_pictogram?"<img src=".concat(t.properties.type_pictogram," />"):"<img />",className:"information-desks-icon",iconSize:48}),autoPanOnFocus:false})},onEachFeature:function(t,e){e.once("mouseover",(function(){var i=leafletSrc.DomUtil.create("div");i.className="information-desks-tooltip";var n=leafletSrc.DomUtil.create("div");n.innerHTML=t.properties.name;n.className="information-desks-name";i.appendChild(n);e.bindTooltip(i).openTooltip()}))}})}if(state.currentTrek.points_reference){var g={type:"FeatureCollection",features:[]};g.features.push({type:"Feature",properties:{},geometry:state.currentTrek.points_reference});var v=0;this.currentPointsReferenceLayer=leafletSrc.geoJSON(g,{pointToLayer:function(t,e){v+=1;return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:v,className:"point-reference-icon",iconSize:24}),autoPanOnFocus:false,interactive:false})}})}var y={srcFolder:"https://unpkg.com/@raruto/leaflet-elevation/src/",elevationDiv:"#elevation",theme:"custom-theme".concat(!this.useGradient?" use-theme-color":""),detached:true,height:250,wptIcons:true,wptLabels:true,collapsed:false,autohide:false,distanceMarkers:{distance:false,direction:true},hotline:this.useGradient,closeBtn:false,summary:false,time:false,timestamps:false,legend:false,downloadLink:false,autofitBounds:false,ruler:false,edgeScale:false,waypoints:false,almostOver:false,speed:false,slope:false,acceleration:false,reverseCoords:false,imperial:false,dragging:false,zooming:false,handlers:["Altitude","Distance","Slope","LinearGradient"],linearGradient:{attr:"z",path:"altitude",range:{0:"#008800",.5:"#ffff00",1:"#ff0000"},min:"elevation_min",max:"elevation_max"}};this.elevationControl=leafletSrc.control.elevation(Object.assign({},y)).addTo(this.map);var b=JSON.stringify({name:"".concat(state.currentTrek.name),type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:state.currentTrek.geometry.coordinates},properties:null}]});this.elevationControl.load(b);var w={};if(this.currentPointsReferenceLayer){w[translate[state.language].layers.pointsReference]=this.currentPointsReferenceLayer}if(this.currentParkingLayer){w[translate[state.language].layers.parking]=this.currentParkingLayer}if(this.currentSensitiveAreasLayer){w[translate[state.language].layers.sensitiveArea]=this.currentSensitiveAreasLayer}if(this.currentInformationDesksLayer){w[translate[state.language].layers.informationPlaces]=this.currentInformationDesksLayer}if(this.currentPoisLayer){w[translate[state.language].layers.pois]=this.currentPoisLayer}if(this.layersControl){Object.keys(w).forEach((function(e){t.layersControl.addOverlay(w[e],e)}))}else{this.layersControl=leafletSrc.control.layers({},w,{collapsed:true}).addTo(this.map)}this.handleLayersControlEvent();this.bounds=leafletSrc.latLngBounds(state.currentTrek.geometry.coordinates.map((function(t){return[t[1],t[0]]})));this.bounds&&this.map.fitBounds(this.bounds);!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady)};t.prototype.addSelectedCurrentTrek=function(t,e){var i=this;var n;var o={type:"FeatureCollection",features:[]};if(state.currentTreks){var r=state.currentTreks.find((function(e){return e.id===t}));o.features.push({type:"Feature",geometry:{type:"Point",coordinates:e?[e.lng,e.lat]:r.departure_geom},properties:{id:r.id,name:r.name,practice:(n=state.practices.find((function(t){return t.id===r.practice})))===null||n===void 0?void 0:n.pictogram,imgSrc:r.attachments&&r.attachments.length>0&&r.attachments[0].thumbnail}})}this.removeSelectedCurrentTrek();state.selectedTrekId=t;this.selectedCurrentTrekLayer=leafletSrc.geoJSON(o,{pointToLayer:function(t,e){return leafletSrc.marker(e,{zIndexOffset:4e6,icon:leafletSrc.divIcon({html:t.properties.practice?"<div><img src=".concat(t.properties.practice," /><img/></div>"):"<div/></div>",className:"selected-trek-marker",iconSize:64,iconAnchor:[36,36]}),autoPanOnFocus:false})},onEachFeature:function(t,e){e.once("click",(function(){var n=leafletSrc.DomUtil.create("div");n.className="trek-departure-popup";if(t.properties.imgSrc){var o=leafletSrc.DomUtil.create("img");o.src=t.properties.imgSrc;n.appendChild(o)}var r=leafletSrc.DomUtil.create("div");r.innerHTML=t.properties.name;r.className="trek-name";n.appendChild(r);var a=leafletSrc.DomUtil.create("button");a.innerHTML="Afficher le détail";a.className="trek-button";a.onclick=function(){return i.trekCardPress.emit(t.properties.id)};n.appendChild(a);e.bindPopup(n,{interactive:true,autoPan:false,closeButton:false}).openPopup()}));e.on("mouseout",(function(){if(!i.trekPopupIsOpen){state.selectedTrekId=null;i.hideTrekLine();i.removeSelectedCurrentTrek()}}));e.on("popupopen",(function(){i.trekPopupIsOpen=Boolean(state.selectedTrekId)}));e.on("popupclose",(function(){if(state.selectedTrekId){i.trekPopupIsOpen=false;state.selectedTrekId=null;i.hideTrekLine();i.removeSelectedCurrentTrek()}}))}}).addTo(this.map)};t.prototype.removeSelectedCurrentTrek=function(){state.selectedTrekId=null;this.selectedCurrentTrekLayer&&this.map.removeLayer(this.selectedCurrentTrekLayer);this.selectedCurrentTrekLayer=null};t.prototype.handleLayersControlEvent=function(){var t=this;var e=this.layersControl._layerControlInputs;e.forEach((function(e){if(t.layersControl._layers.find((function(t){return t.layer._leaflet_id===e.layerId})).overlay){e.onchange=function(i){t.userLayersState[e.layerId]=i.target.checked}}}))};t.prototype.removeTrek=function(){var t=this;if(this.layersControl){if(!this.layersControl._layers.some((function(t){return!t.overlay}))){this.map.removeControl(this.layersControl);this.layersControl=null}else{this.layersControl._layers.filter((function(t){return t.overlay})).forEach((function(e){t.layersControl.removeLayer(e.layer)}))}}if(this.elevationControl){this.elevationControl.clear();this.map.removeControl(this.elevationControl);this.elevationControl=null}if(this.currentTrekLayer){this.map.removeLayer(this.currentTrekLayer);this.currentTrekLayer=null}if(this.currentParkingLayer){this.map.removeLayer(this.currentParkingLayer);this.currentParkingLayer=null}if(this.currentSensitiveAreasLayer){this.map.removeLayer(this.currentSensitiveAreasLayer);this.currentSensitiveAreasLayer=null}if(this.currentPoisLayer){this.map.removeLayer(this.currentPoisLayer);this.currentPoisLayer=null}if(this.currentInformationDesksLayer){this.map.removeLayer(this.currentInformationDesksLayer);this.currentInformationDesksLayer=null}if(this.currentPointsReferenceLayer){this.map.removeLayer(this.currentPointsReferenceLayer);this.currentPointsReferenceLayer=null}};t.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){reset()}};t.prototype.showTrekLine=function(t){var e=this;getTrekGeometry(t).then((function(t){var i={type:"Feature",geometry:t.geometry,properties:{}};e.currentTrekLayer=leafletSrc.geoJSON(i,{style:function(){return{color:e.colorTrekLine}},interactive:false}).addTo(e.map)}))};t.prototype.hideTrekLine=function(){if(this.currentTrekLayer){this.map.removeLayer(this.currentTrekLayer);this.currentTrekLayer=null}};t.prototype.render=function(){var t=this;var e=getAssetPath("".concat("","assets/layers.svg"));var i=getAssetPath("".concat("","assets/contract.svg"));return h(Host,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-surface":this.colorOnSurface,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-background":this.colorBackground,"--color-poi-icon":this.colorPoiIcon,"--color-trek-line":this.colorTrekLine,"--layers-image-src":"url(".concat(e,")"),"--contract-image-src":"url(".concat(i,")"),"--map-bottom-space-height":this.isLargeView?"0px":"70px"}},h("div",{id:"map",style:{},class:state.currentTrek?"trek-map":"treks-map",ref:function(e){return t.mapRef=e}}),state.currentTrek&&h("div",null,h("div",{id:"elevation",ref:function(e){return t.elevationRef=e}}),h("div",{class:"map-bottom-space"})),!this.mapIsReady&&h("div",{class:"map-loader-container"},h("span",{class:"loader"})))};return t}();GrwMap.style=grwMapCss;var grwSearchCss='.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host span{font-size:24px;position:absolute;left:32px;z-index:20;pointer-events:none}.search-input{background-color:var(--color-surface-container-high);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2);border:none;border-radius:40px;color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:400;font-family:"Roboto";height:44px;padding:0px 16px 0px 48px;outline-color:var(--color-outline)}';var GrwSearch=function(){function t(t){registerInstance(this,t)}t.prototype.onSearchChange=function(t){state.searchValue=t.target.value;state.currentTreks=handleFiltersAndSearch()};t.prototype.render=function(){var t=this;return h(Host,null,h("span",{class:"material-symbols material-symbols-outlined"},"search"),h("input",{onInput:function(e){return t.onSearchChange(e)},class:"search-input",type:"search",placeholder:"Rechercher",value:state.searchValue}))};return t}();GrwSearch.style=grwSearchCss;function Mousewheel(t){var e=t.swiper,i=t.extendParams,n=t.on,o=t.emit;var r=getWindow();i({mousewheel:{enabled:false,releaseOnEdges:false,invert:false,forceToAxis:false,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}});e.mousewheel={enabled:false};var a;var s=now();var l;var c=[];function h(t){var e=10;var i=40;var n=800;var o=0;var r=0;var a=0;var s=0;if("detail"in t){r=t.detail}if("wheelDelta"in t){r=-t.wheelDelta/120}if("wheelDeltaY"in t){r=-t.wheelDeltaY/120}if("wheelDeltaX"in t){o=-t.wheelDeltaX/120}if("axis"in t&&t.axis===t.HORIZONTAL_AXIS){o=r;r=0}a=o*e;s=r*e;if("deltaY"in t){s=t.deltaY}if("deltaX"in t){a=t.deltaX}if(t.shiftKey&&!a){a=s;s=0}if((a||s)&&t.deltaMode){if(t.deltaMode===1){a*=i;s*=i}else{a*=n;s*=n}}if(a&&!o){o=a<1?-1:1}if(s&&!r){r=s<1?-1:1}return{spinX:o,spinY:r,pixelX:a,pixelY:s}}function u(){if(!e.enabled)return;e.mouseEntered=true}function p(){if(!e.enabled)return;e.mouseEntered=false}function d(t){if(e.params.mousewheel.thresholdDelta&&t.delta<e.params.mousewheel.thresholdDelta){return false}if(e.params.mousewheel.thresholdTime&&now()-s<e.params.mousewheel.thresholdTime){return false}if(t.delta>=6&&now()-s<60){return true}if(t.direction<0){if((!e.isEnd||e.params.loop)&&!e.animating){e.slideNext();o("scroll",t.raw)}}else if((!e.isBeginning||e.params.loop)&&!e.animating){e.slidePrev();o("scroll",t.raw)}s=(new r.Date).getTime();return false}function f(t){var i=e.params.mousewheel;if(t.direction<0){if(e.isEnd&&!e.params.loop&&i.releaseOnEdges){return true}}else if(e.isBeginning&&!e.params.loop&&i.releaseOnEdges){return true}return false}function m(t){var i=t;var n=true;if(!e.enabled)return;if(t.target.closest(".".concat(e.params.mousewheel.noMousewheelClass)))return;var r=e.params.mousewheel;if(e.params.cssMode){i.preventDefault()}var s=e.el;if(e.params.mousewheel.eventsTarget!=="container"){s=document.querySelector(e.params.mousewheel.eventsTarget)}var u=s&&s.contains(i.target);if(!e.mouseEntered&&!u&&!r.releaseOnEdges)return true;if(i.originalEvent)i=i.originalEvent;var p=0;var m=e.rtlTranslate?-1:1;var _=h(i);if(r.forceToAxis){if(e.isHorizontal()){if(Math.abs(_.pixelX)>Math.abs(_.pixelY))p=-_.pixelX*m;else return true}else if(Math.abs(_.pixelY)>Math.abs(_.pixelX))p=-_.pixelY;else return true}else{p=Math.abs(_.pixelX)>Math.abs(_.pixelY)?-_.pixelX*m:-_.pixelY}if(p===0)return true;if(r.invert)p=-p;var g=e.getTranslate()+p*r.sensitivity;if(g>=e.minTranslate())g=e.minTranslate();if(g<=e.maxTranslate())g=e.maxTranslate();n=e.params.loop?true:!(g===e.minTranslate()||g===e.maxTranslate());if(n&&e.params.nested)i.stopPropagation();if(!e.params.freeMode||!e.params.freeMode.enabled){var v={time:now(),delta:Math.abs(p),direction:Math.sign(p),raw:t};if(c.length>=2){c.shift()}var y=c.length?c[c.length-1]:undefined;c.push(v);if(y){if(v.direction!==y.direction||v.delta>y.delta||v.time>y.time+150){d(v)}}else{d(v)}if(f(v)){return true}}else{var b={time:now(),delta:Math.abs(p),direction:Math.sign(p)};var w=l&&b.time<l.time+500&&b.delta<=l.delta&&b.direction===l.direction;if(!w){l=undefined;var x=e.getTranslate()+p*r.sensitivity;var k=e.isBeginning;var L=e.isEnd;if(x>=e.minTranslate())x=e.minTranslate();if(x<=e.maxTranslate())x=e.maxTranslate();e.setTransition(0);e.setTranslate(x);e.updateProgress();e.updateActiveIndex();e.updateSlidesClasses();if(!k&&e.isBeginning||!L&&e.isEnd){e.updateSlidesClasses()}if(e.params.loop){e.loopFix({direction:b.direction<0?"next":"prev",byMousewheel:true})}if(e.params.freeMode.sticky){clearTimeout(a);a=undefined;if(c.length>=15){c.shift()}var y=c.length?c[c.length-1]:undefined;var P=c[0];c.push(b);if(y&&(b.delta>y.delta||b.direction!==y.direction)){c.splice(0)}else if(c.length>=15&&b.time-P.time<500&&P.delta-b.delta>=1&&b.delta<=6){var T=p>0?.8:.2;l=b;c.splice(0);a=nextTick((function(){e.slideToClosest(e.params.speed,true,undefined,T)}),0)}if(!a){a=nextTick((function(){var t=.5;l=b;c.splice(0);e.slideToClosest(e.params.speed,true,undefined,t)}),500)}}if(!w)o("scroll",i);if(e.params.autoplay&&e.params.autoplayDisableOnInteraction)e.autoplay.stop();if(x===e.minTranslate()||x===e.maxTranslate())return true}}if(i.preventDefault)i.preventDefault();else i.returnValue=false;return false}function _(t){var i=e.el;if(e.params.mousewheel.eventsTarget!=="container"){i=document.querySelector(e.params.mousewheel.eventsTarget)}i[t]("mouseenter",u);i[t]("mouseleave",p);i[t]("wheel",m)}function g(){if(e.params.cssMode){e.wrapperEl.removeEventListener("wheel",m);return true}if(e.mousewheel.enabled)return false;_("addEventListener");e.mousewheel.enabled=true;return true}function v(){if(e.params.cssMode){e.wrapperEl.addEventListener(event,m);return true}if(!e.mousewheel.enabled)return false;_("removeEventListener");e.mousewheel.enabled=false;return true}n("init",(function(){if(!e.params.mousewheel.enabled&&e.params.cssMode){v()}if(e.params.mousewheel.enabled)g()}));n("destroy",(function(){if(e.params.cssMode){g()}if(e.mousewheel.enabled)v()}));Object.assign(e.mousewheel,{enable:g,disable:v})}function freeMode(t){var e=t.swiper,i=t.extendParams,n=t.emit,o=t.once;i({freeMode:{enabled:false,momentum:true,momentumRatio:1,momentumBounce:true,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:false,minimumVelocity:.02}});function r(){if(e.params.cssMode)return;var t=e.getTranslate();e.setTranslate(t);e.setTransition(0);e.touchEventsData.velocities.length=0;e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function a(){if(e.params.cssMode)return;var t=e.touchEventsData,i=e.touches;if(t.velocities.length===0){t.velocities.push({position:i[e.isHorizontal()?"startX":"startY"],time:t.touchStartTime})}t.velocities.push({position:i[e.isHorizontal()?"currentX":"currentY"],time:now()})}function s(t){var i=t.currentPos;if(e.params.cssMode)return;var r=e.params,a=e.wrapperEl,s=e.rtlTranslate,l=e.snapGrid,c=e.touchEventsData;var h=now();var u=h-c.touchStartTime;if(i<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(i>-e.maxTranslate()){if(e.slides.length<l.length){e.slideTo(l.length-1)}else{e.slideTo(e.slides.length-1)}return}if(r.freeMode.momentum){if(c.velocities.length>1){var p=c.velocities.pop();var d=c.velocities.pop();var f=p.position-d.position;var m=p.time-d.time;e.velocity=f/m;e.velocity/=2;if(Math.abs(e.velocity)<r.freeMode.minimumVelocity){e.velocity=0}if(m>150||now()-p.time>300){e.velocity=0}}else{e.velocity=0}e.velocity*=r.freeMode.momentumVelocityRatio;c.velocities.length=0;var _=1e3*r.freeMode.momentumRatio;var g=e.velocity*_;var v=e.translate+g;if(s)v=-v;var y=false;var b;var w=Math.abs(e.velocity)*20*r.freeMode.momentumBounceRatio;var x=void 0;if(v<e.maxTranslate()){if(r.freeMode.momentumBounce){if(v+e.maxTranslate()<-w){v=e.maxTranslate()-w}b=e.maxTranslate();y=true;c.allowMomentumBounce=true}else{v=e.maxTranslate()}if(r.loop&&r.centeredSlides)x=true}else if(v>e.minTranslate()){if(r.freeMode.momentumBounce){if(v-e.minTranslate()>w){v=e.minTranslate()+w}b=e.minTranslate();y=true;c.allowMomentumBounce=true}else{v=e.minTranslate()}if(r.loop&&r.centeredSlides)x=true}else if(r.freeMode.sticky){var k=void 0;for(var L=0;L<l.length;L+=1){if(l[L]>-v){k=L;break}}if(Math.abs(l[k]-v)<Math.abs(l[k-1]-v)||e.swipeDirection==="next"){v=l[k]}else{v=l[k-1]}v=-v}if(x){o("transitionEnd",(function(){e.loopFix()}))}if(e.velocity!==0){if(s){_=Math.abs((-v-e.translate)/e.velocity)}else{_=Math.abs((v-e.translate)/e.velocity)}if(r.freeMode.sticky){var P=Math.abs((s?-v:v)-e.translate);var T=e.slidesSizesGrid[e.activeIndex];if(P<T){_=r.speed}else if(P<2*T){_=r.speed*1.5}else{_=r.speed*2.5}}}else if(r.freeMode.sticky){e.slideToClosest();return}if(r.freeMode.momentumBounce&&y){e.updateProgress(b);e.setTransition(_);e.setTranslate(v);e.transitionStart(true,e.swipeDirection);e.animating=true;elementTransitionEnd(a,(function(){if(!e||e.destroyed||!c.allowMomentumBounce)return;n("momentumBounce");e.setTransition(r.speed);setTimeout((function(){e.setTranslate(b);elementTransitionEnd(a,(function(){if(!e||e.destroyed)return;e.transitionEnd()}))}),0)}))}else if(e.velocity){n("_freeModeNoMomentumRelease");e.updateProgress(v);e.setTransition(_);e.setTranslate(v);e.transitionStart(true,e.swipeDirection);if(!e.animating){e.animating=true;elementTransitionEnd(a,(function(){if(!e||e.destroyed)return;e.transitionEnd()}))}}else{e.updateProgress(v)}e.updateActiveIndex();e.updateSlidesClasses()}else if(r.freeMode.sticky){e.slideToClosest();return}else if(r.freeMode){n("_freeModeNoMomentumRelease")}if(!r.freeMode.momentum||u>=r.longSwipesMs){e.updateProgress();e.updateActiveIndex();e.updateSlidesClasses()}}Object.assign(e,{freeMode:{onTouchStart:r,onTouchMove:a,onTouchEnd:s}})}var grwTrekDetailCss='@font-face{font-family:"swiper-icons";src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff;}.swiper,swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0px, 0, 0);transform:translate3d(0px, 0, 0)}.swiper-horizontal{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-slide,swiper-slide{-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height, -webkit-transform;transition-property:height, -webkit-transform;transition-property:transform, height;transition-property:transform, height, -webkit-transform}.swiper-backface-hidden .swiper-slide{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-cube-shadow{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0, 0, 0, 0.15)}.swiper-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{-webkit-scroll-snap-type:none;-ms-scroll-snap-type:none;scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-centered>.swiper-wrapper::before{content:"";-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:9999;order:9999}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-start:var(--swiper-centered-offset-before);margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-before:var(--swiper-centered-offset-before);margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;transform-origin:50%;-webkit-box-sizing:border-box;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,swiper-container:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{-webkit-animation:swiper-preloader-spin 1s infinite linear;animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@-webkit-keyframes swiper-preloader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}:root{--swiper-navigation-size:44px;}.swiper-button-prev,.swiper-button-next{position:absolute;top:var(--swiper-navigation-top-offset, 50%);width:calc(var(--swiper-navigation-size) / 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - var(--swiper-navigation-size) / 2);z-index:10;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:var(--swiper-navigation-color, var(--swiper-theme-color))}.swiper-button-prev.swiper-button-disabled,.swiper-button-next.swiper-button-disabled{opacity:0.35;cursor:auto;pointer-events:none}.swiper-button-prev.swiper-button-hidden,.swiper-button-next.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-prev,.swiper-navigation-disabled .swiper-button-next{display:none !important}.swiper-button-prev:after,.swiper-button-next:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none !important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset, 10px);right:auto}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:"prev"}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset, 10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:"next"}.swiper-button-lock{display:none}:root{}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:300ms opacity;transition:300ms opacity;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none !important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(0.33);transform:scale(0.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(0.66);transform:scale(0.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(0.33);transform:scale(0.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(0.66);transform:scale(0.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(0.33);transform:scale(0.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, 0.2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none !important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;-webkit-transform:translate3d(0px, -50%, 0);transform:translate3d(0px, -50%, 0)}.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:200ms top, 200ms -webkit-transform;transition:200ms top, 200ms -webkit-transform;transition:200ms transform, 200ms top;transition:200ms transform, 200ms top, 200ms -webkit-transform}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:200ms left, 200ms -webkit-transform;transition:200ms left, 200ms -webkit-transform;transition:200ms transform, 200ms left;transition:200ms transform, 200ms left, 200ms -webkit-transform}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,:host(.swiper-horizontal.swiper-rtl) .swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:200ms right, 200ms -webkit-transform;transition:200ms right, 200ms -webkit-transform;transition:200ms transform, 200ms right;transition:200ms transform, 200ms right, 200ms -webkit-transform}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));position:absolute;}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper{z-index:0}.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}:host{--swiper-navigation-size:24px;--swiper-navigation-color:var(--color-on-primary-container);--swiper-pagination-color:var(--color-primary-container);--swiper-pagination-bullet-size:12px}:host .swiper-button-prev,:host .swiper-button-next{background-color:var(--color-primary-container);padding:4px;width:32px;height:32px;border-radius:32px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1)}:host .swiper-button-prev:hover,:host .swiper-button-next:hover{-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}grw-trek-detail{overflow:hidden}.trek-options{display:-ms-flexbox;display:flex;position:relative;width:100%;min-height:32px;padding:8px 0px;background-color:var(--color-background);overflow-x:auto}.trek-options::-webkit-scrollbar{display:none}.trek-options .trek-option{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-left:16px;font-size:22px;line-height:28px;font-weight:500;white-space:nowrap;text-decoration:none;color:var(--color-on-surface);-webkit-transition-property:color;transition-property:color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:0.3s;transition-duration:0.3s}.trek-options .trek-option:hover{color:var(--color-primary-app)}@media (hover: none){.trek-options .trek-option:not(.selected-trek-option):hover{color:inherit}}.trek-options .trek-option:last-of-type{margin-right:16px}.trek-options .selected-trek-option{color:var(--color-primary-app)}.trek-options .indicator-selected-trek-option{position:absolute;bottom:8px;height:2px;background-image:-webkit-gradient(linear, left top, left bottom, from(var(--color-primary-app)), to(var(--color-primary-app)));background-image:linear-gradient(var(--color-primary-app), var(--color-primary-app));background-repeat:no-repeat;-webkit-transition:background-size 0.5s ease 0.5s, -webkit-transform 0.5s ease;transition:background-size 0.5s ease 0.5s, -webkit-transform 0.5s ease;transition:transform 0.5s ease, background-size 0.5s ease 0.5s;transition:transform 0.5s ease, background-size 0.5s ease 0.5s, -webkit-transform 0.5s ease;margin-left:16px;background-position:center}.trek-options .presentation.selected-trek-option~.indicator-selected-trek-option{width:240px;background-size:120px 100%}.trek-options .description.selected-trek-option~.indicator-selected-trek-option{width:240px;background-size:120px 100%}.trek-options .recommendations.selected-trek-option~.indicator-selected-trek-option{width:380px;background-size:190px 100%}.trek-options .sensitive-areas.selected-trek-option~.indicator-selected-trek-option{width:320px;background-size:160px 100%}.trek-options .information-places.selected-trek-option~.indicator-selected-trek-option{width:400px;background-size:200px 100%}.trek-options .pois.selected-trek-option~.indicator-selected-trek-option{width:240px;background-size:120px 100%}.trek-options .presentation{min-width:120px;width:120px}.trek-options .description{min-width:120px;width:120px}.trek-options .recommendations{min-width:190px;width:190px}.trek-options .sensitive-areas{min-width:160px;width:160px}.trek-options .information-places{min-width:200px;width:200px}.trek-options .pois{min-width:120px;width:120px}.trek-detail-container{font-family:"Roboto";color:var(--color-on-surface);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;max-height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;padding:0px 24px;margin:8px 0px}.trek-detail-container .image{cursor:pointer;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.trek-detail-container .sub-container{padding:24px 24px 0px 24px}.trek-detail-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;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:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align: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 span{font-size:24px;width:24px;height:auto;margin-right:8px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary-app)}.trek-detail-container .downloads-container{padding:0px 24px 0px 24px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.trek-detail-container .downloads-container .download-title{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500}.trek-detail-container .downloads-container .links-container{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-detail-container .downloads-container .links-container a{margin-top:8px;background-color:var(--color-primary-container);color:var(--color-on-primary-container);border-radius:8px;padding:8px 16px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative;text-decoration:none}.trek-detail-container .downloads-container .links-container a:nth-child(2){margin:8px 12px 0px 12px}.trek-detail-container .downloads-container .links-container a:hover{-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}.trek-detail-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0px 24px 0px 24px}.trek-detail-container .themes-container .theme{background-color:var(--color-secondary-container);color:var(--color-on-secondary-container);border-radius:8px;padding:8px 16px;margin:0px 8px 8px 0px;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:1px solid var(--color-outline);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative}.trek-detail-container .ambiance,.trek-detail-container .description-teaser,.trek-detail-container .description-container,.trek-detail-container .altimetric-profile-container,.trek-detail-container .access-container,.trek-detail-container .public-transport-container,.trek-detail-container .advice-container,.trek-detail-container .advised-parking-container,.trek-detail-container .gear-container,.trek-detail-container .sensitive-areas-container,.trek-detail-container .source-container,.trek-detail-container .accessibilities-container,.trek-detail-container .weather-container{padding:0px 24px 0px 24px}.trek-detail-container .ambiance,.trek-detail-container .description-teaser,.trek-detail-container .description-container,.trek-detail-container .altimetric-profile-container,.trek-detail-container .access-container,.trek-detail-container .public-transport-container,.trek-detail-container .advice-container,.trek-detail-container .advised-parking-container,.trek-detail-container .gear-container,.trek-detail-container .sensitive-areas-container,.trek-detail-container .information-desks-container,.trek-detail-container .pois-container,.trek-detail-container .source-container,.trek-detail-container .accessibilities-container,.trek-detail-container .weather-container,.trek-detail-container .step-container{font-size:16px;line-height:24px;font-weight:400}.trek-detail-container .ambiance a,.trek-detail-container .description-teaser a,.trek-detail-container .description-container a,.trek-detail-container .altimetric-profile-container a,.trek-detail-container .access-container a,.trek-detail-container .public-transport-container a,.trek-detail-container .advice-container a,.trek-detail-container .advised-parking-container a,.trek-detail-container .gear-container a,.trek-detail-container .sensitive-areas-container a,.trek-detail-container .information-desks-container a,.trek-detail-container .pois-container a,.trek-detail-container .source-container a,.trek-detail-container .accessibilities-container a,.trek-detail-container .weather-container a,.trek-detail-container .step-container a{color:var(--color-primary-app)}.trek-detail-container .description-title,.trek-detail-container .altimetric-profile-title,.trek-detail-container .access-title,.trek-detail-container .public-transport-title,.trek-detail-container .advice-title,.trek-detail-container .advised-parking-title,.trek-detail-container .gear-title,.trek-detail-container .sensitive-areas-title,.trek-detail-container .information-desks-title,.trek-detail-container .pois-title,.trek-detail-container .source-title,.trek-detail-container .accessibilities-title,.trek-detail-container .step-title{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;font-weight:bold;margin-bottom:16px}.trek-detail-container .information-desks-title,.trek-detail-container .pois-title,.trek-detail-container .step-title{padding:0px 24px 0px 24px}.description-container .description ol{position:relative;counter-reset:referencePoint}.description-container .description ol:before{content:"";position:absolute;width:4px;top:0px;bottom:0px;left:14px;background-color:var(--color-primary-app)}.description-container .description ol li{position:relative;list-style-type:none;counter-increment:referencePoint}.description-container .description ol li p{margin:0}.description-container .description ol li:not(:first-child){margin-top:12px}.description-container .description ol li:before{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;content:counter(referencePoint);width:24px;height:24px;background:#f04141;border-radius:12px;font-weight:bold;font-size:0.8em;color:white;margin-left:-36px;top:calc(50% - 12px)}.current-advice-container{display:-ms-flexbox;display:flex;padding:12px;border:2px solid var(--color-outline);border-radius:12px}.current-advice-container span{font-size:24px;width:26px;margin-right:8px}.label-container{margin-top:12px;padding:12px;border:2px solid var(--color-outline);border-radius:12px}.label-container .label-sub-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.label-container .label-sub-container img{width:26px;margin-right:16px}.label-container .label-sub-container .label-name{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500;padding:12px 0px}.label-container .label-advice{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500}.source-container .source-sub-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.source-container .source-sub-container img{width:26px;margin-right:16px}.source-container .source-sub-container .source-name{color:var(--color-on-surface);font-size:16px;line-height:20px;font-weight:500;padding:12px 0px}.departure-container,.arrival-container,.cities-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0px 24px 24px 24px}.departure-container .departure-title,.departure-container .arrival-title,.departure-container .cities-title,.arrival-container .departure-title,.arrival-container .arrival-title,.arrival-container .cities-title,.cities-container .departure-title,.cities-container .arrival-title,.cities-container .cities-title{color:var(--color-on-surface);font-weight:bold;white-space:nowrap;margin-right:8px}.accessibilities-container .accessibilities-content-container{padding:12px 0px 0px 0px;display:-ms-flexbox;display:flex}.accessibilities-container .accessibilities-content-container .accessibility-content-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin:0px 8px 8px 0px}.accessibilities-container .accessibilities-content-container .accessibility-content-container img{margin-right:16px;width:26px}.accessibilities-container .accessibility-level-title,.accessibilities-container .accessibility-slope-title,.accessibilities-container .accessibility-width-title,.accessibilities-container .accessibility-signage-title,.accessibilities-container .accessibility-covering-title,.accessibilities-container .accessibility-exposure-title,.accessibilities-container .accessibility-advice-title{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;padding:12px 0px}.weather-container #weather-widget{width:100%}.swiper-information-desks,.swiper-pois,.swiper-step{padding-right:32px;padding-left:32px}.swiper-step{padding-bottom:4px}.divider{margin:16px;border-top:1px solid var(--color-outline)}.detail-bottom-space{min-height:var(--detail-bottom-space-height);height:var(--detail-bottom-space-height);width:100%;background-color:var(--color-background)}.images-container{display:-ms-flexbox;display:flex;max-width:100%;max-height:400px}';var presentation={visible:true,width:120,indicator:false};var description={visible:false,width:120,indicator:false};var recommendations={visible:false,width:190,indicator:false};var sensitiveArea={visible:false,width:160,indicator:false};var informationPlaces={visible:false,width:200,indicator:false};var pois={visible:false,width:120,indicator:false};var options={presentation:presentation,description:description,recommendations:recommendations,sensitiveArea:sensitiveArea,informationPlaces:informationPlaces,pois:pois};var GrwTrekDetail=function(){function t(t){registerInstance(this,t);this.descriptionReferenceIsInViewport=createEvent(this,"descriptionReferenceIsInViewport",7);this.parkingIsInViewport=createEvent(this,"parkingIsInViewport",7);this.sensitiveAreaIsInViewport=createEvent(this,"sensitiveAreaIsInViewport",7);this.informationDeskIsInViewport=createEvent(this,"informationDeskIsInViewport",7);this.poiIsInViewport=createEvent(this,"poiIsInViewport",7);this.currentTrek=undefined;this.difficulty=undefined;this.route=undefined;this.practice=undefined;this.themes=undefined;this.labels=undefined;this.sources=undefined;this.accessibilities=undefined;this.accessibilityLevel=undefined;this.displayFullscreen=false;this.cities=undefined;this.options=undefined;this.trek=undefined;this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorSurfaceContainerLow="#f7f2fa";this.colorBackground="#fef7ff";this.resetStoreOnDisconnected=true;this.weather=false;this.isLargeView=false}t.prototype.componentDidLoad=function(){var t=this;this.swiperImages=new Swiper(this.swiperImagesRef,{modules:[Navigation,Pagination,Keyboard,freeMode,Mousewheel],navigation:{prevEl:this.prevElImagesRef,nextEl:this.nextElImagesRef},pagination:{el:this.paginationElImagesRef},allowTouchMove:false,keyboard:false});this.swiperImagesRef.onfullscreenchange=function(){t.displayFullscreen=!t.displayFullscreen;t.displayFullscreen?t.swiperImages.keyboard.enable():t.swiperImages.keyboard.disable()};this.swiperStep=new Swiper(this.swiperStepRef,{modules:[freeMode,Mousewheel],slidesPerView:1.5,spaceBetween:20,grabCursor:true,freeMode:true,mousewheel:{forceToAxis:true},breakpointsBase:"container",breakpoints:{540:{slidesPerView:2.5}}});this.swiperPois=new Swiper(this.swiperPoisRef,{modules:[freeMode,Mousewheel],slidesPerView:1.5,spaceBetween:20,grabCursor:true,freeMode:true,mousewheel:{forceToAxis:true},breakpointsBase:"container",breakpoints:{540:{slidesPerView:2.5}}});this.swiperInformationDesks=new Swiper(this.swiperInformationDesksRef,{modules:[freeMode,Mousewheel],slidesPerView:1.5,spaceBetween:20,grabCursor:true,freeMode:true,mousewheel:{forceToAxis:true},breakpointsBase:"container",breakpoints:{540:{slidesPerView:2.5}}});if(this.presentationRef){var e=new IntersectionObserver((function(e){var i=e[0].isIntersecting;if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{presentation:Object.assign(Object.assign({},t.defaultOptions.presentation),{indicator:i})})}}));e.observe(this.presentationRef)}if(this.descriptionRef){var i=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.descriptionReferenceIsInViewport.emit(i);if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{description:Object.assign(Object.assign({},t.defaultOptions.description),{indicator:i})})}}));i.observe(this.descriptionRef)}if(this.recommendationRef){var n=new IntersectionObserver((function(e){var i=e[0].isIntersecting;if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{recommendations:Object.assign(Object.assign({},t.defaultOptions.recommendations),{indicator:i})})}}));n.observe(this.recommendationRef)}if(this.parkingRef){var o=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.parkingIsInViewport.emit(i)}));o.observe(this.parkingRef)}if(this.sensitiveAreaRef){var r=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.sensitiveAreaIsInViewport.emit(i);if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{sensitiveArea:Object.assign(Object.assign({},t.defaultOptions.sensitiveArea),{indicator:i})})}}));r.observe(this.sensitiveAreaRef)}if(this.informationDeskRef){var a=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.informationDeskIsInViewport.emit(i);if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{informationPlaces:Object.assign(Object.assign({},t.defaultOptions.informationPlaces),{indicator:i})})}}));a.observe(this.informationDeskRef)}if(this.poiRef){var s=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.poiIsInViewport.emit(i);if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{pois:Object.assign(Object.assign({},t.defaultOptions.pois),{indicator:i})})}}));s.observe(this.poiRef)}};t.prototype.connectedCallback=function(){var t=this;this.currentTrek=this.trek?this.trek:state.currentTrek;if(this.currentTrek){this.defaultOptions=this.handleOptions();this.options=Object.assign(Object.assign({},this.defaultOptions),{presentation:Object.assign(Object.assign({},this.defaultOptions.presentation),{indicator:true})});this.difficulty=state.difficulties.find((function(e){return e.id===t.currentTrek.difficulty}));this.route=state.routes.find((function(e){return e.id===t.currentTrek.route}));this.practice=state.practices.find((function(e){return e.id===t.currentTrek.practice}));this.themes=state.themes.filter((function(e){return t.currentTrek.themes.includes(e.id)}));this.labels=state.labels.filter((function(e){return t.currentTrek.labels.includes(e.id)}));this.sources=state.sources.filter((function(e){return t.currentTrek.source.includes(e.id)}));this.accessibilities=state.accessibilities.filter((function(e){return t.currentTrek.accessibilities.includes(e.id)}));if(state.accessibilitiesLevel){this.accessibilityLevel=state.accessibilitiesLevel.find((function(e){return t.currentTrek.accessibility_level===e.id}))}this.cities=this.currentTrek.cities.map((function(t){var e;return(e=state.cities.find((function(e){return e.id===t})))===null||e===void 0?void 0:e.name}));this.hasStep=this.currentTrek.children.length>0}onChange("currentTrek",(function(){t.currentTrek=t.trek?t.trek:state.currentTrek;if(t.currentTrek){t.defaultOptions=t.handleOptions();t.options=Object.assign(Object.assign({},t.defaultOptions),{presentation:Object.assign(Object.assign({},t.defaultOptions.presentation),{indicator:true})});t.difficulty=state.difficulties.find((function(e){return e.id===t.currentTrek.difficulty}));t.route=state.routes.find((function(e){return e.id===t.currentTrek.route}));t.practice=state.practices.find((function(e){return e.id===t.currentTrek.practice}));t.themes=state.themes.filter((function(e){return t.currentTrek.themes.includes(e.id)}));t.labels=state.labels.filter((function(e){return t.currentTrek.labels.includes(e.id)}));t.sources=state.sources.filter((function(e){return t.currentTrek.source.includes(e.id)}));t.accessibilities=state.accessibilities.filter((function(e){return t.currentTrek.accessibilities.includes(e.id)}));if(state.accessibilitiesLevel){t.accessibilityLevel=state.accessibilitiesLevel.find((function(e){return t.currentTrek.accessibility_level===e.id}))}t.cities=t.currentTrek.cities.map((function(t){var e;return(e=state.cities.find((function(e){return e.id===t})))===null||e===void 0?void 0:e.name}));t.hasStep=t.currentTrek.children.length>0}}))};t.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){reset()}};t.prototype.handleOptions=function(){var t=this;return Object.assign(Object.assign({},options),{presentation:Object.assign({},presentation),description:Object.assign(Object.assign({},description),{visible:Boolean(this.currentTrek.description)}),recommendations:Object.assign(Object.assign({},recommendations),{visible:Boolean(this.currentTrek.advice||this.labels&&this.labels.length>0)}),sensitiveArea:Object.assign(Object.assign({},sensitiveArea),{visible:Boolean(state.currentSensitiveAreas&&state.currentSensitiveAreas.length>0)}),informationPlaces:Object.assign(Object.assign({},informationPlaces),{visible:Boolean(state.currentInformationDesks&&state.currentInformationDesks.filter((function(e){return t.currentTrek.information_desks.includes(e.id)})).length>0)}),pois:Object.assign(Object.assign({},pois),{visible:Boolean(state.currentPois&&state.currentPois.length>0)})})};t.prototype.handleFullscreen=function(){if(this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].url){this.swiperImagesRef.requestFullscreen()}};t.prototype.handleIndicatorSelectedTrekOption=function(){var t=0;var e;var i=0;var n=Object.values(this.options);var o=0;while(!e&&o<n.length){if(n[o].indicator){e=n[o]}else{if(n[o].visible){t+=1;i+=n[o].width}}o++}return"".concat(i+16*t-e.width/2,"px")};t.prototype.handleScrollTo=function(t){this.trekDetailContainerRef.scrollTo({top:t.offsetTop-48})};t.prototype.render=function(){var t=this;var e,i,n,o,r,a,s;return h(Host,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-surface":this.colorOnSurface,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-background":this.colorBackground,"--detail-bottom-space-height":this.isLargeView?"8px":"104px"}},this.currentTrek&&h("div",{class:"trek-options"},h("a",{onClick:function(){return t.handleScrollTo(t.presentationRef)},class:"presentation trek-option".concat(this.options.presentation.indicator?" selected-trek-option":"")},translate[state.language].options.presentation),this.options.description.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.descriptionRef)},class:"description trek-option".concat(this.options.description.indicator?" selected-trek-option":"")},translate[state.language].options.description),this.options.recommendations.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.recommendationRef)},class:"recommendations trek-option".concat(this.options.recommendations.indicator?" selected-trek-option":"")},translate[state.language].options.recommendations),this.options.sensitiveArea.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.sensitiveAreaRef)},class:"sensitive-areas trek-option".concat(this.options.sensitiveArea.indicator?" selected-trek-option":"")},translate[state.language].options.environmentalSensitiveAreas),this.options.informationPlaces.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.informationDeskRef)},class:"information-places trek-option".concat(this.options.informationPlaces.indicator?" selected-trek-option":"")},translate[state.language].options.informationPlaces),this.options.pois.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.poiRef)},class:"pois trek-option".concat(this.options.pois.indicator?" selected-trek-option":"")},translate[state.language].options.pois),h("span",{class:"indicator-selected-trek-option",style:{transform:"translateX(".concat(this.handleIndicatorSelectedTrekOption(),")")}})),this.currentTrek&&h("div",{class:"trek-detail-container",ref:function(e){return t.trekDetailContainerRef=e}},h("div",{class:"images-container",ref:function(e){return t.presentationRef=e}},h("div",{class:"swiper swiper-images",ref:function(e){return t.swiperImagesRef=e}},h("div",{class:"swiper-wrapper"},this.currentTrek.attachments.filter((function(t){return t.type==="image"})).map((function(e){return h("div",{class:"swiper-slide"},h("img",{class:"image",src:e.url,loading:"lazy",onClick:function(){return t.handleFullscreen()}}))}))),h("div",{class:"swiper-pagination",ref:function(e){return t.paginationElImagesRef=e}}),h("div",{class:"swiper-button-prev",ref:function(e){return t.prevElImagesRef=e}}),h("div",{class:"swiper-button-next",ref:function(e){return t.nextElImagesRef=e}}))),h("div",{class:"name"},this.currentTrek.name),this.themes.length>0&&h("div",{class:"themes-container"},this.themes.map((function(t){return h("div",{class:"theme"},t.label)}))),h("div",{class:"sub-container"},h("div",{class:"icons-labels-container"},h("div",{class:"row"},h("div",{class:"icon-label difficulty"},((e=this.difficulty)===null||e===void 0?void 0:e.pictogram)&&h("img",{src:this.difficulty.pictogram}),(i=this.difficulty)===null||i===void 0?void 0:i.label),h("div",{class:"icon-label duration"},h("span",{class:"material-symbols material-symbols-outlined"},"timelapse"),formatDuration((n=this.currentTrek)===null||n===void 0?void 0:n.duration)),h("div",{class:"icon-label route"},((o=this.route)===null||o===void 0?void 0:o.pictogram)&&h("img",{src:this.route.pictogram}),(r=this.route)===null||r===void 0?void 0:r.route)),h("div",{class:"row"},h("div",{class:"icon-label length"},h("span",{class:"material-symbols material-symbols-outlined"},"open_in_full"),formatLength(this.currentTrek.length_2d)),h("div",{class:"icon-label ascent"},h("span",{class:"material-symbols material-symbols-outlined"},"moving"),formatAscent(this.currentTrek.ascent)),h("div",{class:"icon-label practice"},((a=this.practice)===null||a===void 0?void 0:a.pictogram)&&h("img",{src:this.practice.pictogram}),(s=this.practice)===null||s===void 0?void 0:s.name)))),h("div",{class:"divider"}),h("div",{class:"downloads-container"},h("div",{class:"download-title"},translate[state.language].downloads),h("div",{class:"links-container"},h("a",{href:"".concat(this.currentTrek.gpx)},h("span",{class:"material-symbols material-symbols-outlined"},"download"),"GPX"),h("a",{href:"".concat(this.currentTrek.kml)},h("span",{class:"material-symbols material-symbols-outlined"},"download"),"KML"),h("a",{href:"".concat(this.currentTrek.pdf)},h("span",{class:"material-symbols material-symbols-outlined"},"download"),"PDF"))),h("div",{class:"divider"}),this.currentTrek.description_teaser&&h("div",{class:"description-teaser",innerHTML:this.currentTrek.description_teaser}),this.currentTrek.ambiance&&h("div",{class:"ambiance",innerHTML:this.currentTrek.ambiance}),h("div",{class:"divider"}),this.hasStep&&h("div",{class:"step-container"},h("div",{class:"step-title"},"".concat(this.currentTrek.children.length," ").concat(translate[state.language].steps)),h("div",{class:"swiper swiper-step",ref:function(e){return t.swiperStepRef=e}},h("div",{class:"swiper-wrapper"},state.currentTrekSteps&&state.currentTrekSteps.map((function(e){return h("div",{class:"swiper-slide"},h("grw-trek-card",{"reset-store-on-disconnected":"false",key:"trek-".concat(e.id),trek:e,"is-large-view":false,"is-step":true,"color-primary-app":t.colorPrimaryApp,"color-on-surface":t.colorOnSurface,"color-secondary-container":t.colorSecondaryContainer,"color-on-secondary-container":t.colorOnSecondaryContainer,"color-surface-container-low":t.colorSurfaceContainerLow}))}))))),h("div",{class:"divider"}),this.currentTrek.description&&h("div",{class:"description-container",ref:function(e){return t.descriptionRef=e}},h("div",{class:"description-title"},translate[state.language].description),h("div",{class:"description",innerHTML:this.currentTrek.description})),this.currentTrek.departure&&h("div",{class:"departure-container"},h("div",{class:"departure-title"},translate[state.language].departure," : "),h("div",{innerHTML:this.currentTrek.departure})),this.currentTrek.arrival&&h("div",{class:"arrival-container"},h("div",{class:"arrival-title"},translate[state.language].arrival," : "),h("div",{innerHTML:this.currentTrek.arrival})),this.currentTrek.cities&&this.currentTrek.cities.length>0&&h("div",{class:"cities-container"},h("div",{class:"cities-title"},translate[state.language].cities," : "),h("div",{innerHTML:this.cities.join(", ")})),this.weather&&this.currentTrek.departure_city&&h("div",{class:"weather-container"},h("iframe",{height:"150",frameborder:"0",src:"https://meteofrance.com/widget/prevision/".concat(this.currentTrek.departure_city,"0#").concat(this.colorPrimaryApp)})),this.currentTrek.access&&h("div",null,h("div",{class:"divider"}),h("div",{class:"access-container"},h("div",{class:"access-title"},translate[state.language].roadAccess),h("div",{class:"access",innerHTML:this.currentTrek.access}))),this.currentTrek.public_transport&&h("div",null,h("div",{class:"divider"}),h("div",{class:"public-transport-container"},h("div",{class:"public-transport-title"},translate[state.language].transport),h("div",{class:"public-transport",innerHTML:this.currentTrek.public_transport}))),(this.currentTrek.advice||this.labels.length>0)&&h("div",null,h("div",{class:"divider"}),h("div",{class:"advice-container",ref:function(e){return t.recommendationRef=e}},h("div",{class:"advice-title"},translate[state.language].recommendations),this.currentTrek.advice&&h("div",{class:"current-advice-container"},h("span",{class:"material-symbols material-symbols-outlined"},"warning"),h("div",{class:"advice",innerHTML:this.currentTrek.advice})),this.labels.map((function(t){return h("div",{class:"label-container"},h("div",{class:"label-sub-container"},t.pictogram&&h("img",{src:t.pictogram}),h("div",{class:"label-name",innerHTML:t.name})),h("div",{class:"label-advice",innerHTML:t.advice}))})))),this.currentTrek.advised_parking&&h("div",null,h("div",{class:"divider"}),h("div",{class:"advised-parking-container",ref:function(e){return t.parkingRef=e}},h("div",{class:"advised-parking-title"},translate[state.language].recommendedParking),h("div",{class:"advised-parking",innerHTML:this.currentTrek.advised_parking}))),this.currentTrek.gear&&h("div",null,h("div",{class:"divider"}),h("div",{class:"gear-container"},h("div",{class:"gear-title"},translate[state.language].equipments),h("div",{class:"gear",innerHTML:this.currentTrek.gear}))),state.currentSensitiveAreas&&state.currentSensitiveAreas.length>0&&h("div",null,h("div",{class:"divider"}),h("div",{class:"sensitive-areas-container",ref:function(e){return t.sensitiveAreaRef=e}},h("div",{class:"sensitive-areas-title"},translate[state.language].environmentalSensitiveAreas),state.currentSensitiveAreas.map((function(t){return h("grw-sensitive-area-detail",{sensitiveArea:t})})))),state.currentInformationDesks&&state.currentInformationDesks.filter((function(e){return t.currentTrek.information_desks.includes(e.id)})).length>0&&h("div",null,h("div",{class:"divider"}),h("div",{class:"information-desks-container",ref:function(e){return t.informationDeskRef=e}},h("div",{class:"information-desks-title"},translate[state.language].informationPlaces),h("div",{class:"swiper swiper-information-desks",ref:function(e){return t.swiperInformationDesksRef=e}},h("div",{class:"swiper-wrapper"},state.currentInformationDesks.filter((function(e){return t.currentTrek.information_desks.includes(e.id)})).map((function(t){return h("div",{class:"swiper-slide"},h("grw-information-desk-detail",{informationDesk:t}))})))))),(this.currentTrek.disabled_infrastructure||this.accessibilities&&this.accessibilities.length>0||this.currentTrek.accessibility_level||this.currentTrek.accessibility_slope||this.currentTrek.accessibility_width||this.currentTrek.accessibility_signage||this.currentTrek.accessibility_covering||this.currentTrek.accessibility_exposure||this.currentTrek.accessibility_advice)&&h("div",null,h("div",{class:"divider"}),h("div",{class:"accessibilities-container"},h("div",{class:"accessibilities-title"},translate[state.language].accessibility),this.currentTrek.disabled_infrastructure&&h("div",{innerHTML:this.currentTrek.disabled_infrastructure}),h("div",{class:"accessibilities-content-container"},this.accessibilities.map((function(t){return h("div",{class:"accessibility-content-container"},h("img",{src:t.pictogram}),h("div",{innerHTML:t.name}))}))),this.currentTrek.accessibility_level&&h("div",{class:"accessibility-level-container"},h("div",{class:"accessibility-level-title"},translate[state.language].accessibilityLevel),h("div",{innerHTML:this.accessibilityLevel.name})),this.currentTrek.accessibility_slope&&h("div",{class:"accessibility-slope-container"},h("div",{class:"accessibility-slope-title"},translate[state.language].accessibilitySlope),h("div",{innerHTML:this.currentTrek.accessibility_slope})),this.currentTrek.accessibility_width&&h("div",{class:"accessibility-width-container"},h("div",{class:"accessibility-width-title"},translate[state.language].accessibilityWidth),h("div",{innerHTML:this.currentTrek.accessibility_width})),this.currentTrek.accessibility_signage&&h("div",{class:"accessibility-signage-container"},h("div",{class:"accessibility-signage-title"},translate[state.language].accessibilitySignage),h("div",{innerHTML:this.currentTrek.accessibility_signage})),this.currentTrek.accessibility_covering&&h("div",{class:"accessibility-covering-container"},h("div",{class:"accessibility-covering-title"},translate[state.language].accessibilityCovering),h("div",{innerHTML:this.currentTrek.accessibility_covering})),this.currentTrek.accessibility_exposure&&h("div",{class:"accessibility-exposure-container"},h("div",{class:"accessibility-exposure-title"},translate[state.language].accessibilityExposure),h("div",{innerHTML:this.currentTrek.accessibility_exposure})),this.currentTrek.accessibility_advice&&h("div",{class:"accessibility-advice-container"},h("div",{class:"accessibility-advice-title"},translate[state.language].accessibilityAdvices),h("div",{innerHTML:this.currentTrek.accessibility_advice})))),state.currentPois&&state.currentPois.length>0&&h("div",null,h("div",{class:"divider"}),h("div",{class:"pois-container",ref:function(e){return t.poiRef=e}},h("div",{class:"pois-title"},translate[state.language].pois(state.currentPois.length)),h("div",{class:"swiper swiper-pois",ref:function(e){return t.swiperPoisRef=e}},h("div",{class:"swiper-wrapper"},state.currentPois.map((function(t){return h("div",{class:"swiper-slide"},h("grw-poi-detail",{poi:t}))})))))),this.currentTrek.source&&this.currentTrek.source.length>0&&h("div",null,h("div",{class:"divider"}),h("div",{class:"source-container"},h("div",{class:"source-title"},translate[state.language].sources),this.sources.map((function(t){return h("div",{class:"source-sub-container"},t.pictogram&&h("img",{src:t.pictogram}),h("div",null,h("div",{class:"source-name",innerHTML:t.name}),h("a",{class:"source-advice",href:t.website,innerHTML:t.website})))})))),h("div",{class:"detail-bottom-space"})))};return t}();GrwTrekDetail.style=grwTrekDetailCss;var GrwTrekProvider=function(){function t(t){registerInstance(this,t);this.controller=new AbortController;this.signal=this.controller.signal;this.init={cache:"default",signal:this.signal};this.languages="fr";this.api=undefined;this.trekId=undefined}t.prototype.connectedCallback=function(){if(!state.api){state.api=this.api;state.languages=this.languages.split(",");state.language=state.languages[0]}this.handleTrek()};t.prototype.handleTrek=function(){var t=this;var e=[];e.push(!state.difficulties?fetch("".concat(state.api,"trek_difficulty/?language=").concat(state.language,"&fields=id,label,pictogram"),this.init):new Response("null"));e.push(!state.routes?fetch("".concat(state.api,"trek_route/?language=").concat(state.language,"&fields=id,route,pictogram"),this.init):new Response("null"));e.push(!state.practices?fetch("".concat(state.api,"trek_practice/?language=").concat(state.language,"&fields=id,name,pictogram"),this.init):new Response("null"));e.push(!state.themes?fetch("".concat(state.api,"theme/?language=").concat(state.language,"&fields=id,label,pictogram"),this.init):new Response("null"));e.push(!state.cities?fetch("".concat(state.api,"city/?language=").concat(state.language,"&fields=id,name&published=true&page_size=999"),this.init):new Response("null"));e.push(!state.accessibilities?fetch("".concat(state.api,"trek_accessibility/?language=").concat(state.language,"&fields=id,name,pictogram"),this.init):new Response("null"));Promise.all(__spreadArray(__spreadArray([],e,true),[fetch("".concat(this.api,"sensitivearea/?language=").concat(state.language,"&published=true&trek=").concat(this.trekId,"&fields=id,geometry,name,description,contact,info_url,period,practices"),this.init).then((function(t){if(t.ok){return t}else{throw new Error("Sentive area error")}})).catch((function(){return new Response("null")})),fetch("".concat(state.api,"label/?language=").concat(state.language,"&fields=id,name,advice,pictogram"),this.init),fetch("".concat(state.api,"source/?language=").concat(state.language,"&fields=id,name,website,pictogram"),this.init),fetch("".concat(state.api,"trek_accessibility_level/?language=").concat(state.language,"&fields=id,name"),this.init).catch((function(){return new Response("null")})),fetch("".concat(state.api,"poi/?language=").concat(state.language,"&trek=").concat(this.trekId,"&published=true&fields=id,name,description,attachments,type,geometry&page_size=999"),this.init),fetch("".concat(state.api,"poi_type/?language=").concat(state.language,"&fields=id,pictogram"),this.init),fetch("".concat(state.api,"informationdesk/?language=").concat(state.language,"&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999"),this.init),fetch("".concat(state.api,"trek/").concat(this.trekId,"/?language=").concat(state.language,"&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,cities,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities,information_desks,children"),this.init)],false)).then((function(t){return Promise.all(t.map((function(t){return t.json()})))})).then((function(e){var i=e[0],n=e[1],o=e[2],r=e[3],a=e[4],s=e[5],l=e[6],c=e[7],h=e[8],u=e[9],p=e[10],d=e[11],f=e[12],m=e[13];return __awaiter(t,void 0,void 0,(function(){var t,e;return __generator(this,(function(_){switch(_.label){case 0:state.trekNetworkError=false;if(!(m.children.length>0))return[3,2];t=[];m.children.forEach((function(e){t.push(fetch("".concat(state.api,"trek/").concat(e,"/?language=").concat(state.language,"&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,cities,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities,information_desks,children")))}));return[4,Promise.all(__spreadArray([],t,true)).then((function(t){return Promise.all(t.map((function(t){return t.json()})))}))];case 1:e=_.sent();state.currentTrekSteps=e;return[3,3];case 2:state.currentTrekSteps=null;_.label=3;case 3:if(i){state.difficulties=i.results}if(n){state.routes=n.results}if(o){state.practices=o.results.map((function(t){return Object.assign(Object.assign({},t),{selected:false})}))}if(r){state.themes=r.results}if(a){state.cities=a.results}if(s){state.accessibilities=s.results}if(l){state.currentSensitiveAreas=l.results}state.labels=c.results;state.sources=h.results;if(u){state.accessibilitiesLevel=u.results}state.currentPois=p.results;state.poiTypes=d.results;state.currentInformationDesks=f.results;state.currentTrek=m;return[2]}}))}))})).catch((function(){state.trekNetworkError=true}))};t.prototype.disconnectedCallback=function(){this.controller.abort();state.trekNetworkError=false};t.prototype.render=function(){return h(Host,null)};return t}();var grwTreksListCss='.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}:host{font-family:"Roboto";width:100%;height:100%;overflow-y:auto}grw-trek-card{margin:0px 8px 8px 8px}.list-bottom-space{min-height:104px;height:104px;width:100%}.current-treks-within-bounds-length{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:16px;color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400}.treks-list-container{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around}';var GrwTreksList=function(){function t(t){registerInstance(this,t);this.step=10;this.shouldAddInfiniteScrollEvent=true;this.handleInfiniteScrollBind=this.handleInfiniteScroll.bind(this);this.treksToDisplay=[];this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorSurfaceContainerLow="#f7f2fa";this.isLargeView=false;this.resetStoreOnDisconnected=true}t.prototype.connectedCallback=function(){var t=this;this.handleInfiniteScrollEvent(true);if(state.currentTreks){this.treksToDisplay=__spreadArray([],state.currentTreks.slice(0,this.step),true)}onChange("currentTreks",(function(){t.handleInfiniteScrollEvent(true);t.element.scroll({top:0});if(state.currentTreks){t.treksToDisplay=__spreadArray([],state.currentTreks.slice(0,t.step),true)}}));onChange("treksWithinBounds",(function(){t.handleInfiniteScrollEvent(true);t.element.scroll({top:0});if(state.treksWithinBounds){t.treksToDisplay=__spreadArray([],state.treksWithinBounds.slice(0,t.step),true)}}))};t.prototype.handleInfiniteScroll=function(t){if(t.composedPath()[0].scrollTop+t.composedPath()[0].scrollHeight/2>=t.composedPath()[0].scrollHeight){if(this.treksToDisplay.length<state.treksWithinBounds.length){this.treksToDisplay=state.treksWithinBounds.slice(0,this.treksToDisplay.length+this.step>=state.treksWithinBounds.length?state.treksWithinBounds.length:this.treksToDisplay.length+this.step)}else{this.handleInfiniteScrollEvent(false)}}};t.prototype.handleInfiniteScrollEvent=function(t){if(t){if(this.shouldAddInfiniteScrollEvent){this.element.addEventListener("scroll",this.handleInfiniteScrollBind);this.shouldAddInfiniteScrollEvent=!t}}else{this.element.removeEventListener("scroll",this.handleInfiniteScrollBind);this.shouldAddInfiniteScrollEvent=!t}};t.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){reset()}this.handleInfiniteScrollEvent(false)};t.prototype.render=function(){var t=this;return h(Host,{style:{"--color-primary-app":this.colorPrimaryApp}},state.treksWithinBounds&&h("div",{class:"current-treks-within-bounds-length"},"".concat(state.treksWithinBounds.length," ").concat(state.treksWithinBounds.length>1?translate[state.language].treks:translate[state.language].trek)),h("div",{class:"treks-list-container"},this.treksToDisplay.map((function(e){return h("grw-trek-card",{"reset-store-on-disconnected":"false",key:"trek-".concat(e.id),trek:e,"is-large-view":t.isLargeView,"color-primary-app":t.colorPrimaryApp,"color-on-surface":t.colorOnSurface,"color-secondary-container":t.colorSecondaryContainer,"color-on-secondary-container":t.colorOnSecondaryContainer,"color-surface-container-low":t.colorSurfaceContainerLow})}))),h("div",{class:"list-bottom-space"}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();GrwTreksList.style=grwTreksListCss;var GrwTreksProvider=function(){function t(t){registerInstance(this,t);this.controller=new AbortController;this.signal=this.controller.signal;this.init={cache:"default",signal:this.signal};this.languages="fr";this.api=undefined;this.inBbox=undefined;this.cities=undefined;this.districts=undefined;this.structures=undefined;this.themes=undefined;this.portals=undefined;this.routes=undefined;this.practices=undefined}t.prototype.connectedCallback=function(){if(!state.api){state.api=this.api;state.languages=this.languages.split(",");state.language=state.languages[0]}this.handleTreks()};t.prototype.disconnectedCallback=function(){this.controller.abort();state.treksNetworkError=false};t.prototype.handleTreks=function(){var t="".concat(this.api,"trek/?language=").concat(state.language,"&published=true");this.inBbox&&(t+="&in_bbox=".concat(this.inBbox));this.cities&&(t+="&cities=".concat(this.cities));this.districts&&(t+="&districts=".concat(this.districts));this.structures&&(t+="&structures=".concat(this.structures));this.themes&&(t+="&themes=".concat(this.themes));this.portals&&(t+="&portals=".concat(this.portals));this.routes&&(t+="&routes=".concat(this.routes));this.practices&&(t+="&practices=".concat(this.practices));t+="&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_city,departure_geom,cities,accessibilities,labels,districts&page_size=999";Promise.all([fetch("".concat(state.api,"trek_difficulty/?language=").concat(state.language,"&fields=id,label,pictogram"),this.init),fetch("".concat(state.api,"trek_route/?language=").concat(state.language,"&fields=id,route,pictogram"),this.init),fetch("".concat(state.api,"trek_practice/?language=").concat(state.language,"&fields=id,name,pictogram"),this.init),fetch("".concat(state.api,"theme/?language=").concat(state.language,"&fields=id,label,pictogram"),this.init),fetch("".concat(state.api,"city/?language=").concat(state.language,"&fields=id,name&published=true&page_size=999"),this.init),fetch("".concat(state.api,"trek_accessibility/?language=").concat(state.language,"&fields=id,name,pictogram&published=true&page_size=999"),this.init),fetch("".concat(state.api,"label/?language=").concat(state.language,"&fields=id,name,advice,pictogram&published=true&page_size=999"),this.init),fetch("".concat(state.api,"district/?language=").concat(state.language,"&fields=id,name&published=true&page_size=999"),this.init),fetch(t,this.init)]).then((function(t){return Promise.all(t.map((function(t){return t.json()})))})).then((function(t){var e=t[0],i=t[1],n=t[2],o=t[3],r=t[4],a=t[5],s=t[6],l=t[7],c=t[8];state.treksNetworkError=false;state.difficulties=e.results;state.routes=i.results;state.practices=n.results.map((function(t){return Object.assign(Object.assign({},t),{selected:false})}));state.themes=o.results;state.cities=r.results;state.accessibilities=a.results;state.durations=[{id:1,name:"0 - 1h",minValue:0,maxValue:1,selected:false},{id:2,name:"1 - 2h",minValue:1,maxValue:2,selected:false},{id:3,name:"2 - 5h",minValue:2,maxValue:5,selected:false},{id:4,name:"5 - 10h",minValue:5,maxValue:10,selected:false}];state.lengths=[{id:1,name:"0 - 5km",minValue:0,maxValue:5e3,selected:false},{id:2,name:"5 - 10km",minValue:5e3,maxValue:1e4,selected:false},{id:3,name:"10 - 15km",minValue:1e4,maxValue:15e3,selected:false},{id:4,name:"15 - 50km",minValue:15e3,maxValue:5e4,selected:false}];state.elevations=[{id:1,name:"0 - 500m",minValue:0,maxValue:500,selected:false},{id:2,name:"500m - 1km",minValue:500,maxValue:1e3,selected:false}];state.currentTreks=c.results;state.treksWithinBounds=c.results;state.labels=s.results;state.districts=l.results;state.treks=c.results})).catch((function(){return state.treksNetworkError=true}))};t.prototype.render=function(){return h(Host,null)};return t}();export{GrwFilter as grw_filter,GrwMap as grw_map,GrwSearch as grw_search,GrwTrekDetail as grw_trek_detail,GrwTrekProvider as grw_trek_provider,GrwTreksList as grw_treks_list,GrwTreksProvider as grw_treks_provider};
|
|
13
|
+
(function(e,i){{if(typeof i!=="undefined"&&i.L){t.exports=e(L)}else{t.exports=e(leafletSrc)}}if(typeof i!=="undefined"&&i.L){i.L.Control.Locate=e(L)}})((function(t){var e=function(e,i,n){n=n.split(" ");n.forEach((function(n){t.DomUtil[e].call(this,i,n)}))};var i=function(t,i){return e("addClass",t,i)};var n=function(t,i){return e("removeClass",t,i)};var o=t.Marker.extend({initialize:function(e,i){t.Util.setOptions(this,i);this._latlng=e;this.createIcon()},createIcon:function(){var e=this.options;var i="";if(e.color!==undefined){i+="stroke:".concat(e.color,";")}if(e.weight!==undefined){i+="stroke-width:".concat(e.weight,";")}if(e.fillColor!==undefined){i+="fill:".concat(e.fillColor,";")}if(e.fillOpacity!==undefined){i+="fill-opacity:".concat(e.fillOpacity,";")}if(e.opacity!==undefined){i+="opacity:".concat(e.opacity,";")}var n=this._getIconSVG(e,i);this._locationIcon=t.divIcon({className:n.className,html:n.svg,iconSize:[n.w,n.h]});this.setIcon(this._locationIcon)},_getIconSVG:function(t,e){var i=t.radius;var n=t.weight;var o=i+n;var r=o*2;var a='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(r,'" height="').concat(r,'" version="1.1" viewBox="-').concat(o," -").concat(o," ").concat(r," ").concat(r,'">')+'<circle r="'+i+'" style="'+e+'" />'+"</svg>";return{className:"leaflet-control-locate-location",svg:a,w:r,h:r}},setStyle:function(e){t.Util.setOptions(this,e);this.createIcon()}});var r=o.extend({initialize:function(e,i,n){t.Util.setOptions(this,n);this._latlng=e;this._heading=i;this.createIcon()},setHeading:function(t){this._heading=t},_getIconSVG:function(t,e){var i=t.radius;var n=t.width+t.weight;var o=(i+t.depth+t.weight)*2;var r="M0,0 l".concat(t.width/2,",").concat(t.depth," l-").concat(n,",0 z");var a="transform: rotate(".concat(this._heading,"deg)");var s='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(n,'" height="').concat(o,'" version="1.1" viewBox="-').concat(n/2," 0 ").concat(n," ").concat(o,'" style="').concat(a,'">')+'<path d="'+r+'" style="'+e+'" />'+"</svg>";return{className:"leaflet-control-locate-heading",svg:s,w:n,h:o}}});var a=t.Control.extend({options:{position:"topleft",layer:undefined,setView:"untilPanOrZoom",keepCurrentZoomLevel:false,initialZoomLevel:false,getLocationBounds:function(t){return t.bounds},flyTo:false,clickBehavior:{inView:"stop",outOfView:"setView",inViewNotFollowing:"inView"},returnToPrevBounds:false,cacheLocation:true,drawCircle:true,drawMarker:true,showCompass:true,markerClass:o,compassClass:r,circleStyle:{className:"leaflet-control-locate-circle",color:"#136AEC",fillColor:"#136AEC",fillOpacity:.15,weight:0},markerStyle:{className:"leaflet-control-locate-marker",color:"#fff",fillColor:"#2A93EE",fillOpacity:1,weight:3,opacity:1,radius:9},compassStyle:{fillColor:"#2A93EE",fillOpacity:1,weight:0,color:"#fff",opacity:1,radius:9,width:9,depth:6},followCircleStyle:{},followMarkerStyle:{},followCompassStyle:{},icon:"leaflet-control-locate-location-arrow",iconLoading:"leaflet-control-locate-spinner",iconElementTag:"span",textElementTag:"small",circlePadding:[0,0],metric:true,createButtonCallback:function(e,i){var n=t.DomUtil.create("a","leaflet-bar-part leaflet-bar-part-single",e);n.title=i.strings.title;n.href="#";n.setAttribute("role","button");var o=t.DomUtil.create(i.iconElementTag,i.icon,n);if(i.strings.text!==undefined){var r=t.DomUtil.create(i.textElementTag,"leaflet-locate-text",n);r.textContent=i.strings.text;n.classList.add("leaflet-locate-text-active");n.parentNode.style.display="flex";if(i.icon.length>0){o.classList.add("leaflet-locate-icon")}}return{link:n,icon:o}},onLocationError:function(t,e){alert(t.message)},onLocationOutsideMapBounds:function(t){t.stop();alert(t.options.strings.outsideMapBoundsMsg)},showPopup:true,strings:{title:"Show me where I am",metersUnit:"meters",feetUnit:"feet",popup:"You are within {distance} {unit} from this point",outsideMapBoundsMsg:"You seem located outside the boundaries of the map"},locateOptions:{maxZoom:Infinity,watch:true,setView:false}},initialize:function(e){for(var i in e){if(typeof this.options[i]==="object"){t.extend(this.options[i],e[i])}else{this.options[i]=e[i]}}this.options.followMarkerStyle=t.extend({},this.options.markerStyle,this.options.followMarkerStyle);this.options.followCircleStyle=t.extend({},this.options.circleStyle,this.options.followCircleStyle);this.options.followCompassStyle=t.extend({},this.options.compassStyle,this.options.followCompassStyle)},onAdd:function(e){var i=t.DomUtil.create("div","leaflet-control-locate leaflet-bar leaflet-control");this._container=i;this._map=e;this._layer=this.options.layer||new t.LayerGroup;this._layer.addTo(e);this._event=undefined;this._compassHeading=null;this._prevBounds=null;var n=this.options.createButtonCallback(i,this.options);this._link=n.link;this._icon=n.icon;t.DomEvent.on(this._link,"click",(function(e){t.DomEvent.stopPropagation(e);t.DomEvent.preventDefault(e);this._onClick()}),this).on(this._link,"dblclick",t.DomEvent.stopPropagation);this._resetVariables();this._map.on("unload",this._unload,this);return i},_onClick:function(){this._justClicked=true;var t=this._isFollowing();this._userPanned=false;this._userZoomed=false;if(this._active&&!this._event){this.stop()}else if(this._active){var e=this.options.clickBehavior;var i=e.outOfView;if(this._map.getBounds().contains(this._event.latlng)){i=t?e.inView:e.inViewNotFollowing}if(e[i]){i=e[i]}switch(i){case"setView":this.setView();break;case"stop":this.stop();if(this.options.returnToPrevBounds){var n=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds;n.bind(this._map)(this._prevBounds)}break}}else{if(this.options.returnToPrevBounds){this._prevBounds=this._map.getBounds()}this.start()}this._updateContainerStyle()},start:function(){this._activate();if(this._event){this._drawMarker(this._map);if(this.options.setView){this.setView()}}this._updateContainerStyle()},stop:function(){this._deactivate();this._cleanClasses();this._resetVariables();this._removeMarker()},stopFollowing:function(){this._userPanned=true;this._updateContainerStyle();this._drawMarker()},_activate:function(){if(this._active||!this._map){return}this._map.locate(this.options.locateOptions);this._map.fire("locateactivate",this);this._active=true;this._map.on("locationfound",this._onLocationFound,this);this._map.on("locationerror",this._onLocationError,this);this._map.on("dragstart",this._onDrag,this);this._map.on("zoomstart",this._onZoom,this);this._map.on("zoomend",this._onZoomEnd,this);if(this.options.showCompass){var e="ondeviceorientationabsolute"in window;if(e||"ondeviceorientation"in window){var i=this;var n=function(){t.DomEvent.on(window,e?"deviceorientationabsolute":"deviceorientation",i._onDeviceOrientation,i)};if(DeviceOrientationEvent&&typeof DeviceOrientationEvent.requestPermission==="function"){DeviceOrientationEvent.requestPermission().then((function(t){if(t==="granted"){n()}}))}else{n()}}}},_deactivate:function(){if(!this._active||!this._map){return}this._map.stopLocate();this._map.fire("locatedeactivate",this);this._active=false;if(!this.options.cacheLocation){this._event=undefined}this._map.off("locationfound",this._onLocationFound,this);this._map.off("locationerror",this._onLocationError,this);this._map.off("dragstart",this._onDrag,this);this._map.off("zoomstart",this._onZoom,this);this._map.off("zoomend",this._onZoomEnd,this);if(this.options.showCompass){this._compassHeading=null;if("ondeviceorientationabsolute"in window){t.DomEvent.off(window,"deviceorientationabsolute",this._onDeviceOrientation,this)}else if("ondeviceorientation"in window){t.DomEvent.off(window,"deviceorientation",this._onDeviceOrientation,this)}}},setView:function(){this._drawMarker();if(this._isOutsideMapBounds()){this._event=undefined;this.options.onLocationOutsideMapBounds(this)}else{if(this._justClicked&&this.options.initialZoomLevel!==false){var e=this.options.flyTo?this._map.flyTo:this._map.setView;e.bind(this._map)([this._event.latitude,this._event.longitude],this.options.initialZoomLevel)}else if(this.options.keepCurrentZoomLevel){var e=this.options.flyTo?this._map.flyTo:this._map.panTo;e.bind(this._map)([this._event.latitude,this._event.longitude])}else{var e=this.options.flyTo?this._map.flyToBounds:this._map.fitBounds;this._ignoreEvent=true;e.bind(this._map)(this.options.getLocationBounds(this._event),{padding:this.options.circlePadding,maxZoom:this.options.initialZoomLevel||this.options.locateOptions.maxZoom});t.Util.requestAnimFrame((function(){this._ignoreEvent=false}),this)}}},_drawCompass:function(){if(!this._event){return}var t=this._event.latlng;if(this.options.showCompass&&t&&this._compassHeading!==null){var e=this._isFollowing()?this.options.followCompassStyle:this.options.compassStyle;if(!this._compass){this._compass=new this.options.compassClass(t,this._compassHeading,e).addTo(this._layer)}else{this._compass.setLatLng(t);this._compass.setHeading(this._compassHeading);if(this._compass.setStyle){this._compass.setStyle(e)}}}if(this._compass&&(!this.options.showCompass||this._compassHeading===null)){this._compass.removeFrom(this._layer);this._compass=null}},_drawMarker:function(){if(this._event.accuracy===undefined){this._event.accuracy=0}var e=this._event.accuracy;var i=this._event.latlng;if(this.options.drawCircle){var n=this._isFollowing()?this.options.followCircleStyle:this.options.circleStyle;if(!this._circle){this._circle=t.circle(i,e,n).addTo(this._layer)}else{this._circle.setLatLng(i).setRadius(e).setStyle(n)}}var o;var r;if(this.options.metric){o=e.toFixed(0);r=this.options.strings.metersUnit}else{o=(e*3.2808399).toFixed(0);r=this.options.strings.feetUnit}if(this.options.drawMarker){var a=this._isFollowing()?this.options.followMarkerStyle:this.options.markerStyle;if(!this._marker){this._marker=new this.options.markerClass(i,a).addTo(this._layer)}else{this._marker.setLatLng(i);if(this._marker.setStyle){this._marker.setStyle(a)}}}this._drawCompass();var s=this.options.strings.popup;function l(){if(typeof s==="string"){return t.Util.template(s,{distance:o,unit:r})}else if(typeof s==="function"){return s({distance:o,unit:r})}else{return s}}if(this.options.showPopup&&s&&this._marker){this._marker.bindPopup(l())._popup.setLatLng(i)}if(this.options.showPopup&&s&&this._compass){this._compass.bindPopup(l())._popup.setLatLng(i)}},_removeMarker:function(){this._layer.clearLayers();this._marker=undefined;this._circle=undefined},_unload:function(){this.stop();this._map.off("unload",this._unload,this)},_setCompassHeading:function(e){if(!isNaN(parseFloat(e))&&isFinite(e)){e=Math.round(e);this._compassHeading=e;t.Util.requestAnimFrame(this._drawCompass,this)}else{this._compassHeading=null}},_onCompassNeedsCalibration:function(){this._setCompassHeading()},_onDeviceOrientation:function(t){if(!this._active){return}if(t.webkitCompassHeading){this._setCompassHeading(t.webkitCompassHeading)}else if(t.absolute&&t.alpha){this._setCompassHeading(360-t.alpha)}},_onLocationError:function(t){if(t.code==3&&this.options.locateOptions.watch){return}this.stop();this.options.onLocationError(t,this)},_onLocationFound:function(t){if(this._event&&this._event.latlng.lat===t.latlng.lat&&this._event.latlng.lng===t.latlng.lng&&this._event.accuracy===t.accuracy){return}if(!this._active){return}this._event=t;this._drawMarker();this._updateContainerStyle();switch(this.options.setView){case"once":if(this._justClicked){this.setView()}break;case"untilPan":if(!this._userPanned){this.setView()}break;case"untilPanOrZoom":if(!this._userPanned&&!this._userZoomed){this.setView()}break;case"always":this.setView();break}this._justClicked=false},_onDrag:function(){if(this._event&&!this._ignoreEvent){this._userPanned=true;this._updateContainerStyle();this._drawMarker()}},_onZoom:function(){if(this._event&&!this._ignoreEvent){this._userZoomed=true;this._updateContainerStyle();this._drawMarker()}},_onZoomEnd:function(){if(this._event){this._drawCompass()}if(this._event&&!this._ignoreEvent){if(this._marker&&!this._map.getBounds().pad(-.3).contains(this._marker.getLatLng())){this._userPanned=true;this._updateContainerStyle();this._drawMarker()}}},_isFollowing:function(){if(!this._active){return false}if(this.options.setView==="always"){return true}else if(this.options.setView==="untilPan"){return!this._userPanned}else if(this.options.setView==="untilPanOrZoom"){return!this._userPanned&&!this._userZoomed}},_isOutsideMapBounds:function(){if(this._event===undefined){return false}return this._map.options.maxBounds&&!this._map.options.maxBounds.contains(this._event.latlng)},_updateContainerStyle:function(){if(!this._container){return}if(this._active&&!this._event){this._setClasses("requesting")}else if(this._isFollowing()){this._setClasses("following")}else if(this._active){this._setClasses("active")}else{this._cleanClasses()}},_setClasses:function(t){if(t=="requesting"){n(this._container,"active following");i(this._container,"requesting");n(this._icon,this.options.icon);i(this._icon,this.options.iconLoading)}else if(t=="active"){n(this._container,"requesting following");i(this._container,"active");n(this._icon,this.options.iconLoading);i(this._icon,this.options.icon)}else if(t=="following"){n(this._container,"requesting");i(this._container,"active following");n(this._icon,this.options.iconLoading);i(this._icon,this.options.icon)}},_cleanClasses:function(){t.DomUtil.removeClass(this._container,"requesting");t.DomUtil.removeClass(this._container,"active");t.DomUtil.removeClass(this._container,"following");n(this._icon,this.options.iconLoading);i(this._icon,this.options.icon)},_resetVariables:function(){this._active=false;this._justClicked=false;this._userPanned=false;this._userZoomed=false}});t.control.locate=function(e){return new t.Control.Locate(e)};return a}),window)}));var punycode=createCommonjsModule((function(t,e){(function(i){var n=e&&!e.nodeType&&e;var o=t&&!t.nodeType&&t;var r=typeof commonjsGlobal=="object"&&commonjsGlobal;if(r.global===r||r.window===r||r.self===r){i=r}var a,s=2147483647,l=36,c=1,h=26,u=38,p=700,d=72,f=128,m="-",_=/^xn--/,g=/[^\x20-\x7E]/,v=/[\x2E\u3002\uFF0E\uFF61]/g,y={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},b=l-c,w=Math.floor,x=String.fromCharCode,k;function L(t){throw new RangeError(y[t])}function P(t,e){var i=t.length;var n=[];while(i--){n[i]=e(t[i])}return n}function T(t,e){var i=t.split("@");var n="";if(i.length>1){n=i[0]+"@";t=i[1]}t=t.replace(v,".");var o=t.split(".");var r=P(o,e).join(".");return n+r}function S(t){var e=[],i=0,n=t.length,o,r;while(i<n){o=t.charCodeAt(i++);if(o>=55296&&o<=56319&&i<n){r=t.charCodeAt(i++);if((r&64512)==56320){e.push(((o&1023)<<10)+(r&1023)+65536)}else{e.push(o);i--}}else{e.push(o)}}return e}function A(t){return P(t,(function(t){var e="";if(t>65535){t-=65536;e+=x(t>>>10&1023|55296);t=56320|t&1023}e+=x(t);return e})).join("")}function C(t){if(t-48<10){return t-22}if(t-65<26){return t-65}if(t-97<26){return t-97}return l}function M(t,e){return t+22+75*(t<26)-((e!=0)<<5)}function O(t,e,i){var n=0;t=i?w(t/p):t>>1;t+=w(t/e);for(;t>b*h>>1;n+=l){t=w(t/b)}return w(n+(b+1)*t/(t+u))}function z(t){var e=[],i=t.length,n,o=0,r=f,a=d,u,p,_,g,v,y,b,x,k;u=t.lastIndexOf(m);if(u<0){u=0}for(p=0;p<u;++p){if(t.charCodeAt(p)>=128){L("not-basic")}e.push(t.charCodeAt(p))}for(_=u>0?u+1:0;_<i;){for(g=o,v=1,y=l;;y+=l){if(_>=i){L("invalid-input")}b=C(t.charCodeAt(_++));if(b>=l||b>w((s-o)/v)){L("overflow")}o+=b*v;x=y<=a?c:y>=a+h?h:y-a;if(b<x){break}k=l-x;if(v>w(s/k)){L("overflow")}v*=k}n=e.length+1;a=O(o-g,n,g==0);if(w(o/n)>s-r){L("overflow")}r+=w(o/n);o%=n;e.splice(o++,0,r)}return A(e)}function E(t){var e,i,n,o,r,a,u,p,_,g,v,y=[],b,k,P,T;t=S(t);b=t.length;e=f;i=0;r=d;for(a=0;a<b;++a){v=t[a];if(v<128){y.push(x(v))}}n=o=y.length;if(o){y.push(m)}while(n<b){for(u=s,a=0;a<b;++a){v=t[a];if(v>=e&&v<u){u=v}}k=n+1;if(u-e>w((s-i)/k)){L("overflow")}i+=(u-e)*k;e=u;for(a=0;a<b;++a){v=t[a];if(v<e&&++i>s){L("overflow")}if(v==e){for(p=i,_=l;;_+=l){g=_<=r?c:_>=r+h?h:_-r;if(p<g){break}T=p-g;P=l-g;y.push(x(M(g+T%P,0)));p=w(T/P)}y.push(x(M(p,0)));r=O(i,k,n==o);i=0;++n}}++i;++e}return y.join("")}function I(t){return T(t,(function(t){return _.test(t)?z(t.slice(4).toLowerCase()):t}))}function B(t){return T(t,(function(t){return g.test(t)?"xn--"+E(t):t}))}a={version:"1.4.1",ucs2:{decode:S,encode:A},decode:z,encode:E,toASCII:B,toUnicode:I};if(n&&o){if(t.exports==n){o.exports=a}else{for(k in a){a.hasOwnProperty(k)&&(n[k]=a[k])}}}else{i.punycode=a}})(commonjsGlobal)}));var shams=function t(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function"){return false}if(typeof Symbol.iterator==="symbol"){return true}var e={};var i=Symbol("test");var n=Object(i);if(typeof i==="string"){return false}if(Object.prototype.toString.call(i)!=="[object Symbol]"){return false}if(Object.prototype.toString.call(n)!=="[object Symbol]"){return false}var o=42;e[i]=o;for(i in e){return false}if(typeof Object.keys==="function"&&Object.keys(e).length!==0){return false}if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(e).length!==0){return false}var r=Object.getOwnPropertySymbols(e);if(r.length!==1||r[0]!==i){return false}if(!Object.prototype.propertyIsEnumerable.call(e,i)){return false}if(typeof Object.getOwnPropertyDescriptor==="function"){var a=Object.getOwnPropertyDescriptor(e,i);if(a.value!==o||a.enumerable!==true){return false}}return true};var origSymbol=typeof Symbol!=="undefined"&&Symbol;var hasSymbols$1=function t(){if(typeof origSymbol!=="function"){return false}if(typeof Symbol!=="function"){return false}if(typeof origSymbol("foo")!=="symbol"){return false}if(typeof Symbol("bar")!=="symbol"){return false}return shams()};var test={foo:{}};var $Object=Object;var hasProto$1=function t(){return{__proto__:test}.foo===test.foo&&!({__proto__:null}instanceof $Object)};var ERROR_MESSAGE="Function.prototype.bind called on incompatible ";var slice=Array.prototype.slice;var toStr$1=Object.prototype.toString;var funcType="[object Function]";var implementation=function t(e){var i=this;if(typeof i!=="function"||toStr$1.call(i)!==funcType){throw new TypeError(ERROR_MESSAGE+i)}var n=slice.call(arguments,1);var o;var r=function(){if(this instanceof o){var t=i.apply(this,n.concat(slice.call(arguments)));if(Object(t)===t){return t}return this}else{return i.apply(e,n.concat(slice.call(arguments)))}};var a=Math.max(0,i.length-n.length);var s=[];for(var l=0;l<a;l++){s.push("$"+l)}o=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(r);if(i.prototype){var c=function t(){};c.prototype=i.prototype;o.prototype=new c;c.prototype=null}return o};var functionBind=Function.prototype.bind||implementation;var src=functionBind.call(Function.call,Object.prototype.hasOwnProperty);var undefined$1;var $SyntaxError=SyntaxError;var $Function=Function;var $TypeError$1=TypeError;var getEvalledConstructor=function(t){try{return $Function('"use strict"; return ('+t+").constructor;")()}catch(e){}};var $gOPD=Object.getOwnPropertyDescriptor;var throwTypeError=function(){throw new $TypeError$1};var ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(t){try{return $gOPD(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError;var hasSymbols=hasSymbols$1();var hasProto=hasProto$1();var getProto=Object.getPrototypeOf||(hasProto?function(t){return t.__proto__}:null);var needsEval={};var TypedArray=typeof Uint8Array==="undefined"||!getProto?undefined$1:getProto(Uint8Array);var INTRINSICS={"%AggregateError%":typeof AggregateError==="undefined"?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer==="undefined"?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":typeof Atomics==="undefined"?undefined$1:Atomics,"%BigInt%":typeof BigInt==="undefined"?undefined$1:BigInt,"%BigInt64Array%":typeof BigInt64Array==="undefined"?undefined$1:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array==="undefined"?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView==="undefined"?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array==="undefined"?undefined$1:Float32Array,"%Float64Array%":typeof Float64Array==="undefined"?undefined$1:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry==="undefined"?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":typeof Int8Array==="undefined"?undefined$1:Int8Array,"%Int16Array%":typeof Int16Array==="undefined"?undefined$1:Int16Array,"%Int32Array%":typeof Int32Array==="undefined"?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":typeof JSON==="object"?JSON:undefined$1,"%Map%":typeof Map==="undefined"?undefined$1:Map,"%MapIteratorPrototype%":typeof Map==="undefined"||!hasSymbols||!getProto?undefined$1:getProto((new Map)[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise==="undefined"?undefined$1:Promise,"%Proxy%":typeof Proxy==="undefined"?undefined$1:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect==="undefined"?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set==="undefined"?undefined$1:Set,"%SetIteratorPrototype%":typeof Set==="undefined"||!hasSymbols||!getProto?undefined$1:getProto((new Set)[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer==="undefined"?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$1,"%Uint8Array%":typeof Uint8Array==="undefined"?undefined$1:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray==="undefined"?undefined$1:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array==="undefined"?undefined$1:Uint16Array,"%Uint32Array%":typeof Uint32Array==="undefined"?undefined$1:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap==="undefined"?undefined$1:WeakMap,"%WeakRef%":typeof WeakRef==="undefined"?undefined$1:WeakRef,"%WeakSet%":typeof WeakSet==="undefined"?undefined$1:WeakSet};var doEval=function t(e){var i;if(e==="%AsyncFunction%"){i=getEvalledConstructor("async function () {}")}else if(e==="%GeneratorFunction%"){i=getEvalledConstructor("function* () {}")}else if(e==="%AsyncGeneratorFunction%"){i=getEvalledConstructor("async function* () {}")}else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");if(n){i=n.prototype}}else if(e==="%AsyncIteratorPrototype%"){var o=t("%AsyncGenerator%");if(o&&getProto){i=getProto(o.prototype)}}INTRINSICS[e]=i;return i};var LEGACY_ALIASES={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]};var $concat$1=functionBind.call(Function.call,Array.prototype.concat);var $spliceApply=functionBind.call(Function.apply,Array.prototype.splice);var $replace$1=functionBind.call(Function.call,String.prototype.replace);var $strSlice=functionBind.call(Function.call,String.prototype.slice);var $exec=functionBind.call(Function.call,RegExp.prototype.exec);var rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;var reEscapeChar=/\\(\\)?/g;var stringToPath=function t(e){var i=$strSlice(e,0,1);var n=$strSlice(e,-1);if(i==="%"&&n!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`")}else if(n==="%"&&i!=="%"){throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`")}var o=[];$replace$1(e,rePropName,(function(t,e,i,n){o[o.length]=i?$replace$1(n,reEscapeChar,"$1"):e||t}));return o};var getBaseIntrinsic=function t(e,i){var n=e;var o;if(src(LEGACY_ALIASES,n)){o=LEGACY_ALIASES[n];n="%"+o[0]+"%"}if(src(INTRINSICS,n)){var r=INTRINSICS[n];if(r===needsEval){r=doEval(n)}if(typeof r==="undefined"&&!i){throw new $TypeError$1("intrinsic "+e+" exists, but is not available. Please file an issue!")}return{alias:o,name:n,value:r}}throw new $SyntaxError("intrinsic "+e+" does not exist!")};var getIntrinsic=function t(e,i){if(typeof e!=="string"||e.length===0){throw new $TypeError$1("intrinsic name must be a non-empty string")}if(arguments.length>1&&typeof i!=="boolean"){throw new $TypeError$1('"allowMissing" argument must be a boolean')}if($exec(/^%?[^%]*%?$/,e)===null){throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name")}var n=stringToPath(e);var o=n.length>0?n[0]:"";var r=getBaseIntrinsic("%"+o+"%",i);var a=r.name;var s=r.value;var l=false;var c=r.alias;if(c){o=c[0];$spliceApply(n,$concat$1([0,1],c))}for(var h=1,u=true;h<n.length;h+=1){var p=n[h];var d=$strSlice(p,0,1);var f=$strSlice(p,-1);if((d==='"'||d==="'"||d==="`"||(f==='"'||f==="'"||f==="`"))&&d!==f){throw new $SyntaxError("property names with quotes must have matching quotes")}if(p==="constructor"||!u){l=true}o+="."+p;a="%"+o+"%";if(src(INTRINSICS,a)){s=INTRINSICS[a]}else if(s!=null){if(!(p in s)){if(!i){throw new $TypeError$1("base intrinsic for "+e+" exists, but the property is not available.")}return void undefined$1}if($gOPD&&h+1>=n.length){var m=$gOPD(s,p);u=!!m;if(u&&"get"in m&&!("originalValue"in m.get)){s=m.get}else{s=s[p]}}else{u=src(s,p);s=s[p]}if(u&&!l){INTRINSICS[a]=s}}}return s};var callBind=createCommonjsModule((function(t){var e=getIntrinsic("%Function.prototype.apply%");var i=getIntrinsic("%Function.prototype.call%");var n=getIntrinsic("%Reflect.apply%",true)||functionBind.call(i,e);var o=getIntrinsic("%Object.getOwnPropertyDescriptor%",true);var r=getIntrinsic("%Object.defineProperty%",true);var a=getIntrinsic("%Math.max%");if(r){try{r({},"a",{value:1})}catch(l){r=null}}t.exports=function t(e){var s=n(functionBind,i,arguments);if(o&&r){var l=o(s,"length");if(l.configurable){r(s,"length",{value:1+a(0,e.length-(arguments.length-1))})}}return s};var s=function t(){return n(functionBind,e,arguments)};if(r){r(t.exports,"apply",{value:s})}else{t.exports.apply=s}}));var $indexOf=callBind(getIntrinsic("String.prototype.indexOf"));var callBound=function t(e,i){var n=getIntrinsic(e,!!i);if(typeof n==="function"&&$indexOf(e,".prototype.")>-1){return callBind(n)}return n};var _nodeResolve_empty={};var _nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty});var utilInspect=getAugmentedNamespace(_nodeResolve_empty$1);var hasMap=typeof Map==="function"&&Map.prototype;var mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null;var mapSize=hasMap&&mapSizeDescriptor&&typeof mapSizeDescriptor.get==="function"?mapSizeDescriptor.get:null;var mapForEach=hasMap&&Map.prototype.forEach;var hasSet=typeof Set==="function"&&Set.prototype;var setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null;var setSize=hasSet&&setSizeDescriptor&&typeof setSizeDescriptor.get==="function"?setSizeDescriptor.get:null;var setForEach=hasSet&&Set.prototype.forEach;var hasWeakMap=typeof WeakMap==="function"&&WeakMap.prototype;var weakMapHas=hasWeakMap?WeakMap.prototype.has:null;var hasWeakSet=typeof WeakSet==="function"&&WeakSet.prototype;var weakSetHas=hasWeakSet?WeakSet.prototype.has:null;var hasWeakRef=typeof WeakRef==="function"&&WeakRef.prototype;var weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null;var booleanValueOf=Boolean.prototype.valueOf;var objectToString=Object.prototype.toString;var functionToString=Function.prototype.toString;var $match=String.prototype.match;var $slice=String.prototype.slice;var $replace=String.prototype.replace;var $toUpperCase=String.prototype.toUpperCase;var $toLowerCase=String.prototype.toLowerCase;var $test=RegExp.prototype.test;var $concat=Array.prototype.concat;var $join=Array.prototype.join;var $arrSlice=Array.prototype.slice;var $floor=Math.floor;var bigIntValueOf=typeof BigInt==="function"?BigInt.prototype.valueOf:null;var gOPS=Object.getOwnPropertySymbols;var symToString=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol.prototype.toString:null;var hasShammedSymbols=typeof Symbol==="function"&&typeof Symbol.iterator==="object";var toStringTag=typeof Symbol==="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols?"object":"symbol")?Symbol.toStringTag:null;var isEnumerable=Object.prototype.propertyIsEnumerable;var gPO=(typeof Reflect==="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function addNumericSeparator(t,e){if(t===Infinity||t===-Infinity||t!==t||t&&t>-1e3&&t<1e3||$test.call(/e/,e)){return e}var i=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t==="number"){var n=t<0?-$floor(-t):$floor(t);if(n!==t){var o=String(n);var r=$slice.call(e,o.length+1);return $replace.call(o,i,"$&_")+"."+$replace.call($replace.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace.call(e,i,"$&_")}var inspectCustom=utilInspect.custom;var inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null;var objectInspect=function t(e,i,n,o){var r=i||{};if(has$3(r,"quoteStyle")&&(r.quoteStyle!=="single"&&r.quoteStyle!=="double")){throw new TypeError('option "quoteStyle" must be "single" or "double"')}if(has$3(r,"maxStringLength")&&(typeof r.maxStringLength==="number"?r.maxStringLength<0&&r.maxStringLength!==Infinity:r.maxStringLength!==null)){throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`')}var a=has$3(r,"customInspect")?r.customInspect:true;if(typeof a!=="boolean"&&a!=="symbol"){throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`")}if(has$3(r,"indent")&&r.indent!==null&&r.indent!=="\t"&&!(parseInt(r.indent,10)===r.indent&&r.indent>0)){throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`')}if(has$3(r,"numericSeparator")&&typeof r.numericSeparator!=="boolean"){throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`')}var s=r.numericSeparator;if(typeof e==="undefined"){return"undefined"}if(e===null){return"null"}if(typeof e==="boolean"){return e?"true":"false"}if(typeof e==="string"){return inspectString(e,r)}if(typeof e==="number"){if(e===0){return Infinity/e>0?"0":"-0"}var l=String(e);return s?addNumericSeparator(e,l):l}if(typeof e==="bigint"){var c=String(e)+"n";return s?addNumericSeparator(e,c):c}var h=typeof r.depth==="undefined"?5:r.depth;if(typeof n==="undefined"){n=0}if(n>=h&&h>0&&typeof e==="object"){return isArray$3(e)?"[Array]":"[Object]"}var u=getIndent(r,n);if(typeof o==="undefined"){o=[]}else if(indexOf(o,e)>=0){return"[Circular]"}function p(e,i,a){if(i){o=$arrSlice.call(o);o.push(i)}if(a){var s={depth:r.depth};if(has$3(r,"quoteStyle")){s.quoteStyle=r.quoteStyle}return t(e,s,n+1,o)}return t(e,r,n+1,o)}if(typeof e==="function"&&!isRegExp$1(e)){var d=nameOf(e);var f=arrObjKeys(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(f.length>0?" { "+$join.call(f,", ")+" }":"")}if(isSymbol(e)){var m=hasShammedSymbols?$replace.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(e);return typeof e==="object"&&!hasShammedSymbols?markBoxed(m):m}if(isElement(e)){var _="<"+$toLowerCase.call(String(e.nodeName));var g=e.attributes||[];for(var v=0;v<g.length;v++){_+=" "+g[v].name+"="+wrapQuotes(quote(g[v].value),"double",r)}_+=">";if(e.childNodes&&e.childNodes.length){_+="..."}_+="</"+$toLowerCase.call(String(e.nodeName))+">";return _}if(isArray$3(e)){if(e.length===0){return"[]"}var y=arrObjKeys(e,p);if(u&&!singleLineValues(y)){return"["+indentedJoin(y,u)+"]"}return"[ "+$join.call(y,", ")+" ]"}if(isError(e)){var b=arrObjKeys(e,p);if(!("cause"in Error.prototype)&&"cause"in e&&!isEnumerable.call(e,"cause")){return"{ ["+String(e)+"] "+$join.call($concat.call("[cause]: "+p(e.cause),b),", ")+" }"}if(b.length===0){return"["+String(e)+"]"}return"{ ["+String(e)+"] "+$join.call(b,", ")+" }"}if(typeof e==="object"&&a){if(inspectSymbol&&typeof e[inspectSymbol]==="function"&&utilInspect){return utilInspect(e,{depth:h-n})}else if(a!=="symbol"&&typeof e.inspect==="function"){return e.inspect()}}if(isMap(e)){var w=[];if(mapForEach){mapForEach.call(e,(function(t,i){w.push(p(i,e,true)+" => "+p(t,e))}))}return collectionOf("Map",mapSize.call(e),w,u)}if(isSet(e)){var x=[];if(setForEach){setForEach.call(e,(function(t){x.push(p(t,e))}))}return collectionOf("Set",setSize.call(e),x,u)}if(isWeakMap(e)){return weakCollectionOf("WeakMap")}if(isWeakSet(e)){return weakCollectionOf("WeakSet")}if(isWeakRef(e)){return weakCollectionOf("WeakRef")}if(isNumber(e)){return markBoxed(p(Number(e)))}if(isBigInt(e)){return markBoxed(p(bigIntValueOf.call(e)))}if(isBoolean(e)){return markBoxed(booleanValueOf.call(e))}if(isString(e)){return markBoxed(p(String(e)))}if(!isDate(e)&&!isRegExp$1(e)){var k=arrObjKeys(e,p);var L=gPO?gPO(e)===Object.prototype:e instanceof Object||e.constructor===Object;var P=e instanceof Object?"":"null prototype";var T=!L&&toStringTag&&Object(e)===e&&toStringTag in e?$slice.call(toStr(e),8,-1):P?"Object":"";var S=L||typeof e.constructor!=="function"?"":e.constructor.name?e.constructor.name+" ":"";var A=S+(T||P?"["+$join.call($concat.call([],T||[],P||[]),": ")+"] ":"");if(k.length===0){return A+"{}"}if(u){return A+"{"+indentedJoin(k,u)+"}"}return A+"{ "+$join.call(k,", ")+" }"}return String(e)};function wrapQuotes(t,e,i){var n=(i.quoteStyle||e)==="double"?'"':"'";return n+t+n}function quote(t){return $replace.call(String(t),/"/g,""")}function isArray$3(t){return toStr(t)==="[object Array]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isDate(t){return toStr(t)==="[object Date]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isRegExp$1(t){return toStr(t)==="[object RegExp]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isError(t){return toStr(t)==="[object Error]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isString(t){return toStr(t)==="[object String]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isNumber(t){return toStr(t)==="[object Number]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isBoolean(t){return toStr(t)==="[object Boolean]"&&(!toStringTag||!(typeof t==="object"&&toStringTag in t))}function isSymbol(t){if(hasShammedSymbols){return t&&typeof t==="object"&&t instanceof Symbol}if(typeof t==="symbol"){return true}if(!t||typeof t!=="object"||!symToString){return false}try{symToString.call(t);return true}catch(e){}return false}function isBigInt(t){if(!t||typeof t!=="object"||!bigIntValueOf){return false}try{bigIntValueOf.call(t);return true}catch(e){}return false}var hasOwn=Object.prototype.hasOwnProperty||function(t){return t in this};function has$3(t,e){return hasOwn.call(t,e)}function toStr(t){return objectToString.call(t)}function nameOf(t){if(t.name){return t.name}var e=$match.call(functionToString.call(t),/^function\s*([\w$]+)/);if(e){return e[1]}return null}function indexOf(t,e){if(t.indexOf){return t.indexOf(e)}for(var i=0,n=t.length;i<n;i++){if(t[i]===e){return i}}return-1}function isMap(t){if(!mapSize||!t||typeof t!=="object"){return false}try{mapSize.call(t);try{setSize.call(t)}catch(e){return true}return t instanceof Map}catch(i){}return false}function isWeakMap(t){if(!weakMapHas||!t||typeof t!=="object"){return false}try{weakMapHas.call(t,weakMapHas);try{weakSetHas.call(t,weakSetHas)}catch(e){return true}return t instanceof WeakMap}catch(i){}return false}function isWeakRef(t){if(!weakRefDeref||!t||typeof t!=="object"){return false}try{weakRefDeref.call(t);return true}catch(e){}return false}function isSet(t){if(!setSize||!t||typeof t!=="object"){return false}try{setSize.call(t);try{mapSize.call(t)}catch(e){return true}return t instanceof Set}catch(i){}return false}function isWeakSet(t){if(!weakSetHas||!t||typeof t!=="object"){return false}try{weakSetHas.call(t,weakSetHas);try{weakMapHas.call(t,weakMapHas)}catch(e){return true}return t instanceof WeakSet}catch(i){}return false}function isElement(t){if(!t||typeof t!=="object"){return false}if(typeof HTMLElement!=="undefined"&&t instanceof HTMLElement){return true}return typeof t.nodeName==="string"&&typeof t.getAttribute==="function"}function inspectString(t,e){if(t.length>e.maxStringLength){var i=t.length-e.maxStringLength;var n="... "+i+" more character"+(i>1?"s":"");return inspectString($slice.call(t,0,e.maxStringLength),e)+n}var o=$replace.call($replace.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte);return wrapQuotes(o,"single",e)}function lowbyte(t){var e=t.charCodeAt(0);var i={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];if(i){return"\\"+i}return"\\x"+(e<16?"0":"")+$toUpperCase.call(e.toString(16))}function markBoxed(t){return"Object("+t+")"}function weakCollectionOf(t){return t+" { ? }"}function collectionOf(t,e,i,n){var o=n?indentedJoin(i,n):$join.call(i,", ");return t+" ("+e+") {"+o+"}"}function singleLineValues(t){for(var e=0;e<t.length;e++){if(indexOf(t[e],"\n")>=0){return false}}return true}function getIndent(t,e){var i;if(t.indent==="\t"){i="\t"}else if(typeof t.indent==="number"&&t.indent>0){i=$join.call(Array(t.indent+1)," ")}else{return null}return{base:i,prev:$join.call(Array(e+1),i)}}function indentedJoin(t,e){if(t.length===0){return""}var i="\n"+e.prev+e.base;return i+$join.call(t,","+i)+"\n"+e.prev}function arrObjKeys(t,e){var i=isArray$3(t);var n=[];if(i){n.length=t.length;for(var o=0;o<t.length;o++){n[o]=has$3(t,o)?e(t[o],t):""}}var r=typeof gOPS==="function"?gOPS(t):[];var a;if(hasShammedSymbols){a={};for(var s=0;s<r.length;s++){a["$"+r[s]]=r[s]}}for(var l in t){if(!has$3(t,l)){continue}if(i&&String(Number(l))===l&&l<t.length){continue}if(hasShammedSymbols&&a["$"+l]instanceof Symbol){continue}else if($test.call(/[^\w$]/,l)){n.push(e(l,t)+": "+e(t[l],t))}else{n.push(l+": "+e(t[l],t))}}if(typeof gOPS==="function"){for(var c=0;c<r.length;c++){if(isEnumerable.call(t,r[c])){n.push("["+e(r[c])+"]: "+e(t[r[c]],t))}}}return n}var $TypeError=getIntrinsic("%TypeError%");var $WeakMap=getIntrinsic("%WeakMap%",true);var $Map=getIntrinsic("%Map%",true);var $weakMapGet=callBound("WeakMap.prototype.get",true);var $weakMapSet=callBound("WeakMap.prototype.set",true);var $weakMapHas=callBound("WeakMap.prototype.has",true);var $mapGet=callBound("Map.prototype.get",true);var $mapSet=callBound("Map.prototype.set",true);var $mapHas=callBound("Map.prototype.has",true);var listGetNode=function(t,e){for(var i=t,n;(n=i.next)!==null;i=n){if(n.key===e){i.next=n.next;n.next=t.next;t.next=n;return n}}};var listGet=function(t,e){var i=listGetNode(t,e);return i&&i.value};var listSet=function(t,e,i){var n=listGetNode(t,e);if(n){n.value=i}else{t.next={key:e,next:t.next,value:i}}};var listHas=function(t,e){return!!listGetNode(t,e)};var sideChannel=function t(){var e;var i;var n;var o={assert:function(t){if(!o.has(t)){throw new $TypeError("Side channel does not contain "+objectInspect(t))}},get:function(t){if($WeakMap&&t&&(typeof t==="object"||typeof t==="function")){if(e){return $weakMapGet(e,t)}}else if($Map){if(i){return $mapGet(i,t)}}else{if(n){return listGet(n,t)}}},has:function(t){if($WeakMap&&t&&(typeof t==="object"||typeof t==="function")){if(e){return $weakMapHas(e,t)}}else if($Map){if(i){return $mapHas(i,t)}}else{if(n){return listHas(n,t)}}return false},set:function(t,o){if($WeakMap&&t&&(typeof t==="object"||typeof t==="function")){if(!e){e=new $WeakMap}$weakMapSet(e,t,o)}else if($Map){if(!i){i=new $Map}$mapSet(i,t,o)}else{if(!n){n={key:{},next:null}}listSet(n,t,o)}}};return o};var replace=String.prototype.replace;var percentTwenties=/%20/g;var Format={RFC1738:"RFC1738",RFC3986:"RFC3986"};var formats={default:Format.RFC3986,formatters:{RFC1738:function(t){return replace.call(t,percentTwenties,"+")},RFC3986:function(t){return String(t)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986};var has$2=Object.prototype.hasOwnProperty;var isArray$2=Array.isArray;var hexTable=function(){var t=[];for(var e=0;e<256;++e){t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase())}return t}();var compactQueue=function t(e){while(e.length>1){var i=e.pop();var n=i.obj[i.prop];if(isArray$2(n)){var o=[];for(var r=0;r<n.length;++r){if(typeof n[r]!=="undefined"){o.push(n[r])}}i.obj[i.prop]=o}}};var arrayToObject=function t(e,i){var n=i&&i.plainObjects?Object.create(null):{};for(var o=0;o<e.length;++o){if(typeof e[o]!=="undefined"){n[o]=e[o]}}return n};var merge=function t(e,i,n){if(!i){return e}if(typeof i!=="object"){if(isArray$2(e)){e.push(i)}else if(e&&typeof e==="object"){if(n&&(n.plainObjects||n.allowPrototypes)||!has$2.call(Object.prototype,i)){e[i]=true}}else{return[e,i]}return e}if(!e||typeof e!=="object"){return[e].concat(i)}var o=e;if(isArray$2(e)&&!isArray$2(i)){o=arrayToObject(e,n)}if(isArray$2(e)&&isArray$2(i)){i.forEach((function(i,o){if(has$2.call(e,o)){var r=e[o];if(r&&typeof r==="object"&&i&&typeof i==="object"){e[o]=t(r,i,n)}else{e.push(i)}}else{e[o]=i}}));return e}return Object.keys(i).reduce((function(e,o){var r=i[o];if(has$2.call(e,o)){e[o]=t(e[o],r,n)}else{e[o]=r}return e}),o)};var assign=function t(e,i){return Object.keys(i).reduce((function(t,e){t[e]=i[e];return t}),e)};var decode=function(t,e,i){var n=t.replace(/\+/g," ");if(i==="iso-8859-1"){return n.replace(/%[0-9a-f]{2}/gi,unescape)}try{return decodeURIComponent(n)}catch(o){return n}};var encode=function t(e,i,n,o,r){if(e.length===0){return e}var a=e;if(typeof e==="symbol"){a=Symbol.prototype.toString.call(e)}else if(typeof e!=="string"){a=String(e)}if(n==="iso-8859-1"){return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}))}var s="";for(var l=0;l<a.length;++l){var c=a.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||r===formats.RFC1738&&(c===40||c===41)){s+=a.charAt(l);continue}if(c<128){s=s+hexTable[c];continue}if(c<2048){s=s+(hexTable[192|c>>6]+hexTable[128|c&63]);continue}if(c<55296||c>=57344){s=s+(hexTable[224|c>>12]+hexTable[128|c>>6&63]+hexTable[128|c&63]);continue}l+=1;c=65536+((c&1023)<<10|a.charCodeAt(l)&1023);s+=hexTable[240|c>>18]+hexTable[128|c>>12&63]+hexTable[128|c>>6&63]+hexTable[128|c&63]}return s};var compact=function t(e){var i=[{obj:{o:e},prop:"o"}];var n=[];for(var o=0;o<i.length;++o){var r=i[o];var a=r.obj[r.prop];var s=Object.keys(a);for(var l=0;l<s.length;++l){var c=s[l];var h=a[c];if(typeof h==="object"&&h!==null&&n.indexOf(h)===-1){i.push({obj:a,prop:c});n.push(h)}}}compactQueue(i);return e};var isRegExp=function t(e){return Object.prototype.toString.call(e)==="[object RegExp]"};var isBuffer=function t(e){if(!e||typeof e!=="object"){return false}return!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))};var combine=function t(e,i){return[].concat(e,i)};var maybeMap=function t(e,i){if(isArray$2(e)){var n=[];for(var o=0;o<e.length;o+=1){n.push(i(e[o]))}return n}return i(e)};var utils={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isRegExp:isRegExp,maybeMap:maybeMap,merge:merge};var has$1=Object.prototype.hasOwnProperty;var arrayPrefixGenerators={brackets:function t(e){return e+"[]"},comma:"comma",indices:function t(e,i){return e+"["+i+"]"},repeat:function t(e){return e}};var isArray$1=Array.isArray;var push=Array.prototype.push;var pushToArray=function(t,e){push.apply(t,isArray$1(e)?e:[e])};var toISO=Date.prototype.toISOString;var defaultFormat=formats["default"];var defaults$1={addQueryPrefix:false,allowDots:false,charset:"utf-8",charsetSentinel:false,delimiter:"&",encode:true,encoder:utils.encode,encodeValuesOnly:false,format:defaultFormat,formatter:formats.formatters[defaultFormat],indices:false,serializeDate:function t(e){return toISO.call(e)},skipNulls:false,strictNullHandling:false};var isNonNullishPrimitive=function t(e){return typeof e==="string"||typeof e==="number"||typeof e==="boolean"||typeof e==="symbol"||typeof e==="bigint"};var sentinel={};var stringify=function t(e,i,n,o,r,a,s,l,c,h,u,p,d,f,m,_){var g=e;var v=_;var y=0;var b=false;while((v=v.get(sentinel))!==void undefined&&!b){var w=v.get(e);y+=1;if(typeof w!=="undefined"){if(w===y){throw new RangeError("Cyclic object value")}else{b=true}}if(typeof v.get(sentinel)==="undefined"){y=0}}if(typeof l==="function"){g=l(i,g)}else if(g instanceof Date){g=u(g)}else if(n==="comma"&&isArray$1(g)){g=utils.maybeMap(g,(function(t){if(t instanceof Date){return u(t)}return t}))}if(g===null){if(r){return s&&!f?s(i,defaults$1.encoder,m,"key",p):i}g=""}if(isNonNullishPrimitive(g)||utils.isBuffer(g)){if(s){var x=f?i:s(i,defaults$1.encoder,m,"key",p);return[d(x)+"="+d(s(g,defaults$1.encoder,m,"value",p))]}return[d(i)+"="+d(String(g))]}var k=[];if(typeof g==="undefined"){return k}var L;if(n==="comma"&&isArray$1(g)){if(f&&s){g=utils.maybeMap(g,s)}L=[{value:g.length>0?g.join(",")||null:void undefined}]}else if(isArray$1(l)){L=l}else{var P=Object.keys(g);L=c?P.sort(c):P}var T=o&&isArray$1(g)&&g.length===1?i+"[]":i;for(var S=0;S<L.length;++S){var A=L[S];var C=typeof A==="object"&&typeof A.value!=="undefined"?A.value:g[A];if(a&&C===null){continue}var M=isArray$1(g)?typeof n==="function"?n(T,A):T:T+(h?"."+A:"["+A+"]");_.set(e,y);var O=sideChannel();O.set(sentinel,_);pushToArray(k,t(C,M,n,o,r,a,n==="comma"&&f&&isArray$1(g)?null:s,l,c,h,u,p,d,f,m,O))}return k};var normalizeStringifyOptions=function t(e){if(!e){return defaults$1}if(e.encoder!==null&&typeof e.encoder!=="undefined"&&typeof e.encoder!=="function"){throw new TypeError("Encoder has to be a function.")}var i=e.charset||defaults$1.charset;if(typeof e.charset!=="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1"){throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined")}var n=formats["default"];if(typeof e.format!=="undefined"){if(!has$1.call(formats.formatters,e.format)){throw new TypeError("Unknown format option provided.")}n=e.format}var o=formats.formatters[n];var r=defaults$1.filter;if(typeof e.filter==="function"||isArray$1(e.filter)){r=e.filter}return{addQueryPrefix:typeof e.addQueryPrefix==="boolean"?e.addQueryPrefix:defaults$1.addQueryPrefix,allowDots:typeof e.allowDots==="undefined"?defaults$1.allowDots:!!e.allowDots,charset:i,charsetSentinel:typeof e.charsetSentinel==="boolean"?e.charsetSentinel:defaults$1.charsetSentinel,delimiter:typeof e.delimiter==="undefined"?defaults$1.delimiter:e.delimiter,encode:typeof e.encode==="boolean"?e.encode:defaults$1.encode,encoder:typeof e.encoder==="function"?e.encoder:defaults$1.encoder,encodeValuesOnly:typeof e.encodeValuesOnly==="boolean"?e.encodeValuesOnly:defaults$1.encodeValuesOnly,filter:r,format:n,formatter:o,serializeDate:typeof e.serializeDate==="function"?e.serializeDate:defaults$1.serializeDate,skipNulls:typeof e.skipNulls==="boolean"?e.skipNulls:defaults$1.skipNulls,sort:typeof e.sort==="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling==="boolean"?e.strictNullHandling:defaults$1.strictNullHandling}};var stringify_1=function(t,e){var i=t;var n=normalizeStringifyOptions(e);var o;var r;if(typeof n.filter==="function"){r=n.filter;i=r("",i)}else if(isArray$1(n.filter)){r=n.filter;o=r}var a=[];if(typeof i!=="object"||i===null){return""}var s;if(e&&e.arrayFormat in arrayPrefixGenerators){s=e.arrayFormat}else if(e&&"indices"in e){s=e.indices?"indices":"repeat"}else{s="indices"}var l=arrayPrefixGenerators[s];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!=="boolean"){throw new TypeError("`commaRoundTrip` must be a boolean, or absent")}var c=l==="comma"&&e&&e.commaRoundTrip;if(!o){o=Object.keys(i)}if(n.sort){o.sort(n.sort)}var h=sideChannel();for(var u=0;u<o.length;++u){var p=o[u];if(n.skipNulls&&i[p]===null){continue}pushToArray(a,stringify(i[p],p,l,c,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,h))}var d=a.join(n.delimiter);var f=n.addQueryPrefix===true?"?":"";if(n.charsetSentinel){if(n.charset==="iso-8859-1"){f+="utf8=%26%2310003%3B&"}else{f+="utf8=%E2%9C%93&"}}return d.length>0?f+d:""};var has=Object.prototype.hasOwnProperty;var isArray=Array.isArray;var defaults={allowDots:false,allowPrototypes:false,allowSparse:false,arrayLimit:20,charset:"utf-8",charsetSentinel:false,comma:false,decoder:utils.decode,delimiter:"&",depth:5,ignoreQueryPrefix:false,interpretNumericEntities:false,parameterLimit:1e3,parseArrays:true,plainObjects:false,strictNullHandling:false};var interpretNumericEntities=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))};var parseArrayValue=function(t,e){if(t&&typeof t==="string"&&e.comma&&t.indexOf(",")>-1){return t.split(",")}return t};var isoSentinel="utf8=%26%2310003%3B";var charsetSentinel="utf8=%E2%9C%93";var parseValues=function t(e,i){var n={__proto__:null};var o=i.ignoreQueryPrefix?e.replace(/^\?/,""):e;var r=i.parameterLimit===Infinity?undefined:i.parameterLimit;var a=o.split(i.delimiter,r);var s=-1;var l;var c=i.charset;if(i.charsetSentinel){for(l=0;l<a.length;++l){if(a[l].indexOf("utf8=")===0){if(a[l]===charsetSentinel){c="utf-8"}else if(a[l]===isoSentinel){c="iso-8859-1"}s=l;l=a.length}}}for(l=0;l<a.length;++l){if(l===s){continue}var h=a[l];var u=h.indexOf("]=");var p=u===-1?h.indexOf("="):u+1;var d,f;if(p===-1){d=i.decoder(h,defaults.decoder,c,"key");f=i.strictNullHandling?null:""}else{d=i.decoder(h.slice(0,p),defaults.decoder,c,"key");f=utils.maybeMap(parseArrayValue(h.slice(p+1),i),(function(t){return i.decoder(t,defaults.decoder,c,"value")}))}if(f&&i.interpretNumericEntities&&c==="iso-8859-1"){f=interpretNumericEntities(f)}if(h.indexOf("[]=")>-1){f=isArray(f)?[f]:f}if(has.call(n,d)){n[d]=utils.combine(n[d],f)}else{n[d]=f}}return n};var parseObject=function(t,e,i,n){var o=n?e:parseArrayValue(e,i);for(var r=t.length-1;r>=0;--r){var a;var s=t[r];if(s==="[]"&&i.parseArrays){a=[].concat(o)}else{a=i.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s;var c=parseInt(l,10);if(!i.parseArrays&&l===""){a={0:o}}else if(!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&(i.parseArrays&&c<=i.arrayLimit)){a=[];a[c]=o}else if(l!=="__proto__"){a[l]=o}}o=a}return o};var parseKeys=function t(e,i,n,o){if(!e){return}var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;var a=/(\[[^[\]]*])/;var s=/(\[[^[\]]*])/g;var l=n.depth>0&&a.exec(r);var c=l?r.slice(0,l.index):r;var h=[];if(c){if(!n.plainObjects&&has.call(Object.prototype,c)){if(!n.allowPrototypes){return}}h.push(c)}var u=0;while(n.depth>0&&(l=s.exec(r))!==null&&u<n.depth){u+=1;if(!n.plainObjects&&has.call(Object.prototype,l[1].slice(1,-1))){if(!n.allowPrototypes){return}}h.push(l[1])}if(l){h.push("["+r.slice(l.index)+"]")}return parseObject(h,i,n,o)};var normalizeParseOptions=function t(e){if(!e){return defaults}if(e.decoder!==null&&e.decoder!==undefined&&typeof e.decoder!=="function"){throw new TypeError("Decoder has to be a function.")}if(typeof e.charset!=="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1"){throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined")}var i=typeof e.charset==="undefined"?defaults.charset:e.charset;return{allowDots:typeof e.allowDots==="undefined"?defaults.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes==="boolean"?e.allowPrototypes:defaults.allowPrototypes,allowSparse:typeof e.allowSparse==="boolean"?e.allowSparse:defaults.allowSparse,arrayLimit:typeof e.arrayLimit==="number"?e.arrayLimit:defaults.arrayLimit,charset:i,charsetSentinel:typeof e.charsetSentinel==="boolean"?e.charsetSentinel:defaults.charsetSentinel,comma:typeof e.comma==="boolean"?e.comma:defaults.comma,decoder:typeof e.decoder==="function"?e.decoder:defaults.decoder,delimiter:typeof e.delimiter==="string"||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:typeof e.depth==="number"||e.depth===false?+e.depth:defaults.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===true,interpretNumericEntities:typeof e.interpretNumericEntities==="boolean"?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:typeof e.parameterLimit==="number"?e.parameterLimit:defaults.parameterLimit,parseArrays:e.parseArrays!==false,plainObjects:typeof e.plainObjects==="boolean"?e.plainObjects:defaults.plainObjects,strictNullHandling:typeof e.strictNullHandling==="boolean"?e.strictNullHandling:defaults.strictNullHandling}};var parse$1=function(t,e){var i=normalizeParseOptions(e);if(t===""||t===null||typeof t==="undefined"){return i.plainObjects?Object.create(null):{}}var n=typeof t==="string"?parseValues(t,i):t;var o=i.plainObjects?Object.create(null):{};var r=Object.keys(n);for(var a=0;a<r.length;++a){var s=r[a];var l=parseKeys(s,n[s],i,typeof t==="string");o=utils.merge(o,l,i)}if(i.allowSparse===true){return o}return utils.compact(o)};var lib={formats:formats,parse:parse$1,stringify:stringify_1};function Url(){this.protocol=null;this.slashes=null;this.auth=null;this.host=null;this.port=null;this.hostname=null;this.hash=null;this.search=null;this.query=null;this.pathname=null;this.path=null;this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:true,"javascript:":true},hostlessProtocol={javascript:true,"javascript:":true},slashedProtocol={http:true,https:true,ftp:true,gopher:true,file:true,"http:":true,"https:":true,"ftp:":true,"gopher:":true,"file:":true};function urlParse(t,e,i){if(t&&typeof t==="object"&&t instanceof Url){return t}var n=new Url;n.parse(t,e,i);return n}Url.prototype.parse=function(t,e,i){if(typeof t!=="string"){throw new TypeError("Parameter 'url' must be a string, not "+typeof t)}var n=t.indexOf("?"),o=n!==-1&&n<t.indexOf("#")?"?":"#",r=t.split(o),a=/\\/g;r[0]=r[0].replace(a,"/");t=r.join(o);var s=t;s=s.trim();if(!i&&t.split("#").length===1){var l=simplePathPattern.exec(s);if(l){this.path=s;this.href=s;this.pathname=l[1];if(l[2]){this.search=l[2];if(e){this.query=lib.parse(this.search.substr(1))}else{this.query=this.search.substr(1)}}else if(e){this.search="";this.query={}}return this}}var c=protocolPattern.exec(s);if(c){c=c[0];var h=c.toLowerCase();this.protocol=h;s=s.substr(c.length)}if(i||c||s.match(/^\/\/[^@/]+@[^@/]+/)){var u=s.substr(0,2)==="//";if(u&&!(c&&hostlessProtocol[c])){s=s.substr(2);this.slashes=true}}if(!hostlessProtocol[c]&&(u||c&&!slashedProtocol[c])){var p=-1;for(var d=0;d<hostEndingChars.length;d++){var f=s.indexOf(hostEndingChars[d]);if(f!==-1&&(p===-1||f<p)){p=f}}var m,_;if(p===-1){_=s.lastIndexOf("@")}else{_=s.lastIndexOf("@",p)}if(_!==-1){m=s.slice(0,_);s=s.slice(_+1);this.auth=decodeURIComponent(m)}p=-1;for(var d=0;d<nonHostChars.length;d++){var f=s.indexOf(nonHostChars[d]);if(f!==-1&&(p===-1||f<p)){p=f}}if(p===-1){p=s.length}this.host=s.slice(0,p);s=s.slice(p);this.parseHost();this.hostname=this.hostname||"";var g=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!g){var v=this.hostname.split(/\./);for(var d=0,y=v.length;d<y;d++){var b=v[d];if(!b){continue}if(!b.match(hostnamePartPattern)){var w="";for(var x=0,k=b.length;x<k;x++){if(b.charCodeAt(x)>127){w+="x"}else{w+=b[x]}}if(!w.match(hostnamePartPattern)){var L=v.slice(0,d);var P=v.slice(d+1);var T=b.match(hostnamePartStart);if(T){L.push(T[1]);P.unshift(T[2])}if(P.length){s="/"+P.join(".")+s}this.hostname=L.join(".");break}}}}if(this.hostname.length>hostnameMaxLen){this.hostname=""}else{this.hostname=this.hostname.toLowerCase()}if(!g){this.hostname=punycode.toASCII(this.hostname)}var S=this.port?":"+this.port:"";var A=this.hostname||"";this.host=A+S;this.href+=this.host;if(g){this.hostname=this.hostname.substr(1,this.hostname.length-2);if(s[0]!=="/"){s="/"+s}}}if(!unsafeProtocol[h]){for(var d=0,y=autoEscape.length;d<y;d++){var C=autoEscape[d];if(s.indexOf(C)===-1){continue}var M=encodeURIComponent(C);if(M===C){M=escape(C)}s=s.split(C).join(M)}}var O=s.indexOf("#");if(O!==-1){this.hash=s.substr(O);s=s.slice(0,O)}var z=s.indexOf("?");if(z!==-1){this.search=s.substr(z);this.query=s.substr(z+1);if(e){this.query=lib.parse(this.query)}s=s.slice(0,z)}else if(e){this.search="";this.query={}}if(s){this.pathname=s}if(slashedProtocol[h]&&this.hostname&&!this.pathname){this.pathname="/"}if(this.pathname||this.search){var S=this.pathname||"";var E=this.search||"";this.path=S+E}this.href=this.format();return this};function urlFormat(t){if(typeof t==="string"){t=urlParse(t)}if(!(t instanceof Url)){return Url.prototype.format.call(t)}return t.format()}Url.prototype.format=function(){var t=this.auth||"";if(t){t=encodeURIComponent(t);t=t.replace(/%3A/i,":");t+="@"}var e=this.protocol||"",i=this.pathname||"",n=this.hash||"",o=false,r="";if(this.host){o=t+this.host}else if(this.hostname){o=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]");if(this.port){o+=":"+this.port}}if(this.query&&typeof this.query==="object"&&Object.keys(this.query).length){r=lib.stringify(this.query)}var a=this.search||r&&"?"+r||"";if(e&&e.substr(-1)!==":"){e+=":"}if(this.slashes||(!e||slashedProtocol[e])&&o!==false){o="//"+(o||"");if(i&&i.charAt(0)!=="/"){i="/"+i}}else if(!o){o=""}if(n&&n.charAt(0)!=="#"){n="#"+n}if(a&&a.charAt(0)!=="?"){a="?"+a}i=i.replace(/[?#]/g,(function(t){return encodeURIComponent(t)}));a=a.replace("#","%23");return e+o+i+a+n};function urlResolve(t,e){return urlParse(t,false,true).resolve(e)}Url.prototype.resolve=function(t){return this.resolveObject(urlParse(t,false,true)).format()};function urlResolveObject(t,e){if(!t){return e}return urlParse(t,false,true).resolveObject(e)}Url.prototype.resolveObject=function(t){if(typeof t==="string"){var e=new Url;e.parse(t,false,true);t=e}var i=new Url;var n=Object.keys(this);for(var o=0;o<n.length;o++){var r=n[o];i[r]=this[r]}i.hash=t.hash;if(t.href===""){i.href=i.format();return i}if(t.slashes&&!t.protocol){var a=Object.keys(t);for(var s=0;s<a.length;s++){var l=a[s];if(l!=="protocol"){i[l]=t[l]}}if(slashedProtocol[i.protocol]&&i.hostname&&!i.pathname){i.pathname="/";i.path=i.pathname}i.href=i.format();return i}if(t.protocol&&t.protocol!==i.protocol){if(!slashedProtocol[t.protocol]){var c=Object.keys(t);for(var h=0;h<c.length;h++){var u=c[h];i[u]=t[u]}i.href=i.format();return i}i.protocol=t.protocol;if(!t.host&&!hostlessProtocol[t.protocol]){var p=(t.pathname||"").split("/");while(p.length&&!(t.host=p.shift())){}if(!t.host){t.host=""}if(!t.hostname){t.hostname=""}if(p[0]!==""){p.unshift("")}if(p.length<2){p.unshift("")}i.pathname=p.join("/")}else{i.pathname=t.pathname}i.search=t.search;i.query=t.query;i.host=t.host||"";i.auth=t.auth;i.hostname=t.hostname||t.host;i.port=t.port;if(i.pathname||i.search){var d=i.pathname||"";var f=i.search||"";i.path=d+f}i.slashes=i.slashes||t.slashes;i.href=i.format();return i}var m=i.pathname&&i.pathname.charAt(0)==="/",_=t.host||t.pathname&&t.pathname.charAt(0)==="/",g=_||m||i.host&&t.pathname,v=g,y=i.pathname&&i.pathname.split("/")||[],p=t.pathname&&t.pathname.split("/")||[],b=i.protocol&&!slashedProtocol[i.protocol];if(b){i.hostname="";i.port=null;if(i.host){if(y[0]===""){y[0]=i.host}else{y.unshift(i.host)}}i.host="";if(t.protocol){t.hostname=null;t.port=null;if(t.host){if(p[0]===""){p[0]=t.host}else{p.unshift(t.host)}}t.host=null}g=g&&(p[0]===""||y[0]==="")}if(_){i.host=t.host||t.host===""?t.host:i.host;i.hostname=t.hostname||t.hostname===""?t.hostname:i.hostname;i.search=t.search;i.query=t.query;y=p}else if(p.length){if(!y){y=[]}y.pop();y=y.concat(p);i.search=t.search;i.query=t.query}else if(t.search!=null){if(b){i.host=y.shift();i.hostname=i.host;var w=i.host&&i.host.indexOf("@")>0?i.host.split("@"):false;if(w){i.auth=w.shift();i.hostname=w.shift();i.host=i.hostname}}i.search=t.search;i.query=t.query;if(i.pathname!==null||i.search!==null){i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")}i.href=i.format();return i}if(!y.length){i.pathname=null;if(i.search){i.path="/"+i.search}else{i.path=null}i.href=i.format();return i}var x=y.slice(-1)[0];var k=(i.host||t.host||y.length>1)&&(x==="."||x==="..")||x==="";var L=0;for(var P=y.length;P>=0;P--){x=y[P];if(x==="."){y.splice(P,1)}else if(x===".."){y.splice(P,1);L++}else if(L){y.splice(P,1);L--}}if(!g&&!v){for(;L--;L){y.unshift("..")}}if(g&&y[0]!==""&&(!y[0]||y[0].charAt(0)!=="/")){y.unshift("")}if(k&&y.join("/").substr(-1)!=="/"){y.push("")}var T=y[0]===""||y[0]&&y[0].charAt(0)==="/";if(b){i.hostname=T?"":y.length?y.shift():"";i.host=i.hostname;var w=i.host&&i.host.indexOf("@")>0?i.host.split("@"):false;if(w){i.auth=w.shift();i.hostname=w.shift();i.host=i.hostname}}g=g||i.host&&y.length;if(g&&!T){y.unshift("")}if(y.length>0){i.pathname=y.join("/")}else{i.pathname=null;i.path=null}if(i.pathname!==null||i.search!==null){i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")}i.auth=t.auth||i.auth;i.slashes=i.slashes||t.slashes;i.href=i.format();return i};Url.prototype.parseHost=function(){var t=this.host;var e=portPattern.exec(t);if(e){e=e[0];if(e!==":"){this.port=e.substr(1)}t=t.substr(0,t.length-e.length)}if(t){this.hostname=t}};var parse=urlParse;var resolve=urlResolve;var resolveObject=urlResolveObject;var format=urlFormat;var Url_1=Url;var url={parse:parse,resolve:resolve,resolveObject:resolveObject,format:format,Url:Url_1};!function(t){t()}((function(){var t={lightblue:{area:"#3366CC",alpha:.45,stroke:"#3366CC"},magenta:{area:"#FF005E"},yellow:{area:"#FF0"},purple:{area:"#732C7B"},steelblue:{area:"#4682B4"},red:{area:"#F00"},lime:{area:"#9CC222",line:"#566B13"}},e=6e4,i=60*e,n=24*i;function o(t,e){return new URL(t,t.startsWith("../")||t.startsWith("./")?e:void 0).toString()}function r(t,e){var i=m("a","",{href:t,target:"_new",download:e||"",style:"display:none;"}),n=document.body;n.appendChild(i),i.click(),n.removeChild(i)}function a(t,e,i){var n=this;return t&&function(o){var r=o.props,a=o.point,l=o.id,c=o.isMulti;if(r)for(var h=0,u=t;h<u.length;h++){var p=u[h];if(p in r){a.meta[e]=(i||s).call(n,c?r[p][c]:r[p],l);break}}}}var s=function(t,e){return parseInt("object"==typeof t?t[e]:t)},l=function(t,e){return t&&e.split(" ").every((function(e){return e&&L.DomUtil.addClass(t,e)}))},c=function(t,e){return t&&e.split(" ").every((function(e){return e&&L.DomUtil.removeClass(t,e)}))},h=function(t,e,i){return(i?l:c)(t,e)},u=function(t,e,i){return e&&c(t,e)||i&&l(t,i)},p=function(t,e,i){return void 0===i&&L.DomUtil.getStyle(t,e)||t.style.setProperty(e,i)},d=function(t,e){for(var i in e)t.setAttribute(i,e[i])},f=function(t,e,i,n){return t[n?"on":"off"](e,i)},m=function(t,e,i,n){var o=L.DomUtil.create(t,e||"");return i&&d(o,i),n&&_(n,o),o},_=function(t,e){return t.appendChild(e)},g=function(t,e,i){return t.insertAdjacentElement(i,e)},v=function(t,e){return(e||document).querySelector(t)},y=function(t,e){for(var i in t)e(t[i],i)},b=function(){return Math.random().toString(36).substr(2,9)},w=L.DomEvent,x=w.on,k=w.off,P=L.Util,T=P.throttle,S=P.wrapNum,A=L.DomUtil.hasClass,C=L.Util.formatNum,M=function(t,e){return e?t<e[0]?e[0]:t>e[1]?e[1]:t:t},O=function(t,e,i){return Math.abs(t-e)>i?e+i*Math.sign(t-e):t};function z(t,e,i){if(e===void 0){e=[]}if(i===void 0){i=[]}switch(!t||typeof t){case"object":var n=i.filter((function(e){return t===e.original}))[0];if(n)return n.copy;var o=Array.isArray(t)?[]:Object.create(Object.getPrototypeOf(t));return i.push({original:t,copy:o}),Object.getOwnPropertyNames(t).forEach((function(n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(o,n,r.get||r.set?r:{writable:r.writable,configurable:r.configurable,enumerable:r.enumerable,value:e.includes(n)?r.value:z(r.value,e,i)})})),o;case"function":case"symbol":console.warn("cloneDeep: "+typeof t+"s not fully supported:",t);default:return t}}var E=Object.freeze({__proto__:null,Colors:t,addClass:l,append:_,clamp:M,cloneDeep:z,coordPropsToMeta:a,create:m,drawCanvas:function(t,e){e.classed("canvas-path",!0),t.beginPath(),t.moveTo(0,0);var i=new Path2D(e.attr("d"));t.strokeStyle=e.attr("stroke"),t.fillStyle=e.attr("fill"),t.lineWidth=1.25,t.globalCompositeOperation="source-over",t.globalAlpha=e.attr("stroke-opacity")||.3,t.stroke(i),t.globalAlpha=e.attr("fill-opacity")||.45,t.fill(i),t.globalAlpha=1,t.closePath()},each:y,formatDate:function(t){return t?"time"==t?function(t){return new Date(t).toLocaleTimeString()}:"date"==t?function(t){return new Date(t).toLocaleDateString()}:function(e){return t(e)}:function(t){return new Date(t).toLocaleString().replaceAll("/","-").replaceAll(","," ")}},formatTime:function(t){var o=Math.floor(t/n),r=Math.floor((t-o*n)/i),a=Math.floor((t-o*n-r*i)/e),s=Math.round((t-o*n-r*i-a*e)/1e3);return 60===s&&(a++,s=0),60===a&&(r++,a=0),24===r&&(o++,r=0),(o?o+"d ":"")+r.toString().padStart(2,0)+":"+a.toString().padStart(2,0)+"'"+s.toString().padStart(2,0)+'"'},hasClass:A,iAvg:function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=1}return(t+e*(i-1))/i},iMax:function(t,e){if(e===void 0){e=-1/0}return t>e?t:e},iMin:function(t,e){if(e===void 0){e=1/0}return t<e?t:e},iSum:function(t,e){if(e===void 0){e=0}return t+e},insert:g,off:k,on:x,parseDate:function(t,e){return new Date(Date.parse("object"==typeof t?t[e]:t))},parseNumeric:s,randomId:b,removeClass:c,replaceClass:u,resolveURL:o,round:C,saveFile:r,select:v,setAttributes:d,style:p,throttle:T,toggleClass:h,toggleEvent:f,toggleStyle:function(t,e,i,n){return p(t,e,n?i:"")},wrapDelta:O,wrapNum:S}),I={autofitBounds:!0,autohide:!1,autohideMarker:!0,almostover:!0,altitude:!0,closeBtn:!0,collapsed:!1,detached:!0,distance:!0,distanceMarkers:{lazy:!0,distance:!0,direction:!0},dragging:!L.Browser.mobile,downloadLink:"link",elevationDiv:"#elevation-div",edgeScale:{bar:!0,icon:!1,coords:!1},followMarker:!0,imperial:!1,legend:!0,handlers:["Distance","Time","Altitude","Slope","Speed","Acceleration"],hotline:"elevation",marker:"elevation-line",markerIcon:L.divIcon({className:"elevation-position-marker",html:'<i class="elevation-position-icon"></i>',iconSize:[32,32],iconAnchor:[16,16]}),position:"topright",polyline:{className:"elevation-polyline",color:"#000",opacity:.75,weight:5,lineCap:"round"},polylineSegments:{className:"elevation-polyline-segments",color:"#F00",interactive:!1},preferCanvas:!1,reverseCoords:!1,ruler:!0,theme:"lightblue-theme",summary:"inline",slope:!1,speed:!1,time:!0,timeFactor:3600,timestamps:!1,trkStart:{className:"start-marker",radius:6,weight:2,color:"#fff",fillColor:"#00d800",fillOpacity:1,interactive:!1},trkEnd:{className:"end-marker",radius:6,weight:2,color:"#fff",fillColor:"#ff0606",fillOpacity:1,interactive:!1},waypoints:!0,wptIcons:{"":L.divIcon({className:"elevation-waypoint-marker",html:'<i class="elevation-waypoint-icon default"></i>',iconSize:[30,30],iconAnchor:[8,30]})},wptLabels:!0,xAttr:"dist",xLabel:"km",yAttr:"z",yLabel:"m",zFollow:!1,zooming:!L.Browser.Mobile,margins:{top:30,right:30,bottom:30,left:40},height:.3*screen.height||200,width:.6*screen.width||600,xTicks:void 0,yTicks:void 0,decimalsX:2,decimalsY:0,forceAxisBounds:!1,interpolation:"curveLinear",yAxisMax:void 0,yAxisMin:void 0,srcFolder:(document.currentScript&&document.currentScript.src||{url:"undefined"==typeof document&&"undefined"==typeof location?url.pathToFileURL(__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("leaflet-elevation.min.js",document.baseURI).href}&&("undefined"==typeof document&&"undefined"==typeof location?url.pathToFileURL(__filename).href:"undefined"==typeof document?location.href:document.currentScript&&document.currentScript.src||new URL("leaflet-elevation.min.js",document.baseURI).href)).split("/").slice(0,-1).join("/")+"/"};L._&&L.i18n||(L._=L.i18n=function(t,e){return t});var B=L.Control.Elevation=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:I,__mileFactor:.621371,__footFactor:3.28084,__D3:"https://unpkg.com/d3@7.8.4/dist/d3.min.js",__TOGEOJSON:"https://unpkg.com/@tmcw/togeojson@5.6.0/dist/togeojson.umd.js",__LGEOMUTIL:"https://unpkg.com/leaflet-geometryutil@0.10.1/src/leaflet.geometryutil.js",__LALMOSTOVER:"https://unpkg.com/leaflet-almostover@1.0.1/src/leaflet.almostover.js",__LHOTLINE:"../libs/leaflet-hotline.min.js",__LDISTANCEM:"../libs/leaflet-distance-marker.min.js",__LEDGESCALE:"../libs/leaflet-edgescale.min.js",__LCHART:"../src/components/chart.js",__LMARKER:"../src/components/marker.js",__LSUMMARY:"../src/components/summary.js",__modulesFolder:"../src/handlers/",__btnIcon:"../images/elevation.svg",addData:function(t,e){var i=this;this.import(this.__D3).then((function(){i._modulesLoaded?(e=e!==null&&e!==void 0?e:t.on&&t,i._addData(t),i._addLayer(e),i._fireEvt("eledata_added",{data:t,layer:e,track_info:i.track_info})):i.once("modules_loaded",(function(){return i.addData(t,e)}))}))},addTo:function(t){if(this.options.detached){var e=v(this.options.elevationDiv),i=this.onAdd(t);e?_(e,i):g(t.getContainer(),i,"afterend")}else L.Control.prototype.addTo.call(this,t);return this},clear:function(){this._marker&&this._marker.remove(),this._chart&&this._clearChart(),this._layers&&this._clearLayers(this._layers),this._markers&&this._clearLayers(this._markers),this._circleMarkers&&this._circleMarkers.remove(),this._hotline&&this._hotline.eachLayer((function(t){return t.options.renderer.remove()})),this._hotline&&this._clearLayers(this._hotline),this._data=[],this.track_info={},this._fireEvt("eledata_clear"),this._updateChart()},_clearChart:function(){var t=this;this._events&&this._events.elechart_updated&&this._events.elechart_updated.forEach((function(e){var i=e.fn,n=e.ctx;return t.off("elechart_updated",i,n)})),this._chart&&this._chart._container&&(this._chart._container.selectAll("g.point .point").remove(),this._chart.clear())},_clearLayers:function(t){(t=t||this._layers)&&t.eachLayer&&(t.eachLayer((function(t){return t.remove()})),t.clearLayers())},disableBrush:function(){this._chart._brushEnabled=!1,this._resetDrag()},enableBrush:function(){this._chart._brushEnabled=!0},disableZoom:function(){this._chart._zoomEnabled=!1,this._chart._resetZoom()},enableZoom:function(){this._chart._zoomEnabled=!0},fitBounds:function(t){t=t||this.getBounds(),this._map&&t.isValid()&&this._map.fitBounds(t)},getBounds:function(t){return L.latLngBounds((t||this._data).map((function(t){return t.latlng})))},getZFollow:function(){return this.options.zFollow},hide:function(){p(this._container,"display","none")},initialize:function(e){e=L.setOptions(this,L.extend({},z(I),e)),this._data=[],this._layers=L.featureGroup(),this._markers=L.featureGroup(),this._hotline=L.featureGroup(),this._circleMarkers=L.featureGroup(),this._markedSegments=L.polyline([]),this._start=L.circleMarker([0,0],e.trkStart||I.trkStart),this._end=L.circleMarker([0,0],e.trkEnd||I.trkEnd),this._chartEnabled=!0,this._yCoordMax=-1/0,this.track_info={},e.followMarker&&(this._setMapView=T(this._setMapView,300,this)),e.legend&&(e.margins.bottom+=30),e.theme&&(e.polylineSegments.className+=" "+e.theme),!0===e.wptIcons&&(e.wptIcons=I.wptIcons),!0===e.distanceMarkers&&(e.distanceMarkers=I.distanceMarkers),e.trkStart&&this._start.addTo(this._circleMarkers),e.trkEnd&&this._end.addTo(this._circleMarkers),this._markedSegments.setStyle(e.polylineSegments),L.extend(t,e.colors||{}),this._fixCanvasPaths(),this._fixTooltipSize()},import:function(t,e){switch(t){case this.__D3:e="object"!=typeof d3;break;case this.__TOGEOJSON:e="object"!=typeof toGeoJSON;break;case this.__LGEOMUTIL:e="object"!=typeof L.GeometryUtil;break;case this.__LALMOSTOVER:e="function"!=typeof L.Handler.AlmostOver;break;case this.__LDISTANCEM:e="function"!=typeof L.DistanceMarkers;break;case this.__LEDGESCALE:e="function"!=typeof L.Control.EdgeScale;break;case this.__LHOTLINE:e="function"!=typeof L.Hotline}return!1!==e?import(o(t,this.options.srcFolder)):Promise.resolve()},load:function(t){var e=this;this._parseFromString(t).then((function(i){return i?e._loadLayer(i):e._loadFile(t)}))},onAdd:function(t){var e=this;this._map=t;var i=this._container=m("div","elevation-control "+this.options.theme+" "+(this.options.detached?"elevation-detached":"leaflet-control"),this.options.detached?{id:"elevation-"+b()}:{});return this.eleDiv||(this.eleDiv=i),this._loadModules(this.options.handlers).then((function(){e._initChart(i),e._initButton(i),e._initSummary(i),e._initMarker(t),e._initLayer(t),e._modulesLoaded=!0,e.fire("modules_loaded")})),this.fire("add"),i},onRemove:function(t){this._container=null,t.off("zoom viewreset zoomanim",this._hideMarker,this).off("resize",this._resetView,this).off("resize",this._resizeChart,this).off("mousedown",this._resetDrag,this),k(t.getContainer(),"mousewheel",this._resetDrag,this),k(t.getContainer(),"touchstart",this._resetDrag,this),k(document,"keydown",this._onKeyDown,this),this.off("eledata_added eledata_loaded",this._updateChart,this).off("eledata_added eledata_loaded",this._updateSummary,this),this.fire("remove")},redraw:function(){this._resizeChart()},setZFollow:function(t){this.options.zFollow=t},show:function(){p(this._container,"display","block")},_addData:function(t){var e=this;if(t){if("FeatureCollection"===t.type)return y(t.features,(function(t){return e._addData(t)}));if("Feature"===t.type){var i=t.geometry;if(i)switch(i.type){case"LineString":return this._addGeoJSONData(i.coordinates,t.properties);case"MultiLineString":return y(i.coordinates,(function(i,n){return e._addGeoJSONData(i,t.properties,n)}));default:return console.warn("Unsopperted GeoJSON feature geometry type:"+i.type)}}return t._latlngs?this._addGeoJSONData(t._latlngs,t.feature&&t.feature.properties):void 0}},_addGeoJSONData:function(t,e,i){var n=this;var o=e&&e.coordinateProperties||e;t.forEach((function(t,e){var r,a,s,l,c;t.meta=(r=t.meta)!==null&&r!==void 0?r:{time:null,ele:null},t.prev=function(t){return t?n._data[e>0?e-1:0][t]:n._data[e>0?e-1:0]},n.fire("elepoint_init",{point:t,props:o,id:e,isMulti:i}),n._addPoint((a=t.lat)!==null&&a!==void 0?a:t[1],(s=t.lng)!==null&&s!==void 0?s:t[0],(c=(l=t.alt)!==null&&l!==void 0?l:t.meta.ele)!==null&&c!==void 0?c:t[2]),n.fire("elepoint_added",{point:t,index:n._data.length-1}),n._yCoordMax<n._data[n._data.length-1][n.options.yAttr]&&(n._yCoordMax=n._data[n._data.length-1][n.options.yAttr])})),this.fire("eletrack_added",{coords:t,index:this._data.length-1})},_addPoint:function(t,e,i){var n;this.options.reverseCoords&&(n=[e,t],t=n[0],e=n[1],n),this._data.push({x:t,y:e,z:i,latlng:L.latLng(t,e,i)}),this.fire("eledata_updated",{index:this._data.length-1})},_addLayer:function(t){return t&&this._layers.addLayer(t),t&&this.options.distanceMarkers&&this.options.distanceMarkers.lazy&&t.on("add remove",(function(t){var e=t.target,i=t.type;return L.DistanceMarkers&&e instanceof L.Polyline&&e[i+"DistanceMarkers"]()})),t},_addMarker:function(t){return t&&this._markers.addLayer(t),t},_initAlmostOverHandler:function(t,e){var i=this;return t&&this.options.almostOver&&!L.Browser.mobile?Promise.all([this.import(this.__LGEOMUTIL),this.import(this.__LALMOSTOVER)]).then((function(){t.addHandler("almostOver",L.Handler.AlmostOver),L.GeometryUtil&&t.almostOver&&t.almostOver.enabled()&&(t.almostOver.addLayer(e),t.on("almost:move",i._onMouseMoveLayer,i).on("almost:out",i._onMouseOut,i),i.once("eledata_clear",(function(){t.almostOver.removeLayer(e),t.off("almost:move",i._onMouseMoveLayer,i).off("almost:out",i._onMouseOut,i)})))})):Promise.resolve()},_initDistanceMarkers:function(){return this.options.distanceMarkers?Promise.all([this.import(this.__LGEOMUTIL),this.import(this.__LDISTANCEM)]):Promise.resolve()},_initEdgeScale:function(t){var e=this;return this.options.edgeScale?Promise.all([this.import(this.__LEDGESCALE)]).then((function(){t.edgeScaleControl=t.edgeScaleControl||L.control.edgeScale("boolean"!=typeof e.options.edgeScale?e.options.edgeScale:{}).addTo(t)})):Promise.resolve()},_initHotLine:function(t){var e=this;var i="string"==typeof this.options.hotline?this.options.hotline:"elevation";return this.options.hotline?this.import(this.__LHOTLINE).then((function(){t.eachLayer((function(t){if("Point"!=t.feature.geometry.type){var n=L.geoJson(t.toGeoJSON(),{coordsToLatLng:function(t){return L.latLng(t[0],t[1],t[2]*(e.options.altitudeFactor||1))}}),o=L.hotline(n.toGeoJSON().features[0].geometry.coordinates,{renderer:L.Hotline.renderer(),min:isFinite(e.track_info[i+"_min"])?e.track_info[i+"_min"]:0,max:isFinite(e.track_info[i+"_max"])?e.track_info[i+"_max"]:1,palette:{0:"#008800",.5:"#ffff00",1:"#ff0000"},weight:5,outlineColor:"#000000",outlineWidth:1}).addTo(e._hotline),r=t.options.style&&t.options.style.opacity||1;t.on("add remove",(function(e){var i=e.type;t.setStyle({opacity:"add"==i?0:r}),o["add"==i?"addTo":"removeFrom"](t._map),o._renderer&&o._renderer._container.parentElement.insertBefore(o._renderer._container,o._renderer._container.parentElement.firstChild)}))}}))})):Promise.resolve()},_initMapIntegrations:function(t){var e=this;var i=this._map;i?(this._data.length&&(this._start.setLatLng(this._data[0].latlng),this._end.setLatLng(this._data[this._data.length-1].latlng)),Promise.all([this._initHotLine(t),this._initAlmostOverHandler(i,t),this._initDistanceMarkers(),this._initEdgeScale(i)]).then((function(){e.options.polyline&&(e._layers.addLayer(t.addTo(i)),e._circleMarkers.addTo(i)),e.options.autofitBounds&&e.fitBounds(t.getBounds()),i.invalidateSize()}))):this.once("add",(function(){return e._initMapIntegrations(t)}))},_collapse:function(){u(this._container,"elevation-expanded","elevation-collapsed"),this._map&&this._map.invalidateSize()},_expand:function(){u(this._container,"elevation-collapsed","elevation-expanded"),this._map&&this._map.invalidateSize()},_fixCanvasPaths:function(){var e=L.Canvas.prototype._fillStroke,i=this,n=this.options.theme.split(" ")[0].replace("-theme",""),o=t[n]||{};L.Canvas.include({_fillStroke:function(t,r){if(i._layers.hasLayer(r)){var a=r.options;if(a.color=o.line||o.area||n,a.stroke=!!a.color,e.call(this,t,r),a.stroke&&0!==a.weight){var s=t.globalCompositeOperation||"source-over";t.globalCompositeOperation="destination-over",t.strokeStyle=o.outline||"#FFF",t.lineWidth=1.75*a.weight,t.stroke(),t.globalCompositeOperation=s}}else e.call(this,t,r)}})},_fixTooltipSize:function(){var t=this;this.on("elechart_init",(function(){return t.once("elechart_change elechart_hover",(function(e){var i=e.data,n=e.xCoord;t._chartEnabled&&(t._chart._showDiagramIndicator(i,n),t._chart._showDiagramIndicator(i,n)),t._updateMarker(i)}))}))},_findItemForLatLng:function(t){return this._data[this._chart._findIndexForLatLng(t)]},_findItemForX:function(t){return this._data[this._chart._findIndexForXCoord(t)]},_fireEvt:function(t,e,i){this.fire&&this.fire(t,e,i),this._map&&this._map.fire(t,e,i)},_hideMarker:function(){this.options.autohideMarker&&this._marker.remove()},_initChart:function(t){var e=this;var i=this.options,n=this._map;if(i.detached){var o=this.eleDiv,r=o.offsetWidth,a=o.offsetHeight;r>0&&(i.width=r),a>20&&(i.height=a-20)}else{var s=n.getContainer().clientWidth;i._maxWidth=i._maxWidth>i.width?i._maxWidth:i.width,this._container.style.maxWidth=i._maxWidth+"px",i._maxWidth>s&&(i.width=s-30)}Promise.all([this.import(this.__D3),this.import(this.__LCHART)]).then((function(o){var r=e._chart=new(o[1]||B).Chart(i,e);e._x=e._chart._x,e._y=e._chart._y,d3.select(t).call(r.render()),r.on("reset_drag",e._hideMarker,e).on("mouse_enter",e._onMouseEnter,e).on("dragged",e._onDragEnd,e).on("mouse_move",e._onMouseMove,e).on("mouse_out",e._onMouseOut,e).on("ruler_filter",e._onRulerFilter,e).on("zoom",e._updateChart,e).on("elepath_toggle",e._onToggleChart,e).on("margins_updated",e._resizeChart,e),e.fire("elechart_init"),n.on("zoom viewreset zoomanim",e._hideMarker,e).on("resize",e._resetView,e).on("resize",e._resizeChart,e).on("rotate",e._rotateMarker,e).on("mousedown",e._resetDrag,e),x(n.getContainer(),"mousewheel",e._resetDrag,e),x(n.getContainer(),"touchstart",e._resetDrag,e),x(document,"keydown",e._onKeyDown,e),e.on("eledata_added eledata_loaded",e._updateChart,e).on("eledata_added eledata_loaded",e._updateSummary,e),e._updateChart(),e._updateSummary()}))},_initLayer:function(){var t=this;this._layers.on("layeradd layerremove",(function(e){var i=e.layer,n=e.type;var o=i.getElement&&i.getElement();h(o,t.options.polyline.className+" "+t.options.theme,"layeradd"==n),f(i,"mousemove",t._onMouseMoveLayer.bind(t),"layeradd"==n),f(i,"mouseout",t._onMouseOut.bind(t),"layeradd"==n)}))},_initMarker:function(t){var e=this;var i=t.getPane("elevationPane");i||(i=this._pane=t.createPane("elevationPane",t.getPane("norotatePane")||t.getPane("mapPane")),i.style.zIndex=625,i.style.pointerEvents="none"),this._renderer&&this._renderer.remove(),this._renderer=L.svg({pane:"elevationPane"}).addTo(this._map),Promise.all([this.import(this.__D3),this.import(this.__LMARKER)]).then((function(t){e._marker=new(t[1]||B).Marker(e.options,e),e.fire("elechart_marker")}))},_initButton:function(t){if(L.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),this.options.collapsed?this._collapse():this._expand(),this.options.autohide&&(x(t,"mouseover",this._expand,this),x(t,"mouseout",this._collapse,this),this._map.on("click",this._collapse,this)),this.options.closeBtn){var e=this._button=m("a","elevation-toggle-icon",{href:"#",title:L._("Elevation")},t);x(e,"click",L.DomEvent.stop),x(e,"click",this._toggle,this),x(e,"focus",this._toggle,this),fetch(o(this.__btnIcon,this.options.srcFolder)).then((function(t){return t.ok&&t.text().then((function(t){return e.innerHTML=t}))}))}},_initSummary:function(t){var e=this;this.import(this.__LSUMMARY).then((function(i){e._summary=new(i||B).Summary({summary:e.options.summary},e),e.on("elechart_init",(function(){d3.select(t).call(e._summary.render())}))}))},_loadFile:function(t){var e=this;fetch(t).then((function(t){return t.text()})).then((function(i){e._downloadURL=t,e._parseFromString(i).then((function(t){return t&&e._loadLayer(t)}))})).catch((function(t){return console.warn(t)}))},_loadModules:function(t){var e=this;var i=(t=t.map((function(t){return"string"==typeof t&&void 0!==B[t]?B[t]:t}))).map((function(t){return"string"==typeof t&&e.import(e.__modulesFolder+t.toLowerCase()+".js")||t instanceof Promise&&t||Promise.resolve()}));return Promise.all(i).then((function(i){y(i,(function(e,i){var n;var o=e&&Object.keys(e)[0];o&&(t[i]=B[o]=(n=B[o])!==null&&n!==void 0?n:e[o])})),y(t,(function(t){return["function","object"].includes(typeof t)&&e._registerHandler(t)}))}))},_loadLayer:function(t){var e=this;var i=this.options,n=i.polyline,o=i.theme,r=i.waypoints,a=i.wptIcons,s=i.wptLabels,l=i.distanceMarkers,c=L.extend({},n);o&&(c.className+=" "+o),t.name&&(this.track_info.name=t.name);var h=L.geoJson(t,{distanceMarkers:l,style:c,pointToLayer:function(t,i){if(r){var n=t.properties,o=n.desc,l=n.name,c=n.sym;if(o=o||"",l=l||"",[!0,"dots"].includes(r)&&e._registerCheckPoint({latlng:i,label:[!0,"dots"].includes(s)?l:""}),[!0,"markers"].includes(r)&&0!=a)return e._registerMarker({latlng:i,sym:(c!==null&&c!==void 0?c:l).replace(" ","-").replace('"',"").replace("'","").toLowerCase(),content:[!0,"markers"].includes(s)&&(l||o)&&decodeURI("<b>"+l+"</b>"+(o.length>0?"<br>"+o:""))})}},onEachFeature:function(t,i){return t.geometry&&"Point"!=t.geometry.type&&e.addData(t,i)}});return this.import(this.__D3).then((function(){e._initMapIntegrations(h);var i={data:t,layer:h,name:e.track_info.name,track_info:e.track_info};e._modulesLoaded?e._fireEvt("eledata_loaded",i):e.once("modules_loaded",(function(){return e._fireEvt("eledata_loaded",i)}))})),h},_onDragEnd:function(t){var e=t.dragstart,i=t.dragend;this._hideMarker(),this.fitBounds(L.latLngBounds([e.latlng,i.latlng])),this.fire("elechart_dragged")},_onKeyDown:function(t){var e=t.key;this.options.detached||"Escape"!==e||this._collapse()},_onMouseEnter:function(){this.fire("elechart_enter")},_onMouseMove:function(t){var e=t.xCoord;if(this._chartEnabled&&this._data.length){var i=this._findItemForX(e);i&&(this._chartEnabled&&this._chart._showDiagramIndicator(i,e),this._updateMarker(i),this._setMapView(i),this._map&&l(this._map.getContainer(),"elechart-hover"),this.fire("elechart_change",{data:i,xCoord:e}),this.fire("elechart_hover",{data:i,xCoord:e}))}},_onMouseMoveLayer:function(t){var e=t.latlng;if(this._data.length){var i=this._findItemForLatLng(e);if(i){var n=i.xDiagCoord;this._chartEnabled&&this._chart._showDiagramIndicator(i,n),this._updateMarker(i),this.fire("elechart_change",{data:i,xCoord:n})}}},_onMouseOut:function(){this.options.detached||(this._hideMarker(),this._chart._hideDiagramIndicator()),this._map&&c(this._map.getContainer(),"elechart-hover"),this.fire("elechart_leave")},_onRulerFilter:function(t){var e=t.coords;this._updateMapSegments(e)},_onToggleChart:function(t){var e=this;var i=t.name,n=t.enabled;this._chartEnabled=this._chart._hasActiveLayers(),this._layers.eachLayer((function(t){return h(t.getElement&&t.getElement(),e.options.polyline.className+" "+e.options.theme,e._chartEnabled)})),this.options[i]=n||"disabled"!=this.options[i]?"disabled":"enabled",this._chartEnabled||(this._chart._hideDiagramIndicator(),this._marker.remove())},_parseFromGeoJSONString:function(t){try{return JSON.parse(t)}catch(t){}},_parseFromString:function(t){var e=this;return new Promise((function(i){return e.import(e.__TOGEOJSON).then((function(){var n;try{n=e._parseFromXMLString(t.trim())}catch(i){n=e._parseFromGeoJSONString(t.toString())}n&&(n.name=n.name||(e._downloadURL||"").split("/").pop().split("#")[0].split("?")[0]),i(n)}))}))},_parseFromXMLString:function(t){var e;if(0!=t.indexOf("<"))throw"Invalid XML";var i=(new DOMParser).parseFromString(t,"text/xml"),n=i.documentElement.tagName.toLowerCase(),o=i.getElementsByTagName("name");if(i.getElementsByTagName("parsererror").length)throw"Invalid XML";n in toGeoJSON||(n="TrainingCenterDatabase"==i.documentElement.tagName?"tcx":"gpx");var r=toGeoJSON[n](i);return r.name=o.length>0?((e=Array.from(o).find((function(t){return"trk"==t.parentElement.tagName})))!==null&&e!==void 0?e:o[0]).textContent:"",r},_registerAreaPath:function(t){var e=this;this.on("elechart_init",(function(){return e._chart._registerAreaPath(t)}))},_registerAxisGrid:function(t){var e=this;this.on("elechart_axis",(function(){return e._chart._registerAxisGrid(t)}))},_registerAxisScale:function(t){var e=this;this.on("elechart_axis",(function(){return e._chart._registerAxisScale(t)}))},_registerCheckPoint:function(t){var e=this;var i=function(){return e._chart._registerCheckPoint(t)};this.on("elechart_updated",i).once("eledata_clear",(function(){return e.off("elechart_updated",i)}))},_registerDataAttribute:function(t){var e=this;t.coordPropsToMeta&&this.on("elepoint_init",(function(i){return t.coordPropsToMeta.call(e,i)}));var i,n,o,r=t.attr||t.name,a={};this.on("elepoint_added",(function(s){var l=s.index,c=s.point;if(i=l,o=n!==null&&n!==void 0?n:e._data[i],n=e._data[i],n[r]=t.pointToAttr.call(e,c,i),i>0&&isNaN(o[r])&&(isNaN(a[r])||isNaN(n[r])?isNaN(a[r])?isNaN(n[r])||(o[r]=n[r]):o[r]=a[r]:o[r]=(a[r]+n[r])/2,t.meta&&(o[t.meta]=o[r])),!isNaN(n[r])){if(a[r]=n[r],t.deltaMax&&(n[r]=O(n[r],o[r],t.deltaMax)),t.clampRange&&(n[r]=M(n[r],t.clampRange)),isNaN(t.decimals)||(n[r]=C(n[r],t.decimals)),t.stats)for(var h in t.stats){var u=(t.statsName||r)+(""!=h?"_":"");e.track_info[u+h]=t.stats[h].call(e,n[r],e.track_info[u+h],e._data.length)}t.onPointAdded&&t.onPointAdded.call(e,n[r],i,c)}}))},_registerHandler:function(t){var e=this;if("function"==typeof t)return this._registerHandler(t.call(this));var i=t.name,n=t.attr,o=t.required,r=t.deltaMax,s=t.clampRange,l=t.decimals,c=t.meta,h=t.unit,u=t.coordinateProperties,p=t.coordPropsToMeta,d=t.pointToAttr,f=t.onPointAdded,m=t.stats,_=t.statsName,g=t.grid,v=t.scale,b=t.path,w=t.tooltip,x=t.summary;(this.options[i]||o)&&(this._registerDataAttribute({name:i,attr:n,meta:c,deltaMax:r,clampRange:s,decimals:l,coordPropsToMeta:a(u,c||i,p),pointToAttr:d,onPointAdded:f,stats:m,statsName:_}),g&&this._registerAxisGrid(L.extend({name:i},g)),"summary"!==this.options[i]&&(v&&this._registerAxisScale(L.extend({name:i,label:h},v)),b&&this._registerAreaPath(L.extend({name:i},b))),(w||t.tooltips)&&y(__spreadArray([w],t.tooltips||[],true),(function(t){return t&&e._registerTooltip(L.extend({name:i},t))})),x&&(y(x,(function(t,e){return x[e]=L.extend({unit:h},t)})),this._registerSummary(x)))},_registerMarker:function(t){var e=t.latlng,i=t.sym,n=t.content;var o=this.options.wptIcons;o.hasOwnProperty(i)||(o[i]=L.divIcon(L.extend({},o[""].options,{html:'<i class="elevation-waypoint-icon '+i+'"></i>'})));var r=L.marker(e,{icon:o[i]});return n&&(r.bindPopup(n,{className:"elevation-popup",keepInView:!0}).openPopup(),r.bindTooltip(n,{className:"elevation-tooltip",direction:"auto",sticky:!0,opacity:1}).openTooltip()),this._addMarker(r)},_registerTooltip:function(t){var e=this;t.chart&&this.on("elechart_init",(function(){return e._chart._registerTooltip(L.extend({},t,{value:t.chart}))})),t.marker&&this.on("elechart_marker",(function(){return e._marker._registerTooltip(L.extend({},t,{value:t.marker}))}))},_registerSummary:function(t){var e=this;this.on("elechart_summary",(function(){return e._summary._registerSummary(t)}))},_resetDrag:function(){this._chart._resetDrag(),this._hideMarker()},_resetView:function(){this._map&&this._map._isFullscreen||(this._resetDrag(),this._hideMarker(),this.options.autofitBounds&&this.fitBounds())},_resizeChart:function(){if(this._container&&"none"!=p(this._container,"display")){var t=this.options,e=t.detached?(this.eleDiv||this._container).offsetWidth:M(t._maxWidth,[0,this._map.getContainer().clientWidth-30]);e&&(t.width=e,this._chart&&this._chart._chart&&(this._chart._chart._resize(t),this._updateChart())),this._updateMapSegments()}},_toggle:function(){A(this._container,"elevation-expanded")?this._collapse():this._expand()},_setMapView:function(t){if(this._map&&this.options.followMarker){var e=this._map.getZoom(),i=this.options.zFollow;"number"==typeof i?this._map.setView(t.latlng,e<i?i:e,{animate:!0,duration:.25}):this._map.getBounds().contains(t.latlng)||this._map.setView(t.latlng,e,{animate:!0,duration:.25})}},_updateChart:function(){this._chart&&this._container&&(this.fire("elechart_axis"),this._chart.update({data:this._data,options:this.options}),this._x=this._chart._x,this._y=this._chart._y,this.fire("elechart_updated"))},_updateMarker:function(t){this._marker&&this._marker.update({map:this._map,item:t,yCoordMax:this._yCoordMax||0,options:this.options})},_rotateMarker:function(){this._marker&&this._marker.update()},_updateMapSegments:function(t){this._markedSegments.setLatLngs(t||[]),t&&this._map&&!this._map.hasLayer(this._markedSegments)&&this._markedSegments.addTo(this._map)},_updateSummary:function(){var t=this;this._summary&&(this._summary.reset(),this.options.summary&&(this.fire("elechart_summary"),this._summary.update()),this.options.downloadLink&&this._downloadURL&&(this._summary._container.innerHTML+='<span class="download"><a href="#">'+L._("Download")+"</a></span>",v(".download a",this._summary._container).onclick=function(e){e.preventDefault();var i={downloadLink:t.options.downloadLink,confirm:r.bind(t,t._downloadURL)};"modal"==t.options.downloadLink&&"function"==typeof CustomEvent?document.dispatchEvent(new CustomEvent("eletrack_download",{detail:i})):"link"!=t.options.downloadLink&&!0!==t.options.downloadLink||i.confirm(),t.fire("eletrack_download",i)}))},_width:function(){if(this._chart)return this._chart._width();var t=this.options,e=t.width,i=t.margins;return e-i.left-i.right},_height:function(){if(this._chart)return this._chart._height();var t=this.options,e=t.height,i=t.margins;return e-i.top-i.bottom}});B.Utils=E,L.control.elevation=function(t){return new B(t)}}));createCommonjsModule((function(t,e){!function(t,i){i(e)}(commonjsGlobal,(function(t){var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):(t.getLatLng?this._map?t.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow())):(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t})):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t})),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,o=this._nonPointGroup,r=this.options.chunkedLoading,a=this.options.chunkInterval,s=this.options.chunkProgress,l=t.length,c=0,h=!0;if(this._map){var u=(new Date).getTime(),p=L.bind((function(){var d=(new Date).getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();c<l;c++){if(r&&c%200==0){var f=(new Date).getTime()-d;if(a<f)break}if((i=t[c])instanceof L.LayerGroup)h&&(t=t.slice(),h=!1),this._extractNonGroupLayers(i,t),l=t.length;else if(i.getLatLng){if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var m=i.__parent.getAllChildMarkers(),_=m[0]===i?m[1]:m[0];n.removeLayer(_)}}else o.addLayer(i),e||this.fire("layeradd",{layer:i})}s&&s(c,l,(new Date).getTime()-u),c===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(p,this.options.chunkDelay)}),this);p()}else for(var d=this._needsClustering;c<l;c++)(i=t[c])instanceof L.LayerGroup?(h&&(t=t.slice(),h=!1),this._extractNonGroupLayers(i,t),l=t.length):i.getLatLng?this.hasLayer(i)||d.push(i):o.addLayer(i);return this},removeLayers:function(t){var e,i,n=t.length,o=this._featureGroup,r=this._nonPointGroup,a=!0;if(!this._map){for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):(this._arraySplice(this._needsClustering,i),r.removeLayer(i),this.hasLayer(i)&&this._needsRemoving.push({layer:i,latlng:i._latlng}),this.fire("layerremove",{layer:i}));return this}if(this._unspiderfy){this._unspiderfy();var s=t.slice(),l=n;for(e=0;e<l;e++)(i=s[e])instanceof L.LayerGroup?(this._extractNonGroupLayers(i,s),l=s.length):this._unspiderfyLayer(i)}for(e=0;e<n;e++)(i=t[e])instanceof L.LayerGroup?(a&&(t=t.slice(),a=!1),this._extractNonGroupLayers(i,t),n=t.length):i.__parent?(this._removeLayer(i,!0,!0),this.fire("layerremove",{layer:i}),o.hasLayer(i)&&(o.removeLayer(i),i.clusterShow&&i.clusterShow())):(r.removeLayer(i),this.fire("layerremove",{layer:i}));return this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds),this},clearLayers:function(){return this._map||(this._needsClustering=[],this._needsRemoving=[],delete this._gridClusters,delete this._gridUnclustered),this._noanimationUnspiderfy&&this._noanimationUnspiderfy(),this._featureGroup.clearLayers(),this._nonPointGroup.clearLayers(),this.eachLayer((function(t){t.off(this._childMarkerEventHandlers,this),delete t.__parent}),this),this._map&&this._generateInitialClusters(),this},getBounds:function(){var t=new L.LatLngBounds;this._topClusterLevel&&t.extend(this._topClusterLevel._bounds);for(var e=this._needsClustering.length-1;0<=e;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,o,r=this._needsClustering.slice(),a=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(r),n=r.length-1;0<=n;n--){for(i=!0,o=a.length-1;0<=o;o--)if(a[o].layer===r[n]){i=!1;break}i&&t.call(e,r[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer((function(e){t.push(e)})),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer((function(i){L.stamp(i)===t&&(e=i)})),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;0<=e;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;0<=e;e--)if(i[e].layer===t)return!1;return!(!t.__parent||t.__parent._group!==this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;"function"!=typeof e&&(e=function(){});var n=function(){!i.hasLayer(t)&&!i.hasLayer(t.__parent)||this._inZoomAnimation||(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom<Math.round(this._map._zoom)?(this._map.on("moveend",n,this),this._map.panTo(t.getLatLng())):(this._map.on("moveend",n,this),this.on("animationend",n,this),t.__parent.zoomToBounds())},onAdd:function(t){var e,i,n;if(this._map=t,!isFinite(this._map.getMaxZoom()))throw"Map has no maxZoom specified";for(this._featureGroup.addTo(t),this._nonPointGroup.addTo(t),this._gridClusters||this._generateInitialClusters(),this._maxLat=t.options.crs.projection.MAX_LATITUDE,e=0,i=this._needsRemoving.length;e<i;e++)(n=this._needsRemoving[e]).newlatlng=n.layer._latlng,n.layer._latlng=n.latlng;for(e=0,i=this._needsRemoving.length;e<i;e++)n=this._needsRemoving[e],this._removeLayer(n.layer,!0),n.layer._latlng=n.newlatlng;this._needsRemoving=[],this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds(),this._map.on("zoomend",this._zoomEnd,this),this._map.on("moveend",this._moveEnd,this),this._spiderfierOnAdd&&this._spiderfierOnAdd(),this._bindEvents(),i=this._needsClustering,this._needsClustering=[],this.addLayers(i,!0)},onRemove:function(t){t.off("zoomend",this._zoomEnd,this),t.off("moveend",this._moveEnd,this),this._unbindEvents(),this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim",""),this._spiderfierOnRemove&&this._spiderfierOnRemove(),delete this._maxLat,this._hideCoverage(),this._featureGroup.remove(),this._nonPointGroup.remove(),this._featureGroup.clearLayers(),this._map=null},getVisibleParent:function(t){for(var e=t;e&&!e._icon;)e=e.__parent;return e||null},_arraySplice:function(t,e){for(var i=t.length-1;0<=i;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,o=Math.floor(this._map.getMinZoom());o<=e&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,o=this._gridUnclustered,r=this._featureGroup,a=this._map,s=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,c=t.__parent,h=c._markers;for(this._arraySplice(h,t);c&&(c._childCount--,c._boundsNeedUpdate=!0,!(c._zoom<s));)e&&c._childCount<=1?(l=c._markers[0]===t?c._markers[1]:c._markers[0],n[c._zoom].removeObject(c,a.project(c._cLatLng,c._zoom)),o[c._zoom].addObject(l,a.project(l.getLatLng(),c._zoom)),this._arraySplice(c.__parent._childClusters,c),c.__parent._markers.push(l),l.__parent=c.__parent,c._icon&&(r.removeLayer(c),i||r.addLayer(l))):c._iconNeedsUpdate=!0,c=c.__parent;delete t.__parent},_isOrIsParent:function(t,e){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},fire:function(t,e,i){if(e&&e.layer instanceof L.MarkerCluster){if(e.originalEvent&&this._isOrIsParent(e.layer._icon,e.originalEvent.relatedTarget))return;t="cluster"+t}L.FeatureGroup.prototype.fire.call(this,t,e,i)},listens:function(t,e){return L.FeatureGroup.prototype.listens.call(this,t,e)||L.FeatureGroup.prototype.listens.call(this,"cluster"+t,e)},_defaultIconCreateFunction:function(t){var e=t.getChildCount(),i=" marker-cluster-";return i+=e<10?"small":e<100?"medium":"large",new L.DivIcon({html:"<div><span>"+e+"</span></div>",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,o=this.options.spiderfyOnEveryZoom;(e||n||o)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;this._inZoomAnimation||(this._shownPolygon&&e.removeLayer(this._shownPolygon),2<t.layer.getChildCount()&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,o=this._map;(t||i||n)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),o.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var o=t;e<=o;o--)this._gridClusters[o]=new L.DistanceGrid(n(o)),this._gridUnclustered[o]=new L.DistanceGrid(n(o));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,o=this._gridClusters,r=this._gridUnclustered,a=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);a<=e;e--){i=this._map.project(t.getLatLng(),e);var s=o[e].getNearObject(i);if(s)return s._addChild(t),void(t.__parent=s);if(s=r[e].getNearObject(i)){var l=s.__parent;l&&this._removeLayer(s,!1);var c=new this._markerCluster(this,e,s,t);o[e].addObject(c,this._map.project(c._cLatLng,e)),s.__parent=c;var h=t.__parent=c;for(n=e-1;n>l._zoom;n--)h=new this._markerCluster(this,n,h),o[n].addObject(h,this._map.project(s.getLatLng(),n));return l._addChild(h),void this._removeFromGridUnclustered(s,e)}r[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer((function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()}))},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;t<this._queue.length;t++)this._queue[t].call(this);this._queue.length=0,clearTimeout(this._queueTimeout),this._queueTimeout=null},_mergeSplitClusters:function(){var t=Math.round(this._map._zoom);this._processQueue(),this._zoom<t&&this._currentShownBounds.intersects(this._getExpandedVisibleBounds())?(this._animationStart(),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,this._getExpandedVisibleBounds()),this._animationZoomIn(this._zoom,t)):this._zoom>t?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),o=0;for(e=e||[];o<n.length;o++)(i=n[o])instanceof L.LayerGroup?this._extractNonGroupLayers(i,e):e.push(i);return e},_overrideMarkerIcon:function(t){return t.options.icon=this.options.iconCreateFunction({getChildCount:function(){return 1},getAllChildMarkers:function(){return[t]}})}});L.MarkerClusterGroup.include({_mapBoundsInfinite:new L.LatLngBounds(new L.LatLng(-1/0,-1/0),new L.LatLng(1/0,1/0))}),L.MarkerClusterGroup.include({_noAnimation:{_animationStart:function(){},_animationZoomIn:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationZoomOut:function(t,e){this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this.fire("animationend")},_animationAddLayer:function(t,e){this._animationAddLayerNonAnimated(t,e)}},_withAnimation:{_animationStart:function(){this._map._mapPane.className+=" leaflet-cluster-anim",this._inZoomAnimation++},_animationZoomIn:function(t,e){var i,n=this._getExpandedVisibleBounds(),o=this._featureGroup,r=Math.floor(this._map.getMinZoom());this._ignoreMove=!0,this._topClusterLevel._recursively(n,t,r,(function(r){var a,s=r._latlng,l=r._markers;for(n.contains(s)||(s=null),r._isSingleParent()&&t+1===e?(o.removeLayer(r),r._recursivelyAddChildrenToMap(null,e,n)):(r.clusterHide(),r._recursivelyAddChildrenToMap(s,e,n)),i=l.length-1;0<=i;i--)a=l[i],n.contains(a._latlng)||o.removeLayer(a)})),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),o.eachLayer((function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()})),this._topClusterLevel._recursively(n,t,e,(function(t){t._recursivelyRestoreChildPositions(e)})),this._ignoreMove=!1,this._enqueue((function(){this._topClusterLevel._recursively(n,t,r,(function(t){o.removeLayer(t),t.clusterShow()})),this._animationEnd()}))},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(2<e._childCount?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue((function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()}))):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),o=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,o,e+1,i);var r=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue((function(){if(1===t._childCount){var a=t._markers[0];this._ignoreMove=!0,a.setLatLng(a.getLatLng()),this._ignoreMove=!1,a.clusterShow&&a.clusterShow()}else t._recursively(n,i,o,(function(t){t._recursivelyRemoveChildrenFromMap(n,o,e+1)}));r._animationEnd()}))},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;0<=i;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var n=this._markers.length-1;0<=n;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,o=n.getBoundsZoom(this._bounds),r=this._zoom+1,a=n.getZoom();0<i.length&&r<o;){r++;var s=[];for(e=0;e<i.length;e++)s=s.concat(i[e]._childClusters);i=s}r<o?this._group._map.setView(this._latlng,r):o<=a?this._group._map.setView(this._latlng,a+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,o=this._markers,r=this._childClusters,a=0,s=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t<o.length;t++)i=o[t]._latlng,this._bounds.extend(i),a+=i.lat,s+=i.lng;for(t=0;t<r.length;t++)(e=r[t])._boundsNeedUpdate&&e._recalculateBounds(),this._bounds.extend(e._bounds),i=e._wLatLng,n=e._childCount,a+=i.lat*n,s+=i.lng*n;this._latlng=this._wLatLng=new L.LatLng(a/l,s/l),this._boundsNeedUpdate=!1}},_addToMap:function(t){t&&(this._backupLatlng=this._latlng,this.setLatLng(t)),this._group._featureGroup.addLayer(this)},_recursivelyAnimateChildrenIn:function(t,e,i){this._recursively(t,this._group._map.getMinZoom(),i-1,(function(t){var i,n,o=t._markers;for(i=o.length-1;0<=i;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}),(function(t){var i,n,o=t._childClusters;for(i=o.length-1;0<=i;i--)(n=o[i])._icon&&(n._setPos(e),n.clusterHide())}))},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,(function(o){o._recursivelyAnimateChildrenIn(t,o._group._map.latLngToLayerPoint(o.getLatLng()).round(),i),o._isSingleParent()&&i-1===n?(o.clusterShow(),o._recursivelyRemoveChildrenFromMap(t,e,i)):o.clusterHide(),o._addToMap()}))},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,(function(t){t.clusterShow()}))},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,(function(n){if(e!==n._zoom)for(var o=n._markers.length-1;0<=o;o--){var r=n._markers[o];i.contains(r._latlng)&&(t&&(r._backupLatlng=r.getLatLng(),r.setLatLng(t),r.clusterHide&&r.clusterHide()),n._group._featureGroup.addLayer(r))}}),(function(e){e._addToMap(t)}))},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;0<=e;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;0<=n;n--)this._childClusters[n]._restorePosition();else for(var o=this._childClusters.length-1;0<=o;o--)this._childClusters[o]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var o,r;this._recursively(t,e-1,i-1,(function(t){for(r=t._markers.length-1;0<=r;r--)o=t._markers[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}),(function(t){for(r=t._childClusters.length-1;0<=r;r--)o=t._childClusters[r],n&&n.contains(o._latlng)||(t._group._featureGroup.removeLayer(o),o.clusterShow&&o.clusterShow())}))},_recursively:function(t,e,i,n,o){var r,a,s=this._childClusters,l=this._zoom;if(e<=l&&(n&&n(this),o&&l===i&&o(this)),l<e||l<i)for(r=s.length-1;0<=r;r--)(a=s[r])._boundsNeedUpdate&&a._recalculateBounds(),t.intersects(a._bounds)&&a._recursively(t,e,i,n,o)},_isSingleParent:function(){return 0<this._childClusters.length&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),o=this._grid,r=o[n]=o[n]||{},a=r[i]=r[i]||[],s=L.Util.stamp(t);this._objectPoint[s]=e,a.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,o=this._getCoord(e.x),r=this._getCoord(e.y),a=this._grid,s=a[r]=a[r]||{},l=s[o]=s[o]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i<n;i++)if(l[i]===t)return l.splice(i,1),1===n&&delete s[o],!0},eachObject:function(t,e){var i,n,o,r,a,s,l=this._grid;for(i in l)for(n in a=l[i])for(o=0,r=(s=a[n]).length;o<r;o++)t.call(e,s[o])&&(o--,r--)},getNearObject:function(t){var e,i,n,o,r,a,s,l,c=this._getCoord(t.x),h=this._getCoord(t.y),u=this._objectPoint,p=this._sqCellSize,d=null;for(e=h-1;e<=h+1;e++)if(o=this._grid[e])for(i=c-1;i<=c+1;i++)if(r=o[i])for(n=0,a=r.length;n<a;n++)s=r[n],((l=this._sqDist(u[L.Util.stamp(s)],t))<p||l<=p&&null===d)&&(p=l,d=s);return d},_getCoord:function(t){var e=Math.floor(t/this._cellSize);return isFinite(e)?e:t},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}},L.QuickHull={getDistant:function(t,e){var i=e[1].lat-e[0].lat;return(e[0].lng-e[1].lng)*(t.lat-e[0].lat)+i*(t.lng-e[0].lng)},findMostDistantPointFromBaseLine:function(t,e){var i,n,o,r=0,a=null,s=[];for(i=e.length-1;0<=i;i--)n=e[i],0<(o=this.getDistant(n,t))&&(s.push(n),r<o&&(r=o,a=n));return{maxPoint:a,newPoints:s}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,o=!1,r=!1,a=null,s=null,l=null,c=null,h=null,u=null;for(e=t.length-1;0<=e;e--){var p=t[e];(!1===i||p.lat>i)&&(i=(a=p).lat),(!1===n||p.lat<n)&&(n=(s=p).lat),(!1===o||p.lng>o)&&(o=(l=p).lng),(!1===r||p.lng<r)&&(r=(c=p).lng)}return h=n!==i?(u=s,a):(u=c,l),[].concat(this.buildConvexHull([u,h],t),this.buildConvexHull([h,u],t))}},L.MarkerCluster.include({getConvexHull:function(){var t,e,i=this.getAllChildMarkers(),n=[];for(e=i.length-1;0<=e;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),t=(this._group._spiderfied=this)._group.options.spiderfyShapePositions?this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?this._generatePointsSpiral(e.length,i):(i.y+=10,this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,o=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,r=this._2PI/t,a=[];for(o=Math.max(o,35),a.length=t,i=0;i<t;i++)n=this._circleStartAngle+i*r,a[i]=new L.Point(e.x+o*Math.cos(n),e.y+o*Math.sin(n))._round();return a},_generatePointsSpiral:function(t,e){var i,n=this._group.options.spiderfyDistanceMultiplier,o=n*this._spiralLengthStart,r=n*this._spiralFootSeparation,a=n*this._spiralLengthFactor*this._2PI,s=0,l=[];for(i=l.length=t;0<=i;i--)i<t&&(l[i]=new L.Point(e.x+o*Math.cos(s),e.y+o*Math.sin(s))._round()),o+=a/(s+=r/o+5e-4*i);return l},_noanimationUnspiderfy:function(){var t,e,i=this._group,n=i._map,o=i._featureGroup,r=this.getAllChildMarkers(null,!0);for(i._ignoreMove=!0,this.setOpacity(1),e=r.length-1;0<=e;e--)t=r[e],o.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:r}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,o,r,a=this._group,s=a._map,l=a._featureGroup,c=this._group.options.spiderLegPolylineOptions;for(a._ignoreMove=!0,i=0;i<t.length;i++)r=s.layerPointToLatLng(e[i]),n=t[i],o=new L.Polyline([this._latlng,r],c),s.addLayer(o),n._spiderLeg=o,n._preSpiderfyLatlng=n._latlng,n.setLatLng(r),n.setZIndexOffset&&n.setZIndexOffset(1e6),l.addLayer(n);this.setOpacity(.3),a._ignoreMove=!1,a.fire("spiderfied",{cluster:this,markers:t})},_animationUnspiderfy:function(){this._noanimationUnspiderfy()}}),L.MarkerCluster.include({_animationSpiderfy:function(t,e){var i,n,o,r,a,s,l=this,c=this._group,h=c._map,u=c._featureGroup,p=this._latlng,d=h.latLngToLayerPoint(p),f=L.Path.SVG,m=L.extend({},this._group.options.spiderLegPolylineOptions),_=m.opacity;for(void 0===_&&(_=L.MarkerClusterGroup.prototype.options.spiderLegPolylineOptions.opacity),f?(m.opacity=0,m.className=(m.className||"")+" leaflet-cluster-spider-leg"):m.opacity=_,c._ignoreMove=!0,i=0;i<t.length;i++)n=t[i],s=h.layerPointToLatLng(e[i]),o=new L.Polyline([p,s],m),h.addLayer(o),n._spiderLeg=o,f&&(a=(r=o._path).getTotalLength()+.1,r.style.strokeDasharray=a,r.style.strokeDashoffset=a),n.setZIndexOffset&&n.setZIndexOffset(1e6),n.clusterHide&&n.clusterHide(),u.addLayer(n),n._setPos&&n._setPos(d);for(c._forceLayout(),c._animationStart(),i=t.length-1;0<=i;i--)s=h.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(s),n.clusterShow&&n.clusterShow(),f&&((r=(o=n._spiderLeg)._path).style.strokeDashoffset=0,o.setStyle({opacity:_}));this.setOpacity(.3),c._ignoreMove=!1,setTimeout((function(){c._animationEnd(),c.fire("spiderfied",{cluster:l,markers:t})}),200)},_animationUnspiderfy:function(t){var e,i,n,o,r,a,s=this,l=this._group,c=l._map,h=l._featureGroup,u=t?c._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):c.latLngToLayerPoint(this._latlng),p=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=p.length-1;0<=i;i--)(e=p[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,a=!0,e._setPos&&(e._setPos(u),a=!1),e.clusterHide&&(e.clusterHide(),a=!1),a&&h.removeLayer(e),d&&(r=(o=(n=e._spiderLeg)._path).getTotalLength()+.1,o.style.strokeDashoffset=r,n.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout((function(){var t=0;for(i=p.length-1;0<=i;i--)(e=p[i])._spiderLeg&&t++;for(i=p.length-1;0<=i;i--)(e=p[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),1<t&&h.removeLayer(e),c.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:s,markers:p})}),200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}))}));function getTrekGeometry(t){return fetch("".concat(state.api,"trek/").concat(t,"/?language=").concat(state.language,"&published=true&fields=geometry"),{cache:"default"}).then((function(t){return t.json()}))}var grwMapCss='@charset "UTF-8";.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;-ms-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::-moz-selection{background:transparent}.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 img.leaflet-tile{mix-blend-mode:plus-lighter}.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{-webkit-filter:inherit;filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{width:0;height:0;-moz-box-sizing:border-box;-webkit-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:-webkit-transform 0.25s cubic-bezier(0, 0, 0.25, 1);transition:transform 0.25s cubic-bezier(0, 0, 0.25, 1);transition:transform 0.25s cubic-bezier(0, 0, 0.25, 1), -webkit-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{-webkit-box-shadow:0 1px 5px rgba(0, 0, 0, 0.65);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{-webkit-box-shadow:0 1px 5px rgba(0, 0, 0, 0.4);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-attribution-flag{display:inline !important;vertical-align:baseline !important;width:1em;height:0.6669em}.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;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;background:rgba(255, 255, 255, 0.8);text-shadow:1px 1px #fff}.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{-webkit-box-shadow:none;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;-webkit-box-shadow:0 3px 14px rgba(0, 0, 0, 0.4);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}.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;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.4);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;print-color-adjust:exact}}.leaflet-control-locate a{cursor:pointer}.leaflet-control-locate a .leaflet-control-locate-location-arrow{display:inline-block;width:16px;height:16px;margin:7px;background-image:url(\'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="black" d="M445 4 29 195c-48 23-32 93 19 93h176v176c0 51 70 67 93 19L508 67c16-38-25-79-63-63z"/></svg>\')}.leaflet-control-locate a .leaflet-control-locate-spinner{display:inline-block;width:16px;height:16px;margin:7px;background-image:url(\'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="black" d="M304 48a48 48 0 1 1-96 0 48 48 0 0 1 96 0zm-48 368a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm208-208a48 48 0 1 0 0 96 48 48 0 0 0 0-96zM96 256a48 48 0 1 0-96 0 48 48 0 0 0 96 0zm13 99a48 48 0 1 0 0 96 48 48 0 0 0 0-96zm294 0a48 48 0 1 0 0 96 48 48 0 0 0 0-96zM109 61a48 48 0 1 0 0 96 48 48 0 0 0 0-96z"/></svg>\');-webkit-animation:leaflet-control-locate-spin 2s linear infinite;animation:leaflet-control-locate-spin 2s linear infinite}.leaflet-control-locate.active a .leaflet-control-locate-location-arrow{background-image:url(\'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="rgb(32, 116, 182)" d="M445 4 29 195c-48 23-32 93 19 93h176v176c0 51 70 67 93 19L508 67c16-38-25-79-63-63z"/></svg>\')}.leaflet-control-locate.following a .leaflet-control-locate-location-arrow{background-image:url(\'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="rgb(252, 132, 40)" d="M445 4 29 195c-48 23-32 93 19 93h176v176c0 51 70 67 93 19L508 67c16-38-25-79-63-63z"/></svg>\')}.leaflet-touch .leaflet-bar .leaflet-locate-text-active{width:100%;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding:0 10px}.leaflet-touch .leaflet-bar .leaflet-locate-text-active .leaflet-locate-icon{padding:0 5px 0 0}.leaflet-control-locate-location circle{-webkit-animation:leaflet-control-locate-throb 4s ease infinite;animation:leaflet-control-locate-throb 4s ease infinite}@-webkit-keyframes leaflet-control-locate-throb{0%{stroke-width:1}50%{stroke-width:3;-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}100%{stroke-width:1}}@keyframes leaflet-control-locate-throb{0%{stroke-width:1}50%{stroke-width:3;-webkit-transform:scale(0.8, 0.8);transform:scale(0.8, 0.8)}100%{stroke-width:1}}@-webkit-keyframes leaflet-control-locate-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes leaflet-control-locate-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.leaflet-hidden{visibility:hidden}.legend{cursor:pointer}.leaflet-container{z-index:0}.elevation-control .background{background-color:var(--ele-bg, rgba(70, 130, 180, 0.2));border-radius:5px;display:block;max-width:100%;overflow:visible;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.elevation-control .area>foreignObject,.elevation-control .axis,.elevation-control .grid,.elevation-control .tooltip,.height-focus.line{pointer-events:none}.elevation-control .axis line,.elevation-control .axis path{stroke:var(--ele-axis, #2d1130);stroke-width:1;fill:none}.elevation-control .grid .tick line{stroke:var(--ele-grid, #eee);stroke-width:1px;shape-rendering:crispEdges}.elevation-control .grid path{stroke-width:0}.elevation-control .axis text,.elevation-control .legend text,.elevation-control .point text{fill:#000;stroke:#fff;stroke-width:2px;font-weight:700;paint-order:stroke fill}.elevation-control .y.axis text{text-anchor:end}.elevation-control .area{fill:var(--ele-area, #4682b4);stroke:var(--ele-stroke, #000);stroke-width:1.2;paint-order:stroke fill}.elevation-control .horizontal-drag-line{stroke:transparent;stroke-dasharray:5;stroke-width:1.1;cursor:row-resize}.elevation-control .active .horizontal-drag-line{stroke:#000}.elevation-control .horizontal-drag-label{fill:#000;stroke:#fff;stroke-width:2px;font-weight:700;paint-order:stroke}.elevation-control .ruler{color:#000;cursor:row-resize}.elevation-control .mouse-focus-line{stroke:#000;stroke-width:1}.elevation-control .mouse-focus-label-rect{fill:#000;fill-opacity:0.75;stroke-width:1;stroke:#444}.elevation-control .mouse-focus-label-text{fill:#fff;font-size:10px}.elevation-control .brush .overlay{cursor:unset}.elevation-control .brush .selection{fill:var(--ele-brush, rgba(23, 74, 117, 0.4));stroke:none;fill-opacity:unset}.elevation-summary{font-family:Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif;font-size:12px;margin:var(--ele-sum-margin, 0 auto);text-shadow:var(--ele-sum-shadow, 1px 0 0 #fff, -1px 0 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff, 1px 1px #fff, -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff)}.elevation-summary>span:not(:last-child):after{content:var(--ele-sum-sep, "")}.multiline-summary>span{display:block}.multiline-summary .download{float:right;font-size:1.2em;font-weight:700;margin-right:2em;margin-top:-3em}.elevation-summary .summaryvalue{font-weight:700}.elevation-toggle-icon{background-color:#fff;border-radius:5px;-webkit-box-shadow:0 1px 7px rgba(0, 0, 0, 0.4);box-shadow:0 1px 7px rgba(0, 0, 0, 0.4);cursor:pointer;display:inline-block;height:var(--ele-toggle-size, 36px);position:var(--ele-toggle-pos, relative);right:5px;top:5px;width:var(--ele-toggle-size, 36px)}.elevation-toggle-icon:before{color:#000;content:"✖";display:var(--ele-close-btn, none);font-size:15px;font-weight:700;line-height:20px;text-align:center;width:100%}.leaflet-elevation-pane .height-focus,.leaflet-overlay-pane .height-focus{stroke:#000;fill:var(--ele-circle, var(--ele-area, #fff))}.leaflet-elevation-pane .height-focus.line,.leaflet-overlay-pane .height-focus.line{stroke-width:2}.leaflet-elevation-pane .height-focus-label,.leaflet-overlay-pane .height-focus-label{fill:#000;stroke:#fff;stroke-width:2px;font-size:12px;font-weight:600;paint-order:stroke}.elevation-position-icon:before,.elevation-waypoint-icon:before{background:var(--ele-marker) no-repeat center center/contain;content:"";display:inline-block;height:100%;width:100%}.elevation-polyline{stroke:var(--ele-poly, var(--ele-area, #000));-webkit-filter:drop-shadow(1px 1px 0 #FFF) drop-shadow(-1px -1px 0 #FFF) drop-shadow(1px -1px 0 #FFF) drop-shadow(-1px 1px 0 #FFF);filter:drop-shadow(1px 1px 0 #FFF) drop-shadow(-1px -1px 0 #FFF) drop-shadow(1px -1px 0 #FFF) drop-shadow(-1px 1px 0 #FFF)}.elevation-detached{font:12px/1.5 Helvetica Neue, Arial, Helvetica, sans-serif;height:auto;position:relative;width:100%;z-index:0}.elevation-detached .area{fill-opacity:var(--ele-alpha, 0.8)}.elevation-detached.elevation-collapsed .elevation-summary{display:block}.elevation-detached.elevation-collapsed .elevation-toggle-icon{bottom:5px;margin:auto;right:9px;top:5px}.elevation-control.elevation-collapsed>*{display:none}.elevation-control.elevation-collapsed>.elevation-toggle-icon{display:inline-block}.elevation-detached{--ele-sum-margin:12px 35px;--ele-sum-shadow:none;--ele-toggle-pos:absolute}.elevation-expanded{--ele-close-btn:inline-block;--ele-toggle-bg:none;--ele-toggle-pos:absolute;--ele-toggle-size:20px}.inline-summary{--ele-sum-sep:" — "}.elevation-waypoint-icon{--ele-marker:url(../images/elevation-pushpin.svg)}.elevation-position-icon{--ele-marker:url(../images/elevation-position.svg)}.lime-theme{--ele-bg:rgba(156,194,34,.2);--ele-axis:#566b13;--ele-area:#9cc222;--ele-grid:#ccc;--ele-brush:rgba(99,126,11,.4);--ele-poly:#566b13;--ele-line:#70ab00}.steelblue-theme{--ele-axis:#0d1821;--ele-area:#4682b4;--ele-brush:rgba(23,74,117,.4);--ele-line:#174a75}.purple-theme{--ele-bg:rgba(115,44,123,.2);--ele-area:#732c7b;--ele-brush:rgba(74,14,80,.4);--ele-line:#732c7b}.yellow-theme{--ele-area:#ff0}.red-theme{--ele-area:red}.magenta-theme{--ele-bg:hsla(0,0%,100%,.47);--ele-area:#ff005e}.lightblue-theme{--ele-area:#36c;--ele-alpha:0.45;--ele-stroke:#4682b4;--ele-circle:#fff;--ele-line:#000}.elevation-detached.lightblue-theme .area{stroke:#36c}.dist-marker{background:#fff;border:1px solid #777;border-radius:10px;color:#000;font-size:0.5rem;text-align:center}.leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{-webkit-transition:-webkit-transform 0.3s ease-out, opacity 0.3s ease-in;-moz-transition:-moz-transform 0.3s ease-out, opacity 0.3s ease-in;-o-transition:-o-transform 0.3s ease-out, opacity 0.3s ease-in;-webkit-transition:opacity 0.3s ease-in, -webkit-transform 0.3s ease-out;transition:opacity 0.3s ease-in, -webkit-transform 0.3s ease-out;transition:transform 0.3s ease-out, opacity 0.3s ease-in;transition:transform 0.3s ease-out, opacity 0.3s ease-in, -webkit-transform 0.3s ease-out}.leaflet-cluster-spider-leg{-webkit-transition:-webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;-moz-transition:-moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;-o-transition:-o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;-webkit-transition:stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;transition:stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}#map{position:relative;font-family:"Roboto";display:block}.leaflet-retina .leaflet-control-layers-toggle{background-image:var(--layers-image-src)}.treks-map{height:100%}.trek-map{height:calc(100% - 250px - var(--map-bottom-space-height))}#elevation{position:relative;background-color:#ffffff}.elevation-control .background{border-radius:0px}.custom-theme.elevation-control .axis text{fill:var(--color-on-surface)}.custom-theme.elevation-control .axis line,.custom-theme.elevation-control .axis path{stroke:var(--color-on-surface)}.custom-theme.elevation-control .mouse-focus-label-rect{fill:var(--color-primary-container);stroke:var(--color-on-primary-container)}.custom-theme.elevation-control .mouse-focus-label-text{fill:var(--color-on-primary-container)}.custom-theme.elevation-control .background{background-color:var(--color-background)}.custom-theme.elevation-control .mouse-focus-line{stroke:var(--color-on-surface)}.use-theme-color.elevation-control .area path.altitude,.use-theme-color .legend-altitude rect.area{fill:var(--color-primary-app);stroke:var(--color-trek-line)}.custom-theme.height-focus.circle-lower{fill:#ffffff;stroke:var(--color-on-surface)}.custom-theme.elevation-polyline{stroke:var(--color-trek-line)}.custom-theme.height-focus.line,.custom-theme.height-focus-label{display:none}.treks-marker-cluster-group-icon{background-color:var(--color-primary-app);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;color:var(--color-on-primary);font-size:16px}.trek-marker div,.selected-trek-marker div{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:50% 50% 50% 0;border:2px solid #ffffff;width:32px;height:32px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);background-color:var(--color-surface)}.trek-marker div img,.selected-trek-marker div img{-webkit-transform:rotate(45deg);transform:rotate(45deg);position:absolute;z-index:20;width:24px !important}.selected-trek-marker div{width:64px;height:64px}.selected-trek-marker div img{width:48px !important}.map-loader-container{position:absolute;z-index:500;width:100%;height:100%;background-color:var(--color-background);display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.map-loader-container .loader{width:48px;height:48px;border:5px solid var(--color-primary-container);border-bottom-color:var(--color-on-primary-container);border-radius:50%;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:rotation 1s linear infinite;animation:rotation 1s linear infinite}@-webkit-keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.leaflet-popup-content{width:144px;margin:0}.trek-departure-popup{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.trek-departure-popup img{border-top-left-radius:8px;border-top-right-radius:8px}.trek-departure-popup .trek-name{font-weight:400;font-size:16px;line-height:24px;padding:8px}.trek-departure-popup .trek-button{margin:0px 8px 8px 8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:transparent;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border:none;background-color:var(--color-background);color:var(--color-on-surface);padding:12px 24px;border-radius:20px;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;gap:8px;white-space:nowrap;line-height:20px;letter-spacing:0.1000000015px;font-size:14px;font-weight:500;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);-webkit-transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:-webkit-box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s;transition:box-shadow 0.2s ease-in-out 0s, -webkit-box-shadow 0.2s ease-in-out 0s}.poi-tooltip .poi-name,.poi-tooltip .information-desks-name,.poi-tooltip .sensitive-area-name,.information-desks-tooltip .poi-name,.information-desks-tooltip .information-desks-name,.information-desks-tooltip .sensitive-area-name,.sensitive-area-tooltip .poi-name,.sensitive-area-tooltip .information-desks-name,.sensitive-area-tooltip .sensitive-area-name{color:var(--color-primary-app);font-weight:400;font-size:16px;line-height:24px}.sensitiveAreasCheckboxContainer{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background-color:#ffffff;padding:8px;border-radius:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.sensitiveAreasCheckboxContainer input,.sensitiveAreasCheckboxContainer label{cursor:pointer}.sensitiveAreasCheckboxContainer input{margin:0}.sensitiveAreasCheckboxContainer label{padding-left:8px}.poi-icon,.information-desks-icon{background-color:var(--color-poi-icon);border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.poi-icon img,.information-desks-icon img{width:36px !important}.parking-icon{background-color:#0000ff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:48px;height:48px;font-size:48px;color:#ffffff}.point-reference-icon{background-color:#ff0000;border:1px solid #ffffff;border-radius:50%;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:24px;height:24px;font-size:24px;color:#ffffff}.map-bottom-space{min-height:var(--map-bottom-space-height);height:var(--map-bottom-space-height);width:100%;background-color:var(--color-background)}.leaflet-popup-content-wrapper{cursor:default;padding:0px;background-color:var(--color-background);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}';var GrwMap=function(){function t(t){registerInstance(this,t);this.trekCardPress=createEvent(this,"trekCardPress",7);this.userLayersState={};this.tileLayer=[];this.handleTreksWithinBoundsBind=this.handleTreksWithinBounds.bind(this);this.mapIsReady=false;this.nameLayer=undefined;this.urlLayer=undefined;this.attributionLayer=undefined;this.center="1, 1";this.zoom=10;this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorBackground="#fef7ff";this.colorTrekLine="#6b0030";this.colorSensitiveArea="\t#4974a5";this.colorPoiIcon="#974c6e";this.useGradient=false;this.resetStoreOnDisconnected=true;this.isLargeView=false}t.prototype.onCenterOnMap=function(t){this.map.setView(new leafletSrc.LatLng(t.detail.latitude,t.detail.longitude),17,{animate:false})};t.prototype.descriptionReferenceIsInViewport=function(t){if(this.currentPointsReferenceLayer){this.handleLayerVisibility(t.detail,this.currentPointsReferenceLayer)}};t.prototype.parkingIsInViewport=function(t){if(this.currentParkingLayer){this.handleLayerVisibility(t.detail,this.currentParkingLayer)}};t.prototype.onInformationDesksIsInViewport=function(t){if(this.currentInformationDesksLayer){this.handleLayerVisibility(t.detail,this.currentInformationDesksLayer)}};t.prototype.sensitiveAreaIsInViewport=function(t){if(this.currentSensitiveAreasLayer){this.handleLayerVisibility(t.detail,this.currentSensitiveAreasLayer)}};t.prototype.poiIsInViewport=function(t){if(this.currentPoisLayer){this.handleLayerVisibility(t.detail,this.currentPoisLayer)}};t.prototype.onCardTrekMouseOver=function(t){if(!state.selectedTrekId||state.selectedTrekId!==t.detail){state.selectedTrekId=t.detail;this.hideTrekLine();this.showTrekLine(t.detail);this.addSelectedCurrentTrek(t.detail)}};t.prototype.oncardTrekMouseLeave=function(){if(!this.trekPopupIsOpen){this.trekPopupIsOpen=false;state.selectedTrekId=null;this.hideTrekLine();this.removeSelectedCurrentTrek()}};t.prototype.componentDidLoad=function(){var t=this;this.map=leafletSrc.map(this.mapRef,{center:this.center.split(",").map(Number),zoom:this.zoom});leafletSrc.control.scale({metric:true,imperial:false}).addTo(this.map);leafletSrc.control.locate({showPopup:false}).addTo(this.map);var e=this.nameLayer?this.nameLayer.split(","):[];var i=this.urlLayer.split(",http").map((function(t,e){return e===0?t:"http"+t}));var n=this.attributionLayer?this.attributionLayer.split(","):[];i.forEach((function(i,o){t.tileLayer.push({key:"".concat(e[o]),value:leafletSrc.tileLayer(i,{maxZoom:19,attribution:"".concat(n[o]&&n[o]!==""?n[o].concat(" | "):"",'Powered by <a target="_blank" href="https://geotrek.fr/">Geotrek</a>')})})}));this.tileLayer[0].value.addTo(this.map);if(i.length>1){this.layersControl=leafletSrc.control.layers(this.tileLayer.reduce((function(t,e){var i;return Object.assign(t,(i={},i[e.key]=e.value,i))}),{}),{},{collapsed:true}).addTo(this.map);leafletSrc.Control.Contract=leafletSrc.Control.extend({onAdd:function(){var e=leafletSrc.DomUtil.create("div");e.className="leaflet-bar leaflet-control";var i=e.appendChild(leafletSrc.DomUtil.create("a"));i.href="#";i.style.backgroundImage="var(--contract-image-src)";e.onclick=function(e){t.bounds&&t.map.fitBounds(t.bounds);e.preventDefault()};return e}});leafletSrc.control.contract=function(t){return new leafletSrc.Control.Contract(t)};leafletSrc.control.contract({position:"topleft"}).addTo(this.map)}if(state.currentTrek){this.addTrek()}else if(state.currentTreks){this.addTreks()}onChange("currentTreks",(function(){if(state.currentTrek){t.removeTreks();t.addTrek()}else if(state.currentTreks){t.removeTrek();t.addTreks()}}));onChange("currentTrek",(function(){if(state.currentTrek){t.removeTreks();t.addTrek()}else{t.removeTrek();t.addTreks()}}))};t.prototype.handleLayerVisibility=function(t,e){if(t&&!this.map.hasLayer(e)){e.addTo(this.map)}else if(this.map.hasLayer(e)&&!this.userLayersState[e._leaflet_id]){this.map.removeLayer(e)}this.handleLayersControlEvent()};t.prototype.addTreks=function(){var t=this;var e;var i=[];var n={type:"FeatureCollection",features:[]};if(state.currentTreks){var o=function(t){i.push(t.departure_geom);n.features.push({type:"Feature",geometry:{type:"Point",coordinates:t.departure_geom},properties:{id:t.id,name:t.name,practice:(e=state.practices.find((function(e){return e.id===t.practice})))===null||e===void 0?void 0:e.pictogram,imgSrc:t.attachments&&t.attachments.length>0&&t.attachments[0].thumbnail}})};for(var r=0,a=state.currentTreks;r<a.length;r++){var s=a[r];o(s)}}if(!this.treksLayer){if(i.length>0&&!state.currentMapTreksBounds){this.bounds=leafletSrc.latLngBounds(i.map((function(t){return[t[1],t[0]]})))}else{if(state.currentMapTreksBounds){this.bounds=state.currentMapTreksBounds}}this.treksLayer=leafletSrc.geoJSON(n,{pointToLayer:function(t,e){return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:t.properties.practice?"<div><img src=".concat(t.properties.practice," /><img/></div>"):"<div/></div>",className:"trek-marker",iconSize:32,iconAnchor:[18,0]}),autoPanOnFocus:false})},onEachFeature:function(e,i){i.once("click",(function(){var n=leafletSrc.DomUtil.create("div");n.className="trek-departure-popup";if(e.properties.imgSrc){var o=leafletSrc.DomUtil.create("img");o.src=e.properties.imgSrc;n.appendChild(o)}var r=leafletSrc.DomUtil.create("div");r.innerHTML=e.properties.name;r.className="trek-name";n.appendChild(r);var a=leafletSrc.DomUtil.create("button");a.innerHTML="Afficher le détail";a.className="trek-button";a.onclick=function(){return t.trekCardPress.emit(e.properties.id)};n.appendChild(a);i.bindPopup(n,{interactive:true,autoPan:false,closeButton:false}).openPopup()}));i.on("mouseover",(function(i){t.hideTrekLine();t.showTrekLine(e.properties.id);t.addSelectedCurrentTrek(e.properties.id,i.latlng)}))}});this.treksMarkerClusterGroup=leafletSrc.markerClusterGroup({showCoverageOnHover:false,removeOutsideVisibleBounds:false,iconCreateFunction:function(t){return leafletSrc.divIcon({html:"<div>"+t.getChildCount()+"</div>",className:"treks-marker-cluster-group-icon",iconSize:48,iconAnchor:[24,24]})}});this.treksMarkerClusterGroup.addLayer(this.treksLayer);this.map.addLayer(this.treksMarkerClusterGroup)}else{if(i.length>0){this.bounds=leafletSrc.latLngBounds(i.map((function(t){return[t[1],t[0]]})))}else{this.map.fire("moveend")}this.treksLayer.clearLayers();this.treksLayer.addData(n);this.treksMarkerClusterGroup.clearLayers();this.treksMarkerClusterGroup.addLayer(this.treksLayer)}this.bounds&&this.map.fitBounds(this.bounds);!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady);this.map.on("moveend",this.handleTreksWithinBoundsBind)};t.prototype.removeTreks=function(){if(this.treksLayer){state.currentMapTreksBounds=this.map.getBounds();this.map.removeLayer(this.treksMarkerClusterGroup);this.treksLayer=null;this.treksMarkerClusterGroup=null;this.map.off("moveend",this.handleTreksWithinBoundsBind)}};t.prototype.handleTreksWithinBounds=function(){var t=this;if(state.currentTreks&&!state.currentMapTreksBounds||state.currentTreks&&state.currentMapTreksBounds&&state.currentMapTreksBounds.toBBoxString()!==this.map.getBounds().toBBoxString()){state.treksWithinBounds=state.currentTreks.filter((function(e){return t.map.getBounds().contains(leafletSrc.latLng(e.departure_geom[1],e.departure_geom[0]))}))}};t.prototype.addTrek=function(){var t=this;var e;this.trekPopupIsOpen=false;state.selectedTrekId=null;this.hideTrekLine();this.removeSelectedCurrentTrek();var i={type:"Feature",geometry:state.currentTrek.geometry,properties:{}};this.currentTrekLayer=leafletSrc.geoJSON(i,{style:function(){return{color:"transparent"}},interactive:false}).addTo(this.map);if(state.currentTrek.parking_location){var n={type:"Feature",properties:{},geometry:{type:"Point",coordinates:state.currentTrek.parking_location}};this.currentParkingLayer=leafletSrc.geoJSON(n,{pointToLayer:function(t,e){return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:"<div>P</div>",className:"parking-icon",iconSize:48,iconAnchor:[0,48]}),autoPanOnFocus:false,interactive:false})}})}if(state.currentSensitiveAreas&&state.currentSensitiveAreas.length>0){var o={type:"FeatureCollection",features:[]};for(var r=0,a=state.currentSensitiveAreas;r<a.length;r++){var s=a[r];o.features.push({type:"Feature",properties:{name:s.name},geometry:s.geometry})}this.currentSensitiveAreasLayer=leafletSrc.geoJSON(o,{onEachFeature:function(t,e){e.once("mouseover",(function(){var i=leafletSrc.DomUtil.create("div");i.className="sensitive-area-tooltip";var n=leafletSrc.DomUtil.create("div");n.innerHTML=t.properties.name;n.className="sensitive-area-name";i.appendChild(n);e.bindTooltip(i).openTooltip()}))},style:function(){return{color:t.colorSensitiveArea}}})}if(state.currentPois&&state.currentPois.length>0){var l={type:"FeatureCollection",features:[]};var c=function(t){l.features.push({type:"Feature",properties:{name:t.name,type_pictogram:(e=state.poiTypes.find((function(e){return e.id===t.type})))===null||e===void 0?void 0:e.pictogram},geometry:t.geometry})};for(var h=0,u=state.currentPois;h<u.length;h++){var p=u[h];c(p)}this.currentPoisLayer=leafletSrc.geoJSON(l,{pointToLayer:function(t,e){return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:t.properties.type_pictogram?"<img src=".concat(t.properties.type_pictogram," />"):"<img />",className:"poi-icon",iconSize:48}),autoPanOnFocus:false})},onEachFeature:function(t,e){e.once("mouseover",(function(){var i=leafletSrc.DomUtil.create("div");i.className="poi-tooltip";var n=leafletSrc.DomUtil.create("div");n.innerHTML=t.properties.name;n.className="poi-name";i.appendChild(n);e.bindTooltip(i).openTooltip()}))}})}if(state.currentInformationDesks&&state.currentInformationDesks.length>0){var d={type:"FeatureCollection",features:[]};for(var f=0,m=state.currentInformationDesks.filter((function(t){return state.currentTrek.information_desks.includes(t.id)}));f<m.length;f++){var _=m[f];if(_.latitude&&_.longitude){d.features.push({type:"Feature",properties:{name:_.name,type_pictogram:_.type.pictogram},geometry:{type:"Point",coordinates:[Number(_.longitude),Number(_.latitude)]}})}}this.currentInformationDesksLayer=leafletSrc.geoJSON(d,{pointToLayer:function(t,e){return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:t.properties.type_pictogram?"<img src=".concat(t.properties.type_pictogram," />"):"<img />",className:"information-desks-icon",iconSize:48}),autoPanOnFocus:false})},onEachFeature:function(t,e){e.once("mouseover",(function(){var i=leafletSrc.DomUtil.create("div");i.className="information-desks-tooltip";var n=leafletSrc.DomUtil.create("div");n.innerHTML=t.properties.name;n.className="information-desks-name";i.appendChild(n);e.bindTooltip(i).openTooltip()}))}})}if(state.currentTrek.points_reference){var g={type:"FeatureCollection",features:[]};g.features.push({type:"Feature",properties:{},geometry:state.currentTrek.points_reference});var v=0;this.currentPointsReferenceLayer=leafletSrc.geoJSON(g,{pointToLayer:function(t,e){v+=1;return leafletSrc.marker(e,{icon:leafletSrc.divIcon({html:v,className:"point-reference-icon",iconSize:24}),autoPanOnFocus:false,interactive:false})}})}var y={srcFolder:"https://unpkg.com/@raruto/leaflet-elevation/src/",elevationDiv:"#elevation",theme:"custom-theme".concat(!this.useGradient?" use-theme-color":""),detached:true,height:250,wptIcons:true,wptLabels:true,collapsed:false,autohide:false,distanceMarkers:{distance:false,direction:true},hotline:this.useGradient,closeBtn:false,summary:false,time:false,timestamps:false,legend:false,downloadLink:false,autofitBounds:false,ruler:false,edgeScale:false,waypoints:false,almostOver:false,speed:false,slope:false,acceleration:false,reverseCoords:false,imperial:false,dragging:false,zooming:false,handlers:["Altitude","Distance","Slope","LinearGradient"],linearGradient:{attr:"z",path:"altitude",range:{0:"#008800",.5:"#ffff00",1:"#ff0000"},min:"elevation_min",max:"elevation_max"}};this.elevationControl=leafletSrc.control.elevation(Object.assign({},y)).addTo(this.map);var b=JSON.stringify({name:"".concat(state.currentTrek.name),type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"LineString",coordinates:state.currentTrek.geometry.coordinates},properties:null}]});this.elevationControl.load(b);var w={};if(this.currentPointsReferenceLayer){w[translate[state.language].layers.pointsReference]=this.currentPointsReferenceLayer}if(this.currentParkingLayer){w[translate[state.language].layers.parking]=this.currentParkingLayer}if(this.currentSensitiveAreasLayer){w[translate[state.language].layers.sensitiveArea]=this.currentSensitiveAreasLayer}if(this.currentInformationDesksLayer){w[translate[state.language].layers.informationPlaces]=this.currentInformationDesksLayer}if(this.currentPoisLayer){w[translate[state.language].layers.pois]=this.currentPoisLayer}if(this.layersControl){Object.keys(w).forEach((function(e){t.layersControl.addOverlay(w[e],e)}))}else{this.layersControl=leafletSrc.control.layers({},w,{collapsed:true}).addTo(this.map)}this.handleLayersControlEvent();this.bounds=leafletSrc.latLngBounds(state.currentTrek.geometry.coordinates.map((function(t){return[t[1],t[0]]})));this.bounds&&this.map.fitBounds(this.bounds);!this.mapIsReady&&(this.mapIsReady=!this.mapIsReady)};t.prototype.addSelectedCurrentTrek=function(t,e){var i=this;var n;var o={type:"FeatureCollection",features:[]};if(state.currentTreks){var r=state.currentTreks.find((function(e){return e.id===t}));o.features.push({type:"Feature",geometry:{type:"Point",coordinates:e?[e.lng,e.lat]:r.departure_geom},properties:{id:r.id,name:r.name,practice:(n=state.practices.find((function(t){return t.id===r.practice})))===null||n===void 0?void 0:n.pictogram,imgSrc:r.attachments&&r.attachments.length>0&&r.attachments[0].thumbnail}})}this.removeSelectedCurrentTrek();state.selectedTrekId=t;this.selectedCurrentTrekLayer=leafletSrc.geoJSON(o,{pointToLayer:function(t,e){return leafletSrc.marker(e,{zIndexOffset:4e6,icon:leafletSrc.divIcon({html:t.properties.practice?"<div><img src=".concat(t.properties.practice," /><img/></div>"):"<div/></div>",className:"selected-trek-marker",iconSize:64,iconAnchor:[36,36]}),autoPanOnFocus:false})},onEachFeature:function(t,e){e.once("click",(function(){var n=leafletSrc.DomUtil.create("div");n.className="trek-departure-popup";if(t.properties.imgSrc){var o=leafletSrc.DomUtil.create("img");o.src=t.properties.imgSrc;n.appendChild(o)}var r=leafletSrc.DomUtil.create("div");r.innerHTML=t.properties.name;r.className="trek-name";n.appendChild(r);var a=leafletSrc.DomUtil.create("button");a.innerHTML="Afficher le détail";a.className="trek-button";a.onclick=function(){return i.trekCardPress.emit(t.properties.id)};n.appendChild(a);e.bindPopup(n,{interactive:true,autoPan:false,closeButton:false}).openPopup()}));e.on("mouseout",(function(){if(!i.trekPopupIsOpen){state.selectedTrekId=null;i.hideTrekLine();i.removeSelectedCurrentTrek()}}));e.on("popupopen",(function(){i.trekPopupIsOpen=Boolean(state.selectedTrekId)}));e.on("popupclose",(function(){if(state.selectedTrekId){i.trekPopupIsOpen=false;state.selectedTrekId=null;i.hideTrekLine();i.removeSelectedCurrentTrek()}}))}}).addTo(this.map)};t.prototype.removeSelectedCurrentTrek=function(){state.selectedTrekId=null;this.selectedCurrentTrekLayer&&this.map.removeLayer(this.selectedCurrentTrekLayer);this.selectedCurrentTrekLayer=null};t.prototype.handleLayersControlEvent=function(){var t=this;var e=this.layersControl._layerControlInputs;e.forEach((function(e){if(t.layersControl._layers.find((function(t){return t.layer._leaflet_id===e.layerId})).overlay){e.onchange=function(i){t.userLayersState[e.layerId]=i.target.checked}}}))};t.prototype.removeTrek=function(){var t=this;if(this.layersControl){if(!this.layersControl._layers.some((function(t){return!t.overlay}))){this.map.removeControl(this.layersControl);this.layersControl=null}else{this.layersControl._layers.filter((function(t){return t.overlay})).forEach((function(e){t.layersControl.removeLayer(e.layer)}))}}if(this.elevationControl){this.elevationControl.clear();this.map.removeControl(this.elevationControl);this.elevationControl=null}if(this.currentTrekLayer){this.map.removeLayer(this.currentTrekLayer);this.currentTrekLayer=null}if(this.currentParkingLayer){this.map.removeLayer(this.currentParkingLayer);this.currentParkingLayer=null}if(this.currentSensitiveAreasLayer){this.map.removeLayer(this.currentSensitiveAreasLayer);this.currentSensitiveAreasLayer=null}if(this.currentPoisLayer){this.map.removeLayer(this.currentPoisLayer);this.currentPoisLayer=null}if(this.currentInformationDesksLayer){this.map.removeLayer(this.currentInformationDesksLayer);this.currentInformationDesksLayer=null}if(this.currentPointsReferenceLayer){this.map.removeLayer(this.currentPointsReferenceLayer);this.currentPointsReferenceLayer=null}};t.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){reset()}};t.prototype.showTrekLine=function(t){var e=this;getTrekGeometry(t).then((function(t){var i={type:"Feature",geometry:t.geometry,properties:{}};e.currentTrekLayer=leafletSrc.geoJSON(i,{style:function(){return{color:e.colorTrekLine}},interactive:false}).addTo(e.map)}))};t.prototype.hideTrekLine=function(){if(this.currentTrekLayer){this.map.removeLayer(this.currentTrekLayer);this.currentTrekLayer=null}};t.prototype.render=function(){var t=this;var e=getAssetPath("".concat("","assets/layers.svg"));var i=getAssetPath("".concat("","assets/contract.svg"));return h(Host,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-surface":this.colorOnSurface,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-background":this.colorBackground,"--color-poi-icon":this.colorPoiIcon,"--color-trek-line":this.colorTrekLine,"--layers-image-src":"url(".concat(e,")"),"--contract-image-src":"url(".concat(i,")"),"--map-bottom-space-height":this.isLargeView?"0px":"70px"}},h("div",{id:"map",style:{},class:state.currentTrek?"trek-map":"treks-map",ref:function(e){return t.mapRef=e}}),state.currentTrek&&h("div",null,h("div",{id:"elevation",ref:function(e){return t.elevationRef=e}}),h("div",{class:"map-bottom-space"})),!this.mapIsReady&&h("div",{class:"map-loader-container"},h("span",{class:"loader"})))};return t}();GrwMap.style=grwMapCss;var grwSearchCss='.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}:host{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host span{font-size:24px;position:absolute;left:32px;z-index:20;pointer-events:none}.search-input{background-color:var(--color-surface-container-high);-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2);border:none;border-radius:40px;color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:400;font-family:"Roboto";height:44px;padding:0px 16px 0px 48px;outline-color:var(--color-outline)}';var GrwSearch=function(){function t(t){registerInstance(this,t)}t.prototype.onSearchChange=function(t){state.searchValue=t.target.value;state.currentTreks=handleFiltersAndSearch()};t.prototype.render=function(){var t=this;return h(Host,null,h("span",{class:"material-symbols material-symbols-outlined"},"search"),h("input",{onInput:function(e){return t.onSearchChange(e)},class:"search-input",type:"search",placeholder:"Rechercher",value:state.searchValue}))};return t}();GrwSearch.style=grwSearchCss;function Mousewheel(t){var e=t.swiper,i=t.extendParams,n=t.on,o=t.emit;var r=getWindow();i({mousewheel:{enabled:false,releaseOnEdges:false,invert:false,forceToAxis:false,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}});e.mousewheel={enabled:false};var a;var s=now();var l;var c=[];function h(t){var e=10;var i=40;var n=800;var o=0;var r=0;var a=0;var s=0;if("detail"in t){r=t.detail}if("wheelDelta"in t){r=-t.wheelDelta/120}if("wheelDeltaY"in t){r=-t.wheelDeltaY/120}if("wheelDeltaX"in t){o=-t.wheelDeltaX/120}if("axis"in t&&t.axis===t.HORIZONTAL_AXIS){o=r;r=0}a=o*e;s=r*e;if("deltaY"in t){s=t.deltaY}if("deltaX"in t){a=t.deltaX}if(t.shiftKey&&!a){a=s;s=0}if((a||s)&&t.deltaMode){if(t.deltaMode===1){a*=i;s*=i}else{a*=n;s*=n}}if(a&&!o){o=a<1?-1:1}if(s&&!r){r=s<1?-1:1}return{spinX:o,spinY:r,pixelX:a,pixelY:s}}function u(){if(!e.enabled)return;e.mouseEntered=true}function p(){if(!e.enabled)return;e.mouseEntered=false}function d(t){if(e.params.mousewheel.thresholdDelta&&t.delta<e.params.mousewheel.thresholdDelta){return false}if(e.params.mousewheel.thresholdTime&&now()-s<e.params.mousewheel.thresholdTime){return false}if(t.delta>=6&&now()-s<60){return true}if(t.direction<0){if((!e.isEnd||e.params.loop)&&!e.animating){e.slideNext();o("scroll",t.raw)}}else if((!e.isBeginning||e.params.loop)&&!e.animating){e.slidePrev();o("scroll",t.raw)}s=(new r.Date).getTime();return false}function f(t){var i=e.params.mousewheel;if(t.direction<0){if(e.isEnd&&!e.params.loop&&i.releaseOnEdges){return true}}else if(e.isBeginning&&!e.params.loop&&i.releaseOnEdges){return true}return false}function m(t){var i=t;var n=true;if(!e.enabled)return;if(t.target.closest(".".concat(e.params.mousewheel.noMousewheelClass)))return;var r=e.params.mousewheel;if(e.params.cssMode){i.preventDefault()}var s=e.el;if(e.params.mousewheel.eventsTarget!=="container"){s=document.querySelector(e.params.mousewheel.eventsTarget)}var u=s&&s.contains(i.target);if(!e.mouseEntered&&!u&&!r.releaseOnEdges)return true;if(i.originalEvent)i=i.originalEvent;var p=0;var m=e.rtlTranslate?-1:1;var _=h(i);if(r.forceToAxis){if(e.isHorizontal()){if(Math.abs(_.pixelX)>Math.abs(_.pixelY))p=-_.pixelX*m;else return true}else if(Math.abs(_.pixelY)>Math.abs(_.pixelX))p=-_.pixelY;else return true}else{p=Math.abs(_.pixelX)>Math.abs(_.pixelY)?-_.pixelX*m:-_.pixelY}if(p===0)return true;if(r.invert)p=-p;var g=e.getTranslate()+p*r.sensitivity;if(g>=e.minTranslate())g=e.minTranslate();if(g<=e.maxTranslate())g=e.maxTranslate();n=e.params.loop?true:!(g===e.minTranslate()||g===e.maxTranslate());if(n&&e.params.nested)i.stopPropagation();if(!e.params.freeMode||!e.params.freeMode.enabled){var v={time:now(),delta:Math.abs(p),direction:Math.sign(p),raw:t};if(c.length>=2){c.shift()}var y=c.length?c[c.length-1]:undefined;c.push(v);if(y){if(v.direction!==y.direction||v.delta>y.delta||v.time>y.time+150){d(v)}}else{d(v)}if(f(v)){return true}}else{var b={time:now(),delta:Math.abs(p),direction:Math.sign(p)};var w=l&&b.time<l.time+500&&b.delta<=l.delta&&b.direction===l.direction;if(!w){l=undefined;var x=e.getTranslate()+p*r.sensitivity;var k=e.isBeginning;var L=e.isEnd;if(x>=e.minTranslate())x=e.minTranslate();if(x<=e.maxTranslate())x=e.maxTranslate();e.setTransition(0);e.setTranslate(x);e.updateProgress();e.updateActiveIndex();e.updateSlidesClasses();if(!k&&e.isBeginning||!L&&e.isEnd){e.updateSlidesClasses()}if(e.params.loop){e.loopFix({direction:b.direction<0?"next":"prev",byMousewheel:true})}if(e.params.freeMode.sticky){clearTimeout(a);a=undefined;if(c.length>=15){c.shift()}var y=c.length?c[c.length-1]:undefined;var P=c[0];c.push(b);if(y&&(b.delta>y.delta||b.direction!==y.direction)){c.splice(0)}else if(c.length>=15&&b.time-P.time<500&&P.delta-b.delta>=1&&b.delta<=6){var T=p>0?.8:.2;l=b;c.splice(0);a=nextTick((function(){e.slideToClosest(e.params.speed,true,undefined,T)}),0)}if(!a){a=nextTick((function(){var t=.5;l=b;c.splice(0);e.slideToClosest(e.params.speed,true,undefined,t)}),500)}}if(!w)o("scroll",i);if(e.params.autoplay&&e.params.autoplayDisableOnInteraction)e.autoplay.stop();if(x===e.minTranslate()||x===e.maxTranslate())return true}}if(i.preventDefault)i.preventDefault();else i.returnValue=false;return false}function _(t){var i=e.el;if(e.params.mousewheel.eventsTarget!=="container"){i=document.querySelector(e.params.mousewheel.eventsTarget)}i[t]("mouseenter",u);i[t]("mouseleave",p);i[t]("wheel",m)}function g(){if(e.params.cssMode){e.wrapperEl.removeEventListener("wheel",m);return true}if(e.mousewheel.enabled)return false;_("addEventListener");e.mousewheel.enabled=true;return true}function v(){if(e.params.cssMode){e.wrapperEl.addEventListener(event,m);return true}if(!e.mousewheel.enabled)return false;_("removeEventListener");e.mousewheel.enabled=false;return true}n("init",(function(){if(!e.params.mousewheel.enabled&&e.params.cssMode){v()}if(e.params.mousewheel.enabled)g()}));n("destroy",(function(){if(e.params.cssMode){g()}if(e.mousewheel.enabled)v()}));Object.assign(e.mousewheel,{enable:g,disable:v})}function freeMode(t){var e=t.swiper,i=t.extendParams,n=t.emit,o=t.once;i({freeMode:{enabled:false,momentum:true,momentumRatio:1,momentumBounce:true,momentumBounceRatio:1,momentumVelocityRatio:1,sticky:false,minimumVelocity:.02}});function r(){if(e.params.cssMode)return;var t=e.getTranslate();e.setTranslate(t);e.setTransition(0);e.touchEventsData.velocities.length=0;e.freeMode.onTouchEnd({currentPos:e.rtl?e.translate:-e.translate})}function a(){if(e.params.cssMode)return;var t=e.touchEventsData,i=e.touches;if(t.velocities.length===0){t.velocities.push({position:i[e.isHorizontal()?"startX":"startY"],time:t.touchStartTime})}t.velocities.push({position:i[e.isHorizontal()?"currentX":"currentY"],time:now()})}function s(t){var i=t.currentPos;if(e.params.cssMode)return;var r=e.params,a=e.wrapperEl,s=e.rtlTranslate,l=e.snapGrid,c=e.touchEventsData;var h=now();var u=h-c.touchStartTime;if(i<-e.minTranslate()){e.slideTo(e.activeIndex);return}if(i>-e.maxTranslate()){if(e.slides.length<l.length){e.slideTo(l.length-1)}else{e.slideTo(e.slides.length-1)}return}if(r.freeMode.momentum){if(c.velocities.length>1){var p=c.velocities.pop();var d=c.velocities.pop();var f=p.position-d.position;var m=p.time-d.time;e.velocity=f/m;e.velocity/=2;if(Math.abs(e.velocity)<r.freeMode.minimumVelocity){e.velocity=0}if(m>150||now()-p.time>300){e.velocity=0}}else{e.velocity=0}e.velocity*=r.freeMode.momentumVelocityRatio;c.velocities.length=0;var _=1e3*r.freeMode.momentumRatio;var g=e.velocity*_;var v=e.translate+g;if(s)v=-v;var y=false;var b;var w=Math.abs(e.velocity)*20*r.freeMode.momentumBounceRatio;var x=void 0;if(v<e.maxTranslate()){if(r.freeMode.momentumBounce){if(v+e.maxTranslate()<-w){v=e.maxTranslate()-w}b=e.maxTranslate();y=true;c.allowMomentumBounce=true}else{v=e.maxTranslate()}if(r.loop&&r.centeredSlides)x=true}else if(v>e.minTranslate()){if(r.freeMode.momentumBounce){if(v-e.minTranslate()>w){v=e.minTranslate()+w}b=e.minTranslate();y=true;c.allowMomentumBounce=true}else{v=e.minTranslate()}if(r.loop&&r.centeredSlides)x=true}else if(r.freeMode.sticky){var k=void 0;for(var L=0;L<l.length;L+=1){if(l[L]>-v){k=L;break}}if(Math.abs(l[k]-v)<Math.abs(l[k-1]-v)||e.swipeDirection==="next"){v=l[k]}else{v=l[k-1]}v=-v}if(x){o("transitionEnd",(function(){e.loopFix()}))}if(e.velocity!==0){if(s){_=Math.abs((-v-e.translate)/e.velocity)}else{_=Math.abs((v-e.translate)/e.velocity)}if(r.freeMode.sticky){var P=Math.abs((s?-v:v)-e.translate);var T=e.slidesSizesGrid[e.activeIndex];if(P<T){_=r.speed}else if(P<2*T){_=r.speed*1.5}else{_=r.speed*2.5}}}else if(r.freeMode.sticky){e.slideToClosest();return}if(r.freeMode.momentumBounce&&y){e.updateProgress(b);e.setTransition(_);e.setTranslate(v);e.transitionStart(true,e.swipeDirection);e.animating=true;elementTransitionEnd(a,(function(){if(!e||e.destroyed||!c.allowMomentumBounce)return;n("momentumBounce");e.setTransition(r.speed);setTimeout((function(){e.setTranslate(b);elementTransitionEnd(a,(function(){if(!e||e.destroyed)return;e.transitionEnd()}))}),0)}))}else if(e.velocity){n("_freeModeNoMomentumRelease");e.updateProgress(v);e.setTransition(_);e.setTranslate(v);e.transitionStart(true,e.swipeDirection);if(!e.animating){e.animating=true;elementTransitionEnd(a,(function(){if(!e||e.destroyed)return;e.transitionEnd()}))}}else{e.updateProgress(v)}e.updateActiveIndex();e.updateSlidesClasses()}else if(r.freeMode.sticky){e.slideToClosest();return}else if(r.freeMode){n("_freeModeNoMomentumRelease")}if(!r.freeMode.momentum||u>=r.longSwipesMs){e.updateProgress();e.updateActiveIndex();e.updateSlidesClasses()}}Object.assign(e,{freeMode:{onTouchStart:r,onTouchMove:a,onTouchEnd:s}})}var grwTrekDetailCss='@font-face{font-family:"swiper-icons";src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA") format("woff");font-weight:400;font-style:normal}:root{--swiper-theme-color:#007aff;}.swiper,swiper-container{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{-ms-flex-direction:column;flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:-ms-flexbox;display:flex;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;-webkit-transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);-webkit-box-sizing:content-box;box-sizing:content-box}.swiper-android .swiper-slide,.swiper-wrapper{-webkit-transform:translate3d(0px, 0, 0);transform:translate3d(0px, 0, 0)}.swiper-horizontal{-ms-touch-action:pan-y;touch-action:pan-y}.swiper-vertical{-ms-touch-action:pan-x;touch-action:pan-x}.swiper-slide,swiper-slide{-ms-flex-negative:0;flex-shrink:0;width:100%;height:100%;position:relative;-webkit-transition-property:-webkit-transform;transition-property:-webkit-transform;transition-property:transform;transition-property:transform, -webkit-transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{-ms-flex-align:start;align-items:flex-start;-webkit-transition-property:height, -webkit-transform;transition-property:height, -webkit-transform;transition-property:transform, height;transition-property:transform, height, -webkit-transform}.swiper-backface-hidden .swiper-slide{-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-wrapper{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d{-webkit-perspective:1200px;perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-cube-shadow{-webkit-transform-style:preserve-3d;transform-style:preserve-3d}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0, 0, 0, 0.15)}.swiper-3d .swiper-slide-shadow-left{background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-right{background-image:-webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-top{background-image:-webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0)));background-image:linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0))}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none;}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-horizontal.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:x mandatory;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory}.swiper-vertical.swiper-css-mode>.swiper-wrapper{-webkit-scroll-snap-type:y mandatory;-ms-scroll-snap-type:y mandatory;scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{-webkit-scroll-snap-type:none;-ms-scroll-snap-type:none;scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-centered>.swiper-wrapper::before{content:"";-ms-flex-negative:0;flex-shrink:0;-ms-flex-order:9999;order:9999}.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-start:var(--swiper-centered-offset-before);margin-inline-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-horizontal>.swiper-wrapper::before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{-webkit-margin-before:var(--swiper-centered-offset-before);margin-block-start:var(--swiper-centered-offset-before)}.swiper-centered.swiper-vertical>.swiper-wrapper::before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;-webkit-transform-origin:50%;transform-origin:50%;-webkit-box-sizing:border-box;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,swiper-container:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{-webkit-animation:swiper-preloader-spin 1s infinite linear;animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@-webkit-keyframes swiper-preloader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes swiper-preloader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}:root{--swiper-navigation-size:44px;}.swiper-button-prev,.swiper-button-next{position:absolute;top:var(--swiper-navigation-top-offset, 50%);width:calc(var(--swiper-navigation-size) / 44 * 27);height:var(--swiper-navigation-size);margin-top:calc(0px - var(--swiper-navigation-size) / 2);z-index:10;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:var(--swiper-navigation-color, var(--swiper-theme-color))}.swiper-button-prev.swiper-button-disabled,.swiper-button-next.swiper-button-disabled{opacity:0.35;cursor:auto;pointer-events:none}.swiper-button-prev.swiper-button-hidden,.swiper-button-next.swiper-button-hidden{opacity:0;cursor:auto;pointer-events:none}.swiper-navigation-disabled .swiper-button-prev,.swiper-navigation-disabled .swiper-button-next{display:none !important}.swiper-button-prev:after,.swiper-button-next:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);text-transform:none !important;letter-spacing:0;font-variant:initial;line-height:1}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset, 10px);right:auto}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:"prev"}.swiper-button-next,.swiper-rtl .swiper-button-prev{right:var(--swiper-navigation-sides-offset, 10px);left:auto}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:"next"}.swiper-button-lock{display:none}:root{}.swiper-pagination{position:absolute;text-align:center;-webkit-transition:300ms opacity;transition:300ms opacity;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none !important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transform:scale(0.33);transform:scale(0.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active{-webkit-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{-webkit-transform:scale(1);transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{-webkit-transform:scale(0.66);transform:scale(0.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{-webkit-transform:scale(0.33);transform:scale(0.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{-webkit-transform:scale(0.66);transform:scale(0.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{-webkit-transform:scale(0.33);transform:scale(0.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, 0.2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none !important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;-webkit-transform:translate3d(0px, -50%, 0);transform:translate3d(0px, -50%, 0)}.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:8px}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;-webkit-transition:200ms top, 200ms -webkit-transform;transition:200ms top, 200ms -webkit-transform;transition:200ms transform, 200ms top;transition:200ms transform, 200ms top, 200ms -webkit-transform}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:200ms left, 200ms -webkit-transform;transition:200ms left, 200ms -webkit-transform;transition:200ms transform, 200ms left;transition:200ms transform, 200ms left, 200ms -webkit-transform}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,:host(.swiper-horizontal.swiper-rtl) .swiper-pagination-bullets-dynamic .swiper-pagination-bullet{-webkit-transition:200ms right, 200ms -webkit-transform;transition:200ms right, 200ms -webkit-transform;transition:200ms transform, 200ms right;transition:200ms transform, 200ms right, 200ms -webkit-transform}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));position:absolute;}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:left top;transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{-webkit-transform-origin:right top;transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}.swiper{z-index:0}.material-symbols{font-family:"Material Symbols Outlined"}.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}:host{--swiper-navigation-size:24px;--swiper-navigation-color:var(--color-on-primary-container);--swiper-pagination-color:var(--color-primary-container);--swiper-pagination-bullet-size:12px}:host .swiper-button-prev,:host .swiper-button-next{background-color:var(--color-primary-container);padding:4px;width:32px;height:32px;border-radius:32px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1)}:host .swiper-button-prev:hover,:host .swiper-button-next:hover{-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}grw-trek-detail{overflow:hidden}.trek-options{display:-ms-flexbox;display:flex;position:relative;width:100%;min-height:32px;padding:8px 0px;background-color:var(--color-background);overflow-x:auto}.trek-options::-webkit-scrollbar{display:none}.trek-options .trek-option{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-left:16px;font-size:22px;line-height:28px;font-weight:500;white-space:nowrap;text-decoration:none;color:var(--color-on-surface);-webkit-transition-property:color;transition-property:color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:0.3s;transition-duration:0.3s}.trek-options .trek-option:hover{color:var(--color-primary-app)}@media (hover: none){.trek-options .trek-option:not(.selected-trek-option):hover{color:inherit}}.trek-options .trek-option:last-of-type{margin-right:16px}.trek-options .selected-trek-option{color:var(--color-primary-app)}.trek-options .indicator-selected-trek-option{position:absolute;bottom:8px;height:2px;background-image:-webkit-gradient(linear, left top, left bottom, from(var(--color-primary-app)), to(var(--color-primary-app)));background-image:linear-gradient(var(--color-primary-app), var(--color-primary-app));background-repeat:no-repeat;-webkit-transition:background-size 0.5s ease 0.5s, -webkit-transform 0.5s ease;transition:background-size 0.5s ease 0.5s, -webkit-transform 0.5s ease;transition:transform 0.5s ease, background-size 0.5s ease 0.5s;transition:transform 0.5s ease, background-size 0.5s ease 0.5s, -webkit-transform 0.5s ease;margin-left:16px;background-position:center}.trek-options .presentation.selected-trek-option~.indicator-selected-trek-option{width:240px;background-size:120px 100%}.trek-options .description.selected-trek-option~.indicator-selected-trek-option{width:240px;background-size:120px 100%}.trek-options .recommendations.selected-trek-option~.indicator-selected-trek-option{width:380px;background-size:190px 100%}.trek-options .sensitive-areas.selected-trek-option~.indicator-selected-trek-option{width:320px;background-size:160px 100%}.trek-options .information-places.selected-trek-option~.indicator-selected-trek-option{width:400px;background-size:200px 100%}.trek-options .pois.selected-trek-option~.indicator-selected-trek-option{width:240px;background-size:120px 100%}.trek-options .presentation{min-width:120px;width:120px}.trek-options .description{min-width:120px;width:120px}.trek-options .recommendations{min-width:190px;width:190px}.trek-options .sensitive-areas{min-width:160px;width:160px}.trek-options .information-places{min-width:200px;width:200px}.trek-options .pois{min-width:120px;width:120px}.trek-detail-container{font-family:"Roboto";color:var(--color-on-surface);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;max-height:100%;overflow-y:auto}.trek-detail-container .name{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;padding:0px 24px;margin:8px 0px}.trek-detail-container .image{cursor:pointer;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.trek-detail-container .sub-container{padding:24px 24px 0px 24px}.trek-detail-container .sub-container .icons-labels-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-detail-container .sub-container .icons-labels-container .row{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;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:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align: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 span{font-size:24px;width:24px;height:auto;margin-right:8px}.trek-detail-container .sub-container .icons-labels-container .row .practice img{background-color:var(--color-primary-app)}.trek-detail-container .downloads-container{padding:0px 24px 0px 24px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.trek-detail-container .downloads-container .download-title{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500}.trek-detail-container .downloads-container .links-container{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.trek-detail-container .downloads-container .links-container a{margin-top:8px;background-color:var(--color-primary-container);color:var(--color-on-primary-container);border-radius:8px;padding:8px 16px;-webkit-box-shadow:var(--elevation-1);box-shadow:var(--elevation-1);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative;text-decoration:none}.trek-detail-container .downloads-container .links-container a:nth-child(2){margin:8px 12px 0px 12px}.trek-detail-container .downloads-container .links-container a:hover{-webkit-box-shadow:var(--elevation-2);box-shadow:var(--elevation-2)}.trek-detail-container .themes-container{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0px 24px 0px 24px}.trek-detail-container .themes-container .theme{background-color:var(--color-secondary-container);color:var(--color-on-secondary-container);border-radius:8px;padding:8px 16px;margin:0px 8px 8px 0px;-webkit-box-shadow:var(--elevation-0);box-shadow:var(--elevation-0);border:1px solid var(--color-outline);height:32px;gap:8px;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:start;vertical-align:middle;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative}.trek-detail-container .ambiance,.trek-detail-container .description-teaser,.trek-detail-container .description-container,.trek-detail-container .altimetric-profile-container,.trek-detail-container .access-container,.trek-detail-container .public-transport-container,.trek-detail-container .advice-container,.trek-detail-container .advised-parking-container,.trek-detail-container .gear-container,.trek-detail-container .sensitive-areas-container,.trek-detail-container .source-container,.trek-detail-container .accessibilities-container,.trek-detail-container .weather-container{padding:0px 24px 0px 24px}.trek-detail-container .ambiance,.trek-detail-container .description-teaser,.trek-detail-container .description-container,.trek-detail-container .altimetric-profile-container,.trek-detail-container .access-container,.trek-detail-container .public-transport-container,.trek-detail-container .advice-container,.trek-detail-container .advised-parking-container,.trek-detail-container .gear-container,.trek-detail-container .sensitive-areas-container,.trek-detail-container .information-desks-container,.trek-detail-container .pois-container,.trek-detail-container .source-container,.trek-detail-container .accessibilities-container,.trek-detail-container .weather-container,.trek-detail-container .step-container{font-size:16px;line-height:24px;font-weight:400}.trek-detail-container .ambiance a,.trek-detail-container .description-teaser a,.trek-detail-container .description-container a,.trek-detail-container .altimetric-profile-container a,.trek-detail-container .access-container a,.trek-detail-container .public-transport-container a,.trek-detail-container .advice-container a,.trek-detail-container .advised-parking-container a,.trek-detail-container .gear-container a,.trek-detail-container .sensitive-areas-container a,.trek-detail-container .information-desks-container a,.trek-detail-container .pois-container a,.trek-detail-container .source-container a,.trek-detail-container .accessibilities-container a,.trek-detail-container .weather-container a,.trek-detail-container .step-container a{color:var(--color-primary-app)}.trek-detail-container .description-title,.trek-detail-container .altimetric-profile-title,.trek-detail-container .access-title,.trek-detail-container .public-transport-title,.trek-detail-container .advice-title,.trek-detail-container .advised-parking-title,.trek-detail-container .gear-title,.trek-detail-container .sensitive-areas-title,.trek-detail-container .information-desks-title,.trek-detail-container .pois-title,.trek-detail-container .source-title,.trek-detail-container .accessibilities-title,.trek-detail-container .step-title{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;font-weight:bold;margin-bottom:16px}.trek-detail-container .information-desks-title,.trek-detail-container .pois-title,.trek-detail-container .step-title{padding:0px 24px 0px 24px}.description-container .description ol{position:relative;counter-reset:referencePoint}.description-container .description ol:before{content:"";position:absolute;width:4px;top:0px;bottom:0px;left:14px;background-color:var(--color-primary-app)}.description-container .description ol li{position:relative;list-style-type:none;counter-increment:referencePoint}.description-container .description ol li p{margin:0}.description-container .description ol li:not(:first-child){margin-top:12px}.description-container .description ol li:before{position:absolute;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;content:counter(referencePoint);width:24px;height:24px;background:#f04141;border-radius:12px;font-weight:bold;font-size:0.8em;color:white;margin-left:-36px;top:calc(50% - 12px)}.current-advice-container{display:-ms-flexbox;display:flex;padding:12px;border:2px solid var(--color-outline);border-radius:12px}.current-advice-container span{font-size:24px;width:26px;margin-right:8px}.label-container{margin-top:12px;padding:12px;border:2px solid var(--color-outline);border-radius:12px}.label-container .label-sub-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.label-container .label-sub-container img{width:26px;margin-right:16px}.label-container .label-sub-container .label-name{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500;padding:12px 0px}.label-container .label-advice{color:var(--color-on-surface);font-size:16px;line-height:24px;font-weight:500}.source-container .source-sub-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.source-container .source-sub-container img{width:26px;margin-right:16px}.source-container .source-sub-container .source-name{color:var(--color-on-surface);font-size:16px;line-height:20px;font-weight:500;padding:12px 0px}.departure-container,.arrival-container,.cities-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:0px 24px 24px 24px}.departure-container .departure-title,.departure-container .arrival-title,.departure-container .cities-title,.arrival-container .departure-title,.arrival-container .arrival-title,.arrival-container .cities-title,.cities-container .departure-title,.cities-container .arrival-title,.cities-container .cities-title{color:var(--color-on-surface);font-weight:bold;white-space:nowrap;margin-right:8px}.accessibilities-container .accessibilities-content-container{padding:12px 0px 0px 0px;display:-ms-flexbox;display:flex}.accessibilities-container .accessibilities-content-container .accessibility-content-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin:0px 8px 8px 0px}.accessibilities-container .accessibilities-content-container .accessibility-content-container img{margin-right:16px;width:26px}.accessibilities-container .accessibility-level-title,.accessibilities-container .accessibility-slope-title,.accessibilities-container .accessibility-width-title,.accessibilities-container .accessibility-signage-title,.accessibilities-container .accessibility-covering-title,.accessibilities-container .accessibility-exposure-title,.accessibilities-container .accessibility-advice-title{color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400;padding:12px 0px}.weather-container #weather-widget{width:100%}.swiper-information-desks,.swiper-pois,.swiper-step{padding-right:32px;padding-left:32px}.swiper-step{padding-bottom:4px}.divider{margin:16px;border-top:1px solid var(--color-outline)}.detail-bottom-space{min-height:var(--detail-bottom-space-height);height:var(--detail-bottom-space-height);width:100%;background-color:var(--color-background)}.images-container{display:-ms-flexbox;display:flex;max-width:100%;max-height:400px}';var presentation={visible:true,width:120,indicator:false};var description={visible:false,width:120,indicator:false};var recommendations={visible:false,width:190,indicator:false};var sensitiveArea={visible:false,width:160,indicator:false};var informationPlaces={visible:false,width:200,indicator:false};var pois={visible:false,width:120,indicator:false};var options={presentation:presentation,description:description,recommendations:recommendations,sensitiveArea:sensitiveArea,informationPlaces:informationPlaces,pois:pois};var GrwTrekDetail=function(){function t(t){registerInstance(this,t);this.descriptionReferenceIsInViewport=createEvent(this,"descriptionReferenceIsInViewport",7);this.parkingIsInViewport=createEvent(this,"parkingIsInViewport",7);this.sensitiveAreaIsInViewport=createEvent(this,"sensitiveAreaIsInViewport",7);this.informationDeskIsInViewport=createEvent(this,"informationDeskIsInViewport",7);this.poiIsInViewport=createEvent(this,"poiIsInViewport",7);this.currentTrek=undefined;this.difficulty=undefined;this.route=undefined;this.practice=undefined;this.themes=undefined;this.labels=undefined;this.sources=undefined;this.accessibilities=undefined;this.accessibilityLevel=undefined;this.displayFullscreen=false;this.cities=undefined;this.options=undefined;this.trek=undefined;this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorPrimaryContainer="#eaddff";this.colorOnPrimaryContainer="#21005e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorSurfaceContainerLow="#f7f2fa";this.colorBackground="#fef7ff";this.resetStoreOnDisconnected=true;this.weather=false;this.isLargeView=false}t.prototype.componentDidLoad=function(){var t=this;this.swiperImages=new Swiper(this.swiperImagesRef,{modules:[Navigation,Pagination,Keyboard,freeMode,Mousewheel],navigation:{prevEl:this.prevElImagesRef,nextEl:this.nextElImagesRef},pagination:{el:this.paginationElImagesRef},allowTouchMove:false,keyboard:false});this.swiperImagesRef.onfullscreenchange=function(){t.displayFullscreen=!t.displayFullscreen;t.displayFullscreen?t.swiperImages.keyboard.enable():t.swiperImages.keyboard.disable()};this.swiperStep=new Swiper(this.swiperStepRef,{modules:[freeMode,Mousewheel],slidesPerView:1.5,spaceBetween:20,grabCursor:true,freeMode:true,mousewheel:{forceToAxis:true},breakpointsBase:"container",breakpoints:{540:{slidesPerView:2.5}}});this.swiperPois=new Swiper(this.swiperPoisRef,{modules:[freeMode,Mousewheel],slidesPerView:1.5,spaceBetween:20,grabCursor:true,freeMode:true,mousewheel:{forceToAxis:true},breakpointsBase:"container",breakpoints:{540:{slidesPerView:2.5}}});this.swiperInformationDesks=new Swiper(this.swiperInformationDesksRef,{modules:[freeMode,Mousewheel],slidesPerView:1.5,spaceBetween:20,grabCursor:true,freeMode:true,mousewheel:{forceToAxis:true},breakpointsBase:"container",breakpoints:{540:{slidesPerView:2.5}}});if(this.presentationRef){var e=new IntersectionObserver((function(e){var i=e[0].isIntersecting;if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{presentation:Object.assign(Object.assign({},t.defaultOptions.presentation),{indicator:i})})}}));e.observe(this.presentationRef)}if(this.descriptionRef){var i=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.descriptionReferenceIsInViewport.emit(i);if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{description:Object.assign(Object.assign({},t.defaultOptions.description),{indicator:i})})}}));i.observe(this.descriptionRef)}if(this.recommendationRef){var n=new IntersectionObserver((function(e){var i=e[0].isIntersecting;if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{recommendations:Object.assign(Object.assign({},t.defaultOptions.recommendations),{indicator:i})})}}));n.observe(this.recommendationRef)}if(this.parkingRef){var o=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.parkingIsInViewport.emit(i)}));o.observe(this.parkingRef)}if(this.sensitiveAreaRef){var r=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.sensitiveAreaIsInViewport.emit(i);if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{sensitiveArea:Object.assign(Object.assign({},t.defaultOptions.sensitiveArea),{indicator:i})})}}));r.observe(this.sensitiveAreaRef)}if(this.informationDeskRef){var a=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.informationDeskIsInViewport.emit(i);if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{informationPlaces:Object.assign(Object.assign({},t.defaultOptions.informationPlaces),{indicator:i})})}}));a.observe(this.informationDeskRef)}if(this.poiRef){var s=new IntersectionObserver((function(e){var i=e[0].isIntersecting;t.poiIsInViewport.emit(i);if(i){t.options=Object.assign(Object.assign({},t.defaultOptions),{pois:Object.assign(Object.assign({},t.defaultOptions.pois),{indicator:i})})}}));s.observe(this.poiRef)}};t.prototype.connectedCallback=function(){var t=this;this.currentTrek=this.trek?this.trek:state.currentTrek;if(this.currentTrek){this.defaultOptions=this.handleOptions();this.options=Object.assign(Object.assign({},this.defaultOptions),{presentation:Object.assign(Object.assign({},this.defaultOptions.presentation),{indicator:true})});this.difficulty=state.difficulties.find((function(e){return e.id===t.currentTrek.difficulty}));this.route=state.routes.find((function(e){return e.id===t.currentTrek.route}));this.practice=state.practices.find((function(e){return e.id===t.currentTrek.practice}));this.themes=state.themes.filter((function(e){return t.currentTrek.themes.includes(e.id)}));this.labels=state.labels.filter((function(e){return t.currentTrek.labels.includes(e.id)}));this.sources=state.sources.filter((function(e){return t.currentTrek.source.includes(e.id)}));this.accessibilities=state.accessibilities.filter((function(e){return t.currentTrek.accessibilities.includes(e.id)}));if(state.accessibilitiesLevel){this.accessibilityLevel=state.accessibilitiesLevel.find((function(e){return t.currentTrek.accessibility_level===e.id}))}this.cities=this.currentTrek.cities.map((function(t){var e;return(e=state.cities.find((function(e){return e.id===t})))===null||e===void 0?void 0:e.name}));this.hasStep=this.currentTrek.children.length>0}onChange("currentTrek",(function(){t.currentTrek=t.trek?t.trek:state.currentTrek;if(t.currentTrek){t.defaultOptions=t.handleOptions();t.options=Object.assign(Object.assign({},t.defaultOptions),{presentation:Object.assign(Object.assign({},t.defaultOptions.presentation),{indicator:true})});t.difficulty=state.difficulties.find((function(e){return e.id===t.currentTrek.difficulty}));t.route=state.routes.find((function(e){return e.id===t.currentTrek.route}));t.practice=state.practices.find((function(e){return e.id===t.currentTrek.practice}));t.themes=state.themes.filter((function(e){return t.currentTrek.themes.includes(e.id)}));t.labels=state.labels.filter((function(e){return t.currentTrek.labels.includes(e.id)}));t.sources=state.sources.filter((function(e){return t.currentTrek.source.includes(e.id)}));t.accessibilities=state.accessibilities.filter((function(e){return t.currentTrek.accessibilities.includes(e.id)}));if(state.accessibilitiesLevel){t.accessibilityLevel=state.accessibilitiesLevel.find((function(e){return t.currentTrek.accessibility_level===e.id}))}t.cities=t.currentTrek.cities.map((function(t){var e;return(e=state.cities.find((function(e){return e.id===t})))===null||e===void 0?void 0:e.name}));t.hasStep=t.currentTrek.children.length>0}}))};t.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){reset()}};t.prototype.handleOptions=function(){var t=this;return Object.assign(Object.assign({},options),{presentation:Object.assign({},presentation),description:Object.assign(Object.assign({},description),{visible:Boolean(this.currentTrek.description)}),recommendations:Object.assign(Object.assign({},recommendations),{visible:Boolean(this.currentTrek.advice||this.labels&&this.labels.length>0)}),sensitiveArea:Object.assign(Object.assign({},sensitiveArea),{visible:Boolean(state.currentSensitiveAreas&&state.currentSensitiveAreas.length>0)}),informationPlaces:Object.assign(Object.assign({},informationPlaces),{visible:Boolean(state.currentInformationDesks&&state.currentInformationDesks.filter((function(e){return t.currentTrek.information_desks.includes(e.id)})).length>0)}),pois:Object.assign(Object.assign({},pois),{visible:Boolean(state.currentPois&&state.currentPois.length>0)})})};t.prototype.handleFullscreen=function(){if(this.currentTrek.attachments&&this.currentTrek.attachments[0]&&this.currentTrek.attachments[0].url){this.swiperImagesRef.requestFullscreen()}};t.prototype.handleIndicatorSelectedTrekOption=function(){var t=0;var e;var i=0;var n=Object.values(this.options);var o=0;while(!e&&o<n.length){if(n[o].indicator){e=n[o]}else{if(n[o].visible){t+=1;i+=n[o].width}}o++}return"".concat(i+16*t-e.width/2,"px")};t.prototype.handleScrollTo=function(t){this.trekDetailContainerRef.scrollTo({top:t.offsetTop-48})};t.prototype.render=function(){var t=this;var e,i,n,o,r,a,s;return h(Host,{style:{"--color-primary-app":this.colorPrimaryApp,"--color-on-surface":this.colorOnSurface,"--color-primary-container":this.colorPrimaryContainer,"--color-on-primary-container":this.colorOnPrimaryContainer,"--color-secondary-container":this.colorSecondaryContainer,"--color-on-secondary-container":this.colorOnSecondaryContainer,"--color-background":this.colorBackground,"--detail-bottom-space-height":this.isLargeView?"8px":"104px"}},this.currentTrek&&h("div",{class:"trek-options"},h("a",{onClick:function(){return t.handleScrollTo(t.presentationRef)},class:"presentation trek-option".concat(this.options.presentation.indicator?" selected-trek-option":"")},translate[state.language].options.presentation),this.options.description.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.descriptionRef)},class:"description trek-option".concat(this.options.description.indicator?" selected-trek-option":"")},translate[state.language].options.description),this.options.recommendations.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.recommendationRef)},class:"recommendations trek-option".concat(this.options.recommendations.indicator?" selected-trek-option":"")},translate[state.language].options.recommendations),this.options.sensitiveArea.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.sensitiveAreaRef)},class:"sensitive-areas trek-option".concat(this.options.sensitiveArea.indicator?" selected-trek-option":"")},translate[state.language].options.environmentalSensitiveAreas),this.options.informationPlaces.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.informationDeskRef)},class:"information-places trek-option".concat(this.options.informationPlaces.indicator?" selected-trek-option":"")},translate[state.language].options.informationPlaces),this.options.pois.visible&&h("a",{onClick:function(){return t.handleScrollTo(t.poiRef)},class:"pois trek-option".concat(this.options.pois.indicator?" selected-trek-option":"")},translate[state.language].options.pois),h("span",{class:"indicator-selected-trek-option",style:{transform:"translateX(".concat(this.handleIndicatorSelectedTrekOption(),")")}})),this.currentTrek&&h("div",{class:"trek-detail-container",ref:function(e){return t.trekDetailContainerRef=e}},h("div",{class:"images-container",ref:function(e){return t.presentationRef=e}},h("div",{class:"swiper swiper-images",ref:function(e){return t.swiperImagesRef=e}},h("div",{class:"swiper-wrapper"},this.currentTrek.attachments.filter((function(t){return t.type==="image"})).map((function(e){return h("div",{class:"swiper-slide"},h("img",{class:"image",src:e.url,loading:"lazy",onClick:function(){return t.handleFullscreen()}}))}))),h("div",{class:"swiper-pagination",ref:function(e){return t.paginationElImagesRef=e}}),h("div",{class:"swiper-button-prev",ref:function(e){return t.prevElImagesRef=e}}),h("div",{class:"swiper-button-next",ref:function(e){return t.nextElImagesRef=e}}))),h("div",{class:"name"},this.currentTrek.name),this.themes.length>0&&h("div",{class:"themes-container"},this.themes.map((function(t){return h("div",{class:"theme"},t.label)}))),h("div",{class:"sub-container"},h("div",{class:"icons-labels-container"},h("div",{class:"row"},h("div",{class:"icon-label difficulty"},((e=this.difficulty)===null||e===void 0?void 0:e.pictogram)&&h("img",{src:this.difficulty.pictogram}),(i=this.difficulty)===null||i===void 0?void 0:i.label),h("div",{class:"icon-label duration"},h("span",{class:"material-symbols material-symbols-outlined"},"timelapse"),formatDuration((n=this.currentTrek)===null||n===void 0?void 0:n.duration)),h("div",{class:"icon-label route"},((o=this.route)===null||o===void 0?void 0:o.pictogram)&&h("img",{src:this.route.pictogram}),(r=this.route)===null||r===void 0?void 0:r.route)),h("div",{class:"row"},h("div",{class:"icon-label length"},h("span",{class:"material-symbols material-symbols-outlined"},"open_in_full"),formatLength(this.currentTrek.length_2d)),h("div",{class:"icon-label ascent"},h("span",{class:"material-symbols material-symbols-outlined"},"moving"),formatAscent(this.currentTrek.ascent)),h("div",{class:"icon-label practice"},((a=this.practice)===null||a===void 0?void 0:a.pictogram)&&h("img",{src:this.practice.pictogram}),(s=this.practice)===null||s===void 0?void 0:s.name)))),h("div",{class:"divider"}),h("div",{class:"downloads-container"},h("div",{class:"download-title"},translate[state.language].downloads),h("div",{class:"links-container"},h("a",{href:"".concat(this.currentTrek.gpx)},h("span",{class:"material-symbols material-symbols-outlined"},"download"),"GPX"),h("a",{href:"".concat(this.currentTrek.kml)},h("span",{class:"material-symbols material-symbols-outlined"},"download"),"KML"),h("a",{href:"".concat(this.currentTrek.pdf)},h("span",{class:"material-symbols material-symbols-outlined"},"download"),"PDF"))),h("div",{class:"divider"}),this.currentTrek.description_teaser&&h("div",{class:"description-teaser",innerHTML:this.currentTrek.description_teaser}),this.currentTrek.ambiance&&h("div",{class:"ambiance",innerHTML:this.currentTrek.ambiance}),h("div",{class:"divider"}),this.hasStep&&h("div",{class:"step-container"},h("div",{class:"step-title"},"".concat(this.currentTrek.children.length," ").concat(translate[state.language].steps)),h("div",{class:"swiper swiper-step",ref:function(e){return t.swiperStepRef=e}},h("div",{class:"swiper-wrapper"},state.currentTrekSteps&&state.currentTrekSteps.map((function(e){return h("div",{class:"swiper-slide"},h("grw-trek-card",{"reset-store-on-disconnected":"false",key:"trek-".concat(e.id),trek:e,"is-large-view":false,"is-step":true,"color-primary-app":t.colorPrimaryApp,"color-on-surface":t.colorOnSurface,"color-secondary-container":t.colorSecondaryContainer,"color-on-secondary-container":t.colorOnSecondaryContainer,"color-surface-container-low":t.colorSurfaceContainerLow}))}))))),h("div",{class:"divider"}),this.currentTrek.description&&h("div",{class:"description-container",ref:function(e){return t.descriptionRef=e}},h("div",{class:"description-title"},translate[state.language].description),h("div",{class:"description",innerHTML:this.currentTrek.description})),this.currentTrek.departure&&h("div",{class:"departure-container"},h("div",{class:"departure-title"},translate[state.language].departure," : "),h("div",{innerHTML:this.currentTrek.departure})),this.currentTrek.arrival&&h("div",{class:"arrival-container"},h("div",{class:"arrival-title"},translate[state.language].arrival," : "),h("div",{innerHTML:this.currentTrek.arrival})),this.currentTrek.cities&&this.currentTrek.cities.length>0&&h("div",{class:"cities-container"},h("div",{class:"cities-title"},translate[state.language].cities," : "),h("div",{innerHTML:this.cities.join(", ")})),this.weather&&this.currentTrek.departure_city&&h("div",{class:"weather-container"},h("iframe",{height:"150",frameborder:"0",src:"https://meteofrance.com/widget/prevision/".concat(this.currentTrek.departure_city,"0#").concat(this.colorPrimaryApp)})),this.currentTrek.access&&h("div",null,h("div",{class:"divider"}),h("div",{class:"access-container"},h("div",{class:"access-title"},translate[state.language].roadAccess),h("div",{class:"access",innerHTML:this.currentTrek.access}))),this.currentTrek.public_transport&&h("div",null,h("div",{class:"divider"}),h("div",{class:"public-transport-container"},h("div",{class:"public-transport-title"},translate[state.language].transport),h("div",{class:"public-transport",innerHTML:this.currentTrek.public_transport}))),(this.currentTrek.advice||this.labels.length>0)&&h("div",null,h("div",{class:"divider"}),h("div",{class:"advice-container",ref:function(e){return t.recommendationRef=e}},h("div",{class:"advice-title"},translate[state.language].recommendations),this.currentTrek.advice&&h("div",{class:"current-advice-container"},h("span",{class:"material-symbols material-symbols-outlined"},"warning"),h("div",{class:"advice",innerHTML:this.currentTrek.advice})),this.labels.map((function(t){return h("div",{class:"label-container"},h("div",{class:"label-sub-container"},t.pictogram&&h("img",{src:t.pictogram}),h("div",{class:"label-name",innerHTML:t.name})),h("div",{class:"label-advice",innerHTML:t.advice}))})))),this.currentTrek.advised_parking&&h("div",null,h("div",{class:"divider"}),h("div",{class:"advised-parking-container",ref:function(e){return t.parkingRef=e}},h("div",{class:"advised-parking-title"},translate[state.language].recommendedParking),h("div",{class:"advised-parking",innerHTML:this.currentTrek.advised_parking}))),this.currentTrek.gear&&h("div",null,h("div",{class:"divider"}),h("div",{class:"gear-container"},h("div",{class:"gear-title"},translate[state.language].equipments),h("div",{class:"gear",innerHTML:this.currentTrek.gear}))),state.currentSensitiveAreas&&state.currentSensitiveAreas.length>0&&h("div",null,h("div",{class:"divider"}),h("div",{class:"sensitive-areas-container",ref:function(e){return t.sensitiveAreaRef=e}},h("div",{class:"sensitive-areas-title"},translate[state.language].environmentalSensitiveAreas),state.currentSensitiveAreas.map((function(t){return h("grw-sensitive-area-detail",{sensitiveArea:t})})))),state.currentInformationDesks&&state.currentInformationDesks.filter((function(e){return t.currentTrek.information_desks.includes(e.id)})).length>0&&h("div",null,h("div",{class:"divider"}),h("div",{class:"information-desks-container",ref:function(e){return t.informationDeskRef=e}},h("div",{class:"information-desks-title"},translate[state.language].informationPlaces),h("div",{class:"swiper swiper-information-desks",ref:function(e){return t.swiperInformationDesksRef=e}},h("div",{class:"swiper-wrapper"},state.currentInformationDesks.filter((function(e){return t.currentTrek.information_desks.includes(e.id)})).map((function(t){return h("div",{class:"swiper-slide"},h("grw-information-desk-detail",{informationDesk:t}))})))))),(this.currentTrek.disabled_infrastructure||this.accessibilities&&this.accessibilities.length>0||this.currentTrek.accessibility_level||this.currentTrek.accessibility_slope||this.currentTrek.accessibility_width||this.currentTrek.accessibility_signage||this.currentTrek.accessibility_covering||this.currentTrek.accessibility_exposure||this.currentTrek.accessibility_advice)&&h("div",null,h("div",{class:"divider"}),h("div",{class:"accessibilities-container"},h("div",{class:"accessibilities-title"},translate[state.language].accessibility),this.currentTrek.disabled_infrastructure&&h("div",{innerHTML:this.currentTrek.disabled_infrastructure}),h("div",{class:"accessibilities-content-container"},this.accessibilities.map((function(t){return h("div",{class:"accessibility-content-container"},h("img",{src:t.pictogram}),h("div",{innerHTML:t.name}))}))),this.currentTrek.accessibility_level&&h("div",{class:"accessibility-level-container"},h("div",{class:"accessibility-level-title"},translate[state.language].accessibilityLevel),h("div",{innerHTML:this.accessibilityLevel.name})),this.currentTrek.accessibility_slope&&h("div",{class:"accessibility-slope-container"},h("div",{class:"accessibility-slope-title"},translate[state.language].accessibilitySlope),h("div",{innerHTML:this.currentTrek.accessibility_slope})),this.currentTrek.accessibility_width&&h("div",{class:"accessibility-width-container"},h("div",{class:"accessibility-width-title"},translate[state.language].accessibilityWidth),h("div",{innerHTML:this.currentTrek.accessibility_width})),this.currentTrek.accessibility_signage&&h("div",{class:"accessibility-signage-container"},h("div",{class:"accessibility-signage-title"},translate[state.language].accessibilitySignage),h("div",{innerHTML:this.currentTrek.accessibility_signage})),this.currentTrek.accessibility_covering&&h("div",{class:"accessibility-covering-container"},h("div",{class:"accessibility-covering-title"},translate[state.language].accessibilityCovering),h("div",{innerHTML:this.currentTrek.accessibility_covering})),this.currentTrek.accessibility_exposure&&h("div",{class:"accessibility-exposure-container"},h("div",{class:"accessibility-exposure-title"},translate[state.language].accessibilityExposure),h("div",{innerHTML:this.currentTrek.accessibility_exposure})),this.currentTrek.accessibility_advice&&h("div",{class:"accessibility-advice-container"},h("div",{class:"accessibility-advice-title"},translate[state.language].accessibilityAdvices),h("div",{innerHTML:this.currentTrek.accessibility_advice})))),state.currentPois&&state.currentPois.length>0&&h("div",null,h("div",{class:"divider"}),h("div",{class:"pois-container",ref:function(e){return t.poiRef=e}},h("div",{class:"pois-title"},translate[state.language].pois(state.currentPois.length)),h("div",{class:"swiper swiper-pois",ref:function(e){return t.swiperPoisRef=e}},h("div",{class:"swiper-wrapper"},state.currentPois.map((function(t){return h("div",{class:"swiper-slide"},h("grw-poi-detail",{poi:t}))})))))),this.currentTrek.source&&this.currentTrek.source.length>0&&h("div",null,h("div",{class:"divider"}),h("div",{class:"source-container"},h("div",{class:"source-title"},translate[state.language].sources),this.sources.map((function(t){return h("div",{class:"source-sub-container"},t.pictogram&&h("img",{src:t.pictogram}),h("div",null,h("div",{class:"source-name",innerHTML:t.name}),h("a",{class:"source-advice",href:t.website,innerHTML:t.website})))})))),h("div",{class:"detail-bottom-space"})))};return t}();GrwTrekDetail.style=grwTrekDetailCss;var GrwTrekProvider=function(){function t(t){registerInstance(this,t);this.controller=new AbortController;this.signal=this.controller.signal;this.init={cache:"default",signal:this.signal};this.languages="fr";this.api=undefined;this.trekId=undefined}t.prototype.connectedCallback=function(){if(!state.api){state.api=this.api;state.languages=this.languages.split(",");state.language=state.languages[0]}this.handleTrek()};t.prototype.handleTrek=function(){var t=this;var e=[];e.push(!state.difficulties?fetch("".concat(state.api,"trek_difficulty/?language=").concat(state.language,"&fields=id,label,pictogram"),this.init):new Response("null"));e.push(!state.routes?fetch("".concat(state.api,"trek_route/?language=").concat(state.language,"&fields=id,route,pictogram"),this.init):new Response("null"));e.push(!state.practices?fetch("".concat(state.api,"trek_practice/?language=").concat(state.language,"&fields=id,name,pictogram"),this.init):new Response("null"));e.push(!state.themes?fetch("".concat(state.api,"theme/?language=").concat(state.language,"&fields=id,label,pictogram"),this.init):new Response("null"));e.push(!state.cities?fetch("".concat(state.api,"city/?language=").concat(state.language,"&fields=id,name&published=true&page_size=999"),this.init):new Response("null"));e.push(!state.accessibilities?fetch("".concat(state.api,"trek_accessibility/?language=").concat(state.language,"&fields=id,name,pictogram"),this.init):new Response("null"));Promise.all(__spreadArray(__spreadArray([],e,true),[fetch("".concat(this.api,"sensitivearea/?language=").concat(state.language,"&published=true&trek=").concat(this.trekId,"&fields=id,geometry,name,description,contact,info_url,period,practices"),this.init).then((function(t){if(t.ok){return t}else{throw new Error("Sentive area error")}})).catch((function(){return new Response("null")})),fetch("".concat(state.api,"label/?language=").concat(state.language,"&fields=id,name,advice,pictogram"),this.init),fetch("".concat(state.api,"source/?language=").concat(state.language,"&fields=id,name,website,pictogram"),this.init),fetch("".concat(state.api,"trek_accessibility_level/?language=").concat(state.language,"&fields=id,name"),this.init).catch((function(){return new Response("null")})),fetch("".concat(state.api,"poi/?language=").concat(state.language,"&trek=").concat(this.trekId,"&published=true&fields=id,name,description,attachments,type,geometry&page_size=999"),this.init),fetch("".concat(state.api,"poi_type/?language=").concat(state.language,"&fields=id,pictogram"),this.init),fetch("".concat(state.api,"informationdesk/?language=").concat(state.language,"&fields=id,name,description,type,phone,email,website,municipality,postal_code,street,photo_url,latitude,longitude&page_size=999"),this.init),fetch("".concat(state.api,"trek/").concat(this.trekId,"/?language=").concat(state.language,"&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,cities,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities,information_desks,children"),this.init)],false)).then((function(t){return Promise.all(t.map((function(t){return t.json()})))})).then((function(e){var i=e[0],n=e[1],o=e[2],r=e[3],a=e[4],s=e[5],l=e[6],c=e[7],h=e[8],u=e[9],p=e[10],d=e[11],f=e[12],m=e[13];return __awaiter(t,void 0,void 0,(function(){var t,e;return __generator(this,(function(_){switch(_.label){case 0:state.trekNetworkError=false;if(!(m.children.length>0))return[3,2];t=[];m.children.forEach((function(e){t.push(fetch("".concat(state.api,"trek/").concat(e,"/?language=").concat(state.language,"&published=true&fields=id,name,attachments,description,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,geometry,gpx,kml,pdf,parking_location,departure,departure_city,arrival,cities,ambiance,access,public_transport,advice,advised_parking,gear,labels,source,points_reference,disabled_infrastructure,accessibility_level,accessibility_slope,accessibility_width,accessibility_signage,accessibility_covering,accessibility_exposure,accessibility_advice,accessibilities,information_desks,children")))}));return[4,Promise.all(__spreadArray([],t,true)).then((function(t){return Promise.all(t.map((function(t){return t.json()})))}))];case 1:e=_.sent();state.currentTrekSteps=e;return[3,3];case 2:state.currentTrekSteps=null;_.label=3;case 3:if(i){state.difficulties=i.results}if(n){state.routes=n.results}if(o){state.practices=o.results.map((function(t){return Object.assign(Object.assign({},t),{selected:false})}))}if(r){state.themes=r.results}if(a){state.cities=a.results}if(s){state.accessibilities=s.results}if(l){state.currentSensitiveAreas=l.results}state.labels=c.results;state.sources=h.results;if(u){state.accessibilitiesLevel=u.results}state.currentPois=p.results;state.poiTypes=d.results;state.currentInformationDesks=f.results;state.currentTrek=m;return[2]}}))}))})).catch((function(){state.trekNetworkError=true}))};t.prototype.disconnectedCallback=function(){this.controller.abort();state.trekNetworkError=false};t.prototype.render=function(){return h(Host,null)};return t}();var grwTreksListCss='.material-symbols-outlined{font-variation-settings:"FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48}:host{font-family:"Roboto";width:100%;height:100%;overflow-y:auto}grw-trek-card{margin:0px 8px 8px 8px}.list-bottom-space{min-height:104px;height:104px;width:100%}.current-treks-within-bounds-length{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;margin:16px;color:var(--color-on-surface);font-size:22px;line-height:28px;font-weight:400}.treks-list-container{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:distribute;justify-content:space-around}';var GrwTreksList=function(){function t(t){registerInstance(this,t);this.step=10;this.shouldAddInfiniteScrollEvent=true;this.handleInfiniteScrollBind=this.handleInfiniteScroll.bind(this);this.treksToDisplay=[];this.colorPrimaryApp="#6b0030";this.colorOnSurface="#49454e";this.colorSecondaryContainer="#e8def8";this.colorOnSecondaryContainer="#1d192b";this.colorSurfaceContainerLow="#f7f2fa";this.isLargeView=false;this.resetStoreOnDisconnected=true}t.prototype.connectedCallback=function(){var t=this;this.handleInfiniteScrollEvent(true);if(state.currentTreks){this.treksToDisplay=__spreadArray([],state.currentTreks.slice(0,this.step),true)}onChange("currentTreks",(function(){t.handleInfiniteScrollEvent(true);t.element.scroll({top:0});if(state.currentTreks){t.treksToDisplay=__spreadArray([],state.currentTreks.slice(0,t.step),true)}}));onChange("treksWithinBounds",(function(){t.handleInfiniteScrollEvent(true);t.element.scroll({top:0});if(state.treksWithinBounds){t.treksToDisplay=__spreadArray([],state.treksWithinBounds.slice(0,t.step),true)}}))};t.prototype.handleInfiniteScroll=function(t){if(t.composedPath()[0].scrollTop+t.composedPath()[0].scrollHeight/2>=t.composedPath()[0].scrollHeight){if(this.treksToDisplay.length<state.treksWithinBounds.length){this.treksToDisplay=state.treksWithinBounds.slice(0,this.treksToDisplay.length+this.step>=state.treksWithinBounds.length?state.treksWithinBounds.length:this.treksToDisplay.length+this.step)}else{this.handleInfiniteScrollEvent(false)}}};t.prototype.handleInfiniteScrollEvent=function(t){if(t){if(this.shouldAddInfiniteScrollEvent){this.element.addEventListener("scroll",this.handleInfiniteScrollBind);this.shouldAddInfiniteScrollEvent=!t}}else{this.element.removeEventListener("scroll",this.handleInfiniteScrollBind);this.shouldAddInfiniteScrollEvent=!t}};t.prototype.disconnectedCallback=function(){if(this.resetStoreOnDisconnected){reset()}this.handleInfiniteScrollEvent(false)};t.prototype.render=function(){var t=this;return h(Host,{style:{"--color-primary-app":this.colorPrimaryApp}},state.treksWithinBounds&&h("div",{class:"current-treks-within-bounds-length"},"".concat(state.treksWithinBounds.length," ").concat(state.treksWithinBounds.length>1?translate[state.language].treks:translate[state.language].trek)),h("div",{class:"treks-list-container"},this.treksToDisplay.map((function(e){return h("grw-trek-card",{"reset-store-on-disconnected":"false",key:"trek-".concat(e.id),trek:e,"is-large-view":t.isLargeView,"color-primary-app":t.colorPrimaryApp,"color-on-surface":t.colorOnSurface,"color-secondary-container":t.colorSecondaryContainer,"color-on-secondary-container":t.colorOnSecondaryContainer,"color-surface-container-low":t.colorSurfaceContainerLow})}))),h("div",{class:"list-bottom-space"}))};Object.defineProperty(t.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();GrwTreksList.style=grwTreksListCss;var GrwTreksProvider=function(){function t(t){registerInstance(this,t);this.controller=new AbortController;this.signal=this.controller.signal;this.init={cache:"default",signal:this.signal};this.languages="fr";this.api=undefined;this.inBbox=undefined;this.cities=undefined;this.districts=undefined;this.structures=undefined;this.themes=undefined;this.portals=undefined;this.routes=undefined;this.practices=undefined}t.prototype.connectedCallback=function(){if(!state.api){state.api=this.api;state.languages=this.languages.split(",");state.language=state.languages[0]}this.handleTreks()};t.prototype.disconnectedCallback=function(){this.controller.abort();state.treksNetworkError=false};t.prototype.handleTreks=function(){var t="".concat(this.api,"trek/?language=").concat(state.language,"&published=true");this.inBbox&&(t+="&in_bbox=".concat(this.inBbox));this.cities&&(t+="&cities=".concat(this.cities));this.districts&&(t+="&districts=".concat(this.districts));this.structures&&(t+="&structures=".concat(this.structures));this.themes&&(t+="&themes=".concat(this.themes));this.portals&&(t+="&portals=".concat(this.portals));this.routes&&(t+="&routes=".concat(this.routes));this.practices&&(t+="&practices=".concat(this.practices));t+="&fields=id,name,attachments,description_teaser,difficulty,duration,ascent,length_2d,practice,themes,route,departure,departure_city,departure_geom,cities,accessibilities,labels,districts&page_size=999";Promise.all([fetch("".concat(state.api,"trek_difficulty/?language=").concat(state.language,"&fields=id,label,pictogram"),this.init),fetch("".concat(state.api,"trek_route/?language=").concat(state.language,"&fields=id,route,pictogram"),this.init),fetch("".concat(state.api,"trek_practice/?language=").concat(state.language,"&fields=id,name,pictogram"),this.init),fetch("".concat(state.api,"theme/?language=").concat(state.language,"&fields=id,label,pictogram"),this.init),fetch("".concat(state.api,"city/?language=").concat(state.language,"&fields=id,name&published=true&page_size=999"),this.init),fetch("".concat(state.api,"trek_accessibility/?language=").concat(state.language,"&fields=id,name,pictogram&published=true&page_size=999"),this.init),fetch("".concat(state.api,"label/?language=").concat(state.language,"&fields=id,name,advice,pictogram&published=true&page_size=999"),this.init),fetch("".concat(state.api,"district/?language=").concat(state.language,"&fields=id,name&published=true&page_size=999"),this.init),fetch(t,this.init)]).then((function(t){return Promise.all(t.map((function(t){return t.json()})))})).then((function(t){var e=t[0],i=t[1],n=t[2],o=t[3],r=t[4],a=t[5],s=t[6],l=t[7],c=t[8];state.treksNetworkError=false;state.difficulties=e.results;state.routes=i.results;state.practices=n.results.map((function(t){return Object.assign(Object.assign({},t),{selected:false})}));state.themes=o.results;state.cities=r.results;state.accessibilities=a.results;state.durations=[{id:1,name:"0 - 1h",minValue:0,maxValue:1,selected:false},{id:2,name:"1 - 2h",minValue:1,maxValue:2,selected:false},{id:3,name:"2 - 5h",minValue:2,maxValue:5,selected:false},{id:4,name:"5 - 10h",minValue:5,maxValue:10,selected:false}];state.lengths=[{id:1,name:"0 - 5km",minValue:0,maxValue:5e3,selected:false},{id:2,name:"5 - 10km",minValue:5e3,maxValue:1e4,selected:false},{id:3,name:"10 - 15km",minValue:1e4,maxValue:15e3,selected:false},{id:4,name:"15 - 50km",minValue:15e3,maxValue:5e4,selected:false}];state.elevations=[{id:1,name:"0 - 500m",minValue:0,maxValue:500,selected:false},{id:2,name:"500m - 1km",minValue:500,maxValue:1e3,selected:false}];state.currentTreks=c.results;state.treksWithinBounds=c.results;state.labels=s.results;state.districts=l.results;state.treks=c.results})).catch((function(){return state.treksNetworkError=true}))};t.prototype.render=function(){return h(Host,null)};return t}();export{GrwFilter as grw_filter,GrwMap as grw_map,GrwSearch as grw_search,GrwTrekDetail as grw_trek_detail,GrwTrekProvider as grw_trek_provider,GrwTreksList as grw_treks_list,GrwTreksProvider as grw_treks_provider};
|
|
14
14
|
//# sourceMappingURL=grw-filter_7.entry.js.map
|