PageSourceSearch

https://www.autopass.no/dist/client/assets/nt.component-B3HGrLDU.js

js autopass.no collected 2026-09-24 18:35:17 UTC 27,554 bytes, 16 lines download raw bytes

1import{d as ge,i as be,a as ve,I as _e,b as Ce}from"./init-cookiebot-handler-ByHXqHSt.js";import{p as $}from"./entry-client-G8kwQhxa.js";import{i as Te,a as we}from"./init-imageCarousel-Ctvr-EMs.js";class ye{constructor(){this.readSettings()}readSettings(){this._settings=window.settingsFromServer}getSettings(){return this._settings??{}}}const Ee=t=>{t.Map.include({isFullscreen:function(){return this._isFullscreen||!1},toggleFullscreen:function(e){var n=this.getContainer();this.isFullscreen()?e&&e.pseudoFullscreen?this._disablePseudoFullscreen(n):document.exitFullscreen?document.exitFullscreen().then(()=>{this._handleFullscreenExited()}):document.mozCancelFullScreen?(document.mozCancelFullScreen(),this._handleFullscreenExited()):document.webkitCancelFullScreen?(document.webkitCancelFullScreen(),this._handleFullscreenExited()):document.msExitFullscreen?(document.msExitFullscreen(),this._handleFullscreenExited()):this._disablePseudoFullscreen(n):e&&e.pseudoFullscreen?this._enablePseudoFullscreen(n):n.requestFullscreen?n.requestFullscreen().then(()=>{this._handleFullscreenEntered()}):n.mozRequestFullScreen?(n.mozRequestFullScreen(),this._handleFullscreenEntered()):n.webkitRequestFullscreen?(n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT),this._handleFullscreenEntered()):n.msRequestFullscreen?(n.msRequestFullscreen(),this._handleFullscreenEntered()):this._enablePseudoFullscreen(n)},_enablePseudoFullscreen:function(e){t.DomUtil.addClass(e,"leaflet-pseudo-fullscreen"),this._setFullscreen(!0),this.fire("fullscreenchange"),this._handleFullscreenEntered()},_disablePseudoFullscreen:function(e){t.DomUtil.removeClass(e,"leaflet-pseudo-fullscreen"),this._setFullscreen(!1),this.fire("fullscreenchange"),this._handleFullscreenExited()},_setFullscreen:function(e){this._isFullscreen=e;var n=this.getContainer();e?t.DomUtil.addClass(n,"leaflet-fullscreen-on"):t.DomUtil.removeClass(n,"leaflet-fullscreen-on")},_onFullscreenChange:function(){var e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement;e===this.getContainer()&&!this._isFullscreen?(this._setFullscreen(!0),this.fire("fullscreenchange")):e!==this.getContainer()&&this._isFullscreen&&(this._setFullscreen(!1),this.fire("fullscreenchange"))},_handleFullscreenEntered:function(){this.invalidateSize(),this.fire("fullscreenchanged",{fullscreenEntered:!0})},_handleFullscreenExited:function(){this.invalidateSize(),this.fire("fullscreenchanged",{fullscreenEntered:!1})}}),t.Map.mergeOptions({fullscreenControl:!0}),t.Map.addInitHook(function(){var e;if("onfullscreenchange"in document?e="fullscreenchange":"onmozfullscreenchange"in document?e="mozfullscreenchange":"onwebkitfullscreenchange"in document?e="webkitfullscreenchange":"onmsfullscreenchange"in document&&(e="MSFullscreenChange"),e){var n=t.bind(this._onFullscreenChange,this);this.whenReady(function(){t.DomEvent.on(document,e,n)}),this.on("unload",function(){t.DomEvent.off(document,e,n)})}})},Pe=(t,e,n,s,u)=>{t.Control.MobileFullscreen=t.Control.extend({options:{position:"bottomleft",content:'<div class="fullscreen-open"></div>',title:{false:e.openFullScreenTitle,true:e.closeFullScreenTitle},buttonText:{false:e.openFullScreenButtonText,true:e.closeFullScreenButtonText}},onAdd:function(g){const r=t.DomUtil.create("div","leaflet-control-fullscreen leaflet-bar leaflet-control");return this.button=t.DomUtil.create("button","leaflet-control-fullscreen-button leaflet-bar-part leaflet-control-zoom-fullscreen",r),t.DomUtil.create("div","button-text",this.button),t.DomUtil.create("div","fullscreen-open",this.linkpan),this._map=g,this._map.on("fullscreenchange",this._onfullscreenchange,this),this._toggleTitle(),t.DomEvent.on(this.button,"click",this._click,this),r},_click:function(g){t.DomEvent.stopPropagation(g),t.DomEvent.preventDefault(g),this._map.toggleFullscreen(this.options)},_onfullscreenchange:function(){this._toggleTitle(),this._map.isFullscreen()?n.enable(this._map):(n.disable(this._map),u(),s())},_toggleTitle:function(){this.button.title=this.options.title[this._map.isFullscreen()],this.button.firstElementChild.innerText=this.options.buttonText[this._map.isFullscreen()]}}),t.control.mobileFullscreen=function(g){return new t.Control.MobileFullscreen(g)}};/*!
2 * swiped-events.js - v@version@
3 * Pure JavaScript swipe events
4 * https://github.com/john-doherty/swiped-events
5 * @inspiration https://stackoverflow.com/questions/16348031/disable-scrolling-when-touch-moving-certain-element
6 * @author John Doherty <www.johndoherty.info>
7 * @license MIT
8 */(function(t,e){typeof t.CustomEvent!="function"&&(t.CustomEvent=function(b,x){x=x||{bubbles:!1,cancelable:!1,detail:void 0};var v=e.createEvent("CustomEvent");return v.initCustomEvent(b,x.bubbles,x.cancelable,x.detail),v},t.CustomEvent.prototype=t.Event.prototype),e.addEventListener("touchstart",R,!1),e.addEventListener("touchmove",B,!1),e.addEventListener("touchend",M,!1);var n=null,s=null,u=null,g=null,r=null,T=null;function M(b){if(T===b.target){var x=parseInt(U(T,"data-swipe-threshold","20"),10),v=parseInt(U(T,"data-swipe-timeout","500"),10),f=Date.now()-r,c="",C=b.changedTouches||b.touches||[];if(Math.abs(u)>Math.abs(g)?Math.abs(u)>x&&f<v&&(u>0?c="swiped-left":c="swiped-right"):Math.abs(g)>x&&f<v&&(g>0?c="swiped-up":c="swiped-down"),c!==""){var E={dir:c.replace(/swiped-/,""),touchType:(C[0]||{}).touchType||"direct",xStart:parseInt(n,10),xEnd:parseInt((C[0]||{}).clientX||-1,10),yStart:parseInt(s,10),yEnd:parseInt((C[0]||{}).clientY||-1,10)};T.dispatchEvent(new CustomEvent("swiped",{bubbles:!0,cancelable:!0,detail:E})),T.dispatchEvent(new CustomEvent(c,{bubbles:!0,cancelable:!0,detail:E}))}n=null,s=null,r=null}}function R(b){b.target.getAttribute("data-swipe-ignore")!=="true"&&(T=b.target,r=Date.now(),n=b.touches[0].clientX,s=b.touches[0].clientY,u=0,g=0)}function B(b){if(!(!n||!s)){var x=b.touches[0].clientX,v=b.touches[0].clientY;u=n-x,g=s-v}}function U(b,x,v){for(;b&&b!==e.documentElement;){var f=b.getAttribute(x);if(f)return f;b=b.parentNode}return v}})(window,document);class ke{constructor(e){this.teasersData=e,this.teaserDataLastIndex=e?e.length-1:0,document.addEventListener("swiped",n=>this.swiped(n))}setUpdateTeaserView(e){this.updateTeaserView=e}setCurrent(e,n,s){this.currentId=n;const u=this.getPrevious(),g=this.getNext(),r=document.createElement("div");r.appendChild(this.getWrappedDiv(u.Html,["previous","custom-popup__item"]));const T=s?this.getWrappedDiv(e):this.getWrappedDiv(e).firstChild;T.classList.add("custom-popup__item"),r.appendChild(T),r.appendChild(this.getWrappedDiv(g.Html,["next","custom-popup__item"])),this.currentView=r.innerHTML}getView(){return this.currentView}getPrevious(){const e=this.teasersData.findIndex(n=>n.Id===this.currentId);return e>0?this.teasersData[e-1]:this.teasersData[this.teaserDataLastIndex]}getNext(){const e=this.teasersData.findIndex(n=>n.Id===this.currentId);return e<this.teaserDataLastIndex?this.teasersData[e+1]:this.teasersData[0]}swiped(e){const n=e.target.closest(".custom-popup");!n||n.firstChild.classList.contains("road-popup")||(e.detail.dir==="right"&&this.updateTeaser(this.getPrevious()),e.detail.dir==="left"&&this.updateTeaser(this.getNext()))}updateTeaser(e){this.setCurrent(e.Html,e.Id,!0),this.updateTeaserView(this.getView())}getWrappedDiv(e,n){const s=document.createElement("div");return s.innerHTML=e,n&&n.forEach(u=>s.classList.add(u)),s}}class Fe{constructor(e,n,s,u){this.map=e,this.Leaflet=n,this.teaserControl=s,this.isMobile=u,this.popupAndParents=[],this.closablePopupOpen=!1}setupOpenAndClose(){this.map.on("popupopen",e=>this.onPopopen(e,this.isMobile)).on("popupclose",this.onPopupClose),document.addEventListener("keyup",e=>{e.key==="Escape"&&this.closablePopupOpen&&this.closeAll()})}onPopopen(e,n){if(e.popup.options.mobileDependent&&n()){if(this.teaserControl.addTo(this.map),e.popup.marker)this.Leaflet._teaserCarousel.setUpdateTeaserView(this.teaserControl.update),this.Leaflet._teaserCarousel.setCurrent(e.popup._content.outerHTML,e.popup.marker.options.id),this.teaserControl.update(this.Leaflet._teaserCarousel.getView());else{const s=document.createElement("div");s.innerHTML=e.popup._content.outerHTML,s.classList.add("custom-popup__item"),s.classList.add("road-popup"),this.teaserControl.update(s.outerHTML)}e.popup._container.style="display:none"}else{this.teaserControl.remove();const s=e.popup._container.querySelector(".leaflet-popup-close-button");e.popup._container.append(s),this.closablePopupOpen=!0}e.popup._container.setAttribute("tabindex","0"),e.popup._container.focus(),e.popup.marker?e.popup.marker.popupOpen=!0:e.popup._source&&(e.popup._source.popupOpen=!1)}onPopupClose(e){this.closablePopupOpen=!1,e.popup.marker?e.popup.marker.popupOpen=!1:e.popup._source&&(e.popup._source.popupOpen=!1)}createRoadPopup(e,n,s,u,g){const r=this.isMobile()?n:s,T=new this.Leaflet.CustomPopup({className:"custom-popup",closeButtonText:u,mobileDependent:!0}).setContent(this.popupContent(r)),M=this.Leaflet.rectangle(e.getBounds(),{color:"#00000000",weight:0,opacity:0}
8).addTo(this.map);return(!this.isMobile()||!g||this.map.isFullscreen&&this.map.isFullscreen())&&M.bindPopup(T),this.popupAndParents.push({parent:M,popup:T}),{parent:M,popup:T}}createWinterRoadPopup(e,n,s){const u=new this.Leaflet.CustomPopup({className:"custom-popup",closeButtonText:s,mobileDependent:!1}).setContent(n);u.marker=e,e.bindPopup(u),this.popupAndParents.push({parent:e,popup:u})}createPoisPopup(e,n,s){e.views&&(this.Leaflet._teaserCarousel=new ke(e.views),e.views&&e.views.forEach(u=>{const g=n.find(r=>r.options.id===u.id);if(g){const r=new this.Leaflet.CustomPopup({className:"custom-popup",closeButtonText:s,mobileDependent:!0}).setContent(this.popupContent(u.html));r.marker=g,this.isMobile()||g.bindPopup(r),this.popupAndParents.push({parent:g,popup:r})}}))}popupContent(e){const n=document.createElement("div");return n.innerHTML=e,n}bindAllPopups(){this.popupAndParents.forEach(e=>{e.parent.bindPopup(e.popup)})}closeAndUnbindALL(){this.popupAndParents.forEach(e=>{e.parent.closePopup(),e.parent.unbindPopup()})}closeAll(){this.popupAndParents.forEach(e=>{e.parent.closePopup()})}}const De=t=>{t.Control.EnableMapButton=t.Control.extend({options:{position:"bottomright"},onAdd:function(e){const n=t.DomUtil.create("div","leaflet-control-activate-map leaflet-bar leaflet-control");this.button=t.DomUtil.create("button","leaflet-control-activate-map-button leaflet-bar-part leaflet-control-zoom-activate-map",n);const s=t.DomUtil.create("span","button-text",this.button);return s.innerText=this.options.buttonText,this._map=e,this._disableMap(),t.DomEvent.on(this.button,"click",this._click,this),n},_click:function(e){t.DomEvent.stopPropagation(e),t.DomEvent.preventDefault(e),this._enableMap(),e.currentTarget.remove()},_disableMap:function(){this.options.mapToggler&&this.options.mapToggler.disable(this._map)},_enableMap:function(){this.options.mapToggler&&this.options.mapToggler.enable(this._map)}}),t.Control.enableMapButton=function(e){return new t.Control.EnableMapButton(e)}},xe=t=>{t.Control.DesktopFullscreen=t.Control.extend({options:{position:"bottomright"},onAdd:function(e){const n=t.DomUtil.create("div","leaflet-control-fullscreen-desktop leaflet-bar leaflet-control");return this.button=t.DomUtil.create("button","leaflet-control-fullscreen-button leaflet-bar-part leaflet-control-zoom-fullscreen-desktop leaflet-map-button",n),this._map=e,this._map.on("fullscreenchange",this._onfullscreenchange,this),this._map.on("fullscreenchanged",this._onfullscreenchanged,this),this._toggleButton(),t.DomEvent.on(this.button,"click",this._click,this),n},_click:function(e){t.DomEvent.stopPropagation(e),t.DomEvent.preventDefault(e),this._map.toggleFullscreen(this.options)},_onfullscreenchange:function(){this._toggleButton()},_onfullscreenchanged:function(e){this.options.zoomToFit&&this.options.zoomToFit(e.fullscreenEntered||!1)},_toggleButton:function(){const e=this._map.isFullscreen();this.button.title=this.options.title[e],this.button.style.backgroundImage=`url(${this.options.icon[e]})`}}),t.Control.desktopFullscreen=function(e){return new t.Control.DesktopFullscreen(e)}},Ie=(t={})=>({disable:e=>{e.dragging.disable(),e.touchZoom.disable(),e.doubleClickZoom.disable(),e.scrollWheelZoom.disable(),e.boxZoom.disable(),e.keyboard.disable(),e.tap&&e.tap.disable(),t.birdWatchingAreas&&t.birdWatchingAreas.remove(),t.zoomButtons&&t.zoomButtons.remove(),t.locateControl&&t.locateControl.remove(),t.fullscreenControl&&t.fullscreenControl.remove(),t.mapPopup&&t.mapPopup().closeAndUnbindALL()},enable:e=>{e.dragging.enable(),e.touchZoom.enable(),e.doubleClickZoom.enable(),e.scrollWheelZoom.enable(),e.boxZoom.enable(),e.keyboard.enable(),e.tap&&e.tap.enable(),t.zoomButtons&&t.zoomButtons.addTo(e),t.locateControl&&t.locateControl.addTo(e),t.fullscreenControl&&t.fullscreenControl.addTo(e),t.mapPopup&&t.mapPopup().bindAllPopups(),t.birdWatchingAreasToggle&&t.birdWatchingAreasToggle._popupContainer&&t.birdWatchingAreasToggle._popupContainer.classList.add("custom-modal--visible"),e.getContainer().focus()}}),Me=(t,e={heading:"Fuglekikking",body:"Velg fuglefilteret for å vise de forskjellige fuglkikkerskjulene i Varanger.",close:"Lukk"})=>{t.Control.ToggleBirdWatchingAreasButton=t.Control.extend({options:{position:F()?"topleft":"bottomright"},_show:!0,_button:null,_container:null,onAdd:function(n){const s=t.DomUtil.create("div","leaflet-control-toggle-layer-map leaflet-bar leaflet-control"),u=t.DomUtil.create("div","custom-modal-wrapper",s),g=t.DomUtil.create("button","leaflet-control-bird-watching leaflet-map-button",u);this.span=t.DomUtil.create("span","sr-only",this.button);const r=t.DomUtil.create("div","popup-wrapper custom-modal",u),T=t.DomUtil.create("div","modal__header",r),M=t.DomUtil.create("h2","modal__heading",T),R=t.DomUtil.create("p","",r),B=t.DomUtil.create("button","",r);
8B.type="button",B.classList.add("modal__close");const U=t.DomUtil.create("span","",B);return U.innerText=e.close,M.innerText=e.heading,R.innerText=e.body,this.span.innerText=this.options.buttonText,t.DomEvent.on(B,"click",b=>{b.preventDefault(),b.stopPropagation(),t.DomUtil.remove(r)}),t.DomEvent.on(g,"click",this._click,this),this._button=g,this._map=n,this._popupContainer=r,s},_click:function(n){n&&(t.DomEvent.stopPropagation(n),t.DomEvent.preventDefault(n)),this._show?(this._show=!1,this.options.addLayer(),this._button.classList.add("is-active")):(this._show=!0,this.options.removeLayer(),this._button.classList.remove("is-active"))}}),t.Control.toggleBirdWatchingAreasButton=function(n){return new t.Control.ToggleBirdWatchingAreasButton(n)}},oe=1,ie=3,se=4,Se=1e3,Ae=()=>$("marker_click");function Oe(t,e){let n=null,s=null;const u=r=>{n||(n={source:r,initialZoom:t.getZoom()}),globalThis.clearTimeout(s),s=globalThis.setTimeout(()=>{n=null},Se)};t.getContainer().addEventListener("wheel",()=>u("wheel"),{passive:!0}),e.getContainer()?.addEventListener("click",()=>u("control"),!0),t.on("zoomend",()=>{if(!n)return;const{source:r,initialZoom:T}=n,M=t.getZoom();n=null,globalThis.clearTimeout(s),M!==T&&(r==="wheel"?$("zoom"):$(M>T?"zoom_in":"zoom_out"))}),t.on("dragend",()=>$("pan")),t.on("fullscreenchanged",()=>$("fullscreen"))}const Le=function(){const t=document.querySelectorAll("[data-mapdata]");if(t){var e=[];return t.forEach(function(n){e.push(JSON.parse(n.textContent))}),e}},F=()=>window.matchMedia("(max-width: 768px)").matches,Be=function(){const t=new ye().getSettings().mapData||Le(),e=window.L,n=document.body.classList.contains("birdWatchingAreaPage"),s={},u=[],g=[];let r;const T=()=>e.icon({iconUrl:"/ui/icons/episerver/map-winter.svg",iconSize:[36,36],iconAnchor:[18,18]}),M=(v,f,c,C,E,I)=>{const P=[f.iconCoordinate.latitude,f.iconCoordinate.longitude],w=e.marker(P,{icon:c,title:C,alt:C,opacity:1,riseOnHover:!0}).addTo(v);if(w.popupOpen=!1,w.on("click",()=>$("marker_click")),"content"in document.createElement("template")){const k=document.getElementById("winterPopup").content.cloneNode(!0);k.querySelector("[data-closed-date]").innerText=f.closedDate,k.querySelector("[data-closed-date]").setAttribute("datetime",f.closedUniversalTime),k.querySelector("[data-calculated-open-date]").innerText=f.calculatedOpenDate,k.querySelector("[data-calculated-open-date]").setAttribute("datetime",f.calculatedOpenUniversalTime);const y=document.createElement("div");y.appendChild(k),r.createWinterRoadPopup(w,y,E,I)}return w},R=(v,f,c,C,E,I)=>new Promise((P,w)=>{const D=f.nationalRoadDatabaseId;if(!c){console.warn("Missing map base uri"),w();return}if(!D){console.warn("Map id to the nvdb"),w();return}c=`${window.location.origin}/${c}?id=${D}`;const k=s[f.nationalRoadDatabaseId];fetch(c,{cache:"default"}).then(y=>y.json()).then(y=>{U(v,y,f,C,E,I),k&&k.forEach(S=>{v.removeLayer(S)}),P()})}),B=(v,f,c,C,E,I,P)=>C?c?new Promise((w,D)=>{const k=`${window.location.origin}/${C}?id=${c}&cultureName=${document.documentElement.lang}`;fetch(k,{cache:"default"}).then(y=>y.json()).then(y=>{if(y.items.length>0){y.items.forEach(z=>{b(v,f,z,E,I,P)});const S=document.querySelector("[data-winter-warning]");if(S){S.style.display="block";const z=S.querySelector("[data-winter-warning-closed]");z&&(z.innerText=y.items[0].closedDate,z.setAttribute("datetime",y.items[0].closedUniversalTime));const N=S.querySelector("[data-winter-warning-calculated-open]");N&&(N.innerText=y.items[0].calculatedOpenDate,N.setAttribute("datetime",y.items[0].calculatedOpenUniversalTime))}}w(y.items.length>0)}).catch(()=>D())}):Promise.reject():(console.warn("Missing winter data base uri"),Promise.reject()),U=(v,f,c,C,E,I)=>{const P=[];let{coordinates:w}=f;f.type.toLowerCase()==="linestring"&&(w=[f.coordinates]);for(let D=0;D<w.length;D++)P.push(x(w[D],v,c,C,E,I));s[c.nationalRoadDatabaseId]=P},b=(v,f,c,C,E,I)=>{const P=JSON.parse(c.data);let{type:w,coordinates:D}=P;w.toLowerCase()==="linestring"&&(D=[P.coordinates]);for(let k=0;k<D.length;k++)e.polyline(D[k],{className:"winter-road"}).addTo(v);M(f,c,T(),E,C,I)},x=(v,f,c,C,E,I)=>{const P=e.polyline(v).addTo(f);if(!c.isCurrent){const w=r.createRoadPopup(P,c.popUpHtmlMobile,c.popUpHtml,C,I);E&&E.extend(w.parent.getBounds())}return P};if(t&&e){const v=(function(){e.CustomPopup=e.Popup.extend({_initLayout:function(){const p="leaflet-popup",o=this._container=e.DomUtil.create("div",`${p} ${this.options.className||""} leaflet-zoom-animated`);if(!(this.options.mobileDependent&&F())){const d=this._closeButton=e.DomUtil.create("button",`${p}-close-button`,o),_=this._closeButton=e.DomUtil.create("span",`${p}-close-button__text`,d);_.innerHTML=this.options.closeButtonText,e.DomEvent.on(d,"click",this.close,this)}const i=this._wrapper=e.DomUtil.create("div",`${p}-content-wrapper`,o);this._contentNode=e.DomUtil.create("div",`${p}-content`,i),e.DomEvent.disableClickPropagation(i).disableScrollPropagation(this._contentNode).on(i,"contextmenu",e.DomEvent.stopPropagation),this._tipContainer=e.DomUtil.create("div",`${p}-tip-container`,o),this._tip=e.DomUtil.create("div",`${p}-tip`,this._tipContainer)}});const c={}
8,C="https://nvdbcache.geodataonline.no/arcgis/rest/services/Trafikkportalen/GeocacheTrafikkJPG/MapServer/tile/{z}/{y}/{x}",E="EPSG:25833",I="+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs",P=[-25e5,9045984],w=[21674.7100160867,10837.35500804335,5418.677504021675,2709.3387520108377,1354.6693760054188,677.3346880027094,338.6673440013547,169.33367200067735,84.66683600033868,42.33341800016934,21.16670900008467,10.583354500042335,5.291677250021167,2.6458386250105836,1.3229193125052918,.6614596562526459,.33072982812632296,.16536491406316148],D=function(){return new e.Proj.CRS(E,I,{origin:P,resolutions:w})},k=()=>e.layerGroup(),y=p=>{const o=e.markerClusterGroup({spiderfyOnMaxZoom:!1,showCoverageOnHover:!1,zoomToBoundsOnClick:!1,autoPan:!0,maxClusterRadius:p.maxClusterRadius,iconCreateFunction:function(i){return e.divIcon({html:"<div><span>"+i.getChildCount()+"</span></div>",className:"custom-cluster",iconSize:e.point(40,40)})}});return o.on("clusterclick",function(i){$("marker_click"),i.layer.zoomToBounds({padding:[50,50]})}),o},S=function(p,o,i,d){let _="/ui/icons/episerver/";i?_+="map-circle-startStop.svg":p?_+="map-marker-default.svg":_+="map-circle.svg";const h=p?[30,40]:[24,24];return new e.DivIcon({className:`turistroad-poi ${p?"turistroad-poi--current":""}`,html:`
9                        <img class="turistroad-poi__img" src=${_} width="${h[0]}" height="${h[1]}" alt="">
10                        <span class="turistroad-poi__title turistroad-poi__title--${o} ${i?"turistroad-poi__title--startStop":""}">
11                            ${d}
12                        </span>
13                    `,iconSize:h,iconAnchor:p?[15,20]:[12,12]})},z=1,N=2,re=3,le={[z]:"/ui/icons/episerver/map-wc.svg",[N]:"/ui/icons/episerver/map-parking.svg",[re]:["/ui/icons/episerver/map-parking.svg","/ui/icons/episerver/map-wc.svg"]},ae=function(p,o){const i=le[p.facilityType],_=(Array.isArray(i)?i:i?[i]:[]).map(a=>`<img class="turistroad-poi__facility-icon" src="${a}" width="20" height="20" alt="">`).join(""),h=p.title?`<span class="turistroad-poi__title turistroad-poi__title--${o}">${_}${p.title}</span>`:"";return new e.DivIcon({className:"turistroad-poi turistroad-poi--facility",html:`
14                        <img class="turistroad-poi__img" src="/ui/icons/episerver/map-circle.svg" width="24" height="24" alt="">
15                        ${h}
16                    `,iconSize:[24,24],iconAnchor:[12,12]})},ce=(p,o)=>{!o.facilityPoints||o.facilityPoints.length===0||o.facilityPoints.forEach(i=>{const d=i.sideToShowLabel===oe?"left":i.sideToShowLabel===ie?"above":i.sideToShowLabel===se?"under":"right",_=ae(i,d);e.marker([i.latitude,i.longitude],{icon:_,keyboard:!1,interactive:!1,title:i.title,alt:i.title}).addTo(p)})},Y=(p,o,i,d)=>{if(!o)return[];const _=[];return o.forEach(h=>{const a=h.sideToShowLabel===oe?"left":h.sideToShowLabel===ie?"above":h.sideToShowLabel===se?"under":"right",O=i(h,a),H=[h.latitude,h.longitude],l=e.marker(H,{icon:O,keyboard:d(h),title:h.title,alt:h.title,opacity:1,id:h.areaId,isCurrent:h.isCurrent,margin:h.margin,riseOnHover:!0}).addTo(p);l.popupOpen=!1,l.on("click",Ae),_.push(l)}),_},ue=(p,o)=>{if(!o.endPoints)return;const i=Y(p,o.endPoints,(d,_)=>S(d.isCurrent,_,!0,d.title),()=>!1);u.push(...i)},pe=(p,o)=>{if(!o.pointsOfInterest)return;const i=Y(p,o.pointsOfInterest,(a,O)=>S(a.isCurrent,O,!1,a.title),a=>!a.isCurrent);let d=o.pathToPointsOfInterest;d=d.charAt(d.length-1)==="/"?d:`${d}/`;const _=o.pointsOfInterest.filter(a=>!a.isCurrent).map(a=>`ids=${a.areaId}`).join("&"),h=`${window.location.origin}/${d}?${_}&isMobile=${F()}&cultureName=${document.documentElement.lang}`;fetch(h,{cache:"default"}).then(a=>a.json()).then(a=>{r.createPoisPopup(a,i,o.closeButtonText)}),u.push(...i)},de=(p,o)=>{if(!o.pointsOfInterest)return;const i=Y(p,o.pointsOfInterest,(a,O)=>S(a.isCurrent,O,!1,a.title),a=>!a.isCurrent);let d=o.pathToPointsOfInterest;d=d.charAt(d.length-1)==="/"?d:`${d}/`;const _=o.pointsOfInterest.filter(a=>!a.isCurrent).map(a=>`ids=${a.areaId}`).join("&"),h=`${window.location.origin}/${d}?${_}&isMobile=${F()}&cultureName=${document.documentElement.lang}`;fetch(h,{cache:"default"}).then(a=>a.json()).then(a=>{r.createPoisPopup(a,i,o.closeButtonText)}),g.push(...i)},he=(p,o,i,d)=>i.touristPage?B(p,o,i.touristPage,i.pathToWinterData,i.closeButtonText,i.closedForWinterText,d):Promise.resolve(!1);return c.init=({element:p,data:o})=>{const i=!!o.pointsOfInterest&&o.pointsOfInterest.length>0,d={crs:D(),zoom:7,center:[0,0],continuousWorld:!0,worldCopyJump:!1,zoomControl:!1,attributionControl:!1,tap:!1,zoomSnap:F()||!i?0:.25,scrollWheelZoom:!F()||!i,dragging:!F()||!i},_=e.control.zoom({position:window.innerWidth<1024&&o.isOverViewMap||F()?"topleft":"bottomright",zoomInTitle:o.zoomInTitle,zoomOutTitle:o.zoomOutTitle});Ee(e),xe(e),De(e);const h={...o,pointsOfInterest:o.pointsOfInterest.filter(m=>m.areaType===1)};let a=new e.layerGroup;h.pointsOfInterest&&h.pointsOfInterest.length>0&&(h.pointsOfInterest.length>1&&(a=y(h)),de(a,h));const O=me();let H;const l=e.map(p,d),q=e.control();q.setPosition("bottomright"),q.onAdd=function(){return this._div=e.DomUtil.create("div","custom-popup"),this.update=m=>this._div.innerHTML=m,e.DomEvent.disableClickPropagation(this._div),this._div},r=new Fe(l,e,q,F),r.setupOpenAndClose(),Me(e,o.birdWatchingTexts);const X=e.Control.toggleBirdWatchingAreasButton({addLayer:()=>{l.addLayer(a),l.removeLayer(W)},removeLayer:()=>{l.removeLayer(a),l.addLayer(W)},buttonText:o.showBirdWatchingAreasText});if(i){H=Ie({mapPopup:()=>r,birdWatchingAreasToggle:X});const m=e.Control.enableMapButton({buttonText:o.enableMapNavigationText,mapToggler:H});l.addControl(m),_.addTo(l),o.showLocate&&O.addTo(l),(!F()||!o.isOverViewMap)&&e.Control.desktopFullscreen({title:{false:o.openFullScreenTitle,true:o.closeFullScreenTitle},icon:{false:"/ui/icons/expand.svg",true:"/ui/icons/compress.svg"},zoomToFit:V}).addTo(l),a&&h.pointsOfInterest&&h.pointsOfInterest.length>
160&&(X.addTo(l),n&&(l._layersMaxZoom=19,l.addLayer(a)))}else _&&_.addTo(l),O&&O.addTo(l),r&&r.bindAllPopups();Oe(l,_),i&&F()&&(Pe(e,o,H,V,()=>l.removeControl(q)),e.control.mobileFullscreen().addTo(l)),new e.tileLayer(C,{maxZoom:15,minZoom:F()?2:!i&&screen.height>=1300?4:3}).addTo(l);const K={...o,pointsOfInterest:o.pointsOfInterest.filter(m=>m.areaType===0)},Q=e.layerGroup(),Z=e.layerGroup();var j=k(),W=y(K);ue(j,o),pe(W,K);const J=e.latLngBounds();l.addLayer(Z),l.addLayer(j),n||l.addLayer(W);const ee=e.layerGroup();ce(ee,o),l.addLayer(ee),o.roads.forEach(m=>{m.dataLowResolution&&U(Z,JSON.parse(m.dataLowResolution),m,o.closeButtonText,J,i)}),V();const te=[];o.roads.forEach(m=>{te.push(R(Z,m,o.serverPathToData,o.closeButtonText,J,i))}),Promise.allSettled(te).then(()=>{he(Q,W,o,i).then(m=>{m&&(l.removeLayer(Z),l.removeLayer(j),l.removeLayer(W),l.addLayer(Q),l.addLayer(Z),l.addLayer(j),l.addLayer(W),V())}).catch(m=>{console.log(m)})});function G(m,L){const A=Math.round((L+Number.EPSILON)*10)/10;A>.9&&!F()?l.setView(m.getCenter(),A):l.fitBounds(m)}function fe(m){let L;return m.every(A=>A.options.isCurrent?(L=A.getLatLng().toBounds(A.options.margin),!1):!0),L??e.featureGroup(m).getBounds()}function V(m){const L=m===!0?0:o.zoomLevel;i?l.whenReady(()=>{const A=fe(n?g:u);F()?G(A,L):G(A.pad(o.poiMargin),L)}):l.whenReady(()=>{if(F())G(J,L);else{const ne=[[72.185713,3.4991709999999996],[56.95851,32.168594]];G(e.latLngBounds(ne),L)}})}function me(){return e.control.LocateBase=new e.Control.Locate,e.Control.LocateControl=e.Control.Locate.extend({_onZoomEnd:function(){if(e.control.LocateBase._onZoomEnd(),this._event&&this._ignoreEvent){const m=[...u];m.push(this._event.sourceTarget),l.fitBounds(e.featureGroup(m).getBounds().pad(.1))}}}),new e.Control.LocateControl({position:F()?"topleft":"bottomright",strings:{title:o.locateTitle,popup:o.locatePopupText}})}},c})(),f=function(c){const C=c.identifier?'[data-map="'+c.identifier+'"]':"[data-map]";
16v.init({element:document.querySelector(C),data:c})};Array.isArray(t)?t.forEach(f):f(t)}};ge(Be);function Ue(){document.querySelectorAll("._jsHideOnClick").forEach(t=>{t.addEventListener("click",()=>{t.style.display="none"})})}function ze(){const t=document.querySelector("._jsFocusOnNewHtmxContent");if(!t)return;const e=+t.getAttribute("data-focus-index");document.body.addEventListener("htmx:afterSwap",function(n){n.target&&n.target.children.length>=e+1&&n.target.children[e].scrollIntoView()})}Te();we();Ue();ze();be();ve();_e();Ce();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.