1(function(){window.postAddToCart=async function(variantId,frequencyId,options={}){if(!variantId)return;if(window.cartConfig?.limit_free_gift&&window.cartConfig.free_gift_available_variant_id&&String(variantId)===String(window.cartConfig.free_gift_available_variant_id)){alert("Sorry, this product is not available for direct sale.");return}const payload={id:parseInt(variantId,10),quantity:1};frequencyId&&(payload.selling_plan=parseInt(frequencyId,10));try{const formData=new FormData;formData.set("id",payload.id),formData.set("quantity",payload.quantity),payload.selling_plan&&formData.set("selling_plan",payload.selling_plan),formData.set("sections","cart-drawer,variant-added"),formData.set("sections_url",`${window.Shopify?.routes?.root||"/"}variants/${payload.id}`);const response=await fetch("/cart/add.js",{method:"POST",headers:{"X-Requested-With":"XMLHttpRequest"},body:formData});if(!response.ok)throw new Error("Failed to add product to cart");const responseJson=await response.json(),cartContent=await(await fetch("/cart.js")).json();return cartContent.sections=responseJson.sections,options.skipEvents||((options.triggerElement||document.documentElement).dispatchEvent(new CustomEvent("variant:add",{bubbles:!0,detail:{items:Object.prototype.hasOwnProperty.call(responseJson,"items")?responseJson.items:[responseJson],cart:cartContent}})),document.documentElement.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0,detail:{baseEvent:"variant:add",cart:cartContent}}))),options.skipCartDrawer||(await window.CartDrawer?.fetch?.(),window.CartDrawer?.show?.(!1)),responseJson}catch(error){throw console.error("Error adding to cart:",error),error}}})(); 2//# sourceMappingURL=/cdn/shop/t/295/assets/variant.js.map?v=5528863253101214311787085553
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.