Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.48.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : swatches.min.js
!function($){"use strict";function a(a,b){this.recalc_needed=!0,this.variation_attributes=a,this.variations_available=b,this.variations_current={},this.variations_selected={},this.reset_current=function(){for(var a in this.variation_attributes){this.variations_current[a]={};for(var b=0;b<this.variation_attributes[a].length;b++)this.variations_current[a.toString()][this.variation_attributes[a][b].toString()]=0}},this.update_current=function(){this.reset_current();for(var b=0;b<this.variations_available.length;b++)if(this.variations_available[b].variation_is_active){var d=this.variations_available[b].attributes;for(var a in d){var c=d[a],f=this.variations_selected[a];if(f&&f==c)this.variations_current[a][c]=1;else{var g=!0;for(var e in this.variations_selected)if(e!=a){var h=this.variations_selected[e],i=d[e];h&&i&&h!=i&&(g=!1)}if(g){if(""===c)for(var j in this.variations_current[a])this.variations_current[a][j]=1;else this.variations_current[a][c]=1}}}}this.recalc_needed=!1},this.get_current=function(){return this.recalc_needed&&this.update_current(),this.variations_current},this.reset_selected=function(){this.recalc_needed=!0,this.variations_selected={}},this.set_selected=function(a,b){this.recalc_needed=!0,this.variations_selected[a]=b},this.get_selected=function(){return this.variations_selected}}function b(e,j){var c,o,k,a=e.closest(".product").find(".woocommerce-product-gallery.images").parent(),b="",l=!1,f=!1;if(e.closest(".product_item").length&&(l=e.closest(".product_item")),a.closest(".elementor-widget").length&&(f=!0),null!==j)b=(c=j,o=f,k="",void 0!==c&&$.isArray(c.la_additional_images)&&$.each(c.la_additional_images,function(b,a){k+='<div data-thumb="'+a.thumb[0]+'" class="woocommerce-product-gallery__image">',o||(k+='<div class="zoomouter"><div class="zoominner">'),k+='<a href="'+a.large[0]+'" data-videolink="'+a.videolink+'">',k+="<img ",k+='width="'+a.single[1]+'" ',k+='height="'+a.single[2]+'" ',k+='src="'+a.single[0]+'" ',k+='class="attachment-shop_single size-shop_single" ',k+='alt="'+a.alt+'" ',k+='title="'+a.title+'" ',k+='data-caption="'+a.caption+'" ',k+='data-src="'+a.large[0]+'" ',k+='data-large_image="'+a.large[0]+'" ',k+='data-large_image_width="'+a.large[1]+'" ',k+='data-large_image_height="'+a.large[2]+'" ',k+='srcset="'+a.srcset+'" ',k+='sizes="'+a.sizes+'" ',k+="</a>",o||(k+="</div></div>"),k+="</div>"}),k);else{var m=a.data("old_gallery")||!1;m?b=m:a.data("old_gallery",a.find(".woocommerce-product-gallery__wrapper").html())}if(""!=b&&!l){if(a.data("prev_gallery")){var g=$(a.data("prev_gallery")),n=$(b),h=!0;if(g.length==n.length)for(var d=0;d<g.length;d++)$(g[d]).attr("data-thumb")!=$(n[d]).attr("data-thumb")&&(h=!1);else h=!1;if(h)return}a.data("prev_gallery",b);var i='<div class="woocommerce-product-gallery--with-images woocommerce-product-gallery la-woo-product-gallery images" data-columns="'+a.find(".woocommerce-product-gallery.images").data("columns")+'">';a.data("gallery_action")&&(i+=a.data("gallery_action")),i+='<figure class="woocommerce-product-gallery__wrapper">'+b+'</figure><div class="la_woo_loading"><div class="la-loader spinner3"><div class="dot1"></div><div class="dot2"></div><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div></div></div>',a.removeAttr("data-element-loaded").css({"max-height":a.height(),"min-height":a.height()}).addClass("swatch-loading"),a.html(i);var p=a.find(".woocommerce-product-gallery.images");try{p.wc_product_gallery().addClass("swatch-loaded")}catch(q){}a.css({"max-height":"none","min-height":"200px"}).removeClass("swatch-loading"),$("div.product").first().get(0).scrollIntoView({inline:"nearest",block:"start",behavior:"smooth"}),"undefined"!=typeof LaStudioKits&&f&&LaStudioKits.wooGallery(a.closest(".elementor-widget")),LaStudioWooCommerce.InitGallery(a.closest(".single-product-article"),!1)}}$.fn.lastudio_variation_form=function(){var c=this,e=parseInt(c.data("product_id"),10),f=null,g=!1,h=null,d=!1;if(c.closest(".product_item").length&&(d=!0),c.addClass("la-init-swatches"),c.find("td.label").each(function(){$(this).find("label").append('<span class="swatch-label"></span>')}),d){var i=c.closest(".product_item").find("a.woocommerce-loop-product__link").first().attr("href")||c.attr("action");c.find(".swatch-control").each(function(){$(this).append('<div class="swatch-wrapper-more"><a href="'+i+'"><i class="lastudioicon-i-add"></i><span>'+(la_theme_config.i18n.more_text||"more")+"</span></a></div>")})}c.on("bind_calculator",function(){var b=c.data("product_variations");(g=!1===b)&&c.block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var d={};if(c.find(".select-option.selected").each(function(f,g){var b=$(this),c=b.closest("div.select").eq(0),d=c.closest("tr").find(".swatch-label").eq(0),e=c.find("select").first(),a=$("<div/>").html(b.data("value")).text();a=(a=a.replace(/'/g,"\\'")).replace(/"/g,'\\"'),d&&d.html(e.children("[value='"+a+"']").eq(0).text()),e.trigger("change")}),c.find(".variations select").each(function(h,f){var a=$(f),e=a.data("attribute_name")||a.attr("name");d[e]=[];var b="";if((b=a.find("option:gt(0)").get()).length)for(var c=0;c<b.length;c++){var g=b[c];d[e].push($(g).val())}}),g){h&&h.abort();var i={product_id:e,action:"la_swatch_get_product_variations"};h=$.ajax({url:la_theme_config.ajax_url,type:"POST",data:i,success:function(b){f=new a(d,b.data,null,null),c.unblock()}})}else f=new a(d,b,null,null);c.trigger("woocommerce_variation_has_changed")}),c.on("change",".wc-default-select",function(c){var a=$(this),b=a.closest("tr").find(".swatch-label").eq(0);""!=a.val()?b.html(a.find("option:selected").html()):b.html("")}),c.find(".wc-default-select").trigger("change"),c.on("click",".reset_variations",function(){return c.find(".swatch-label").html(""),c.find(".select-option").removeClass("selected"),c.find(".radio-option").prop("checked",!1),$("span.price",$('.single-price-wrapper[data-product_id="'+c.data("product_id")+'"]')).remove(),!1}).on("click",".select-option",function(f){f.preventDefault();var a=$(this),d=a.closest("div.select").eq(0),c=d.closest("tr").find(".swatch-label").eq(0),e=d.find("select").first();if(a.hasClass("disabled"))return!1;if(a.hasClass("selected"))a.removeClass("selected"),e.children("option:eq(0)").prop("selected","selected").change(),c&&c.html("");else{d.find(".select-option").removeClass("selected"),a.addClass("selected");var b=$("<div/>").html(a.data("value")).text();b=(b=b.replace(/'/g,"\\'")).replace(/"/g,'\\"'),e.trigger("focusin").children("[value='"+b+"']").prop("selected","selected").change(),c&&c.html(e.children("[value='"+b+"']").eq(0).text())}}).on("change",".radio-option",function(d){var b=$(this),c=b.closest("div.select").eq(0).find("select").first(),a=$("<div/>").html(b.val()).text();a=(a=a.replace(/'/g,"\\'")).replace(/"/g,'\\"'),c.trigger("focusin").children("[value='"+a+"']").prop("selected","selected").change()}).on("woocommerce_variation_has_changed",function(){if(null!==f){c.find(".variations select").each(function(){var a=$(this).data("attribute_name")||$(this).attr("name");f.set_selected(a,$(this).val())});var a=f.get_current();c.find("div.select").each(function(d,b){var c=$(b).find("select").first(),e=a[c.data("attribute_name")||c.attr("name")];$(b).find("div.select-option").each(function(b,a){e[$(a).data("value")]?$(a).removeClass("disabled"):$(a).addClass("disabled","disabled")}),$(b).find("input.radio-option").each(function(b,a){e[$(a).val()]?($(a).removeAttr("disabled"),$(a).parent().removeClass("disabled")):($(a).attr("disabled","disabled"),$(a).parent().addClass("disabled","disabled"))})}),g&&c.find(".wc-default-select").each(function(d,c){var b=$(c),e=a[b.data("attribute_name")||b.attr("name")];b.find("option:gt(0)").removeClass("attached"),b.find("option:gt(0)").removeClass("enabled"),b.find("option:gt(0)").removeAttr("disabled"),b.find("option:gt(0)").each(function(b,a){e[$(a).val()]?($(a).addClass("attached"),$(a).addClass("enabled")):$(a).addClass("disabled","disabled")}),b.find("option:gt(0):not(.enabled)").attr("disabled","disabled")})}}).on("found_variation",function(d,a){b(c,a)}).on("reset_image",function(a){b(c,null)}),c.find(".single_variation").on("show_variation",function(i,f,h){if(d){var b=c.closest(".product_item");""!=f.price_html&&$("span.price",b).replaceWith(f.price_html);var a,e=b.find(".button.la-addcart").first();e.data("tmptext")?a=e.data("tmptext"):(a=e.text(),e.data("tmptext",a)),h&&c.find(".single_add_to_cart_button").length&&(a=c.find(".single_add_to_cart_button").text()),b.find(".button.la-addcart").attr("title",a),b.find(".button.la-addcart .labtn-text").text(a).attr("title",a)}else{var g=$('.single-price-wrapper[data-product_id="'+c.data("product_id")+'"]');$("span.price",g).remove(),g.append(f.price_html)}})},$(function(){var a=[];la_theme_config.la_extension_available.swatches?$(document).on("wc_variation_form","form.variations_form",function(c){var b=$(c.target);a.push(b),b.data("has_swatches_form")||(b.data("has_swatches_form",!0),b.lastudio_variation_form(),b.trigger("bind_calculator"),b.on("reload_product_variations",function(){for(var b=0;b<a.length;b++)a[b].trigger("woocommerce_variation_has_changed"),a[b].trigger("bind_calculator"),a[b].trigger("woocommerce_variation_has_changed")}))}):console.log("la_theme_config.la_extension_available.swatches is not activate")})}(jQuery)
© 2025 XylotrechusZ