'use strict';var compare_cf=compare_cf||{}; compare_cf.Init=function(){void 0!=window.CF_compare_content&&null!=window.CF_compare_content&&0!=window.CF_compare_content.length&&(compare_cf.cf_compare_config=JSON.parse(window.CF_compare_content),null!=compare_cf.cf_compare_config&&void 0!=compare_cf.cf_compare_config&&(compare_cf.cf_compare_config.configs.forEach(function(d,e){compare_cf.RenderCompareCheckBox(d)}),$(".comparecards .compare-items #compare-home-button,.comparecards #compare-home-mobile-button").attr("target","_self")))}; compare_cf.getCardCompareHTML=function(d,e){return'\x3cdiv class\x3d"custom-control custom-checkbox my-2 mx-4" style\x3d"position:absolute;top:0;left:0"\x3e\x3cinput type\x3d"checkbox" style\x3d"cursor:pointer" class\x3d"compare-checkbox custom-control-input" id\x3d"compare-checkbox-'+e.productId+'-desktop"data-productID\x3d"'+e.productId+'" aria-label\x3d"'+e.ariaLabel+'" data-bi-cn\x3d"'+d.contentName+'" data-bi-ecn\x3d"'+d.engContentName+'"\x3e\x3clabel style\x3d"cursor:pointer" class\x3d"custom-control-label " for\x3d"compare-checkbox-'+ e.productId+'-desktop" aria-hidden \x3d"true"\x3e\x3cspan class\x3d"custom-control-glyph" aria-hidden\x3d"true"\x3e\x3c/span\x3e\x3cspan class\x3d"compare-status"\x3e'+d.contentName+"\x3c/span\x3e\x3c/label\x3e\x3c/div\x3e"}; compare_cf.RenderCompareCheckBox=function(d){var e=$("#"+d.componentId);0!=e.length&&(e.addClass("compare-cards"),d.options.forEach(function(g,v){e.find(g.selector).addClass("product").attr("product",g.productId).attr("data-card-text",g.cardText).attr("data-image",g.cardImage).attr("data-compare-text",d.contentName).attr("data-selected-text",d.selectedText).prepend(compare_cf.getCardCompareHTML(d,g));e.find(g.selector).closest(".compare-cards").find(".card img").css("margin-top","40px")}))}; $(document).ready(function(){function d(){if(-1=a.offset().top?k.show():k.hide()})}}else{var c=null;$(".mobile-dcards").length&&(c=$(".mobile-dcards").offset().top);$(window).scrollTop()+$(window).innerHeight()> c?0!=$(".mobile-dcards input:checked").length&&k.show():2==$(".mobile-dcards input:checked").length+$(".desktop-dcards input:checked").length?k.show():k.hide()}}function e(){window.matchMedia("(max-width: 767px)").matches?0!==$(".sticky_compare_bar.compare-fixed").length?$(".fixed-back-to-top").css("bottom","80px"):$(".fixed-back-to-top").css("bottom","24px"):$(".fixed-back-to-top").css("bottom","24px")}function g(){-1==window.location.href.indexOf("compare-devices")&&(window.matchMedia("(max-width: 767px)").matches? k.hasClass("d-none")?$("#uhf-footer").removeClass("pb-5 mb-4"):$("#uhf-footer").addClass("pb-5 mb-4"):$("#uhf-footer").removeClass("pb-5 mb-4"))}function v(a){if(-1y!==$(this).closest(".product").attr("product")));if(window.matchMedia("(min-width: 768px)").matches){u.addClass("desktop-dcards").removeClass("mobile-dcards");$(".compare-cards").addClass("desktop-dcards").removeClass("mobile-dcards");$(".devices-info .devices").addClass("desktop-dcards").removeClass("mobile-dcards");if(1==$(this).prop("checked")){$(this).attr("aria-checked", "true");b=$(this).closest(".product").attr("product");f.push(b);b=$("#fixed-bar .compare-item.d-none").index();var c=$(this).closest(".product").data("selected-text");c&&$(this).siblings("label").find(".compare-status").text(c);for(c=0;c<=b;c++)b==c&&(h.removeClass("d-none"),l.eq(c).removeClass("d-none").attr("data-product",$(this).closest(".product").attr("product")),l.eq(c).find(".closeCompareitem").attr("aria-label",$("#compare-card-list").data("remove-aria")+$(this).closest(".product").find(".cta").text()), null!=compare_cf.cf_compare_config||void 0!=compare_cf.cf_compare_config?l.eq(c).find("picture").append($('\x3cimg class\x3d"compare-card-img"\x3e').attr({src:$(this).closest(".product").attr("data-image"),alt:$(this).closest(".product").find("img").attr("alt")})):-1{h.addClass("d-none")},200),l.eq(1).addClass("d-none")):a==c&&0!=c&&($(".compare-button-tile .compare-product-button .compare-h").addClass("d-none").attr("tabindex",-1),$(".compare-button-tile .compare-product-button .compare-h").eq(c-1).removeClass("d-none").attr("tabindex",-1)),a==p&&$(m).not(":checked").attr("disabled",!0);a {w()},0)});h.find(".closeCompareitem").click(function(){let a=$(".product input:checked").length;1==a&&(setTimeout(()=>{h.addClass("d-none")},200),h.find("a#compare-home-button").addClass("disabled").attr("aria-disabled","true"),h.find(".compare-items-block").addClass("d-none"),n=!1);2==a&&($(".compare-button-tile .compare-product-button .compare-h").addClass("d-none").attr("tabindex",-1),$(".compare-button-tile .compare-product-button .compare-h:nth-child(1)").removeClass("d-none").attr("tabindex", -1));3==a&&($(".compare-button-tile .compare-product-button .compare-h").addClass("d-none").attr("tabindex",-1),$(".compare-button-tile .compare-product-button .compare-h:nth-child(2)").removeClass("d-none").attr("tabindex",-1));3>a?h.find("#compare-home-button").attr({tabindex:"-1"}).addClass("disabled").attr("aria-disabled","true"):h.find("#compare-home-button").attr({tabindex:"0"}).removeClass("disabled").removeAttr("aria-disabled");$(m).not(":checked").removeAttr("disabled");ResetCompareText($(this)); $(`.product[product='${$(this).closest(".compare-item").attr("data-product")}'] input`).attr("aria-checked","false").prop("checked",!1);v($(this));f=f.filter(b=>b!==$(this).closest(".compare-item").attr("data-product"));0{h.addClass("d-none")},0)});q.keyup(function(a){13==a.keyCode&&q.trigger("click")});d();e();$(window).scroll(function(){d();g()});$(window).resize(function(){var a= $(".mobile-dcards input"),b=$(".desktop-dcards input"),c=$(".mobile-dcards input:checked"),y=$(".desktop-dcards input:checked"),z=$(".sticky-compare-content #compare-home-mobile-button");e();g();ResetCompareText();window.matchMedia("(max-width: 767px)").matches?(u.addClass("mobile-dcards").removeClass("desktop-dcards"),$(".devices-info .devices").addClass("mobile-dcards").removeClass("desktop-dcards"),2==c.length&&z.removeClass("disabled").removeAttr("aria-disabled"),1>c.length&&(z.addClass("disabled").attr("aria-disabled", "true"),a.not(":checked").removeAttr("disabled"),a.prop("checked",!1).attr("aria-checked","false"),f=[],q.click()),d(),k.removeClass("d-none")):window.matchMedia("(min-width: 768px)").matches&&(u.addClass("desktop-dcards").removeClass("mobile-dcards"),$(".devices-info .devices").addClass("desktop-dcards").removeClass("mobile-dcards"),-1==window.location.href.indexOf("compare-devices")&&(a.not(":checked").removeAttr("disabled"),a.prop("checked",!1).attr("aria-checked","false")),k.addClass("d-none"), 1>y.length&&(b.not(":checked").removeAttr("disabled"),b.prop("checked",!1).attr("aria-checked","false"),f=[],q.click()),k.addClass("d-none"))});window.addEventListener("pageshow",function(a){(a.persisted||"undefined"!=typeof window.performance&&2===window.performance.navigation.type)&&window.location.reload()});const r=$(".comparecards #fixed-bar #compare-status-msg");var n=!1,x=!1}); function ResetCompareText(d){if(null!=compare_cf.cf_compare_config&&void 0!=compare_cf.cf_compare_config){var e=$("input.compare-checkbox[type\x3d'checkbox']"),g=e.eq(0).closest(".product").data("compare-text");void 0==d||null==d?e.siblings("label").find(".compare-status").text(g):(d=d.closest(".compare-item").attr("data-product"),$(".compare-cards").find('[product\x3d"'+d+'"]').find(e).siblings("label").find(".compare-status").text(g))}};