1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[47550],{7550:(e,t,o)=>{o.r(t),o.d(t,{default:()=>n});var s=o(9568),i=o(447),l=o(4049);class n extends s.Z{init(){if(!this.options.selector)throw Error('The option "selector" must be given!');this._registerEvents()}_registerEvents(){this.el.addEventListener("click",this._onClick.bind(this))}_onClick(){if(!this._isInAllowedViewports())return;let e=this.options.selector;l.Z.isNode(this.options.selector)||(e=l.Z.querySelector(document,this.options.selector)),this.options.scrollToElement&&this._scrollToElement(e);let t=null;document.createEvent?(t=document.createEvent("MouseEvents")).initEvent("click",!0,!0):t=new MouseEvent("click",{target:e}),e.dispatchEvent(t),this.$emitter.publish("onClick")}_scrollToElement(e){let t=this._getOffset(e);window.scrollTo({top:t,behavior:"smooth"})}_getOffset(e){let t=e.getBoundingClientRect().top+window.scrollY-this.options.scrollOffset,o=l.Z.querySelector(document,this.options.fixedHeaderSelector,!1);return o&&(t-=o.getBoundingClientRect().height),t}_isInAllowedViewports(){return!this.options.excludedViewports.includes(i.Z.getCurrentViewport())}}n.options={selector:!1,scrollToElement:!0,scrollOffset:15,fixedHeaderSelector:"header.fixed-top",excludedViewports:[]}}}]);
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.