PageSourceSearch

https://stockholmslansmuseum.se/app/themes/sthlm-lans-museum/dist/assets/js/main.min.js?ver=1786445769

js stockholmslansmuseum.se collected 2026-09-24 21:40:22 UTC 25,268 bytes, 21 lines download raw bytes

1import{c as G}from"./focus-trap.esm.min.js";import{z as J,s as pe}from"./sound-player.min.js";function Re(){import.meta.url,import("_").catch(()=>1),(async function*(){})().next()}function fe({level:n="info",message:e="",context:r="",payload:t=null}={}){try{const o=window.SLM_JS_LOG_ENDPOINT;if(!o)return;const s={level:n,message:e,context:r,payload:t,userAgent:navigator.userAgent};navigator.sendBeacon?.(o,new Blob([JSON.stringify(s)],{type:"application/json"}))||fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),keepalive:!0})}catch{}}const he=["ReactDOM.render is no longer supported in React 18","Tile constructor needs 'cacheKey' variable","Viewer.buttons is deprecated"];function ge(n){return he.some(e=>n.includes(e))}function ye(n=!1){try{if(!(n||!!window.WP_DEBUG)||window.__SLM_CONSOLE_WRAPPED__)return;window.__SLM_CONSOLE_WRAPPED__=!0,["error","warn"].forEach(t=>{const o=console[t]?.bind(console);o&&(console[t]=function(...s){try{const a=String(s[0]||"");if(ge(a))return;fe({level:t,message:a,payload:s.slice(1)})}catch{}return o(...s)})})}catch{}}const H={menuToggle:"[data-menu-toggle]",menuHide:"[data-menu-hide]",menuContainer:".slm-header-navigation__wrapper"},ve=()=>{let n=!1;document.documentElement.setAttribute("data-menu-open",n);const e=document.querySelector(H.menuToggle),r=document.querySelector(H.menuHide),t=document.querySelector(H.menuContainer),o=G(t,{allowOutsideClick:!0}),s=()=>{n=!n,e.setAttribute("aria-expanded",n),document.documentElement.setAttribute("data-menu-open",n),n?(document.documentElement.setAttribute("data-scroll","false"),o.activate()):(document.documentElement.setAttribute("data-scroll","true"),o.deactivate())},a=c=>{n&&(c.type==="keyup"?c.keyCode===27:!t.contains(c.target)&&!e.contains(c.target)&&!r.contains(c.target))&&s()};e&&r&&(e.addEventListener("click",s),r.addEventListener("click",s),document.addEventListener("click",a))},h=[];for(let n=0;n<256;++n)h.push((n+256).toString(16).slice(1));function we(n,e=0){return(h[n[e+0]]+h[n[e+1]]+h[n[e+2]]+h[n[e+3]]+"-"+h[n[e+4]]+h[n[e+5]]+"-"+h[n[e+6]]+h[n[e+7]]+"-"+h[n[e+8]]+h[n[e+9]]+"-"+h[n[e+10]]+h[n[e+11]]+h[n[e+12]]+h[n[e+13]]+h[n[e+14]]+h[n[e+15]]).toLowerCase()}let B;const be=new Uint8Array(16);function Ee(){if(!B){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");B=crypto.getRandomValues.bind(crypto)}return B(be)}const Le=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),W={randomUUID:Le};function Q(n,e,r){if(W.randomUUID&&!n)return W.randomUUID();n=n||{};const t=n.random??n.rng?.()??Ee();if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=t[6]&15|64,t[8]=t[8]&63|128,we(t)}const Z=(n,e)=>{try{if(n){if(n.dataset.initialized)return}else return;const r=e||n.dataset.toggle;if(!r)return;const t=document.getElementById(r)||document.querySelector(r);if(!t)return;let o=t.getAttribute("id");o||(o=Q(),t.setAttribute("id",o));const s=document.querySelectorAll('[data-toggle="'+o+'"]');let a=(n.getAttribute("aria-expanded")||"false")==="true";n.setAttribute("aria-expanded",a),n.setAttribute("aria-controls",o),n.dataset.initialized=!0,(n.classList.contains("slm-header-navigation__menu--item__toggle")||n.classList.contains("slm-build__menu--item__toggle")||n.classList.contains("slm-side-menu__menu--item__toggle"))&&n.parentElement.setAttribute("data-item-open",a),t.dataset.open=a,n.addEventListener("click",c=>{c.preventDefault(),a=t.dataset.open==="true",a=!a,["slm-build__menu--sub-menu-close","slm-build__menu--toggle","slm-side-menu__toggle","slm-side-menu__close"].some(f=>n.classList.contains(f))&&document.documentElement.setAttribute("data-scroll",a?"false":"true"),s.forEach(f=>{f.setAttribute("aria-expanded",a),(f.classList.contains("slm-header-navigation__menu--item__toggle")||f.classList.contains("slm-build__menu--item__toggle")||f.classList.contains("slm-side-menu__menu--item__toggle"))&&f.parentElement.setAttribute("data-item-open",a),t.dataset.open=a})})}catch(r){console.error({e:r});return}};document.addEventListener("DOMContentLoaded",()=>{const n=document.querySelectorAll("[data-toggle]");Array.prototype.forEach.call(n,e=>Z(e))});document.addEventListener("click",n=>{const e=n.currentTarget;e&&e.dataset&&e.dataset.toggle&&Z(e)});const ee=(n,e)=>{try{if(n){if(n.dataset.initialized)return}else return;const r=e||n.dataset.slideToggle;if(!r)return;const t=document.getElementById(r)||document.querySelector(r);if(!t)return;let o=t.getAttribute("id");o||(o=Q(),t.setAttribute("id",o));let s=(n.getAttribute("aria-expanded")||"false")==="true";n.setAttribute("aria-expanded",s),n.setAttribute("aria-controls",o),n.dataset.initialized=!0,t.dataset.open=s,t.style.display="none",n.addEventListener("click",()=>{if(s=!s,n.setAttribute("aria-expanded",s),t.dataset.open=s,s){t.style.display=null,t.style.height="auto";let a=t.clientHeight+32+"px";t.style.height="0px",setTimeout(()=>{t.style.height=a})}else t.style.height="0px",setTimeout(()=>{t.style.display="none"},350)})}catch(r){console.error({e:r});return}};document.addEventListener("DOMContentLoaded",()=>
1{const n=document.querySelectorAll("[data-slide-toggle]");Array.prototype.forEach.call(n,e=>ee(e))});document.addEventListener("click",n=>{const e=n.currentTarget;e&&e.dataset&&e.dataset.toggle&&ee(e)});const Se=()=>{const n=document.querySelectorAll("[data-scale-image]"),e=document.querySelector(".slm-header");if(n&&e){const r=new IntersectionObserver(t=>{t.forEach(o=>{o.target.querySelector("img").classList.toggle("slm-scale",o.isIntersecting)})},{root:null,rootMargin:"-"+e.scrollHeight+"px 0px 0px 0px",threshold:.5});n.forEach(t=>{r.observe(t)})}},xe=()=>{const n=document.querySelector(".slm-build__menu--sub-menu.active")||document.querySelector(".slm-side-menu__menu"),e=document.querySelector(".slm-build__content")||document.querySelector(".slm-side-menu-page__content");if(n&&e){const r=()=>{e.style.minHeight=n.scrollHeight+100+"px"},t=new ResizeObserver(r);window.innerWidth>1023&&t.observe(n),window.addEventListener("resize",()=>{window.innerWidth>1023?t.observe(n):(t.unobserve(n),e.style.minHeight=null)})}},$=n=>{const e=document.querySelector(".slm-my-route__push"),r=document.querySelectorAll(".slm-my-route__push--count, .slm-header__my-route--link__count");r&&r.length&&r.forEach(t=>{t.innerHTML=n}),e&&(e.style.display=n>0?null:"none")},_e=()=>{document.querySelectorAll("[data-destination]").forEach(e=>{e.addEventListener("click",()=>{const r=localStorage.getItem("slm-route")?localStorage.getItem("slm-route").split(","):[],t=e.getAttribute("data-destination");if(t&&r.indexOf(t)==-1)r.push(t),localStorage.setItem("slm-route",r.join(",")),e.innerText="Ta bort från min vandring",$(r.length);else if(t&&r.indexOf(t)>-1){const o=r.filter(s=>s!==t.toString());localStorage.setItem("slm-route",o.length?o.join(","):""),e.innerText="Lägg till i min vandring",$(o.length)}})})},ke=[".slm-history-area-list__cover-image-container > img",".slm-image-montage__image",".slm-about__image > img",".wp-block-image img",".wp-caption > img"];async function Ae(n){try{return await(await fetch("/wp-json/slm/v1/attachment/"+n)).json()}catch(e){return e}}let b=null,D=null;const te=n=>{n.key==="Escape"&&ne()},ne=()=>{D&&D.deactivate(),b.remove(),document.removeEventListener("keyup",te),document.documentElement.setAttribute("data-scroll","true")},Pe=(n,e,r)=>{b=document.createElement("dialog"),b.classList.add("slm-image-fullscreen");const t=document.createElement("div");t.classList.add("slm-loader");const o=document.createElement("div");t.appendChild(o),t.appendChild(o.cloneNode()),t.appendChild(o.cloneNode()),t.appendChild(o.cloneNode()),b.appendChild(t);const s=document.createElement("button");s.classList.add("slm-image-fullscreen__close"),s.setAttribute("aria-expanded","true"),s.addEventListener("click",()=>ne()),b.appendChild(s),document.addEventListener("keyup",te),Ae(r).then(a=>{b.innerHTML=a.full;const c=e.closest("figure")?.querySelector("figcaption"),g=document.createElement("div");g.innerHTML=a.full;const w=g.querySelector("img")?.getAttribute("alt")||"";if(c){c.textContent.trim()||(c.textContent=w);const p=document.createElement("figcaption");p.classList.add("slm-image-fullscreen__caption"),p.textContent=c.textContent,b.appendChild(p)}else if(w){const p=document.createElement("figcaption");p.classList.add("slm-image-fullscreen__caption"),p.textContent=w,b.appendChild(p)}b.appendChild(s)}),e.parentNode.insertBefore(b,n.nextSibling),D=G(b),D.activate(),document.documentElement.setAttribute("data-scroll","false")},Ie=()=>
1{document.querySelectorAll(ke.join(", ")).forEach(e=>{const r=e.getAttribute("data-source-id")||e.className.replace("wp-image-","");if(r){const t=document.createElement("button");t.classList.add("slm-image-fullscreen__button"),t.innerHTML='<span class="show-for-sr">Visa bild i fullskärm</span>',t.addEventListener("click",()=>Pe(t,e,r)),e.parentNode.insertBefore(t,e.nextSibling);const o=e.closest("figure")||e.parentElement;o&&o.classList.add("slm-image-fullscreen__wrapper")}})},Ce=()=>{setTimeout(()=>{const n=document.querySelector(".wp-chatbot-animation-active");if(n){const e=n.querySelector("img"),r=e.src,t=slmScriptVariables.templateDir+"/dist/chatbot.svg";n.addEventListener("mouseover",()=>{e.src=t}),n.addEventListener("mouseout",()=>{e.src=r})}},750)},Te=()=>{document.querySelectorAll("[data-current-post]").forEach(e=>{e.addEventListener("click",()=>Me(e))})},Me=async n=>{let e=n.getAttribute("data-current-post");const t=await(await fetch("/wp-json/slm/v1/random-posts/?exclude="+e)).json();t||(window.location.href="/"),window.location.href=t},re=()=>{const n=document.querySelectorAll(".slm-mini-carousel-outside-box");if(n.length===0)return!1;n.forEach(e=>{const t=e.querySelector(".slm-mini-carousel").querySelector(".slm-mini-carousel-wrapper"),o=t.children,s=e.querySelector(".slm-carousel-prev"),a=e.querySelector(".slm-carousel-next");let c=0;const g=o[0].offsetWidth,f=o.length,w=5;let p=!1,k=0,y=0,A=0,x=0;const E=()=>{y=-c*g,t.style.transform=`translateX(${y}px)`,A=y,s.style.display=c===0?"none":"block",a.style.display=c>=f-w?"none":"block",Array.from(o).forEach((m,v)=>{m.setAttribute("aria-hidden",v<c||v>=c+w?"true":"false")})},M=m=>{p=!0,k=m.type==="touchstart"?m.touches[0].clientX:m.pageX,x=0,t.style.transition="none",t.style.cursor="grabbing"},I=m=>{if(!p)return;m.preventDefault();const v=m.type==="touchmove"?m.touches[0].clientX:m.pageX;x=Math.abs(v-k);const S=v-k;y=A+S;const _=0,P=-((f-w)*g);y=Math.min(_,Math.max(P,y)),t.style.transform=`translateX(${y}px)`},C=m=>{if(!p)return;p=!1,t.style.transition="transform 0.2s ease-in-out",t.style.cursor="grab";const v=y/g;c=Math.round(-v),c=Math.max(0,Math.min(c,f-w)),E()},q=m=>{x<5&&m.target.closest(".slm-mini-carousel-link")||m.preventDefault()};t.addEventListener("mousedown",M),t.addEventListener("mousemove",I),t.addEventListener("mouseup",m=>{C(),q(m)}),t.addEventListener("mouseleave",C),t.addEventListener("touchstart",M),t.addEventListener("touchmove",I),t.addEventListener("touchend",m=>{C(),q(m)}),t.querySelectorAll("img").forEach(m=>{m.addEventListener("dragstart",v=>v.preventDefault())}),s.addEventListener("click",()=>{c>0&&(c--,E())}),a.addEventListener("click",()=>{c<f-w&&(c++,E())}),window.addEventListener("resize",()=>{E()}),E()})};class L extends HTMLElement{connectedCallback(){this.videoId=this.getAttribute("videoid");let e=this.querySelector(".lyt-playbtn,.lty-playbtn");if(this.playLabel=e&&e.textContent.trim()||this.getAttribute("playlabel")||"Play",this.dataset.title=this.getAttribute("title")||"",this.style.backgroundImage||(this.style.backgroundImage=`url("https://i.ytimg.com/vi/${this.videoId}/hqdefault.jpg")`,this.upgradePosterImage()),e||(e=document.createElement("button"),e.type="button",e.classList.add("lyt-playbtn","lty-playbtn"),this.append(e)),!e.textContent){const r=document.createElement("span");r.className="lyt-visually-hidden",r.textContent=this.playLabel,e.append(r)}this.addNoscriptIframe(),e.nodeName==="A"&&(e.removeAttribute("href"),e.setAttribute("tabindex","0"),e.setAttribute("role","button"),e.addEventListener("keydown",r=>{(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),this.activate())})),this.addEventListener("pointerover",L.warmConnections,{once:!0}),this.addEventListener("focusin",L.warmConnections,{once:!0}),this.addEventListener("click",this.activate),this.needsYTApi=this.hasAttribute("js-api")||navigator.vendor.includes("Apple")||navigator.userAgent.includes("Mobi")}static addPrefetch(e,r,t){const o=document.createElement("link");o.rel=e,o.href=r,t&&(o.as=t),document.head.append(o)}static warmConnections(){L.preconnected||(L.addPrefetch("preconnect","https://www.youtube-nocookie.com"),L.addPrefetch("preconnect","https://www.google.com"),L.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),L.addPrefetch("preconnect","https://static.doubleclick.net"),L.preconnected=!0)}fetchYTPlayerApi(){window.YT||window.YT&&window.YT.Player||(this.ytApiPromise=new Promise((e,r)=>{var t=document.createElement("script");t.src="https://www.youtube.com/iframe_api",t.async=!0,t.onload=o=>{YT.ready(e)},t.onerror=r,this.append(t)}))}async getYTPlayer(){return this.playerPromise||await this.activate(),this.playerPromise}async addYTPlayerIframe(){this.fetchYTPlayerApi(),await this.ytApiPromise;const e=document.createElement("div");this.append(e);const r=Object.fromEntries(this.getParams().entries());this.playerPromise=new Promise(t=>{let o=new YT.Player(e,{width:"100%",videoId:this.videoId,playerVars:r,events:{onReady:s=>
1{s.target.playVideo(),t(o)}}})})}addNoscriptIframe(){const e=this.createBasicIframe(),r=document.createElement("noscript");r.innerHTML=e.outerHTML,this.append(r)}getParams(){const e=new URLSearchParams(this.getAttribute("params")||[]);return e.append("autoplay","1"),e.append("playsinline","1"),e}async activate(){if(this.classList.contains("lyt-activated"))return;if(this.classList.add("lyt-activated"),this.needsYTApi)return this.addYTPlayerIframe(this.getParams());const e=this.createBasicIframe();this.append(e),e.focus()}createBasicIframe(){const e=document.createElement("iframe");return e.width=560,e.height=315,e.title=this.playLabel,e.allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",e.allowFullscreen=!0,e.referrerPolicy="strict-origin-when-cross-origin",e.src=`https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${this.getParams().toString()}`,e}upgradePosterImage(){setTimeout(()=>{const e=`https://i.ytimg.com/vi_webp/${this.videoId}/sddefault.webp`,r=new Image;r.fetchPriority="low",r.referrerpolicy="origin",r.src=e,r.onload=t=>{t.target.naturalHeight==90&&t.target.naturalWidth==120||(this.style.backgroundImage=`url("${e}")`)}},100)}}customElements.define("lite-youtube",L);const Y=()=>{document.querySelectorAll(".slm-block-full").forEach(e=>{e.querySelectorAll(".slm-link-blocks__item").forEach(t=>{let o=parseInt(t.getAttribute("data-maxheight"),10);isNaN(o)&&(o=1e3),t.querySelector("h3");const s=t.querySelector(".slm-link-blocks__item--image-wrapper");if(s){s.style.paddingBottom="";const a=s.offsetHeight,c=t.querySelector(".slm-link-blocks__item--info").offsetHeight;if(a+c>o){const f=o-c;s.style.paddingBottom=`${Math.max(0,f)}px`}}})})},oe=()=>{document.addEventListener("DOMContentLoaded",Y),window.addEventListener("resize",Y)};class qe{constructor(){this.players=new Map,this.init()}init(){window.YT&&window.YT.Player?this.setupPlayers():(window.addEventListener("youtube-api-ready",()=>{this.setupPlayers()}),this.checkForYTAPI())}checkForYTAPI(){const e=setInterval(()=>{window.YT&&window.YT.Player&&(clearInterval(e),this.setupPlayers())},500);setTimeout(()=>clearInterval(e),1e4)}setupPlayers(){const e=new MutationObserver(r=>{r.forEach(t=>{t.addedNodes.forEach(o=>{o.nodeName==="DIV"&&o.parentElement&&o.parentElement.tagName==="LITE-YOUTUBE"&&this.handleYouTubePlayer(o.parentElement)})})});document.querySelectorAll("lite-youtube[js-api]").forEach(r=>{e.observe(r,{childList:!0,subtree:!0}),r.classList.contains("lyt-activated")&&this.handleYouTubePlayer(r)})}async handleYouTubePlayer(e){try{const r=await e.getYTPlayer();r&&!this.players.has(e)&&(this.players.set(e,r),this.setupPlayerEvents(r,e))}catch{}}setupPlayerEvents(e,r){e.addEventListener("onStateChange",t=>{const o=t.data;o===YT.PlayerState.ENDED&&this.hideVideoOnEnd(e,r),o===YT.PlayerState.PLAYING&&this.monitorVideoProgress(e,r)})}monitorVideoProgress(e,r){const t=e.getDuration();if(t>0){const o=()=>{const s=e.getCurrentTime(),a=t-s;if(a<=5&&a>0){this.hideVideoOnEnd(e,r);return}e.getPlayerState()===YT.PlayerState.PLAYING&&setTimeout(o,1e3)};setTimeout(o,1e3)}}hideVideoOnEnd(e,r){e.pauseVideo();const t=this.createEndOverlay(e,r);r.style.position="relative",r.appendChild(t);const o=r.querySelector("iframe");o&&(o.style.opacity="0")}createEndOverlay(e,r){const t=document.createElement("div");t.className="youtube-end-overlay",t.style.cssText=`
2            position: absolute;
3            top: 0;
4            left: 0;
5            width: 100%;
6            height: 100%;
7            background: rgba(0, 0, 0, 0.9);
8            display: flex;
9            justify-content: center;
10            align-items: center;
11            z-index: 1000;
12            color: white;
13            font-family: Arial, sans-serif;
14            font-size: 18px;
15            cursor: pointer;
16        `;const o=document.createElement("div");return o.innerHTML='Slut på video, <span style="text-decoration: underline; color: #00aeef; font-weight: bold;">starta om</span>',t.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),this.restartVideo(e,r,t)}),t.appendChild(o),t}restartVideo(e,r,t){try{t&&t.parentElement&&t.remove();const o=r.querySelector("iframe");o&&(o.style.opacity="1",o.style.display="block",o.style.visibility="visible"),r.querySelectorAll(".youtube-end-overlay").forEach(a=>{a!==t&&a.remove()}),e.seekTo(0,!0),setTimeout(()=>{e.playVideo(),r.querySelectorAll(".youtube-end-overlay").forEach(c=>c.remove()),(e.getPlayerState()===YT.PlayerState.PLAYING||e.getPlayerState()===YT.PlayerState.BUFFERING)&&this.monitorVideoProgress(e,r)},100)}catch{this.fallbackRestart(r)}}fallbackRestart(e){e.classList.remove("lyt-activated");const r=e.querySelector("iframe");r&&r.remove();const t=e.querySelector("div");t&&t!==e.querySelector(".lty-playbtn")&&t.remove(),setTimeout(()=>{e.click()},100)}}document.addEventListener("DOMContentLoaded",()=>{new qe});document.addEventListener("DOMContentLoaded",function(){X(".slm-lanskallan-index-header__mobile-toggle",".slm-lanskallan-index-header__pillbox",".slm-lanskallan-index-header__mobile-toggle-text"),X(".lanskallan-material-header__mobile-toggle",".lanskallan-material-header__pillbox",".lanskallan-material-header__mobile-toggle-text")});function X(n,e,r){const t=document.querySelector(n),o=document.querySelector(e),s=document.querySelector(r);if(!t||!o)return;const a=o.querySelector('[aria-current="page"]');if(a&&s){const c=a.getAttribute("data-label")||a.textContent.trim();s.textContent=c}t.addEventListener("click",function(c){c.preventDefault();const g=t.getAttribute("aria-expanded")==="true";t.setAttribute("aria-expanded",!g),g?o.classList.remove("is-expanded"):o.classList.add("is-expanded")}),document.addEventListener("click",function(c){!t.contains(c.target)&&!o.contains(c.target)&&t.getAttribute("aria-expanded")==="true"&&(t.setAttribute("aria-expanded","fal
16se"),o.classList.remove("is-expanded"))}),document.addEventListener("keydown",function(c){c.key==="Escape"&&t.getAttribute("aria-expanded")==="true"&&(t.setAttribute("aria-expanded","false"),o.classList.remove("is-expanded"),t.focus())})}var O={exports:{}};var Oe=O.exports,K;function De(){return K||(K=1,(function(n,e){(function(t,o){n.exports=o()})(Oe,function(){return(function(r){var t={};function o(s){if(t[s])return t[s].exports;var a=t[s]={exports:{},id:s,loaded:!1};return r[s].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}return o.m=r,o.c=t,o.p="",o(0)})([(function(r,t){r.exports=(function(){if(typeof document>"u"||typeof window>"u")return{ask:function(){return"initial"},element:function(){return null},ignoreKeys:function(){},specificKeys:function(){},registerOnChange:function(){},unRegisterOnChange:function(){}};var o=document.documentElement,s=null,a="initial",c=a,g=Date.now(),f=!1,w=["button","input","select","textarea"],p=[],k=[16,17,18,91,93],y=[],A={keydown:"keyboard",keyup:"keyboard",mousedown:"mouse",mousemove:"mouse",MSPointerDown:"pointer",MSPointerMove:"pointer",pointerdown:"pointer",pointermove:"pointer",touchstart:"touch",touchend:"touch"},x=!1,E={x:null,y:null},M={2:"touch",3:"touch",4:"mouse"},I=!1;try{var C=Object.defineProperty({},"passive",{get:function(){I=!0}});window.addEventListener("test",null,C)}catch{}var q=function(){A[z()]="mouse",m()},m=function(){var i=I?{passive:!0,capture:!0}:!0;document.addEventListener("DOMContentLoaded",v,!0),window.PointerEvent?(window.addEventListener("pointerdown",S,!0),window.addEventListener("pointermove",P,!0)):window.MSPointerEvent?(window.addEventListener("MSPointerDown",S,!0),window.addEventListener("MSPointerMove",P,!0)):(window.addEventListener("mousedown",S,!0),window.addEventListener("mousemove",P,!0),"ontouchstart"in window&&(window.addEventListener("touchstart",S,i),window.addEventListener("touchend",S,!0))),window.addEventListener(z(),P,i),window.addEventListener("keydown",S,!0),window.addEventListener("keyup",S,!0),window.addEventListener("focusin",ie,!0),window.addEventListener("focusout",U,!0)},v=function(){if(f=!(o.getAttribute("data-whatpersist")==="false"||document.body.getAttribute("data-whatpersist")==="false"),f)try{window.sessionStorage.getItem("what-input")&&(a=window.sessionStorage.getItem("what-input")),window.sessionStorage.getItem("what-intent")&&(c=window.sessionStorage.getItem("what-intent"))}catch{}_("input"),_("intent")},S=function(i){var l=i.which,u=A[i.type];u==="pointer"&&(u=V(i));var de=!y.length&&k.indexOf(l)===-1,ue=y.length&&y.indexOf(l)!==-1,R=u==="keyboard"&&l&&(de||ue)||u==="mouse"||u==="touch";if(j(u)&&(R=!1),R&&a!==u&&(a=u,N("input",a),_("input")),R&&c!==u){var T=document.activeElement,me=T&&T.nodeName&&(w.indexOf(T.nodeName.toLowerCase())===-1||T.nodeName.toLowerCase()==="button"&&!le(T,"form"));me&&(c=u,N("intent",c),_("intent"))}},_=function(i){o.setAttribute("data-what"+i,i==="input"?a:c),se(i)},P=function(i){var l=A[i.type];l==="pointer"&&(l=V(i)),ce(i),(!x&&!j(l)||x&&i.type==="wheel"||i.type==="mousewheel"||i.type==="DOMMouseScroll")&&c!==l&&(c=l,N("intent",c),_("intent"))},ie=function(i){if(!i.target.nodeName){U();return}s=i.target.nodeName.toLowerCase(),o.setAttribute("data-whatelement",s),i.target.classList&&i.target.classList.length&&o.setAttribute("data-whatclasses",i.target.classList.toString().replace(" ",","))},U=function(){s=null,o.removeAttribute("data-whatelement"),o.removeAttribute("data-whatclasses")},N=function(i,l){if(f)try{window.sessionStorage.setItem("what-"+i,l)}catch{}},V=function(i){return typeof i.pointerType=="number"?M[i.pointerType]:i.pointerType==="pen"?"touch":i.pointerType},j=function(i){var l=Date.now(),u=i==="mouse"&&a==="touch"&&l-g<200;return g=l,u},z=function(){var i=null;return"onwheel"in document.createElement("div")?i="wheel":i=document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll",i},se=function(i){for(var l=0,u=p.length;l<u;l++)p[l].type===i&&p[l].fn.call(void 0,i==="input"?a:c)},ae=function(i){for(var l=0,u=p.length;l<u;l++)if(p[l].fn===i)return l},ce=function(i){E.x!==i.screenX||E.y!==i.screenY?(x=!1,E.x=i.screenX,E.y=i.screenY):x=!0},le=function(i,l){var u=window.Element.prototype;if(u.matches||(u.matches=u.msMatchesSelector||u.webkitMatchesSelector),u.closest)return i.closest(l);do{if(i.matches(l))return i;i=i.parentElement||i.parentNode}while(i!==null&&i.nodeType===1);return null};return"addEventListener"in window&&Array.prototype.indexOf&&q(),{ask:function(i){return i==="intent"?c:a},element:function(){return s},ignoreKeys:function(i){k=i},specificKeys:function(i){y=i},registerOnChange:function(i,l){p.push({fn:i,type:l||"input"})},unRegisterOnChange:function(i){var l=ae(i);(l||l===0)&&p.splice(l,1)},clearStorage:function(){window.sessionStorage.clear()}}})()})])})})(O)),O.exports}De();ye(!0);const Ne=()=>{const n=document.querySelector(".slm-footer__branding--image");n&&(n.style.cursor="pointer",n.addEventListener("click",()=>{const e=n.getAttribute("data-theme-version")||"Unknown",t=window.location.hostname==="localhost"||window.location.hostname.includes("127.0.0.1")||window.location.hostname.includes(".local")?"Development":"Production",o=`Theme Version Information
17
18Version: ${e}
19Environment: ${t}
20Host: ${window.location.hostname}
21Flag: Delta`;alert(o)}))},F=()=>
21{oe(),ve(),Se(),xe(),_e(),Ie(),pe(),Ce(),Te(),J(),re(),Ne()};if(typeof wp<"u"&&typeof wp.domReady<"u"){if(wp.domReady(()=>{F()}),wp.data&&typeof wp.data.subscribe=="function"){let n;wp.data.subscribe(()=>{clearTimeout(n),n=setTimeout(()=>{oe(),J(),re()},300)})}}else document.addEventListener("DOMContentLoaded",()=>{F()});export{Re as __vite_legacy_guard};

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.