PageSourceSearch

https://www.alegrablancos.com/cdn/shop/t/9/assets/product-form.js?v=128921987169064061651711999532

js alegrablancos.com collected 2026-10-04 13:26:51 UTC 2,269 bytes, 2 lines download raw bytes

1customElements.get("product-form")||customElements.define("product-form",class extends HTMLElement{constructor(){super(),this.form=this.querySelector("form"),this.form.querySelector("[name=id]").disabled=!1,this.form.addEventListener("submit",this.onSubmitHandler.bind(this)),this.cartNotification=document.querySelector("cart-drawer"),this.hideErrors=this.dataset.hideErrors==="true"}onSubmitHandler(evt){evt.preventDefault();const submitButton=this.querySelector('[type="submit"]');if(submitButton.classList.contains("loading"))return;this.handleErrorMessage(),this.cartNotification&&this.cartNotification.setActiveElement(document.activeElement),submitButton.setAttribute("aria-disabled",!0),submitButton.classList.add("loading");const config=fetchConfig("javascript");config.headers["X-Requested-With"]="XMLHttpRequest",delete config.headers["Content-Type"];const formData=new FormData(this.form);this.cartNotification&&formData.append("sections",this.cartNotification.getSectionsToRender().map(section=>section.id)),formData.append("sections_url",window.location.pathname),config.body=formData,fetch(`${routes.cart_add_url}`,config).then(response=>response.json()).then(response=>{if($(document).trigger("product-form-responsed",[response]),response.status){publish(PUB_SUB_EVENTS.cartError,{source:"product-form",productVariantId:formData.get("id"),errors:response.description,message:response.message}),this.handleErrorMessage(response.description);return}this.error||publish(PUB_SUB_EVENTS.cartUpdate,{source:"product-form",productVariantId:formData.get("id")}),this.cartNotification&&this.cartNotification.renderContents(response)}).catch(e=>{console.error(e)}).finally(()=>{submitButton.classList.remove("loading"),submitButton.removeAttribute("aria-disabled")})}handleErrorMessage(errorMessage=!1){this.hideErrors||(this.errorMessageWrapper=this.errorMessageWrapper||this.querySelector(".product-form__error-message-wrapper"),this.errorMessage=this.errorMessage||this.errorMessageWrapper.querySelector(".product-form__error-message"),this.errorMessageWrapper.toggleAttribute("hidden",!errorMessage),errorMessage&&(this.errorMessage.textContent=errorMessage))}});
2//# sourceMappingURL=/cdn/shop/t/9/assets/product-form.js.map?v=128921987169064061651711999532

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.