'use strict';var aniCommon=aniCommon||{};"use strict"; (function(){(function(t){var u=void 0===t.firstLoad;t.firstLoad=!1;return u})(aniCommon)&&(aniCommon.utility=function(){return{delayCall:function(t,u){var q;return function(){clearTimeout(q);q=setTimeout(t,u)}},reducedAnimation:function(){aniCommon.isReducedAnimation=window.matchMedia("(prefers-reduced-motion)").matches;!0===aniCommon.isReducedAnimation?$("body").addClass("animation-off"):$("body").addClass("animation-on");return aniCommon.isReducedAnimation}}}(),aniCommon.isReducedAnimation=aniCommon.utility.reducedAnimation(), window.matchMedia("(prefers-reduced-motion: reduce)").addEventListener("change",()=>{aniCommon.isReducedAnimation=aniCommon.utility.reducedAnimation()}))})(); $(document).ready(function(){function t(a){if(a.hasClass("singleswach")){var c=a.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active input").attr("class");e=a.find(".product-color")[0].classList;a.find(".product-module-images .image-one-section");h=a.find(".product-module-images .image-two-section")[0].classList;k=g=d="";c.split(" ").forEach(l=>{l.startsWith("rgb")&&(f=l);l.startsWith("#")&&(f=l)});n=a.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active span[data-id\x3d'linearGradient']"); n=n.attr("class");m="conic-gradient(from -46deg at 46.5% 30.98%,rgba(240,240,240,.5) 0,rgba(255,255,255,0) 360deg),"+f;a.hasClass("no-backgroundchange")||(a.hasClass("no-gradient")||(n?(2>=e.length?d=e[1]:a.find(".product-color").removeAttr("class").addClass("product-color"),d&&d.startsWith("bgdevice")?a.find(".product-color").removeClass(d).addClass("bg"+b):a.find(".product-color").css("background",n)):m?(2>=e.length?d=e[1]:a.find(".product-color").removeAttr("class").addClass("product-color"),d&& d.startsWith("bgdevice")?a.find(".product-color").removeClass(d).addClass("bg"+b):a.find(".product-color").css("background",m)):(2>=e.length?d=e[1]:a.find(".product-color").removeAttr("class").addClass("product-color"),d&&d.startsWith("bgdevice")?a.find(".product-color").removeClass(d).addClass("bg"+b):a.find(".product-color").css("background",f))),2>=h.length?k=h[1]:"",k&&k.startsWith("bottomdevice")?a.find(".product-module-images .image-two-section").removeClass(k).addClass("bottom"+c):a.find(".product-module-images .image-two-section").css("background", f))}else{var b=a.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active input").attr("class");c=a.find(".actions-section.active .product-module-cover-swaches .pm-color-picker-dot-light.active input").attr("class");var e=a.find(".product-color")[0].classList;a.find(".product-module-images .image-one-section");var h=a.find(".product-module-images .image-two-section")[0].classList,d="",g="",k="",f,n=a.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active span[data-id\x3d'linearGradient']"); n=n.attr("class");b.split(" ").forEach(l=>{l.startsWith("rgb")&&(f=l);l.startsWith("#")&&(f=l)});if(c){var p;c.split(" ").forEach(l=>{l.startsWith("rgb")&&(p=l);l.startsWith("#")&&(p=l)})}var m="conic-gradient(from -46deg at 46.5% 30.98%,rgba(240,240,240,.5) 0,rgba(255,255,255,0) 360deg),"+f;a.hasClass("no-backgroundchange")||(a.hasClass("no-gradient")?g&&g.startsWith("topdevice")?a.find(".product-module-images .image-one-section").removeClass(g).addClass("top"+b):a.find(".product-module-images .image-one-section").css("background", f):n?(2>=e.length?d=e[1]:a.find(".product-color").removeAttr("class").addClass("product-color"),d&&d.startsWith("bgdevice")?a.find(".product-color").removeClass(d).addClass("bg"+b):a.find(".product-color").css("background-image",n)):(2>=e.length?d=e[1]:a.find(".product-color").removeAttr("class").addClass("product-color"),d&&d.startsWith("bgdevice")?a.find(".product-color").removeClass(d).addClass("bg"+b):a.find(".product-color").css("background",m)),2>=h.length?k=h[1]:"",k&&k.startsWith("bottomtype")? a.find(".product-module-images .image-two-section").removeClass(k).addClass("bottom"+c):a.find(".product-module-images .image-two-section").css("background",p))}}function u(a,c,b,e,h,d){for(var g=1;g<=h;g++)if(a==g){a=g=a-1;g*=d;var k=b.find(".product-module-main-image.active"),f=b.find(".product-module-images-one.active"),n=b.find(".product-module-images-two.active"),p=h*d;b.hasClass("device-without-type-cover")?e&&q(a,f,h,!1):q(g,f,p,!0,c);q(g,k,p,!0,c);q(c,n,d,!1);break}}function q(a,c,b,e,h){e&& (a+=h);c.css({backgroundPositionY:100*a/+(b-1)+"%"})}function v(a){if(!a.hasClass("active")){var c=a.index(),b=a.parents(".product-module"),e=b.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light").length;b.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light").removeClass("active");a.addClass("active");if(b.hasClass("singleswach")){var h=b.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active input").attr("class"), d=b.find(".product-color")[0].classList;b.find(".product-module-images .image-one-section");var g=b.find(".product-module-images .image-two-section")[0].classList;m=b.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active span[data-id\x3d'linearGradient']");m=m.attr("class");var k;h.split(" ").forEach(r=>{r.startsWith("rgb")&&(k=r);r.startsWith("#")&&(k=r)});l="conic-gradient(from -46deg at 46.5% 30.98%,rgba(240,240,240,.5) 0,rgba(255,255,255,0) 360deg),"+k; if(!b.hasClass("no-backgroundchange")){if(!b.hasClass("no-gradient"))if(m)2>=d.length?f=d[1]:b.find(".product-color").removeAttr("class").addClass("product-color"),f&&f.startsWith("bgdevice")?b.find(".product-color").removeClass(f).addClass("bg"+h):a.closest(".product-color").css("background",m);else if(l)2>=d.length?f=d[1]:b.find(".product-color").removeAttr("class").addClass("product-color"),f&&f.startsWith("bgdevice")?b.find(".product-color").removeClass(f).addClass("bg"+h):a.closest(".product-color").css("background", l);else{var f="",n="";2>=d.length?f=d[1]:b.find(".product-color").removeAttr("class").addClass("product-color");f&&f.startsWith("bgdevice")?b.find(".product-color").removeClass(f).addClass("bg"+h):a.closest(".product-color").css("background",k)}2>=g.length?n=g[1]:"";n&&n.startsWith("bottomdevice")?b.find(".product-module-images .image-two-section").removeClass(n).addClass("bottom"+h):b.find(".product-module-images .image-two-section").css("background",k)}m=b.find(".product-module-main-image.active"); l=b.find(".product-module-images-one.active");b=b.find(".product-module-images-two.active");--c;q(c,m,e,!1);q(c,l,e,!1);q(c,b,e,!1)}else{a=b.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active input").attr("class");h=b.find(".product-color")[0].classList;var p;a.split(" ").forEach(r=>{r.startsWith("rgb")&&(p=r);r.startsWith("#")&&(p=r)});var m=b.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active span[data-id\x3d'linearGradient']"); m=m.attr("class");d=b.find(".product-module-images .image-one-section")[0].classList;f=g="";var l="conic-gradient(from -46deg at 46.5% 30.98%,rgba(240,240,240,.5) 0,rgba(255,255,255,0) 360deg),"+p;b.hasClass("no-backgroundchange")||(b.hasClass("no-gradient")?(2>=d.length?f=d[1]:"",f&&f.startsWith("topdevice")?b.find(".product-module-images .image-one-section").removeClass(f).addClass("top"+a):b.find(".product-module-images .image-one-section").css("background",p)):m?(2>=h.length?g=h[1]:b.find(".product-color").removeAttr("class").addClass("product-color"), g&&g.startsWith("bgdevice")?b.find(".product-color").removeClass(g).addClass("bg"+a):b.find(".product-color").css("background",m)):(2>=h.length?g=h[1]:b.find(".product-color").removeAttr("class").addClass("product-color"),g&&g.startsWith("bgdevice")?b.find(".product-color").removeClass(g).addClass("bg"+a):b.find(".product-color").css("background",l)));m=b.find(".actions-section.active .product-module-cover-swaches .pm-color-picker-dot-light").length;l=b.find(".actions-section.active .product-module-cover-swaches .pm-color-picker-dot-light.active").index()- 1;u(c,l,b,!0,e,m)}}}function w(a){if(!a.hasClass("active")){var c=a.index()-1,b=a.parents(".product-module"),e=b.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light").length,h=b.find(".actions-section.active .product-module-cover-swaches .pm-color-picker-dot-light").length;b.find(".actions-section.active .product-module-cover-swaches .pm-color-picker-dot-light").removeClass("active");a.addClass("active");a=a.find("input").attr("class");var d=b.find(".product-module-images .image-two-section")[0].classList, g="",k;a.split(" ").forEach(f=>{f.startsWith("rgb")&&(k=f);f.startsWith("#")&&(k=f)});b.hasClass("no-backgroundchange")||(2>=d.length?g=d[1]:"",g&&g.startsWith("bottomtype")?b.find(".product-module-images .image-two-section").removeClass(g).addClass("bottom"+a):b.find(".product-module-images .image-two-section").css("background",k));a=b.find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active").index();u(a,c,b,!1,e,h)}}$("html").attr("lang").startsWith("ar-"); $(".product-module").each(function(a,c){a=$(c).find(".product-module-container").data("lazyload");if("IntersectionObserver"in window&&a){a=document.querySelectorAll(".bg-lazyload");const b=new IntersectionObserver(function(e){e.map(h=>{h.isIntersecting&&(h.target.style.backgroundImage="url('"+h.target.dataset.bgimg+"')",b.unobserve(h.target))})},{rootMargin:"200px"});a.forEach(e=>b.observe(e))}else $(c).find(".product-module-content .product-module-main-image").each(function(b,e){b=$(e).attr("data-bgimg"); $(e).css("background-image","url("+b+")")}),$(c).find(".product-module-images .product-module-images-one").each(function(b,e){b=$(e).attr("data-bgimg");$(e).css("background-image","url("+b+")")}),$(c).find(".product-module-images .product-module-images-two").each(function(b,e){b=$(e).attr("data-bgimg");$(e).css("background-image","url("+b+")")});1>=$(c).find(".actions-section.active .product-module-swaches").length&&$(c).addClass("singleswach");a=$(c).find(".actions-section.active .product-module-cover-swaches .pm-color-picker-dot-light.active"); c=$(c).find(".actions-section.active .product-module-finish-swaches .pm-color-picker-dot-light.active");v(c);0