1"use strict";(self.webpackChunkmoorl_foundation=self.webpackChunkmoorl_foundation||[]).push([[27412],{412(e,t,s){s.r(t),s.d(t,{default:()=>l});let i=window.PluginBaseClass;class l extends i{static #e=this.options={offsetTop:window.moorlOffsetTop??50};init(){this._cmsPageElement=document.querySelector(".cms-page"),this._headingElements=this._cmsPageElement.querySelectorAll("h2,h3,h5,h5,h6"),this._selectedTocLink=window.location.hash,this._selectedHeadline=null,this._registerEvents()}_registerEvents(){let e=this;window.addEventListener("scroll",t=>{e._onScroll()})}_onScroll(){let e=this._currentSection();e!==this._selectedTocLink&&(this._selectedTocLink=e,this._selectTocLink(this._selectedTocLink))}_currentSection(){return(this._headingElements.forEach(e=>{""!==e.id&&(""===this._selectedTocLink&&(this._selectedHeadline=e,this._selectedTocLink=" "),e.getBoundingClientRect().top<=this.options.offsetTop&&(this._selectedHeadline=e))}),null!==this._selectedHeadline)?this._selectedHeadline.id:this._selectedTocLink}_selectTocLink(e){""!==e.trim()&&(this.el.querySelectorAll(".active").forEach(e=>{e.classList.remove("active")}),this._getParents(this.el.querySelector('a[href="#'+e+'"]'),"li").forEach(e=>{e.classList.add("active")}))}_getParents(e,t){let s=[];for(;e&&e!==document;e=e.parentNode){if(t){e.matches(t)&&s.push(e);continue}s.push(e)}return 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.