1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8450],{9101:(e,t,a)=>{"use strict";a.d(t,{default:()=>i});var r=a(95155),s=a(34220);function i(e){let{children:t}=e;return(0,r.jsx)(s.x,{reducedMotion:"user",children:t})}},15060:(e,t,a)=>{"use strict";a.d(t,{VisitedSitesProvider:()=>o,y:()=>c});var r=a(95155),s=a(12115),i=a(60080);let n="heritage-navigator-visited",l=(0,s.createContext)(void 0);function o(e){let{children:t}=e,[a,o]=(0,s.useState)({}),[c,d]=(0,s.useState)(null),u=(0,s.useRef)({});(0,s.useEffect)(()=>{try{let e=localStorage.getItem(n);if(e){let t=JSON.parse(e);u.current=t,o(t)}}catch(e){console.error("Error reading visited sites from localStorage:",e),u.current={},o({})}},[]);let h=(0,s.useCallback)(e=>{try{localStorage.setItem(n,JSON.stringify(e))}catch(e){console.error("Error saving visited sites to localStorage:",e)}},[]),m=(0,s.useCallback)((e,t,a)=>{var r;if(null==(r=u.current[e])?void 0:r[t])return;let s={...u.current,[e]:{...u.current[e],[t]:new Date().toISOString()}};u.current=s,o(s),h(s),d({cityId:e,siteId:t}),(0,i.s)("site_mark_visited",{city_id:e,site_id:t,source:a,stamp_count:Object.keys(s[e]).length})},[h]),f=(0,s.useCallback)((e,t)=>{var a;if(!(null==(a=u.current[e])?void 0:a[t]))return;let r={...u.current[e]};delete r[t];let s={...u.current,[e]:r};0===Object.keys(r).length&&delete s[e],u.current=s,o(s),h(s)},[h]),p=(0,s.useCallback)((e,t)=>{var r;return!!(null==(r=a[e])?void 0:r[t])},[a]),x=(0,s.useCallback)(e=>{var t;return Object.entries(null!=(t=a[e])?t:{}).map(e=>{let[t,a]=e;return{siteId:t,visitedAt:a}}).sort((e,t)=>t.visitedAt.localeCompare(e.visitedAt))},[a]);return(0,r.jsx)(l.Provider,{value:{isVisited:p,markVisited:m,unmarkVisited:f,getVisitedForCity:x,lastStamped:c},children:t})}function c(){let e=(0,s.useContext)(l);if(void 0===e)throw Error("useVisitedSites must be used within a VisitedSitesProvider");return e}},21239:(e,t,a)=>{Promise.resolve().then(a.bind(a,41359)),Promise.resolve().then(a.bind(a,42862)),Promise.resolve().then(a.bind(a,95736)),Promise.resolve().then(a.bind(a,91334)),Promise.resolve().then(a.bind(a,27462)),Promise.resolve().then(a.bind(a,91e3)),Promise.resolve().then(a.bind(a,9101)),Promise.resolve().then(a.bind(a,82596)),Promise.resolve().then(a.bind(a,44383)),Promise.resolve().then(a.bind(a,83469)),Promise.resolve().then(a.bind(a,84652)),Promise.resolve().then(a.bind(a,7768)),Promise.resolve().then(a.bind(a,92244)),Promise.resolve().then(a.bind(a,88872)),Promise.resolve().then(a.bind(a,15060)),Promise.resolve().then(a.bind(a,74412))},24923:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var r=a(95155);function s(e){let{message:t}=e;return(0,r.jsx)("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:t})}},27462:(e,t,a)=>{"use strict";a.d(t,{default:()=>f});var r=a(95155),s=a(12115),i=a(21873),n=a(41407),l=a(71408),o=a(30871),c=a(74412),d=a(56),u=a(96915),h=a(24923),m=a(60080);function f(){let{translate:e}=(0,c.ot)(),t=(0,n.I)(),[a,f]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>f((0,d.K0)()&&null===(0,d.Bu)()&&!(0,u.St)());e();let t=(0,d.r5)(e),a=(0,u.aT)(e);return()=>{t(),a()}},[]);let p=e=>{(0,m.s)("gps_explanation",{response:e}),f(!1),(0,d.tM)(e)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(h.A,{message:a?"".concat(e("gps.title"),". ").concat(e("gps.body")):""}),(0,r.jsx)(l.N,{children:a&&(0,r.jsxs)(o.P.div,{initial:t?{opacity:0}:{opacity:0,y:-16},animate:{opacity:1,y:0},exit:t?{opacity:0}:{opacity:0,y:-16},transition:{duration:t?.15:.25},role:"dialog","aria-modal":"false","aria-labelledby":"gps-consent-title",className:"fixed left-2 right-2 z-[60] md:left-auto md:right-4 md:max-w-sm top-[calc(var(--inset-top)+0.5rem)] transition-[top] duration-300 ease-in-out rounded-xl bg-white shadow-[0_4px_24px_rgba(0,0,0,0.2)] p-4",children:[(0,r.jsxs)("div",{className:"flex gap-3",children:[(0,r.jsx)(i.A,{className:"h-6 w-6 shrink-0 text-primary","aria-hidden":"true"}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h2",{id:"gps-consent-title",className:"font-semibold text-gray-900",children:e("gps.title")}),(0,r.jsx)("p",{className:"mt-1 text-sm leading-relaxed text-gray-700",children:e("gps.body")})]})]}),(0,r.jsxs)("div",{className:"mt-3 flex gap-2",children:[(0,r.jsx)("button",{onClick:()=>p("declined"),className:"flex-1 min-h-[44px] rounded-lg px-3 text-sm font-medium text-gray-700 hover:bg-gray-100 active:scale-[0.98] transition-all",children:e("gps.decline")}),(0,r.jsx)("button",{onClick:()=>p("granted"),className:"flex-1 min-h-[44px] rounded-lg bg-primary px-3 text-sm font-semibold text-white hover:bg-primary/90 active:scale-[0.98] transition-all",children:e("gps.allow")})]})]})})]})}},37232:(e,t,a)=>{"use strict";a.d(t,{Tj:()=>r});let r={primary:"#182635",secondary:"#E4D2A3",accent:"#A53C24",border:"#6D8FA3",background:{primary:"#F8F5EF",secondary:"#EAE6DB"},text:{dark:"#1F2B38",light:"#FFFFFF",muted:"#4A6A84"},periods:{medieval:"#8B5CF6",roman:"#EF4444",islamic:"#10B981"}}},39266:(e,t,a)=>{"use strict";a.d(t,{$:()=>c});var r=a(95155),s=a(12115),i=a(32467),n=a(83101),l=a(64269);let o=(0,n.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-white shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),c=s.forwardRef((e,t)=>
1{let{className:a,variant:s,size:n,asChild:c=!1,...d}=e,u=c?i.DX:"button";return(0,r.jsx)(u,{className:(0,l.cn)(o({variant:s,size:n,className:a})),ref:t,...d})});c.displayName="Button"},39858:(e,t,a)=>{"use strict";a.d(t,{N:()=>i,VV:()=>n});let r="heritage-navigator:chunk-recovery:v1",s="__hn_chunk_reload";function i(e,t,a){return t(),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){try{return{storage:window.sessionStorage,location:window.location,now:Date.now}}catch(e){return null}}();if(!function(e){let t=e instanceof Error?[e.name,e.message,e.stack].filter(Boolean).join("\n"):"string"==typeof e?e:e&&"object"==typeof e?["name","message","stack","source","src"].map(t=>e[t]).filter(e=>"string"==typeof e).join("\n"):String(null!=e?e:"");return!!t&&(/ChunkLoadError/i.test(t)||/Loading (?:CSS )?chunk\s+[^\s]+ failed/i.test(t)||/Failed to load (?:Next\.js )?chunk/i.test(t)||/Failed to fetch dynamically imported module/i.test(t)||/Importing a module script failed/i.test(t)||/error loading dynamically imported module/i.test(t)||/Cannot (?:read properties|read property) of undefined \(reading ['"]?call['"]?\)/i.test(t)||/undefined is not an object \(evaluating ['"][\w$]+\[[\w$]+\]\.call['"]\)/i.test(t)||/\/_next\/static\/(?:chunks|css)\//i.test(t)&&/(?:load|failed|unexpected token|syntaxerror)/i.test(t))}(e))return"not-chunk-error";if(!t)return"unavailable";try{if(t.storage.getItem(r))return"already-attempted";t.storage.setItem(r,String(t.now()));let e=new URL(t.location.href);return e.searchParams.set(s,String(t.now())),t.location.replace(e.toString()),"reloading"}catch(e){return"unavailable"}}(e,a)}function n(){try{let e=new URL(window.location.href);if(!e.searchParams.has(s))return;e.searchParams.delete(s),window.history.replaceState(window.history.state,"",e.toString())}catch(e){}}},41359:(e,t,a)=>{"use strict";a.d(t,{default:()=>J});var r=a(95155),s=a(12115),i=a(20063),n=a(67909),l=a(64269);function o(e){let{title:t,className:a,showLogo:s,cityId:i,hideTitleInCenter:n,hideOnMobile:o}=e,c=!n&&!s;return(0,r.jsxs)("div",{className:(0,l.cn)("flex items-center justify-center",a),style:{height:"30px"},children:[c&&(0,r.jsx)("span",{className:(0,l.cn)("font-sans text-white text-xl font-medium lg:text-2xl lg:font-normal leading-tight whitespace-nowrap overflow-hidden text-ellipsis tracking-wide",o&&"hidden lg:inline"),children:t}),(!c||c&&o)&&(0,r.jsx)("div",{className:"lg:hidden",style:{minWidth:"1px"}})]})}var c=a(85203),d=a.n(c);function u(e){let{onClick:t,children:a,ariaLabel:s,isActive:i=!1,className:n,ariaCurrent:l,ariaPressed:o}=e,c=d()("p-2 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-text-light",{"bg-accent text-white":i,"hover:bg-background-primary/10":!i},n);return(0,r.jsx)("button",{onClick:t,"aria-label":s,"aria-current":l,"aria-pressed":o,className:c,children:a})}var h=a(86651),m=a(66955),f=a(38707),p=a(49215),x=a(79397),g=a(17181),v=a(35951),w=a(47937),b=a(9540),y=a(74412);function j(e){let{showSearchDesktop:t,showFilterDesktop:a,showMapDesktop:i,showTimelineDesktop:n,showShareDesktop:l,showLayersDesktop:o,showSearchMobileTopRight:c,showFilterMobileTopRight:j,showMapMobileTopRight:N,showTimelineMobileTopRight:k,showShareMobileTopRight:C,showLayersMobileTopRight:F,showSearchDesktopTopRight:S,showFilterDesktopTopRight:E,showMapDesktopTopRight:A,showTimelineDesktopTopRight:P,showRoutesDesktopTopRight:T,showStoriesDesktopTopRight:I,showShareDesktopTopRight:L,showLayersDesktopTopRight:R,showHamburgerTopRight:W,isFilterActive:_,onSearchClick:O,onFilterClick:M,onMapClickMobile:B,onMapClickDesktop:D,onTimelineClick:z,onRoutesClick:U,onStoriesClick:V,onShareClick:H,onLayersClick:$,onHamburgerClick:J}=e,{translate:q}=(0,y.ot)(),[X,G]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{G(!0)},[]),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1 text-white flex-shrink-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 md:hidden",children:[c&&(0,r.jsx)(u,{onClick:O,ariaLabel:q("header.search"),children:(0,r.jsx)(h.A,{className:"h-6 w-6"})}),j&&(0,r.jsxs)("div",{className:"relative",children:[X&&_&&(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border-2 border-white animate-filter-pulse pointer-events-none"}),(0,r.jsx)(u,{onClick:M,ariaLabel:q("header.filter"),isActive:X&&_,className:X&&_?"!bg-[#A53C24] border-2 border-white":"",children:(0,r.jsx)(m.A,{className:d()("h-6 w-6",{"text-white":X&&_})})})]}),N&&(0,r.jsx)(u,{onClick:B,ariaLabel:q("header.map"),children:(0,r.jsx)(f.A,{className:"h-6 w-6"})}
1),k&&(0,r.jsx)(u,{onClick:z,ariaLabel:q("header.timeline"),children:(0,r.jsx)(p.A,{className:"h-6 w-6"})}),F&&(0,r.jsx)(u,{onClick:$,ariaLabel:q("header.layers"),children:(0,r.jsx)(x.A,{className:"h-6 w-6"})}),C&&(0,r.jsx)(u,{onClick:H,ariaLabel:q("header.share"),children:(0,r.jsx)(g.A,{className:"h-6 w-6"})})]}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-2",children:[S&&(0,r.jsx)(u,{onClick:O,ariaLabel:q("header.search"),className:"p-1",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(h.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.search")})]})}),E&&(0,r.jsxs)("div",{className:"relative",children:[X&&_&&(0,r.jsx)("div",{className:"absolute inset-0 rounded-full border-2 border-white animate-filter-pulse pointer-events-none"}),(0,r.jsx)(u,{onClick:M,ariaLabel:q("header.filter"),isActive:X&&_,className:X&&_?"p-1 !bg-[#A53C24] border-2 border-white":"p-1",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(m.A,{className:d()("h-5 w-5",{"text-white":X&&_})}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.filter")})]})})]}),P&&(0,r.jsx)(u,{onClick:z,ariaLabel:q("header.timeline"),className:"p-1",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(p.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.timeline")})]})}),A&&(0,r.jsx)(u,{onClick:D,ariaLabel:q("header.map"),className:"p-1",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(f.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.map")})]})}),T&&(0,r.jsx)(u,{onClick:U,ariaLabel:q("header.routes"),className:"p-1",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(v.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.routes")})]})}),I&&(0,r.jsx)(u,{onClick:V,ariaLabel:q("header.stories"),className:"p-1",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(w.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.stories")})]})}),R&&(0,r.jsx)(u,{onClick:$,ariaLabel:q("header.layers"),className:"p-1",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(x.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.layers")})]})}),L&&(0,r.jsx)(u,{onClick:H,ariaLabel:q("header.share"),className:"p-1",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(g.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.share")})]})})]}),W&&(0,r.jsxs)(u,{onClick:J,ariaLabel:q("header.menu"),className:"p-1",children:[(0,r.jsx)(b.A,{className:"h-6 w-6 md:hidden"}),(0,r.jsxs)("div",{className:"hidden md:flex flex-col items-center",children:[(0,r.jsx)(b.A,{className:"h-5 w-5"}),(0,r.jsx)("span",{className:"font-sans text-xs mt-0.5 text-[#FFFFFFB3]",children:q("header.menu")})]})]})]})}var N=a(52619),k=a.n(N),C=a(65993),F=a(27937),S=a(90368),E=a(39266),A=a(47226);function P(e){let{showOnDesktop:t=!1,showOnMobile:a=!1,showBackButtonOnMobile:i=!1,currentCityName:n,currentSiteName:l,currentPeriodName:o,currentRouteName:c,language:d,cityId:u,siteId:h,periodId:m,pathname:f,onBackClick:p}=e,{translate:x}=(0,y.ot)(),g=(0,A.U)(3e3),v=s.useMemo(()=>{let e=[],t=d?"/".concat(d):"/",a=x("header.home");if(e.push({name:"string"==typeof a?a:"Forside",url:t,position:1}),u){let a=x("header.cities");if(e.push({name:"string"==typeof a?a:"Byer",url:t,position:2}),n&&e.push({name:n,url:"".concat(t,"/").concat(u),position:3}),f.includes("/timeline")){let a=x("header.timeline");e.push({name:"string"==typeof a?a:"Tidslinje",url:"".concat(t,"/").concat(u,"/timeline"),position:e.length+1})}else if(f.endsWith("/map")){let a=x("header.map");e.push({name:"string"==typeof a?a:"Kort",url:"".concat(t,"/").concat(u,"/map"),position:e.length+1})}else if(f.includes("/links")){let a=x("site.links.title");e.push({name:"string"==typeof a?a:"Links",url:"".concat(t,"/").concat(u,"/links"),position:e.length+1})}else if(f.includes("/route/")){let a=x("routes.title");if(e.push({name:"string"==typeof a?a:"Routes",url:"".concat(t,"/").concat(u,"/routes"),position:e.length+1}),c){let a=f.split("/")[3];e.push({name:c,url:"".concat(t,"/").concat(u,"/route/").concat(a),position:e.length+1})}}else if(f.endsWith("/routes")){let a=x("routes.title");e.push({name:"string"==typeof a?a:"Routes",url:"".concat(t,"/").concat(u,"/routes"),position:e.length+1})}else if(f.endsWith("/stories")){let a=x("stories.title");e.push({name:"string"==typeof a?a:"Stories",url:"".concat(t,"/").concat(u,"/stories"),position:e.length+1})}else if(f.endsWith("/passport")){let a=x("passport.title");e.push({name:"string"==typeof a?a:"Passport",url:"".concat(t,"/").concat(u,"/passport"),position:e.length+1})}else h&&l?e.push({name:l,url:"".concat(t,"/").concat(u,"/site/").concat(h),position:e.length+1}):m&&o&&e.push({name:o,url:"".concat(t,"/").concat(u,"/period/").concat(m),position:e.length+1})}return e},[d,u,n,l,o,c,h,m,f,x]),w=v[v.length-1],b=v.length>1?v[v.length-2]:null,[j,N]=s.useState(null);return(s.useEffect(()=>{v.length>0&&N({"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:v.filter(e=>e.name&&e.url).map((e,t)=>({"@type":"ListItem",position:e.position,name:e.name,item:"".concat(window.location.origin).concat(e.url)}))})},[v]),v.length<=1)?null:(0,r.jsxs)(r.Fragment,{children:[t&&(0,r.jsx)("nav",{"aria-label":"Br\xf8dkrummesti",className:"hidden md:flex items-center justify-start min-w-0",children:(0,r.jsx)("ol",{className:"flex items-center gap-1.5 py-2 pr-2 pl-4 max-w-none min-w-0",children:v.map((e,t)=>{let a=t===v.length-1,s=1===t;return(0,r.jsxs)("li",{className:"flex items-center gap-1.5 ".concat(a?"min-w-0":"flex-shrink-0"),children:[0===t?(0,r.jsxs)(k(),{href:e.url,prefetch:g,"aria-label":e.name,className:"group flex items-center flex-shrink-0 rounded-md transition-transform duration-75 ease-in-out active:scale-95 hover:bg-background-primary/10 p-1",children:[(0,r.jsx)(C.A,{className:"h-5 w-5 text-white"}),(0,r.jsx)("span",{className:"sr-only",children:e.name})]}):a?(0,r.jsx)("span",{"aria-current":"page",className:"font-sans font-semibold text-white truncate",style:{fontSize:"clamp(1.1rem, 1.2vw + 0.5rem, 1.5rem)",letterSpacing:"0.005em"},children:e.name}):(0,r.jsx)(k(),{href:e.url,prefetch:g,className:"font-sans text-lg font-medium flex-shrink-0 text-[#FFFFFFB3] hover:text-white transition-colors ".concat(s?"hide-mobile":""),children:e.name}),!a&&(0,r.jsx)(F.A,{className:"h-4 w-4 flex-shrink-0 text-white/60 ".concat(s?"hide-mobile":""),"aria-hidden":"true"})]},e.position)})})}),a&&!i&&(0,r.jsx)("nav",{"aria-label":"Br\xf8dkrummesti",className:"flex items-center md:hidden",children:(0,r.jsxs)("ol",{className:"flex items-center gap-1",children:[(0,r.jsx)("li",{children:(0,r.jsxs)(k(),{href:v[0].url,prefetch:g,"aria-label":v[0].name,className:"group flex items-center p-2 rounded-md transition-transform duration-75 ease-in-out active:scale-95 hover:bg-background-primary/10",children:[(0,r.jsx)(C.A,{className:"h-5 w-5 text-white flex-shrink-0"}),(0,r.jsx)("span",{className:"sr-only",children:v[0].name})]})}),v.length>1&&(0,r.jsx)("li",{children:(0,r.jsx)(F.A,{className:"h-4 w-4 text-white/60 flex-shrink-0","aria-hidden":"true"})}),v.length>1&&(0,r.jsx)("li",{children:(0,r.jsx)("span",{"aria-current":"page",className:"font-sans font-medium text-white truncate max-w-[120px]",style:{fontSize:"clamp(1.15rem, 2.5vw + 0.3rem, 1.35rem)"},children:w.name})})]})}),i&&b&&(0,r.jsx)("div",{className:"flex items-center md:hidden",children:(0,r.jsxs)(E.$,{variant:"ghost",onClick:p,className:"text-white hover:bg-white/20 flex items-center px-2","aria-label":"".concat("string"==typeof x("header.backTo")?x("header.backTo"):"Tilbage til"," ").concat(b.name),children:[(0,r.jsx)(S.A,{className:"h-6 w-6 mr-1"}),(0,r.jsx)("span",{className:"font-sans text-lg font-medium truncate max-w-[calc(100vw-180px)]",children:b.name})]})}),j&&(0,r.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(j)}})]})}var T=a(30940);function I(e){let{activeTab:t=null,hidden:a=!1,hrefs:s,hiddenTabs:i=[]}=e,{translate:n}=(0,y.ot)(),l=(0,A.U)(3e3),o=d()("fixed bottom-0 left-0 right-0 z-50 flex items-center justify-around ga
1p-1 bg-primary text-white px-2 pt-2 md:hidden","transition-transform duration-300 ease-in-out",{"translate-y-full":a}),c=[{key:"list",label:n("header.listView"),Icon:T.A},{key:"map",label:n("header.map"),Icon:f.A},{key:"timeline",label:n("header.timeline"),Icon:p.A},{key:"routes",label:n("header.routes"),Icon:v.A},{key:"stories",label:n("header.stories"),Icon:w.A}].filter(e=>!i.includes(e.key));return(0,r.jsx)("nav",{"aria-label":n("header.bottomNav"),className:o,inert:a,style:{paddingBottom:"env(safe-area-inset-bottom)"},children:c.map(e=>{let{key:a,label:i,Icon:n}=e,o=t===a;return(0,r.jsx)(k(),{href:s[a],prefetch:l,"aria-label":i,"aria-current":o?"page":void 0,className:"p-1 w-16 h-16 flex items-center justify-center rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-text-light hover:bg-background-primary/10",children:(0,r.jsxs)("div",{className:d()("flex flex-col items-center justify-center",o?"text-secondary":"text-white"),children:[(0,r.jsx)(n,{className:"h-6 w-6"}),(0,r.jsx)("span",{className:d()("text-xs mt-0.5",{"font-semibold":o}),children:i})]})},a)})})}var L=a(37232),R=a(68276),W=a(7768),_=a(84652),O=a(88872),M=a(65229);function B(e){let{onClick:t,isVisible:a,isMobileLayout:s}=e,{translate:i}=(0,y.ot)(),n="header.clearFilters",l="header.clearAllFiltersAria",o="string"==typeof i(n)?i(n):"Ryd filtre",c="string"==typeof i(l)?i(l):"Ryd alle filtre",u=d()("flex items-center justify-center font-semibold rounded-full shadow-md focus:outline-none focus:ring-2 focus:ring-white focus:ring-inset","bg-accent text-white",{"text-sm py-2 px-4 h-10 min-w-[120px] w-3/4 max-w-[280px]":s,"text-[15px] py-1 px-5 h-8 min-w-[120px] w-max max-w-[220px]":!s},a?"animate-fade-slide-in":"animate-fade-out-fast opacity-0 pointer-events-none"),h=d()("z-50",{"sticky w-full left-0 right-0 flex justify-center top-[56px]":s,"absolute left-1/2 -translate-x-1/2 top-[72px]":!s});return(0,r.jsx)("div",{className:h,children:(0,r.jsxs)("button",{onClick:t,"aria-label":c,className:u,tabIndex:a?0:-1,children:[(0,r.jsx)(M.A,{size:s?16:14,className:"mr-2 flex-shrink-0"}),(0,r.jsx)("span",{className:"truncate",children:o})]})})}var D=a(79071),z=a(98502),U=a(92244);let V=(0,n.default)(()=>Promise.all([a.e(5730),a.e(7817),a.e(4089),a.e(6937)]).then(a.bind(a,26937)),{loadableGenerated:{webpack:()=>[26937]},ssr:!1}),H=(0,n.default)(()=>a.e(1520).then(a.bind(a,11520)),{loadableGenerated:{webpack:()=>[11520]},ssr:!1}),$=(0,n.default)(()=>Promise.all([a.e(5730),a.e(7817),a.e(4277),a.e(4089),a.e(7414)]).then(a.bind(a,47414)),{loadableGenerated:{webpack:()=>[47414]},ssr:!1});function J(){let e=(0,i.usePathname)(),t=(0,i.useRouter)(),{language:n,setLanguage:l}=(0,W.o)(),{translate:c}=(0,y.ot)(),{toggleFilterPanel:d,isFilterPanelOpen:u,isFilterActive:h,resetFilters:m}=(0,_.U)(),{pageTitle:f}=(0,O.y)(),[p,x]=(0,s.useState)(null),[g,v]=(0,s.useState)(null),[w,b]=(0,s.useState)(!1),[N,k]=(0,s.useState)(!1),[C,F]=(0,s.use
1State)(!1),[S,E]=(0,s.useState)(!1);N&&!C&&F(!0),u&&!S&&E(!0);let[A,T]=(0,s.useState)(!1),{immersive:M}=(0,U.S)(),J=A||M,q=(0,s.useRef)(0),[X,G]=(0,s.useState)(!1),[K,Y]=(0,s.useState)(!1);(0,s.useEffect)(()=>{Y(!0)},[]);let Q=(0,s.useRef)(0);(0,s.useEffect)(()=>{Q.current+=1},[e]);let Z=e;Z==="/".concat(n)?Z="/":Z.startsWith("/".concat(n,"/"))&&(Z=Z.substring(n.length+1));let ee="/about-navigator"===Z,et="/install"===Z,ea="/terms"===Z,er="/privacy"===Z,es=Z.includes("/site/")&&Z.endsWith("/research"),ei=Z.includes("/period/")&&Z.endsWith("/research");Z.endsWith("/links");let en=Z.includes("/site/")||Z.includes("/period/")||Z.includes("/route/")||Z.includes("/list/"),el=ee||et||ea||er||es||ei,eo=(0,z.uH)(Z),ec=(0,D.J)(eo),ed=(null==ec?void 0:ec.walkCount)===0,eu=(null==ec?void 0:ec.storyCount)===0;(0,s.useEffect)(()=>{(async()=>{if(eo&&(!p||p.id!==eo))try{let e=await fetch("/api/cities/".concat(encodeURIComponent(eo)));if(!e.ok)throw Error("City request failed: ".concat(e.status));x(await e.json())}catch(e){console.error("Error fetching city in AppHeader:",e),x(null)}})()},[eo,p]),(0,s.useEffect)(()=>{(async()=>{if(!eo||!Z.startsWith("/".concat(eo,"/period/"))||ei)return v(null);let e=Z.split("/")[3];if(!e)return v(null);try{let{getPeriods:t}=await Promise.all([a.e(5730),a.e(7817),a.e(4089)]).then(a.bind(a,44089)),r=(await t(eo,n)).find(t=>t.id===e);v(r||null)}catch(e){console.error("Error fetching period in AppHeader:",e),v(null)}})()},[Z,eo,n,ei]),(0,s.useEffect)(()=>{G(window.innerWidth>=1024);let e=()=>{Z.startsWith("/".concat(eo,"/site/"))||Z.startsWith("/".concat(eo,"/period/"))||Z.startsWith("/".concat(eo,"/timeline"))||Z.startsWith("/".concat(eo,"/map"))||Z.startsWith("/".concat(eo,"/route"))?G(window.innerWidth>=1024):G(!1)};return window.addEventListener("resize",e),e(),()=>window.removeEventListener("resize",e)},[Z,eo]);let eh=(0,s.useMemo)(()=>(function(e,t){let a=null,r=0,s=function(){for(var s=arguments.length,i=Array(s),n=0;n<s;n++)i[n]=arguments[n];let l=Date.now(),o=t-(l-r);o<=0||o>t?(a&&(clearTimeout(a),a=null),r=l,e.apply(this,i)):a||(a=setTimeout(()=>{r=Date.now(),a=null,e.apply(this,i)},o))};return s.cancel=()=>{a&&(clearTimeout(a),a=null)},s})(()=>{{let e=window.scrollY;e>q.current&&e>80?T(!0):T(!1),q.current=e<=0?0:e}},100),[]);(0,s.useEffect)(()=>(window.addEventListener("scroll",eh),()=>{eh.cancel(),window.removeEventListener("scroll",eh)}),[eh]);let em="",ef=!1,ep=!1,ex=!1,eg=!1,ev=!1,ew=!1,eb=!1,ey=!1,ej=!1,eN=!1,ek=!1,eC=!1,eF=!1,eS=!1,eE=!1,eA=!1,eP=!1,eT=!1,eI=!1,eL=!1,eR=!1,eW="/"===Z&&!eo,e_=p?(0,R.bT)(p.translations,n,"name"):void 0,eO=("/"===Z||Z==="/".concat(eo))&&!!eo;eW?(el=!0,ef=!0):"/"===Z||Z==="/".concat(eo)?(em=p?(0,R.bT)(p.translations,n,"name"):"Heritage Navigator",ef=!0,ex=!0,eg=!0,eb=!0,ey=!0,eF=!0,eS=!0,eE=!1,eA=!0,eP=!0,eT=!0,eR=!0):Z.startsWith("/".concat(eo,"/site/"))?(ev=!0,ex=!1,ew=!1,eg=!0,em="",ep=!0,ek=!1,eI=!1,eE=!0,eA=!0,eP=!0,eT=!0,eR=!0):Z.startsWith("/".concat(eo,"/period/"))&&!ei?(em="",ef=!1,ev=!0,ex=!1,ew=!1,eg=!0,eb=!1,ey=!1,ej=!1,eN=!1,ek=!1,eC=!1,eF=!1,eS=!1,eE=!0,eA=!0,eP=!0,eT=!0,eI=!1,eR=!0):Z.startsWith("/".concat(eo,"/timeline"))?(em="",ev=!1,ex=!0,ew=!1,eg=!0,ej=!1,ey=!1,eb=!1,eE=!0,eS=!1,eF=!1,eP=!0,eT=!0,eR=!0):Z.startsWith("/".concat(eo,"/map"))?(em="",ex=!0,ev=!1,eg=!0,ew=!1,eN=!1,ey=!0,eb=!0,eC=!1,eA=!0,eS=!0,eF=!0,eP=!0,eT=!0,eL=!1,eR=!0):Z.endsWith("/links")||Z.endsWith("/routes")||Z.endsWith("/stories")||Z.endsWith("/passport")?(em="",ev=!1,ex=!0,ew=!1,eg=!0,ej=!1,ey=!1,eb=!1,eE=!0,eS=!1,eF=!1,eA=!0,eP=!Z.endsWith("/routes"),eT=!Z.endsWith("/stories"),eR=!0):(Z.includes("/route/")||Z.includes("/list/"))&&(em="",ep=!0,ev=!0,ex=!1,ew=!1,eg=!0,eb=!1,ey=!1,eE=!0,eA=!0,eP=!0,eT=!0,eR=!0),eP=eP&&!ed,eT=eT&&!eu;let eM=[...ed?["routes"]:[],...eu?["stories"]:[]],eB=p?(0,R.bT)(p.translations,n,"name"):"",eD=null;eO?eD="list":eo&&Z.startsWith("/".concat(eo,"/map"))?eD="map":eo&&Z.startsWith("/".concat(eo,"/timeline"))?eD="timeline":eo&&Z.endsWith("/routes")?eD="routes":eo&&Z.endsWith("/stories")&&(eD="stories");let ez=()=>{eo&&t.push("/".concat(n,"/").concat(eo,"/map"))},eU=async()=>{let e=Z.startsWith("/".concat(eo,"/site/"))&&f?f:em,t={title:document.title,text:"Check out ".concat(e," on Heritage Navigator!"),url:window.location.href};try{navigator.share?await navigator.share(t):(await navigator.clipboard.writeText(window.location.href),alert("Link copied to clipboard!"))}catch(e){console.error("Error sharing:",e)}};return el?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("header",{className:"fixed top-0 left-0 right-0 transition-transform duration-300 ease-in-out ".concat(J?"-translate-y-full":"translate-y-0"),inert:J,style:{height:"calc(var(--header-height) + env(safe-area-inset-top))",backgroundColor:L.Tj.primary,borderBottom:"1px solid ".concat(L.Tj.secondary,"33"),zIndex:9999,paddingTop:"env(safe-area-inset-top)"},children:(0,r.jsxs)("div",{className:"flex items-center w-full h-full pl-2",children:[(ex||eg||ev||ew)&&(0,r.jsx)("div",{className:"flex-grow min-w-0",children:(0,r.jsx)(P,{showOnDesktop:eg,showOnMobile:ex,showBackButtonOnMobile:ev,currentCityName:e_,currentSiteName:f||void 0,currentPeriodName:g?(0,R.bT)(g.translations,n,"name"):void 0,currentRouteName:Z.includes("/route/")&&f||void 0,language:n,cityId:eo,siteId:Z.includes("/site/")?Z.split("/")[3]:void 0,periodId:Z.includes("/period/")?Z.split("/")[3]:void 0,pathname:Z,onBackClick:()=>
1{if(es&&eo&&Z.split("/")[3])t.push("/".concat(n,"/").concat(eo,"/site/").concat(Z.split("/")[3]));else if(ei&&eo&&Z.split("/")[3]){let e=Z.split("/")[3];t.push("/".concat(n,"/").concat(eo,"/period/").concat(e))}else Q.current>1?t.back():Z.includes("/route/")&&eo?t.push("/".concat(n,"/").concat(eo,"/routes")):eo&&t.push("/".concat(n,"/").concat(eo))}})}),!(ex||eg||ev||ew)&&(0,r.jsx)("div",{className:"w-10 h-10"}),(0,r.jsx)(o,{className:"flex-grow text-center mx-2 overflow-hidden",title:em,showLogo:ef,cityId:eo,hideTitleInCenter:!!e_&&eO,hideOnMobile:ep}),(0,r.jsx)(j,{showSearchMobileTopRight:eb,showFilterMobileTopRight:ey,showMapMobileTopRight:ej,showTimelineMobileTopRight:eN,showShareMobileTopRight:ek,showLayersMobileTopRight:eC,showSearchDesktopTopRight:eF,showFilterDesktopTopRight:eS,showMapDesktopTopRight:eE,showTimelineDesktopTopRight:eA,showRoutesDesktopTopRight:eP,showStoriesDesktopTopRight:eT,showShareDesktopTopRight:eI,showLayersDesktopTopRight:eL,showHamburgerTopRight:eR,isFilterActive:K&&h,onSearchClick:()=>k(!0),onFilterClick:()=>d(),onMapClickMobile:ez,onMapClickDesktop:ez,onTimelineClick:()=>{eo&&t.push("/".concat(n,"/").concat(eo,"/timeline"))},onRoutesClick:()=>{eo&&t.push("/".concat(n,"/").concat(eo,"/routes"))},onStoriesClick:()=>{eo&&t.push("/".concat(n,"/").concat(eo,"/stories"))},onShareClick:eU,onLayersClick:()=>{},onHamburgerClick:()=>b(!0)})]})}),p&&w&&(0,r.jsx)(V,{isOpen:w,onClose:()=>b(!1),currentLang:n,city:p,onLanguageChange:e=>{l(e),b(!1)}}),C&&(0,r.jsx)(H,{isOpen:N,onClose:()=>k(!1),cityId:eo,cityName:eB}),S&&(0,r.jsx)($,{cityId:eo,isOpen:u,onClose:d}),eo&&(0,r.jsx)(I,{activeTab:eD,hidden:J,hiddenTabs:eM,hrefs:{list:"/".concat(n,"/").concat(eo),map:"/".concat(n,"/").concat(eo,"/map"),timeline:"/".concat(n,"/").concat(eo,"/timeline"),routes:"/".concat(n,"/").concat(eo,"/routes"),stories:"/".concat(n,"/").concat(eo,"/stories")}}),K&&h&&!el&&!en&&(0,r.jsx)(B,{onClick:m,isVisible:h&&!M,isMobileLayout:!X})]})}},42862:(e,t,a)=>{"use strict";a.d(t,{default:()=>j});var r=a(95155),s=a(12115),i=a(48314),n=a(89559),l=a(53511),o=a(85921),c=a(3538),d=a(65229),u=a(12932),h=a(62332),m=a(27189),f=a(95740),p=a(81310),x=a(7768),g=a(74412),v=a(97849),w=a(24923),b=a(85203),y=a.n(b);function j(){let{track:e,queue:t,queueIndex:a,hasNext:b,autoAdvance:j,setAutoAdvance:N,isPlaying:k,currentTime:C,duration:F,hasError:S,toggle:E,seek:A,stop:P,retry:T,next:I,previous:L,playbackRate:R,cyclePlaybackRate:W}=(0,p.R)(),{translate:_,getMessage:O}=(0,g.ot)(),{language:M}=(0,x.o)(),B="".concat(new Intl.NumberFormat(M,{maximumFractionDigits:1}).format(R),"\xd7"),[D,z]=(0,s.useState)(!1),[U,V]=(0,s.useState)(null),H=(0,s.useRef)(null),$=e?S?_("audio.error"):t.length>1?"".concat(e.title," \xb7 ").concat(O("audio.queuePosition",{current:String(a+1),total:String(t.length)})):e.title:"",J=(0,r.jsx)(w.A,{message:$});if(!e)return J;let q=null!=U?U:C,X=F>0?q/F*100:0,G=t.length>1,K=e=>{let t=H.current;if(!t||F<=0)return null;let a=t.getBoundingClientRect();return Math.min(Math.max((e-a.left)/a.width,0),1)*F},Y=e=>{null!=U&&(A(U),V(null),e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))};return(0,r.jsxs)(r.Fragment,{children:[J,(0,r.jsxs)("div",{className:"fixed left-0 right-0 z-40 bottom-[calc(4.5rem+env(safe-area-inset-bottom))] md:bottom-4",children:[D&&e.transcript&&(0,r.jsx)("div",{className:"mx-2 md:max-w-xl md:mx-auto mb-1 rounded-t-xl bg-white/95 backdrop-blur shadow-[0_-4px_20px_rgba(0,0,0,0.15)] max-h-[40vh] overflow-y-auto",children:(0,r.jsx)("p",{className:"p-4 text-sm leading-relaxed text-gray-800 whitespace-pre-line",children:e.transcript})}),(0,r.jsxs)("div",{className:"mx-2 md:max-w-xl md:mx-auto rounded-xl bg-primary text-white shadow-[0_-2px_16px_rgba(0,0,0,0.25)] overflow-hidden",children:[(0,r.jsx)("div",{ref:H,className:"pb-2 cursor-pointer touch-none",onPointerDown:e=>{let t=K(e.clientX);if(null!=t){try{e.currentTarget.setPointerCapture(e.pointerId)}catch(e){}V(t)}},onPointerMove:e=>{if(null==U)return;let t=K(e.clientX);null!=t&&V(t)},onPointerUp:Y,onPointerCancel:Y,onKeyDown:e=>{F<=0||("ArrowLeft"===e.key?(e.preventDefault(),A(C-10)):"ArrowRight"===e.key&&(e.preventDefault(),A(C+10)))},role:"slider",tabIndex:0,"aria-label":_("audio.seekBar"),"aria-valuemin":0,"aria-valuemax":Math.round(F),"aria-valuenow":Math.round(q),"aria-valuetext":"".concat((0,v.sx)(q)," / ").concat((0,v.sx)(F)),children:(0,r.jsx)("div",{className:"h-2.5 bg-white/20",children:(0,r.jsx)("div",{className:y()("h-full bg-secondary",null==U&&"transition-[width] duration-200"),style:{width:"".concat(X,"%")}})})}),(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 pb-2",children:[(0,r.jsx)("button",{onClick:()=>A(C-10),"aria-label":_("audio.rewind"),className:"p-2 rounded-full hover:bg-white/10 active:scale-95 transition-all shrink-0",children:(0,r.jsx)(i.A,{className:"h-5 w-5"})}),(0,r.jsx)("button",{onClick:S?T:E,"aria-label":_(S?"audio.retry":k?"audio.pause":"audio.play"),className:"p-2 rounded-full bg-white/15 hover:bg-white/25 active:scale-95 transition-all shrink-0",children:S?(0,r.jsx)(n.A,{className:"h-6 w-6"}):k?(0,r.jsx)(l.A,{className:"h-6 w-6"}):(0,r.jsx)(o.A,{className:"h-6 w-6 translate-x-[1px]"})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsx)("p",{className:"text-sm font-semibold truncate",children:e.title}),(0,r.jsx)("p",{className:"text-xs text-white/70 truncate",children:S?_
1("audio.error"):(0,r.jsxs)(r.Fragment,{children:[e.subtitle?"".concat(e.subtitle," \xb7 "):"",(0,v.sx)(q)," / ",(0,v.sx)(F)]})})]}),(0,r.jsx)("button",{onClick:W,"aria-label":O("audio.playbackRate",{rate:B}),className:y()("min-w-[2.75rem] px-1.5 py-1.5 rounded-full text-xs font-semibold tabular-nums active:scale-95 transition-all shrink-0",1===R?"hover:bg-white/10 text-white/70":"bg-white/25"),children:B}),e.transcript&&(0,r.jsx)("button",{onClick:()=>z(e=>!e),"aria-label":_("audio.transcript"),"aria-pressed":D,className:y()("p-2 rounded-full active:scale-95 transition-all shrink-0",D?"bg-white/25":"hover:bg-white/10"),children:(0,r.jsx)(c.A,{className:"h-5 w-5"})}),(0,r.jsx)("button",{onClick:()=>{z(!1),P()},"aria-label":_("audio.close"),className:"p-2 rounded-full hover:bg-white/10 active:scale-95 transition-all shrink-0",children:(0,r.jsx)(d.A,{className:"h-5 w-5"})})]}),G&&(0,r.jsxs)("div",{className:"flex items-center gap-1 px-3 py-1.5 border-t border-white/10",children:[(0,r.jsx)("button",{onClick:L,"aria-label":_("audio.previous"),className:"p-2 rounded-full hover:bg-white/10 active:scale-95 transition-all shrink-0",children:(0,r.jsx)(u.A,{className:"h-5 w-5"})}),(0,r.jsx)("button",{onClick:I,disabled:!b,"aria-label":_("audio.next"),className:"p-2 rounded-full hover:bg-white/10 active:scale-95 transition-all shrink-0 disabled:opacity-40 disabled:hover:bg-transparent",children:(0,r.jsx)(h.A,{className:"h-5 w-5"})}),(0,r.jsx)("span",{className:"flex-1 text-center text-xs text-white/80 truncate",children:O("audio.queuePosition",{current:String(a+1),total:String(t.length)})}),(0,r.jsxs)("button",{onClick:()=>N(!j),"aria-label":_("audio.autoAdvance"),"aria-pressed":j,className:y()("px-2 py-1.5 rounded-full text-xs flex items-center gap-1 active:scale-95 transition-all shrink-0",j?"bg-white/25":"hover:bg-white/10 text-white/60"),children:[(0,r.jsx)(m.A,{className:"h-4 w-4"}),_(j?"audio.autoAdvanceOn":"audio.autoAdvanceOff")]})]}),(0,r.jsxs)("p",{className:"flex items-center justify-center gap-1 border-t border-white/10 px-3 py-1 text-[10px] leading-tight text-white/60",children:[(0,r.jsx)(f.A,{className:"h-3 w-3 shrink-0","aria-hidden":"true"}),_("aiDisclosure.audioVoice")]})]})]})]})}},44383:(e,t,a)=>{"use strict";a.d(t,{CityCacheProvider:()=>n});var r=a(95155),s=a(12115);let i=(0,s.createContext)(void 0),n=e=>{let{children:t}=e,[a,n]=(0,s.useState)({}),l=(0,s.useCallback)(e=>a[e],[a]),o=(0,s.useCallback)((e,t)=>{n(a=>{var r;let s=(null==(r=a[e])?void 0:r.sites)||[],i=t.sites||[],n=0===t.currentPage?i:[...s,...i];return{...a,[e]:{...a[e]||{sites:[],currentPage:-1,hasMore:!0},...t,sites:n}}})},[]),c=(0,s.useCallback)((e,t)=>{n(a=>a[e]?{...a,[e]:{...a[e],scrollY:t}}:(console.warn("[CityCache] Attempted to update scroll for non-cached city: ".concat(e)),a))},[]);return(0,r.jsx)(i.Provider,{value:{cache:a,getCityData:l,updateCityData:o,updateCityScroll:c},children:t})}},47226:(e,t,a)=>{"use strict";a.d(t,{U:()=>s});var r=a(12115);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500,[t,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if("function"==typeof window.requestIdleCallback){let t=window.requestIdleCallback(()=>a(!0),{timeout:e});return()=>window.cancelIdleCallback(t)}let t=window.setTimeout(()=>a(!0),e);return()=>window.clearTimeout(t)},[e]),t}},60080:(e,t,a)=>{"use strict";function r(e,t){"function"==typeof window.gtag&&window.gtag("event",e,t)}a.d(t,{s:()=>r})},64269:(e,t,a)=>{"use strict";a.d(t,{cn:()=>i});var r=a(2821),s=a(75889);function i(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,s.QP)((0,r.$)(t))}},79071:(e,t,a)=>{"use strict";a.d(t,{J:()=>i});var r=a(12115);let s=new Map;function i(e){let[t,a]=(0,r.useState)(null);return(0,r.useEffect)(()=>{if(!e)return void a(null);let t=!1;return(function(e){let t=s.get(e);if(t&&t.expiresAt>Date.now())return t.value;let a=fetch("/api/cities/".concat(encodeURIComponent(e),"/route-availability")).then(e=>{if(!e.ok)throw Error("Route availability failed: ".concat(e.status));return e.json()});return a.catch(()=>s.delete(e)),s.set(e,{expiresAt:Date.now()+3e5,value:a}),a})(e).then(e=>{t||a(e)}).catch(()=>{t||a(null)}),()=>{t=!0}},[e]),t}},82596:(e,t,a)=>{"use strict";a.d(t,{default:()=>i});var r=a(12115),s=a(26218);let i=()=>((0,r.useEffect)(()=>
1{"serviceWorker"in navigator&&(navigator.serviceWorker.getRegistrations().then(e=>{e.forEach(e=>{e.unregister().then(e=>{e&&console.log("[Cleanup] Service worker unregistered successfully")})})}),"caches"in window&&caches.keys().then(e=>{e.filter(e=>e!==s.cS).forEach(e=>{caches.delete(e).then(()=>{console.log("[Cleanup] Cache ".concat(e," deleted"))})})}))},[]),null)},83469:(e,t,a)=>{"use strict";a.d(t,{FavoritesProvider:()=>o,e:()=>c});var r=a(95155),s=a(12115),i=a(60080);let n="heritage-navigator-favorites",l=(0,s.createContext)(void 0);function o(e){let{children:t}=e,[a,o]=(0,s.useState)([]);(0,s.useEffect)(()=>{try{let e=localStorage.getItem(n);e&&o(JSON.parse(e))}catch(e){console.error("Error reading favorites from localStorage:",e),o([])}},[]),(0,s.useEffect)(()=>{if(a.length>0||localStorage.getItem(n))try{localStorage.setItem(n,JSON.stringify(a))}catch(e){console.error("Error saving favorites to localStorage:",e)}},[a]);let c=(0,s.useRef)(a);(0,s.useEffect)(()=>{c.current=a},[a]);let d=(0,s.useCallback)(e=>{"undefined"!=typeof navigator&&"vibrate"in navigator&&navigator.vibrate(10);let t=!c.current.includes(e);(0,i.s)(t?"favorite_add":"favorite_remove",{site_id:e}),o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),u=(0,s.useCallback)(e=>a.includes(e),[a]),h=(0,s.useMemo)(()=>({favorites:a,toggleFavorite:d,isFavorite:u}),[a,d,u]);return(0,r.jsx)(l.Provider,{value:h,children:t})}function c(){let e=(0,s.useContext)(l);if(void 0===e)throw Error("useFavoritesContext must be used within a FavoritesProvider");return e}},84652:(e,t,a)=>{"use strict";a.d(t,{FilterProvider:()=>o,U:()=>c});var r=a(95155),s=a(12115);let i="heritage-navigator-filters",n={searchTerm:"",selectedTags:[],selectedPeriods:[],showOnlyFavorites:!1,showOnlyOpenNow:!1},l=(0,s.createContext)(void 0);function o(e){let{children:t}=e,[a,o]=(0,s.useState)(n),[c,d]=(0,s.useState)(!1),[u,h]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=localStorage.getItem(i);if(e)try{let t=JSON.parse(e);o({...n,...t})}catch(e){}h(!0)},[]),(0,s.useEffect)(()=>{u&&localStorage.setItem(i,JSON.stringify(a))},[a,u]);let m=(0,s.useCallback)(e=>{o(t=>({...t,searchTerm:e}))},[]),f=(0,s.useCallback)(e=>{o(t=>({...t,selectedTags:e}))},[]),p=(0,s.useCallback)(e=>{o(t=>({...t,selectedPeriods:e}))},[]),x=(0,s.useCallback)(e=>{o(t=>({...t,showOnlyFavorites:e}))},[]),g=(0,s.useCallback)(e=>{o(t=>({...t,showOnlyOpenNow:e}))},[]),v=(0,s.useCallback)(()=>{d(e=>!e)},[]),w=(0,s.useCallback)(()=>{o(n),d(!1)},[]),b=(0,s.useMemo)(()=>{let e=""!==a.searchTerm.trim()||a.selectedTags.length>0||a.selectedPeriods.length>0||a.showOnlyFavorites||a.showOnlyOpenNow;return{filterState:a,isFilterPanelOpen:c,isFilterActive:e,setSearchTerm:m,setSelectedTags:f,setSelectedPeriods:p,setShowOnlyFavorites:x,setShowOnlyOpenNow:g,toggleFilterPanel:v,resetFilters:w}},[a,c,m,f,p,x,g,v,w]);return(0,r.jsx)(l.Provider,{value:b,children:t})}function c(){let e=(0,s.useContext)(l);if(void 0===e)throw Error("useFilter must be used within a FilterProvider");return e}},88872:(e,t,a)=>{"use strict";a.d(t,{PageMetadataProvider:()=>n,y:()=>l});var r=a(95155),s=a(12115);let i=(0,s.createContext)(void 0),n=e=>{let{children:t}=e,[a,n]=(0,s.useState)(null);return(0,r.jsx)(i.Provider,{value:{pageTitle:a,setPageTitle:n},children:t})},l=()=>{let e=(0,s.useContext)(i);if(void 0===e)throw Error("usePageMetadata must be used within a PageMetadataProvider");return e}},91e3:(e,t,a)=>{"use strict";a.d(t,{default:()=>l});var r=a(12115),s=a(20063),i=a(68276);let n=a(29284).$W.localization.defaultLanguage;function l(){let e=(0,s.useParams)(),t=Array.isArray(e.locale)?e.locale[0]:e.locale;return(0,r.useEffect)(()=>{let e=t&&(0,i.fW)(t)?t:n;document.documentElement.lang!==e&&(document.documentElement.lang=e)},[t]),null}},91334:(e,t,a)=>{"use strict";a.d(t,{default:()=>n});var r=a(12115),s=a(91499),i=a(39858);function n(){return(0,r.useEffect)(()=>{(0,i.VV)();let e=e=>{let t=e.target,a=(null==t?void 0:t.tagName)==="SCRIPT"&&"string"==typeof t.src&&t.src.includes("/_next/static/chunks/"),r=e instanceof ErrorEvent?e:null,n=a?"Failed to load Next.js chunk: ".concat(t.src):(null==r?void 0:r.message)||"Ukendt fejl",l=(null==r?void 0:r.error)instanceof Error?r.error.stack:void 0,o=(null==r?void 0:r.filename)||(null==t?void 0:t.src)||void 0;(0,s.u)(n,{stack:l,source:o})||(0,i.N)({message:n,stack:l},()=>{(0,s.N)({origin:"window-error",message:n,stack:l})})},t=e=>{let t=e.reason,a=t instanceof Error?t.message:"string"==typeof t?t:t&&"object"==typeof t&&"string"==typeof t.message?t.message:"Unhandled promise rejection",r=t instanceof Error||t&&"object"==typeof t&&"string"==typeof t.stack?t.stack:void 0;(0,s.u)(a,{stack:r})||(0,i.N)(t,()=>{(0,s.N)({origin:"unhandledrejection",message:a,stack:r})})};return window.addEventListener("error",e,!0),window.addEventListener("unhandledrejection",t),()=>{window.removeEventListener("error",e,!0),window.removeEventListener("unhandledrejection",t)}},[]),null}},91499:(e,t,a)=>{"use strict";a.d(t,{N:()=>s,u:()=>i});let r=new Set;function s(e){let t="".concat(e.origin,":").concat(e.message);if(r.has(t)||r.size>=10)return;r.add(t);let a=JSON.stringify({...e,url:window.location.href,locale:document.documentElement.lang||void 0,buildId:"6abfe52f3b573d000859a5af"});try{var s,i;let e=new Blob([a],{type:"application/json"});(null==(s=(i=navigator).sendBeacon)?void 0:s.call(i,"/api/log-error",e))||fetch("/api/log-error",{method:"POST",headers:{"Content-Type":"application/json"},body:a,keepalive:!0}
1).catch(()=>void 0)}catch(e){}}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=/^(?:Uncaught (?:\(in promise\) )?)?(?:TypeError: )?Failed to fetch$/.test(e.trim()),r=[t.stack,t.source].some(e=>"string"==typeof e&&/\/\.netlify\/scripts\/rum(?:[/?#:]|$)/.test(e));return"Script error."===e||e.startsWith("ResizeObserver loop")||e.includes("NEXT_REDIRECT")||e.includes("NEXT_NOT_FOUND")||a&&r}},92244:(e,t,a)=>{"use strict";a.d(t,{NavigationVisibilityProvider:()=>o,S:()=>l});var r=a(95155),s=a(12115),i=a(20063);let n=(0,s.createContext)(null);function l(){let e=(0,s.useContext)(n);if(!e)throw Error("useNavigationVisibility must be used within a NavigationVisibilityProvider");return e}function o(e){let{children:t}=e,[a,l]=(0,s.useState)(!1),o=(0,i.usePathname)();(0,s.useEffect)(()=>{l(!1)},[o]),(0,s.useEffect)(()=>{let e=document.documentElement;return a?e.setAttribute("data-map-immersive",""):e.removeAttribute("data-map-immersive"),()=>e.removeAttribute("data-map-immersive")},[a]),(0,s.useEffect)(()=>{if(!a)return;let e=e=>{"Escape"===e.key&&l(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]);let c=(0,s.useMemo)(()=>({immersive:a,setImmersive:l}),[a]);return(0,r.jsx)(n.Provider,{value:c,children:t})}},95736:(e,t,a)=>{"use strict";a.d(t,{default:()=>m});var r=a(95155),s=a(12115),i=a(52619),n=a.n(i),l=a(20063),o=a(2274),c=a(15060),d=a(7768),u=a(74412),h=a(60080);function m(){let{lastStamped:e}=(0,c.y)(),{language:t}=(0,d.o)(),{translate:a}=(0,u.ot)(),i=(0,l.usePathname)(),[m,f]=(0,s.useState)(!1),p=(0,s.useRef)(null),x=(0,s.useRef)(void 0);return(0,s.useEffect)(()=>{e&&e!==p.current&&(p.current=e,null!=i&&i.endsWith("/passport")||(f(!0),window.clearTimeout(x.current),x.current=window.setTimeout(()=>f(!1),6e3)))},[e,i]),(0,s.useEffect)(()=>()=>window.clearTimeout(x.current),[]),(0,r.jsx)("div",{role:"status","aria-live":"polite",className:"pointer-events-none fixed inset-x-0 top-[4.5rem] z-50 flex justify-center px-4",children:m&&e&&(0,r.jsxs)(n(),{href:"/".concat(t,"/").concat(e.cityId,"/passport"),onClick:()=>{f(!1),(0,h.s)("passport_open",{source:"stamp_toast",city_id:e.cityId})},className:"pointer-events-auto flex items-center gap-2 rounded-full bg-[#1a2942] px-4 py-2 text-sm text-white shadow-lg transition-colors hover:bg-[#24375a]",children:[(0,r.jsx)(o.A,{className:"h-4 w-4 shrink-0","aria-hidden":"true"}),(0,r.jsx)("span",{children:a("passport.stampedToast")}),(0,r.jsx)("span",{className:"whitespace-nowrap underline underline-offset-2",children:a("passport.stampedToastAction")})]})})}},96915:(e,t,a)=>{"use strict";a.d(t,{Bg:()=>s,IM:()=>i,St:()=>u,aT:()=>h,fT:()=>n,iH:()=>d});let r={city:"heritage-navigator-intro-city",story:"heritage-navigator-intro-story"};function s(e){return r[e]}function i(e){try{return"1"===window.localStorage.getItem(r[e])}catch(e){return!0}}function n(e){try{window.localStorage.setItem(r[e],"1")}catch(e){}}let l=0,o=new Set;function c(){o.forEach(e=>e())}function d(){l+=1,c();let e=!1;return()=>{e||(e=!0,l-=1,c())}}function u(){return l>0}function h(e){return o.add(e),()=>{o.delete(e)}}},98502:(e,t,a)=>{"use strict";a.d(t,{HF:()=>n,p0:()=>s,uH:()=>i});var r=a(29284);function s(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e.filter(e=>!!e);return 0===t.length?"":"/".concat(t.join("/"))}function i(e){let t=e.split("/").filter(Boolean);return"about-city"===t[0]?t[1]||"":t[0]||""}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"/".concat(e).concat(t)}r.$W.siteUrl.replace(/\/$/,""),r.$W.localization.defaultLanguage}},e=>{e.O(0,[2619,760,6645,1980,6415,1310,2605,8441,1255,7358],()=>e(e.s=21239)),_N_E=e.O()}]);
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.