(window.webpackJsonp=window.webpackJsonp||[]).push([[334],{P6hd:function(e,i,t){"use strict";t.r(i),t.d(i,"ProductsShowcaseRenderer",(function(){return x}));var n,o,r=t("zjfJ"),l=t("KD1n"),a=t("ERkP"),c=t("1U1M"),d=t("eDQd"),u=t("oCss"),p=t("aMFI"),s=t("jiAW"),v=t("dNoy"),f=t("CqS1"),m=t("qdM3"),g=t("AhBJ"),O=t("H5qd"),y=t.n(O)()(n||(n=Object(l.a)(["\n query ProductShowcaseQuery(\n $path: PagePath!\n $id: ID!\n $input: ProductListInput!\n $currency: Currency!\n $shippingDestination: Country!\n ) {\n productsShowcaseList(\n path: $path\n id: $id\n input: $input\n currency: $currency\n shippingDestination: $shippingDestination\n ) @client {\n __typename\n products {\n __typename\n sku\n url\n title\n defaultVariant(\n options: {\n currency: $currency\n shippingDestination: $shippingDestination\n }\n ) {\n price(\n currency: $currency\n shippingDestination: $shippingDestination\n ) {\n price {\n amount\n displayValue\n }\n rrp {\n amount\n displayValue\n }\n }\n }\n cheapestVariant(\n currency: $currency\n shippingDestination: $shippingDestination\n ) {\n price(\n currency: $currency\n shippingDestination: $shippingDestination\n ) {\n price {\n amount\n displayValue\n }\n rrp {\n amount\n displayValue\n }\n }\n }\n mostExpensiveVariant(\n currency: $currency\n shippingDestination: $shippingDestination\n ) {\n price(\n currency: $currency\n shippingDestination: $shippingDestination\n ) {\n price {\n amount\n displayValue\n }\n rrp {\n amount\n displayValue\n }\n }\n }\n reviews {\n __typename\n total\n averageScore\n }\n images(limit: 1) {\n __typename\n largeProduct\n }\n marketedSpecialOffer {\n title {\n content {\n type\n content\n }\n }\n description {\n content {\n type\n content\n }\n }\n landingPageLink {\n text\n url\n openExternally\n noFollow\n }\n freeGiftProduct {\n sku\n images(limit: 1) {\n largeProduct\n }\n title\n price(\n currency: $currency\n shippingDestination: $shippingDestination\n ) {\n rrp {\n displayValue\n }\n }\n }\n }\n inStock\n }\n }\n }\n"]))),k=t("Qe7x"),h=a.createElement;function b(e,i){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);i&&(n=n.filter((function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable}))),t.push.apply(t,n)}return t}function w(e){for(var i=1;i1?{lazy:!0,fetchPriority:"auto"}:{lazy:!1,fetchPriority:"high"},l=r.lazy,a=r.fetchPriority,s={closeI18nText:{closeAriaLabel:Object(f.a)("general.modal.close.button.arialabel"),closeLabel:Object(f.a)("general.modal.close.button.label")},freeGiftMessage:Object(f.a)("product.marketedspecialoffer.freegift.text"),rrpText:Object(f.a)("product.price.rrp.text"),swatchTooltipUnavailable:Object(f.a)("product.productoptions.swatch.tooltip.unavailable.text"),swatchTooltipCloseButton:Object(f.a)("product.productoptions.swatch.tooltip.close.text"),fulfilmentMethodsText:{clickAndCollect:{isAvailable:Object(f.a)("product.list.clickandcollect.text"),isNotAvailable:Object(f.a)("product.clickandcollect.unavailable.text")},homeDelivery:{isAvailable:Object(f.a)("product.list.delivery.available"),isNotAvailable:Object(f.a)("product.delivery.home.unavailable.text"),isOutOfStock:Object(f.a)("clickandcollect.store.availability.outofstock"),nextDayDelivery:Object(f.a)("product.list.item.nextdaydelivery"),oneManDelivery:Object(f.a)("product.list.fulfilment.1man.nextdaydeliveryavailable"),outOfGaugeDelivery:Object(f.a)("product.list.fulfilment.outofgauge.nameddaydeliveryavailable")},storeDelivery:{isAvailable:Object(f.a)("product.delivery.store.available.text")},orderInStore:{isAvailable:Object(f.a)("product.item.fulfilment.orderinstore.available.text")}}};if("sponsoredProducts"===e.__typename){var O,b,x,T;if((!e.productBlockOne||!e.productBlockTwo)&&(!e.ProductOne||!e.ProductTwo))return null;var j=[e.productBlockOne?w(w({},e.productBlockOne),{},{title:{value:e.productBlockOne.title},price:w(w({},e.productBlockOne.price),{},{rrpText:s.rrpText}),review:e.productBlockOne.reviews&&{starRating:null===(O=e.productBlockOne.reviews)||void 0===O?void 0:O.averageScore,numberOfReviews:null===(b=e.productBlockOne.reviews)||void 0===b?void 0:b.total},marketedSpecialOffer:e.productBlockOne.marketedSpecialOffer?w(w({},e.productBlockOne.marketedSpecialOffer),{},{i18nText:s,title:e.productBlockOne.marketedSpecialOffer.titleText,description:e.productBlockOne.marketedSpecialOffer.descriptionText,onlyDisplayOfferBadge:!0}):void 0}):null,e.productBlockTwo?w(w({},e.productBlockTwo),{},{title:{value:e.productBlockTwo.title},price:w(w({},e.productBlockTwo.price),{},{rrpText:s.rrpText}),review:e.productBlockTwo.reviews&&{starRating:null===(x=e.productBlockTwo.reviews)||void 0===x?void 0:x.averageScore,numberOfReviews:null===(T=e.productBlockTwo.reviews)||void 0===T?void 0:T.total},marketedSpecialOffer:e.productBlockTwo.marketedSpecialOffer?w(w({},e.productBlockTwo.marketedSpecialOffer),{},{i18nText:s,title:e.productBlockTwo.marketedSpecialOffer.titleText,description:e.productBlockTwo.marketedSpecialOffer.descriptionText,onlyDisplayOfferBadge:!0}):void 0}):null].filter((function(e){return null!==e})),D=e.ProductOne&&e.ProductTwo?[e.ProductOne.product,e.ProductTwo.product].map((function(i,t){var o,r,c,u,v,m,O,y,h,b,P,x,T,j,D,B,L,V,R,A,C,I,$,E,F,M,U,_,z,G,H,N,W=e["Product".concat(0===t?"One":"Two")],q=(null===(o=i.defaultVariant)||void 0===o?void 0:o.price)||(null===(r=i.cheapestVariant)||void 0===r?void 0:r.price),J=null===(c=i.options.find((function(e){return e.key===S.COLOUR})))||void 0===c?void 0:c.choices.reduce((function(e,t){var n,o,r=null===(n=i.variants.find((function(e){return e.inStock&&e.choices.find((function(e){return e.optionKey===S.COLOUR&&e.key===t.key}))})))||void 0===n?void 0:null===(o=n.product)||void 0===o?void 0:o.url;return r&&t.colour&&e.push(w({href:r,colour:t.colour},t)),e}),[]),Q=(null===W||void 0===W?void 0:W.eligibleForFulfilmentMethods)&&{homeDelivery:Boolean(null===(u=W.eligibleForFulfilmentMethods)||void 0===u?void 0:u.includes(d.r.HomeDelivery)),storeAvailable:Boolean(null===(v=W.eligibleForFulfilmentMethods)||void 0===v?void 0:v.includes(d.r.CollectInStore)),storeDelivery:Boolean(null===(m=W.eligibleForFulfilmentMethods)||void 0===m?void 0:m.includes(d.r.DeliverToStore))};return{sku:null===W||void 0===W?void 0:W.sku.toString(),title:{value:null===W||void 0===W?void 0:W.title},externalIdentifier:(null===W||void 0===W?void 0:W.externalIdentifier)||void 0,url:i.url,fulfilmentMethodIconsProps:{iconsAvailability:Q||void 0,isCheckStock:null===W||void 0===W?void 0:W.isCheckStock,isOrderInStore:null===W||void 0===W?void 0:W.isOrderInStore,inStock:null===W||void 0===W?void 0:W.inStock,i18nText:w(w({},s.fulfilmentMethodsText),{},{homeDelivery:w(w({},s.fulfilmentMethodsText.homeDelivery),{},{datedDelivery:Object(f.a)("basket.item.fulfilment.leadtime",null===(O=W.leadTime)||void 0===O?void 0:O.toString()),dynamicDelivery:(N=null===(y=W.weightGroups)||void 0===y?void 0:null===(h=y[0])||void 0===h?void 0:h.toLowerCase(),Object(f.a)("product.item.fulfilment.".concat(N)))})}),leadTime:W.leadTime,weightGroups:W.weightGroups,isBookable:W.isBookable,inStockLocations:W.inStockLocations},price:(null===q||void 0===q?void 0:q.price.displayValue)?{price:{defaultPrice:q.price.displayValue,minPrice:null===(b=i.cheapestVariant)||void 0===b?void 0:null===(P=b.price)||void 0===P?void 0:P.price.displayValue,maxPrice:null===(x=i.mostExpensiveVariant)||void 0===x?void 0:null===(T=x.price)||void 0===T?void 0:T.price.displayValue},rrp:{defaultPrice:Object(g.a)(q),minPrice:(null===(j=i.cheapestVariant)||void 0===j?void 0:null===(D=j.price)||void 0===D?void 0:D.rrp)&&Object(g.a)(i.cheapestVariant.price),maxPrice:(null===(B=i.mostExpensiveVariant)||void 0===B?void 0:null===(L=B.price)||void 0===L?void 0:L.rrp)&&Object(g.a)(i.mostExpensiveVariant.price)},rrpText:s.rrpText}:void 0,image:{lazy:l,fetchPriority:a,urls:{largeProduct:(null===(V=i.images)||void 0===V?void 0:null===(R=V[0])||void 0===R?void 0:R.largeProduct)||(null===W||void 0===W?void 0:null===(A=W.images)||void 0===A?void 0:null===(C=A[0])||void 0===C?void 0:C.largeProduct)},isAmp:!1},hoverImage:!n&&i.images.length>1?{urls:{largeProduct:(null===(I=i.images)||void 0===I?void 0:null===($=I[1])||void 0===$?void 0:$.largeProduct)||(null===W||void 0===W?void 0:null===(E=W.images)||void 0===E?void 0:null===(F=E[1])||void 0===F?void 0:F.largeProduct)},isAmp:!1,lazy:!1,fetchPriority:"low"}:void 0,review:i.reviews&&{numberOfReviews:i.reviews.total||0,starRating:i.reviews.averageScore,screenReaderOnlyText:""},swatch:J?{shape:p.a.CIRCLE,size:p.b.Small,colours:J,i18nText:{unavailableText:s.swatchTooltipUnavailable,closeButtonText:s.swatchTooltipCloseButton}}:void 0,marketedSpecialOffer:(null===W||void 0===W?void 0:W.marketedSpecialOffer)?{i18nText:s,title:null===(M=W.marketedSpecialOffer.title)||void 0===M?void 0:M.content[0].content,description:(null===(U=W.marketedSpecialOffer.description)||void 0===U?void 0:U.content[0].content)||"",landingPageLink:W.marketedSpecialOffer.landingPageLink&&{text:W.marketedSpecialOffer.landingPageLink.text,url:W.marketedSpecialOffer.landingPageLink.url,openExternally:W.marketedSpecialOffer.landingPageLink.openExternally||!1,noFollow:W.marketedSpecialOffer.landingPageLink.noFollow||!1}||void 0,loading:!1,onlyDisplayOfferBadge:!0,shouldRemoveScrollLock:!1}:void 0,brand:{name:null===W||void 0===W?void 0:null===(_=W.product)||void 0===_?void 0:null===(z=_.brand)||void 0===z?void 0:z.name,imageUrl:null===W||void 0===W?void 0:null===(G=W.product)||void 0===G?void 0:null===(H=G.brand)||void 0===H?void 0:H.imageUrl},content:null===W||void 0===W?void 0:W.content,powerReviewGroups:Object(k.c)(null===W||void 0===W?void 0:W.content)}})):[],B={showPdpLinkWhenOutOfStock:t,productList:j.length>0?j:D,alignText:"left",leftSideContent:e.headline&&e.text?{title:{text:e.headline,useH1:e.useH1||void 0},subtitle:{text:e.text},ctaButton:e.ctaOne&&e.ctaOneURL?{text:e.ctaOne,link:e.ctaOneURL,ariaLabel:e.ctaOneAriaLabel||void 0}:void 0}:void 0,orientation:u.a.HORIZONTAL,carouselView:!1,contentAlignments:{gridColumns:12,gridItemColumns:{firstItem:{colStart:1,colSpan:[12,12,12,8],rowStart:1},secondItem:{colStart:[1,1,1,9],colSpan:12,rowStart:[2,2,2,1]}},productContent:{titleAlignment:"left",display:"flex",directions:["column","row"],style:{width:"50%",sidePadding:1}}}};return h(P,B)}if("promoproductslider"===e.__typename){var L,V=Object(m.g)(),R=Object(m.e)(),A=Object(c.d)(y,{variables:w(w({},R),{},{path:e.pagePath,id:e.id,input:w(w({},R),{},{facets:[],sort:d.y.Relevance,limit:12,offset:0})})}).data,C=null===A||void 0===A?void 0:null===(L=A.productsShowcaseList)||void 0===L?void 0:L.products;if(!e.featuredImage||!C)return null;var I=C.map((function(e){var i,t,o,r,l,a,c,d,u,p,v,f,m=(null===(i=e.defaultVariant)||void 0===i?void 0:i.price)||(null===(t=e.cheapestVariant)||void 0===t?void 0:t.price);return{sku:e.sku.toString(),title:{value:e.title},url:e.url,price:(null===m||void 0===m?void 0:m.price.displayValue)?{price:{defaultPrice:m.price.displayValue,minPrice:null===(o=e.cheapestVariant)||void 0===o?void 0:null===(r=o.price)||void 0===r?void 0:r.price.displayValue,maxPrice:null===(l=e.mostExpensiveVariant)||void 0===l?void 0:null===(a=l.price)||void 0===a?void 0:a.price.displayValue},rrp:{defaultPrice:Object(g.a)(m),minPrice:(null===(c=e.cheapestVariant)||void 0===c?void 0:null===(d=c.price)||void 0===d?void 0:d.rrp)&&Object(g.a)(e.cheapestVariant.price),maxPrice:(null===(u=e.mostExpensiveVariant)||void 0===u?void 0:null===(p=u.price)||void 0===p?void 0:p.rrp)&&Object(g.a)(e.mostExpensiveVariant.price)},rrpText:s.rrpText}:void 0,image:{urls:{largeProduct:e.images[0].largeProduct},isAmp:!1},hoverImage:!n&&e.images.length>1?{urls:{largeProduct:e.images[1].largeProduct},isAmp:!1}:void 0,review:e.reviews&&{numberOfReviews:e.reviews.total||0,starRating:e.reviews.averageScore,screenReaderOnlyText:""},marketedSpecialOffer:e.marketedSpecialOffer&&{i18nText:s,title:null===(v=e.marketedSpecialOffer.title)||void 0===v?void 0:v.content[0].content,description:(null===(f=e.marketedSpecialOffer.description)||void 0===f?void 0:f.content[0].content)||"",landingPageLink:e.marketedSpecialOffer.landingPageLink&&{text:e.marketedSpecialOffer.landingPageLink.text,url:e.marketedSpecialOffer.landingPageLink.url,openExternally:e.marketedSpecialOffer.landingPageLink.openExternally||!1,noFollow:e.marketedSpecialOffer.landingPageLink.noFollow||!1}||void 0,loading:!1,onlyDisplayOfferBadge:!0,shouldRemoveScrollLock:!1}||void 0,inStock:e.inStock}})),$={showPdpLinkWhenOutOfStock:t,hideProductShowCaseMarketedSpecialOfferBadge:o,image:{source:e.featuredImage,imageUrl:e.imageURL||void 0,alt:e.imageAltText||""},productList:I,displayProductButton:!0,title:e.widgetTitle?{text:e.widgetTitle}:void 0,subtitle:e.widgetSubtitle?{text:e.widgetSubtitle}:void 0,orientation:e.orientation||u.a.HORIZONTAL,carouselView:!0,contentAlignments:{gridColumns:12,productContent:{titleAlignment:V.widget.productsShowcase.titleAlignment,directions:["column"]}}};return h(P,$)}return null}}}]); //# sourceMappingURL=334.c0290391d58b05c03d5e.js.map