PageSourceSearch

https://www.brig-simplon.ch/dist/js/ndspatterns/overlay/overlay-1G_zqevR.js

js brig-simplon.ch collected 2026-10-02 11:13:52 UTC 2,124 bytes, 1 lines download raw bytes

1import{n as e}from"../../debounce-B316v5qs.js";var t=`.js-overlay-toggle`;function n(){let n=document.querySelectorAll(t),r,i,a,o,s=!0,c=!1,l=e=>{e&&(e.scrollHeight>e.offsetHeight?e.classList.add(`is-scrollable`):e.classList.remove(`is-scrollable`))},u=e=>{e.key===`Escape`&&c&&p()},d=e=>{let t=a.getBoundingClientRect();i.style.setProperty(`--booking-menu-toggle-right`,document.documentElement.offsetWidth-t.right+`px`),i.style.setProperty(`--booking-menu-toggle-width`,t.width+`px`)},f=e.debounce(d,100),p=()=>{let e=document.querySelector(`.js-external-overlay`)||document.body,t=i.dataset.overlayContainerToggleClass||null;c=!i.classList.contains(`is-active`),s&&(s=!1,r=document.createElement(`button`),r.classList.add(`overlay-background`),r.setAttribute(`inert`,``),r.setAttribute(`aria-hidden`,`true`),r.addEventListener(`click`,p),e.append(r)),e.append(i),setTimeout(()=>{if(e.classList.toggle(`overlay-visible`),e.classList.toggle(`noscroll`),r.classList.toggle(`is-active`),r.toggleAttribute(`inert`),i.classList.toggle(`is-active`),t&&e.classList.toggle(t),document.querySelectorAll(`[data-overlay-id="`+i.id+`"]`).forEach(e=>{e.setAttribute(`aria-expanded`,c)}),i.hasAttribute(`id`)&&i.getAttribute(`id`)===`js-overlay-booking`&&(c?(d(c),window.addEventListener(`resize`,f)):window.removeEventListener(`resize`,f)),i.hasAttribute(`id`)&&i.getAttribute(`id`)===`js-overlay-menu`){let e=new CustomEvent(`menuToggle`,{detail:{open:i.classList.contains(`is-active`)}});window.dispatchEvent(e)}c?(i.removeAttribute(`inert`),document.addEventListener(`keydown`,u),i.querySelector(`.js-overlay-toggle`)&&i.querySelector(`.js-overlay-toggle`).focus()):(i.setAttribute(`inert`,``),document.removeEventListener(`keydown`,u));let n=i.querySelector(`.js-overlay-content[data-scroll="true"]`);o&&n&&o.disconnect(),c&&n&&(l(n),o=new ResizeObserver(e=>{for(let t of e)l(t.target),f()}),o.observe(n))},0)};n.forEach(e=>{let t=document.getElementById(e.dataset.overlayId);t?e.addEventListener(`click`,()=>{i=t,a=e,p()}):console.warn(`overlay with id `+e.dataset.overlayId+` not found!`)})}document.querySelector(t)!==null&&n();

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.