PageSourceSearch

https://hookingrugs.com/cdn/shop/t/34/assets/product-form.js?v=64323698475805273091721816884

js hookingrugs.com collected 2026-09-26 00:47:54 UTC 1,643 bytes, 2 lines download raw bytes

1(async()=>{const{Core}=await importModule("Core"),PREFIX_BUY_WITH="buy_with_",LINE_ITEM_PROPS_REGEXP=/(?<=\[).+?(?=\])/;customElements.define("product-form",class extends Core{elements={formTargeter:"[data-product-form-targeter]",toCartButton:"product-to-cart"};render(){this.$formTargeter&&(this.$form=this.$formTargeter.form,this.$form?.addEventListener("submit",this._submitHandler.bind(this)))}_submitHandler(e){e.preventDefault(),this.$toCartButton.addToCart(this.cartItems,this.mainVariantId)}_isVariantInput([inputName,value]){return inputName==="selling_plan"&&this._setSellingPlan(value),inputName.includes(PREFIX_BUY_WITH)||inputName==="id"}_setSellingPlan(id){this.sellingPlanId=id}_setCartItem([inputName,value]){inputName==="id"&&(this.mainVariantId=value);const sellingPlanId=this.sellingPlanId||"";return{id:value,quantity:this._getItemQty(inputName),selling_plan:inputName==="id"?sellingPlanId:"",properties:this._getProperties(inputName)}}_getItemQty(inputName){return inputName==="id"?this.qty:1}_getProperties(inputName){return inputName==="id"?this.properties:{}}get cartItems(){return Array.from(this.formData.entries()).filter(this._isVariantInput.bind(this)).map(this._setCartItem.bind(this))}get formData(){return new FormData(this.$form)}get qty(){return+this.formData.get("quantity")||1}get properties(){return Array.from(this.formData.entries()).reduce((acc,[key,val])=>{if(key.startsWith("properties[")&&key.endsWith("]")&&val){const propKey=key.match(LINE_ITEM_PROPS_REGEXP)[0];acc[propKey]=val}return acc},{})}})})();
2//# sourceMappingURL=/cdn/shop/t/34/assets/product-form.js.map?v=64323698475805273091721816884

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.