1(async()=>{const{debounce,parseHTML}=await import(window.theme.modules.utils),baseComponent=await import(window.theme.modules.baseComponent);customElements.define("predictive-search-input",class extends baseComponent.default{elements={input:'input[name="q"]',results:"[data-results]"};minChars=3;render(){this.sources=this.getAttribute("sources").split(",").filter(Boolean),this.$input.setAttribute("autocomplete","off"),this.$input.focus(),this.$input.addEventListener("input",debounce(this._inputHandler.bind(this),300).bind(this))}_inputHandler(e){this.searchQuery=this.$input.value.trim(),this.searchQuery.length>=this.minChars?this._getSearchResults():this._cleanResults()}_getSearchResults(){const query=`q=${window.encodeURIComponent(this.searchQuery)}`,type=`${window.encodeURIComponent("resources[type]")}=${this.sources.join(",")}${this.hasAttribute("only-stock-products")?"resources[options][unavailable_products]=hide":""}`,limit=`${window.encodeURIComponent("resources[limit]")}=${this.getAttribute("results-limit")}`;fetch(`${window.theme.routes.predictiveSearch}?${[query,type,limit,"section_id=predictive-search"].join("&")}`).then(res=>{if(res.ok)return res.text()}).then(text=>{const resultsMarkup=parseHTML(text).querySelector("#shopify-section-predictive-search");resultsMarkup?this.$results.replaceChildren(resultsMarkup):this._cleanResults()})}_cleanResults(){this.$results.replaceChildren()}})})(); 2//# sourceMappingURL=/cdn/shop/t/33/assets/predictive-search-input.js.map?v=69810986782691168871715437301
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.