https://madridbullfighting.com/wp-content/plugins/woocommerce-product-addons/assets/js/addons.min.js
1jQuery(function(b){var u={isGroupedMixedProductType:function(){var a=b(".product-type-grouped"),o=0,t=0;return!!(a.length&&(a.find(".group_table tr.product").each(function(){0<b(this).find(".input-text.qty").val()&&(b(this).find(".entry-summary .subscription-details").length?o++:t++)}),0<o&&0<t))},isGroupedSubsSelected:function(){var a=b(".product-type-grouped"),o=!1;return a.length&&a.find(".group_table tr.product").each(function(){if(0<b(this).find(".input-text.qty").val()&&b(this).find(".entry-summary .subscription-details").length)return!(o=!0)}),o},formatMoney:function(a){return accounting.formatMoney(a,{symbol:woocommerce_addons_params.currency_format_symbol,decimal:woocommerce_addons_params.currency_format_decimal_sep,thousand:woocommerce_addons_params.currency_format_thousand_sep,precision:woocommerce_addons_params.trim_trailing_zeros?0:woocommerce_addons_params.currency_format_num_decimals,format:woocommerce_addons_params.currency_format})},getCostByTax:function(a,o){return woocommerce_addons_params.price_include_tax&&woocommerce_addons_params.display_include_tax?a:woocommerce_addons_params.price_include_tax&&!woocommerce_addons_params.display_include_tax?o:!woocommerce_addons_params.price_include_tax&&woocommerce_addons_params.display_include_tax?o:woocommerce_addons_params.price_include_tax||woocommerce_addons_params.display_include_tax?o:a},init:function(a){var p=a,l=!!p.hasClass("variations_form")&&p.find('input[name="variation_id"], input.variation_id');p.on("click",".reset_variations",function(){b.each(p.find(".product-addon"),function(){var a=b(this).find(".addon");(a.is(":checkbox")||a.is(":radio"))&&a.prop("checked",!1),a.is("select")&&a.prop("selectedIndex",0),(a.is(":text")||a.is("textarea")||a.is('input[type="number"]')||a.is('input[type="file"]'))&&a.val("")}),p.trigger("woocommerce-product-addons-update")}).on("mouseup","input[type=number]",function(){b(this).trigger("woocommerce-product-addons-update")}).on("keyup change",".wc-pao-addon input, .wc-pao-addon textarea",function(){if(0<b(this).attr("maxlength")){var a=b(this).val(),o=b(this).attr("maxlength")-a.length;b(this).next(".wc-pao-addon-chars-remaining").find("span").text(o)}}).on("keyup",".wc-pao-addon-custom-textarea, .wc-pao-addon-custom-text, .wc-pao-addon-custom-price",function(){b(this).trigger("woocommerce-product-addons-update")}).on("change",".wc-pao-addon input, .wc-pao-addon textarea, .wc-pao-addon select, input.qty",function(){b(this).trigger("woocommerce-product-addons-update")}).on("found_variation",function(a,o){var t=b(this),e=t.find("#product-addons-total");if(void 0!==o.display_price)e.data("price",o.display_price);else if(b(o.price_html).find(".amount:last").length){var i=b(o.price_html).find(".amount:last").text();i=(i=(i=(i=i.replace(woocommerce_addons_params.currency_format_symbol,"")).replace(woocommerce_addons_params.currency_format_thousand_sep,"")).replace(woocommerce_addons_params.currency_format_decimal_sep,".")).replace(/[^0-9\.]/g,""),i=parseFloat(i),e.data("price",i)}t.trigger("woocommerce-product-addons-update")}).on("woocommerce-product-addons-update",function(){var f=0,h=0,e=p.find("#product-addons-total"),a=l&&0<l.length?l.val():e.data("product-id"),w=e.data("price"),g=e.data("type"),v=parseFloat(p.find("input.qty").val()),y=[];if(""===w&&"undefined"!=typeof custom_gift_card_amount&&custom_gift_card_amount.length&&0<custom_gift_card_amount.val()&&(w=custom_gift_card_amount.val()),woocommerce_addons_params.is_bookings&&b(".wc-bookings-booking-cost").length&&(w=parseFloat(b(".wc-bookings-booking-cost").attr("data-raw-price"))),p.find(".wc-pao-addon-field").each(function(){var a=b(this).parents(".wc-pao-addon"),o=a.find(".wc-pao-addon-name").length?a.find(".wc-pao-addon-name").data("addon-name"):"",t="",e=0,i=0,s=b(this).data("price-type"),n=!1,c={},d=!!a.find(".wc-pao-addon-name").length&&a.find(".wc-pao-addon-name").data("has-per-person-pricing"),r=!!a.find(".wc-pao-addon-name").length&&a.find(".wc-pao-addon-name").data("has-per-block-pricing");if(b(this).is(".wc-pao-addon-custom-price")){if(!b(this).val())return;n=!0,e=b(this).val(),i=b(this).val(),s="flat_fee"}else if(b(this).is(".wc-pao-addon-input-multiplier")){if(isNaN(b(this).val())||""===b(this).val()?(b(this).val(""),b(this).closest("p").find(".wc-pao-addon-alert").show()):(""!==b(this).val()&&b(this).val(Math.ceil(b(this).val())),b(this).closest("p").find(".wc-pao-addon-alert").hide()),!b(this).val())return;e=b(this).data("price")*b(this).val(),i=b(this).data("raw-price")*b(this).val()}else if(b(this).is(".wc-pao-addon-checkbox, .wc-pao-addon-radio")){if(!b(this).is(":checked"))return;t=b(this).data("label"),e=b(this).data("price"),i=b(this).data("raw-price")}else if(b(this).is(".wc-pao-addon-image-swatch-select, .wc-pao-addon-select")){if(!b(this).find("option:selected")||""===b(this).find("option:selected").val())return;s=b(this).find("option:selected").data("price-type"),b(this).val()&&(t=b(this).find("option:selected").data("label"),e=b(this).find("option:selected").data("price"),i=b(this).find("option:selected").data("raw-price"))}else{if(!b(this).val())return;e=b(this).data("price"),i=b(this).data("raw-price")}if(e||(e=0),i||(i=0),"booking"===g&&woocommerce_addons_params.is_bookings){var p=v=0;void 0!==b("#wc_bookings_field_duration")&&0<b("#wc_bookings_field_duration").val()&&(p=b("#wc_bookings_field_duration").val());var l=b("#wc_bookings_field_persons"),u=0;1===l.length?u=parseInt(u,10)+parseInt(l.val(),10):b(".wc-bookings-booking-form").find("input").each(function(){var a=this.id.match(/wc_bookings_field_persons_(\d+)/);null!=a&&b("#"+a[0]).length&&(u=parseInt(u,10)+parseInt(b("#"+a[0]).val(),10))}),0===v&&b(".wc-bookings-booking-cost").length&&(v=1),d&&(v*=u),r&&(v*=p)}switch(s){case"flat_fee":c.cost=parseFloat(e),c.cost_raw=parseFloat(i);break;case"quantity_based":c.cost_pu=parseFloat(e),c.cost_raw_pu=parseFloat(i),c.cost=c.cost_pu*v,c.c
1ost_raw=c.cost_raw_pu*v;break;case"percentage_based":c.cost_pct=parseFloat(e)/100,c.cost_raw_pct=parseFloat(i)/100,c.cost=parseFloat(w)*c.cost_pct*v,c.cost_raw=parseFloat(w)*c.cost_raw_pct*v}if(f+=c.cost,h+=c.cost_raw,void 0!==t){if("number"==typeof t||t.length)c.name=o+(t?" - "+t:"");else{var _=b(this).val(),m=parseInt(woocommerce_addons_params.trim_user_input_characters,10);b(this).is(".wc-pao-addon-file-upload")&&(_=_.replace(/^.*[\\\/]/,"")),m<_.length&&(_=_.slice(0,m)+"..."),c.name=o+" - "+_}c.is_custom_price=n,c.price_type=s,y.push(c)}}),e.data("price_data",y),v){var o,i,t=!1;u.formatMoney(f);if(void 0!==w&&a&&(o=b(".wc-bookings-booking-form").length?parseFloat(w):parseFloat(w*v),i=u.formatMoney(o+f)),b(this).parent().find(".subscription-details").length&&!p.hasClass("bundle_data")){t=b(this).parent().find(".subscription-details");l&&0<l.length&&(t=b(this).parent().find(".woocommerce-variation .subscription-details")),t=b(t).clone().wrap("<p>").parent().html()}if("grouped"===g?t&&!isGroupedMixedProductType()&&isGroupedSubsSelected()&&(t,i&&(i+=t)):t&&i&&(i+=t),i&&"1"==e.data("show-sub-total")){var s=b(this).find(".wc-pao-addon-container").data("product-name"),n=u.formatMoney(o);if(b(".wc-bookings-booking-form").length)var c='<div class="product-addon-totals"><ul><li><div class="wc-pao-col1"><strong>'+s+'</strong></div><div class="wc-pao-col2"><strong>'+n+"</strong></div></li>";else c='<div class="product-addon-totals"><ul><li><div class="wc-pao-col1"><strong>'+v+woocommerce_addons_params.quantity_symbol+s+'</strong></div><div class="wc-pao-col2"><strong>'+n+"</strong></div></li>";y.length&&(b.each(y,function(a,o){if("quantity_based"===o.price_type){var t=u.getCostByTax(o.cost_raw,o.cost),e=0===t?"-":u.formatMoney(t);c=c+'<li class="wc-pao-row-quantity-based"><div class="wc-pao-col1">'+o.name+'</div><div class="wc-pao-col2"><span class="amount">'+e+"</span></div></li>"}}),b.each(y,function(a,o){if("quantity_based"!==o.price_type){if("percentage_based"!==o.price_type)var t=u.getCostByTax(o.cost_raw,o.cost);else t=o.cost_raw;var e=0===t?"-":'<span class="amount">'+u.formatMoney(t)+"</span>";c=c+'<li><div class="wc-pao-col1"><strong>'+o.name+'</strong></div><div class="wc-pao-col2">'+e+"</div></li>"}}));var d="",r=void 0===e.data("i18n_sub_total")?woocommerce_addons_params.i18n_sub_total:e.data("i18n_sub_total");if(!woocommerce_addons_params.price_display_suffix||!woocommerce_addons_params.tax_enabled)return c=c+'<li class="wc-pao-subtotal-line"><p class="price">'+r+' <span class="amount">'+i+"</span></p></li></ul></div>",e.html(c),void p.trigger("updated_addons");if(!1==-1<woocommerce_addons_params.price_display_suffix.indexOf("{price_including_tax}")&&!1==-1<woocommerce_addons_params.price_display_suffix.indexOf("{price_excluding_tax}"))return c=c+'<li class="wc-pao-subtotal-line"><strong>'+r+' <span class="amount">'+i+"</span> "+woocommerce_addons_params.price_display_suffix+"</strong></li></ul></div>",e.html(c),void p.trigger("updated_addons");b.ajax({type:"POST",url:woocommerce_addons_params.ajax_url,data:{action:"wc_product_addons_calculate_tax",product_id:a,add_on_total:f,add_on_total_raw:h,qty:v},success:function(a){if("SUCCESS"==a.result){d='<small class="woocommerce-price-suffix">'+woocommerce_addons_params.price_display_suffix+"</small>";var o=u.formatMoney(a.price_including_tax),t=u.formatMoney(a.price_excluding_tax);d=(d=d.replace("{price_including_tax}",o)).replace("{price_excluding_tax}",t),c=c+'<li class="wc-pao-subtotal-line"><p class="price">'+r+' <span class="amount">'+i+"</span> "+d+" </p></li></ul></div>",e.html(c),p.trigger("updated_addons")}else c=c+'<li class="wc-pao-subtotal-line"><p class="price">'+r+' <span class="amount">'+i+"</span></p></li></ul></div>",e.html(c),p.trigger("updated_addons")},error:function(){c=c+'<li class="wc-pao-subtotal-line"><p class="price">'+r+' <span class="amount">'+i+"</span></p></li></ul></div>",e.html(c),p.trigger("updated_addons")}})}else e.empty(),p.trigger("updated_addons")}else e.empty(),p.trigger("updated_addons")}).on("click",".wc-pao-addon-image-swatch",function(a){a.preventDefault();var o=b(this).data("value"),t=b(this).parents(".wc-pao-addon-wrap"),e=b.parseHTML(b(this).data("price"));t.prev("label").find(".wc-pao-addon-image-swatch-price").remove(),t.find(".wc-pao-addon-image-swatch").removeClass("selected"),b(this).addClass("selected"),t.find(".wc-pao-addon-image-swatch-select").val(o
1),t.prev("label").append(b(e)),p.trigger("woocommerce-product-addons-update")}),p.find(" .wc-pao-addon-custom-text, .wc-pao-addon-custom-textarea").each(function(){0<b(this).attr("maxlength")&&b(this).after('<small class="wc-pao-addon-chars-remaining"><span>'+b(this).attr("maxlength")+"</span> "+woocommerce_addons_params.i18n_remaining+"</small>")}),b("#credit_called").on("keyup",function(){p.trigger("woocommerce-product-addons-update")}),p.find(".wc-pao-addon-custom, .wc-pao-addon-custom-textarea, .wc-pao-addon input, .wc-pao-addon textarea, .wc-pao-addon select, input.qty, .variations select").change(),b(".wc-pao-addon-image-swatch").tipTip({delay:200})}};b("body").on("quick-view-displayed",function(){b(this).find(".cart:not(.cart_group)").each(function(){u.init(b(this))})}),b("body .component").on("wc-composite-component-loaded",function(){b(this).find(".cart").each(function(){u.init(b(this))})}),b("body").find(".cart:not(.cart_group)").each(function(){u.init(b(this))})});
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.