PageSourceSearch

https://shop.aids.ch/cdn/shop/t/9/compiled_assets/snippet-scripts.js?v=121088010145156580691779189710

js aids.ch collected 2026-09-24 19:47:19 UTC 8,349 bytes, 2 lines download raw bytes

1(function(){var __snippets__={};(function(){for(var element=document.getElementById("snippets-script"),attribute=element?element.getAttribute("data-snippets"):"",snippets=attribute.split(",").filter(Boolean),i=0;i<snippets.length;i++)__snippets__[snippets[i]]=!0})(),(function(){if(!(!__snippets__["add-to-cart"]&&!Shopify.designMode))try{class AddToCart extends HTMLElement{constructor(){super(),this.elements={form:this.querySelector("form"),select:this.querySelector("select")},this.elements.select?.addEventListener("change",this.setOpenVariant.bind(this))}setOpenVariant(){window.location=this.elements.select.value}}customElements.define("add-to-cart",AddToCart)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["amount-selector"]&&!Shopify.designMode))try{class AmountSelector extends HTMLElement{static observedAttributes=["value","min","max","name"];constructor(){super(),this.elements={decreaseButton:this.querySelector("button:first-of-type"),increaseButton:this.querySelector("button:last-of-type"),input:this.querySelector("input")},this.elements.decreaseButton.addEventListener("click",this.setDecrease.bind(this)),this.elements.increaseButton.addEventListener("click",this.setIncrease.bind(this)),this.elements.input.addEventListener("keyup",this.setLimit.bind(this))}setDecrease(){(parseInt(this.elements.input.getAttribute("min"))??1)!==parseInt(this.elements.input.value)&&this.elements.input.value--}setIncrease(){(parseInt(this.elements.input.getAttribute("max"))??1/0)!==parseInt(this.elements.input.value)&&this.elements.input.value++}setLimit(){const min=parseInt(this.elements.input.getAttribute("min"))??1,max=parseInt(this.elements.input.getAttribute("max"))??1/0;if(console.log(typeof max),min>this.elements.input.value){this.elements.input.value=min;return}if(max<this.elements.input.value){this.elements.input.value=max;return}}attributeChangedCallback(name,oldValue,newValue){this.elements.input[name]=newValue}}customElements.define("amount-selector",AmountSelector)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["download-selector"]&&!Shopify.designMode))try{class DownloadSelector extends HTMLElement{constructor(){super(),this.elements={form:this.querySelector("form")},this.elements.form.addEventListener("submit",this.setDownload.bind(this))}gtag(){window.dataLayer=window.dataLayer||[],dataLayer.push(arguments)}setDownload(event){event.preventDefault();const url=new FormData(this.elements.form).get("file"),baseUrl="https://aids.ch",filename=new URL(url,baseUrl).pathname.split("/").reverse()[0],download=document.createElement("a");download.href=url,download.target="_blank",download.download=filename,download.click(),download.remove(),this.gtag("event","pdf_download",{filename})}}customElements.define("download-selector",DownloadSelector)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["flyout-cart"]&&!Shopify.designMode))try{class FlyoutCart extends HTMLElement{constructor(){super(),this.elements={form:this.querySelector("form"),removeLinks:this.querySelectorAll(".remove-link")},this.elements.form.addEventListener("submit",this.setUpdateCart.bind(this)),this.elements.removeLinks.forEach(link=>link.addEventListener("click",this.setRemoveItem.bind(this)))}setUpdateCart=async event=>{event.preventDefault();const data=new FormData(event.target),formObject=Object.fromEntries(data.entries()),request=await fetch(window.Shopify.routes.root+"cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:formObject})});window.location.hash="show-cart",window.location.reload()};setRemoveItem=async event=>{event.preventDefault(),await fetch(event.currentTarget.href),window.location.hash="show-cart",window.location.reload()}}customElements.define("flyout-cart",FlyoutCart)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["language-selector"]&&!Shopify.designMode))try{class LocalizationForm extends HTMLElement{constructor(){super(),this.elements={form:this.querySelector("form"),input:this.querySelector('input[name="language_code"], input[name="country_code"]'),button:this.querySelector("button"),panel:this.querySelector("ul")},this.elements.button.addEventListener("click",this.openSelector.bind(this)),this.elements.form.addEventListener("focusout",this.closeSelector.bind(this)),this.addEventListener("keyup",this.onContainerKeyUp.bind(this)),this.querySelectorAll("a").forEach(item=>item.addEventListener("click",this.onItemClick.bind(this)))}hidePanel(){this.elements.button.setAttribute("aria-expanded","fal
1se"),this.elements.panel.setAttribute("hidden",!0)}onContainerKeyUp(event){event.code.toUpperCase()==="ESCAPE"&&(this.hidePanel(),this.elements.button.focus())}onItemClick(event){event.preventDefault();const form=this.querySelector("form");this.elements.input.value=event.currentTarget.dataset.value,form&&form.submit()}openSelector(){this.elements.button.focus(),this.elements.panel.toggleAttribute("hidden"),this.elements.button.setAttribute("aria-expanded",(this.elements.button.getAttribute("aria-expanded")==="false").toString())}closeSelector(event){console.log(event),!event?.relatedTarget?.closest("localization-form")&&this.hidePanel()}}customElements.define("localization-form",LocalizationForm)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["mobile-menu"]&&!Shopify.designMode))try{class MobileMenu extends HTMLElement{constructor(){super(),this.elements={details:this.querySelectorAll('details[data-active="true"]'),select:this.querySelector("select")},this.elements.select.addEventListener("change",this.onLanguageChange.bind(this)),this.elements.details.forEach(detail=>{detail.setAttribute("open",!0)})}onLanguageChange(event){this.querySelector("form").submit()}}customElements.define("mobile-menu",MobileMenu)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["product-variant-selector"]&&!Shopify.designMode))try{class ProductVariantSelector extends HTMLElement{constructor(){super(),this.elements={form:this.querySelector("form"),select:this.querySelector("select")},this.elements.form?.addEventListener("change",this.setOpenVariant.bind(this))}setOpenVariant(){window.location=this.elements.select.value}}customElements.define("product-variant-selector",ProductVariantSelector)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["search-form"]&&!Shopify.designMode))try{class SearchForm extends HTMLElement{constructor(){super(),this.elements={input:this.querySelector('input[name="q"]'),button:this.querySelector("button"),form:this.querySelector("form"),panel:this.querySelector("fieldset")},this.elements.button.addEventListener("click",this.toggleSelector.bind(this)),this.elements.form.addEventListener("focusout",this.closeSelector.bind(this)),this.addEventListener("keyup",this.onContainerKeyUp.bind(this))}hidePanel(){this.elements.button.setAttribute("aria-expanded","false"),this.elements.panel.setAttribute("hidden",!0)}onContainerKeyUp(event){event.code.toUpperCase()==="ESCAPE"&&(this.hidePanel(),this.elements.button.focus())}toggleSelector(){this.elements.panel.toggleAttribute("hidden"),this.elements.button.setAttribute("aria-expanded",(this.elements.button.getAttribute("aria-expanded")==="false").toString()),setTimeout(()=>{this.elements.panel.hasAttribute("hidden")||this.elements.input.focus()},0)}closeSelector(event){event?.relatedTarget?.closest("search-form")||this.hidePanel()}}customElements.define("search-form",SearchForm)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["stock-info"]&&!Shopify.designMode))try{class StockInfo extends HTMLElement{}customElements.define("stock-info",StockInfo)}catch(e){console.error(e)}})(),(function(){if(!(!__snippets__["storefront-filter"]&&!Shopify.designMode))try{class StorefrontFilter extends HTMLElement{constructor(){super(),this.elements={buttons:this.querySelectorAll('button[data-type="close-filter"]'),details:this.querySelectorAll("details")},this.elements.buttons.forEach(button=>button.addEventListener("click",this.closeDetails.bind(this)))}closeDetails(){this.elements.details.forEach(detail=>detail.removeAttribute("open"))}}customElements.define("storefront-filter",StorefrontFilter)}catch(e){console.error(e)}})()})();
2//# sourceMappingURL=/cdn/shop/t/9/compiled_assets/snippet-scripts.js.map?v=121088010145156580691779189710

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.