PageSourceSearch

https://marcobicego.com/cdn/shop/t/38/assets/predictive-search.js?v=9484224234639941281769520353

js marcobicego.com collected 2026-10-04 07:45:29 UTC 1,660 bytes, 2 lines download raw bytes

1class PredictiveSearch extends HTMLElement{constructor(){super(),this.input=this.querySelector('input[type="search"]'),this.predictiveSearchResults=this.querySelector("#predictive-search"),this.isOpen=!1,this.input.addEventListener("input",this.debounce(event=>{this.onChange(event)},300).bind(this)),window.addEventListener("resize",this.debounce(()=>{this.resize()},300).bind(this))}onChange(){const searchTerm=this.input.value.trim();if(!searchTerm.length){this.close();return}this.getSearchResults(searchTerm)}getSearchResults(searchTerm){fetch(`/search/suggest?q=${searchTerm}&section_id=predictive-search`).then(response=>{if(!response.ok){var error=new Error(response.status);throw this.close(),error}return response.text()}).then(text=>{const resultsMarkup=new DOMParser().parseFromString(text,"text/html").querySelector("#shopify-section-predictive-search").innerHTML;this.predictiveSearchResults.innerHTML=resultsMarkup,this.open()}).catch(error=>{throw this.close(),error})}open(){this.predictiveSearchResults.style.maxHeight=this.predictiveSearchResults.scrollHeight+"px",this.predictiveSearchResults.classList.add("open"),this.isOpen=!0}resize(){this.predictiveSearchResults.style.maxHeight=this.isOpen?this.predictiveSearchResults.scrollHeight+"px":"0px"}close(){this.predictiveSearchResults.style.maxHeight="0px",this.predictiveSearchResults.classList.remove("open"),this.isOpen=!1}debounce(fn,wait){let t;return(...args)=>{clearTimeout(t),t=setTimeout(()=>fn.apply(this,args),wait)}}}customElements.define("predictive-search",PredictiveSearch);
2//# sourceMappingURL=/cdn/shop/t/38/assets/predictive-search.js.map?v=9484224234639941281769520353

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.