PageSourceSearch

https://www.air-creative.ru/wa-apps/shop/plugins/salesku/js/saleskuPluginProduct.min.js

js air-creative.ru collected 2026-10-05 00:01:41 UTC 47,940 bytes, 99 lines download raw bytes

1function var_dump(){var a="",b=0,c=0,d=function(e,h){for(var k="",l=0;l<e;l++)k+=h;return k},f=function(e){var h="";if(null===e)h="NULL";else if("boolean"===typeof e)h="bool("+e+")";else if("string"===typeof e)h="string("+e.length+') "'+e+'"';else if("number"===typeof e)h=parseFloat(e)==parseInt(e,10)?"int("+e+")":"float("+e+")";else if(void 0===e)h="UNDEFINED";else if("function"===typeof e){h=e.toString().split("\n");e="";for(var k in h)h.hasOwnProperty(k)&&(e+=""+h[k]+"\n");h=e}else e instanceof
2Date?(e=e.toString(),h="string("+e.length+') "'+e+'"'):e.nodeName&&(h='HTMLElement("'+e.nodeName.toLowerCase()+'")');return h},g=function(e,h,k,l){var m="";0<h&&h++;var u=d(k*(h-1),l),t=d(k*(h+1),l),q="";if("object"===typeof e&&null!==e){var n;if(n=e.constructor)n=(n=/\W*function\s+([\w\$]+)\s*\(/.exec(e.constructor))?n[1]:"(Anonymous)",n="PHPJS_Resource"===n;if(n)return e.var_dump();b=0;for(m in e)b++;q+="array("+b+") {\n";for(var p in e)e.hasOwnProperty(p)&&("object"!==typeof e[p]||null===e[p]||
3e[p]instanceof Date||e[p].nodeName?(m=f(e[p]),q+=t+"["+p+"] =>\n"+t+m+"\n"):q+=t+"["+p+"] =>\n"+t+g(e[p],h+1,k,l));q+=u+"}\n"}else q=f(e);return q};a=g(arguments[0],0,4," ");for(c=1;c<arguments.length;c++)a+="\n"+g(arguments[c],0,4," ");return a}function av(a){alert(var_dump(a))}
4(function(a){a.fn.commonParent=function(b){b||(b=10);var c=!1,d={};this.each(function(){for(var f=0,g=!1,e=a(this),h=0;h<b;h++){e=e.parent();var k=e.get(0),l;for(l in d)if(d.hasOwnProperty(l)){var m=d[l].get(0);if(k==m){c=e;g=!0;break}}if(g)break;d[f]=e;f++}if(g)return!0});return c?this.pushStack(c):!1}})(jQuery);"object"!=typeof $.saleskuPluginProductElements&&($.saleskuPluginProductElements={});$.saleskuPluginProductElements.exists=function(a){return this.hasOwnProperty(a)?!0:!1};
5$.saleskuPluginProductElements.set=function(a,b,c){if(c||!this.exists(a))this[a]=b};$.saleskuPluginProductElements.get=function(a){return this.exists(a)?this[a]:null};
6$.saleskuPluginProductElements.set("_Selectors",{salesku_product_id:".salesku-id",salesku_product_root:".salesku_plugin-product",input_product_id:'[name="product_id"]',input_product_id_name:"product_id",div_offers:".offers",price:".price",compare_price:".compare-at-price",compare_price_html:'<span class="compare-at-price nowrap"></span>',image:".image",skus:".skus",skus_button:".skus input[type=radio]",skus_button_container:"label",services:".services",services_variants:".service-variants",stocks:".stocks",
7    sku_feature:".sku-feature",sku_feature_value_class_active:"selected",sku_feature_value_class_grey:"",sku_feature_value_class_hide:"",sku_feature_element_data_id:"feature-id",sku_feature_container:".inline-select",sku_feature_button:"a",sku_options:".options",options_container:".salesku_options",cart_button_plugin:".salesku_plugin-cart-button",cart_button_class:".addtocart",cart_button:"[type=submit]",quantity:'.qty,[name="quantity"]',added2cart:".added2cart",cart:"#cart",form_action_indicator:"data-url"});
8$.saleskuPluginProductElements.set("Root",function(a){var b=this,c=$(a).attr("id");if(!(void 0==c||this.hasOwnProperty("_products_root_elements")&&b._products_root_elements.hasOwnProperty(c))){var d=$(b._Selectors.salesku_product_id);this._products_root_elements={};var f=!1;if(d.length)if(1<d.length)f=$(a).closest(b._Selectors.salesku_product_root).hasClass(b._Selectors.salesku_product_root.replace(/\./g,""))?$(a).closest(b._Selectors.salesku_product_root).parent():d.commonParent();else if($(a).closest(b._Selectors.salesku_product_root).hasClass(b._Selectors.salesku_product_root.replace(/\./g,
9    "")))f=$(a).closest(b._Selectors.salesku_product_root).parent();else{a=d;if(a.closest("li").attr("itemtype"))f=a.closest("li").parent();else for(var g,e=0;10>e;e++)if(a=a.parent(),(g=a.find("form").find(b._Selectors.input_product_id))&&0<g.val()){f=a.parent().parent();console.log("Salesku: \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043d\u0435 \u0442\u043e\u0447\u043d\u043e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441(salesku_plugin-product) \u0434\u043b\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432!");
10    break}if(!f)for(a=d,e=0;10>e;e++)if(a=a.parent(),a.find("a").length&&(g=a.find(b._Selectors.input_product_id))&&0<g.val()){f=a.parent();console.log("Salesku: \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u043d\u0435 \u0442\u043e\u0447\u043d\u043e, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043b\u0430\u0441\u0441(salesku_plugin-product) \u0434\u043b\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u044b\u0445 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432!");
11    break}}f?(f.hasClass("salesku_plugin_product_list")||$.saleskuPluginProductsPool.addList(f),f.children().each(function(){var h=$(this).find(b._Selectors.salesku_product_id);h.hasClass(b._Selectors.salesku_product_id.replace(/\./g,""))&&(b._products_root_elements[h.attr("id")]=$(this),$(this).addClass("salesku_plugin-product"))})):console.log("Salesku: \u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432!")}if(b._products_root_elements.hasOwnProperty(c))return b._products_root_elements[c];
12    console.log("Salesku: \u041a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 ("+c+')\u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d, \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443 (\u043e\u0431\u044b\u0447\u043d\u043e <li>) \u043a\u043b\u0430\u0441\u0441 "salesku_plugin-product"\n\u0414\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a: <li class="salesku_plugin-product">.')});
13$.saleskuPluginProductElements.set("Parent",function(a){return a.parent()});$.saleskuPluginProductElements.set("Form",function(a){var b=this,c=!1;return a&&(a.find("form").each(function(){var d=$(this).find(b._Selectors.input_product_id);
13d.attr("name")==b._Selectors.input_product_id_name&&0<d.val()&&(c=$(this))}),c)?c:a});
14$.saleskuPluginProductElements.set("Price",function(a){var b=!1,c=this;a.find(c._Selectors.price).each(function(){$(this).closest(c._Selectors.skus).hasClass(c._Selectors.skus.replace(/\./g,""))||(b=$(this))});b||console.log("Salesku: \u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0446\u0435\u043d\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430: "+c._Selectors.price+"! \u0420\u0435\u043a\u043e\u043c\u043c\u0435\u043d\u0434\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0442\u0435\u0433\u0443 \u0430\u043e\u043a\u0430\u0437\u0430 \u0446\u0435\u043d\u044b \u0442\u043e\u0432\u0430\u0440\u0430 \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440: "+
15    c._Selectors.price);return b});$.saleskuPluginProductElements.set("ComparePrice",function(a){return a.find(this._Selectors.compare_price)});$.saleskuPluginProductElements.set("Image",function(a){return a.find(this._Selectors.image).find("img")});$.saleskuPluginProductElements.set("OriginalImage",function(a){return a.find(this._Selectors.image).find("img").attr("src")});$.saleskuPluginProductElements.set("Skus",function(a){return a.find(this._Selectors.skus)});
16$.saleskuPluginProductElements.set("SkuContainer",function(a){return a.closest(this._Selectors.skus_button_container)});$.saleskuPluginProductElements.set("OptionsContainer",function(a){return a.find(this._Selectors.options_container)});$.saleskuPluginProductElements.set("Options",function(a){return a.find(this._Selectors.sku_options)});$.saleskuPluginProductElements.set("Services",function(a){return a.find(this._Selectors.services)});
17$.saleskuPluginProductElements.set("SkuFeature",function(a,b){return a.find('[name="features['+b+']"]')});$.saleskuPluginProductElements.set("SkuFeatures",function(a){return a.find(this._Selectors.sku_feature)});$.saleskuPluginProductElements.set("Stocks",function(a){return a.find(this._Selectors.stocks)});
18$.saleskuPluginProductElements.set("CartButton",function(a){var b=this.Form(a).find(this._Selectors.cart_button_plugin);1!=b.length&&(b=this.Form(a).find(this._Selectors.cart_button_class),1!=b.length&&(b=this.Form(a).find(this._Selectors.cart_button)));return b});$.saleskuPluginProductElements.set("Quantity",function(a){return a.find(this._Selectors.quantity)});$.saleskuPluginProductElements.set("added2cart",function(a){return a.find(this._Selectors.added2cart)});
19$.saleskuPluginProductElements.set("Selectors",function(){return this._Selectors});saleskuPluginProductElements=function(a){this.root_element=$.saleskuPluginProductElements.Root(a)};
20saleskuPluginProductElements.prototype={Root:function(){return $.saleskuPluginProductElements.root_element},Selectors:function(){return $.saleskuPluginProductElements.get("_Selectors")},Parent:function(){return $.saleskuPluginProductElements.Parent(this.root_element)},Form:function(){return $.saleskuPluginProductElements.Form(this.root_element)},Price:function(){return $.saleskuPluginProductElements.Price(this.root_element)},ComparePrice:function(){return $.saleskuPluginProductElements.ComparePrice(this.root_element)},
21    Image:function(){return $.saleskuPluginProductElements.Image(this.root_element)},OriginalImage:function(){return $.saleskuPluginProductElements.OriginalImage(this.root_element)},Skus:function(){return $.saleskuPluginProductElements.Skus(this.root_element)},SkuContainer:function(a){return $.saleskuPluginProductElements.SkuContainer(a)},OptionsContainer:function(){return $.saleskuPluginProductElements.OptionsContainer(this.root_element)},Options:function(){return $.saleskuPluginProductElements.Options(this.root_element)},
22    SkuFeature:function(a){return $.saleskuPluginProductElements.SkuFeature(this.root_element,a)},SkuFeatures:function(){return $.saleskuPluginProductElements.SkuFeatures(this.root_element)},Stocks:function(){return $.saleskuPluginProductElements.Stocks(this.root_element)},Services:function(){return $.saleskuPluginProductElements.Services(this.root_element)},CartButton:function(){return $.saleskuPluginProductElements.CartButton(this.root_element)},Quantity:function(){return $.saleskuPluginProductElements.Quantity(this.root_element)},
23    added2cart:function(){return $.saleskuPluginProductElements.added2cart(this.root_element)}};
24saleskuPluginProductSkuFeature=function(a,b){if("object"==typeof b)for(var c in b)this[c]=b[c];this.feature=a;"INPUT"===this.getTag()&&"radio"==this.getElement().attr("type")&&(this.radio=this.getElement().closest(this.Selectors().sku_feature_container).find("input[type=radio]"),c=this.getElement().closest(this.Selectors().sku_feature_container).find("input[type=radio]:checked"),0<c.length?this.feature=c:(this.feature=this.getElement().closest(this.Selectors().sku_feature_container).find("input[type=radio]:first"),
25    this.setValue(this.feature.val())))};
26saleskuPluginProductSkuFeature.prototype={Selectors:function(){return $.saleskuPluginProductElements.Selectors()},getId:function(){return this.feature.data(this.Selectors().sku_feature_element_data_id)},getElement:function(){return this.feature},getButtons:function(){return this.feature.closest(this.Selectors().sku_feature_container).find(this.Selectors().sku_feature_button)},getButtonValue:function(a){return a.data("value")},show:function(){var a=this.feature.closest(".salesku-feature-block");a.find(".salesku-feature-value").hide();
27        a.find(".salesku-feature-select").show()},hide:function(){var a=this.feature.closest(".salesku-feature-block");a.find(".salesku-feature-value").hide();a.find(".salesku-feature-select").hide();a.find(".salesku-feature-value-"+this.getValue()).show()},getValues:function(a,b){var c=this;b=b||!1;var d=c.getTag(),f={},g=0;"INPUT"==d?c.getButtons().each(function(){var e=c.getButtonValue($(this));a&&($(this).hasClass(c.getHideClass(1))||$(this).hasClass(c.getHideClass(2)))||(b?(f[g]={id:e,value:$(this).html()},
28        g++):f[e]=$(this).html())}
28):"SELECT"==d&&c.feature.find("option").each(function(){var e=$(this).val();a&&($(this).hasClass(c.getHideClass(1))||$(this).hasClass(c.getHideClass(2)))||(b?(f[g]={id:e,value:$(this).html()},g++):f[e]=$(this).html())});return f},getSimilarValues:function(a){a=a||this.getValue();var b=this.getValues(!1,!0),c=[],d=0,f=0;for(g in b)c[d]=b[g].id,a==b[g].id&&(f=d),d++;a={};for(d=b=1;d<=this.count(c);d++){if(c.hasOwnProperty(f+d)){var g=c[f+d];a[b]=g;b++}c.hasOwnProperty(f-d)&&
29    (g=c[f-d],a[b]=g,b++)}return a},getValue:function(){return"INPUT"===this.getTag()&&"radio"===this.getElement().attr("type")?this.getElement().closest(this.Selectors().sku_feature_container).find("input[type=radio]:checked").val():this.getElement().val()},getTag:function(){if(0<this.getElement().length)return this.getElement().get(0).tagName;console.log("SaleskuPlugin: no tag in element ");console.log($(this))},setValue:function(a){var b=this.getTag();"INPUT"==b?"hidden"==this.getElement().attr("type")?
30        this.setHiddenValue(a):"radio"==this.getElement().attr("type")?this.setRadioValue(a):console.log("SaleskuPlugin: \u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438-"+this.getElement().attr("type")+";\n"):"SELECT"==b?this.setSelectValue(a):console.log("SaleskuPlugin: \u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u0442\u0438\u043f \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438-"+
31        this.getElement().attr("type")+";\n")},setHiddenValue:function(a){this.getElement().val(a);this.setButtonsValue(a)},setRadioValue:function(a){this.getElement().closest(this.Selectors().sku_feature_container).find("input[type=radio]").prop("checked",!1).removeAttr("checked",!1);this.feature=this.getElement().closest(this.Selectors().sku_feature_container).find('input[value="'+a+'"]');this.feature.attr("checked","checked").prop("checked",!0);this.setButtonsValue(a)},setSelectValue:function(a){this.getElement().val(a);
32        this.getElement().find('option[value="'+a+'"]').removeClass(this.getHideClass(1)).removeClass(this.getHideClass(2));0<this.getButtons().length&&this.setButtonsValue(a)},setButtonsValue:function(a){var b=this;b.getButtons().each(function(){var c=b.getButtonValue($(this)),d=$(this);a==c?b.setButtonState(d,1):b.setButtonState(d,0)})},setButtonState:function(a,b){1===b?a.addClass(this.Selectors().sku_feature_value_class_active).removeClass(this.getHideClass(1)).removeClass(this.getHideClass(2)):0===b&&
33        a.removeClass(this.Selectors().sku_feature_value_class_active)},hideButton:function(a,b){var c=this;setTimeout(function(){a.removeClass(c.getHideClass(1)).removeClass(c.getHideClass(2)).addClass(c.getHideClass(b))},10)},showValue:function(a){this.hideValue(a,0)},hideValue:function(a,b){var c=this,d=c.getTag();"INPUT"!=d&&"SELECT"==d&&c.feature.find('option[value="'+a+'"]').removeClass(c.getHideClass(1)).removeClass(c.getHideClass(2)).addClass(c.getHideClass(b));c.getButtons().each(function(){var f=
34        c.getButtonValue($(this));a==f&&c.hideButton($(this),b)})},getHideClass:function(a){return 1==a?this.Selectors().sku_feature_value_class_grey:2==a?this.Selectors().sku_feature_value_class_hide:""},count:function(a,b){var c,d=0;"COUNT_RECURSIVE"==b&&(b=1);1!=b&&(b=0);for(c in a)d++,1!=b||!a[c]||a[c].constructor!==Array&&a[c].constructor!==Object||(d+=this.count(a[c],1));return d}};
35function saleskuPluginFindSku(a,b,c){this._elements=a;this.form=a.Form();this.sku_features=b;this.features={};this.debug=0;this.sku_variants={};this.smart_sku_hide_changed_feature_not_available=this.smart_sku_hide_multi_feature=this.smart_sku_hide_single_feature=this.smart_sku_hide_not_available_type=this.smart_sku_hide_non_existent_type=this.smart_sku_hard_hide_type=this.smart_sku_replace=this.smart_sku=0;this.debug_message=this.smart_sku_class_hide=this.smart_sku_class_grey="";this.features_values_variants=
36    !1;for(var d in c)c.hasOwnProperty(d)&&(this[d]=c[d]);this.algorithm=2;$.saleskuPluginProductElements.Selectors().sku_feature_value_class_grey=this.getHideClass(1);$.saleskuPluginProductElements.Selectors().sku_feature_value_class_hide=this.getHideClass(2);var f=this;this.getElements().SkuFeatures().each(function(){var g=new saleskuPluginProductSkuFeature($(this));f.features[f.getFeatureSid(g.getId())]=g})}
37saleskuPluginFindSku.prototype={getElements:function(){return this._elements},getSku:function(a){var b=!1,c=this.getSkuByValues();c?(b=this.sku_features[c],"1"==this.debug&&(this.debug_message='Salesku_Plugin:findSku:getSku \n\u0410\u0440\u0442\u0438\u043a\u0443\u043b \u041d\u0430\u0439\u0434\u0435\u043d - "'+c+'";\n',this.debug_message+=var_dump(b)+"\n",this.debug_message+=var_dump(this.sku_features)+"\n",b.available||"1"!=this.smart_sku_replace||(this.debug_message+="Salesku_Plugin:findSku:getSku \u0410\u0440\u0442\u0438\u043a\u0443\u043b \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438;\n"))):
38        "1"==this.debug&&(this.debug_message="Salesku_Plugin:findSku:getSku \u0410\u0440\u0442\u0438\u043a\u0443\u043b \u043d\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442;\n");!b||!b.available&&"1"==this.smart_sku_replace?b=this.findSku(a):this.hideSkuFeaturesValues(a);"1"==this.debug&&console.log(this.debug_message);return b},getFeatureSid:function(a){return"f"+a},getFeatureId:function(a){return a.replace("f","")}
38,findSku:function(a){"1"==this.debug&&(this.debug_message+="\u0417\u0430\u043f\u0443\u0449\u0435\u043d \u043f\u043e\u0438\u0441\u043a \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u0430...;\n");
39        a=new saleskuPluginProductSkuFeature(a);var b=a.getValue(),c=a.getId(),d=this.getFeaturesValuesVariants(!0)[b],f=!1;if(0<this.count(d)){var g={};for(r in d)for(var e in d[r])for(var h in d[r][e])"object"!=typeof g[h]&&(g[h]={}),g[h][r]=e;d={count_features:0,features_identical:0,similar_offset:100,feature_available:0};e={};for(var k in g){h=g[k];var l=0,m=0,u=0,t=this.sku_features[k],q;for(q in this.features){var n=this.features[q],p=n.getId(),x=n.getValue();if("undefined"!==typeof h[p])if(h[p]==x)l++;
40        else{n=n.getSimilarValues(n.getValue());for(var w in n)n[w]==h[p]&&(m+=parseInt(w))}}h[a.getId()]!=b||"0"!=this.smart_sku_replace&&!t.available||(u=1);p=this.count(h);e[k]={};e[k].available=u;e[k].similar_offset=m;e[k].count_features=p;e[k].features_identical=l;"1"==this.debug&&(e[k].sku_available=t.available,e[k].feature_id=c,e[k].value_id=h[c]);("0"==this.smart_sku_replace||t.available)&&m<=d.similar_offset&&u>=d.feature_available&&p>=d.count_features&&l>=d.features_identical&&(d.count_features=
41            p,d.features_identical=l,d.similar_offset=m,d.feature_available=u)}for(var v in e)if(e[v].available===d.feature_available&&e[v].similar_offset<=d.similar_offset&&e[v].count_features===d.count_features&&e[v].features_identical===d.features_identical){f=v;break}"1"==this.debug&&(this.debug_message+="Salesku:findsku \n\u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b "+var_dump(e)+"\n\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0445\u043e\u0436\u0435\u0441\u0442\u044c "+
42            var_dump(d)+"\n\u0410\u0440\u0442\u0438\u043a\u0443\u043b "+f+"\n\n\n")}else f=this.getSkuByValues();if(!f)for(r in n=a.getSimilarValues(),n)if(a.setValue(n[r]),a.getValue()!=n[r]&&(this.debug_message+="Salesku_plugin:findsku \u041d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438: "+n[r]+"!;\n"),b=this.getSkuByValues()){f=
43            b;break}if(f){1==this.debug&&(this.debug_message+='Salesku_plugin:findsku \u0410\u0440\u0442\u0438\u043a\u0443\u043b \u043d\u0430\u0439\u0434\u0435\u043d: "'+f+'";\n');var r=this.getSkuKeyFeaturesValues(f);for(q in r)this.features.hasOwnProperty(this.getFeatureSid(q))&&(this.features[this.getFeatureSid(q)].setValue(r[q]),this.features[this.getFeatureSid(q)].getValue()!=r[q]&&(this.debug_message+="Salesku_plugin:findsku \u041d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438: "+
44            r[q]+"!;\n"));t=this.sku_features[f];this.getElements().SkuFeatures().change()}else this.debug_message+="Salesku_plugin: \u041d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0433\u043e \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e!;\n";this.hideSkuFeaturesValues(a);return t},getSkuByValues:function(){var a=!1,b=this.getSkuVariantsByValues(this.getFeaturesValues(!0)),c;for(c in this.sku_features){var d=
45        this.sku_features[c];if(b.hasOwnProperty(c)&&(d.available||"0"==this.smart_sku_replace)){a=c;break}}return a},getAlgorithm:function(){return this.algorithm},getSkuVariantsByValues:function(a,b){b=b||this.getAlgorithm();var c=[],d=0,f;for(f in a)c[d++]=f+":"+a[f]+";";this.sku_variants={};2==b?this.generateSkuVariants(c):(c=c.join(""),this.sku_variants[c]=c);return this.sku_variants},getSkuVariants:function(a){this.sku_variants={};2==this.getAlgorithm()?this.generateSkuVariants(a):(a=a.join(""),this.sku_variants[a]=
46        a);return this.sku_variants},getFeaturesValues:function(a){a&&"value"!==a&&" feature"!==a&&(a="feature");var b=a?{}:[],c=0,d;for(d in this.features){var f=this.features[d].getValue();a?"value"===a?b[f]=this.getFeatureId(d):b[this.getFeatureId(d)]=f:b[c++]={feature_id:this.getFeatureId(d),value_id:f}}return b},generateSkuVariants:function(a,b,c){"number"!=typeof c&&(c=0);for(var d in a){1>c&&(b="");var f=a.slice();delete f[d];0<this.count(f)?this.generateSkuVariants(f,b+""+a[d],c+1):this.sku_variants[b+
47    ""+a[d]]=b+""+a[d]}},getHideClass:function(a){return"object"==typeof $.saleskuPluginProductsPool&&$.saleskuPluginProductsPool.hasOwnProperty("getFeatureHideClass")?$.saleskuPluginProductsPool.getFeatureHideClass(a):"salesku_plugin-feature_hide"},hideSkuFeaturesValues:function(a){a instanceof saleskuPluginProductSkuFeature||(a=new saleskuPluginProductSkuFeature(a));var b=this.getFeaturesValuesVariants(!1,a.getValue());if("0"!=this.smart_sku_hide_non_existent_type||"0"!=this.smart_sku_hide_not_available_type)if(1==
48        this.count(this.features)){b=0;for(var c in this.features){var d=this.features[c].getValues();for(k in d)d=!1,this.sku_features.hasOwnProperty(this.getFeatureId(c)+":"+k+";")&&(d=this.sku_features[this.getFeatureId(c)+":"+k+";"]),d||"0"==this.smart_sku_hide_non_existent_type?d&&"0"!=this.smart_sku_hide_not_available_type&&!d.available?this.features[c].hideValue(k,this.smart_sku_hide_not_available_type):b++:this.features[c].hideValue(k,this.smart_sku_hide_non_existent_type)}if(2>b&&1==parseInt(this.smart_sku_hide_single_feature)&&
49        1==parseInt(this.smart_sku_replace)&&"0"!=this.smart_sku_hide_not_available_type)for(c in this.features)this.features[c].hide();else for(c in this.features)this.features[c].show()}else if(1<this.count(this.features))if(1>parseInt(this.smart_sku_hard_hide_type))for(c in this.features){var f=this.features[c].getValue();if(b.hasOwnProperty(f))for(k in a=b[f],a){if(k!=this.getFeatureId(c)){d=this.getSkuFeature(k);f=0;var g=a[k],e=d.getValues();for(l in e)if(!g.hasOwnProperty(l)&&0<parseInt(this.smart_sku_hide_non_existent_type))d.hideValue(l,
50        this.smart_sku_hide_non_existent_type);else{e=!1;for(var h in g[l])1==g[l][h]&&(e=!0);0==e&&0<parseInt(this.smart_sku_hide_not_available_type)?d.hideValue(l,this.smart_sku_hide_not_available_type):(f++,d.showValue(l))}2>f&&1==parseInt(this.smart_sku_hide_multi_feature)&&1==parseInt(this.smart_sku_replace)?d.hide():d.show()}}else this.features[c].hideValue(f,this.smart_sku_hide_not_available_type)}else for(g in b=b[a.getValue()],c=this.getFeaturesValues(!0),this.features)if(d=this.features[g],e=d.getValues(),
51    this.getFeatureId(g)==a.getId()){if(!this.smart_sku_hide_changed_feature_not_available)for(f in e)d.showValue(f)}else{var k=b[this.getFeatureId(g)];for(f in e){e=Object.assign({},c);e[this.getFeatureId(g)]=f;var l=this.getSkuVariantsByValues(e,2);if(k.hasOwnProperty(f)){var m=k[f];e=!1;for(h in m)l.hasOwnProperty(h)&&1==m[h]&&(e=!0);!e&&0<parseInt(this.smart_sku_hide_not_available_type)?d.hideValue(f,this.smart_sku_hide_not_available_type):d.showValue(f)}else this.features[g].hideValue(f,this.smart_sku_hide_not_available_type)}}},
52    getSkuFeature:function(a){a=this.getFeatureId(a);if(this.features.hasOwnProperty(this.getFeatureSid(a)))return this.features[this.getFeatureSid(a)]},getFeaturesValuesVariants:function(a,b){a=a||!1;if(!this.features_values_variants||b){this.features_values_variants={};var c={},d={},f;for(f in this.sku_features){var g=!1;this.sku_features.hasOwnProperty(f)&&this.sku_features[f].available&&(g=!0);var e=this.getSkuKeyFeaturesValues(f),h;for(h in e){var k=e[h];"object"!==typeof c[k]&&(c[k]={});"object"!==
53    typeof d[k]&&(d[k]={});for(var l in e){var m=e[l];h!=l&&("object"!=typeof c[k][l]&&(c[k][l]={}),"object"!=typeof c[k][l][m]&&(c[k][l][m]={}),c[k][l][m][f]=g);"object"!=typeof d[k][l]&&(d[k][l]={});"object"!=typeof d[k][l][m]&&(d[k][l][m]={});d[k][l][m][f]=g}}}this.features_values_variants.other=c;this.features_values_variants.all=d}return a?this.features_values_variants.all:this.features_values_variants.other},getSkuKeyFeaturesValues:function(a){a=a.split(";");var b={},c;for(c in a)if(""!=a[c]){var d=
54        a[c].split(":");b[d[0]]=d[1]}return b},count:function(a,b){var c,d=0;"COUNT_RECURSIVE"==b&&(b=1);1!=b&&(b=0);for(c in a)d++,1!=b||!a[c]||a[c].constructor!==Array&&a[c].constructor!==Object||(d+=this.count(a[c],1));return d}};
55function saleskuPluginProduct(a,b){this.__elements=new saleskuPluginProductElements($(a));this.debug=0;this.find_Sku=null;this.features={};this.smartsku={};this.related_sku=0;this.sku_image="";this.skus={};this.sku={};this.type_id=this.uid=0;this._parent=null;this.form=this.getElements().Form();for(var c in b)this[c]=b[c]}
56saleskuPluginProduct.prototype.binds={fly_options_notice:function(a){var b=a.getElements().Selectors();$(document).on("click",'.salesku_options.fly select[name="salesku_skus"]',function(){$(this).closest("form").addClass("salesku_plugin-selected-sku")});a.getForm().find(b.sku_feature_container).find(b.sku_feature_button).bind("click",function(){a.getForm().addClass("salesku_plugin-selected-sku")});a.getForm().find(b.sku_feature).bind("click",function(){a.getForm().addClass("salesku_plugin-selected-sku")});
57        a.getForm().find(b.skus_button).closest("label").bind("mouseup",function(){a.getForm().addClass("salesku_plugin-selected-sku")})},sku_features:function(a){var b=a.getElements().Selectors();0<a.getForm().find(b.sku_feature).length&&(a.getForm().find(b.sku_feature).bind("change",function(){a.setSkuByFeature($(this))}),a.getForm().find(b.sku_feature+":first").change())},sku_features_inline:function(a){var b=a.getElements().Selectors();0<a.getForm().find(b.sku_feature_container).length&&a.getForm().find(b.sku_feature_container).find(b.sku_feature_button).bind("click",
58        function(){var c=$(this).closest(b.sku_feature_container).find(b.sku_feature);c=new saleskuPluginProductSkuFeature(c);c.setValue(c.getButtonValue($(this)));c.getElement().change();return!1})},skus:function(a){var b=a.getElements().Selectors(),c=a.smartsku;c.smart_sku&&0<a.getForm().find(b.skus_button).length&&a.hasOwnProperty("skus")&&0<a.count(a.skus)&&a.getForm().find(b.skus_button).bind("click",function(){var f=$(this).val(),g=!1;if(a.skus.hasOwnProperty(f)&&(g=a.skus[f],"1"==c.smart_sku_replace&&
59    !g.sku_available)){var e=a.getSimilarSkus(f),h;for(h in e)if(f=e[h],a.skus.hasOwnProperty(f)&&(g=a.skus[f],g.sku_available)){a.getForm().find(b.skus_button).removeAttr("checked");var k=!1;a.getForm().find(b.skus_button).each(function(){$(this).val()==f&&(k=$(this))});a.getForm().find(b.skus_button).prop("checked",!1).attr("checked",!1);setTimeout(function(){"object"==typeof k&&(k.prop("checked",!0),k.trigger("change"))},50);break}}a.skuFunctions(g);g&&a.setSku(g)});var d=a.getForm().find(".skus input[type=radio]:checked:not(:disabled)");
60        d.length||(d=a.getForm().find(".skus input[type=radio]:not(:disabled):first").prop("checked",!0).click());d.change();d.click();a.getForm().find(b.skus_button).each(function(){var f=$(this).val();a.skus.hasOwnProperty(f)&&!a.skus[f].sku_available&&(a.getElements().SkuContainer($(this)).addClass(a.getHideClass(c.smart_sku_hide_not_available_type)),a.getElements().Skus().parent().find(".salesku_skus").find('[name="salesku_skus"]').find('option[value="'+f+'"]').addClass(a.getHideClass(c.smart_sku_hide_not_available_type)))})},
61    services_checkbox:function(a){a.getForm().find(".services input[type=checkbox]").on("click",function(){var b=a.getForm().find('select[name="service_variant['+$(this).val()+']"]');b.length&&($(this).is(":checked")?b.removeAttr("disabled"):b.attr("disabled","disabled"));a.updatePrice()})},service_variants:function(a){var b=a.getElements().Selectors();a.getForm().find(b.services+" "+b.services_variants).bind("change",function(){a.updatePrice()})},select_skus:function(a){$(".salesku_skus_"+a.getUid()).find('[name="sku_id"]').change(function(){var b=
62        $(this).closest(".skus").parent();b.find('[name="salesku_skus"]').val()!=$(this).val()&&b.find('[name="salesku_skus"]').val($(this).val())})},change_quantity:function(a){0<a.getElements().Quantity().length&&a.getElements().Quantity().change(function(){a.updatePrice()})}};saleskuPluginProduct.prototype.before_binds={};saleskuPluginProduct.prototype.after_binds={};saleskuPluginProduct.prototype.bind=function(a){for(var b in a){var c=a[b];"function"===typeof c&&c(this)}};
63saleskuPluginProduct.prototype.skuBinds={};saleskuPluginProduct.prototype.skuFunctions=function(a){if("object"==typeof this.skuBinds&&0<this.count(this.skuBinds))for(var b in this.skuBinds){var c=this._bind(this.skuBinds[b],{sku:a,product:this});"function"===typeof c&&c()}};saleskuPluginProduct.prototype._bind=function(a,b){var c=[].slice.call(arguments,2);return function(){var d=[].slice.call(arguments);d=c.concat(d);return a.apply(b,d)}};
64saleskuPluginProduct.prototype.init=function(a){this.hasOwnProperty("sku")&&this.sku.hasOwnProperty("price")&&this.getElements().Price()&&this.getElements().Price().data("price",parseFloat(this.sku.price));"1"==this.debug&&this._debug();this.form_action_data=this.getFormIndicator();if(a)this.on();else this.off()};
65saleskuPluginProduct.prototype.getDebugMessage=function(a,b){this.getElements();var c=this.getElements().Selectors();c={"-form_action_indicator":"\u0418\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0444\u043e\u0440\u043c\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d ("+c.form_action_indicator+")","+form_action_indicator":"\u041d\u0430\u0439\u0434\u0435\u043d","-skus":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 \u0444\u043e\u0440\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a ("+
66        c.skus+")","+skus":"\u041d\u0430\u0439\u0434\u0435\u043d","-skus_button":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 \u0444\u043e\u0440\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430 \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u043e\u0432 ("+c.skus_button+")","+skus_button":"\u041d\u0430\u0439\u0434\u0435\u043d\u044b","-options":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 \u0444\u043e\u0440\u043c \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a ("+
67        c.sku_options+")","+options":"\u041d\u0430\u0439\u0434\u0435\u043d","-sku_feature":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 \u0444\u043e\u0440\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u043a\u0430\u0437\u0430 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a ("+c.sku_feature+")","+sku_feature":"\u041d\u0430\u0439\u0434\u0435\u043d","-sku_feature_data_id":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b id \u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a ("+
68        c.sku_feature_element_data_id+")","+sku_feature_data_id":"\u041d\u0430\u0439\u0434\u0435\u043d","-sku_feature_inline_container":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u0433\u0430 \u0444\u043e\u0440\u043c ("+c.sku_feature_container+")","+sku_feature_inline_container":"\u041d\u0430\u0439\u0434\u0435\u043d",
69    "-sku_feature_button":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b \u043a\u043d\u043e\u043f\u043a\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a ("+c.sku_feature_button+")","+sku_feature_button":"\u041d\u0430\u0439\u0434\u0435\u043d","-image":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u0422\u0435\u0433 Img \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0442\u043e\u0432\u0430\u0440\u0430 ("+c.image+")","+image":"\u041d\u0430\u0439\u0434\u0435\u043d",
70    "-price":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0446\u0435\u043d\u044b \u0442\u043e\u0432\u0430\u0440\u0430 ("+c.price+")","+price":"\u041d\u0430\u0439\u0434\u0435\u043d","-cart_button":'\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 "\u0412 \u043a\u043e\u0440\u0437\u0438\u043d\u0443"',"+cart_button":"\u041d\u0430\u0439\u0434\u0435\u043d","-added2cart":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u043d\u0444\u043e \u0431\u043b\u043e\u043a\u0430 ("+
71        c.added2cart+")","+added2cart":"\u041d\u0430\u0439\u0434\u0435\u043d","-compare_price":"\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u044d\u043b\u0435\u043c\u0435\u043d\u0442 ("+c.compare_price+")","+compare_price":"\u041d\u0430\u0439\u0434\u0435\u043d",product:" \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0430\u0440\u0442\u0438\u043a\u0443\u043b\u043e\u0432"};
72    var d=1==b?"+":"-";return c.hasOwnProperty(d+a)?d+"Salesku_Plugin:"+a+" "+c[d+a]+";\n":"Salesku_Plugin:"+a+" \u041d\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430;\n"};
73saleskuPluginProduct.prototype._debug=function(){var a=this.getElements(),b=this.getElements().Selectors(),c=0,d="";if(1<this.count(this.skus)||0<this.count(this.features))if(void 0==this.getForm().attr(b.form_action_indicator)?(d+=this.getDebugMessage("form_action_indicator",0),c++):d+=this.getDebugMessage("form_action_indicator",1),1<this.count(this.skus))1>this.getForm().find(b.skus).length?(d+=this.getDebugMessage("skus",0),c++):d+=this.getDebugMessage("skus",1),1>this.getForm().find(b.skus_button).length?
74    (d+=this.getDebugMessage("skus_button",0),c++):d+=this.getDebugMessage("skus_button",1);else{if(0<this.count(this.features))if(1>this.getForm().find(b.sku_options).length?(d+=this.getDebugMessage("options",0),c++):d+=this.getDebugMessage("options",1),1>this.getForm().find(b.sku_feature).length)d+=this.getDebugMessage("sku_feature",0),c++;else{d+=this.getDebugMessage("sku_feature",1);var f=0,g=!0;this.getForm().find(b.sku_feature).each(function(){void 0==$(this).data(b.sku_feature_element_data_id)&&
75(g=!1);"INPUT"==$(this).get(0).tagName&&f++});g?d+=this.getDebugMessage("sku_feature_data_id",1):(d+=this.getDebugMessage("sku_feature_data_id",0),c++);this.getForm().find(b.sku_feature_container).length<f?(d+=this.getDebugMessage("sku_feature_inline_container",0),c++):(d+=this.getDebugMessage("sku_feature_inline_container",1),0<f&&1>this.getForm().find(b.sku_feature_container).find(b.sku_feature_button).length?(d+=this.getDebugMessage("sku_feature_button",0),c++):d+=this.getDebugMessage("sku_feature_button",
76    1))}}else d+=this.getDebugMessage("product",0);1>a.Image().length?(d+=this.getDebugMessage("image",0),c++):d+=this.getDebugMessage("image",1);1>a.Price().length?(d+=this.getDebugMessage("price",0),c++):d+=this.getDebugMessage("price",1);1>a.CartButton().length?(d+=this.getDebugMessage("cart_button",0),c++):d+=this.getDebugMessage("cart_button",1);d=1>a.added2cart().length?d+this.getDebugMessage("added2cart",0):d+this.getDebugMessage("added2cart",1);d=1>a.ComparePrice().length?d+this.getDebugMessage("compare_price",
77    0):d+this.getDebugMessage("compare_price",1);d+="Salesku_Plugin:smart_sku_class_grey "+this.smartsku.smart_sku_class_grey+";\n";d+="Salesku_Plugin:smart_sku_class_hide "+this.smartsku.smart_sku_class_hide+";\n";d+=var_dump(this.smartsku)+";\n";d=1>c?"\u041f\u0440\u043e\u0434\u0443\u043a\u0442 "+this.getUid()+":\u041e\u043a\n"+d:"\u041f\u0440\u043e\u0434\u0443\u043a\u0442 "+this.getUid()+": ---------------------!!!!!!!!!!!!!!!!! \u0411\u0430\u0433\u043e\u0432 \u043d\u0430\u0439\u0434\u0435\u043d\u043e "+
78    c+" !!!!!!!!!!!!!!!!!!-----------------\n"+d;$.saleskuPluginProductsPool.setLogMessage(d);console.log(d+"\n")};saleskuPluginProduct.prototype.setParent=function(a){this._parent=a};saleskuPluginProduct.prototype.getParent=function(){null==this._parent&&(this._parent=this.getElements().Parent());return this._parent};saleskuPluginProduct.prototype.getProductListClass=function(){var a=this.getParent().attr("class").split(" "),b;for(b in a){var c=a[b];if(/salesku_plugin_product_list-/.test(c))return c}return""};
79saleskuPluginProduct.prototype.show=function(){this.getElements().OptionsContainer().show();this.getElements().Options().show();this.getElements().Skus().hasClass("salesku_skus_select")?this.getElements().Skus().parent().find(".salesku_skus").show():this.getElements().Skus().show();this.getElements().Services().show();this.getElements().Stocks().show()};
80saleskuPluginProduct.prototype.hide=function(){this.getElements().OptionsContainer().hide();this.getElements().Options().hide();this.getElements().Skus().hide();this.getElements().Skus().hasClass("salesku_skus_select")&&this.getElements().Skus().parent().find(".salesku_skus").hide();this.getElements().Services().hide();this.getElements().Stocks().hide()};
81saleskuPluginProduct.prototype.on=function(){this.bind(this.before_binds);this.removeFormIndicator();this.getElements().root_element.addClass(this.getElements().Selectors().salesku_product_root.replace(/\./g,""));this.show();this.bind(this.binds);this.bind(this.after_binds)};saleskuPluginProduct.prototype.off=function(){this.setFormIndicator();this.hide();this.getElements().root_element.removeClass(this.getElements().Selectors().salesku_product_root.replace(/\./g,""))};
82saleskuPluginProduct.prototype.getElements=function(){return this.__elements};saleskuPluginProduct.prototype.getForm=function(){return this.form};saleskuPluginProduct.prototype.getFormIndicator=function(){return this.getForm().attr(this.getElements().Selectors().form_action_indicator)};saleskuPluginProduct.prototype.removeFormIndicator=function(){return this.getForm().removeAttr(this.getElements().Selectors().form_action_indicator)};
83saleskuPluginProduct.prototype.setFormIndicator=function(){return this.getForm().attr(this.getElements().Selectors().form_action_indicator,this.form_action_data)};saleskuPluginProduct.prototype.getType=function(){return this.type_id};saleskuPluginProduct.prototype.getUid=function(){return this.uid};saleskuPluginProduct.prototype.isRelatedSku=function(){return 1==this.related_sku?!0:!1};
84saleskuPluginProduct.prototype.findSku=function(a){null==this.find_Sku&&(this.smartsku.debug=this.debug,this.find_Sku=new saleskuPluginFindSku(this.getElements(),this.features,this.smartsku));return this.find_Sku.getSku(a)};
85saleskuPluginProduct.prototype.setSkuByFeature=function(a){var b=this.findSku(a);this.skuFunctions(b);b&&(this.setSku(b),"object"==typeof $.saleskuPluginProductsPool&&$.saleskuPluginProductsPool.hasOwnProperty("getFeatureHideClass")&&($.saleskuPluginProductsPool.current_change_product||$.saleskuPluginProductsPool.changeFeature
85(a,this)))};
86saleskuPluginProduct.prototype.setSku=function(a){var b=!1;"object"==typeof a&&a.hasOwnProperty("id")?b=a:"string"==typeof a&&this.features.hasOwnProperty(a)&&(b=this.features[a]);b?(this.setSkuImage(b),this.updateSkuServices(b.id),b.available?(this.cartButtonVisibility(!0),this.updatePrice(b.price,b.compare_price)):(this.form.find("div.stocks div").hide(),this.form.find(".sku-no-stock").show(),this.cartButtonVisibility(!1))):(this.getElements().Form().find("div.stocks div").hide(),this.getElements().Form().find(".sku-no-stock").show(),
87    this.cartButtonVisibility(!1),this.getElements().ComparePrice().hide(),this.getElements().Price().empty())};saleskuPluginProduct.prototype.setSkuImage=function(a){if("1"==this.sku_image){var b=this.getElements().Image();b.data("salesku-original-image")||b.data("salesku-original-image",this.getElements().OriginalImage());"object"==typeof a&&a.hasOwnProperty("image")?b.attr("src",a.image):b.attr("src",b.data("salesku-original-image"))}};
88saleskuPluginProduct.prototype.currencyFormat=function(a,b){var c,d=this.currency.frac_digits,f=this.currency.decimal_point,g=this.currency.thousands_sep;isNaN(d=Math.abs(d))&&(d=2);void 0==f&&(f=",");void 0==g&&(g=".");var e=parseInt(a=(+a||0).toFixed(d))+"";var h=(c=3<(c=e.length)?c%3:0)?e.substr(0,c)+g:"";c=e.substr(c).replace(/(\d{3})(?=\d)/g,"$1"+g);e=d&&a-e?f+Math.abs(a-e).toFixed(d).replace(/-/,0).slice(2):"";a=h+c+e;h=b?this.currency.sign:this.currency.sign_html;return this.currency.sign_position?
89    a+this.currency.sign_delim+h:h+this.currency.sign_delim+a};saleskuPluginProduct.prototype.getSimilarSkus=function(a){var b=this.getElements().Selectors(),c=[],d=0,f=0;this.getForm().find(b.skus_button).each(function(){c[d]=$(this).val();a==$(this).val()&&(f=d);d++});b={};for(var g=1,e=1;e<=this.count(c);e++)c.hasOwnProperty(f+e)&&(a=c[f+e],b[g]=a,g++),c.hasOwnProperty(f-e)&&(a=c[f-e],b[g]=a,g++);return b};
90saleskuPluginProduct.prototype.getHideClass=function(a){return"object"==typeof $.saleskuPluginProductsPool&&$.saleskuPluginProductsPool.hasOwnProperty("getFeatureHideClass")?$.saleskuPluginProductsPool.getFeatureHideClass(a):"none-class"};saleskuPluginProduct.prototype.serviceVariantHtml=function(a,b,c){return $('<option data-price="'+c+'" value="'+a+'"></option>').text(b+" (+"+this.currencyFormat(c,1)+")")};
91saleskuPluginProduct.prototype.updateSkuServices=function(a){this.form.find("div.stocks div").hide();this.form.find(".sku-"+a+"-stock").show();for(var b in this.services[a]){var c=this.services[a][b];if(!1===c)this.form.find(".service-"+b).hide().find("input,select").attr("disabled","disabled").removeAttr("checked");else if(this.form.find(".service-"+b).show().find("input").removeAttr("disabled"),"string"==typeof c)this.form.find(".service-"+b+" .service-price").html(this.currencyFormat(c)),this.form.find(".service-"+
92    b+" input").data("price",c);else{var d=this.form.find(".service-"+b+" .service-variants"),f=d.val(),g;for(g in c){var e=d.find("option[value="+g+"]");!1===c[g]?(e.hide(),e.attr("value")==f&&(f=!1)):(f||(f=g),e.replaceWith(this.serviceVariantHtml(g,c[g][0],c[g][1])))}this.form.find(".service-"+b+" .service-variants").val(f)}}};
93saleskuPluginProduct.prototype.setComparePrice=function(a){a?($compare_price=this.getElements().ComparePrice(),$compare_price.length||($compare_price=$(this.getElements().Selectors().compare_price_html),this.getElements().Price().before($compare_price)),$compare_price.html(this.currencyFormat(a)).show()):this.getElements().ComparePrice().remove()};
94saleskuPluginProduct.prototype.setPrice=function(a,b){if(0<this.getElements().Price().length){b&&this.getElements().Price().data("price",String(b));var c=this.getElements().Quantity();0<c.length&&(a*=0<parseFloat(c.val())?parseFloat(c.val()):1);this.getElements().Price().html(this.currencyFormat(a))}};
95saleskuPluginProduct.prototype.updatePrice=function(a,b){if(void 0===a){var c=this.form.find(".skus input:radio:checked");c.length?(a=parseFloat(c.data("price")),b=parseFloat(c.data("compare-price"))):this.getElements().Price()&&(a=parseFloat(this.getElements().Price().data("price")))}c=a;var d=this;this.form.find(".services input:checked").each(function(){var f=$(this).val();a=d.form.find(".service-"+f+"  .service-variants").length?a+parseFloat(d.form.find(".service-"+f+"  .service-variants :selected").data("price")):
96    a+parseFloat($(this).data("price"))});this.setPrice(a,c);this.setComparePrice(b)};
97saleskuPluginProduct.prototype.cartButtonVisibility=function(a){a?(this.cartButtonActive(!0),0<this.getElements().ComparePrice().length&&this.getElements().ComparePrice().show(),0<this.getElements().Price().length&&this.getElements().Price().show(),this.getElements().Quantity().show()):(this.cartButtonActive(!1),0<this.getElements().ComparePrice().length&&this.getElements().ComparePrice().hide(),0<this.getElements().Price().length&&this.getElements().Price().hide(),this.getElements().Quantity().hide());
98    this.getElements().added2cart().hide()};saleskuPluginProduct.prototype.cartButtonActive=function(a){var b=this.getElements().CartButton();if(b.length){var c=b.get(0).tagName;"INPUT"==c||"BUTTON"==c?(a?b.removeAttr("disabled"):b.attr("disabled","disabled"),b.show()):a?b.show():b.hide()}};saleskuPluginProduct.prototype.count=function(a,b){var c,d=0;"COUNT_RECURSIVE"==b&&(b=1);1!=b&&(b=0);for(c in a)d++,1!=b||!a[c]||a[c].constructor!==Array&&a[c].constructor!==Object||(d+=this.count(a[c],1));return d};
99$(document).ready(function(){$(document).on("change",'[name="salesku_skus"]',function(){var a=$(this).val(),b=!1;$(this).closest(".salesku_skus").parent().find('[name="sku_id"]').attr("checked",!1).each(function(){$(this).val()==a&&(b=$(this))});b&&b.attr("checked",!0).prop("checked",!0).trigger("click")})});

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.