1(function(e){e.extend({AdvanceWooDiscountRules:{form:null,product_id:null,quantity:0,options:[],target:null,getDynamicDiscountPriceFromCartForm:function(e,t,n){typeof n!="undefined"&&(this.options=n),typeof t!="undefined"&&(this.target=t),typeof e!="undefined"&&e.is("form")?this.form=e:this.logError("Incorrect form provided"),this.product_id=this.getProductIdFromForm(),this.quantity=this.getProductQuantityFromForm(),this.getDiscountPriceForProduct()},getDiscountPriceForProduct:function(){if(this.product_id===null||this.product_id==0)return this.logError("Invalid product"),[];var n,s,t={action:"awdr_get_product_discount",product_id:this.product_id,qty:this.quantity,awdr_nonce:awdr_params.nonce};typeof this.options.custom_price!="undefined"&&(t.custom_price=this.options.custom_price),n=this.target,s=this.options,e.ajax({url:awdr_params.ajaxurl,data:t,type:"POST",success:function(t){e(document.body).trigger("advanced_woo_discount_rules_on_get_response_for_dynamic_discount",[t,n,s])},error:function(){}})},getProductIdFromForm:function(){var e=this.form.find('[name="variation_id"]'),t=this.form.find('[name="add-to-cart"]');return e.length?parseInt(e.val()):!!t.length&&parseInt(t.val())},getProductQuantityFromForm:function(){var e=this.form.find('input[name="quantity"]');return e.length===0?0:e.val()},logError:function(e){console.error("Advance discount rule error: %s",e)}}})})(jQuery)
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.