PageSourceSearch

https://www.qoctor.com.au/wp-content/plugins/woocommerce-product-b…/js/frontend/add-to-cart-bundle.min.js

js qoctor.com.au collected 2026-09-28 08:59:03 UTC 37,718 bytes, 1 lines download raw bytes

1function wc_pb_price_format(t,e){return e=void 0!==e&&e,wc_pb_woocommerce_number_format(wc_pb_number_format(t),e)}function wc_pb_woocommerce_number_format(t,e){var i=wc_bundle_params.currency_format_decimal_sep,_=wc_bundle_params.currency_position,a=wc_bundle_params.currency_symbol,n=wc_bundle_params.currency_format_trim_zeros,s=wc_bundle_params.currency_format_num_decimals;if(e=void 0!==e&&e,"yes"==n&&s>0){for(var d=0;d<s;d++)i+="0";t=t.replace(i,"")}var r=String(t),c=e?a:'<span class="woocommerce-Price-currencySymbol">'+a+"</span>";return"left"===_?r=c+r:"right"===_?r+=c:"left_space"===_?r=c+" "+r:"right_space"===_&&(r=r+" "+c),r=e?r:'<span class="woocommerce-Price-amount amount">'+r+"</span>"}function wc_pb_number_format(t){var e=wc_bundle_params.currency_format_num_decimals,i=wc_bundle_params.currency_format_decimal_sep,_=wc_bundle_params.currency_format_thousand_sep,a=t,n=isNaN(e=Math.abs(e))?2:e,s=void 0==i?",":i,d=void 0==_?".":_,r=a<0?"-":"",c=parseInt(a=Math.abs(+a||0).toFixed(n))+"",o=(o=c.length)>3?o%3:0;return r+(o?c.substr(0,o)+d:"")+c.substr(o).replace(/(\d{3})(?=\d)/g,"$1"+d)+(n?s+Math.abs(a-c).toFixed(n).slice(2):"")}function wc_pb_number_round(t){var e=wc_bundle_params.currency_format_num_decimals,i=Math.pow(10,e),_=t*i;return Math.round(_)/i}function wc_pb_format_list(t){var e="",i=t.length;if(i>0)for(var _=0,a="",n=0;n<i;n++)_++,a=wc_bundle_params.i18n_string_list_item.replace("%s",t[n]),e=1==i||1==_?a:_===i?wc_bundle_params.i18n_string_list_last_sep.replace("%s",e).replace("%v",a):wc_bundle_params.i18n_string_list_sep.replace("%s",e).replace("%v",a);return e}var wc_pb_bundle_scripts={};jQuery.fn.wc_get_bundle_script=function(){var t=jQuery(this);if(!t.hasClass("bundle_form"))return!1;var e=t.data("script_id");return void 0!==wc_pb_bundle_scripts[e]&&wc_pb_bundle_scripts[e]},function(t){function e(e){var a=this;this.bundle_id=e.bundle_id,this.$bundle_form=e.$bundle_form,this.$bundle_data=e.$bundle_data,this.$bundle_wrap=e.$bundle_data.find(".bundle_wrap"),this.$bundled_items=e.$bundle_form.find(".bundled_product"),this.$bundle_availability=e.$bundle_data.find(".bundle_availability"),this.$bundle_price=e.$bundle_data.find(".bundle_price"),this.$bundle_button=e.$bundle_data.find(".bundle_button"),this.$bundle_error=e.$bundle_data.find(".bundle_error"),this.$bundle_error_content=this.$bundle_error.find("ul.msg"),this.$bundle_quantity=this.$bundle_button.find("input.qty"),this.$addons_totals=this.$bundle_data.find("#product-addons-total"),this.$custom_price_addons=!1,this.show_addons_totals=!1,this.bundled_items={},this.price_data=e.$bundle_data.data("bundle_price_data"),this.$initial_stock_status=!1,this.update_bundle_timer=!1,this.update_price_timer=!1,this.validation_messages=[],this.is_initialized=!1,this.composite_data=e.composite_data,this.dirty_subtotals=!1,this.filters=!1,this.api={get_bundle_totals:function(){return a.price_data.totals},get_bundled_item_totals:function(t){return a.price_data["bundled_item_"+t+"_totals"]},get_bundled_item_recurring_totals:function(t){return a.price_data["bundled_item_"+t+"_recurring_totals"]},get_bundle_validation_status:function(){return a.passes_validation()?"pass":"fail"},get_bundle_validation_messages:function(){return a.get_validation_messages()},get_bundle_stock_status:function(){return a.$bundle_wrap.find("p.out-of-stock").not(".inactive").length>0?"out-of-stock":"in-stock"},get_bundle_availability:function(){var t=a.$bundle_wrap.find("p.stock");return t=t.hasClass("inactive")?!1!==a.$initial_stock_status?a.$initial_stock_status.clone().wrap("<div></div>").parent().html():"":t.clone().removeAttr("style").wrap("<div></div>").parent().html()},get_bundle_configuration:function(){var e={};return 0!==a.bundled_items.length&&(t.each(a.bundled_items,function(t,i){var _={title:i.get_title(),product_title:i.get_product_title(),product_id:i.get_product_id(),variation_id:i.get_variation_id(),quantity:a.price_data.quantities[i.bundled_item_id],product_type:i.get_product_type()};e[i.bundled_item_id]=_}),e)}},this.initialize=function(){this.filters=new _,this.has_addons()?((1==this.$addons_totals.data("show-sub-total")||this.is_composited()&&this.composite_data.component.show_addons_totals)&&(this.$addons_totals.data("show-sub-total",0),this.$bundle_price.after(this.$addons_totals),this.show_addons_totals=!0),this.$custom_price_addons=this.$bundle_data.find(".addon-custom-price")):this.$addons_totals=!1,this.$bundle_wrap.find("p.stock").length>0&&(this.$initial_stock_status=this.$bundle_wrap.find("p.stock").clone()),this.price_data.suffix_exists=""!==wc_bundle_params.price_display_suffix,this.price_data.suffix=""!==wc_bundle_params.price_display_suffix?' <small class="woocommerce-price-suffix">'+wc_bundle_params.price_display_suffix+"</small>":"",this.price_data.suffix_contains_price_incl=wc_bundle_params.price_display_suffix.indexOf("{price_including_tax}")>-1,this.price_data.suffix_contains_price_excl=wc_bundle_params.price_display_suffix.indexOf("{price_excluding_tax}")>-1,this.$bundle_button.find('input[name*="bundle_variation"], input[name*="bundle_attribute"]').remove(),this.bind_event_handlers(),this.init_bundled_items(),this.is_composited()&&this.init_composite(),this.$bundle_data.triggerHandler("woocommerce-product-bundle-initializing",[this]),t.each(this.bundled_items,function(t,e){e.init_scripts()}),this.update_bundle_task(),this.is_initialized=!0,this.$bundle_data.trigger("woocommerce-product-bundle-initialized",[this])},this.shutdown=function(){this.$bundle_form.find("*").off(),!1!==this.composite_data&&this.remove_composite_hooks()},this.init_composite=function(){this.composite_data.composite.actions.add_action("c
1omponent_scripts_initialized_"+this.composite_data.component.step_id,this.component_scripts_initialized_action,10,this)},this.component_scripts_initialized_action=function(){parseInt(this.composite_data.component.component_selection_model.selected_product)===parseInt(this.bundle_id)?this.add_composite_hooks():this.remove_composite_hooks()},this.add_composite_hooks=function(){this.composite_data.composite.filters.add_filter("component_is_valid",this.cp_component_is_valid_filter,10,this),this.composite_data.composite.filters.add_filter("component_selection_formatted_title",this.cp_component_selection_formatted_title_filter,10,this),this.composite_data.composite.filters.add_filter("component_selection_meta",this.cp_component_selection_meta_filter,10,this),this.composite_data.composite.filters.add_filter("component_totals",this.cp_component_totals_filter,10,this),this.composite_data.composite.filters.add_filter("component_configuration",this.cp_component_configuration_filter,10,this),this.composite_data.composite.actions.add_action("validate_step",this.cp_validation_messages_action,10,this)},this.remove_composite_hooks=function(){this.composite_data.composite.filters.remove_filter("component_is_valid",this.cp_component_is_valid_filter),this.composite_data.composite.filters.remove_filter("component_selection_formatted_title",this.cp_component_selection_formatted_title_filter),this.composite_data.composite.filters.remove_filter("component_selection_meta",this.cp_component_selection_meta_filter),this.composite_data.composite.filters.remove_filter("component_totals",this.cp_component_totals_filter),this.composite_data.composite.filters.remove_filter("component_configuration",this.cp_component_configuration_filter),this.composite_data.composite.actions.remove_action("component_scripts_initialized_"+this.composite_data.component.step_id,this.component_scripts_initialized_action),this.composite_data.composite.actions.remove_action("validate_step",this.cp_validation_messages_action)},this.cp_component_configuration_filter=function(t,e){return e.step_i
1d===this.composite_data.component.step_id&&(t.bundled_items=a.api.get_bundle_configuration()),t},this.cp_component_totals_filter=function(e,i){if(i.step_id===this.composite_data.component.step_id){var _=t.extend(!0,{},a.price_data),n=i.get_selected_quantity(),s=a.has_addons()?a.$addons_totals.data("addons-raw-price"):0;return s>0&&(_.base_price=Number(_.base_price)+Number(s)),_=a.calculate_subtotals(!1,_,n),(_=a.calculate_totals(_)).totals}return e},this.cp_component_selection_formatted_title_filter=function(e,i,_,a,n){if(n.step_id===this.composite_data.component.step_id){var s=0,d=this;if(t.each(d.bundled_items,function(t,e){e.$bundled_item_cart.data("quantity")>0&&s++}),d.group_mode_supports("component_multiselect"))if(0===s)e=wc_composite_params.i18n_no_selection;else{var r=this.cp_get_formatted_contents(n);r&&(e=r)}}return e},this.cp_component_selection_meta_filter=function(e,i){if(i.step_id===this.composite_data.component.step_id){var _=0,a=this;if(t.each(a.bundled_items,function(t,e){e.$bundled_item_cart.data("quantity")>0&&_++}),0!==_&&!1===a.group_mode_supports("component_multiselect")){var n=this.cp_get_formatted_contents(i);""!==n&&e.push({meta_key:wc_bundle_params.i18n_contents,meta_value:n})}}return e},this.cp_get_formatted_contents=function(e){var i="",_=[],a=e.get_selected_quantity();return t.each(this.bundled_items,function(e,i){if(i.$self.hasClass("bundled_item_hidden"))return!0;if(i.$bundled_item_cart.data("quantity")>0){var n=i.$bundled_item_cart.data("title"),s=parseInt(i.$bundled_item_cart.data("quantity")*a),d=wc_cp_get_variation_data(i.$bundled_item_cart.find(".variations")),r=s>1?"<strong>"+wc_composite_params.i18n_qty_string.replace("%s",s)+"</strong>":"",c="";d.length>0&&(t.each(d,function(t,e){c=c+'<span class="bundled_meta_element"><span class="bundled_meta_key">'+e.meta_key+':</span> <span class="bundled_meta_value">'+e.meta_value+"</span>",t!==d.length-1&&(c+='<span class="bundled_meta_value_sep">, </span>'),c+="</span>"}),n=wc_bundle_params.i18n_title_meta_string.replace("%t",n).replace("%m",'<span class="content_bundled_product_meta">'+c+"</span>
1")),n=wc_composite_params.i18n_title_string.replace("%t",n).replace("%q",r).replace("%p",""),_.push(n)}}),_.length>0&&t.each(_,function(t,e){i=i+'<span class="content_bundled_product_title">'+e,t!==_.length-1&&(i+='<span class="bundled_product_title_sep">, </span>'),i+="</span>"}),i},this.cp_component_is_valid_filter=function(t,e,i){return i.step_id===this.composite_data.component.step_id&&i.get_selected_product(e)>0&&i.get_selected_quantity()>0&&i.is_visible()&&(t=this.passes_validation()),t},this.cp_validation_messages_action=function(e,i){if(e.step_id===this.composite_data.component.step_id&&!1===i){var _=this.get_validation_messages();t.each(_,function(t,i){e.add_validation_message(i),e.add_validation_message(i,"composite")})}},this.get_ajax_url=function(t){return woocommerce_params.wc_ajax_url.toString().replace("%%endpoint%%",t)},this.bind_event_handlers=function(){a.has_addons()&&a.$bundle_data.on("updated_addons",a.updated_addons_handler),a.is_composited()&&a.$bundle_quantity.on("input change",function(){a.update_bundle()}),this.$bundle_data.on("woocommerce-nyp-updated-item",function(e){var i=t(this).find(".nyp");i.is(":visible")&&(a.price_data.base_price=i.data("price"),a.is_initialized&&(a.dirty_subtotals=!0,a.update_totals())),e.stopPropagation()}).on("woocommerce-product-bundle-validation-status-changed",function(t,e){e.updated_totals()}).on("click",".bundle_add_to_cart_button",function(e){t(this).hasClass("disabled")&&(e.preventDefault(),window.alert(wc_bundle_params.i18n_validation_alert))})},this.init_bundled_items=function(){a.$bundled_items.each(function(e){a.bundled_items[e]=new i(a,t(this),e),a.bind_bundled_item_event_handlers(a.bundled_items[e])})},this.bind_bundled_item_event_handlers=function(e){e.$self.on("input change","input.bundled_qty",function(i){var _=t(this),n=parseFloat(_.attr("min")),s=parseFloat(_.attr("max"));"change"===i.type&&n>=0&&(parseFloat(_.val())<n||isNaN(parseFloat(_.val())))&&_.val(n),"change"===i.type&&s>0&&parseFloat(_.val())>s&&_.val(s),e.update_selection_title(),a.update_bundle(e)}).on("change",".bundled_product_optional_checkbox input",function(i){t(this).is(":checked")?(e.$bundled_item_content.slideDown(200),e.set_selected(!0),e.$self.find(".bundled_item_qty_col .quantity").removeClass("quantity_hidden"),e.$self.find(".variations_form .variations select:eq(0)").trigger("change")):(e.$bundled_item_content.slideUp(200),e.set_selected(!1),e.$self.find(".bundled_item_qty_col .quantity").addClass("quantity_hidden"),e.add_wc_core_gallery_class(),e.$self.find(".variations_form").trigger("reset_image"),e.remove_wc_core_gallery_class()),e.update_selection_title(),a.update_bundle(e),i.stopPropagation()}).on("found_variation",function(t,i){e.variation_id=i.variation_id.toString(),a.price_data.prices[e.bundled_item_id]=Number(i.price),a.price_data.regular_prices[e.bundled_item_id]=Number(i.regular_price),a.price_data.prices_tax[e.bundled_item_id]=i.price_tax,a.price_data.recurring_prices[e.bundled_item_id]=Number(i.recurring_price),a.price_data.regular_recurring_prices[e.bundled_item_id]=Number(i.regular_recurring_price),a.price_data.recurring_html[e.bundled_item_id]=i.recurring_html,a.price_data.recurring_keys[e.bundled_item_id]=i.recurring_key,e.remove_wc_core_gallery_class();var _=e.$self.find(".bundled_item_qty_col .quantity input");_.length>0&&_.attr("min",i.min_qty).attr("max",i.max_qty),i.is_in_stock&&e.$bundled_item_qty.trigger("change"),e.update_selection_title(),a.update_bundle(e),t.stopPropagation()}).on("reset_image",function(){e.remove_wc_core_gallery_class()}).on("woocommerce-product-addons-update",function(t){t.stopPropagation()}).on("woocommerce_variation_select_focusin",function(t){t.stopPropagation()}).on("woocommerce_variation_has_changed",function(t){e.$reset_bundled_variations&&(e.variation_id?e.$reset_bundled_variations.slideDown(200):e.$reset_bundled_variations.slideUp(200)),t.stopPropagation()}).on("woocommerce_variation_select_change",function(i){e.variation_id="",e.is_selected()&&e.add_wc_core_gallery_class(),e.$attribute_select&&e.$attribute_select.each(function(){if(""===t(this).val())return e.$bundled_item_cart.find(".bundled_item_wrap .stock").addClass("disabled"),a.update_bundle(e),!1}),i.stopPropagation()}),e.has_addons()&&e.$bundled_item_cart.on("updated_addons",function(t){var i=e.$addons_totals.data("addons-raw-price");if(i||(i=0),i+=a.get_custom_price_addons_raw_price(e),a.price_data.addons_prices[e.bundled_item_id]!==i&&(a.price_data.addons_prices[e.bundled_item_id]=i,a.update_bundle(e)),e.show_addons_totals){var _=e.get_quantity(),n=a.price_data.prices_tax[e.bundled_item_id],s=a.get_taxed_totals(i,i,n,_);if(s.price>0){var d=Number(a.price_data.prices[e.bundled_item_id])+Number(i),r=a.get_taxed_totals(d,d,n,_),c=wc_pb_price_format(r.price),o=a.get_formatted_price_suffix(a.price_data,r),l="";l='<dl class="product-addon-totals"><dt>'+woocommerce_addons_params.i18n_addon_total+'</dt><dd><strong><span class="amount">'+wc_pb_price_format(s.price)+"</span></strong></dd>",l+="<dt>"+woocommerce_addons_params.i18n_sub_total+"</dt><dd><strong>"+c+o+"</strong></dd></dl>",e.$addons_totals.html(l)}else e.$addons_totals.empty()}t.stopPropagation()}),e.is_nyp()&&e.$bundled_item_cart.on("woocommerce-nyp-updated-item",function(t){if(e.$nyp.is(":visible")){var i=e.$nyp.data("price");a.price_data.prices[e.bundled_item_id]=i,a.price_data.regular_prices[e.bundled_item_id]=i,a.update_bundle(e)}t.stopPropagation()})},this.get_quantity=function(){var t=a.$bundle_quantity.length>0?a.$bundle_quantity.val():1;return isNaN(t)?1:parseInt(t)},this.update_bundle=function(t){clearTimeout(a.update_bundle_timer),a.update_bundle_timer=setTimeout(function(){a.update_bundle_task(t)},10)},this.update_bundle_task=function(e){var i=!1,_=!1,n=a.is_initialized?"":a.api.get_bundle_validation_status(),s=0,d=[],r=0;if(a.validation_messages=[],t.each(a.bundled_items,function(t,e){var i=e.is_selected()?e.get_quantity():0;r+=i,"variable"!==e.get_product_type()&&"variable-subscription"!==e.get_product_type()||""!==e.get_variation_id()||i>0&&(s++,e.is_visible()&&e.get_title(!0)&&d.push(e.get_title(!0)))}),s>0){var c="";c=s===d.length&&s<5?wc_bundle_params.i18n_select_options_for.replace("%s",wc_pb_format_list(d)):wc_bundle_params.i18n_select_options,a.add_validation_message(c)}0===r&&"no"===a.price_data.zero_items_allowed&&a.add_validation_message(wc_bundle_params.i18n_zero_qty_error),"yes"!==a.price_data.is_purchasable?a.add_validation_message(wc_bundle_params.i18n_unavailable_text):a.$bundle_data.triggerHandler("woocommerce-product-bundle-validate",[a]),n!==a.api.get_bundle_validation_status()&&a.$bundle_data.triggerHandler("woocommerce-product-bundle-validation-status-changed",[a]),"yes"===a.price_data.is_purchasable&&a.update_totals(e),a.passes_validation()?(t.each(a.bundled_items,function(t,e){if(!e.is_selected())return!0;e.$bundled_item_cart.find("p.stock:not(.disabled)").hasClass("out-of-stock")&&a.price_data.quantities[e.bundled_item_id]>0&&(i=!0)}),i?a.$bundle_button.find("button").addClass("disabled"):a.$bundle_button.find("button").removeClass("disabled"),setTimeout(function(){a.$bundle_error.slideUp(200)},10),a.$bundle_wrap.trigger("woocommerce-product-bundle-show")):a.hide_bundle(),t.each(a.bundled_items,function(t,e){if(!e.is_selected())return!0;var n=e.$bundled_item_cart.find("p.stock:not(.disabled)");n.hasClass("out-of-stock")&&a.price_data.quantities[e.bundled_item_id]>0&&(_=n.clone().html(wc_bundle_params.i18n_partially_out_of_stock)),!i&&n.hasClass("available-on-backorder")&&a.price_data.quantities[e.bundled_item_id]>0&&(_=n.clone().html(wc_bundle_params.i18n_partially_on_backorder))}),_?(a.$bundle_availability.html(_),a.$bundle_availability.slideDown(200)):a.$initial_stock_status?a.$bundle_availability.html(a.$initial_stock_status):(a.is_composited()&&a.$bundle_availability.find("p.stock").addClass("inactive"),a.$bundle_availability.slideUp(200)),a.is_composited()&&a.composite_data.composite.actions.do_action("c
1omponent_selection_content_changed",[a.composite_data.component])},this.hide_bundle=function(e){var i=t("<ul/>");if(void 0===e){var _=a.get_validation_messages();_.length>0?t.each(_,function(e,_){i.append(t("<li/>").html(_))}):i.append(t("<li/>").html(wc_bundle_params.i18n_unavailable_text))}else i.append(t("<li/>").html(e.toString()));a.$bundle_error_content.html(i.html()),setTimeout(function(){a.$bundle_error.slideDown(200)},10),a.$bundle_button.find("button").addClass("disabled"),a.$bundle_wrap.trigger("woocommerce-product-bundle-hide")},this.update_price_data=function(){t.each(a.bundled_items,function(t,e){var i=e.$bundled_item_cart,_=e.bundled_item_id,n=e.get_quantity();a.price_data.quantities[_]=0,e.is_selected()&&n>0&&(a.price_data.quantities[_]=parseInt(n)),i.data("quantity",a.price_data.quantities[_]),"variable"!==e.get_product_type()&&"variable-subscription"!==e.get_product_type()||""!==e.get_variation_id()||(a.price_data.prices[_]=0,a.price_data.regular_prices[_]=0,a.price_data.prices_tax[_]=!1),a.price_data.prices[_]=Number(a.price_data.prices[_]),a.price_data.regular_prices[_]=Number(a.price_data.regular_prices[_]),a.price_data.addons_prices[_]=Number(a.price_data.addons_prices[_]),a.price_data.recurring_prices[_]=Number(a.price_data.recurring_prices[_]),a.price_data.regular_recurring_prices[_]=Number(a.price_data.regular_recurring_prices[_])})},this.update_totals=function(t){this.update_price_data(),this.calculate_subtotals(t),(a.dirty_subtotals||!1===a.is_initialized)&&(a.dirty_subtotals=!1,a.calculate_totals())},this.get_taxed_totals=function(t,e,i,_){_=void 0===_?1:_;var a=!(!i||void 0===i.incl)&&Number(i.incl),n=!(!i||void 0===i.excl)&&Number(i.excl),s={price:_*t,regular_price:_*e,price_incl_tax:_*t,price_excl_tax:_*t};return a&&n&&(s.price_incl_tax=wc_pb_number_round(s.price*a),s.price_excl_tax=wc_pb_number_round(s.price*n),"incl"===wc_bundle_params.tax_display_shop?(s.price=s.price_incl_tax,s.regular_price=wc_pb_number_round(s.regular_price*a)):(s.price=s.price_excl_tax,s.regular_price=wc_pb_number_round(s.regular_price*n))),s},this.calculate_subtotals=function(e,i,_){var n=void 0===i?a.price_data:i;if(_=void 0===_?1:parseInt(_),!1===(e=void 0!==e&&e)){var s=Number(n.base_price),d=Number(n.base_regular_price),r=n.base_price_tax;n.base_price_totals=n.base_price_subtotals=this.get_taxed_totals(s,d,r,_)}if(t.each(a.bundled_items,function(t,i){if(!1!==e&&e.bundled_item_id!==i.bundled_item_id)return!0;var s=i.is_sold_individually()&&n.quantities[i.bundled_item_id]>0?1:n.quantities[i.bundled_item_id]*_,d="variable"===i.get_product_type()?i.get_variation_id():i.get_product_id(),r=n.prices_tax[i.bundled_item_id],c=n.regular_prices[i.bundled_item_id]+n.addons_prices[i.bundled_item_id],o=n.prices[i.bundled_item_id]+n.addons_prices[i.bundled_item_id],l=n.regular_recurring_prices[i.bundled_item_id]+n.addons_prices[i.bundled_item_id],u=n.recurring_prices[i.bundled_item_id]+n.addons_prices[i.bundled_item_id],p={price:0,regular_price:0,price_incl_tax:0,price_excl_tax:0},m={price:0,regular_price:0,price_incl_tax:0,price_excl_tax:0};"yes"===wc_bundle_params.calc_taxes?d>0&&s>0&&((o>0||c>
10)&&(p=a.get_taxed_totals(o,c,r,s)),(u>0||l>0)&&(m=a.get_taxed_totals(u,l,r,s))):(p.price=s*o,p.regular_price=s*c,p.price_incl_tax=s*o,p.price_excl_tax=s*o,m.price=s*u,m.regular_price=s*l,m.price_incl_tax=s*u,m.price_excl_tax=s*u),a.totals_changed(n["bundled_item_"+i.bundled_item_id+"_subtotals"],p)&&(a.dirty_subtotals=!0,n["bundled_item_"+i.bundled_item_id+"_subtotals"]=p,n["bundled_item_"+i.bundled_item_id+"_totals"]=p),a.totals_changed(n["bundled_item_"+i.bundled_item_id+"_recurring_subtotals"],m)&&(a.dirty_subtotals=!0,n["bundled_item_"+i.bundled_item_id+"_recurring_subtotals"]=m,n["bundled_item_"+i.bundled_item_id+"_recurring_totals"]=m)}),n=a.filters.apply_filters("bundle_subtotals_data",[n,a,_]),void 0!==i)return n},this.calculate_totals=function(e){void 0===e&&a.$bundle_data.triggerHandler("woocommerce-product-bundle-calculate-totals",[a]);var i=void 0===e?a.price_data:e,_=!1,n={price:i.base_price_subtotals.price,regular_price:i.base_price_subtotals.regular_price,price_incl_tax:i.base_price_subtotals.price_incl_tax,price_excl_tax:i.base_price_subtotals.price_excl_tax},s={price:i.base_price_totals.price,regular_price:i.base_price_totals.regular_price,price_incl_tax:i.base_price_totals.price_incl_tax,price_excl_tax:i.base_price_totals.price_excl_tax};t.each(a.bundled_items,function(t,e){var _=i["bundled_item_"+e.bundled_item_id+"_totals"],a=i["bundled_item_"+e.bundled_item_id+"_subtotals"];void 0!==_&&(n.price+=_.price,n.regular_price+=_.regular_price,n.price_incl_tax+=_.price_incl_tax,n.price_excl_tax+=_.price_excl_tax),void 0!==a&&(s.price+=a.price,s.regular_price+=a.regular_price,s.price_incl_tax+=a.price_incl_tax,s.price_excl_tax+=a.price_excl_tax)}),_=a.totals_changed(i.totals,n)||a.totals_changed(i.subtotals,s);var d=a.get_bundled_subscriptions(),r={},c={};if(d&&(t.each(d,function(t,e){var _=e.bundled_item_id;if(0===i.quantities[_])return!0;var a=i.recurring_keys[_],n=i["bundled_item_"+_+"_recurring_totals"],s=i["bundled_item_"+_+"_recurring_subtotals"];void 0===r[a]?r[a]={html:i.recurring_html[_],price:n.price,regular_price:n.regular_price,price_incl_tax:n.price_incl_tax,price_excl_tax:n.price_excl_tax}:(r[a].price+=n.price,r[a].regular_price+=n.regular_price,r[a].price_incl_tax+=n.price_incl_tax,r[a].price_excl_tax+=n.price_excl_tax),void 0===c[a]?c[a]={html:i.recurring_html[_],price:s.price,regular_price:s.regular_price,price_incl_tax:s.price_incl_tax,price_excl_tax:s.price_excl_tax}:(c[a].price+=s.price,c[a].regular_price+=s.regular_price,c[a].price_incl_tax+=s.price_incl_tax,c[a].price_excl_tax+=s.price_excl_tax)}),!_)){var o=JSON.stringify(i.recurring_totals),l=JSON.stringify(r),u=JSON.stringify(i.recurring_subtotals),p=JSON.stringify(c);o===l&&u===p||(_=!0)}return(_||!1===a.is_initialized)&&(i.subtotals=s,i.totals=n,i.recurring_subtotals=c,i.recurring_totals=r,void 0===e&&this.updated_totals()),i},this.updated_totals=function(){clearTimeout(a.update_price_timer),a.update_price_timer=setTimeout(function(){a.updated_totals_task()},10)},this.get_price_html=function(t){var e=void 0===t?a.price_data:t,i="p";if(a.is_composited()){var _=a.composite_data.component.get_selected_quantity();i="span",e=a.calculate_subtotals(!1,e,_),e=a.calculate_totals(e)}var n="",s=(e.totals.price!==wc_pb_number_round(e.raw_bundle_price_min)||e.raw_bundle_price_min!==e.raw_bundle_price_max)&&!1===a.get_bundled_subscriptions()&&!1===a.is_composited()?'<span class="total">'+wc_bundle_params.i18n_total+"</span>":"",d=0===e.totals.price&&"yes"===e.show_free_string?wc_bundle_params.i18n_free:wc_pb_price_format(e.totals.price),r=wc_pb_price_format(e.totals.price===e.subtotals.price?e.totals.regular_price:e.subtotals.price),c=a.get_formatted_price_suffix(e);return e.totals.regular_price>e.totals.price&&(d=wc_bundle_params.i18n_strikeout_price_string.replace("%f",r).replace("%t",d)),n=wc_bundle_params.i18n_price_format.replace("%t",s).replace("%p",d).replace("%s",c),n="<"+i+' class="price">'+e.price_string.replace("%s",n)+"</"+i+">"},this.get_recurring_price_html=function(e){var i=void 0===e?a.price_data:e,_="";return a.get_bundled_subscriptions()&&t.each(i.recurring_totals,function(t,e){var n=0==e.price?wc_bundle_params.i18n_free:wc_pb_price_format(e.price),s=wc_pb_price_format(e.regular_price),d="",r=a.get_formatted_price_suffix(i,{price_incl_tax:e.price_incl_tax,price_excl_tax:e.price_excl_tax});e.regular_price>e.price&&(n=wc_bundle_params.i18n_strikeout_price_string.replace("%f",s).replace("%t",n)),d=wc_bundle_params.i18n_price_format.replace("%t","").replace("%p",n).replace("%s",r),d='<span class="bundled_sub_price_html">'+e.html.replace("%s",d)+"</span>",_=(""!==_?_+'<span class="plus"> + </span>':_)+d}),_},this.show_price_html=function(){var e=!1;return!1===a.get_bundled_subscriptions()?e=a.price_data.totals.price!==wc_pb_number_round(a.price_data.raw_bundle_price_min)||a.price_data.raw_bundle_price_min!==a.price_data.raw_bundle_price_max:t.each(a.bundled_items,function(t,i){if(a.price_data.recurring_prices[i.bundled_item_id]>0&&(i.is_subscription("variable")||i.is_optional()||!1===i.$self.find(".quantity").hasClass("quantity_hidden")))return e=!0,!1}),a.is_composited()&&(e||a.composite_data.composite.api.is_component_priced_individually(this.composite_data.component.step_i
1d)&&(e=!0),e&&(!1===this.composite_data.component.is_selected_product_price_visible()?e=!1:!1===a.composite_data.composite.api.is_component_priced_individually(this.composite_data.component.step_id)&&(e=!1))),e},this.updated_totals_task=function(){var t=a.show_price_html();if(a.passes_validation()&&t){var e=a.get_price_html(),i=a.get_recurring_price_html();e=e.replace("%r",i),e=a.filters.apply_filters("bundle_total_price_html",[e,a]),a.$bundle_price.html(e),i&&a.$bundle_price.find(".bundled_subscriptions_price_html").show(),a.$bundle_price.slideDown(200)}else a.$bundle_price.slideUp(200);a.has_addons()&&a.update_addons_totals(),a.$bundle_data.triggerHandler("woocommerce-product-bundle-updated-totals",[a])},this.updated_addons_handler=function(t){a.update_addons_totals(),t.stopPropagation()},this.update_addons_totals=function(){if(a.show_addons_totals)if(a.passes_validation()){var e=t.extend(!0,{},a.price_data),i=a.get_quantity(),_=e.base_price_tax,n=a.$addons_totals.data("addons-raw-price");if(n||(n=0),(n+=a.get_custom_price_addons_raw_price())>0){var s=a.get_taxed_totals(n,n,_,i),d="",r="",c="";e.base_price=Number(e.base_price)+Number(n),e=a.calculate_subtotals(!1,e,i),d=wc_pb_price_format((e=a.calculate_totals(e)).totals.price),r=a.get_formatted_price_suffix(e),c='<dl class="product-addon-totals"><dt>'+woocommerce_addons_params.i18n_addon_total+'</dt><dd><strong><span class="amount">'+wc_pb_price_format(s.price)+"</span></strong></dd>",c+="<dt>"+wc_bundle_params.i18n_addons_total+"</dt><dd><strong>"+d+r+"</strong></dd></dl>",a.$addons_totals.html(c)}else a.$addons_totals.empty()}else a.$addons_totals.empty();a.is_composited()&&a.composite_data.component.component_selection_model.update_selected_addons()},this.has_addons=function(){return this.$addons_totals&&this.$addons_totals.length>0},this.has_custom_price_addons=function(){return this.$custom_price_addons&&this.$custom_price_addons.length>0},this.get_custom_price_addons_raw_price=function(e){var i=0,_=void 0!==e,n=_?e:this,s=_?a.price_data.prices_tax[e.bundled_item_id]:a.price_data.base_price_tax;return n.has_custom_price_addons()&&n.$custom_price_addons.each(function(){var e=t(this),_=!(!s||void 0===s.incl)&&Number(s.incl),a=!(!s||void 0===s.excl)&&Number(s.excl);"incl"===wc_bundle_params.tax_display_shop&&"no"===wc_bundle_params.prices_include_tax?i+=e.val()/(_||1):"excl"===wc_bundle_params.tax_display_shop&&"yes"===wc_bundle_params.prices_include_tax?i+=e.val()/(a||1):i+=e.val()}),i},this.totals_changed=function(t,e){return void 0===t||t.price!==e.price||t.regular_price!==e.regular_price||t.price_incl_tax!==e.price_incl_tax||t.price_excl_tax!==e.price_excl_tax},this.is_composited=function(){return!1!==this.composite_data},this.get_formatted_price_suffix=function(t,e){var i=void 0===t?a.price_data:t,_="";return e=void 0===e?i.totals:e,i.suffix_exists&&(_=i.suffix,i.suffix_contains_price_incl&&(_=_.replace("{price_including_tax}",wc_pb_price_format(e.price_incl_tax))),i.suffix_contains_price_excl&&(_=_.replace("{price_excluding_tax}",wc_pb_price_format(e.price_excl_tax)))),_},this.get_bundled_subscriptions=function(e){var i={},_=!1;return t.each(a.bundled_items,function(t,a){a.is_subscription(e)&&(i[t]=a,_=!0)}),!!_&&i},this.add_validation_message=function(t){this.validation_messages.push(t.toString())},this.get_validation_messages=function(){return this.validation_messages},this.passes_validation=function(){return!(this.validation_messages.length>0)},this.group_mode_supports=function(e){return t.inArray(e,this.price_data.group_mode_features)>-1}}function i(e,i,_){this.initialize=function(){this.$self=i,this.$bundled_item_cart=i.find(".cart"),this.$bundled_item_content=i.find(".bundled_item_optional_content, .bundled_item_cart_content"),this.$bundled_item_image=i.find(".bundled_product_images"),this.$bundled_item_title=i.find(".bundled_product_title_inner"),this.$bundled_item_qty=i.find("input.bundled_qty"),this.$addons_totals=i.find("#product-addons-total"),this.$custom_price_addons=!1,this.$nyp=i.find(".nyp"),this.$attribute_select=!1,this.$attribute_select_config=!1,this.$reset_bundled_variations=!1,this.show_addons_totals=!1,this.bundled_item_index=_,this.bundled_item_id=this.$bundled_item_cart.data("bundled_item_id"),this.bundled_item_title=this.$bundled_item_cart.data("title"),this.bundled_item_title_raw=this.bundled_item_title?t("<div/>").html(this.bundled_item_title).text():"",this.bundled_item_product_title=this.$bundled_item_cart.data("product_title"),this.bundled_item_product_title_raw=this.bundled_item_title?t("<div/>").html(this.bundled_item_title).text():"",this.bundled_item_optional_suffix=void 0===this.$bundled_item_cart.data("optional_suffix")?wc_bundle_params.i18n_optional:this.$bundled_item_cart.data("optional_suffix"),this.product_type=this.$bundled_item_cart.data("type"),this.product_id=void 0===e.price_data.product_ids[this.bundled_item_id]?"":e.price_data.product_ids[this.bundled_item_id].toString(),this.nyp=void 0!==e.price_data.product_ids[this.bundled_item_id]&&"yes"===e.price_data.is_nyp[this.bundled_item_id],this.sold_individually=void 0!==e.price_data.product_ids[this.bundled_item_id]&&"yes"===e.price_data.is_sold_individually[this.bundled_item_id],this.variation_id="",this.has_wc_core_gallery_class=this.$bundled_item_image.hasClass("images"),void 0===this.bundled_item_id&&(this.bundled_item_id=this.$bundled_item_cart.attr("data-bundled-item-id")),this.initialize_addons()},this.initialize_addons=function(){this.has_addons()?(1==this.$addons_totals.data("show-sub-total")&&(this.$addons_totals.data("show-sub-total",0),this.show_addons_totals=!0),this.$custom_price_addons=this.$bundled_item_cart.find(".addon-custom-price")):this.$addons_totals=!1},this.get_title=function(t){return(t=void 0!==t&&t)?this.bundled_item_title_raw:this.bundled_item_title},this.get_product_title=function(t){return(t=void 0!==t&&t)?this.bundled_item_product_title_raw:this.bundled_item_product_title},this.get_optional_suffix=function(){return this.bundled_item_optional_suffix},this.get_product_id=function(){return this.product_id},this.get_variation_id=function(){return this.variation_id},this.get_product_type=function(){return this.product_type}
1,this.get_quantity=function(){var t=this.$bundled_item_qty.val();return isNaN(t)?0:parseInt(t)},this.is_optional=function(){return"yes"===this.$bundled_item_cart.data("optional")||1===this.$bundled_item_cart.data("optional")},this.is_visible=function(){return"yes"===this.$bundled_item_cart.data("visible")||1===this.$bundled_item_cart.data("visible")},this.is_selected=function(){var t=!0;return this.is_optional()&&!1===this.$bundled_item_cart.data("optional_status")&&(t=!1),t},this.set_selected=function(t){this.is_optional()&&this.$bundled_item_cart.data("optional_status",t)},this.init_scripts=function(){"undefined"!=typeof PhotoSwipe&&"yes"===wc_bundle_params.photoswipe_enabled&&this.init_photoswipe(),this.$self.find(".bundled_product_optional_checkbox input").change(),"variable"!==this.product_type&&"variable-subscription"!==this.product_type||this.$bundled_item_cart.hasClass("variations_form")||(this.$reset_bundled_variations=this.$bundled_item_cart.find(".reset_bundled_variations"),0===this.$reset_bundled_variations.length&&(this.$reset_bundled_variations=!1),this.$bundled_item_cart.addClass("variations_form").wc_variation_form(),this.$attribute_select=this.$bundled_item_cart.find(".variations .attribute_options select"),this.$attribute_select_config=this.$attribute_select.filter(function(){return!1===t(this).parent().hasClass("bundled_variation_attribute_options_wrapper")}),this.$attribute_select.length>0&&this.$attribute_select.first().change()),this.$self.find("div").stop(!0,!0),this.update_selection_title()},this.init_photoswipe=function(){this.$bundled_item_image.wc_product_gallery({zoom_enabled:!1,flexslider_enabled:!1});var t=this.$bundled_item_image.find("a.placeholder_image");t.length>0&&t.on("click",function(){return!1})},this.update_selection_title=function(t){if(0===this.$bundled_item_title.length)return!1;var e=parseInt(this.get_quantity());if(isNaN(e))return!1;(t=void 0!==t&&t)&&(e=parseInt(this.$bundled_item_qty.attr("min")));var i=this.bundled_item_title,_=e>1?wc_bundle_params.i18n_qty_string.replace("%s",e):"",a=this.is_optional()&&""!==this.get_optional_suffix()?wc_bundle_params.i18n_optional_string.replace("%s",this.get_optional_suffix()):"",n=wc_bundle_params.i18n_title_str
1ing.replace("%t",i).replace("%q",_).replace("%o",a);this.$bundled_item_title.html(n)},this.reset_selection_title=function(){this.update_selection_title(!0)},this.is_subscription=function(t){return"simple"===t?"subscription"===this.product_type:"variable"===t?"variable-subscription"===this.product_type:"subscription"===this.product_type||"variable-subscription"===this.product_type},this.has_addons=function(){return this.$addons_totals&&this.$addons_totals.length>0},this.has_custom_price_addons=function(){return this.$custom_price_addons&&this.$custom_price_addons.length>0},this.is_nyp=function(){return this.nyp},this.is_sold_individually=function(){return this.sold_individually},this.add_wc_core_gallery_class=function(){this.has_wc_core_gallery_class||this.$bundled_item_image.addClass("images")},this.remove_wc_core_gallery_class=function(){this.has_wc_core_gallery_class||this.$bundled_item_image.removeClass("images")},this.initialize()}function _(){var t=this,e={},i={add_filter:function(t,i,_,a){var n={callback:i,priority:_,context:a},s=e[t];s?(s.push(n),s=this.sort_filters(s)):s=[n],e[t]=s},remove_filter:function(t,i,_){var a,n,s;if(e[t])if(i)if(a=e[t],_)for(s=a.length;s--;)(n=a[s]).callback===i&&n.context===_&&a.splice(s,1);else for(s=a.length;s--;)a[s].callback===i&&a.splice(s,1);else e[t]=[]},sort_filters:function(t){for(var e,i,_,a=1,n=t.length;a<n;a++){for(e=t[a],i=a;(_=t[i-1])&&_.priority>e.priority;)t[i]=t[i-1],--i;t[i]=e}return t},apply_filters:function(t,i){var _,a,n=e[t];if(!n)return i[0];for(a=n.length,_=0;_<a;_++)i[0]=n[_].callback.apply(n[_].context,i);return i[0]}};this.add_filter=function(e,_,a,n){return"string"==typeof e&&"function"==typeof _&&(a=parseInt(a||10,10),i.add_filter(e,_,a,n)),t},this.apply_filters=function(t,e){if("string"==typeof t)return i.apply_filters(t,e)},this.remove_filter=function(e,_){return"string"==typeof e&&i.remove_filter(e,_),t}}jQuery(document).ready(function(t){t("body").on("quick-view-displayed",function(){t(".quick-view .bundle_form .bundle_data").each(function(){var e=t(this);0===e.closest(".composite_form").length&&e.wc_pb_bundle_form()})}),t.fn.wc_pb_bundle_form=function(){if(!t(this).hasClass("bundle_data"))return!0;var i=t(this),_=i.data("bundle_id");if(void 0===_){if(!(_=i.attr("data-bundle-id")))return!1;i.data("bundle_id",_)}var a=i.closest(".bundle_form"),n=a.closest(".composite_form"),s=!1,d=_;if(n.length>0){var r=a.closest(".component").data("item_id");if(r>0&&t.isFunction(t.fn.wc_get_composite_script)){var c=n.wc_get_composite_script();if(!1!==c){var o=c.api.get_step(r);!1!==o&&(s={composite:c,component:o},d=r)}}}void 0!==wc_pb_bundle_scripts[d]&&wc_pb_bundle_scripts[d].shutdown(),wc_pb_bundle_scripts[d]=new e({$bundle_form:a,$bundle_data:i,bundle_id:_,composite_data:s}),a.data("script_id",d),wc_pb_bundle_scripts[d].initialize()},t(".bundle_form .bundle_data").each(function(){var e=t(this);0===e.closest(".composite_form").length&&e.wc_pb_bundle_form()})})}(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.