// source --> https://shop.stoiber-holz.de/wp-content/plugins/woocommerce-german-market/js/WooCommerce-German-Market-Frontend.min.js?ver=3.10.4 
"yes"==german_market_jquery_no_conflict&&jQuery.noConflict(),function(a){var r={init:function(){this.remove_totals(),this.register_payment_update(),this.on_update_variation(),this.sepa_direct_debit(),this.second_checkout_place_order(),this.deactivate_ship_to_different_address_purchase_on_account()},deactivate_ship_to_different_address_purchase_on_account:function(){a("body").on("update_checkout",function(){if(a("#deactivate_ship_to_different_address_if_purchase_on_account").length){if(!a("#payment_method_german_market_purchase_on_account").length)return;a("#payment_method_german_market_purchase_on_account").prop("checked")?"1"!=a("#deactivate_ship_to_different_address_if_purchase_on_account").val()&&"yes"!=a("#deactivate_ship_to_different_address_if_purchase_on_account").val()||(a("#ship-to-different-address-checkbox").length&&a("#ship-to-different-address-checkbox").prop("checked",!1),a(".shipping_address").length&&a(".shipping_address").hide(),a(".woocommerce-shipping-fields").length&&a(".woocommerce-shipping-fields").hide()):a(".woocommerce-shipping-fields").length&&a(".woocommerce-shipping-fields").show()}})},second_checkout_place_order:function(){a(":submit.wgm-place-order").click(function(){a(".wgm-place-order-disabled").length&&a(".wgm-place-order-disabled").show()})},setupAjax:function(){"undefined"!=typeof wgm_wpml_ajax_language&&a.ajaxSetup({data:{lang:wgm_wpml_ajax_language}})},remove_totals:function(){1==woocommerce_remove_updated_totals&&a(".woocommerce_message").remove()},register_payment_update:function(){1==woocommerce_payment_update&&a(document.body).on("change",'input[name="payment_method"]',function(){a("body").trigger("update_checkout")})},on_update_variation:function(){var e,r;"gm_default"==german_market_price_variable_products?(r=a(".single-product"),e=a(".legacy-itemprop-offers"),r.on("found_variation",".variations_form",function(){e.slideUp(),"none"!=german_market_price_variable_theme_extra_element&&jQuery(german_market_price_variable_theme_extra_element).slideUp()}),r.on("reset_data",".variations_form",function(){e.slideDown(),"none"!=german_market_price_variable_theme_extra_element&&jQuery(german_market_price_variable_theme_extra_element).slideDown()})):"gm_sepcial"==german_market_price_variable_products&&((r=a(".single-product")).on("found_variation",".variations_form",function(){var e='<div id="german-market-variation-price"></div>',r=jQuery(".woocommerce-variation-price.woocommerce-variation-price").html();a(".woocommerce-variation-availability").length&&(r+=a(".woocommerce-variation-availability").html()),a(".woocommerce-variation-description").length&&(r+=a(".woocommerce-variation-description").html()),jQuery(".woocommerce-variation.single_variation").hide(),jQuery(".woocommerce-variation-price").hide(),jQuery(".legacy-itemprop-offers").hide(),"none"!=german_market_price_variable_theme_extra_element&&jQuery(german_market_price_variable_theme_extra_element).hide(),jQuery(".elementor-widget-woocommerce-product-price .price").length&&jQuery(".elementor-widget-woocommerce-product-price .price").hide(),jQuery(".dtwpb-price.price").length&&(jQuery("#german-market-variation-price").length||jQuery(e).insertAfter(".dtwpb-price.price"),jQuery(".dtwpb-price.price").hide(),jQuery(".gm-wp_bakery_woocommerce_get_price_html").length&&jQuery(".gm-wp_bakery_woocommerce_get_price_html").hide()),jQuery(".et_pb_wc_price").length&&(jQuery("#german-market-variation-price").length||jQuery(e).insertAfter(".et_pb_wc_price"),jQuery(".et_pb_wc_price").hide()),jQuery("#german-market-variation-price").length?jQuery("#german-market-variation-price").show():jQuery(e).insertAfter(".legacy-itemprop-offers"),jQuery("#german-market-variation-price").html(r)}),r.on("reset_data",".variations_form",function(){jQuery(".elementor-widget-woocommerce-product-price .price").length&&jQuery(".elementor-widget-woocommerce-product-price .price").show(),jQuery(".dtwpb-price.price").length&&(jQuery(".dtwpb-price.price").show(),jQuery(".gm-wp_bakery_woocommerce_get_price_html").length&&jQuery(".gm-wp_bakery_woocommerce_get_price_html").show()),jQuery(".et_pb_wc_price").length&&jQuery(".et_pb_wc_price").show(),jQuery(".legacy-itemprop-offers").show(),jQuery("#german-market-variation-price").hide(),"none"!=german_market_price_variable_theme_extra_element&&jQuery(german_market_price_variable_theme_extra_element).show()}))},sepa_direct_debit_show_preview:function(){var e={holder:a('[name="german-market-sepa-holder"]').val(),iban:a('[name="german-market-sepa-iban"]').val(),bic:a('[name="german-market-sepa-bic"]').val(),street:a('[name="billing_address_1"]').val(),zip:a('[name="billing_postcode"]').val(),city:a('[name="billing_city"]').val(),country:a('[name="billing_country"]').val()},r=!0;if(jQuery("#german-market-sepa-checkout-fields").is(":visible")){for(key in e)if(("bic"!=key&&"iban"!=key&&"holder"!=key||!a('[name="german-market-sepa-'+key+'"]').hasClass("gm-required-no"))&&void 0!==e[key]&&""==e[key].trim()){r=!1;break}}else r=!1;return r},sepa_direct_debit_show_preview_do:function(){r.sepa_direct_debit_show_preview()?(a(".gm-sepa-direct-debit-second-checkout-disabled").show(),a(".gm-sepa-direct-debit-order-pay").show()):(a(".gm-sepa-direct-debit-second-checkout-disabled").hide(),a(".gm-sepa-direct-debit-order-pay").hide(),a("#gm-sepa-mandate-preview-text").slideUp())},sepa_direct_debit:function(){a(document.body).on("click","#gm-sepa-mandate-preview",function(e){e.preventDefault();var r={action:"gm_sepa_direct_debit_mandate_preview",holder:a('[name="german-market-sepa-holder"]').val(),iban:a('[name="german-market-sepa-iban"]').val(),bic:a('[name="german-market-sepa-bic"]').val(),street:a('[name="billing_address_1"]').val(),zip:a('[name="billing_postcode"]').val(),city:a('[name="billing_city"]').val(),country:a('[name="billing_country"]').val(),nonce:sepa_ajax_object.nonce};jQuery.post(sepa_ajax_object.ajax_url,r,function(e){a("#gm-sepa-mandate-preview-text").html(e),a("#gm-sepa-mandate-preview-text").slideDown(),a("#gm-sepa-mandate-preview-text .close").click(function(){a("#gm-sepa-mandate-preview-text").slideUp()})})}),a("#gm-sepa-mandate-preview").ready(function(){if(a("#gm-sepa-mandate-preview").length){var e={0:'[name="german-market-sepa-holder"]',1:'[name="german-market-sepa-iban"]',2:'[name="german-market-sepa-bic"]',3:'[name="billing_address_1"]',4:'[name="billing_postcode"]',5:'[name="billing_city"]',6:'[name="billing_country"]'};for(key in e)a(document.body).on("change keyup",e[key],r.sepa_direct_debit_show_preview_do)}}),a(document.body).on("change",'input[name="payment_method"]',function(){"german_market_sepa_direct_debit"==a(this).val()?a(".gm-sepa-direct-debit-second-checkout-disabled").show():a(".gm-sepa-direct-debit-second-checkout-disabled").hide()}),a(".gm-sepa-direct-debit-second-checkout-disabled").ready(function(){a("#payment_method_german_market_sepa_direct_debit").is(":checked")&&a(".gm-sepa-direct-debit-second-checkout-disabled").show()}),a(document.body).on("change",'input[name="shipping_method[0]"]',function(){a("#p-shipping-service-provider").length&&(a(this).val().includes("local_pickup")?a("#p-shipping-service-provider").hide():a("#p-shipping-service-provider").show())})}};a(document).ready(function(e){r.init()})}(jQuery);