1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[5335],{86969:(t,e,i)=>{i.r(e),i.d(e,{default:()=>o});var s=i(21464);class o{constructor(t,e,i){this.charLength=3,this.element=t,this.options=(0,s.$E)(this.element,Object.assign(this.getDefaultOptions(),i)),this.autocompleteWrapper=t.querySelector(`.${this.options.ContentSelector}`),this.inputField=this.element.querySelector(`.${this.options.InputField}`),this.charLength=this.options.CharLength,this.callBackFn=e,this.initEventHandlers()}initEventHandlers(){document.addEventListener("click",t=>this.documentOnClickHandler(t)),this.inputField.addEventListener("keyup",t=>this.shouldAutoCompleteAppear()),this.autocompleteWrapper.addEventListener("click",t=>this.callBackFn(t))}showAutoComplete(t,e){if(!(e.length>0))return this.autocompleteWrapper.innerHTML="",void this.autocompleteWrapper.classList.remove(`${this.options.ContentSelector}--active`);this.autocompleteWrapper.classList.add(`${this.options.ContentSelector}--active`);let i='<ul class="nx-autocomplete--list">';e.forEach((e,s)=>{i+=`<li class="nx-autocomplete--list-item" data-index="${s}">\n ${e.replace(new RegExp(t,"i"),"<strong>$&</strong>")}\n </li>`}),i+="</ul>",this.autocompleteWrapper.innerHTML=i}shouldAutoCompleteAppear(){this.inputField.value.length<this.charLength&&this.autocompleteWrapper.classList.contains(`${this.options.ContentSelector}--active`)&&this.autocompleteWrapper.classList.remove(`${this.options.ContentSelector}--active`)}documentOnClickHandler(t){t.target.closest(`.${this.options.ContentSelector}`)||this.autocompleteWrapper.classList.remove(`${this.options.ContentSelector}--active`)}getDefaultOptions(){return{ContentSelector:"nx-autocomplete-result",InputField:"nx-input-text__field",CharLength:3}}}}}]); 2//# sourceMappingURL=/dist/NiveaX/./modules/UvCalculator-AutoComplete.9a7cbad1.js.b606eb9d.map
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.