const cookieName="uxTest";function getCookieValue(e){var t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}if("de"===window.merchSFCountryCode.toLowerCase()||"uk"===window.merchSFCountryCode.toLowerCase()){var value=getCookieValue("uxTest");if(!value){var randomisedNumber=Math.random();randomisedNumber<.34?value="Control":randomisedNumber>=.34&&randomisedNumber<.67?value="Var1":randomisedNumber>=.67&&(value="Var2"),$.cookie("uxTest",value,{expires:60,path:"/"})}window.ec_variable=value}var ec_control=window.ec_variable&&"control"===window.ec_variable.toLowerCase(),ec_var1=window.ec_variable&&"var1"===window.ec_variable.toLowerCase(),ec_var2=window.ec_variable&&"var2"===window.ec_variable.toLowerCase(),shouldShowExpressCheckoutItems=ec_var1||ec_var2;function getSetFromArray(e){var t=new Set;return e.forEach((function(e){t.add(e)})),t}var isHomePage="default"===window.merchPageType,isPLPPage=window.location.href.toLowerCase().indexOf("list.aspx")>-1,isProductPage=window.location.href.toLowerCase().indexOf("product.aspx")>-1,isOfferPage=window.location.href.toLowerCase().indexOf("offer.aspx")>-1,isFAQPage=window.location.href.toLowerCase().indexOf("faq.aspx")>-1,isInkTonerPage=window.location.href.toLowerCase().indexOf("ink-toner-paper.aspx")>-1,isAccessoryFinderPage=window.location.href.toLowerCase().indexOf("accessories.aspx")>-1,isGermanyStore="de"===window.merchSFCountryCode.toLowerCase(),isUKStore="uk"===window.merchSFCountryCode.toLowerCase(),isSwedenStore="se"===window.merchSFCountryCode.toLowerCase(),showSwedenTopBanner=isSwedenStore&&(isHomePage||isPLPPage||isProductPage||isOfferPage),isLoggedInBusinessUser=window.dataLayer&&window.dataLayer[0]&&"guest"!==window.dataLayer[0].customerType&&"Business"===window.dataLayer[0].customerSegment;if(window.isExpressCheckout=shouldShowExpressCheckoutItems&&!isLoggedInBusinessUser&&(isGermanyStore||isUKStore),isUKStore)var ukEnrolmentSkus=getSetFromArray(["6A394AE","6A396AE","6A398AE","6A3A0AE","6A3A2AE","6A3A4AE","6A3A6AE"]);!function(e){var t=!1,n=e.sessionStorage.getItem("__userSession"),a=e.document.querySelector(".cart__menu.js-meganav-cart"),o=e.document.documentElement.dataset,i=o.cc,r=o.ll,s={en:"Welcome Back",fr:"Bon Retour"};e.shoppingCartReminder=function(o){var c;"CA"!==i||t||(t=!0,o>0&&!n&&(e.sessionStorage.setItem("__userSession","current session"),(c=e.document.createElement("h2")).innerText=s[r]||s.en,a.insertBefore(c,a.childNodes[0]),a.style.visibility="visible",a.style.opacity=1,e.addEventListener("click",(function(t){t.target!==a&&(a.style.removeProperty("opacity"),a.style.removeProperty("visibility"),e.setTimeout((function(){var e=a.querySelector("h2");e.parentElement.removeChild(e)}),1500))}))))}}(window);var merchAllPages={init:function(){this.smoothScroll(),merchComp.currencyFormat(),new merchComp.User,new merchComp.UserMenu,new merchComp.Search($(".js-s-h-search"),$(".js-s-h-search-btn")),new merchComp.Search($(".js-s-h-top-search"),$(".js-s-h-search-btn--mobile")),this.headerDialog.init(),this.Cart.init(),this.doofinderSession.init(),this.outOfStock.init(),new merchComp.LangSelector,new merchComp.ToTop,new merchComp.PersistentHeader,window.merchComp.hideStickyFooter(),window.merchComp.prefetchSearch(),window.merchComp.loadIfCookieConsent(),this.sticky=new merchComp.Sticky,window.merchComp.cyberweekCountdownBanner($("[data-cyberweek-countdown-banner]"),window.merchCyberweekCountdownBannerConfig),window.merchComp.showVatBanner(window.vatBannerConfig),window.merchComp.showAutumnSalesBanner(window.merchAutumnSalesBannerConfig,$(".js-top-banner")),window.merchComp.showHighlightBanner(window.topBannerData),this.deviceDetection=new merchComp.deviceDetection;window.merchComp.linkWithClearCache('a[href*="prerouter.aspx"][href*="act=login"], a[href*="prerouter.aspx"][href*="act=logout"], a[href*="prerouter.aspx"][href*="act=create"], a[href="https://myaccount.id.hp.com/uaa/change-password"], .js-s-h-vat-btn'),merchComp.updateReturnUrl(),merchComp.overwriteUppercasePathname(),merchComp.removeLangParam(),this.deviceDetection.isTouch()&&(new merchComp.tabletHover(".s-h-nav-item"),new merchComp.tabletHover(".s-h-tool")),this.menu=new merchComp.Menu,new merchComp.SubMenu,this.misc(),this.vatSelect.init(),window.merchAllPages.util.service.user.get().always((function(){var e="",t="",n="";if(void 0!==window.dataLayer)for(var a in dataLayer){var o=dataLayer[a];if(void 0!==o.communityID&&void 0!==o.subsegment&&void 0!==o.catalogID){e=o.catalogID,t=o.subsegment,n=o.communityID;break}}new merchComp.StoreName(e,t,n),new merchComp.Phone(e,t,n)})),this.meganav.init(),new merchComp.SearchAutoComplete($(".js-meganav-search-input")),this.akamaiCCCookie.write({isAnonymous:window.s_eVar8.indexOf("anonymous")>-1}),this.focusBox.init(),new merchComp.SiteSwitch,setTimeout((function(){window.navScrollList=new merchComp.ScrollList($(".js-scroll-list"))}),1),$(".js-s-f-menu").each((function(){new merchComp.FooterMenu($(this))})),new merchComp.Footnotes,this.promotionTracker=new merchComp.PromotionTracker,merchComp.removeAccountLinks()},expressCheckout:{init:function(){var e=!1;return function(){if(window.isExpressCheckout&&!e){e=!0;var t=this.checkCachedPayments();t.Payments&&t.Payments.length&&window.merchAllPages.expressCheckout.shouldInitiatePayPalButton(t.Payments)}}}(),checkCachedPayments:function(){var e={},t=JSON.parse(window.sessionStorage.getItem("MERCH_SERVICE_CACHE_GET_PAYMENTS"))||{};if(Object.keys(t).length){var n="uk"===window.merchSFCountryCode?"gb":window.merchSFCountryCode,a=t.paymentsResponse.CountryCode.toLowerCase()===n,o=t.customerType===(dataLayer&&dataLayer[0]&&dataLayer[0].customerType),i=window._MSD&&window._MSD.CartData&&window._MSD.CartData.Cart&&window._MSD.CartData.Cart.CartId||"",r=t.cartId===i;e=a&&o&&r&&t.paymentsResponse.Payments&&t.paymentsResponse.Payments.length&&t.paymentsResponse}return e},getPayments:function(e){var t=this.checkCachedPayments();t.Payments&&t.Payments.length||window.SERVICE.API_PAYMENTS.getPayments({},(function(t){e||(e=_MSD&&_MSD.CartData&&_MSD.CartData.Cart&&_MSD.CartData.Cart.CartId);var n=t&&t.Payments?t.Payments:[];window.merchAllPages.expressCheckout.shouldInitiatePayPalButton(n,e)}),(function(e){console.log("GetPayments error")}))},shouldInitiatePayPalButton:function(e,t){window.merchAllPages.expressCheckout.hasPayPalPaymentMethod(e)&&window.merchAllPages.expressCheckout.initiatePayPalButton(t)},hasPayPalPaymentMethod:function(e){return!!e.find((function(e){var t="paypal"===e.PaymentDescription.replace(/\s/g,"").toLowerCase();return"706"===e.PaymentCode&&t}))},setPayPalLoading:function(e){var t=$(".js-paypal-button");t&&(e?(t.addClass("loading"),t.attr("disabled","")):(t.removeClass("loading"),t.removeAttr("disabled")))},initiatePayPalButton:function(e){var t=$(".expressCheckout"),n=$(".js-paypal-button");if(n.click((function(){window.merchAllPages.loader.show(),e||(e=_MSD&&_MSD.CartData&&_MSD.CartData.Cart&&_MSD.CartData.Cart.CartId);var t=new URLSearchParams(window.location.search);t.delete("token"),t.delete("Paypal");var n=t.toString().length>0;window.SERVICE.API_CART.getPayPalECToken({CartId:e,CancelURL:window.location.origin+window.location.pathname+"?"+t.toString()+(n?"&":"")+"Paypal=cancel",ReturnURL:window.location.origin+window.merchWebRoot+"/shop/Cart?Paypal=confirm"},(function(e){if(window.merchAllPages.loader.hide(),sessionStorage.setItem("GetPayPalECToken_response",JSON.stringify(e)),0!==e.Status&&Object.keys(e.Errors||{}).length)return window.merchAllPages.loader.hide(),void window.mserviceErr(e);null!==e.PayPalPostURL&&(sessionStorage.removeItem("UpdateDeliveryHasBeenMade"),sessionStorage.setItem("ec_checkout",JSON.stringify(!0)),window.location.href=e.PayPalPostURL)}),mOnServiceFailure)})),window.shouldShowExpressCheckoutItems)t.removeClass("is-hidden");else if(window.ec_control)return void t.remove();window.ec_var2&&n.addClass("paypal-button--white")},getPayPalPriceRange:function(e){return{isPayPalPriceRange:e>=30&&e<=598.99,isPayPalCreditPriceRange:e>=599&&e<=2e4,isDEPayPalAmountInRange:e>=30&&e<=2e4}},paypalOsmGA:function(){var e=_MSD&&_MSD.CartData&&_MSD.CartData.Cart&&_MSD.CartData.Cart.Total,t=this.getPayPalPriceRange(e),n=t.isPayPalPriceRange&&"paypal-learn-more",a=t.isPayPalCreditPriceRange&&"paypal-credit-learn-more",o=isUKStore&&n||isGermanyStore&&(n||a);merchAllPages.gaEv("UI-Navigation","L2-Mini-Cart",o)},initiateOSM:function(e){if(window.paypal&&window.shouldShowExpressCheckoutItems){var t=this.getPayPalPriceRange(e);isUKStore&&t.isPayPalCreditPriceRange&&window.merchAllPages.expressCheckout.renderPayPalCreditOSM(e),(isUKStore&&t.isPayPalPriceRange||isGermanyStore&&t.isDEPayPalAmountInRange)&&window.merchAllPages.expressCheckout.renderPayPalOSM(e,t.isPayPalPriceRange,t.isPayPalCreditPriceRange)}},getTokenExpiresAt:function(e){var t=new Date;return t.setSeconds(Number(t.getSeconds())+Number(e)),t.getTime()},renderPayPalOSM:function(e,t,n){$(".pp-message").removeClass("is-hidden");var a={amount:e,style:{layout:"text",logo:{type:"alternative"},text:{size:14}},offer:isUKStore?"PAY_LATER_SHORT_TERM":isGermanyStore&&(n?"PAY_LATER_LONG_TERM":"PAY_LATER_PAY_IN_1")};window.paypal.Messages&&window.paypal.Messages(a).render(".pp-message")},renderPayPalCreditOSM:function(e){var t=$(".js-meganav-cart").find($(".pp-message"));t.length&&t.remove();var n=$(".payPalCreditModal__root"),a=$(".payPalCreditModal__backdrop"),o=$("body"),i=window.merchComp.currencyFormat(Number(e/18).toFixed(2)),r=$(".js-perMonth"),s=$(".js-payPalCredit__banner-text").text().indexOf("#perMonth#")>-1,c=r&&r.length;s?$(".js-payPalCredit__banner-text").html($(".js-payPalCredit__banner-text").text().replace("#perMonth#",'<span class="js-perMonth">'+i+"</span>")):c&&r.text(i),$(".js-payPalCredit-container").removeClass("is-hidden"),$(".pp-message").addClass("is-hidden"),$(document).unbind("click").on("click",".js-payPalCredit__link, .js-modalCloseBtn__icon, .js-payPalCreditModal__root",(function(t){var i=t.target.classList[1],r="js-payPalCreditModal__root",s="js-modalCloseBtn__icon";i===s&&t.stopPropagation();var c=i===r||i===s;(i===r||"js-payPalCredit__link"===i||i===s)&&(n.toggleClass("is-active"),a.toggleClass("is-active"),o.toggleClass("no-scroll"),$(".js-meganav-cart").toggleClass("creditModal-opened"),c||window.merchAllPages.expressCheckout.getCreditOptions(e))}))},getCreditOptions:function(e){window.paypalService.getCreditOptions({transaction_amount:{value:e,currency_code:"GBP"}}).then((function(t){const n=((t.financing_options[0]||{}).qualifying_financing_options||[]).sort((function(e,t){return e.credit_financing.term-t.credit_financing.term})).slice(1).map((function(t,n){const a=t.credit_financing,o=a.term,i=a.apr||0,r=window.merchComp.currencyFormat(t.monthly_payment.value),s=window.merchComp.currencyFormat(t.total_cost.value);return'<ul class="list"><li class="list-item">'+o+'</li><li class="list-item">'+window.merchComp.currencyFormat(e)+'</li><li class="list-item">'+i+'%</li><li class="list-item">'+r+'</li><li class="list-item">'+s+"</li></ul>"}));$(".list-container").html(n),$(".js-loader").addClass("is-hidden")}))}},meganav:{init:function(){function e(){if($(".js-meganav-menu").is(":visible")){var e=$(window).width();$(".js-meganav-submenu").each((function(){var t=$(this);t.removeAttr("style");var n=e-(t.offset().left+t.outerWidth()+28);n<0&&t.css({left:n})}))}}function t(){var e=$(".js-meganav"),t=e.offset().top;if(t>0){var n=parseFloat(getComputedStyle(document.documentElement).fontSize);t=parseFloat((t/n).toFixed(4))+"rem"}else t="";e.get(0).style.setProperty("--meganav-offset-top",t)}this.explore(),this.search(),this.account(),this.vat(),$(".js-lang-switcher").click((function(){$(".lang-switcher").toggleClass("lang-switcher--active")})),e(),t(),$(window).on("load resize",(function(){e(),t()}))},explore:function(){var e=$(".js-meganav-explore");$(document).on("click",".js-meganav-explore-btn, .js-meganav-explore-btn-close",(function(){var t="explore-menu--open",n="explore-menu--levels-open",a="explore-menu--animating";e.addClass(a).delay(1e3).queue((function(t){e.removeClass(a),t()})),e.hasClass(n)||e.addClass(n),e.hasClass(t)?e.removeClass(t):e.addClass(t),$("body").toggleClass("meganav-overflow-hidden-mobile")})),$(document).on("click",".js-meganav-explore-nav-item",(function(t){$(window).width()>=1280?$(".js-meganav-explore-btn-close").click():(e.toggleClass("explore-menu--levels-open"),e.hasClass("explore-menu--levels-open")||e.scrollTop(0),t.preventDefault())})),$(document).on("click",".js-meganav-explore-level-btn:not(.no-dropdown)",(function(e){$(this).parent(".js-meganav-explore-level-1").toggleClass("levels__level-1--open"),e.preventDefault()}))},search:function(){var e=$("body"),t=$(".js-meganav-search-input"),n=!1;function a(e){$(".js-meganav-search").toggleClass("search--active",!0===e&&e)}function o(){var e=t.val();a(!0),e.length&&(window.location=getHpPath(!0)+"shop/search.aspx?q="+e)}$(document).on({mouseenter:function(){n=!0},mouseleave:function(){n=!1}},".js-meganav-search-btn"),$(document).on("keypress",".js-meganav-search-input",(function(e){"13"==(e.keyCode?e.keyCode:e.which)&&o()})),$(document).on("focus",".js-meganav-search-input",(function(){o()})),$(document).on("blur",".js-meganav-search-input",(function(){n||(t.val(""),a())})),$(document).on("click",".js-meganav-close-search",(function(){a(),e.removeClass("meganav-overflow-hidden-mobile")})),$(document).on("click",".js-meganav-mobile-search-btn",(function(){a(!0),e.addClass("meganav-overflow-hidden-mobile")}))},account:function(){var e=$(".js-meganav-tool-account"),t=$("body");$(document).on("click",".js-meganav-account-btn",(function(n){$(".js-meganav-menu").is(":hidden")&&n.preventDefault(),e.addClass("tool--active"),t.addClass("meganav-overflow-hidden-mobile")})),$(document).on("click",".js-meganav-close-account-overlay",(function(){e.removeClass("tool--active"),t.removeClass("meganav-overflow-hidden-mobile")}))},vat:function(){var e=$(".js-vat-switcher"),t=window.merchAllPages.merchCookies.getCkVat();t&&"inc"!==t?($(".js-vat-switcher-checkbox").prop("checked",!1),$(".js-vat-switcher").attr("data-vat","exc")):($(".js-vat-switcher-checkbox").prop("checked",!0),$(".js-vat-switcher").attr("data-vat","inc")),e.on("click",(function(e){e.preventDefault(),window.merchAllPages.loader.show(),window.merchAllPages.gaEv("UI-Navigation","L1-VAT","VAT-switcher");var t="inc"===$(".js-vat-switcher").attr("data-vat")?"exc":"inc";"inc"===t?$(".js-vat-switcher-checkbox").prop("checked",!0):$(".js-vat-switcher-checkbox").prop("checked",!1),merchAllPages.util.service.user.customUserProfile.vat.set(t).always((function(){window.merchAllPages.merchCookies.setCkVat(t),window.merchAllPages.akamaiCCCookie.write({isAnonymous:window.s_eVar8.indexOf("anonymous")>-1}),window.merchAllPages.vatSelect.reload({addTabName:!0})}))}))}},misc:function(){"undefined"!=typeof s_pageName&&(window.merchPageNameForTracking=s_pageName)},doofinderSession:{init:function(){-1!==window.location.href.toLowerCase().indexOf("search.aspx")&&this.startSession()},isAvailable:function(){return!!window.doofinder},startSession:function(){if(this.isAvailable()){var e=sessionStorage.getItem("doofinderSessionId");if(!e)e=new doofinder.session.Session(new doofinder.session.ObjectSessionStore).get("session_id"),this.storeSessionId(e)}},storeSessionId:function(e){if(this.isAvailable())try{sessionStorage.setItem("doofinderSessionId",e)}catch(e){console.log("Unable to store Doofinder session ID")}},storeHashId:function(e){if(this.isAvailable()){this.startSession();var t=JSON.parse(sessionStorage.getItem("doofinderHashIds")||"[]");if(!t||t.indexOf(e)<0){t.push(e);try{sessionStorage.setItem("doofinderHashIds",JSON.stringify(t))}catch(e){console.log("Unable to store Doofinder hash ID")}}}}},akamaiCCCookie:{options:{path:"/",secure:!0},write:function(e){var t,n=window.merchAllPages.merchCookies.getCkVat(),a=this.catalogId(),o=this.isDefaultCommunity(),i=this.communityId(),r=this.language();t="anon|"+a+"|"+n,r&&(t+="|"+r),this.cookie("MerchAkamaiCC",t),!o&&i?this.cookie("MerchAkamaiSCESG",i):this.removeCookie("MerchAkamaiSCESG")},language:function(){for(var e=["ch","ca"],t=0;t<e.length;t++)if(window.merchSFCountryCode===e[t])return window.merchSFLanguageCode;return null},isDefaultCommunity:function(){for(var e=["SG183","SG3","SG895","SG888","SCESG23100","SCESG23099","SG892","SG914","SG918","SG901"],t=0;t<e.length;t++)if(window.s_eVar45.indexOf(e[t])>-1)return!0;return!1},communityId:function(){var e=window.s_eVar45.split(":");return e&&e.length?e[0]:""},catalogId:function(){var e=window.s_eVar45.split(":");return e[e.length-1]},cookie:function(e,t){$.cookie(e,t,this.options)},removeCookie:function(e){$.removeCookie(e,this.options)}},Cart:{init:function(){var e=$(".js-s-h-cart-tool .s-h-tool__link"),t="#cart";t=$("meta[name=viewport]").length&&$(window).width()<=992?e.attr("data-mobile-href"):e.attr("data-desktop-href"),e.attr("href",t),e.on("click",(function(e){var t=$(".js-s-h-cart-count").text();""!==t&&"0"!==t||e.preventDefault()})),$(".js-meganav-cart-icon-link").on("click",(function(e){var t=$(".js-meganav-cart-count").text();""!==t&&"0"!==t||e.preventDefault()}))},state:function(e){e=e||{};var t=$(".js-meganav-cart-btn");t.toggleClass("cart--has-items","FILLED"===e.state),"FILLED"===e.state&&t.find(".js-meganav-cart-count").text(e.count?e.count:"")}},customCheckbox:{init:function(e){((e=e||{}).$html?e.$html.find(".js-custom-checkbox"):$(".js-custom-checkbox")).each($.proxy(this.select,this))},select:function(e,t){var n=$(t),a=n.attr("data-classlist")||"";n.wrap('<div class="custom-checkbox '+a+'"></div>'),n.on("change",this.onChange),t.checked&&$(t).closest(".custom-checkbox").addClass("custom-checkbox--checked")},onChange:function(){this.checked?$(this).closest(".custom-checkbox").addClass("custom-checkbox--checked"):$(this).closest(".custom-checkbox").removeClass("custom-checkbox--checked")}},customSelect:{init:function(e){((e=e||{}).$html?e.$html.find(".js-custom-select"):$(".js-custom-select")).each($.proxy(this.select,this))},select:function(e,t){var n=$(t),a=$('<span class="custom-select__label"></span>'),o=n.attr("data-classlist")||"";a.text($("option:selected",n).text()),n.wrap('<div class="custom-select '+o+'"></div>'),a.insertBefore(n),n.on("change",this.onChange)},onChange:function(){var e=$(this);e.siblings().text($("option:selected",e).text())}},focusBox:{TEMPLATE:{OVERLAY:'<div class="focus-box-bg"></div>',FOCUS_BOX:'<div class="focus-box sm15"><div class="focus-box__body">{{body}}</div><button class="focus-box__close-btn">Close<svg class="focus-box__close-icon" viewBox="0 0 101 100"><use xlink:href="#i-cross-close"></use></svg></button></div>'},init:function(){$(document.body).on("click.s",".focus-box-bg, .focus-box__close-btn, .focus-box__close-icon",$.proxy(this.hide,this))},show:function(e){var t,n=this,a=new $.Deferred;return(e=e||{}).html&&e.html.length&&(t=$(this.TEMPLATE.FOCUS_BOX.replace("{{body}}",e.html))),e.$html&&e.$html.length&&(t=$(this.TEMPLATE.FOCUS_BOX.replace("{{body}}",""))).find(".focus-box__body").append(e.$html),e.transparent&&t.addClass("focus-box--transparent"),e.classList&&t.addClass(e.classList),e.width&&(t.css("width",e.width),t.css("min-width",e.width)),e.left&&t.css("left",e.left),e.transform&&t.css("transform",e.transform),e.marginLeft&&t.css("margin-left",e.marginLeft),e.height&&(t.css("height",e.height),t.css("min-height",e.height)),t&&($(document.body).append(this.TEMPLATE.OVERLAY),$(document.body).append(t),setTimeout((function(){n.animate({position:e.position,marginLeft:e.marginLeft}),a.resolve()}),1)),a.promise()},animate:function(e){var t,n=$(".focus-box"),a=n.outerWidth(),o=n.outerHeight();if((e=e||{}).position)switch(e.position){case"top":t=$(window).scrollTop()+15;break;case"topVisible":t=$(window).scrollTop()+40;break;default:t=$(window).scrollTop()+$(window).height()/2-o/2}else t=$(window).scrollTop()+$(window).height()/2-o/2;e.marginLeft||n.css("margin-left",a/-2+"px"),$(".focus-box-bg").addClass("focus-box-bg--is-visible"),n.css("top",t+"px")},hide:function(e){var t=$(e.target),n=$(e.currentTarget);(t.hasClass("focus-box-bg")||t.hasClass("focus-box__close-btn")||n.hasClass("focus-box__close-btn"))&&(window.location.href.toLowerCase().indexOf("product.aspx")>-1&&n.prev($(".focus-box__body")).find($(".prom-overlay")).length>0&&n.prev($(".focus-box__body")).find($(".prom-overlay")).find($(".prom-flag--c-1")).length>0&&window.merchAllPages.gaEv("ui-pdp","overview","voucher-tooltip-close"),$(".focus-box-bg, .focus-box").remove())}},gaEv:function(e,t,n){window.dataLayer.push({event:"analyticsEvent",category:e,action:t,label:n})},gaEvWithEcom:function(e,t){var n=$.Deferred();return window.ga&&ga.loaded?dataLayer.push({event:"productClick",ecommerce:{click:{actionField:{list:e.field},products:[{name:e.name,id:e.sku,price:e.price,brand:"HP",category:e.category,variant:"",position:e.position}]}},eventCallback:function(){t&&(document.location=t),n.resolve()}}):(t&&(document.location=t),n.resolve()),n.promise()},gaImp:function(e,t){if(e instanceof Array&&e.length){var n=window.merchComp.GaData;n.ecommerce.currencyCode=t,n.ecommerce.impressions=e,(n=$.extend(!0,{},n)).event="ProductImpression",window.dataLayer.push(n)}},goToCart:function(){window.location=getHpPath(!0)+"shop/Cart/"},headerDialog:{init:function(){var e=merchAllPages.util.getUrlParams();e.merchw&&""!==e.merchw&&window.merchAllPages.util.service.user.get().done((function(t){t.response&&t.response.User&&merchAllPages.headerDialog.show({msgId:e.merchw,firstName:t.response.User.FirstName})})).fail((function(e){})),e.merchoptin&&"1"===e.merchoptin&&this.show({msgId:"optin"})},show:function(e){var t,n=this,a=$(".js-s-h-dialog"),o=$(".js-breadcrumbs__path");(e=e||{}).msgId&&((t=a.find(".s-h-dialog__msg--"+e.msgId)).addClass("s-h-dialog__msg--is-visible"),o.addClass("dialog--is-visible"),e.firstName&&t.text(t.text().replace("{{firstName}}",e.firstName)),a.addClass("s-h-dialog--is-visible"),a.addClass("error"===e.msgId?"s-h-dialog--is-error":"s-h-dialog--is-success"),a.find(".js-s-h-dialog-close-btn").on("click",(function(){n.hide()})),"error"===e.msgId&&e.errText&&t.text(e.errText))},hide:function(){var e=$(".js-s-h-dialog"),t=$(".js-breadcrumbs__path");e.removeClass("s-h-dialog--is-visible"),e.removeClass("s-h-dialog--is-success"),e.removeClass("s-h-dialog--is-error"),t.removeClass("dialog--is-visible"),e.find(".s-h-dialog__msg").removeClass("s-h-dialog__msg--is-visible"),e.find(".s-h-dialog__msg--error").text("Error")}},loader:{TEMPLATE:{OVERLAY:'<div class="sf-loader-bg"></div>',LOADER:'<div class="sf-loader"></div>'},show:function(){$(document.body).append(this.TEMPLATE.OVERLAY+this.TEMPLATE.LOADER),setTimeout((function(){$(".sf-loader-bg").addClass("sf-loader-bg--is-visible")}),1)},hide:function(){$(".sf-loader-bg, .sf-loader").remove()}},merchCookies:{cookiePath:"/",cookieExp:100,getCkVat:function(){return this.getCk("MerchSettings","vat")},setCkVat:function(e){"inc"!==e&&"exc"!==e||this.setCk("MerchSettings","vat",e)},getCkTele:function(){return{telesalesSubmitURL:this.getCk("MerchSettings","telesalesSubmitURL"),telesalesName:this.getCk("MerchSettings","telesalesName")}},setCkTele:function(e){var t=this.getCkTele(),n="";null!==e&&e.length>0&&(null!==t&&t.length>0?(n=t,-1===t.indexOf(e)&&(n+="|"+e)):n=e),this.setCk("MerchSettings","telesales",n)},getCk:function(e,t){try{var n=$.cookie(e,{path:this.cookiePath}).match(/{([^}]*)}/g);if(null!==n&&n.length>0)for(var a=0;a<n.length;a++){var o=n[a];if(""!==o&&o.indexOf('"Key":"'+t+'"')>-1){var i=o.match(/"Value":"(.*)"/);if(null!==i&&2===i.length)return i[1]}}}catch(e){}return""},setCk:function(e,t,n){try{var a=$.cookie(e,{path:this.cookiePath});if(""!==t){var o=this.getCookieVal(a,t,n);a!==o&&($.cookie.raw=!0,$.cookie(e,o,{path:this.cookiePath,expires:this.cookieExp}))}}catch(e){}},getCookieVal:function(e,t,n){var a="",o=!1;if(null!==e&&e.length>0){var i=e.match(/{([^}]*)}/g);if(null!==i&&i.length>0)for(var r=0;r<i.length;r++){var s=i[r];""!==s&&((s+=",").indexOf('"Key":"'+t+'"')>-1&&(""===n?s="":-1===s.indexOf('"Value":"'+n+'"')&&(s='{"Key":"'+t+'","Value":"'+n+'"},'),o=!0),a+=s)}}return o||(""===a?a='{"Key":"'+t+'","Value":"'+n+'"}':""!==a&&(a+='{"Key":"'+t+'","Value":"'+n+'"}')),a.length>0&&(","===a.substring(a.length-1)&&(a=a.substring(0,a.length-1)),a.length>0&&(a="["+a+"]")),a},getUidCookieVal:function(){return $.cookie("MerchUid",{path:this.cookiePath})||""}},overlayer:function(e){var t=$("#merch-overlay");0===t.length&&(t=$("<div>").attr("id","merch-overlay").append($("<a>").attr("id","merch-overlay-close").html("X")).append($("<div>").attr("id","merch-overlay-content")));var n=t.find("#merch-overlay-content"),a=$("#merch-overlay-background"),o=void 0===e.background||e.background,i=void 0!==e.type?e.type:"html",r=void 0!==e.hidePadding;if(n.addClass("merch-overlay-content"),r&&t.css({padding:0}),o&&a.length<1&&((a=$("<div>")).attr("id","merch-overlay-background"),a.attr("class","merch-overlay-background"),$(document.body).append(a)),0===t.parent("body").length&&$(document.body).append(t),$("#merch-overlay-close").bind("click",c),a.bind("click",c),void 0!==e.className&&t.addClass(e.className),o&&a.show(),void 0!==e.content)if("iframe"==i){var s='<iframe src="'+e.content+'" frameborder="0" seamless="seamless" scrolling="auto" style="width:100%;height:100%;"><p>Your browser does not support iframes.</p></iframe>';n.html(s)}else n.html(e.content);function c(){t.hide(),a.hide(),t.attr("style","display: none;"),t.attr("class",""),n.html("")}t.show()},promotion:{init:function(e){e.on("click",this.show)},show:function(e){var t=$(this),n=$(t.find(".focus-box-template").html().trim()),a=n.find(".prom-feat-list__i").length>1,o=t.hasClass("js-promotion-v2")?"v2":"",i=document.querySelector("#global-theme-modifier");i&&i.dataset.focusBoxModifierClass&&(o=o+" "+i.dataset.focusBoxModifierClass),a&&(n.find(".prom-carousel").addClass("is-carousel"),n.find(".prom-feat-list").addClass("is-carousel")),t.attr("href")&&"#"!==t.attr("href")||e.preventDefault(),window.merchAllPages.focusBox.show({$html:n,classList:o}).done((function(){a&&(n.find(".prom-carousel__wrap").jcarousel({wrap:"both"}).data("jcarousel"),n.find(".prom-nav-list").jcarouselPagination({item:function(e){return'<li class="prom-nav-list__i"><button type="button" class="'+("1"===e?"is-active":"")+'">'+e+"</button></li>"}}).on("jcarouselpagination:active","li",(function(){$(this).find("button").addClass("is-active")})).on("jcarouselpagination:inactive","li",(function(){$(this).find("button").removeClass("is-active")})),n.find(".prom-carousel__scroll-btn--l").jcarouselControl({target:"-=1"}),n.find(".prom-carousel__scroll-btn--r").jcarouselControl({target:"+=1"}))}))}},outOfStock:{allowedCountries:["nl","uk"],allowedCountriesSearchOnly:["ch"],productLines:{consumer:["52","1D","1M","1N","2B","2G","2H","2N","2Q","4H","5M","6J","7T","9G","AU","DU","E4","G0","GC","GP","GU","GV","IF","KV","LU","M5","M6","M7","M8"],commercial:["30","64","65","3Y","4X","5U","5X","6A","6U","6X","7F","8A","8J","8N","8W","9C","9F","9H","9R","9T","AN","BO","BQ","C5","DG","E0","E5","FF","G7","GA","GJ","GK","GM","GR","GS","GT","I0","I1","IG","IK","IL","IS","K6","M0","MA","MP","PQ","TA","TB","UD","UK","UV"],commercialCH:["5U","7F","DG","GA","6U","8J","AN"]},countries:{nl:{phoneNum:{countryCode:"+31",consumer:"020 654 5214",commercial:"020 654 5215"}},uk:{phoneNum:{countryCode:"+44",consumer:"0207 660 3859",commercial:"0207 660 3858"}},ch:{phoneNum:{countryCode:"+41",commercial:"043 547 97 86"}}},init:function(){var e=this.allowedCountries,t=merchSFCountryCode;if(-1!==e.indexOf(t)&&"undefined"!=typeof merchPageType&&-1!==["offer","list","product"].indexOf(merchPageType)){var n=this.countries[t].phoneNum.countryCode,a=$(".out-of-stock-tel"),o=$(".pb-delivery__msg--oos-action");if("list"===merchPageType||"offer"===merchPageType)for(var i=o.closest(".product").map((function(){return $(this).attr("data-category")})).get().filter((function(e,t,n){return n.indexOf(e)===t})),r=0;r<i.length;r++){var s=$(".product[data-category="+i[r]+"]");if(l=this.getProductLineNum(i[r])){var c=l.replace(/\s+/g,"").substring(1);s.find(o).attr("href","tel:"+n+c),s.find(a).html(l)}}if("product"===merchPageType){var l,d=dataLayer[0].ecommerce.detail.products[0].category;if(l=this.getProductLineNum(d)){c=l.replace(/\s+/g,"").substring(1);o.attr("href","tel:"+n+c),a.html(l)}}}},getProductLineNum:function(e){var t=this.countries[merchSFCountryCode],n=this.productLines.consumer,a=this.productLines.commercial,o=t.phoneNum.consumer,i=t.phoneNum.commercial;return-1!==n.indexOf(e)&&o?o:this.showCommercialPL(a,e)||this.showOnlyCHCommercialPL(e)?i:null},showCommercialPL:function(e,t){var n=merchSFCountryCode;return-1!==e.indexOf(t)&&-1!==this.allowedCountries.indexOf(n)},showOnlyCHCommercialPL:function(e){var t=this.productLines.commercialCH;return"ch"===merchSFCountryCode&&-1!==t.indexOf(e)}},util:{url:{splitUrl:function(e){var t=e.split("?"),n=t[0],a=[];if(null==t||t.length<=1)return{url:e,parameters:a};for(var o=t[1].split("&"),i=0;i<o.length;i++){var r=o[i].split("=");2==r.length&&a.push({key:r[0],value:r[1]})}return{url:n,parameters:a}},concatUrl:function(e){var t="";if(null!=e.parameters)for(var n=0;n<e.parameters.length;n++){var a=e.parameters[n];t+=(0==n?"?":"&")+a.key+"="+a.value}return e.url+t},isInArray:function(e,t){if(null!==t)for(var n=0;n<t.length;n++){var a=t[n];if(a.key.toLowerCase()===e.key.toLowerCase()&&a.value.toLowerCase()===e.value.toLowerCase())return!0}return!1},removeDoubleParamsWithSameValues:function(e){var t=this;if(e=decodeURIComponent(e),null!==(e=t.splitUrl(e))&&null!==e.parameters){for(var n=[],a=0;a<e.parameters.length;a++){var o=e.parameters[a];t.isInArray(o,n)||n.push(o)}e.parameters=n}return t.concatUrl(e)}},getUrlParams:function(){var e={};return window.location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,(function(t,n,a){e[n]=a})),e},translate:function(e,t){var n,a;return window.merchSuppliesAutocompleteLabels&&window.merchSuppliesAutocompleteLabels[window.merchSFCountryCode]&&window.merchSuppliesAutocompleteLabels[window.merchSFCountryCode][window.merchSFLanguageCode]&&$.each(merchSuppliesAutocompleteLabels[window.merchSFCountryCode][window.merchSFLanguageCode],(function(o,i){"<"===t?(n=new RegExp(i,"g"),a=o):(n=new RegExp(o,"g"),a=i),e=e.replace(n,a)})),e},getSearchQuery:function(e){var t,n="q";return(e=e||{}).paramName&&(n=e.paramName),t=null===(t=new RegExp("[?&]"+n+"=([^&#]*)").exec(window.location.href))?"":t[1]},getMetaItemPropContent:function(e){var t="";return(e=e||{}).name&&(t=(e.wrap?e.wrap+" ":"")+"meta[itemProp="+e.name+"]"),t.length?$(t).attr("content"):""},getCurrencyCode:function(){var e={UK:"GBP",DE:"EUR",FR:"EUR",ES:"EUR",IT:"EUR",NL:"EUR",CH:"CHF",SE:"SEK",CA:"CAD"}[window.merchSFCountryCode.toUpperCase()];return e||"No matching code"},getStoreType:function(e){return $.inArray(e,["CG495","CG950","CG941","CG1927","CG1926","CG940","CG967","CG978","CG953","CG204"])>-1?"Public":"Private"},service:{user:{_dfd:null,get:function(e){var t=this;if(null!=e&&e&&(t._dfd=null),t._dfd)return t._dfd.promise();t._dfd=new $.Deferred;try{SERVICE.API_USER.getUser({},(function(e){t._dfd.resolve({state:"SUCCESS",response:e});var n="Business"===e.CustomerSegment&&e.IsAuthenticated;window.isExpressCheckout=shouldShowExpressCheckoutItems&&!n&&(isGermanyStore||isUKStore)}),(function(e){t._dfd.reject({state:"SERVICE_FAILED",response:e})}))}catch(e){t._dfd.reject({state:"SERVICE_MISSING"})}return t._dfd.promise()},getAddressMetaData:function(){var e=new $.Deferred;try{SERVICE.API_USER.getAddressMetaData({AddressType:"Shipping"},(function(t){e.resolve({state:"SUCCESS",response:t})}),(function(t){e.reject({state:"SERVICE_FAILED",response:t})}))}catch(t){e.reject({state:"SERVICE_MISSING"})}return e.promise()},customUserProfile:{helpers:{getSalutationKey:function(e,t){var n,a;for(n=0;n<t.length;n++)if((a=t[n]).Value===e)return a.Key;return"-1"},updateCustomUserProfileObject:function(e,t,n,a){var o,i,r=!1,s=!1;if(null==a){var c=[{Key:t,Value:n}];return[{Description:"",Name:e,Value:JSON.stringify(c)}]}for(o=0;o<a.length;o++)if(a[o].Name===e){var l;r=!0;try{l=JSON.parse(a[o].Value)}catch(e){l=[{Key:t,Value:n}],a[o].Value=JSON.stringify(l);break}if(null!=l&&"object"==typeof l){for(i=0;i<l.length;i++){var d=l[i];if(void 0!==d.Key&&null!==d.Key&&d.Key===t){d.Value=n,s=!0,a[o].Value=JSON.stringify(l);break}}if(s)break;a.push({Key:t,Value:n})}}if(!r){c=[{Key:t,Value:n}];a.push({Description:"",Name:e,Value:JSON.stringify(c)})}return a},getCustomUserProfileValue:function(e,t,n){var a,o;if(null==n)return null;for(a=0;a<n.length;a++)if(n[a].Name===e){var i;try{i=JSON.parse(n[a].Value)}catch(e){return null}for(o=0;o<i.length;o++){var r=i[o];if(void 0!==r.Key&&null!==r.Key&&r.Key===t)return r.Value}}return null}},vat:{get:function(e){var t=new $.Deferred;return merchAllPages.util.service.user.get(e).done((function(e){if("SUCCESS"===e.state&&null!==e.response.User&&null!=e.response.User.CustomUserProfile&&e.response.User.CustomUserProfile.length>0){var n=merchAllPages.util.service.user.customUserProfile.helpers.getCustomUserProfileValue("MerchSettings","vat",e.response.User.CustomUserProfile);t.resolve({state:"SUCCESS",vat:n,response:e})}else t.reject({state:"SERVICE_FAILED",response:e})})).fail((function(e){t.reject({state:"SERVICE_FAILED",response:e})})),t.promise()},set:function(e){var t=new $.Deferred,n=merchAllPages.util.service.user.get(),a=merchAllPages.util.service.user.getAddressMetaData();return $.when(n,a).done((function(n,a){if(void 0===n.response.User||null===n.response.User||void 0===n.response.User.FirstName||null===n.response.User.FirstName||void 0===n.response.User.LastName||null===n.response.User.LastName)t.reject({state:"SERVICE_FAILED",response:{user:n,userAddressMetaData:a}});else{var o={};o.FirstName=n.response.User.FirstName,o.LastName=n.response.User.LastName,o.SalutationKey=merchAllPages.util.service.user.customUserProfile.helpers.getSalutationKey(n.response.User.Salutation,a.response.Salutations),o.DoReturnUser=!0,o.SmbProfile=n.response.User.SmbProfile,o.CustomUserProfile=merchAllPages.util.service.user.customUserProfile.helpers.updateCustomUserProfileObject("MerchSettings","vat",e,n.response.User.CustomUserProfile);try{SERVICE.API_USER.updateUser(o,(function(e){null!==e.User&&null!=e.User.CustomUserProfile&&e.User.CustomUserProfile.length>0?t.resolve({state:"SUCCESS",response:e}):t.reject({state:"SERVICE_FAILED",response:e})}),(function(e){t.reject({state:"SERVICE_FAILED",response:e})}))}catch(e){t.reject({state:"SERVICE_MISSING"})}}})).fail((function(e,n){t.reject({state:"SERVICE_FAILED",response:{user:e,userAddressMetaData:n}})})),t.promise()}}}}},debounce:function(e,t){var n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout((function(){n=!1}),t))}}},vatSelect:{init:function(){var e=$(".js-s-h-vat-select"),t=window.merchAllPages.merchCookies.getCkVat(),n=this;t&&e.find(".s-h-vat-select__val").text(e.attr("data-"+t)),e.on("click.s-h",(function(e){e.preventDefault(),window.merchAllPages.focusBox.show({html:$("#js-s-h-vat-dialog-template").html(),classList:"focus-box--vat"})})),$(document.body).on("click.s-h",".js-s-h-vat-btn",(function(e){var t=$(this).attr("data-vat");t&&merchAllPages.util.service.user.customUserProfile.vat.set(t).always((function(){window.merchAllPages.merchCookies.setCkVat(t),window.merchAllPages.akamaiCCCookie.write({isAnonymous:window.s_eVar8.indexOf("anonymous")>-1}),n.reload({addTabName:!0})}))}))},reload:function(e){var t=window.location.href;if(void 0===e&&document.location.reload(),"object"==typeof e&&!0===e.addTabName){var n=$(".spadejsuitabsTitle.on .landing-tabs-title").text();if(""!==n){var a=merchAllPages.util.getUrlParams();if(t.indexOf("tabName")>-1&&""!==a.tabName){var o=a.tabName;t=t.replace("&tabName="+o,"&tabName="+n)}else t+="&tabName="+n}}window.location.href!==t?window.location.href=t:window.location.reload()}},waitForAcc:function(e,t,n,a){if("main"==a&&"popup"==mercCartTarget){var o=$("#product-overview-slideshow-thumbs").find(".thumb-1 img").attr("src"),i=$("#main-content-title").html(),r=$(".product-right-column .current-price nobr").html(),s=$(".add-to-cart-omni").html().split("|")[0],c=$("#merch-overlay-cart"),l=$("#merch-overlay-background"),d="";l.length<1&&((l=$("<div>")).attr("id","merch-overlay-background"),l.attr("class","merch-overlay-background"),$(document.body).append(l)),l.click((function(){c.hide(),$(this).hide()})),c.parent(".body-inner").length>0&&$(document.body).append(c),d=i.indexOf('flag-new="flag-new"')>0?i:i.slice(0,i.indexOf('<span class="flag-new">')),c.find(".button-accessory").click((function(e){e.preventDefault(),$("#accessories-tab").click(),$("html, body").animate({scrollTop:$("#content-left-column-tabs").offset().top},"slow"),c.hide(),l.hide()}));var u='<div class="my-media"><div class="my-image"><img src="'+o+'" alt="'+d+'" /></div><div class="my-description"><h5>'+i+'</h5><p class="price">'+c.find("#merch-price-text").text()+" <span>"+r+"</span></p><p>"+c.find("#merch-quantity-text").text()+" <span>"+s+"</span></p></div></div>";c.find(".cart-content").html(u),c.show(),l.show(),$("#merch-overlay-cart-close").click((function(){c.hide(),l.hide()}))}else window.OnAddToCartComplete=function(){merchAllPages.goToCart()}},smoothScroll:function(){"undefined"!=typeof merchPageType&&"offer"===merchPageType||$(document).on("click",".js-smooth-scroll",(function(e){if(""!==this.hash){e.preventDefault();var t=this.hash;$("html, body").animate({scrollTop:$(t).offset().top},800,(function(){window.location.hash=t}))}}))}};!function(e){var t={CA:"CAD",CH:"CHF",DE:"EUR",ES:"EUR",FR:"EUR",GB:"GBP",IT:"EUR",NL:"EUR",SE:"SEK"}[document.documentElement.dataset.cc],n={ADD_TO_CART:"add-to-cart-v1",LOGIN:"login-v1",SIGNUP:"signup-v1"};function a(a,o){if(e.DY){var i=function(a,o){var i=parseInt(o.quantity)||1,r=parseFloat(Number(o.price).toFixed(2));switch(a){case n.ADD_TO_CART:return{name:"Add to Cart",properties:{dyType:n.ADD_TO_CART,value:parseFloat((r*i).toFixed(2)),currency:t,productId:o.sku,quantity:i}};case n.LOGIN:return{name:"Login",properties:{dyType:n.LOGIN,hashedEmail:e.DYO.dyhash.sha256(o.email.toLowerCase())}};case n.SIGNUP:return{name:"Signup",properties:{dyType:n.SIGNUP,hashedEmail:e.DYO.dyhash.sha256(o.email.toLowerCase())}};default:return null}}(a,o);i&&e.DY.API("event",i)}}e.dataLayer&&e.dataLayer.push({event:"pb.onOptIn",callback:function(){e.DY&&e.DYO.ActiveConsent.updateConsentAcceptedStatus(!0)},type:2}),e.HPDY=Object.assign({},e.HPDY,{EVENT:n,triggerEvent:a,getAddToCart:function(t){return function(o){var i=o.sku||"",r=o.oid||"",s={Laptops:"NTB",Desktops:"DTP",Workstations:"WKS",Printers:"PRN",Monitors:"MTO",Supplies:"SUP",Accessories:"ACC",Scanners:"SCN",Default:"DEF","Care Packs":"CPK"}[o.category]||"",c=e.s_eVar45&&e.s_eVar45.split(":")[1]||"",l=o.name||"",d=o.imageUrl||"",u=o.price||0;a(n.ADD_TO_CART,{sku:i,quantity:1,price:u}),"function"==typeof t?t({sku:i,oid:r,selector:s,catalog:c,name:l,image:d,price:{regularPrice:u}}):e.mAddToCart(i,d,l,1,r,s)}}})}(window),function(e,t,n){function a(e){var n="data-cookie-consent-script",a="data-cookie-consent-loaded";t('[data-cookie-consent-index="'+e+'"]['+n+"]:not(["+a+"])").each((function(e,o){var i=t(o),r=i.attr(n);i.attr(a,"true"),t.cachedScript(r)}))}function o(t){e.MERCH_COOKIE_CONSENT_CALLBACKS&&Array.isArray(e.MERCH_COOKIE_CONSENT_CALLBACKS)&&e.MERCH_COOKIE_CONSENT_CALLBACKS.filter((function(e){return e.index===t&&!e.isLoaded})).forEach((function(e){e.isLoaded=!0,e.cb()}))}function i(e){e&&e.split("").map((function(e,t){return"1"!==e?null:(n=t,function(e){e(n)});var n})).filter((function(e){return!!e})).forEach((function(e){e(a),e(o)}))}n.loadIfCookieConsent=function(){var t=/hpeuck_prefs=(.+?);/.exec(e.document.cookie);t&&t.length&&t[1]&&i(t[1]),e.cookieConsentPromise&&e.cookieConsentPromise.done(i).then((function(){e.dataLayer&&e.dataLayer.push({event:"cookieBannerSaved"})}))}}(window,$,window.merchComp=window.merchComp||{}),function(e,t){t.redirectWithClearCache=function(t){e.SERVICE&&e.SERVICE.clearCache(),e.location.href=t}}(window,window.merchComp=window.merchComp||{}),function(e,t){t.linkWithClearCache=function(t){if(t&&t.length&&e.SERVICE){var n=e.SERVICE.clearCache.bind(this);$(t).contextmenu(n),$(e.document).on("click",t,n)}}}(window,window.merchComp=window.merchComp||{}),function(e,t,n){var a={dhm:"D:H:M",hms:"H:M:S"},o=t(".js-bf-pre-event"),i=t(".js-bf-main-event"),r=t(".js-bf-extended-event");function s(e,t,n){e.removeClass("is-visible").addClass("is-hidden"),t.removeClass("is-hidden").addClass("is-visible"),n&&n.removeClass("is-visible").addClass("is-hidden")}function c(e,t,n,a){var o=a.mainEvent,i=a.extendedEvent;o&&t.length?s(e,t):i&&n.length&&s(t,n,e)}function l(n){var a,o=e.dataLayer[0]&&e.dataLayer[0].catalogID,i=n.default,r=n.private||[];var s=((a=o,t.inArray(a,["CG950","CG1927","CG1926","CG940","CG967","CG978","CG953","CG941"])>-1)?i:r).filter((function(t){if(e.merchComp.isBannerTimeValid(t)&&(!(n=t.showOnSelectors)||!n.length||n.includes(e.merchDataSel.toLowerCase())))return t;var n}))[0]||!1,c=s&&s.showOnCatalogs,l=!0;return c&&c.length&&c.indexOf(o)<0&&(l=!1),l&&s}function d(e,t,n){e.removeClass("is-visible").addClass("is-hidden"),t.removeClass("is-visible").addClass("is-hidden"),n.removeClass("is-visible").addClass("is-hidden")}function u(n,s,m,h){var p=n.find("[data-cyberweek-countdown-banner-digit]"),f=n.find("[data-cyberweek-countdown-banner-label]"),C=n.find(t(".cyberweek-countdown-banner__title")),g=n.find(t(".cyberweek-countdown-banner__button")),w=n.find(t(".cyberweek-countdown-banner__description")),v=s.overrideCtaLabel,S=s.overrideCtaLink,y=s.overrideTitle,b=s.overrideContentCatalogs,_=e.dataLayer[0].catalogID,A=b&&b.indexOf(_)>-1,P=s.ctaLabel,E=s.ctaLink,k=s.overrideGaLabel;C.text(s.title),w.text(s.description),P&&g.text(P),E&&g.attr("href",E),A&&(y&&C.text(y),v&&g.text(v),S&&g.attr("href",S)),k&&k.length&&g.attr("onclick",'merchAllPages.gaEv("UI-Navigation", "Promo-Banner", "'+k+'");');var x=[],I=[];s.format===a.dhm?(x.push("%D","%H","%M"),I.push(n.data("days"),n.data("hours"),n.data("minutes"))):(x.push("%I","%M","%S"),I.push(n.data("hours"),n.data("minutes"),n.data("seconds"))),f.each((function(e,n){t(n).text(I[e])}));var T=[];h&&(n.countdown(new Date(s.endDatetime)),n.countdown("start")),s&&(n.countdown(new Date(s.endDatetime)).on("update.countdown",(function(e){p.each((function(n,a){var o;if("%I"===x[n])o=e.offset.hours+24*e.offset.totalDays;else o=e.strftime(x[n]);T[n]!==o&&(t(a).text(o),T[n]=o)}))})).on("finish.countdown",(function(){s.isLastBanner?(n.removeClass("is-visible"),n.addClass("is-hidden"),n.find(t(".cyberweek-countdown-banner__container")).addClass("is-hidden"),d(o,i,r)):function(e,n){var a=e.find(t(".cyberweek-countdown-banner__container")),s=e.find(t(".cyberweek-countdown-banner__counter"));setTimeout((function(){var t=l(n);t.countdown&&s.hasClass("is-hidden")&&(s.removeClass("is-hidden"),a.removeClass("noCountdown")),t?(a.removeClass("is-hidden"),u(e,t,n,!0),c(o,i,r,t)):(e.removeClass("is-visible"),e.addClass("is-hidden"),a.addClass("is-hidden"))}),1001)}(n,m)})),n.find(".cyberweek-countdown-banner__wrapper").addClass("is-visible"))}n.cyberweekCountdownBanner=function(n,a){if(n&&n.length&&a&&a.default&&e.dataLayer&&e.dataLayer.length&&e.dataLayer[0].catalogID){var s=l(a);if(!(s&&s.showOnPages&&s.startDatetime&&s.endDatetime&&s.title&&s.format))return n.addClass("is-hidden"),void d(o,i,r);if(-1!==s.showOnPages.indexOf(e.pageName)&&e.merchComp.isBannerTimeValid(s)){s.countdown||s.hasDescription||(n.find(".cyberweek-countdown-banner__counter").addClass("is-hidden"),n.find(".cyberweek-countdown-banner__container").addClass("noCountdown"),n.addClass("noCountdown")),s.hasDescription&&n.addClass("has-description"),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e});var m=n.find(".cyberweek-countdown-banner__button");if(m)e.location.href.toLowerCase()===(s.ctaLink||m.attr("href")).toLowerCase()&&m.addClass("is-hidden");c(o,i,r,s),t.countdown?u(n,s,a,!1):t.cachedScript(pathto+"shop/Html/"+jsdir+"/js/libs/jquery.countdown.min.js").done((function(){u(n,s,a,!1)}))}}}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.showVatBanner=function(n){var a=t(".vat-banner");if(a&&a.length&&n&&e.dataLayer&&e.dataLayer.length&&e.dataLayer[0].catalogID){var o=n.showOnCatalogs.indexOf(e.dataLayer[0].catalogID)>-1;e.merchComp.isBannerTimeValid(n)&&o?a.show():a.hide()}}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.showAutumnSalesBanner=function(t,n){if(n&&n.length&&t&&e.dataLayer&&e.dataLayer.length&&e.dataLayer[0].catalogID){var a=isHomePage||isPLPPage||isProductPage||isOfferPage||isFAQPage||isInkTonerPage||isAccessoryFinderPage,o=e.dataLayer[0].catalogID;["CG939","CG1106"].indexOf(o)>-1&&n.find(".js-banner-cta").attr("href","https://www.hp.com/fr-fr/shop/offer.aspx?p=b-automne-entrepreneurs-privatif"),e.merchComp.isBannerTimeValid(t)&&a?n.show():n.hide()}}}(window,$,window.merchComp=window.merchComp||{}),(window.merchComp=window.merchComp||{}).isValidDate=function(e){return e instanceof Date&&!isNaN(e)},function(e){e.isBannerTimeValid=function(t){var n=Date.now(),a=new Date(t.startDatetime||t.CountDownStart),o=new Date(t.endDatetime||t.CountDownEnd);return!(!e.isValidDate(a)||!e.isValidDate(o))&&(!(n-a.getTime()<0)&&!(n-o.getTime()>0))}}(window.merchComp=window.merchComp||{}),function(e,t){t.countdown=function(n,a){var o=new Date(n);if(t.isValidDate(o)&&"function"==typeof a)var i=o.getTime(),r=e.setInterval((function(){var t=Date.now(),n=i-t,o=n<0,s=Math.floor(n/864e5),c=Math.floor(n%864e5/36e5),l=Math.floor(n%36e5/6e4),d=Math.floor(n%6e4/1e3);a({isExpired:o,days:o?0:s,hours:o?0:c,minutes:o?0:l,seconds:o?0:d}),o&&e.clearInterval(r)}),1e3)}}(window,window.merchComp=window.merchComp||{}),function(e,t,n){var a={banner:".js-hb",title:".js-hb-title",description:".js-hb-description",link:".js-hb-link",cta:".js-hb-cta",countdownTime:".js-hb-countdown-time",countdownDigits:".js-hb-countdown-digits",countdownLabel:".js-hb-countdown-label"},o={default:"default",slim:"slim",countdown:"countdown"},i={dhm:"D:H:M",hms:"H:M:S"},r=Object.values(i);function s(e){return e.CountDownTimer&&e.BannerType===o.default}function c(e,o){if(s(o)){var c=e.find(a.countdownTime),l=r.indexOf(o.CountDownFormat)>-1?o.CountDownFormat:i.dhm,d=l===i.dhm?[o.DaysText,o.HoursText,o.MinutesText]:[o.HoursText,o.MinutesText,o.SecondsText],u=function(e){return e.map((function(e){return e>=10?String(e):String(e).padStart(2,"0")}))};c.each((function(e){t(this).find(a.countdownLabel).text(d[e])})),n.countdown(o.CountDownEnd,(function(n){if(n.isExpired)e.get(0).style.setProperty("display","none");else{var o,r,s,d,m,h=(r=(o=n).days,s=o.hours,d=o.minutes,m=o.seconds,l===i.dhm?u([r,s,d]):u([24*r+s,d,m]));c.each((function(e){t(this).find(a.countdownDigits).text(h[e])}))}}))}}n.showHighlightBanner=function(i){var r=t(a.banner);r&&r.length&&i&&!function(e){return e.CountDownTimer&&!n.isBannerTimeValid(e)}(i)&&(function(t,n){var o=t.find(a.title),i=t.find(a.description),r=t.find(a.link),s=t.find(a.cta),c=!(!n.CtaText||!n.CtaUrl),l=function(){var t=e.innerWidth>=768,a=o.text(),r=i.text(),s=t?n.Title:n.MobileTitle,c=t?n.Description:n.MobileDescription;a!==s&&o.text(s),r!==c&&i.text(c||"")};c&&(s.text(n.CtaText),r.attr("href",n.CtaUrl||"/"),r.attr("target",n.Target||"_blank"),r.attr("data-ga-promo-id",n.TrackingId),r.attr("data-ga-promo-name","Navigation"),r.attr("data-ga-promo-creative","HighlightBanner"),r.attr("data-ga-promo-position","Top"),r.on("click",(function(){e.merchAllPages.gaEv("UI-Navigation","Promo-Banner",n.TrackingId)}))),l(),e.addEventListener("resize",(function(){e.requestAnimationFrame(l)}))}(r,i),c(r,i),function(e,t){var n=t.BannerType,a=t.TextColor,i=t.BackgroundColor,r=e.get(0).style,c=!(!t.CtaText||!t.CtaUrl);s(t)?e.addClass("highlight-banner--"+o.countdown):n!==o.default&&e.addClass("highlight-banner--"+n),c||e.addClass("highlight-banner--no-cta"),a&&r.setProperty("--hb-text-color",a),i&&r.setProperty("--hb-background-color",i),r.removeProperty("display")}(r,i))}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(){return e.getHpPath(!0)}function o(){return e.merchJSV}n.prefetch={fetch:function(t){t&&t.length&&e.quicklink&&e.quicklink({urls:t})},storeRoot:a,staticVersion:o,joinRelativePathToAbsoluteWithVersion:function(e){return a()+e+o()}}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(){var e=["shop/Html/headermenus/js/app.page.search.js?ver=","shop/html/headermenus/css/sm15-search.css?merchSv="].map(n.prefetch.joinRelativePathToAbsoluteWithVersion);n.prefetch.fetch(e)}n.prefetchSearch=function(){t(".js-s-h-search-btn").on("click",a)}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(){var e=t(this).attr("href");if(e){var a=["shop/Html/headermenus/js/app.page.productList.all.js?ver=","shop/html/headermenus/css/sm15-list.css?merchSv="].map(n.prefetch.joinRelativePathToAbsoluteWithVersion);a.push(e),n.prefetch.fetch(a)}}n.prefetchHeader=function(){t('.s-h-nav-item__link[href*="list.aspx"], .s-h-link[href*="list.aspx"]').on("hover",a)}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.prefetchCart=function(){var e=["shop/Cart/","shop/Html/headermenus/js/libs/angular.min.1.5.8.js","shop/Html/headermenus/js/libs/angular-route.min.js","shop/Html/headermenus/js/libs/angular-sanitize.min.js"].map((function(e){return n.prefetch.storeRoot()+e})).concat(["shop/Html/headermenus/css/sm15-checkout.css?ver=","shop/Html/Cart/js/app.js?ver=","shop/Html/Cart/js/services.js?ver=","shop/Html/Cart/js/components.js?ver=","shop/Html/Cart/js/validation.js?ver="].map(n.prefetch.joinRelativePathToAbsoluteWithVersion));n.prefetch.fetch(e)}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.removeAccountLinks=function(){var n=e.location.href.toLowerCase();-1!==n.indexOf("register.aspx")&&(t(".js-megamenu-log-in-btn").remove(),-1!==n.indexOf("tab=register")&&t(".js-megamenu-create-acc").remove())}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.updateReturnUrl=function(){return t("[data-update-returnurl]").on("click",(function(n){var a=t(this).attr("href");if(a){n.preventDefault();var o=a.replace(/(returnurl=)[^&#]+/,"$1"+encodeURIComponent(e.location.href));e.location.href=o}})),this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.overwriteUppercasePathname=function(){var t=e.location,n=t.pathname;if(n.split("").find((function(e){return/^[A-Z]*$/.test(e)}))){var a=t.href.replace(n,n.toLowerCase());history.replaceState(null,"",a)}}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.removeLangParam=function(){var t=e.location.href,n=e.location.search,a=n.replace("?","").split("&").filter((function(e){return/^(?!lang=)/.test(e)})).join("&");if(a&&(a="?"+a),a!==n){var o=t.replace(n,a);e.history.replaceState(null,"",o)}}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){"use strict";function a(e,t,n){this.validateCountry(t)&&this.validatePL(n)&&this.hide(e)}a.prototype={constructor:a,hide:function(e){e.hide()},validateCountry:function(e){if(merchSFCountryCode)return e.indexOf(merchSFCountryCode)>-1},validatePL:function(e){var t=dataLayer[0].ecommerce.detail.products[0].category;return e.indexOf(t)>-1}},n.HideElementBasedOnPLAndCountry=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(){return this.trackImpressions(),t(document).on("click","[data-ga-promo-id]",this.onClick.bind(this)),this}a.prototype={constructor:a,promoToData:function(e){var n=t(e);return{id:n.attr("data-ga-promo-id"),name:n.attr("data-ga-promo-name"),creative:n.attr("data-ga-promo-creative"),position:n.attr("data-ga-promo-position")||n.attr("data-promo-position")}},trackImpressions:function(){var n=t("[data-ga-promo-id]");if(n.length){var a=n.map(function(e,t){return this.promoToData(t)}.bind(this)).get();e.merchComp.GaData.ecommerce.promoView={promotions:a},e.dataLayer.push(e.merchComp.GaData)}},trackClick:function(e,t){e&&dataLayer.push({event:"promotionClick",ecommerce:{promoClick:{promotions:[e]}},eventCallback:t||null})},onClick:function(n){var a=t(n.target);a.attr("[data-ga-promo-id]")||(a=a.closest("[data-ga-promo-id]"));var o=a.attr("href"),i="_blank"===a.attr("target"),r=this.promoToData(a.get(0));if(i?this.trackClick(r):(n.preventDefault(),this.trackClick(r,(function(){o&&o.length&&(e.location=o)}))),e.location.href.toLowerCase().indexOf("list.aspx")>-1&&a.hasClass("product-banner--style-1")){var s=r.id;e.merchAllPages.gaEv("ui-plp","promotions",s)}}},n.PromotionTracker=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(){var n,a=e.location.href.toLowerCase(),o=null!==t.cookie("merchUserType")?t.cookie("merchUserType").split("|"):["home","1","1"];if(-1!=e.location.href.search(/seg=b/i)?o=["business","1","1"]:-1!=e.location.href.search(/seg=c/i)&&(o=["home","1","1"]),"business"===o[0]?"business":"home",e.merchAllPages.util.service.user.get().done((function(n){var a=n.response.User&&n.response.User.UserName,o=e.merchAllPages.util.getUrlParams().merchw;if(a&&o){var i=e.location.href.replace(/[?&]merchw=[^&#]*(#.*)?$/,"$1").replace(/([?&])merchw=[^&]*&/,"$1");e.history.replaceState(null,"",i),"login"===o?e.HPDY.triggerEvent(e.HPDY.EVENT.LOGIN,{email:a}):e.HPDY.triggerEvent(e.HPDY.EVENT.SIGNUP,{email:a})}if(n.response.IsAuthenticated){var r,s,c,l,d,u,m=n.response.User.FirstName+" "+n.response.User.LastName;r=t(".js-meganav-account-btn"),s=t(".js-megamenu-logged-out"),c=t(".js-megamenu-logged-in"),l=t(".js-meganav-reset-password"),d=t(".js-meganav-username"),u=t(".js-megamenu-log-out-btn"),r.attr("href",r.attr("data-account-href")),d.text(m),"true"===e.merchAllPages.merchCookies.getCk("MerchSettings","isSocialLogin").toLowerCase()&&l.addClass("u-is-hidden"),c.removeClass("u-is-hidden"),s.addClass("u-is-hidden")}else n.response.IsRemembered&&(c.removeClass("u-is-hidden"),s.addClass("u-is-hidden"),u.addClass("u-is-hidden"))})).fail((function(e){})),e.s_eVar45&&((s_eVar45.indexOf("SCESG21887")>-1||s_eVar45.indexOf("SG998")>-1||s_eVar45.indexOf("SCESG21978")>-1||s_eVar45.indexOf("SCESG22740")>-1||s_eVar45.indexOf("CG1817")>-1||s_eVar45.indexOf("CG1816")>-1)&&"business",(s_eVar45.indexOf("CG947")>-1||s_eVar45.indexOf("CG951")>-1||s_eVar45.indexOf("CG954")>-1||s_eVar45.indexOf("CG1496")>-1||s_eVar45.indexOf("CG1932")>-1||s_eVar45.indexOf("SCESG20896")>-1||s_eVar45.indexOf("SCESG20897")>-1||s_eVar45.indexOf("SCESG20898")>-1||s_eVar45.indexOf("SCESG20899")>-1||s_eVar45.indexOf("SCESG23182")>-1||s_eVar45.indexOf("CG2006")>-1||s_eVar45.indexOf("CG2052")>-1||s_eVar45.indexOf("CG2053")>-1||s_eVar45.indexOf("CG2074")>-1||s_eVar45.indexOf("SCESG23173")>-1||s_eVar45.indexOf("SCESG23205")>-1)&&"home",(s_eVar45.indexOf("SCESG23196")>-1||s_eVar45.indexOf("CG1816")>-1||s_eVar45.indexOf("CG1813")>-1||s_eVar45.indexOf("SCESG22588")>-1||s_eVar45.indexOf("SCESG22661")>-1||s_eVar45.indexOf("SCESG21678")>-1||s_eVar45.indexOf("SCESG23270")>-1||s_eVar45.indexOf("SCESG23271")>-1||s_eVar45.indexOf("CG1497")>-1||s_eVar45.indexOf("CG1817")>-1)&&"business",s_eVar45.indexOf("CG1759")>-1&&"business",(s_eVar45.indexOf("CG965")>-1||s_eVar45.indexOf("CG1617")>-1)&&null!==t.cookie("merchUserType")&&"business"),a.indexOf(".aspx")>-3){var i;try{i=a.slice(a.lastIndexOf("/")+1,a.lastIndexOf(".aspx")+5)}catch(e){}i&&(/list.aspx/i.test(i)||/product.aspx/i.test(i))?/sel=NTB/i.test(a)?("home",n="laptops"):/sel=DTP/i.test(a)?("home",n="desktops"):/sel=ACC/i.test(a)?("home",n="accessories"):/sel=PRN/i.test(a)?("home",n="printers"):/sel=MTO/i.test(a)?("home",n="monitors"):/sel=TBL/i.test(a)&&("home",n="tablets"):/ink-toner-paper.aspx/i.test(i)?n="inks":/offer.aspx/i.test(i)&&(n="offers")}return!e.merchUserTypeOverride||"home"!==e.merchUserTypeOverride&&"business"!==e.merchUserTypeOverride||e.merchUserTypeOverride,this.set("",n,o[1],o[2]),this}a.prototype={constructor:a,set:function(n,a,o,i){e.merchUserTypeVal=n,e.merchUserWelcome=void 0!==o?o:"1",e.merchSpecialVouchers=void 0!==i?i:"1",e.s_channel=e.merchSFCountryCode+":iscs|store:"+n,a&&a.length&&(e.s_channel=e.merchSFCountryCode+":iscs|store:"+n+":"+a),t.cookie("merchUserType",e.merchUserTypeVal+"|"+e.merchUserWelcome+"|"+e.merchSpecialVouchers,{path:"/"})}},n.User=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(e,n,a){var o,i,r;return"undefined"!=typeof merchGeneralPhoneConsumer&&(o=this.getPhoneData(merchGeneralPhoneConsumer,"phoneConsumer",e,a,n)),o&&"hide"!==o&&this.show(t(".js-merch-def-tel"),o),"undefined"!=typeof merchGeneralPhoneBusiness&&(i=this.getPhoneData(merchGeneralPhoneBusiness,"phoneBusiness",e,a,n)),i&&"hide"!==i&&this.show(t(".js-merch-smb-tel"),i),"undefined"!=typeof merchGeneralPhonePrice&&(r=this.getPhoneData(merchGeneralPhonePrice,"phonePrice",e,a,n)),this.price(t(".js-merch-def-tel-price"),r),this}a.prototype={constructor:a,getPhoneData:function(e,t,n,a,o){var i;if(e){if(i=e[t],!n||!e.catalogs||!e.catalogs[n])return i;var r=e.catalogs[n];return r[t]&&(i=r[t]),a&&r.communities&&r.communities[a]&&(i=r.communities[a]),o&&r.segments&&r.segments[o]&&(i=r.segments[o]),i}},show:function(e,n){e.each((function(){var e=t(this),a=e.is("a")?e:e.closest("a");e.text(n),a.length&&a.attr("href","tel:"+n.replace(/ /g,"")),e.closest(".s-f-badge.is-hidden").removeClass("is-hidden")}))},price:function(e,n){n&&e.each((function(){t(this).text(n)}))}},n.Phone=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.ToTop=function(){return t(".js-s-f-back-to-top").on("click.s-h",(function(e){e.preventDefault(),e.stopPropagation(),t("html, body").animate({scrollTop:"0px"})})),this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(){var e=t(".js-s-f-sticky, .js-s-f-sticky--simplified");return e.length&&(this.$sticky=e),this}a.prototype={constructor:a,load:function(){var n=this.$sticky,a=t(e),o=n.offset().top;n&&n.length&&(this.reset(),a.on("scroll.s-f",(function(){n.hasClass("is-sticky")||(o=n.offset().top),o+n.outerHeight()<a.scrollTop()+a.height()?n.removeClass("is-sticky"):n.addClass("is-sticky")})).scroll())},reset:function(){var n=this.$sticky,a=t(e);n&&n.length&&(a.off("scroll.s-f"),n.removeClass("is-sticky"))}},n.Sticky=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(){return this}a.prototype={isTouch:function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}},n.deviceDetection=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.tabletHover=function(n){t(n+"--drop "+n+"__link").on("click",(function(a){if(t(e).width()>992){a.preventDefault();var o=t(this),i=o.closest(n+"--drop"),r=o.attr("href");i.hasClass("is-open")?e.location.href=r:(t(n+".is-open").removeClass("is-open"),i.addClass("is-open"))}})),t(document).on("click",(function(e){t(e.target).closest(n).length||t(n+".is-open").removeClass("is-open")}))}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.LangSelector=function(){var n=t(".js-s-h-lang-btn");return n.each((function(){var n=t(this);n.attr("data-ll")===e.merchSFLanguageCode&&n.addClass("is-active")})),n.on("click.s-h",(function(n){const a=e.location.protocol,o=e.location.host,i=e.location.pathname,r=e.location.search,s=e.location.hash,c=t(this).attr("data-ll"),l=t(this).attr("data-cc"),d=i.split("/").slice(-1)[0];let u="";n.preventDefault(),l&&c&&l.length>0&&c.length>0&&(u=l.toLowerCase()+"-"+c.toLowerCase()),u.length>0&&(e.merchAllPages.akamaiCCCookie.write({isAnonymous:e.s_eVar8.indexOf("anonymous")>-1}),e.location=a+"//"+o+"/"+u+"/shop/"+d+r+s)})),this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(e,t){if(this.PROPS={CURRENT:0,MIN:0,MAX:0,CLICK_STEP:200,HOVER_STEP:2,HOVER_INTERVAL:16,SELECTOR:".js-scroll-list"},this.$wrap=e,this.$mask=this.$wrap.children(this.PROPS.SELECTOR+"__mask"),this.$left=this.$wrap.children(this.PROPS.SELECTOR+"__btn--left"),this.$right=this.$wrap.children(this.PROPS.SELECTOR+"__btn--right"),this.$list=this.$mask.children(this.PROPS.SELECTOR+"__list"),this.options=t||{},this.$wrap[0]&&this.$mask[0]&&this.$left[0]&&this.$right[0]&&this.$list[0])return this.options.notRelative&&(this.$left.addClass("not-relative"),this.$right.addClass("not-relative"),this.positionRightBtn()),this.init(),this.check(),this;console.log("Invalid scroll-list structure")}a.prototype={constructor:a,init:function(){var e,t=this;this.$right.addClass("is-visible"),this.$left.on("click",(function(){t.PROPS.CURRENT-=t.PROPS.CLICK_STEP,t.PROPS.CURRENT<t.PROPS.MIN&&(t.PROPS.CURRENT=t.PROPS.MIN),clearInterval(e),t.clickAnimate()})),this.$right.on("click",(function(){t.PROPS.CURRENT+=t.PROPS.CLICK_STEP,t.PROPS.CURRENT>t.PROPS.MAX&&(t.PROPS.CURRENT=t.PROPS.MAX),clearInterval(e),t.clickAnimate()})),this.$left.on("mouseenter",(function(){e=setInterval((function(){t.PROPS.CURRENT-=t.PROPS.HOVER_STEP,t.PROPS.CURRENT<t.PROPS.MIN&&(t.PROPS.CURRENT=t.PROPS.MIN),t.hoverAnimate()}),t.PROPS.HOVER_INTERVAL)})),this.$left.on("mouseleave",(function(){clearInterval(e)})),this.$right.on("mouseenter",(function(){e=setInterval((function(){t.PROPS.CURRENT+=t.PROPS.HOVER_STEP,t.PROPS.CURRENT>t.PROPS.MAX&&(t.PROPS.CURRENT=t.PROPS.MAX),t.hoverAnimate()}),t.PROPS.HOVER_INTERVAL)})),this.$right.on("mouseleave",(function(){clearInterval(e)}))},render:function(){this.PROPS.CURRENT===this.PROPS.MIN&&this.$left.removeClass("is-visible"),this.PROPS.CURRENT===this.PROPS.MAX&&this.$right.removeClass("is-visible"),this.PROPS.CURRENT<this.PROPS.MAX&&this.$right.addClass("is-visible"),this.PROPS.CURRENT>this.PROPS.MIN&&this.$left.addClass("is-visible")},check:function(){this.$mask.width()<this.$list.width()?this.PROPS.MAX=this.$list.width()-this.$mask.width():this.PROPS.MAX=0,this.render()},hoverAnimate:function(){this.$list.css("margin-left","-"+this.PROPS.CURRENT+"px"),this.render()},clickAnimate:function(){this.$list.animate({"margin-left":"-"+this.PROPS.CURRENT+"px"},{queue:!1}),this.render()},positionRightBtn:function(){var e;e=this.$mask.offset().left+this.$mask.width(),this.$right.css("left",e+"px")}},n.ScrollList=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.StoreName=function(e,n,a){var o="";"undefined"!=typeof merchGeneralStoreName&&null!==merchGeneralStoreName&&""!==merchGeneralStoreName&&(merchGeneralStoreName.isStoreName?(o=merchGeneralStoreName.storeName,!merchGeneralStoreName.hasOwnProperty("catalogs")||""===e&&""===a&&""===n||merchGeneralStoreName.catalogs[e]&&(null!==merchGeneralStoreName.catalogs[e].storeName&&(o=merchGeneralStoreName.catalogs[e].storeName),merchGeneralStoreName.catalogs[e].segments&&merchGeneralStoreName.catalogs[e].segments[n]&&(o=merchGeneralStoreName.catalogs[e].segments[n]),merchGeneralStoreName.catalogs[e].communities&&merchGeneralStoreName.catalogs[e].communities[a]&&(o=merchGeneralStoreName.catalogs[e].communities[a]))):o="",t("#s-h .js-s-h-store-name").text(o),t(".js-meganav-store-type").text(o))}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.SiteSwitch=function(){return t(".js-s-f-site-switch-btn").on("click.s-f",(function(n){var a=t(this).attr("data-browser"),o=e.location.host,i=o.match(/\w*\.\w*$/);a&&(t.cookie("cae_browser",a,{path:"/",domain:i?i[0]:o}),e.location.reload()),n.preventDefault()})),this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){var a=t(e),o=t("body"),i=t(".js-s-h-nav-btn"),r=t(".js-scroll-list__mask");function s(){return i.on("click.s-h",function(){i.hasClass("is-open")?this.close():this.open()}.bind(this)),this}s.prototype={constructor:s,position:function(){setTimeout((function(){var e=r.offset().top;r.css("height",a.height()-e)}),1)},open:function(){this.position(),i.addClass("is-open"),o.addClass("is-scroll-lock"),r.addClass("is-open")},close:function(){i.removeClass("is-open"),r.removeClass("is-open"),o.removeClass("is-scroll-lock")}},n.Menu=s}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.SubMenu=function(){return t(".js-scroll-list__list .s-h-nav-item").each((function(){var n=t(this),a=n.find(".s-h-nav-item__drop");if(a.length){var o=n.find(".s-h-nav-item__link");o.on("click",(function(n){t(e).width()<=992&&(t(e).width()<768&&(n.preventDefault(),o.toggleClass("is-active"),a.toggleClass("is-open")),n.preventDefault())}))}})),this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(n,a){if(n&&n.length){var o=n.find(".js-s-h-search-btn--mobile"),i=n.find(".js-s-h-close-btn"),r=n.find(".s-h-search__input"),s=this;return this.$searchInput=r,this.$searchBtn=a,a.on("click.s-h",(function(o){t(e).width()<=992?(o.preventDefault(),n.hasClass("is-visible")?r.val().length?(s.gaEvTracking(),s.submit()):s.hide():(a.addClass("is-active"),s.show(),r.focus())):(n.hasClass("is-visible")?r.val().length?(s.gaEvTracking(),s.submit()):r.focus():(a.addClass("is-active"),s.show(),r.focus()),o.preventDefault())})),o.on("click.s-h",(function(e){e.preventDefault(),r.val().length?(s.gaEvTracking(),s.submit()):r.focus()})),i.on("click.s-h",(function(e){a.removeClass("is-active"),s.hide()})),r.on("keypress.s-h",(function(e){if(13===e.keyCode)r.val().length&&(s.gaEvTracking(),s.submit())})),t(document).on("click",(function(n){if(t(e).width()>=992){var a=t(n.target);a.closest(".js-s-h-search-btn").length||a.closest(".autocomplete-suggestions").length||a.closest(".js-s-h-search").length||s.hide()}})),this}}a.prototype={constructor:a,submit:function(){var t=this.$searchInput.val().replace(/'/g,"‘");t.length&&(e.location=this.$searchBtn.attr("href")+"?q="+encodeURIComponent(t))},show:function(){var e=t(".js-s-h-search");t(".js-scroll-list").addClass("is-hidden"),e.addClass("is-visible")},hide:function(){var e=t(".js-s-h-search"),n=t(".js-scroll-list"),a=t(".js-s-h-search-btn");e.removeClass("is-visible"),n.removeClass("is-hidden"),a.removeClass("is-active")},gaEvTracking:function(){var t=this.$searchInput.val();if(t.length){var n={category:"UI-Navigation",action:"L1-Search",label:t};e.merchAllPages.gaEv&&e.merchAllPages.gaEv(n.category,n.action,n.label)}}},n.Search=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.StockAccel=function(t){var n,a,o,i=t.attr("data-stock"),r=t.attr("data-stock-left"),s=t.attr("data-turbo");if("1"!==t.attr("data-is-on"))return t.addClass("is-hidden"),void t.find(".pb-stock-accel__msg").text(MERCH_STOCK_ACCEL_CONFIG.LEVEL_5.MSG);if(s&&"0"!==s)a=parseInt(s,10);else if((n=100*r/i)>=MERCH_STOCK_ACCEL_CONFIG.LEVEL_1.START_PC)a=1;else if(n>=MERCH_STOCK_ACCEL_CONFIG.LEVEL_2.START_PC)a=2;else if(n>=MERCH_STOCK_ACCEL_CONFIG.LEVEL_3.START_PC)a=3;else if(n>=MERCH_STOCK_ACCEL_CONFIG.LEVEL_4.START_PC)a=4;else if(n>MERCH_STOCK_ACCEL_CONFIG.LEVEL_5.START_PC)a=5;else if(n<=MERCH_STOCK_ACCEL_CONFIG.LEVEL_5.START_PC)return t.addClass("is-hidden"),void t.find(".pb-stock-accel__msg").text(MERCH_STOCK_ACCEL_CONFIG.LEVEL_5.MSG);switch(a){case 1:n=100;break;case 2:n=80;break;case 3:n=60;break;case 4:n=40;break;case 5:n=20}return o=e.MERCH_STOCK_ACCEL_CONFIG["LEVEL_"+a].MSG,t.attr("data-level",a),t.find(".pb-stock-accel__progress span").text(n+"%").css("width",n+"%"),t.find(".pb-stock-accel__msg").text(o),t.attr("data-is-init","true"),this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.UserMenu=function(){var n=t(".js-s-h-account-btn");return n.on("click.s-h",(function(a){t(e).width()<=992&&(a.preventDefault(),n.toggleClass("is-active"),n.parent().toggleClass("is-open"))})),this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){var a,o={de:{de:{zone:"eu1",uatCatalog:"CG941",hashid:{content:"29ca1bfccb0f33d91c287e7c577eedb1",products:"389be9fe394b02337bf214b3dcde9efb"}}},ch:{de:{zone:"eu1",uatCatalog:"CG978",hashid:{content:"d89685a786ba9fd73d8056763065ac2b",products:"f79a93832ae969e15ad6db995717eb36"}},fr:{zone:"eu1",uatCatalog:"CG978",hashid:{content:"8456c9befbdcaea4868b38e06bf5c42f",products:"d0c21dbf276ec2c9969d003b2e8307e0"}},en:{zone:"eu1",uatCatalog:"CG978",hashid:{content:"80c22f26fe0cf3b7100c89ca5c968937",products:"2553a977b28d90bfa795878af7b56ff0"}}},fr:{fr:{zone:"eu1",uatCatalog:"CG950",hashid:{content:"230be4f78f4d915f901c966c3a45d196",products:"200e746dde077f47259656c6fcc7c4c7"}}},se:{sv:{zone:"eu1",uatCatalog:"CG967",hashid:{content:"8212f16033e5dd0a1b49b725ba3eac38",products:"ca0663c379fcedeba77c7fc869daeae5"}}},es:{es:{zone:"eu1",uatCatalog:"CG940",hashid:{content:"b8f991f80cd5f4c9350735b1c94c7cfd",products:"2f3b003cbeb8dcb703b66241f3d5386b"}}},it:{it:{zone:"eu1",uatCatalog:"CG1927",hashid:{content:"30831857fdfb77a954a00882996902ee",products:"e66bca91b81ae7833b21813f3d7548e2"}}},nl:{nl:{zone:"eu1",uatCatalog:"CG1926",hashid:{content:"252aaf434b3b8b6c1d50a0777e787c14",products:"cebbdb3bdfacf9d95a7f55cdd2ace66f"}}},ca:{en:{zone:"eu1",uatCatalog:"CG495",hashid:{content:"73f970f9548fbe73cc582a3a8722a450",products:"67156b8d340ace4a6901d067522b071a"}},fr:{zone:"eu1",uatCatalog:"CG495",hashid:{content:"929a829a522cdeff52f1f1a226db7967",products:"a56f5aaf0f0b3610f779b9be8f8c1935"}}},uk:{en:{zone:"eu1",uatCatalog:"CG953",hashid:{content:"84113bd5106e74802c7986726a5e9cbd",products:"68255af0073c20fc7a549d26435bccd8"}}}},i=(a=e.location.host).indexOf("itg-")>-1||a.indexOf("gslb-itg-apjstore.glb.itcs.")>-1?o[e.merchSFCountryCode][e.merchSFLanguageCode].uatCatalog:e.s_eVar45.split(":")[1];n.SearchAutoComplete=function(n){if(n&&n.length){var a,r=o[e.merchSFCountryCode][e.merchSFLanguageCode];return a=".js-meganav-search-input"===n.selector?t(".search__results"):document.body,n.autocomplete_ajax({appendTo:a,minChars:3,triggerSelectOnValidInput:!1,maxHeight:500,lookup:function(a,o){merchAllPages.doofinderSession.startSession();var s={url:"//"+r.zone+"-search.doofinder.com/5/search",data:{rpp:5,query:a,page:1}},c=t.ajax(t.extend(!0,s,{data:{hashid:r.hashid.content,type:i}})),l=t.ajax(t.extend(!0,s,{data:{hashid:r.hashid.products,type:i}}));t.when(c,l).done((function(i,r){var s,c=r[0].results,l=i[0].results,d=e.MERCH_CURRENCY_CODE||"",u=1;c=c.map((function(e){return{name:e.title,value:e.title,data:e.link,dfid:e.dfid,dfscore:e.dfscore,id:e.id?e.id.replace("_","#"):"",price:e.price,brand:"HP",category:"",variant:"",list:"search autocomplete",type:"product",query:a}})),l=l.map((function(e){return{value:e.title,data:e.link,dfid:e.dfid,dfscore:e.dfscore,query:a,type:"offer"}})),e.merchAllPages.gaImp&&e.merchAllPages.gaImp(c,d),(s=(s=(s=t.merge(c,l)).sort((function(e,t){return t.dfscore-e.dfscore}))).map((function(e){return e.position=u++,e}))).push({value:n.attr("data-see-all-results")||"See All Results",data:e.getHpPath(!1)+"shop/search.aspx?q="+encodeURIComponent(a),position:"11"}),o({suggestions:s})}))},onSelect:function(n){if("product"===n.type){var a={field:"search autocomplete",name:n.name,sku:n.id?n.id.replace("_","#"):"",price:n.price,brand:"HP",category:"",variant:"",position:n.position},o={dfid:n.dfid,query:n.query,random_value:Math.floor(1e6*Math.random()+1)};e.merchAllPages.gaEvWithEcom&&e.merchAllPages.gaEvWithEcom(a),n.dfid&&merchAllPages.doofinderSession.isAvailable()?t.ajax({url:"//"+r.zone+"-search.doofinder.com/5/stats/click",data:o}).done((function(){var t=n.dfid.split("@")[0];merchAllPages.doofinderSession.storeHashId(t),e.location.href=n.data})):e.location.href=n.data}else if("offer"===n.type){o={dfid:n.dfid,query:n.query,random_value:Math.floor(1e6*Math.random()+1)};n.dfid&&merchAllPages.doofinderSession.isAvailable()?t.ajax({url:"//"+r.zone+"-search.doofinder.com/5/stats/click",data:o}).done((function(){var t=n.dfid.split("@")[0];merchAllPages.doofinderSession.storeHashId(t),e.location.href=n.data})):e.location.href=n.data}else e.location.href=n.data}}),this}}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){"use strict";function a(){this.start()}a.prototype={constructor:a,start:function(){var e=t(".logout-time").attr("data-time"),n=e.split(":"),a=n[0],o=n[1];this.tick=setInterval(function(){t(".focus-box .logout-time").each(function(n,i){a>=0&&o>0&&(o--,t(i).html(a+":"+(o<10?"0"+o:o))),a>0&&0==o&&(a--,o=59,t(i).html(a+":"+(o<10?"0"+o:o))),0==a&&0==o&&this.stop(e)}.bind(this))}.bind(this),1e3)},stop:function(t){clearInterval(this.tick),void 0!==t&&n.redirectWithClearCache("prerouter.aspx?act=logout&post_logout_redirect_uri="+e.location.href)}},n.SessionTimer=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){"use strict";function a(){this.logout(),this.keepMe(),this.onClose()}a.prototype={constructor:a,logout:function(){t(".js-log-out").on("click",function(t){n.redirectWithClearCache("prerouter.aspx?act=logout&post_logout_redirect_uri="+e.location.href)}.bind(this))},keepMe:function(){t(".js-keep-me").on("click",function(t){t.preventDefault(),e.merchSessionTimer&&e.merchSessionTimer.stop(),e.location.reload()}.bind(this))},onClose:function(){t(".focus-box__close-btn, .focus-box-bg").on("click",(function(){e.merchSessionTimer&&e.merchSessionTimer.stop()}))}},n.SessionWarningPopup=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){"use strict";function a(){this.SessionEndPopup(),this.onClose()}a.prototype={constructor:a,SessionEndPopup:function(){t(".js-login-back").on("click",(function(t){t.preventDefault(),n.redirectWithClearCache(getHpPath(!0)+"shop/prerouter.aspx?act=login&key=public&returnurl="+e.location.href)}))},onClose:function(){t(".focus-box__close-btn, .focus-box-bg").on("click",(function(){n.redirectWithClearCache("prerouter.aspx?act=logout&post_logout_redirect_uri="+e.location.href)}))}},n.SessionEndPopup=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t){"use strict";function n(e){e.length&&"string"==typeof e[0]&&this.load(e)}n.prototype={constructor:n,load:function(e){e.forEach((function(e){var t=new Image;t.src=e,t.style.display="none",document.getElementsByTagName("body")[0].appendChild(t)}))}},t.ImageLoader=n}(window,window.merchComp=window.merchComp||{}),function(e,t,n){"use strict";var a=e.s_eVar45.split(":")[1],o=["CG928","CG948","CG951","CG981","CG1816","CG1817","CG1958","CG2505"];function i(){var t;return"uk"===e.merchSFCountryCode&&e.location.href.toLowerCase().indexOf("list.aspx")>-1&&["CG947","CG951","CG953","CG1816"].indexOf(a)>-1&&!((t=new Date).getDay()<1||t.getDay()>5||t.getHours()<9||t.getHours()>17||17===t.getHours()&&t.getMinutes()>30)}n.hideStickyFooter=function(){o.indexOf(a)>-1&&!i()&&t(".js-s-f-sticky").remove()}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){"use strict";var a=["SCESG20019:CG947","SCESG20045:CG941","SCESG21308:CG950","SCESG21425:CG950","SCESG23558:CG950","SCESG21711:CG950","SCESG21729:CG950","SCESG21730:CG950","SCESG21159:CG950","SCESG21741:CG950","SCESG21723:CG950","SCESG22556:CG950","SCESG23408:CG950"],o=[],i={en:{eppi:"Welcome to the Employee Store! SAVE 20% using e-voucher: <b>INTERL20</b>, to access your exclusive saving enter e-voucher at checkout.",all:"WE CANNOT GUARANTEE PRE CHRISTMAS DELIVERY FOR ORDERS PLACED AFTER 4PM FRIDAY 20TH DECEMBER."},de:{eppi:"Willkommen im HP Mitarbeiter Store! Jetzt 40% sparen mit Gutscheincode: <b>INTERN40</b>. Der Gutscheincode kann im Warenkorb eingelöst werden."},fr:{eppi:"Boutique Employés HP : -20% sur les PC et imprimantes, code : <b>HP20</b> | -30% sur le reste, code : <b>HPBONUS30</b> | Codes à utiliser dans le panier."}},r='<div class="persistent-header"><div class="r-container"><div class="r-gr"><div class="r-gr__col r-gr__col--md-24"><p class="persistent-header__label">{{msg}}</p></div></div></div></div>';function s(){this.isCommunity()?this.show("eppi"):this.isCatalog()&&this.show("all")}s.prototype={constructor:s,isCommunity:function(){return a.indexOf(e.s_eVar45)>-1},isCatalog:function(){var t=e.s_eVar45.split(":");if(t.length>1)var n=t[1];return o.indexOf(n)>-1},isIntEppDE:function(){return"SCESG20045:CG941"===e.s_eVar45},isInternetExplorer:function(){var t=e.navigator.userAgent;return t.indexOf("Trident")>-1||t.indexOf("MSIE")>-1},applyInternetExplorerFix:function(e,t){e.addClass("persistent-header--is-fixed"),this.setMegaMenuMargin(e,t),this.trackScroll(e,t)},setMegaMenuMargin:function(e,t){t[0].style.marginTop=e[0].offsetHeight+"px"},trackScroll:function(e,n){var a=this;t(document).scroll((function(){a.setMegaMenuMargin(e,n)}))},show:function(n){if(n&&i[e.merchSFLanguageCode]&&i[e.merchSFLanguageCode][n]){var a=r.replace("{{msg}}",i[e.merchSFLanguageCode][n]);if((this.isIntEppDE()&&"default"!==e.merchPageType||!this.isIntEppDE())&&(t("body").prepend(a),this.isInternetExplorer())){var o=t(".persistent-header"),s=t(".sm15");this.applyInternetExplorerFix(o,s)}}}},n.PersistentHeader=s}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){var a={ecommerce:{}};e.dataLayer&&e.dataLayer[0].ecommerce&&(a.ecommerce=t.extend(!0,{},e.dataLayer[0].ecommerce)),n.GaData=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.FooterMenu=function(e){if(e&&e.length){var t=e.find(".s-f-menu__list");t.length&&e.find(".s-f-menu__title").on("click.s-f",(function(e){t.toggleClass("is-open"),e.preventDefault()}))}return this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){var a='<div class="s-h__dialog-2"><div class="s-h-dialog-2"><div class="s-h-dialog-2__wrap"><p class="s-h-dialog-2__msg">{{msg}}</p><button class="s-h-dialog-2__btn" type="button"><svg viewbox="0 0 30 30"><use xlink:href="#i-global-rounded-close-30x30"></use></svg>Close</button></div></div></div>';function o(e,n){if(e){var o=t(a.replace("{{msg}}",e));switch(n){case"SUCCESS":o.find(".s-h-dialog-2").addClass("s-h-dialog-2--success");break;case"ERROR":o.find(".s-h-dialog-2").addClass("s-h-dialog-2--error")}return o.on("click",".s-h-dialog-2__btn",this.hide.bind(this)),this.$msg=o,this.show(),this}}o.prototype={constructor:o,show:function(){t(".s-h__dialog").after(this.$msg),setTimeout(function(){this.$msg.find(".s-h-dialog-2").addClass("is-visible")}.bind(this),0)},hide:function(){this.$msg.find(".s-h-dialog-2").removeClass("is-visible"),setTimeout(function(){this.$msg.remove()}.bind(this),1e3)}},n.HeaderDialog=o}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(e){n.HeaderDialog.call(this,e,"SUCCESS")}a.prototype=Object.create(n.HeaderDialog.prototype),a.prototype.constructor=a,n.SuccessDialog=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){function a(e){n.HeaderDialog.call(this,e,"ERROR")}a.prototype=Object.create(n.HeaderDialog.prototype),a.prototype.constructor=a,n.ErrorDialog=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.Footnotes=function(){var e=t(".js-s-f-footnotes-btn"),n=t(".js-s-f-footnotes-body");return e.on("click",(function(a){e.toggleClass("is-open"),n.toggleClass("is-open"),t("html, body").animate({scrollTop:e.offset().top},400),a.preventDefault()})),this}}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){"use strict";function a(e){if(e)if(this.location=e,"list"===e||"offer"===e||"compare"===e)t("body").on("click",".pb-cta__bundle--add-2-cart, .pb-cta__bundle",this.onClick.bind(this));else if("product"===e&&t(".pb-bundle-list").attr("data-sku")){var n=".js-product-add-to-cart, .js-fixed-product-add-to-cart";t(n).attr("data-prevent-cart-click",!0),t("body").off("click",n).on("click",n,this.onClick.bind(this))}}a.prototype={constructor:a,onClick:function(e){switch(e.preventDefault(),this.location){case"list":case"offer":this.sendToBackend(this.listGetData(e.target));break;case"compare":this.sendToBackend(this.compareGetData(e.target));break;case"product":this.sendToBackend(this.productGetData(e.target))}},listGetData:function(n){var a=t(n).closest(".product"),o=t(".product-bundle",a),i=(a[0]?parseInt(a[0].dataset.bvOid):"")||"",r={AddItemList:[{DynamicBundleId:a.attr("data-sku"),Quantity:1,Description:t(".product__title h3 a",a).text(),ImageURL:t(".product-gallery__image",a).attr("src"),ProductFamily:"00",ProductSelector:e.merchDataSel,ProductLine:"00",Oid:i,ProductsIncluded:[{AttachId:0,Description:t(".product__title h3 a",a).text(),ImageURL:t(".product-gallery__image",a).attr("src"),Quantity:1,SKU:t(".product__item-nr",a).attr("data-main-sku"),Sequence:1}]}]};return o.each((function(e,n){var a={},o=t(n);a.AttachId=parseInt(o.attr("data-attach"),10),a.Description=t(".product-bundle__desc",o).attr("data-desc"),a.ImageURL=t(".product-bundle__image img",o).attr("src"),a.Quantity=1,a.SKU=o.attr("data-sku"),a.Sequence=e+2,r.AddItemList[0].ProductsIncluded.push(a)})),r},compareGetData:function(n){var a=t(n).closest(".compare-product"),o=t(".compare-product__attach",a),i=t(".compare-product__title-link",a).text(),r=t(".compare-product__image",a).attr("src"),s=(a[0]?parseInt(a[0].dataset.bvOid):"")||"",c={AddItemList:[{DynamicBundleId:a.attr("data-bundleid"),Quantity:1,Description:i,ImageURL:r,ProductFamily:"00",ProductSelector:e.merchDataSel,ProductLine:"00",Oid:s,ProductsIncluded:[{AttachId:0,Description:i,ImageURL:r,Quantity:1,SKU:a.attr("data-mainsku"),Sequence:1}]}]};return o.each((function(e,n){var a={},o=t(n);a.AttachId=parseInt(o.attr("data-id"),10),a.Description=o.attr("data-desc"),a.ImageURL=o.attr("data-img"),a.Quantity=1,a.SKU=o.attr("data-sku"),a.Sequence=e+2,c.AddItemList[0].ProductsIncluded.push(a)})),c},productGetData:function(n){var a=t(".price-block--pdp"),o=t(".pb-bundle-list__item",a),i=a.parents(".prod")[0],r=(i?parseInt(i.dataset.bvOid):"")||"",s={AddItemList:[{DynamicBundleId:t(".pb-bundle-list",a).attr("data-sku"),Quantity:parseInt(t(".js-product-count.js-custom-select",a).val()),Description:t(".pb-product__name",a).text(),ImageURL:t(".gal-canvas__img").attr("src"),ProductFamily:"00",ProductSelector:e.merchDataSel,ProductLine:"00",Oid:r,ProductsIncluded:[{AttachId:0,Description:t(".pb-product__name",a).text(),ImageURL:t(".gal-canvas__img").attr("src"),Quantity:1,SKU:e.merchDataSku,Sequence:1}]}]};return o.each((function(e,n){var a={},o=t(n);a.AttachId=parseInt(o.attr("data-attach"),10),a.Description=o.attr("data-desc"),a.ImageURL=o.attr("data-img"),a.Quantity=parseInt(o.attr("data-quantity"),10),isNaN(a.Quantity)&&(a.Quantity=1),a.SKU=o.attr("data-sku"),a.Sequence=e+2,s.AddItemList[0].ProductsIncluded.push(a)})),s},sendToBackend:function(e){e.AddItemList[0].ProductsIncluded.forEach((function(e){handleDYAddToCart(e)})),SERVICE.API_CART.addDynBundleToCart(e,mOnGetCartComplete,mOnServiceFailure)}},n.DiyBundleSender=a}(window,$,window.merchComp=window.merchComp||{}),function(e,t,n){n.currencyFormat=function(t){return accounting.formatMoney(t,e.MERCH_CURRENCY_FORMAT_CONFIG)}}(window,$,window.merchComp=window.merchComp||{});var ItemHtml,ItemSKU,bundleHTML,bundleImageHTML,mVersion="v.4.5";ItemHtml='<div class="item">#ITEM# #BUNDLE#</div>',ItemSKU='<div class="item__product">         <img class="product__image" src="#IMG#" alt=""/>         <div class="product__content">             <a href="#LNK#">                 <h5>#NME#</h5>             </a>             <div class="product__total">                 <div class="product__qty">x#QTY#</div>                 <div class="product__price">                     #PRC#                     <div class="product__vat">#VAT#</div>                 </div>             </div>         </div>     </div>',bundleHTML='<div class="item__bundle">         <div class="bundle__plus">&#43</div>         <div class="bundle__content">             #BUNDLES#         </div>     </div>',bundleImageHTML='<img src="#IMG#" class="bundle__image" />',XML.XSellAcc='<div class="js-basket-confirm basket-confirm" style=""><p class="basket-confirm__label">#ADDED#</p><div class="basket-confirm-product"><div class="basket-confirm-product__image"><img src="#IMG#" width="209" height="189" alt=""></div><div class="basket-confirm-product__body"><h2 class="basket-confirm-product__name">#NME#</h2><div class="basket-confirm-product-summary"><div class="basket-confirm-product-summary__price"><div class="merch-product-price-now"> <nobr>#NO# x #PRC#</nobr> <span>#VAT#</span> </div></div></div></div></div><div class="basket-confirm-footer"><div class="basket-confirm-footer__cancel"><button type="button" class="basket-cancel-btn">#CSH#</button></div><div class="basket-confirm-footer__confirm"><a href="#cart" class="basket-confirm-btn">#CNC#</a></div></div></div>';var mh="#merch-overlay-content",_MSD={CartData:null,ApplyLogisticsFlag:window.isExpressCheckout?0:1,ApplySurchargeFlag:0,CartLen:"",LoadCart:0,HasAcc:null,IsPDPAcc:null,Qty:1,SKUs:"",AccBoxFix:0,OfStk:"",CPK:0,ProductQty:0,Sel:null,ItemAddedEC:null};window.sBasket=[];var mCountry,_mwCart="apicart",_mwUser="apiuser";function mAddToCart(e,t,n,a,o,i){for(var r=e.split(","),s=[],c=0;c<r.length;c++)s.push({SKU:r[c],Quantity:1}),t&&(s[c].ImageURL=t.replace("500x367","209x189")),n&&(s[c].Description=n.trim()),a&&(s[c].Quantity=a),o&&(s[c].OID=o);_MSD.CPK>0&&(s=$.merge(s,bItems())),i&&(_MSD.Sel=i),wsAddtocart(s,mOnGetCartComplete)}function wsAddtocart(e,t){try{var n={AddItemList:e,RetainShipmentandPaymentInfo:!0};SERVICE.API_CART.addToCart(n,t,mOnServiceFailure)}catch(e){console.log(e)}}function mOnGetCartComplete(e,t,n){var a=t||isPLPPage||isProductPage;try{if(0==e.Status)_MSD.CartData=e,e&&e.Cart&&(e.ItemList&&(mGA.act(e.ItemList),window.isExpressCheckout&&(_MSD.ItemAddedEC=e.ItemList)),1!==_MSD.ApplyLogisticsFlag&&null!==e.Cart&&e.Cart.Items.length?(mApplyLogistics(!0),mApplySurcharge(!0)):(gCart(e,a),window.isExpressCheckout&&1===_MSD.ApplyLogisticsFlag&&null!==e.Cart&&e.Cart.Items.length&&(_MSD.ApplyLogisticsFlag=0,_MSD.ApplySurchargeFlag=0)),window.isExpressCheckout&&!e.Cart.Items.length&&$(".js-meganav-cart-btn").removeClass("cart--has-loader"));else{if(n)return void n(e);mserviceErr(e)}}catch(e){console.log(e)}}function isUKEnrolmentPriceCorrection(e,t){return isUKStore&&ukEnrolmentSkus.has(e)&&.98===Number((t-Math.floor(t)).toFixed(2))}function gCart(e,t){var n,a="",o=0,i=e.Cart.Items.length,r=e.Cart&&e.Cart.Total||0,s=0,c=e&&e.Cart&&e.Cart.CartId||"";e.Cart.Items.forEach((function(e){if(isUKEnrolmentPriceCorrection(e.SKU,(mFinalPrice(e)/e.Quantity).toFixed(2))){var t=e.Quantity;e.Quantity>1&&e.Quantity<6||e.Quantity>=6&&e.Quantity%2!=0?t=e.Quantity-Math.floor(e.Quantity/2):e.Quantity>=6&&e.Quantity%2==0&&(t=e.Quantity-Math.floor(e.Quantity/2.5)),s+=t}})),_MSD.SKUs="";for(var l=window.isExpressCheckout?2:4,d=0;d<i;d++)n=e.Cart.Items[d],d<l&&(a+=mItemCart(ItemHtml,n,mprodLink(n),e,0)),o+=n.Quantity,_MSD.SKUs+=n.SKU+" ,";window.merchAllPages.expressCheckout.initiateOSM(r);(window.isExpressCheckout?_MSD.ItemAddedEC:e.ItemList)&&!t&&(window.showNewPopin&&1!=window.showNewPopin?setTimeout((function(){$(".s-h-cart").fadeOut(750),merchAllPages.goToCart()}),3e3):(_MSD.HasAcc?(XSellPDP.showPDP(),AddToCartClick(""),XSellPDP.BasketAccCarousel($(mh+" .js-basket-confirm-acc-carousel"))):(!_MSD.IsPDPAcc&&XSellPDP.init(e),_MSD.IsPDPAcc=null),_MSD.HasAcc=null)),"CA"==mCountry&&(XML.Tax="",XML.VATincl=""),window.isExpressCheckout?($(".js-cart__subtotal-info--express").removeClass("is-hidden"),$(".js-cart__subtotal-info").addClass("is-hidden"),i>0&&window.merchAllPages.expressCheckout.getPayments(c)):$(".js-cart__shipping").addClass("is-hidden");var u=parseFloat(e.Cart.Total)+.01*s,m=parseFloat(e.Cart.TotalShipping);if(i>0){$(".js-meganav-items").html(a),$(".js-meganav-subtotal").html(FormatPrice(u));var h=$(".js-shipping-free"),p=$(".js-shipping-cost");m>0?(p.html(FormatPrice(m)),h.addClass("is-hidden"),p.removeClass("is-hidden")):(h.removeClass("is-hidden"),p.addClass("is-hidden")),$(".js-meganav-vat").html(misVAT(e))}var f=$(".js-meganav-more-items");i>l?(f.show(),$(".js-meganav-more-items-count").html(i-l)):f.hide(),merchAllPages.Cart.state({state:0==o?"EMPTY":"FILLED",count:o}),_MSD.CartLen=i,0==_MSD.AccBoxFix&&(AccBoxFix(),_MSD.AccBoxFix=1),_MSD.CPK>0&&showCpk(),window.shoppingCartReminder(i)}function mItemCart(e,t,n,a,o){var i=mpN(t);t.ProductsIncluded&&"CTO"!==t.ProductType?e=(e=(e=e.replace("#ITEM#",ItemSKU)).replace("#BUNDLE#",getProdIncl(t.ProductsIncluded))).replace("#IMG#",t.ImageURL).replace("#NME#",i):(e=(e=e.replace("#BUNDLE#","")).replace("#ITEM#",ItemSKU),""!=t.ProductColor&&null!=t.ProductColor&&(i+="<br>"+t.ProductColor),e=e.replace("#IMG#",t.ImageURL).replace("#NME#",i));var r=mFinalPrice(t)/t.Quantity;return isUKEnrolmentPriceCorrection(t.SKU,r)&&(r=Math.ceil(r)-.01),e.replace("#QTY#",0==o?t.Quantity:1).replace("#PRC#",FormatPrice(r)).replace("#LNK#",n).replace("#VAT#",applyVATMsg(r,a)).replace("#ID#",t.LineItemId).replace("#SKU#",t.SKU)}function getProdIncl(e){items="";for(var t=0;t<e.length;t++){var n,a=e[t];0!==t&&(n=items+=bundleImageHTML.replace("#IMG#",a.ImageUrl))}return items=bundleHTML.replace("#BUNDLES#",n),items}function mpN(e){var t=e.ProductName,n=e.ProductDescription;return(n=mSpecsDesc(n)).length>150?n.length>t.length?t:n.substr(0,150):""==n?t:n.substr(0,150)}function mprodLink(e){var t=e.SKU;"DynamicBundle"==e.ProductType&&e.ProductsIncluded&&(t=e.ProductsIncluded[0].PartNumber);var n=currentURL().split("/");return n.splice(4,1),n.splice(4,1),n[0]=n[0].replace("s",""),n.join("/")+"/shop/product1.aspx?hpproduct="+t.replace("#","%23")}function currentURL(){return location.protocol+"//"+location.host+location.pathname}function waitForAcc(e,t,n,a){}function mGetCart(){try{SERVICE.API_CART.getCart({CartValidation:0},mOnGetCartComplete,mOnServiceFailure)}catch(e){console.log(e),reloadExCart()}}function misVAT(e){var t=e.IsPriceWithTax?XML.VATincl:XML.VATexcl;return isGermanyStore?vatMessages(e.Cart.Total,e.IsPriceWithTax):("CA"==mCountry&&(t=""),t)}function isVatIncl(){var e=window.merchAllPages.merchCookies.getCkVat();return!e||"inc"===e}function applyVATMsg(e,t){return isGermanyStore&&vatMessages(e,isVatIncl())||misVAT(t)}function mRemoveFromCart(e,t){try{var n={};n[e]="Remove",mGA.act(n);var a={SKU:e,LineItemId:t};a=mcheckDynBndl(a,t),SERVICE.API_CART.removeFromCart(a,mOnGetCartComplete,mOnServiceFailure)}catch(e){}}function mcheckDynBndl(e,t){try{for(var n=_MSD.CartData.Cart.Items,a=0;a<n.length;a++)n[a].LineItemId==t&&"DynamicBundle"==n[a].ProductType&&(e.isDynamicBundle=!0)}catch(e){}return e}function mgetObj(e,t,n){var a=[];for(var o in e)e.hasOwnProperty(o)&&("object"==typeof e[o]?a=a.concat(mgetObj(e[o],t,n)):o==t&&e[t]==n&&a.push(e));return a}function FormatPrice(e){var t,n,a,o=XML.PriceFormat;return t=(t=o.match(/[^0-9\.,# ]/g)).join(""),n=o.lastIndexOf(t),a=o.length-n,o.length==a?t+" "+FP(e,o.substr(t.length,o.length)):FP(e,o.substr(0,o.length-a))+" "+t}function RemoveZeroCents(e){return"ca"===merchSFCountryCode&&(e=e.replace(".00","")),e}function FP(e,t){var n,a,o,i,r,s,c,l;e="-"==t.charAt(0)?-e:+e;if(c=(l=t.match(/[^\d\-\+#]/g))&&l[l.length-1]||".",s=l&&l[1]&&l[0]||",",t=t.split(c),e=+(e=e.toFixed(t[1]&&t[1].length))+"",r=t[1]&&t[1].lastIndexOf("0"),(!(i=e.split("."))[1]||i[1]&&i[1].length<=r)&&(e=(+e).toFixed(r+1)),o=t[0].split(s),t[0]=o.join(""),(a=t[0]&&t[0].indexOf("0"))>-1)for(;i[0].length<t[0].length-a;)i[0]="0"+i[0];else 0==+i[0]&&(i[0]="");if((e=e.split("."))[0]=i[0],n=o[1]&&o[o.length-1].length){var d,u="",m=e[0];d=m.length%n;for(var h=0,p=m.length;h<p;h++)u+=m.charAt(h),!((h-d+1)%n)&&h<p-n&&(u+=s);e[0]=u}return e[1]=t[1]&&e[1]?c+e[1]:"",e[0]<1&&(e[0]="0"+e[0]),e[0]+e[1]}function LoadCart(){-1==MERCH_CURRENT_URL.indexOf("cart")&&wFn()}function wFn(){$.isFunction(mGetCart)?mGetCart():setTimeout(wFn,100)}window.console||(window.console={log:function(){}}),window.OnAddToCartComplete=function(){$("#MyAddToCart").attr("disabled",!1)};var MERCH_CURRENT_URL=location.protocol+"//"+location.host+location.pathname.toLowerCase();function loadCartService(){LoadCart()}var mWS={getURLParameter:function(e){return decodeURI((RegExp(e+"=(.+?)(&|$)").exec(location.search)||[,""])[1])},gCookie:function(e){var t=RegExp(e+"[^;]+").exec(document.cookie);return unescape(t?t.toString().replace(/^[^=]+./,""):"")}};function getPageCategory(){function e(e){return window.location.href.toLowerCase().indexOf(e)>-1}return e("list.aspx")?"ui-plp":e("product.aspx")?"ui-pdp":e("offer.aspx")?"ui-odp":void 0}function tagBasketGAEvent(e){var t=getPageCategory();getPageCategory&&merchAllPages.gaEv(t,"basket-overlay",e)}function AddToCartClick(e){var t=$(e+".AddToCart,.pb-cta__btn,.fixed-price-cta__btn");t.off("click"),t.on("click",(function(e){if(!!!$(this).attr("data-prevent-cart-click")&&!$(this).hasClass("js-similar")){!$(this).parents().eq(2).find(".product__name a").text()&&window.location.href.toLowerCase().indexOf("compare.aspx")>-1&&$("#container").find('input[text="'+$(this).attr("text")+'"]').first().click();try{var t=$(this).attr("text").split("|");_MSD.HasAcc=$(this).attr("data-show-recommended");var n=0,a=mspecs($(this));if(_MSD.Qty=1,t.length>1){var o,i,r,s,c,l,d=t[4],u=d;if(d.indexOf("#")>-1){var m=d.split("#");d=m[0]+"][data-opt="+m[1]}if($(this).hasClass("similar-config-product__cart")||$(this).hasClass("similar-config-details__cart")?XSellPDP.isSimilarConfig=!0:XSellPDP.isSimilarConfig=!1,i=$(this).hasClass("js-accessory-xsell-add-to-cart")?"sku":"code",p=$("[data-"+i+"="+("sku"==i?u:d)+"] img").attr("src"),o=$("[data-"+i+"="+("sku"==i?u:d)+"] h4").eq(0).text(),s=$(this).parents(".price-block"),$(this).hasClass("js-accessory-add-to-cart")&&(acc=$(this).parents(".acc")[0],oidString=acc?parseInt(acc.dataset.bvOid):"",l=oidString||""),null==p){var h,p=$(".LargeImageURL img").attr("src"),f=location.href.toLowerCase();if(f.indexOf("offer")>-1&&null==p)(h=$(".AddToCart").index(this))>-1&&(p=(s=$(".AddToCart").eq(h).parents().eq(4)).find(".product-main-img").attr("src"),o=s.find(".product-info h3").html(),(r=s.find("input[name=quantity]").val())&&(_MSD.Qty=r));if(null==p&&f.indexOf("product")>-1&&(XSellPDP.isSimilarConfig?(p=(s=$(".similar-config-product__item[data-label="+u+"]")).find(".similar-config-product__image").attr("src"),o=s.find(".similar-config-product__title").text()):(o=$(".pb-product__name").text().trim(),p=$(".gal-canvas__img").attr("src"),r=$("pb-cta"==this.parentNode.className?".pb-cta__select span":".fixed-price-cta__count span").eq(0).text(),prod=$(this).parents(".prod")[0],oidString=prod?parseInt(prod.dataset.bvOid):"",l=oidString||"",r&&(_MSD.Qty=r),$(".basket-confirm-extra,.basket-confirm-product-summary__cta").hide(),$(this).hasClass("js-product-add-to-cart")&&carepack(r),$(this).hasClass("js-bundle-add-to-cart")&&window.merchAllPages.gaEv("UI-PDP","Add2Basket","Add-Bundle-"+merchDataSel))),f.indexOf("compare.aspx")>-1)(h=$(".js-add-to-cart").index(this))>-1&&(p=(s=$(".js-add-to-cart").eq(h).parents().eq(1)).find(".compare-product__image").attr("src"),o=s.find(".compare-product__title-link").html(),compare=$(this).parents(".compare-product")[0],oidString=compare?parseInt(compare.dataset.bvOid):"",l=oidString||"");if(f.indexOf("common.aspx")>-1)(h=$(".AddToCart").index(this))>-1&&(r=(s=$(".AddToCart").eq(h).parents().eq(4)).find("input[name=_sfquantity]").val())&&(_MSD.Qty=r);if(f.indexOf("list.aspx")>-1)(h=$(".pb-cta__btn").index(this))>-1&&(p=(s=$(".pb-cta__btn").eq(h).parents().eq(4)).find(".product-gallery img").attr("src"),void 0!==(c=s.find(".product__title h3").html())&&(o=c),s=$(this).parents(".price-block"),product=$(this).parents(".product")[0],oidString=product?parseInt(product.dataset.bvOid):"",l=oidString||"");if(f.indexOf("offer.aspx")>-1)if((h=$(".pb-cta__btn").index(this))>-1)o=(s=$(".pb-cta__btn").eq(h).parents().eq(4)).find(".product__title a").html(),p=s.find(".product-gallery img").attr("src"),product=$(this).parents(".product")[0],mosaic=$(this).parents(".mosaic product")[0],oidProduct=product?parseInt(product.dataset.bvOid):"",oidMosaic=mosaic?parseInt(mosaic.dataset.bvOid):"",l=oidProduct||oidMosaic||"",handleDYAddToCart({SKU:$(product).attr("data-sku")||"",Quantity:1})}o=o.replace(/(<([^>]+)>)/gi,"");var C=$(this).parent().parent();$(this).hasClass("js-accessory-xsell-add-to-cart")?(confirm=$(this).parents(".basket-confirm-acc-item")[0],oidString=confirm?parseInt(confirm.dataset.bvOid):"",l=oidString||"",_MSD.IsPDPAcc=!0,mAddBtn(C,1,u,p,o+a,r,l),n=1,tagBasketGAEvent("add-to-basket-"+u)):$(this).hasClass("js-accessory-xsell-remove-form-cart")&&(confirm=$(this).parents(".basket-confirm-acc-item")[0],oidString=confirm?parseInt(confirm.dataset.bvOid):"",mAddBtn(C,0,u,p,o+a,r,l=oidString||""),n=1),0==n&&(_MSD.OfStk=s,mAddToCart(u,p,o+a,r,l))}e.preventDefault()}catch(e){}window.merchComp.prefetchCart()}}))}function parseISCSProductPrice(e){return parseFloat(Number(String(e).replace(",",".")).toFixed(2))}function getProductFromISCSResponse(e){var t=JSON.parse(e);return t.products&&t.products.length?t.products[0]:{}}function handleDYAddToCart(e){var t=e.SKU.split("#"),n=t[0]||"",a=t[1]||"",o=getHpPath()+"shop/data.aspx?id="+n+"&opt="+a+"&type=json";$.ajax(o).done((function(t){var n=parseISCSProductPrice(getProductFromISCSResponse(t).netprice||0);window.HPDY.triggerEvent(window.HPDY.EVENT.ADD_TO_CART,{sku:e.SKU,price:n,quantity:e.Quantity})})).fail((function(){console.log("Error getting VAT price from ISCS")}))}function mAddToBasket(e,t){var n=sBasket;try{var a=bItems();a.length>0?(a.forEach((function(e){handleDYAddToCart(e)})),wsAddtocart(a,(function(a){e(a),mGA.eVx("Add2Basket"),mTk(t,n)}))):mTk(t,n)}catch(e){console.log(e)}}function mTk(e,t){e&&(sBasket=[],"cart"==e&&merchAllPages.goToCart())}function mOnAddAllComplete(e){0==e.Status?(_MSD.CartData=e,merchAllPages.goToCart()):mserviceErr(e)}function mRemovesBasket(e){try{var t=mFindSKU(e);sBasket.splice(t,1)}catch(e){}}function mAddBtn(e,t,n,a,o,i,r){var s,c,l;l=".js-accessory-xsell-",s=e.find(l+"add-to-cart"),c=e.find(l+"remove-form-cart").parent(),1==t&&(s.hide(),c.show()),0==t?(s.show(),c.hide(),mRemovesBasket(n)):sAddBasket(n,a,o,i,r),addRemNo()}function sAddBasket(e,t,n,a,o){a||(a=1),sBasket.push({SKU:e,IMG:t,NAME:n,QTY:a,OID:o&&o})}function addRemNo(){var e,t=$(mh+" .basket-confirm__label");void 0!==t[0]&&(0===$(".basket-acc").length&&-1!==t[0].innerHTML.indexOf('<span id="itemNumber">1</span>')||-1!==t[0].innerHTML.indexOf("{0}")?(e=_MSD.Qty,_MSD.ProductQty=e):e=parseInt(_MSD.ProductQty)+parseInt(sBasket.length),t.html(1==e?XML.ItemAdded:XML.ItemsAdded.replace("#NO#",e)))}function mFindSKU(e){for(var t=sBasket,n=0;n<t.length;n++)if(t[n].SKU==e)return n}function mApplyLogistics(e){try{_MSD.ApplyLogisticsFlag=1,SERVICE.API_CART.applyLogistics({DoReturnCart:e},mOnGetCartComplete,mOnServiceFailure)}catch(e){}}function mApplySurcharge(e){if("FR"==mCountry&&0==_MSD.ApplySurchargeFlag)try{_MSD.ApplySurchargeFlag=1,SERVICE.API_CART.applySurcharge({DoReturnCart:e},mOnGetCartComplete,mOnServiceFailure)}catch(e){}}function reloadExCart(){0==_MSD.LoadCart&&loadCartService(),_MSD.LoadCart=1}function vatMessages(e,t){var n={vatExcl:"zzgl. MwSt. & Versandkosten",vatIncl:"inkl. MwSt., zzgl. Versandkosten"},a={vatExcl:"zzgl. MwSt., inkl. Versand",vatIncl:"inkl. MwSt. & Versand"};return e>20?t?a.vatIncl:a.vatExcl:t?n.vatIncl:n.vatExcl}function replaceGermanyVatMessages(e,t,n,a){var o=isVatIncl();vatMsg=vatMessages(e,o),isNaN(t)||(vatMsgInc=vatMessages(t,o)),o?n.text(vatMsg):(n.text(vatMsg),n.append("<span class='vat-exc-inc'> (<nobr>"+a+"</nobr> "+vatMsgInc+")</span>"))}function getGermanyVatMessages(e,t){var n,a,o,i,r,s,c,l;if(t)t.each((function(){var e=$(this);n=e.find($(".pb-price__vat")),a=n.find($(".vat-exc-inc")),o=e.find($(".pb-price__now")).text(),i=a.find($("nobr")).text(),r=o.replace("€","").replace(/,/g,".").replaceAll(" ","").trim(),s=i.replace("€","").replace(/,/g,".").replaceAll(" ","").trim(),c=parseFloat(r),l=parseFloat(s),replaceGermanyVatMessages(c,l,n,i)}));else{if(n=e.find($(".merch-product-price-now__vat")),a=n.find($(".vat-exc-inc")),!(o=e.find($(".merch-product-price-now__price")).find($("nobr")).text()))return i=e.find($(".merch-product-price-now")).find($("nobr")).text(),r=i.split("x")[1].replace("€","").replace(/,/g,".").replaceAll(" ","").trim(),void replaceGermanyVatMessages(c=parseFloat(r),c,e.find($(".merch-product-price-now")).find($("span")),i);i=a.find($("nobr")).text(),r=o.replace("€","").replace(/,/g,".").replaceAll(" ","").trim(),s=i.replace("€","").replace(/,/g,".").replaceAll(" ","").trim(),c=parseFloat(r),l=parseFloat(s),replaceGermanyVatMessages(c,l,n,i)}}mWS.merchOffer={init:function(e){var t=mWS.getURLParameter("Offer_id"),n=mWS.gCookie("merchOfferID");return!t&&n&&(t=n),t?(this.setCookie("merchOfferID",t,7),this.viewParam(e,t)):e},setCookie:function(e,t,n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3);var o="expires="+a.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"},viewParam:function(e,t){return e.offerID=t,e}},$(document).ready((function(){if(mCountry="",null==window.merchDataSel&&(merchDataSel=""),"undefined"!=typeof s_eVar1&&(mCountry=(mCountry=s_eVar1.split("|"))[0].toLocaleUpperCase()),XML){var e=XML.VATincl;XML.VATincl=e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')}try{loadCartService()}catch(e){reloadExCart()}if(XML&&!XML.OmniTrk&&(XML.OmniTrk="true"),AddToCartClick(""),sfItm(),window.OnAddToCartComplete=function(){wFn()},location.href.toLowerCase().indexOf("product")>-1&&$("#bundles .bundle__price .price-block__more a").bind("click",(function(){window.merchAllPages.gaEv("UI-PDP","Add2Basket","SeeMore-Bundle-"+merchDataSel)})),window.dataLayer){var t={event:"e_pageView"};if(window.location.href.toLowerCase().indexOf("product.aspx")>-1){const e=dataLayer[0].ecommerce;let n;e&&(n={currencyCode:e.currencyCode,detail:{actionField:{list:"pdp page"},products:[{name:e.detail.products[0].name,id:e.detail.products[0].id,price:e.detail.products[0].price,brand:"HP",category:e.detail.products[0].category,variant:""}]}},t={event:"e_pageView",ecommerce:n})}t=mWS.merchOffer.init(t),dataLayer.push(t)}})),String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return"[object regexp]"===Object.prototype.toString.call(e).toLowerCase()?this.replace(e,t):this.replace(new RegExp(e,"g"),t)});var XSellPDP={init:function(e,t){var n=".js-product-count.js-custom-select";0!=$(n).length&&(_MSD.Qty=parseInt($(n).val())),window.isNewVersion&&_MSD.Sel||-1!==window.location.href.indexOf("list.aspx")||-1!==window.location.href.indexOf("product.aspx")&&this.isSimilarConfig?this.showListItem(e):this.showItem(e)},showPDP:function(){showBasketConf(0),$(mh+" .js-basket-confirm").show(),lk(),PDPAccFix()},showItem:function(e){for(var t=e.Cart.Items.length,n=window.isExpressCheckout?_MSD.ItemAddedEC:e.ItemList,a=0;a<t;a++)if(itm=e.Cart.Items[a],n&&n[itm.SKU]){var o=this.ItemCart(XML.XSellAcc,itm,this.prodLink(itm.SKU),e,_MSD.Qty);showBasketConf(0),$(mh).html(o),$(mh+" .js-basket-confirm").show(),lk(),isGermanyStore&&getGermanyVatMessages($(mh+" .basket-confirm-product-summary__price"))}},getSelector:function(e,t,n){if(_MSD.Sel=null,n)return n;if(!this.isSimilarConfig)return t;var a=$("[data-similar-config-product]").filter((function(t,n){return $(n).data("label")===e})).data("sel");return a||t},isSimilarConfig:!1,showListItem:function(e){var t="";for(var n in e.ItemList){t=n;break}for(var a=0;a<e.Cart.Items.length;a++){var o=e.Cart.Items[a];if("DynamicBundle"==o.ProductType&&o.ProductsIncluded&&o.SKU===t){this.showItem(e),o.SKU=o.ProductsIncluded[0].PartNumber;break}if(o.SKU===t){var i="",r=merchAllPages.util.getUrlParams(),s=this.getSelector(t,r.sel,_MSD.Sel),c=-1===o.SKU.indexOf("#")?o.SKU:o.SKU.split("#")[0],l=-1===o.SKU.indexOf("#")?"":o.SKU.split("#")[1],d=window.location.href.split("?")[0].replace(/list.aspx|product.aspx/i,"data.aspx")+"?block=shoppingcart&sel="+s+"&id="+c+"&opt="+l,u=mFinalPrice(o)/o.Quantity;$.when(window.merchAllPages.loader.show(),$.ajax({url:d,type:"GET",dataType:"html",success:function(e){i=-1===e.indexOf('<div class="basket-acc">')?e.replace('<div class="basket-confirm-product-summary__cta">','<div class="basket-confirm-product-summary__cta" style="display: none;">'):e,window.merchAllPages.loader.hide()}})).done((function(){window.merchAllPages.loader.hide(),showBasketConf(0),$(mh).html(i),AddToCartClick(""),XSellPDP.BasketAccCarousel($(mh+" .js-basket-confirm-acc-carousel")),addRemNo(),isUKEnrolmentPriceCorrection(t,u)&&$(mh).find($(".merch-product-price-now__price")).find($("nobr")).text("£9.99"),isGermanyStore&&getGermanyVatMessages($(mh+" .basket-confirm-product-summary__price")),$(mh).show(),lk()}))}}},BasketAccCarousel:function(e){var t,n=e.find(".basket-confirm-acc-item"),a=3,o=0,i=n.length-a,r=e.find(".basket-confirm-acc-carousel__btn--left"),s=e.find(".basket-confirm-acc-carousel__btn--right");function c(){var e=$(window).width();a=e<=400?1:e<=1100?2:3}function l(e){var t=e,o=t+a-1;n.each((function(e){var n=$(this);e>=t&&e<=o?n.removeClass("basket-confirm-acc-item--hidden"):n.addClass("basket-confirm-acc-item--hidden")})),r.toggleClass("basket-confirm-acc-carousel__btn--disabled",0===e),s.toggleClass("basket-confirm-acc-carousel__btn--disabled",e===i)}isGermanyStore&&getGermanyVatMessages(e,n),c(),$(window).resize((function(e){$(".basket-confirm-acc-item").length?(clearTimeout(t),t=setTimeout((function(){c(),i=n.length-a,l(o)}),400)):$(this).unbind(e)})),n.length>a&&(e.addClass("basket-confirm-acc-carousel--active"),e.on("click",".basket-confirm-acc-carousel__btn--left",(function(){--o<0&&(o=0),l(o)})),e.on("click",".basket-confirm-acc-carousel__btn--right",(function(){++o>i&&(o=i),l(o)})),l(o))},ItemCart:function(e,t,n,a,o){var i=window.merchAllPages.merchCookies.getCkVat();includedVat=!i||"inc"===i;var r=mFinalPrice(t)/t.Quantity;return isUKEnrolmentPriceCorrection(t.SKU,r)&&(r=Math.ceil(r)-.01),e.replace("#IMG#",t.ImageURL.replace("500x367","209x189")).replace("#NME#",mpN(t)).replace("#PRC#",FormatPrice(includedVat?r:r-t.TaxAmount)).replace("#VAT#",includedVat?XML.VATincl:XML.VATexcl).replace("#ADDED#",1==_MSD.Qty?XML.ItemAdded:XML.ItemsAdded.replace("#NO#",_MSD.Qty)).replace("#NO#",_MSD.Qty).replace("#CSH#",XML.Continue).replace("#CNC#",XML.ContToCart)},prodLink:function(e){var t=this.currentURL().split("/");return t.splice(4,1),t.splice(4,1),t[0]=t[0].replace("s",""),t.join("/")+"/shop/product1.aspx?hpproduct="+e.replace("#","%23")},currentURL:function(){return location.protocol+"//"+location.host+location.pathname},isVAT:function(e){var t;return t=e.IsPriceWithTax?XML.VATincl:XML.VATexcl,"CA"==mCountry&&(t=""),t},goToCart:function(){merchAllPages.goToCart()}};function showBasketConf(e){merchAllPages.overlayer({className:"merch-overlay--basket-confirm",content:$("<div></div>").append($(".js-basket-confirm:eq("+e+")").clone()).html(),background:!0}),$(".acc-over").length>0&&$(".focus-box__close-btn").click(),addRemNo()}function lk(){var e=mh+" .basket-";$(e+"cancel-btn").on("click",(function(){mAddToBasket(mOnGetCartComplete,"shopping"),$("#merch-overlay").hide(),$("#merch-overlay-background").hide(),mGA.eVx("Continue-Shopping-Close"),tagBasketGAEvent("continue-shopping")})),$(e+"confirm-btn").on("click",(function(e){mAddToBasket(mOnAddAllComplete,"cart"),mGA.eVx("Continue-Basket"),e.preventDefault(),tagBasketGAEvent("continue-to-basket")})),$("#merch-overlay-background").bind("click",(function(){mAddToBasket(mOnGetCartComplete,"close"),mGA.eVx("Close-Outside",this)})),$("#merch-overlay-close").bind("click",(function(){mAddToBasket(mOnGetCartComplete,"close"),$("#merch-overlay-close").off("click"),mGA.eVx("Close-Button",this),tagBasketGAEvent("close-basket")})),$(".basket-confirm-acc-carousel__btn--right").bind("click",(function(){mGA.eVx("Cycle-Next"),tagBasketGAEvent("gallery-next")})),$(".basket-confirm-acc-carousel__btn--left").bind("click",(function(){mGA.eVx("Cycle-Left"),tagBasketGAEvent("gallery-previous")}))}function PDPAccFix(){try{var e=".basket-confirm-acc-";$("#tt-filter-a "+e+"item__loader").remove(),$(e+"list li").removeClass().addClass("basket-confirm-acc-item");var t=".merch-overlay-content",n=$(t+" .basket-confirm-acc-list li"),a=0;t+=" .basket-confirm-",n.each((function(e){var o=$(this).attr("data-sku"),i=n.eq(e);_MSD.SKUs&&_MSD.SKUs.indexOf(o)>-1?i.remove():a++,n.length==e+1&&0==a&&$(t+"acc,"+t+"product-summary__cta,"+t+"extra-summary__cta").hide()})),0==$(t+"acc").length&&$(t+"extra-summary__cta,"+t+"product-summary__cta").hide()}catch(e){console.log("Error:"+e.message)}}function mOmniTrk(e,t,n){try{t&&(e=t+" # "+e,n&&mGA.GAToOmniTrk(e,t,n))}catch(e){console.log("Error:"+e.message)}}var mGA={s:_MSD,act:function(e){if(!XML.GAOnOff||"Off"!=XML.GAOnOff)try{if(this.s.CartData&&this.s.CartData.Cart){for(var t=this.s.CartData.Cart,n=[],a={},o=0;o<t.Items.length;o++){var i=t.Items[o];if(e&&e[i.SKU]){var r=mFinalPrice(i)/i.Quantity;n.push({id:i.SKU,name:mpN(i),category:i.ProductLine,price:this.s.CartData.IsPriceWithTax?r:r+i.TaxAmount,variant:i.ProductColor,quantity:i.Quantity,coupon:i.Discount?i.Discount.Code:null});break}}if(window.dataLayer){a=mWS.merchOffer.init(a);var s={};e[i.SKU]&&"Remove"==e[i.SKU]?(s={currencyCode:this.GAc(),remove:{products:n}},dataLayer.push($.extend({},{event:"RemoveFromCart",ecommerce:s},a)),dataLayer.push($.extend({},{event:"e_removeFromCart",ecommerce:s},a))):(s={currencyCode:this.GAc(),add:{products:n}},dataLayer.push($.extend({},{event:e[i.SKU]+"Cart",ecommerce:s},a)),dataLayer.push($.extend({},{event:"e_addToCart",ecommerce:s},a)))}}}catch(e){}},GAc:function(){if(XML.GACurrency)for(var e=XML.GACurrency.split("#"),t=0;t<e.length;t++)if(e[t].substring(0,2)==mCountry)return e[t].substring(3)},push:function(e){window.dataLayer&&dataLayer.push(e)},GAToOmniTrk:function(e,t,n){if(!XML.GAOnOff||"Off"!=XML.GAOnOff){var a={event:"OmniTrkOnCart_"+t,value:e};n&&(a=$.extend({},a,n)),mGA.push(a)}},eVx:function(e,t){window.merchAllPages.gaEv("UI-PDP","XSell-PopIn",e),t&&$(t).unbind("click")}};function AccBoxFix(){$("#content .acc-box__info-icon").click((function(){setTimeout((function(){AddToCartClick("#merch-overlay ")}),1500)}))}function sfItm(){try{var e=location.href.toLowerCase();e.indexOf("ink-toner-paper")>-1&&($(document).on("click",".Article__button--default",(function(){var e=this.parentNode,t=e.getElementsByClassName("Article__info-sku")[0].dataset.sku,n=e.getElementsByClassName("Article__images-product")[0].src,a=e.getElementsByClassName("Article__info-title")[0].innerText,o=e.getElementsByClassName("Article__amount-select")[0].value;o&&(_MSD.Qty=o),t&&mAddToCart(t,n,a,o)})),$(document).on("click",".InstantInkArticle__button--default",(function(){var e=this.parentNode,t=$(e).closest(".InstantInkArticle")[0],n=t.getElementsByClassName("ArticleSku")[0].dataset.sku,a=t.getElementsByClassName("ArticleImage")[0].src,o=t.getElementsByClassName("ArticelTitle")[0].text,i=e.getElementsByClassName("InstantInkArticle__amount-select")[0].value;i&&(_MSD.Qty=i),n&&mAddToCart(n,a,o,i)})),$(document).on("click",".Article__button--instant-ink",(function(){var e=this.parentNode,t=e.getElementsByClassName("Article__info-sku")[0].dataset.sku,n=e.getElementsByClassName("Article__images-product")[0].src,a=e.getElementsByClassName("Article__info-title")[0].innerText,o={AddItemList:[{DynamicBundleId:"DYN_BUNDLE_0002101_"+t,Quantity:1,Description:a,ImageURL:n,ProductFamily:"00",ProductSelector:"SUP",ProductLine:"00",ProductsIncluded:[{AttachId:0,Description:a,ImageURL:n,Quantity:1,SKU:t,Sequence:1},{AttachId:1,Description:"Gratis 2 maanden Instant Ink tegoed",ImageURL:"https://www.hp.com/nl-nl/shop/Html/Merch/Images/3YN91AE-_209x189.jpg",Quantity:1,SKU:"3YN91AE",Sequence:1}]}]};t&&SERVICE.API_CART.addDynBundleToCart(o,mOnGetCartComplete,mOnServiceFailure)}))),e.indexOf("samsung-toner")>-1&&$(document).on("click",".Article__button--default",(function(){var e=this.parentNode,t=e.getElementsByClassName("Article__info-sku")[0].dataset.sku,n=e.getElementsByClassName("Article__images-product")[0].src,a=e.getElementsByClassName("Article__info-title")[0].innerText,o=e.getElementsByClassName("Article__amount-select")[0].value;o&&(_MSD.Qty=o),t&&mAddToCart(t,n,a,o)}))}catch(e){}}function mspecs(e){return e.attr("specs")?"#specs#"+encodeURIComponent(e.attr("specs")):""}function mSpecsDesc(e){var t="#specs#";try{return e.indexOf(t)>-1?e.split(t)[0]:e}catch(e){}return e}function mserviceErr(e,t){if(null!=e.Errors&&e.Errors.length>0)for(var n=0;n<e.Errors.length;n++){var a=e.Errors[n].Key.substring(0,5);"CR201"==a&&""!=_MSD.OfStk?($(_MSD.OfStk).html($(".pb-out-of-stock").html()),_MSD.OfStk=""):getXMLServiceErrors(n,e,a)}else"GetPayPalECToken"===t&&e.responseText&&(window.merchAllPages.loader.hide(),window.merchAllPages.headerDialog.show({msgId:"error",errText:JSON.parse(e.responseText).Message}));window.isExpressCheckout&&($(".js-meganav-cart-btn").removeClass("cart--has-loader"),window.merchAllPages.expressCheckout.setPayPalLoading(!1))}function getXMLServiceErrors(e,t,n){if(window.$_ERR)showXMLErr(e,t,n);else{window.merchAllPages.loader.show();var a=getHpPath()+"shop/data.aspx?q=messages&page=common&page=service&type=json&cache=1";$.when($.ajax(a)).done((function(a){window.$_ERR=a,showXMLErr(e,t,n)})).fail((function(){window.merchAllPages.loader.hide()}))}}function showXMLErr(e,t,n){var a=window.$_ERR,o=t.Errors[e].Value,i=a.service||a.messages.service||{};if(i&&i[n]&&(o=i[n]),"MQ002"==n||"MQ003"==n){var r=t.Errors[e].Value.split("|");o=o.replace("#",r[1])}window.merchAllPages.loader.hide(),window.merchAllPages.headerDialog.show({msgId:"error",errText:o}),$("html, body").animate({scrollTop:0},"slow")}function bItems(){for(var e=sBasket,t=[],n=0;n<e.length;n++)t.push({SKU:e[n].SKU,Quantity:e[n].SKU,ImageURL:e[n].IMG,Description:e[n].NAME.trim(),Quantity:e[n].QTY,OID:e[n].OID,RetainShipmentandPaymentInfo:!0});return t}function carepack(e){try{var t=$("#js-custom-checkbox-4");if(t.is(":checked")&&!$(".merch-overlay--basket-confirm").length){var n=t.attr("text").split("|")[4],a=t.attr("data-name"),o=t.attr("data-img"),i=t.attr("data-price");mAddBtn(t,1,n,o,a,e),_MSD.CPK=parseFloat(i)}else $(".basket-confirm-product-summary__cta").show()}catch(e){}}function mOnServiceFailure(e,t){"GetPayPalECToken"===t&&(window.merchAllPages.loader.hide(),window.mserviceErr(e,t)),$(".js-meganav-cart-btn").removeClass("cart--has-loader"),window.merchAllPages.expressCheckout.setPayPalLoading(!1)}function showCpk(){if(sBasket&&sBasket.length>0){var e=sBasket[0],t=".basket-confirm-extra";$(t+" "+t+"__image img").attr("src",e.IMG),$(t+" "+t+"__name").html(mSpecsDesc(e.NAME)),$(t+" .merch-product-price-now__price").html(FormatPrice(_MSD.CPK)),$(t).show(),sBasket=[],_MSD.CPK=0,addRemNo()}}function mFinalPrice(e){return e.FinalPrice?e.FinalPrice:e.NetPrice}if($(window).resize((function(){setTimeout((function(){window.navScrollList&&window.navScrollList.check()}),1),$(".s-h-top-search").length&&($(".autocomplete-suggestions").each((function(){$(this).hide()})),$(".s-h-search__input").blur())})),function(e,t,n){"use strict";var a=["CG953","CG947","CG940","CG928","CG941","CG942","CG950","CG948","CG1926","CG1962","CG1927","CG1958","CG978","CG981","CG967","CG2200","CG961","CG965","CG963","CG204","CG2505"],o=["2C","30","3Y","4L","5T","5U","5X","6A","6U","6X","7F","8A","8J","8N","9C","9F","9H","9T","AN","BO","BQ","C5","DA","DG","EZ","FD","FF","G7","G8","GA","GB","GE","GJ","GK","GL","GM","GN","GO","GQ","GR","GS","GT","I0","I1","IK","IL","IS","JP","K4","K6","MA","MB","MC","ML","MP","PQ","TA","TB","TW","TX","TY","UK","US","UV"],i=["1M","21","2G","2H","4T","52","6J","6V","7S","7V","9G","9J","FG","M5","M6","M7","M8","MN","KV","KX"],r=["4GQ49EA#ABF","4JX54EA#ABF","4JY15EA#ABF","4JY67EA#ABF","4KA50EA#ABF","4KB25EA#ABF","4MQ57EA#ABF","1UQ19EA#ABF","2PK10EA#ABF","3YA24EA#ABF","4PQ06EA#ABF","4JR96EA#ABF","4JV75EA#ABF","4GQ48EA#ABF","1PC08EA#ABF","2GR20EA#ABF","2XB03EA#ABF","4NG89EA#ABF","4NG98EA#ABF","4NH24EA#ABF","4RT76EA#ABF","4RT81EA#ABF","4XE09EA#ABF","5ER15EA#ABF","4NH21EA#ABF","4NH22EA#ABF","4NH23EA#ABF","5KS08EA#ABF","5GU96EA#ABF","4ZH64EA#ABF","4NH25EA#ABF","3RA81EA#ABF","3ER16EA#ABF","2MJ36EA#ABB","4KD71EA#ABF","4KC67EA#ABF","4EL69EA#ABF","4FJ81EA#ABF","4GQ22EA#ABF","4FN39EA#ABF","4JV94EA#ABF","4KE61EA#ABF","4JV85EA#ABF","4KJ34EA#ABF","4FJ80EA#ABF","4GQ20EA#ABF","4MH13EA#ABF","4XX94EA#ABF","3GB10EA#ABF","3FZ52EA#ABF","5EM33EA#ABF","4XY04EA#ABF","4PR82EA#ABF","4KE42EA#ABF","5EM40EA#ABF","4FJ83EA#ABF","4GK46EA#ABF","5WB32EA#ABF","5EM75EA#ABF","5EM23EA#ABF","2PF69EA#ABF","2QH46EA#ABF","2PJ98EA#ABF","2PG14EA#ABF","3YA08EA#ABF","5EU94EA#ABF","5QY19EA#ABF","5EN70EA#ABF","5ML06EA#ABF","5EN87EA#ABF","5ER02EA#ABF","2PF91EA#ABF","2QH13EA#ABF","5EN84EA#ABF","5EM30EA#ABF","4XC63EA#ABF"],s=["2C","30","3Y","4L","5T","5U","5X","6A","6U","6X","7F","8A","8J","8N","9C","9F","9H","9T","AN","BO","BQ","C5","DA","DG","EZ","FD","FF","G7","G8","GA","GB","GE","GJ","GK","GL","GM","GN","GO","GQ","GR","GS","GT","I0","I1","IK","IL","IS","JP","K4","K6","MA","MB","MC","ML","MP","PQ","TA","TB","TW","TX","TY","UK","US","UV"],c=["CG967"],l=function(){var n=t(".js-specialist-banner");this.showSwedenTopBanner()&&n.length&&(this.$window=t(e),this.$banner=n,this.$scroll=n.find(".specialist-banner__scroll"),this.hidePhoneNumber(),this.hideEmail(),this.changeTitle(),this.addCTA(),this.show())};l.prototype={constructor:l,show:function(){this.$banner.addClass("is-visible"),t(document.body).addClass("is-specialist-banner")},hide:function(){this.$banner.removeClass("is-visible"),t(document.body).removeClass("is-specialist-banner")},fixed:function(){this.$banner&&(this.y=this.$banner.offset().top,this.$window.on("scroll",this.onScroll.bind(this)))},onScroll:function(){this.$window.scrollTop()>this.y?this.$scroll.addClass("is-fixed"):this.$scroll.removeClass("is-fixed")},isCatalog:function(){var t=e.s_eVar45.split(":")[1];return a.indexOf(t)>-1},isBusinessPl:function(){var e=dataLayer[0].ecommerce.detail.products[0].category;return o.indexOf(e)>-1},isConsumerPl:function(){var e=dataLayer[0].ecommerce.detail.products[0].category;return i.indexOf(e)>-1},isOpeningHours:function(){var e=new Date;return!(e.getDay()<1||e.getDay()>5||e.getHours()<9||e.getHours()>17||17===e.getHours()&&e.getMinutes()>30)},isNetherlandsStore:function(){return"nl"===merchSFCountryCode},isFranceStore:function(){return"fr"===merchSFCountryCode&&r.indexOf(merchDataSku)>-1},isUkStore:function(){return"uk"===merchSFCountryCode},isSpainStore:function(){return"es"===merchSFCountryCode},isSwedenStore:function(){return"se"===merchSFCountryCode},isSwedenConsumerPL:function(){var e=dataLayer[0]&&dataLayer[0].ecommerce&&dataLayer[0].ecommerce.detail&&dataLayer[0].ecommerce.detail.products[0]&&dataLayer[0].ecommerce.detail.products[0].category||null;return e&&s.indexOf(e)>-1},isSwedenPublicCatalog:function(){var t=e.s_eVar45.split(":")[1];return c.indexOf(t)>-1},isSwedenBackToSchoolDate:function(){return e.merchComp.isBannerTimeValid({startDatetime:"2022-09-07T07:00:00Z",endDatetime:"2022-10-03T07:00:00Z"})},showSwedenTopBanner:function(){return this.isSwedenStore()&&this.isSwedenBackToSchoolDate()&&this.isSwedenPublicCatalog()&&!this.isSwedenConsumerPL()},changePhoneNumber:function(){var e={fr:"01 49 93 25 52",uk:"0207 660 3859"};if(e[merchSFCountryCode]){var n=t(".specialist-banner__phone"),a=e[merchSFCountryCode],o=a.replace(/\s+/g,"");n.attr("href","tel:"+o),n.find(t("span")).text(a)}},changeTitle:function(){var e={uk:"Speak to a Sales Specialist about this Home product.",se:"Back to School! Upp till 5 000 kr rabatt"};e[merchSFCountryCode]&&t(".specialist-banner__cta").text(e[merchSFCountryCode])},addCTA:function(){var e={se:{class:"specialist-banner__email",style:"text-decoration: underline;",link:"https://www.hp.com/se-sv/shop/offer.aspx?p=c-back-to-school",target:"_self",cta:"FYNDA NU"}},n='<a class="'+e[merchSFCountryCode].class+'" style="'+e[merchSFCountryCode].style+'" href="'+e[merchSFCountryCode].link+'" target="'+e[merchSFCountryCode].target+'">'+e[merchSFCountryCode].cta+"</a>";t(".specialist-banner__cta").append(n)},hidePhoneNumber:function(){t(".specialist-banner__phone").hide()},hideEmail:function(){t(".specialist-banner__email").hide()}},n.SpecialistBanner=l}(window,$,window.merchProduct=window.merchProduct||{}),showSwedenTopBanner)var specialistBanner=new window.merchProduct.SpecialistBanner;$(document).ready((function(){window.setTimeout((function(){window.merchAllPages.sticky.load()}),1)})),function(e){var t="|",n=null;function a(e){return e.Discount&&e.Discount.Code||""}function o(e){return[e.SKU,a(e),e.Quantity].join(t)}e.trackCartChange=function(i){if(function(t){return!!(e.dataLayer&&t&&Array.isArray(t.Items))}(i)){var r,s,c,l={event:"cartChange",cart_id:i.CartId,cart_value:i.Total,cart_voucher:a(i),cart_skus:(r=i.Items,r.map(o).join(t))};s=l,c=n,JSON.stringify(s)!==JSON.stringify(c)&&(n=Object.assign({},l),e.dataLayer.push(l))}}}(window),function(e,t){var n="gfe-tooltip--visible",a="gfe-tooltip--placement-bottom",o="gfe-tooltip--placement-end",i=null,r=t(".js-gfe-tooltip");function s(t){e.innerWidth>=768&&e.requestAnimationFrame((function(){var n=t.hasClass(a),i=t.hasClass(o),r=t.find(".gfe-tooltip__content").get(0).getBoundingClientRect(),s=r.top,c=r.right,l=r.height,d=r.width;s<=0&&!n&&t.addClass(a),c>=e.innerWidth&&!i&&t.addClass(o),s>l+72&&n&&t.removeClass(a),c+d+24<e.innerWidth&&i&&t.removeClass(o)}))}r.each((function(){var a=t(this),o=a.find(".js-gfe-tooltip-button");s(a),a.on("click",(function(e){e.stopPropagation()})),o.on("click",(function(){var o=t(this).data("label");a.toggleClass(n),a.hasClass(n)?(i&&t(i).removeClass(n),i=a.get(0)):i=null,o&&function(t){e.merchAllPages.gaEv("support","contact-widget",t)}(o)}))})),t(e).on("click",(function(){r.removeClass(n),i=null})),t(e).on("resize scroll",(function(){r.each((function(){s(t(this))}))}))}(window,$),function(e,t){var n={LIVE_EXPERT:"liveExpert",CHAT:"chat",FEEDBACK:"feedback"},a={expanded:!1,scriptsLoaded:!1,...Object.values(n).reduce((function(e,t){return{...e,[t]:{loaded:!1,requested:!1,disabled:!1}}}),{})};function o(e){return"en"===e}function i(e){return"CA"===e}function r(e){return"IT"===e}function s(e){return!["GB","IT"].includes(e)}function c(e,t){return{CA:o(t)?26942:38027,CH:28638,DE:28635,ES:29411,FR:28639,GB:28634,IT:28640,NL:28642,SE:28636}[e]||null}function l(e,t){!e.scriptsLoaded&&t&&(t.forEach((function(t){var n=t.attributes,a=t.key,o=t.onload,i=t.src;if(!e[a]||!e[a].disabled){var r=document.createElement("script");r.setAttribute("type","text/javascript"),r.setAttribute("async",""),r.setAttribute("src",i),n&&n.length&&n.forEach((function(e){var t=e.name,n=e.value;r.setAttribute(t,n)})),"function"==typeof o&&(r.onload=o),document.body.append(r)}})),e.scriptsLoaded=!0)}function d(e,t,n){return function(){n[t]&&(n[t].loaded?e():n[t].requested=!0)}}function u(t,a,o){var i=function(){r(o)&&e.insideFrontInterface?e.insideFrontInterface.openChatPane():e.gisApi&&e.GISAPP&&(e.gisApi.logEvent(e.gisApi.Events.CALL_CTA_CLICK),t[n.LIVE_EXPERT].available?e.gisApi.startCall((function(){console.log("GIS: Call ended.")}),e.GISAPP.stateService.getRoutingKey()):a.addClass("contact-widget-modal--opened"))};return e.onGisApiReady=function(){t[n.LIVE_EXPERT].loaded=!0,e.gisApi.checkClerkAvailability((function(){t[n.LIVE_EXPERT].available=!0}),(function(){t[n.LIVE_EXPERT].available=!1})),t.expanded&&e.gisApi&&e.gisApi.logEvent(e.gisApi.Events.CALL_CTA_SHOWN),t[n.LIVE_EXPERT].requested&&i()},d(i,n.LIVE_EXPERT,t)}function m(t,a,s){var c=function(){i(a)?e.GoMoxie&&e.GoMoxie.conciergeV2.startEngagement({widget:"chat",host:"https://h30665.www3.hp.com",portalId:o(s)?"231":"38"}):e.insideFrontInterface&&e.insideFrontInterface.openChatPane()};return i(a)?e.onMoxieChatLoaded=function(){e.conciergeReady&&e.conciergeReady.then((function(){t[n.CHAT].loaded=!0,t[n.CHAT].requested&&c()}))}:(e._inside=e._inside||[],e._inside.push({action:"bind",name:"chatavailable",callback:function(e){var o=r(a),i=t[n.CHAT].requested||o&&t[n.LIVE_EXPERT].requested;t[n.CHAT].loaded=!0,o&&(t[n.LIVE_EXPERT].loaded=!0),e&&i&&c()}})),d(c,n.CHAT,t)}function h(t,a){if(!a)return function(){};var o=function(){e.KAMPYLE_ONSITE_SDK&&e.KAMPYLE_ONSITE_SDK.showForm(a)};return e.addEventListener("neb_OnsiteLoaded",(function(){e.KAMPYLE_CONSTANT=e.KAMPYLE_CONSTANT||{},e.KAMPYLE_CONSTANT.DEFAULT_ADOBE_SDK_NAME="adobeAnalyticsObjectName",e.KAMPYLE_ADOBE_ANALYTICS&&e.KAMPYLE_ADOBE_ANALYTICS.init(),t[n.FEEDBACK].loaded=!!e.KAMPYLE_ONSITE_SDK&&e.KAMPYLE_ONSITE_SDK.loadForm(a),t[n.FEEDBACK].loaded&&t[n.FEEDBACK].requested&&o()})),d(o,n.FEEDBACK,t)}function p(t){e.merchAllPages.gaEv("support","contact-widget",t)}function f(a){var i=t("html").data("cc"),d=t("html").data("ll"),f=function(t,a){var i=o(a)?"":"?locale="+a+"_"+a.toUpperCase(),r={CA:[{key:n.LIVE_EXPERT,src:"https://gis.goinstore.com/gis/script/79201d5c-090b-4956-8238-64158bbfa577"+i},{attributes:[{name:"data-concierge-host",value:"gomoxie.solutions"},{name:"data-client",value:"hpi"},{name:"concierge",value:"1"}],key:n.CHAT,onload:function(){e.onMoxieChatLoaded()},src:"https://asset.gomoxie.solutions/concierge/hpi/client/concierge-client.js"}],CH:[{key:n.LIVE_EXPERT,src:"https://gis.goinstore.com/gis/script/0a2a9a61-3a61-4acf-a6aa-21934285a16c"+i},{key:n.CHAT,src:"https://eu2-track.inside-graph.com/gtm/IN-1000895/include.js"}],DE:[{key:n.LIVE_EXPERT,src:"https://gis.goinstore.com/gis/script/59b3950a-1346-4a82-a263-261f0b8b4f6c"},{key:n.CHAT,src:"https://eu2-track.inside-graph.com/gtm/IN-1000896/include.js"}],ES:[{key:n.LIVE_EXPERT,src:"https://gis.goinstore.com/gis/script/2ee7d929-988c-4c26-b486-72e64013e0a9"},{key:n.CHAT,src:"https://eu2-track.inside-graph.com/gtm/IN-1000897/include.js"}],FR:[{key:n.LIVE_EXPERT,src:"https://gis.goinstore.com/gis/script/e7139f08-440b-4b1f-a5a7-2ed313928a4f"},{key:n.CHAT,src:"https://eu2-track.inside-graph.com/gtm/IN-1000898/include.js"}],GB:[{key:n.LIVE_EXPERT,src:"https://gis.goinstore.com/gis/script/af2d7ce0-38fa-4ae4-a0fd-ac9cec3e5e66"},{key:n.CHAT,src:"https://eu2-track.inside-graph.com/gtm/IN-1000894/include.js"}],IT:[{key:n.CHAT,src:"https://eu2-track.inside-graph.com/gtm/IN-1000899/include.js"}],NL:[{key:n.LIVE_EXPERT,src:"https://gis.goinstore.com/gis/script/50fd94f3-f9e9-473e-9400-a6608bb9aa92"},{key:n.CHAT,src:"https://eu2-track.inside-graph.com/gtm/IN-1000900/include.js"}],SE:[{key:n.LIVE_EXPERT,src:"https://gis.goinstore.com/gis/script/dd263213-6cff-4b1c-badf-f575ec1f5ae9"},{key:n.CHAT,src:"https://eu2-track.inside-graph.com/gtm/IN-1000901/include.js"}]};return r[t]?r[t].concat({key:n.FEEDBACK,src:"https://nebula-cdn.kampyle.com/wu/541116/onsite/embed.js"}):null}(i,d),C=t("body"),g=t(".js-contact-widget-wrapper"),w=t(".js-contact-widget-button"),v=t(".js-contact-widget-option-button"),S=t(".js-contact-widget-wrapper .js-gfe-tooltip-button"),y=t(".js-contact-widget-modal"),b=t(".js-contact-widget-modal > .contact-widget-modal__wrapper"),_=t(".js-contact-widget-modal-button"),A=t(".js-contact-widget-modal-close"),P=t(".js-contact-widget-unavailable-screen"),E=t(".js-contact-widget-schedule-screen"),k={[n.LIVE_EXPERT]:{handler:u(a,y,i),label:"live-expert"},[n.CHAT]:{handler:m(a,i,d),label:"chat"},[n.FEEDBACK]:{handler:h(a,c(i,d)),label:"feedback"}};if(function(a,o){var i={[n.LIVE_EXPERT]:r(o)?[]:["faq.aspx","order.aspx","p=c-instantinkpickaplan","p=hp-print-at-your-service","sel=sup","ink-toner-paper.aspx","p=instantink"],[n.CHAT]:[],[n.FEEDBACK]:[]},c=e.location.href.toLowerCase();Object.values(n).forEach((function(e){(s(o)&&e===n.LIVE_EXPERT||i[e].some((function(e){return c.includes(e)})))&&(t('.js-contact-widget-option-button[data-action="'+e+'"]').closest("li").remove(),a[e].disabled=!0)}))}(a,i),function(n){var a=function(){e.requestAnimationFrame((function(){var a=t(".js-s-f-sticky"),o=a.hasClass("is-sticky")&&"fixed"===a.css("position")?a.innerHeight()+24+"px":null;o?n.css("bottom",o):e.isProductPage||n.removeAttr("style")}))};a(),t(e).on("resize scroll",a)}(g),s(i)){var x=e.location.href.toLowerCase(),I=["offer.aspx?p=contact-hp-store","offer.aspx?p=c-feedback"].some((function(e){return x.includes(e)})),T=t(".js-meganav .tool.support"),L=t(".js-meganav-explore-btn");I&&l(a,f),T.on("mouseenter",(function(){l(a,f)})),L.on("click",(function(){l(a,f)}))}else l(a,f);w.on("click",(function(){C.toggleClass("contact-widget-opened"),g.toggleClass("contact-widget-wrapper--expanded"),a.expanded=!a.expanded,a.expanded?(p("open"),e.gisApi&&e.gisApi.logEvent(e.gisApi.Events.CALL_CTA_SHOWN),s(i)&&l(a,f)):p("close")})),v.on("click",(function(){var e=t(this),n=!!e.closest(".js-contact-widget-wrapper").length,o=e.data("action"),i=k[o],r=i&&i.handler,s=i&&i.label;a.expanded=!1,C.removeClass("contact-widget-opened"),g.removeClass("contact-widget-wrapper--expanded"),"function"==typeof r&&r(),n&&s&&p(s)})),S.on("click",(function(){g.toggleClass("contact-widget-wrapper--tooltip-visible")})),t(e).on("click",(function(){g.removeClass("contact-widget-wrapper--tooltip-visible")})),_.on("click",(function(){E.attr("src")||E.attr("src",function(e){return{CA:"https://bookings-us.qudini.com/NG6SBSPG3CB/venues/4014/products/427/slots?from=/venues/4014&embedded=true",CH:"https://bookings.qudini.com/46DFLFNPUZ8/venues/8774/products?from=/venues/8774&embedded=true",DE:"https://bookings.qudini.com/1ZRB5WC6IVR/venues/8775/products?from=/venues/8775&embedded=true",ES:"https://bookings.qudini.com/XMZSCBF292H/venues/8776/products?from=/venues/8776&embedded=true",FR:"https://bookings.qudini.com/05QODHQHQG9/venues/8773/products?from=/venues/8773&embedded=true",GB:"https://bookings.qudini.com/WHR3GS3TWU5/venues/8212/products?from=/venues/8212&embedded=true",IT:"https://bookings.qudini.com/6R4317MRZ5B/venues/8777/products?from=/venues/8777&embedded=true",NL:"https://bookings.qudini.com/PFHFRKU6R20/venues/8778/products?from=/venues/8778&embedded=true",SE:"https://bookings.qudini.com/4DC2FAY89DY/venues/8779/products?from=/venues/8779&embedded=true"}[e]||null}(i)),b.addClass("contact-widget-modal__wrapper--wide"),P.addClass("contact-widget-modal__screen-hidden"),E.removeClass("contact-widget-modal__screen-hidden")})),A.on("click",(function(){y.removeClass("contact-widget-modal--opened"),b.removeClass("contact-widget-modal__wrapper--wide"),P.removeClass("contact-widget-modal__screen-hidden"),E.addClass("contact-widget-modal__screen-hidden")})),e.contactWidget={open:function(){C.addClass("contact-widget-opened"),g.addClass("contact-widget-wrapper--expanded"),a.expanded=!0,p("more-options"),e.gisApi&&e.gisApi.logEvent(e.gisApi.Events.CALL_CTA_SHOWN)},openLiveExpert:function(){p("live-expert-proactive"),e.gisApi&&e.GISAPP&&(a[n.LIVE_EXPERT].available?e.gisApi.startCall((function(){console.log("GIS: Call ended.")}),e.GISAPP.stateService.getRoutingKey()):y.addClass("contact-widget-modal--opened"))},state:a}}t(document).ready((function(){f(a)}))}(window,$),function(e){e.fetchRetry=function e(t,n={},a=1e3,o=3){return fetch(t,n).then((e=>{if(e.ok)return e;throw new Error("Something went wrong")})).catch((function(i){let r=o-1;if(!r)throw i;return function(e){return new Promise((t=>setTimeout(t,e)))}(a).then((()=>e(t,n,a,r)))}))}}(window),function(e){const t=btoa("AbTlxr6tBkSd5XyQ69_p3PK0CPXZG_DClwrilDuMpiEskTh_rF58ZCz0BoHPImPYq4IL_ubAvgXOA86R:ENeFrt9DD6ZUJGbtcDeLNZn3JxMscmyeyLAwDdcztOHwxK2T5EHjA7EwUN0biLZl7kThZiso1_FQDRBc"),n="pp_token";e.paypalService={getCreditOptions:function(a={}){return function(){const a=JSON.parse(e.localStorage.getItem(n));let o=a?.access_token||"",i=a?.expiresAt||"";const r=Date.now();if(o&&i>r)return new Promise((e=>e(o)));return fetchRetry("https://api-m.paypal.com/v1/oauth2/token?grant_type=client_credentials",{method:"POST",headers:{Accept:"application/json","Accept-Language":"en_US","content-type":"application/x-www-form-urlencoded",Authorization:"Basic "+t}}).then((e=>e.json())).then((t=>{function a(e){const t=new Date;return t.setSeconds(Number(t.getSeconds())+Number(e)),t.getTime()}const o={expiresAt:a(t.expires_in),access_token:t.access_token};return e.localStorage.setItem(n,JSON.stringify(o)),t.access_token}))}().then((e=>{const t={method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+e},body:JSON.stringify({credit_product_identifiers:["PP_UK_PPC"],...a})};return fetchRetry("https://api-m.paypal.com/v1/credit/calculated-financing-options",t).then((e=>e.json())).then((e=>e))}))}}}(window);