"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3866],{77215:function(e,t,l){l.d(t,{J:function(){return k}});var n,r,i,o=l(95235),a=l(7328);l(2784);var u=l(46621),c=l(58406),d=l(41857),s=l(28885),f=l(11006),v=l(87330),p=l(48840),g=l(81292),b=l(24986),m=l(91849),y=l(52322);function h(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),l.push.apply(l,n)}return l}function w(e){for(var t=1;t0?j.personalisedBuyText:j.buyText:j.soldOutText},D=e.productBlocks.filter(function(e){return e.sku}).map(function(t,l){var n,r,i,o,a,c,d,f,g,b,m,x,S;return(0,y.jsx)(u.v,w(w({externalIdentifier:t.externalIdentifier,eligibleForFulfilmentMethods:t.eligibleForFulfilmentMethods},t),{},{marketedSpecialOffer:t.marketedSpecialOffer?w(w({},t.marketedSpecialOffer),{},{title:(null===(n=t.marketedSpecialOffer)||void 0===n?void 0:n.title)||"",description:null===(r=t.marketedSpecialOffer)||void 0===r?void 0:r.description,loading:!1,onlyDisplayOfferBadge:!0,showIcon:k,i18nText:{closeI18nText:j.productI18nText.closeI18nText,freeGiftMessage:j.productI18nText.freeGiftMessage}}):void 0,image:t.image&&w(w({},t.image),{},{lazy:e.widgetIndex>1||(null===(i=t.image)||void 0===i?void 0:i.lazy)}),hoverImage:!T&&t.hoverImage?w(w({},t.hoverImage),{},{lazy:e.widgetIndex>1||t.hoverImage.lazy}):void 0,picture:null!==(o=t.picture)&&void 0!==o&&o.sources?w(w({},t.picture),{},{lazy:e.widgetIndex>1||(null===(a=t.image)||void 0===a?void 0:a.lazy)}):void 0,review:t.review?w(w({},t.review),{},{screenReaderOnlyText:P({score:null===(c=t.review)||void 0===c?void 0:c.starRating,total:null===(d=t.review)||void 0===d?void 0:d.numberOfReviews})}):void 0,button:{title:C(t),ariaLabel:j.buyAriaLabel,quickBuyTitle:j.quickBuyText,productInStock:t.inStock,disabled:!t.inStock},fulfilmentMethodIconsProps:{enableClickAndCollect:h,isCheckStock:t.isCheckStock,isOrderInStore:t.isOrderInStore,inStockLocations:t.inStockLocations,leadTime:t.leadTime,isBookable:t.isBookable,weightGroups:t.weightGroups,inStock:t.inStock,iconsAvailability:t.icons,i18nText:w(w({},j.fulfilmentMethodsText),{},{homeDelivery:w(w({},j.fulfilmentMethodsText.homeDelivery),{},{datedDelivery:(0,s.ag)("basket.item.fulfilment.leadtime",null===(g=t.leadTime)||void 0===g?void 0:g.toString()),dynamicDelivery:(S=null===(b=t.weightGroups)||void 0===b||null===(b=b[0])||void 0===b?void 0:b.toLowerCase(),(0,s.ag)("product.item.fulfilment.".concat(S)))})})},displayQuickBuyButton:v,content:null==t?void 0:t.content,brand:{name:(null===(m=t.brand)||void 0===m?void 0:m.name)||"",imageUrl:null===(x=t.brand)||void 0===x?void 0:x.imageUrl},papBadgeStyle:p.widget.productList.productItemOverlay}),l)}),L={2:[2,2,2,2],3:[1,2,3,3],default:p.widget.bestSellers.carousel.itemsPerSlide};return(null===(t=e.productBlocks)||void 0===t?void 0:t.length)===0?null:(0,y.jsxs)("div",{className:e.className,children:[e.shouldDisplayTitle&&null!==(l=e.title)&&void 0!==l&&l.text&&e.title.text.length>2?(0,y.jsx)(x,{horizontalAlignment:null===(n=e.title)||void 0===n?void 0:n.horizontalAlignment,children:e.title.text}):null,e.subtitle&&(0,y.jsx)(S,{horizontalAlignment:e.subtitle.horizontalAlignment,children:e.subtitle.text}),(0,y.jsx)(O,{children:(0,y.jsx)(b.l,{items:D,i18n:j.carouselText,itemsPerSlide:L[null==D?void 0:D.length]||L.default,autoPlay:I,hideControlsOnSingleSlide:!0,inactiveSlideFullOpacity:!0,buttonPlacement:m.J.Split,indicatorStyle:p.widget.bestSellers.carousel.indicatorStyle,enableSlidePreview:p.widget.bestSellers.carousel.enableSlidePreview,swipeable:!0,controls:{placement:null===(r=p.widget.bestSellers.carousel.controls)||void 0===r?void 0:r.placement},itemGapSpacing:null===(i=p.widget.bestSellers.carousel)||void 0===i?void 0:i.itemGapSpacing,overflow:null===(o=p.widget.bestSellers.carousel)||void 0===o?void 0:o.overflow,indicatorWrapperMargin:null===(a=p.widget.bestSellers.carousel)||void 0===a?void 0:a.indicatorWrapperMargin})})]})}},15754:function(e,t,l){t.ZP=void 0;var n=r(l(57727));function r(e){return e&&e.__esModule?e:{default:e}}n.default,r(l(69675)).default;var i=n.default;t.ZP=i},6622:function(e,t){t.__esModule=!0,t.noop=t.defaultProps=t.defaultOptions=t.defaultConfig=void 0,t.defaultOptions={},t.defaultConfig={disconnectOnLeave:!1};var l=()=>{};t.noop=l,t.defaultProps={onEnterViewport:l,onLeaveViewport:l}},57727:function(e,t,l){t.__esModule=!0,t.default=void 0;var n=l(2784),r=c(l(73463)),i=c(l(69675)),o=l(6622),a=l(52322),u=["onEnterViewport","onLeaveViewport"];function c(e){return e&&e.__esModule?e:{default:e}}function d(){return(d=Object.assign||function(e){for(var t=1;t"function"==typeof e&&!(e.prototype&&e.prototype.render),f=e=>e.prototype&&e.prototype.isReactComponent;t.default=function(e,t,l){void 0===t&&(t=o.defaultOptions),void 0===l&&(l=o.defaultConfig);var c=(0,n.forwardRef)((t,l)=>{var n=d({forwardedRef:l},f(e)&&!s(e)?{ref:l}:{});return(0,a.jsx)(e,d({},t,n))});function v(e){var{onEnterViewport:r=o.noop,onLeaveViewport:s=o.noop}=e,f=function(e,t){if(null==e)return{};var l,n,r={},i=Object.keys(e);for(n=0;n=0||(r[l]=e[l]);return r}(e,u),v=(0,n.useRef)(),{inViewport:p,enterCount:g,leaveCount:b}=(0,i.default)(v,t,l,{onEnterViewport:r,onLeaveViewport:s});return(0,a.jsx)(c,d({},f,{inViewport:p,enterCount:g,leaveCount:b},{ref:v}))}var p=e.displayName||e.name||"Component";return v.displayName="handleViewport("+p+")",(0,r.default)(v,c)}},69675:function(e,t,l){t.__esModule=!0,t.default=void 0;var n=l(2784),r=l(28316),i=l(6622);t.default=function(e,t,l,o){void 0===t&&(t=i.defaultOptions),void 0===l&&(l=i.defaultConfig),void 0===o&&(o=i.defaultProps);var{onEnterViewport:a,onLeaveViewport:u}=o,[,c]=(0,n.useState)(),d=(0,n.useRef)(),s=(0,n.useRef)(!1),f=(0,n.useRef)(!1),v=(0,n.useRef)(0),p=(0,n.useRef)(0);function g(e){var{isIntersecting:t,intersectionRatio:n}=e[0]||{},r=void 0!==t?t:n>0;if(!f.current&&r){f.current=!0,null==a||a(),v.current+=1,s.current=r,c(r);return}f.current&&!r&&(f.current=!1,null==u||u(),l.disconnectOnLeave&&d.current&&d.current.disconnect(),p.current+=1,s.current=r,c(r))}return(0,n.useEffect)(()=>{var l=d.current;return function(t){var{observerRef:l}=t,n=e.current;if(n){var i=(0,r.findDOMNode)(n);i&&(null==l||l.observe(i))}}({observerRef:l=function(e){var{observerRef:l}=e;return l||(d.current=new IntersectionObserver(g,t),d.current)}({observerRef:l})}),()=>{!function(t){var{observerRef:l}=t,n=e.current;if(n){var i=(0,r.findDOMNode)(n);i&&(null==l||l.unobserve(i))}null==l||l.disconnect(),d.current=null}({observerRef:l})}},[e.current,t,l,a,u]),{inViewport:s.current,enterCount:v.current,leaveCount:p.current}}}}]); //# sourceMappingURL=3866.ed053eaaed7e04e3.js.map