PageSourceSearch

https://www.eautotoltokabel.hu/wp-content/themes/woodmart/js/scripts/wc/swatchesVariations.min.js?ver=8.6.4

js eautotoltokabel.hu collected 2026-10-09 23:14:33 UTC 12,903 bytes, 1 lines download raw bytes

1!function(e){woodmartThemeModule.$document.on("wdQuickShopSuccess wdQuickViewOpen wdUpdateWishlist",function(){woodmartThemeModule.swatchesVariations()}),e.each(["frontend/element_ready/wd_single_product_add_to_cart.default"],function(a,t){woodmartThemeModule.wdElementorAddAction(t,function(a){a.find(".variations_form").each(function(){e(this).wc_variation_form()}),woodmartThemeModule.swatchesVariations()})}),woodmartThemeModule.swatchesVariations=function(){var a=e(".variations_form"),t=!1,i=!1===a.data("product_variations"),r=[];e(".variations_form .label").on("click",function(a){e(this).siblings(".value").hasClass("with-swatches")&&a.preventDefault()}),a.each(function(){var a=e(this);if(!a.data("swatches")&&!a.hasClass("wd-quick-shop-2")){a.data("swatches",!0),a.data("product_variations")||a.find(".wd-swatches-product").find("> .wd-swatch").addClass("wd-enabled"),e(".wd-swatches-product > div").hasClass("wd-active")&&(a.addClass("variation-swatch-selected"),v(a));var t=a.find("select.wd-changes-variation-image");t.on("change",function(){var t=e(this),i=t.attr("name"),o=t.val(),s=a.data("product_variations"),c=!1;if(a.find("select").each(function(){if(!e(this).val())return c=!0,!1}),c&&o&&s){var n=a.parents(".product, .wd-page-content"),l=n.find(".wd-gallery-thumb .wd-carousel-item img").first(),w=n.find(".wd-gallery-images .wd-carousel-item img").first(),m=n.find(".woocommerce-product-gallery .woocommerce-product-gallery__image > a .wp-post-image").first();void 0===r.src&&(r.src=w.attr("src"),r.srcset=w.attr("srcset"),r.sizes=w.attr("sizes")),e.each(s,function(t,r){if(r.attributes[i]===o)return setTimeout(function(){a.wc_variations_image_update(r);var t=document.querySelector(".woocommerce-product-gallery__wrapper");t&&t.classList.contains("wd-carousel")&&void 0===t.swiper&&(woodmartThemeModule.$document.trigger("wdReplaceMainGallery"),d()||woodmartThemeModule.$document.trigger("wdReplaceMainGalleryNotQuickView")),u(r.variation_id,a)||l.attr("src")===r.image.thumb_src&&l.attr("srcset")===r.image.thumb_src||((l=n.find(".wd-gallery-thumb .wd-carousel-item img").first()).wc_set_variation_attr("src",r.image.src),l.wc_set_variation_attr("srcset",r.image.src),m.attr("data-o_src",r.image.src),m.attr("data-o_srcset",r.image.src),l.siblings("source").length&&l.siblings("source").attr("srcset",r.image.src),woodmartThemeModule.$document.trigger("wdResetVariation")),r.gallery_images_html&&(e(".woocommerce-product-gallery__image").trigger("zoom.destroy"),woodmartThemeModule.$document.trigger("wdReplaceMainGallery"),d()||woodmartThemeModule.$document.trigger("wdReplaceMainGalleryNotQuickView"))}),!1})}}),t.val()&&t.trigger("change"),a.on("click keydown",".wd-swatches-single > .wd-swatch",function(t){var i=e(this);if("keydown"!==t.type){var r=i.data("value"),d=i.parent().data("id"),s=a.find("select#"+CSS.escape(d));if(o(a),i.parents(".wd-swatches-limited").length&&i.parents(".wd-swatches-limited").find(".wd-swatch-divider").trigger("click"),i.parents(".variations_form.wd-clear-double").length&&i.hasClass("wd-active"))return s.val("").trigger("change"),void i.removeClass("wd-active");i.hasClass("wd-active")||i.hasClass("wd-disabled")||(s.val(r).trigger("change"),i.parent().find(".wd-active").removeClass("wd-active"),i.addClass("wd-active"),o(a),h(a))}else"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e(this).trigger("click"))}).on("woocommerce_update_variation_values",function(){h(a),o(a)}).on("click",".reset_variations",function(){a.find(".wd-active").removeClass("wd-active"),("yes"===woodmart_settings.swatches_labels_name&&woodmartThemeModule.$window.width()>=769||woodmartThemeModule.$window.width()<=768)&&a.find(".wd-attr-selected").html("")}).on("reset_data",function(){var t=e(this),i=!0,r=!0;a.find(".variations select").each(function(){var a=e(this);0!==(t.val()||"").length||(i=!1),a.has("wd-changes-variation-image")&&a.val()&&(r=!1)}),i&&t.parent().find(".wd-active").removeClass("wd-active"),a.removeClass("variation-swatch-selected"),a.find(".woocommerce-variation").removeClass("wd-show");var d=document.querySelector(".woocommerce-product-gallery__wrapper.wd-carousel");o(a),r&&u("default",a),d&&void 0!==d.swiper&&("yes"===woodmart_settings.product_slider_auto_height&&d.swiper.update(
1),d.swiper.slideTo(0)),woodmartThemeModule.$document.trigger("wdResetVariation")}).on("found_variation",function(t,o){var c=e(".woocommerce-product-gallery");if(c.find("link").length&&c.find("link").each(function(){var e=this,a=e.cloneNode(!1);a.addEventListener("load",function(){e.remove()},!1),document.head.appendChild(a)}),i&&u(o.variation_id,a,o),void 0!==o&&o.image.src){var n=a.parents(".product, .wd-page-content"),l=n.find('.wd-gallery-thumb .wd-carousel-item img[data-o_src="'+o.image.thumb_src+'"]').length>0,m=n.find(".wd-gallery-thumb .wd-carousel-item img, .quick-view-gallery.wd-carousel .wd-carousel-item img").first(),g=m.siblings("source"),_=n.find(".woocommerce-product-gallery .woocommerce-product-gallery__image > a").first().data("o_href");l&&m.wc_reset_variation_attr("src"),s(a)||u(o.variation_id,a)||o.gallery_images_html||(m.attr("src")!==o.image.thumb_src&&(m.wc_set_variation_attr("src",o.image.src),o.image.srcset.length&&m.wc_set_variation_attr("srcset",o.image.srcset),g.length&&(o.image.srcset.length?g.wc_set_variation_attr("srcset",o.image.srcset):g.wc_set_variation_attr("srcset",o.image.src))),woodmartThemeModule.$document.trigger("wdShowVariationNotQuickView")),v(a),s(a)||d()||_===o.image.full_src||w();var h=document.querySelector(".woocommerce-product-gallery__wrapper");if(h&&(h.classList.contains("wd-carousel")&&void 0!==h.swiper&&(h.swiper.update(),h.swiper.slideTo(0)),void 0!==r.src)){var f=n.find(".woocommerce-product-gallery .woocommerce-product-gallery__image > a .wp-post-image").first(),p=r.src,y=p;p!==f.attr("data-o_src")&&(void 0!==r.srcset&&(y=r.srcset),void 0!==r.sizes&&f.attr("data-o_sizes",r.sizes),f.attr("data-o_src",p),f.attr("data-o_srcset",y))}}}).on("reset_image",function(){var t=e(".woocommerce-product-gallery").find(".wd-gallery-thumb .wd-carousel-item img").first();if(!d()&&!s(a)){t.wc_reset_variation_attr("src"),t.wc_reset_variation_attr("srcset");var i=t.siblings("source");i.length&&i.wc_reset_variation_attr("srcset"),!t.attr("data-o_srcset")&&t.attr("data-srcset")&&t.attr("data-srcset",null)}var r=document.querySelector(".woocommerce-product-gallery__wrapper");r&&r.classList.contains("wd-carousel")&&void 0===r.swiper&&(woodmartThemeModule.$document.trigger("wdReplaceMainGallery"),d()||woodmartThemeModule.$document.trigger("wdReplaceMainGalleryNotQuickView"))}).on("show_variation",function(t,i){a.find(".wd-swatch").length&&!a.find(".wd-swatch.wd-active").length&&a.find("select").each(function(){var a=e(this),t=a.val();t&&a.siblings(".wd-swatches-product").find('.wd-swatch[data-value="'+t+'"]').addClass("wd-active")});var r=document.querySelector(".woocommerce-product-gallery__wrapper");(i.gallery_images_html||r&&r.classList.contains("wd-carousel")&&void 0===r.swiper&&i?.additional_variation_images_default?.length)&&(woodmartThemeModule.$document.trigger("wdReplaceMainGallery"),d()||woodmartThemeModule.$document.trigger("wdReplaceMainGalleryNotQuickView")),h(a),a.addClass("variation-swatch-selected")})}});var o=function(a){a.data("product_variations")&&a.find(".variations select").each(function(){var a=e(this),t=a.parent().find(".wd-swatches-product"),i=a.html();i=e(i),t.find(".wd-swatch").removeClass("wd-enabled").addClass("wd-disabled"),i.each(function(){var a=e(this).val();e(this).hasClass("enabled")?t.find('div[data-value="'+a+'"]').removeClass("wd-disabled").addClass("wd-enabled"):t.find('div[data-value="'+a+'"]').addClass("wd-disabled").removeClass("wd-enabled")})})},d=function(){return e(".single-product-content").hasClass("product-quick-view")},s=function(e){return e.parent().hasClass("quick-shop-form")},c=function(e,a){return"old"===woodmart_settings.variation_gallery_storage_method?n(e):l(e,a)},n=function(e){if("undefined"!=typeof woodmart_variation_gallery_data||"undefined"!=typeof woodmart_qv_variation_gallery_data){var a=d()?woodmart_qv_variation_gallery_data:woodmart_variation_gallery_data;return void 0!==a&&a&&a[e]}},l=function(e,a){var t=m(a);return void 0!==t&&t&&t[e]&&t[e].length>1||"default"===e},w=function(){if(0!==e(".woocommerce-product-gallery__wrapper").length&&("yes"===woodmart_settings.swatches_scroll_top_desktop&&woodmartThemeModule.$window.width()>=1024||"yes"===woodmart_settings.swatches_scroll_top_mobile&&woodmartThemeModule.$window.width()<=1024)){var a=e("html, body");a.stop(!0),a.animate({scrollTop:e(".woocommerce-product-gallery__wrapper").offset().top-150},800),void 0!==e.fn.tooltip&&e(".wd-swatch").tooltip("hide")}},m=function(e,a){void 0===a&&(a=!1);var t=e.data("product_variations");a&&(t=a),t||(t=e.data("wd_product_variations"));var i=[];return t?("object"!=typeof t||Array.isArray(t)?("string"==typeof t&&(t=JSON.parse(t)),t.forEach(function(e){i[e.variation_id]=e.additional_variation_images,i.default=e.additional_variation_images_default})):(i[t.variation_id]=t.additional_variation_images,i.default=t.additional_variation_images_default,e.data("wd_product_variations",JSON.stringify([{additional_variation_images_default:t.additional_variation_images_default}]))),i):i},u=function(a,i,r){if(void 0===r&&(r=!1),"old"===woodmart_settings.variation_gallery_storage_method){if(!c(a,i)||s(i)||"default"===a&&!t)return!1;g(a,i)}else{if(!c(a,i)&&!r||r&&!function(e,a){return void 0!==a&&a&&a.additional_variation_images&&a.additional_variation_images.length>1||"default"===e}(a,r)||s(i)||"default"===a&&!t)return!1;var o=m(i,r);_(o[a],i,a)}return e(".woocommerce-product-gallery__image").trigger("zoom.destroy"),woodmartThemeModule.$document.trigger("wdReplaceMainGallery"),d()||woodmartThemeModule.$document.trigger("wdReplaceMainGalleryNotQuickView"),t="default"!==a,woodmartThemeModule.$window.trigger("resize"),!0},g=function(e,a){var t=(d()?woodmart_qv_variation_gallery_data:woodmart_variation_gallery_data)[e],i=a.parents(".product, .wd-page-content"),r=i.find(".woocommerce-product-gallery__wrapper");r.hasClass("wd-carousel")&&(r=r.find(".wd-carousel-wrap")),t&&t.length>1?i.find(".woocommerce-product-gallery").addClass("wd-has-thumb"):i.find(".woocommerce-product-gallery").removeClass("wd-has-thumb"),r.empty();for(var o=0;o<t.length;o++){var s="";d()||"default"!==e||void 0===t[o].video||void 0===t[o].video.classes||(s+=t[o].video.classes);var c='<div class="wd-carousel-item'+s+'">';c+='<figure data-thumb="'+t[o].data_thumb+'" class="woocommerce-product-gallery__image">',d()||"default"!==e||void 0===t[o].video||void 0===t[o].video.controls||(c+=t[o].video.controls),d()||(c+='<a href="'+t[o].href+'">'),c+=t[o].image,d()||(c+="</a>"),d()||"default"!==e||void 0===t[o].video||void 0===t[o].video.content||(c+=t[o].video.content),c+="</figure></div>",r.append(c)}},_=function(e,a,t=""){var i=a.parents(".product, .wd-page-content"),r=i.find(".woocommerce-product-gallery__wrapper");for(var o in r.hasClass("wd-carousel")&&(r=r.find(".wd-carousel-wrap")),r.empty(),e&&e.length>1?i.find(".woocommerce-product-gallery").addClass("wd-has-thumb"):i.find(".woocommerce-product-gallery").removeClass("wd-has-thumb"),e)if(e.hasOwnProperty(o)){var s="";d()||"default"!==t||void 0===e[o].video||void 0===e[o].video.classes||(s+=e[o].video.classes);var c='<div class="wd-carousel-item'+s+'">';d()||"default"!==t||void 0===e[o].video||void 0===e[o].video.controls||(c+=e[o].video.controls),c+='<figure class="woocommerce-product-gallery__image" data-thumb="'+e[o].thumbnail_src+'">',d()||(c+='<a href="'+e[o].full_src+'" data-elementor-open-lightbox="no">');var n=e[o].srcset?'srcset="'+e[o].srcset+'"':"";c+='<img width="'+e[o].width+'" height="'+e[o].height+'" src="'+e[o].src+'" class="'+e[o].class+'" alt="'+e[o].alt+'" title="'+e[o].title+'" data-caption="'+e[o].data_caption+'" data-src="'+e[o].data_src+'"  data-large_image="'+e[o].data_large_image+'" data-large_image_width="'+e[o].data_large_image_width+'" data-large_image_height="'+e[o].data_large_image_height+'" '+n+' sizes="'+e[o].sizes+'" />',d()||(c+="</a>"),d()||"default"!==t||void 0===e[o].video||void 0===e[o].video.content||(c+=e[o].video.content),c+="</figure></div>",r.append(c)}};function v(a){var t=a.find(".woocommerce-variation"),i=!1;t.length&&(t.find("> *").each(function(){e(this).is(":empty")||(i=!0)}),i&&t.addClass("wd-show"))}function h(a){("yes"===woodmart_settings.swatches_labels_name&&woodmartThemeModule.$window.width()>=769||woodmartThemeModule.$window.width()<=768)&&a.find(".wd-active").each(function(){var a=e(this),t=a.find(".wd-swatch-text").text(),i=a.parents("tr").find(".wd-attr-selected");i.length?i.html(t):a.parents("tr").find(" > th").append('<span class="wd-attr-selected">'+t+"</span>")})}},e(document).ready(function(){woodmartThemeModule.swatchesVariations()})}(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.