// source --> https://www.pedipro.pl/wp-content/plugins/woo-free-shipping-bar/assets/js/frontend.min.js?ver=1.3.0 
!function(e){"use strict";if("undefined"==typeof _wfsb_params)return;let s,t,n,r;_wfsb_params.time_to_disappear=1,_wfsb_params.displayTime=20,e(document).ready(function(){if("undefined"!=typeof wc)if(void 0!==wc.blocksCheckout){let{registerCheckoutFilters:s}=wc.blocksCheckout;s("wfspb_add_checkout_filter",{proceedToCheckoutButtonLink:function(s,t,n){let r=t?.wfspb_message||n?.cart?.extensions?.wfspb_message;return r?(e(document).triggerHandler("wfspb-refresh-message",[r]),s):s}})}else"undefined"!=typeof wp&&wp?.data?.select&&wp?.data?.subscribe&&"undefined"!=typeof wc&&wc?.wcBlocksData?.CART_STORE_KEY&&(r||(s=wp.data.select,t=wp.data.subscribe,n=wc.wcBlocksData.CART_STORE_KEY,r=t(function(){let t=s(n).getCartData(),r=t?.extensions?.wfspb_message;r&&e(document).triggerHandler("wfspb-refresh-message",[r])},n)));if(e('[data-block-name="woocommerce/product-button"]').length&&e('[data-wp-on--click="actions.addCartItem"]').length){let s=window.fetch;window.fetch=async function(...t){let n=await s.apply(this,t);if(t[0]&&"string"==typeof t[0]&&t[0].includes("/wc/store/v1/cart")){n.clone().json().then(s=>{let t=s?.extensions?.wfspb_message;t&&e(document).triggerHandler("wfspb-refresh-message",[t])})}return n}}let a,o;e(document).on("click",".wfspb-gift-box",function(){e(document).trigger("wfspb-show-bar")}),e(document).on("wfspb-show-bar",function(){e(document).trigger("wfspb-design"),clearTimeout(o),clearTimeout(a),e(".wfspb-gift-box").addClass("wfspb-hidden"),e("#wfspb-top-bar").hasClass("wfspb-hidden")||e("#wfspb-top-bar").fadeIn(500),(void 0===wp.wfspbConditionalVariable||wp.wfspbConditionalVariable)&&_wfsb_params?.time_to_disappear&&_wfsb_params?.displayTime&&(o=setTimeout(function(){e(".wfspb-gift-box").removeClass("wfspb-hidden"),e("#wfspb-top-bar").removeClass("wfsb-fixed").fadeOut(500)},1e3*parseInt(_wfsb_params.displayTime)))}),setTimeout(function(){e(document).trigger("wfspb-bar-init")},100),e(document.body).on("wc_fragments_refreshed wc_fragments_loaded wc_fragments_ajax_error updated_checkout",function(){e(document).trigger("wfspb-design")}),e(document).on("wfspb-bar-init",function(){_wfsb_params?.initialDelay?a=setTimeout(function(){e(document).trigger("wfspb-show-bar")},1e3*parseInt(_wfsb_params.initialDelay)):e(document).trigger("wfspb-show-bar")}),e(document).on("wfspb-refresh-message",function(s,t){if(!_wfsb_params?.html_refresh||!t)return!1;let n=!1;return e.each(_wfsb_params.html_refresh,function(s,r){e(r).length&&void 0!==t[r]&&(n=!0,e(r).replaceWith(t[r]))}),e("#wfspb-top-bar").hasClass("wfspb-hidden")?e(document).trigger("wfspb-show-bar"):e(document).trigger("wfspb-design"),n}),e(document).on("wfspb-design",function(){let s="";e("#wfspb-main-content").length&&e("#wfspb-main-content").html()?e("#wfspb-top-bar, #wfspb-shortcode, .woocommerce-free-shipping-bar-order").removeClass("wfspb-hidden"):e("#wfspb-top-bar, #wfspb-shortcode").addClass("wfspb-hidden"),e("#wfspb-current-progress").length&&(s+="#wfspb-current-progress{width: "+e("#wfspb-current-progress").data("current_percent")+"%}"),e(".woocommerce-free-shipping-bar-order-bar-inner").length&&(s+=".woocommerce-free-shipping-bar-order-bar-inner{width: "+e(".woocommerce-free-shipping-bar-order-bar-inner").data("current_percent")+"%}"),e("#wfspb-design-inline-css").length||e("head").append('<style id="wfspb-design-inline-css"></style>'),e("#wfspb-design-inline-css").html(s)})})}(jQuery);