PageSourceSearch

https://www.suisa.ch/.resources/suisa/webresources/js/AccordionPanel-2be64a6c.js

js suisa.ch collected 2026-10-02 05:24:31 UTC 1,840 bytes, 1 lines download raw bytes

1import"./ui.mjs";import"./es.array.slice-2b08de9d.js";import{B as e}from"./BaseModule-2f61b242.js";import{c as i}from"./cash.esm-275a63f3.js";import{d as t}from"./debounce-24922aea.js";import"./_baseGetTag-9207d2b7.js";class s extends e{constructor(){super()}init(e){return this.el=e,this.$el=i(this.el),this.domUid=this.$el.attr("id"),this.$inner=this.$el.children(".js-AccordionPanel--inner"),this.$link=this.$el.children(".js-AccordionPanel--link"),this.open=!1,this.preventLink=!1,this.bindEvents(),this.checkHash(),this}bindEvents(){if(this.on("click",".js-AccordionPanel--header",e=>{e.stopPropagation(),this.preventLink&&e.preventDefault(),this.open?this.closeOverlay():this.openOverlay()}),this.on(window,"hashchange",()=>{this.checkHash()}),this.on(window,"resize",t(()=>{this.open&&this.calculateHeight(this.$inner[0])},200)),matchMedia){var e=window.matchMedia("(min-width: 901px)");e.addEventListener&&e.addEventListener("change",e=>{this.widthChange(e)}),this.widthChange(e),this.on(window,"orientationchange",()=>{clearTimeout(this.orientationTimeout),this.orientationTimeout=setTimeout(()=>{this.widthChange(e)},10)})}this.on("closePanel",()=>{this.closeOverlay()})}openOverlay(){this.calculateHeight(this.$inner[0]),this.$el.addClass("is-open"),this.open=!0,this.$el.parents(".js-AccordionPanel--inner").length>0&&i(window).trigger("resize")}closeOverlay(){this.$inner[0].style.maxHeight="0px",this.$el.removeClass("is-open"),this.open=!1}calculateHeight(e){e.style.maxHeight=e.scrollHeight+"px"}widthChange(e){var i=e.matches;this.preventLink=!i}checkHash(){var e=window.location.hash.replace("#","");e&&e===this.domUid&&setTimeout(()=>{this.openOverlay();var e=window.pageYOffset+this.el.getBoundingClientRect().top-100;window.scrollTo({top:Math.max(e,0),behavior:"smooth"})},100)}}export default function(){return new s}

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.