403Webshell
Server IP : 172.67.158.161  /  Your IP : 3.15.25.186
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/giankuin/dangky.bnnagency.com/wp-content/themes/flatsome/assets/js/extensions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/giankuin/dangky.bnnagency.com/wp-content/themes/flatsome/assets/js/extensions/flatsome-swatches-frontend.js
!function(e){"use strict";const t="stacked"===flatsomeVars.options.swatches_layout,s=!flatsomeVars.options.swatches_disable_deselect,a='<span class="ux-swatch-selected-value__separator">:&nbsp;</span>',o="ontouchstart"in window;e.fn.flatsomeSwatches=function(){return this.each((function(){var o=e(this);function n(){setTimeout((function(){o.find("tbody tr").each((function(){var t=e(this),s=t.find("select").find("option"),a=s.filter(":selected"),o=[];s.each((function(t,s){""!==s.value&&!0!==e(s).prop("disabled")&&o.push(s.value)})),t.find(".ux-swatch").each((function(){var t=e(this),s=t.attr("data-value");-1!==o.indexOf(s)?t.removeClass("disabled"):(t.addClass("disabled"),a.length&&s===a.val()&&t.removeClass("selected"))}))}))}),100)}function c(e,s){t&&(s=s?a+s:"",e.parents("tr").find(".ux-swatch-selected-value").html()!==s&&e.parents("tr").find(".ux-swatch-selected-value").html(s))}function i(){t&&o.find(".ux-swatch.selected").each((function(){const t=e(this).attr("data-name");e(this).parents("tr").find(".ux-swatch-selected-value").html(a+t)}))}o.hasClass("ux-swatches-js-attached")||(t&&o.find(".variations .label").append('<span class="ux-swatch-selected-value"></span>'),o.on("click",".ux-swatch",(function(t){t.preventDefault();var a=e(this),o=a.closest(".value").find("select"),n=a.data("value"),i=a.data("name");a.hasClass("disabled")||(a.hasClass("selected")?s&&(o.val(""),a.removeClass("selected"),c(a,"")):(a.addClass("selected").siblings(".selected").removeClass("selected"),o.val(n),c(a,i)),o.change())})),o.on("mouseenter mouseleave",".ux-swatch",(function(t){const s=e(this);"mouseenter"===t.type&&c(s,s.attr("data-name")),"mouseleave"===t.type&&c(s,s.closest(".ux-swatches").find(".ux-swatch.selected").attr("data-name"))})),o.on("click",".reset_variations",(function(){o.find(".ux-swatch.selected").removeClass("selected"),o.find(".ux-swatch.disabled").removeClass("disabled"),t&&o.find(".ux-swatch-selected-value").html("")})),n(),o.on("woocommerce_update_variation_values",(function(){n()})),i(),o.on("show_variation",(function(){i()})),o.addClass("ux-swatches-js-attached"))}))};const n=!flatsomeVars.options.swatches_box_behavior_selected,c=Boolean(flatsomeVars.options.swatches_box_update_urls),i="click"===flatsomeVars.options.swatches_box_select_event?"click":"hover",l=Boolean(flatsomeVars.options.swatches_box_reset),d=Boolean(flatsomeVars.options.swatches_box_reset_limited),r=flatsomeVars.options.swatches_box_reset_extent,u=parseInt(flatsomeVars.options.swatches_box_reset_time);e.fn.flatsomeSwatchesLoop=function(){return this.each((function(){var t=e(this);if(t.hasClass("ux-swatches-in-loop-js-attached"))return;var s,a,f,h,m,p=t.closest(".product-small"),w=p.find(".box-image a").first().attr("href"),v=[],_=!1;let x;if("hover"===i&&t.on("mouseenter",".ux-swatch",(function(t){if(!o){var s=e(this);b(),C(s)}})),t.on("click",".ux-swatch",(function(t){t.preventDefault();var s=e(this);if(s.hasClass("selected")){if(n){if(window.UxBuilder)return;return void(window.location=m||w)}s.removeClass("selected"),p.removeClass("ux-swatch-active"),g(),c&&S(v)}else b(),C(s)})),t.on("click",".ux-swatches__limiter",(function(t){const s=e(this);s.parent().find(".ux-swatch--limited.hidden").removeClass("hidden").fadeOut(0).fadeIn(500),s.hide(),e(document).trigger("flatsome-equalize-box")})),l){const s="product-box"===r?"":".ux-swatch";("product-box"===r?p:t).on("mouseenter mouseleave",s,(function(s){if("mouseleave"===s.type){const s=t.find(".selected");x=setTimeout((function(){s.removeClass("selected"),p.removeClass("ux-swatch-active"),d&&(t.find(".ux-swatch--limited").fadeOut(500).addClass("hidden"),t.find(".ux-swatches__limiter").fadeIn(500),e(document).trigger("flatsome-equalize-box")),g(),c&&S(v)}),u)}else clearTimeout(x)}))}function b(){_||(h=p.find(".box-image picture:not(.back-image) source"),s=p.find(".box-image img:not(.back-image)").first(),a=s.attr("src"),f=s.attr("srcset"),v.push(p.find(".box-image a").first()),v.push(p.find(".woocommerce-loop-product__link")),v.push(p.find(".product_type_variable.add_to_cart_button")),_=!0)}function C(e){e.hasClass("selected")||(t.find(".selected").removeClass("selected"),e.addClass("selected"),p.addClass("ux-swatch-active"),function(e){s.attr("src",e.data("image-src")),e.data("image-srcset")&&(s.attr("srcset",e.data("image-srcset")),h&&h.attr("srcset",e.data("image-srcset")))}(e),c&&function(e,t,s){var a=(t.indexOf("?")>-1?"&":"?")+e.data("attribute_name")+"="+e.data("value");s.forEach((function(e){e.attr("href",t+a)})),m=t+a}(e,w,v))}function g(){s&&s.attr("src",a),f&&(s.attr("srcset",f),h&&h.attr("srcset",f))}function S(e){e.forEach((function(e){e.attr("href",w)}))}t.addClass("ux-swatches-in-loop-js-attached")}))},e((function(){const t=".variations_form",s=".ux-swatches-in-loop:not(.js-ux-swatches)";e(t).flatsomeSwatches(),e(s).flatsomeSwatchesLoop(),e(document).on("wc_variation_form",(function(){e(t).flatsomeSwatches()})),e(document.body).on("wc-composite-initializing",".composite_data",(function(t,s){s.actions.add_action("component_options_state_changed",(function(t){e(t.$component_content).find(".variations_form").removeClass("ux-swatches-js-attached")}))})),e(document).on("flatsome-infiniteScroll-append",(function(t,a,o,n){e(s,n).flatsomeSwatchesLoop()})),e(document).on("facetwp-loaded",(function(){e(s).flatsomeSwatchesLoop()})),"undefined"!=typeof wp&&wp.customize&&wp.customize.selectiveRefresh&&wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(t){e(s,t.container).flatsomeSwatchesLoop()})),e(document).ajaxComplete((function(){setTimeout((()=>{e(t).flatsomeSwatches(),e(s).flatsomeSwatchesLoop()}),100)})),e(document.body).on("updated_wc_div",(function(){setTimeout((()=>{e(t).flatsomeSwatches(),e(s).flatsomeSwatchesLoop()}),100)}))}))}(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit