"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4491],{95672:function(e,t,n){n.d(t,{c:function(){return M}});var r,i,o,a,l,s,u,c,d,h,p,b,f=n(2784),g=n(20107),m=n(83438),x=n(7328),y=n(25237),v=n.n(y),w=n(34952),j=n(28999),q=n(52322),k=v()(function(){return Promise.resolve().then(n.bind(n,19532))},{ssr:!0,fallback:(0,q.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[19532]}}}),S=v()(function(){return Promise.resolve().then(n.bind(n,77475))},{ssr:!0,fallback:(0,q.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[77475]}}}),T=v()(function(){return Promise.resolve().then(n.bind(n,32206))},{ssr:!0,fallback:(0,q.jsx)("div",{style:{width:24,height:24}}),loadableGenerated:{webpack:function(){return[32206]}}}),W=g.zo.div(r||(r=(0,x.Z)(["\n ","\n\n "," {\n ","\n }\n\n width: ",";\n height: 48px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n"])),function(e){return e.alternateWidth&&"max-width: 100px;"},function(e){return(0,w.mq)(e.theme.breakpointUtils.map,"sm")},function(e){return e.alternateWidth&&"max-width: 160px;"},function(e){return e.alternateWidth?"auto":e.quantityAsLabel?"160px":"144px"}),P=(0,g.iv)(i||(i=(0,x.Z)(["\n width: 24px;\n height: 24px;\n transition: 0.3s ease;\n margin: auto;\n fill: ",";\n"])),function(e){var t=e.theme;return e.isDisabled?t.colors.palette.greys.light:t.colors.palette.greys.darker}),D=(0,g.zo)(k)(o||(o=(0,x.Z)(["\n ","\n"])),P),Z=(0,g.zo)(S)(a||(a=(0,x.Z)(["\n ","\n"])),P),O=(0,g.zo)(T)(l||(l=(0,x.Z)(["\n ","\n"])),P),z=(0,g.iv)(s||(s=(0,x.Z)(["\n height: 48px;\n width: 48px;\n transition: background 0.3s ease;\n display: flex;\n border-radius: ","px;\n border: ",";\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n &:focus {\n background-color: ",";\n border: ","px\n solid ",";\n }\n\n &:disabled {\n cursor: not-allowed;\n background: none;\n "," {\n fill: ",";\n stroke: ",";\n }\n "," {\n fill: ",";\n stroke: ",";\n }\n }\n\n outline: none;\n"])),function(e){return e.theme.elements.quantitySelector.border.borderRadius},function(e){return"".concat(e.theme.elements.quantitySelector.border.borderWidth,"px solid ").concat(e.theme.colors.palette.greys.grey)},function(e){return e.theme.colors.palette.brand.lightest},function(e){return e.theme.colors.palette.brand.lighter},function(e){return e.theme.colors.palette.brand.lightest},function(e){return e.theme.elements.quantitySelector.border.borderWidth+1},function(e){return e.theme.colors.palette.brand.base},D,function(e){return e.theme.colors.palette.greys.light},function(e){return e.theme.colors.palette.greys.light},Z,function(e){return e.theme.colors.palette.greys.light},function(e){return e.theme.colors.palette.greys.light}),L=g.zo.button(u||(u=(0,x.Z)(["\n ","\n"])),z),N=g.zo.button(c||(c=(0,x.Z)(["\n ","\n border-left: ","px solid transparent;\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n"])),z,function(e){return e.theme.elements.quantitySelector.border.borderWidth}),B=g.zo.button(d||(d=(0,x.Z)(["\n ","\n border-right: ","px solid transparent;\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n"])),z,function(e){return e.theme.elements.quantitySelector.border.borderWidth}),C=g.zo.span(h||(h=(0,x.Z)(["\n ","\n"])),(0,j.xv)("bodyText","default")),I=g.zo.label(p||(p=(0,x.Z)(["\n width: ",";\n height: 100%;\n"])),function(e){return e.alternateWidth?"fit-content":"64px"}),A=g.zo.input(b||(b=(0,x.Z)(["\n height: 100%;\n width: 100%;\n border-top: ","px\n solid ",";\n border-bottom: ","px\n solid ",";\n border-left: none;\n border-right: none;\n border-radius: 0;\n\n ","\n text-align: center;\n\n &:focus {\n border: ","px\n solid ",";\n border-radius: 0;\n }\n\n outline: none;\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n & {\n -moz-appearance: textfield;\n }\n"])),function(e){return e.theme.elements.quantitySelector.border.borderWidth},function(e){return e.theme.colors.palette.greys.grey},function(e){return e.theme.elements.quantitySelector.border.borderWidth},function(e){return e.theme.colors.palette.greys.grey},(0,j.xv)("bodyText","default"),function(e){return e.theme.elements.quantitySelector.border.borderWidth+1},function(e){return e.theme.colors.palette.brand.base}),M=function(e){var t=e.minValue,n=void 0===t?1:t,r=e.maxValue,i=e.quantityChangedCallback,o=e.quantity,a=e.i18nText,l=e.editable,s=e.className,u=e.stepValue,c=e.showInnerBorders,d=e.disabled,h=e.alternateWidth,p=f.useRef(null),b=(0,g.Fg)(),x=o===r,y=o===n,v=c?L:B,w=c?L:N,j=d||y?b.colors.palette.greys.light:b.colors.palette.greys.darker,k=d||x?b.colors.palette.greys.light:b.colors.palette.greys.darker;return(0,q.jsx)(W,{className:s,quantityAsLabel:l,alternateWidth:h,children:(0,q.jsxs)(f.Fragment,{children:[(0,q.jsx)(v,{"data-testid":"quantity-selector-decrement-button","aria-label":a.decreaseButtonLabelDynamic,disabled:y,onClick:function(e){e.preventDefault(),e.stopPropagation(),!d&&i&&i(Math.max((o||n)-(u||1),n))},children:b.elements.quantitySelector.icon.minus.svgPath?(0,q.jsx)(O,{xmlns:"http://www.w3.org/2000/svg",viewBox:b.elements.quantitySelector.icon.viewBox,width:b.elements.quantitySelector.icon.width,height:b.elements.quantitySelector.icon.height,isDisabled:d||y,children:(0,q.jsx)("path",{d:b.elements.quantitySelector.icon.minus.svgPath,fillRule:"evenodd"})}):(0,q.jsx)(D,{isDisabled:d||y,fill:j})}),l?(0,q.jsxs)(I,{alternateWidth:h,children:[(0,q.jsx)(m.T,{text:a.quantityLabel}),(0,q.jsx)(A,{"data-testid":"quantity-selector-label",ref:p,value:null===o?"":o,type:"text",pattern:"[0-9]*",inputMode:"numeric","aria-live":"assertive","aria-atomic":"true",disabled:n>r,onChange:function(e){var t=parseInt(e.currentTarget.value,10);i&&i(isNaN(t)?null:Math.min(Math.max(t,n),r))},onBlur:function(){(null===o||isNaN(o))&&i&&i(n)}})]}):(0,q.jsxs)(C,{"aria-live":"assertive","aria-atomic":"true","data-testid":"quantity-selector-value-label",children:[(0,q.jsx)(m.T,{text:a.quantityLabel}),o]}),(0,q.jsx)(w,{"data-testid":"quantity-selector-increment-button","aria-label":a.increaseButtonLabelDynamic,"aria-describedby":x?"platform-message-text":void 0,disabled:x,onClick:function(e){e.preventDefault(),e.stopPropagation(),!d&&i&&i(Math.min((o>=0?o:r)+(u||1),r))},children:b.elements.quantitySelector.icon.plus.svgPath?(0,q.jsx)(O,{xmlns:"http://www.w3.org/2000/svg",viewBox:b.elements.quantitySelector.icon.viewBox,width:b.elements.quantitySelector.icon.width,height:b.elements.quantitySelector.icon.height,isDisabled:d||x,children:(0,q.jsx)("path",{d:b.elements.quantitySelector.icon.plus.svgPath,fillRule:"evenodd"})}):(0,q.jsx)(Z,{isDisabled:d||x,fill:k})})]})})}},26726:function(e,t,n){n.d(t,{r:function(){return c}});var r=n(95235),i=n(8529),o=n(2784),a=n(49698),l=n(52322);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var u=function(e){window.localStorage.removeItem(e)},c=function(e){var t=o.useState(),n=(0,i.Z)(t,2),c=n[0],d=n[1],h=o.useState(!0),p=(0,i.Z)(h,2),b=p[0],f=p[1],g=e.focusRef?e.focusRef:o.createRef();return o.useEffect(function(){(null==c?void 0:c.text)===""||void 0===(null==c?void 0:c.text)||null===g||null===g.current||null===e.disableScroll||e.disableScroll||window.scrollTo(0,g.current.offsetTop-g.current.clientHeight-16-24)},[c]),o.useEffect(function(){b?f(!1):d({text:e.message,type:e.type})},[e.message]),o.useEffect(function(){var t,n=![/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/,/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/,/MSIE\s(7\.0)/].some(function(e){return window.navigator.userAgent.match(e)})&&window.localStorage.getItem(e.flashMessageId);if(n){var i=function(e){for(var t=1;t0&&e.infoText.infoTextList.map(function(e,t){return(0,x.jsxs)("li",{style:{display:"flex",marginBottom:"".concat((0,l.W0)(2)),marginTop:0},children:[(0,x.jsx)(g,{viewBox:"0 0 24 24"}),(0,x.jsx)("div",{style:{paddingLeft:"".concat((0,l.W0)(2))},children:e})]},t)})]}),e.subsText&&(0,x.jsx)(b,{children:e.subsText})]})}},85282:function(e,t,n){n.d(t,{x:function(){return a}}),n(2784);var r=n(63199),i=n(29863),o=n(52322),a=function(e){var t,n,a,l,s={frequencyDropdownAriaLabel:(0,r.ag)("basket.subscriptiondropdown.label.text"),noAvailableFrequencyText:(0,r.ag)("product.subscriptions.nofrequency.available.text")},u=(null===(t=e.availableFrequencies)||void 0===t||null===(t=t.find(function(t){return t.key===e.contractValue}))||void 0===t?void 0:t.displayText)||(null===(n=e.availableFrequencies)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.displayText)||s.noAvailableFrequencyText;return(0,o.jsx)(i.a,{label:e.title,useDefaultDropdownWidth:e.useDefaultDropdownWidth,width:e.width,placeholder:u,removeLabelMargin:!0,selected:e.contractValue,labelHidden:!1,disabled:!(null!==(a=e.availableFrequencies)&&void 0!==a&&a.length),"aria-label":s.frequencyDropdownAriaLabel,options:(null===(l=e.availableFrequencies)||void 0===l?void 0:l.length)&&e.availableFrequencies||[],onChange:function(t){t.value&&(e.onChangeValue&&e.onChangeValue(t.key.toString()),e.updateSubscriptionCallback&&e.updateSubscriptionCallback(t.key.toString()))},selectedIconPosition:i.q.RIGHT})}}}]); //# sourceMappingURL=4491-8fa3bc8769ced1bb.js.map