1class i{static constructSearchParams(a){const t=new URLSearchParams(window.location.search),e=new URLSearchParams,r=t.get("sort_by"),o=t.get("q");return r&&!a.length?(e.append("sort_by",r),e):o&&!a.length?(e.append("q",o),e):a.length?(a.forEach(n=>{n.values.forEach(s=>{const c=n.type==="multiple"||n.type==="price"?`${n.param_name}[]`:n.param_name;e.append(c,s)})}),[...t.entries()].forEach(([n,s])=>{e.has(n)||e.set(n,s)}),e):""}static cleanPriceFilter(a){return a.replace(/\*/g,"").replace(/-/g,":")}static replaceHyphensWithEncoded(a){return a.replace(/-/g,":")}static replaceEncodedWithHyphens(a){return a.replace(/:/g,"-")}static updateUrlWithFilters(a){const e=i.constructSearchParams(a).toString(),r=decodeURIComponent(e),o=`${window.location.pathname}?${r}`;window.history.replaceState({},"",o)}static removeUrlFilters(a){const t=new URLSearchParams(window.location.search);a.forEach(r=>{(t.has(r.param_name)||t.has(`${r.param_name}[]`))&&(t.delete(r.param_name),t.delete(`${r.param_name}[]`))}),t.delete("active_tab");const e=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",e)}static removeUrlParam(a){const t=new URLSearchParams(window.location.search);t.delete(a);const e=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",e)}static getFiltersFromUrl(){const a=new URLSearchParams(window.location.search);a.delete("sort_by"),a.delete("q");const t=[];return a.forEach((e,r)=>{const o=decodeURIComponent(r),n=o.endsWith("[]")||o.endsWith("%5B%5D")?"multiple":"single",s=n==="multiple"?o.replace(/(\[\]|%5B%5D)$/,""):o,c=t.find(m=>m.param_name===s);c?c.values.push(e):t.push({param_name:s,values:[e],type:n})}),t}static updateUrlWithSortOptions(a){const t=new URLSearchParams(window.location.search);t.set("sort_by",a);const e=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",e)}static getSortOptionFromUrl(){return new URLSearchParams(window.location.search).get("sort_by")||"manual"}static updateUrlWithActiveTab(a){const t=new URLSearchParams(window.location.search);a?t.set("active_tab",a):t.delete("active_tab");const e=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",e)}static getActiveTabFromUrl(){return new URLSearchParams(window.location.search).get("active_tab")||""}static getSearchQuery(){return new URLSearchParams(window.location.search).get("q")}static getPage(){return new URLSearchParams(window.location.search).get("page")}static getVariant(){return new URLSearchParams(window.location.search).get("variant")}static getRelated(){return new URLSearchParams(window.location.search).get("related")}static setPage(a){const t=new URLSearchParams(window.location.search);t.set("page",a);const e=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",e)}static setVariant(a){const t=new URLSearchParams(window.location.search);t.set("variant",a);const e=`${window.location.pathname}?${t.toString()}`;window.history.replaceState({},"",e)}}export{i as U};
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.