"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4597],{27564:function(n,e,t){t.d(e,{t:function(){return A}});var o,r,i,l,c,a,u,s,d,p,v,f,h,g,y,x,m=t(7328),O=t(2784),b=t(48840),S=t(81292),w=t(87330),C=t(52322),D=b.zo.div(o||(o=(0,m.Z)(["\n display: flex;\n ","\n"])),function(n){return(0,S.sD)(n.priceDirection,function(e){return n.isSticky||n.showProductSummaryPriceOnSingleLine?"\n flex-direction: column;\n align-items: flex-start;\n ":"\n gap: ".concat((0,b.W0)(1),";\n flex-direction: ").concat(e,";\n align-items: ").concat(e===b.Nm.ROW?"center":"flex-start",";\n ")})}),k=b.zo.div(r||(r=(0,m.Z)(["\n display: flex;\n gap: ",";\n ","\n"])),(0,b.W0)(1),function(n){return(0,S.sD)(n.priceDirection,function(e){return"\n flex-direction: ".concat(n.showProductSummaryPriceOnSingleLine?"row-reverse":e,";\n align-items: ").concat(e===b.Nm.ROW?"center":"flex-start",";\n ")})}),j=b.zo.div(i||(i=(0,m.Z)(["\n display: flex;\n gap: ",";\n ","\n"])),(0,b.W0)(1),function(n){return(0,S.sD)(n.priceDirection,function(n){return"\n flex-direction: ".concat(n,";\n align-items: ").concat(n===b.Nm.ROW?"center":"flex-start",";\n ")})}),P=b.zo.div(l||(l=(0,m.Z)(["\n margin: "," 0;\n ","\n"])),(0,b.W0)(2),function(n){return n.discountMessageStyle?(0,b.iv)(c||(c=(0,m.Z)(["\n ",";\n color: ",";\n text-decoration: ",";\n "])),(0,w.xv)(n.discountMessageStyle.entry,n.discountMessageStyle.style),n.discountMessageStyle.textColor,n.discountMessageStyle.textDecoration):(0,b.iv)(a||(a=(0,m.Z)(["\n ",";\n color: ",";\n "])),(0,w.xv)("bodyText","default"),function(n){return n.theme.colors.error.base})}),W=b.zo.div(u||(u=(0,m.Z)(["\n ","\n ","\n ","\n order: ",";\n"])),function(n){return(0,S.sD)(n.priceDirection,function(n){return n===b.Nm.ROW&&"order: 2;"})},function(n){return n.rrpStyle?(0,b.iv)(s||(s=(0,m.Z)(["\n ",";\n color: ",";\n "])),(0,w.xv)(n.rrpStyle.entry,n.rrpStyle.style),n.rrpStyle.textColor):(0,b.iv)(d||(d=(0,m.Z)(["\n ",";\n color: ",";\n "])),(0,w.xv)("bodyText","default"),function(n){return n.theme.colors.palette.greys.dark})},function(n){return n.background&&"\n background-color: ".concat(n.background,"; \n padding: ").concat((0,b.W0)(.25)," ").concat((0,b.W0)(1),"\n ")},function(n){return n.order||0}),M=b.zo.span(p||(p=(0,m.Z)(["\n ","\n"])),function(n){return n.rrpStyle&&(0,b.iv)(v||(v=(0,m.Z)(["\n text-decoration: ",";\n "])),n.rrpStyle.textDecoration)}),N=b.zo.span(f||(f=(0,m.Z)(["\n ","\n ","\n ","\n"])),function(n){return(0,S.sD)(n.priceDirection,function(n){return n===b.Nm.ROW&&"order: 3;"})},function(n){return n.savingStyle?(0,b.iv)(h||(h=(0,m.Z)(["\n ",";\n color: ",";\n text-decoration: ",";\n "])),(0,w.xv)(n.savingStyle.entry,n.savingStyle.style),n.savingStyle.textColor,n.savingStyle.textDecoration):(0,b.iv)(g||(g=(0,m.Z)(["\n ",";\n color: ",";\n "])),(0,w.xv)("bodyText","default"),function(n){return n.theme.colors.error.base})},function(n){return n.background&&"\n background-color: ".concat(n.background,";\n padding: ").concat((0,b.W0)(.25)," ").concat((0,b.W0)(1),"\n ")}),T=b.zo.span(y||(y=(0,m.Z)(["\n ","\n\n order: ",";\n\n ","\n ","\n"])),function(n){return(0,S.sD)(n.priceDirection,function(n){return n===b.Nm.ROW&&"order: 1; flex-shrink: 0;"})},function(n){return n.order||0},function(n){var e,t,o,r,i;return(0,b.iv)(x||(x=(0,m.Z)(["\n ",";\n text-decoration: ",";\n ","\n "])),(0,w.xv)((null===(e=n.textStyle)||void 0===e?void 0:e.entry)||"large2",(null===(t=n.textStyle)||void 0===t?void 0:t.style)||"alternate"),(null===(o=n.textStyle)||void 0===o?void 0:o.textDecoration)||"none",null!==(r=n.textStyle)&&void 0!==r&&r.textColor?"color: ".concat(null===(i=n.textStyle)||void 0===i?void 0:i.textColor,";"):"")},function(n){return n.background&&"\n background-color: ".concat(n.background,";\n padding: ").concat((0,b.W0)(.25)," ").concat((0,b.W0)(1),"\n ")}),R=function(n,e,t,o,r,i,l,c){var a,u,s,d=(!n||n.show)&&e&&!t;return(0,C.jsx)(O.Fragment,{children:d&&(0,C.jsxs)(N,{"data-testid":"product-price-save",priceDirection:o||[b.Nm.ROW],savingStyle:(null==r||null===(u=r.savings)||void 0===u?void 0:u.textStyle)||(null==n?void 0:n.textStyle),background:null==r||null===(s=r.savings)||void 0===s?void 0:s.background,children:[(null==i?void 0:i.saveLabel)&&"".concat(i.saveLabel,": "),e,(a=null==i?void 0:i.offLabel,(null==l?void 0:l.show)&&c&&" (".concat(c,"% ").concat(a||"",")"))]})})},A=function(n){var e,t,o,r,i,l,c,a,u,s,d,p,v=n.pricing.saving,f=O.useMemo(function(){var e=parseFloat(n.pricing.price.replace(/[^0-9\.,]+/g,"")),t=parseFloat(n.pricing.rrp.replace(/[^0-9\.,]+/g,""));return e===t||e>t||isNaN(e)||isNaN(t)?null:((t-e)/t*100).toFixed()},[n.pricing]);return(0,C.jsxs)(D,{"data-testid":"product-price-container",priceDirection:n.priceDirection||[b.Nm.ROW],isSticky:n.isSticky,showProductSummaryPriceOnSingleLine:n.showProductSummaryPriceOnSingleLine,children:[(0,C.jsxs)(k,{priceDirection:n.priceDirection||[b.Nm.ROW],showProductSummaryPriceOnSingleLine:n.showProductSummaryPriceOnSingleLine,children:[(e=n.hasFromPrice,t=n.pricing,o=n.priceDirection,r=n.priceTheme,i=n.i18nText,l=n.displayRRPText,(0,C.jsx)(O.Fragment,{children:v&&!e&&t.rrp&&(0,C.jsxs)(W,{"data-testid":"product-rrp-container",priceDirection:o||[b.Nm.ROW],rrpStyle:null==r?void 0:r.rrp.textStyle,background:null==r?void 0:r.rrp.background,order:null==r?void 0:r.rrp.order,children:[l&&(null==i?void 0:i.rrpLabel)&&"".concat(i.rrpLabel,": "),(0,C.jsx)(M,{"data-testid":"product-price-rrp",rrpStyle:null==r?void 0:r.rrp.textStyle,children:t.rrp})]})})),(0,C.jsxs)(T,{"data-testid":"product-price-price",order:null===(c=n.priceTheme)||void 0===c?void 0:c.price.order,priceDirection:n.priceDirection||[b.Nm.ROW],textStyle:v&&!n.hasFromPrice?null===(a=n.priceTheme)||void 0===a?void 0:a.priceWithRRP.textStyle:null===(u=n.priceTheme)||void 0===u?void 0:u.price.textStyle,children:[n.hasFromPrice&&(null===(s=n.i18nText)||void 0===s?void 0:s.fromLabel)&&"".concat(n.i18nText.fromLabel,": "),n.pricing.price]})]}),(0,C.jsxs)(j,{priceDirection:n.priceDirection||[b.Nm.ROW],children:[R(n.savings,v,n.hasFromPrice,n.priceDirection,n.priceTheme,n.i18nText,n.savingsPercentage,f),(null===(d=n.discountMessageProps)||void 0===d?void 0:d.text)&&(0,C.jsx)(P,{discountMessageStyle:null===(p=n.discountMessageProps)||void 0===p?void 0:p.textStyle,children:n.discountMessageProps.text})]})]})}},8729:function(n,e,t){t.d(e,{A:function(){return A}});var o,r,i=t(95235),l=t(2784),c=t(69363),a=t(15792),u=t(16048),s=t(31477),d=t(17258),p=t(78930),v=t(93479),f=t(31275),h=t(73557),g=t(7328),y=t(48840),x=(0,y.zo)(u.a)(r||(r=(0,g.Z)(["\n width: 100%;\n"]))),m=t(52322);function O(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),t.push.apply(t,o)}return t}function b(n){for(var e=1;e0||n.index>=0,selected:null===(t=n.selectedOptions)||void 0===t?void 0:t[n.option.key],maxDropdownHeight:n.maxDropdownHeight||"146px",width:n.dropdownWidth},n.option.label===S.Size&&{customErrorMessage:n.customErrorMessage}),{},{hideAsterixOnPDP:n.hideAsterixOnPDP}))},D=function(n){var e,t,o,r,i=n.choicesWithColour,l=(0,a.Fg)();return i.length>0&&!n.forceDropDowns&&(null===(e=null===(t=n.swatch)||void 0===t?void 0:t.show)||void 0===e||e)?(0,m.jsx)(d.m,{shape:null!==(o=n.swatchShape)&&void 0!==o?o:h.M.SQUARE,colours:i,selectedColour:null===(r=n.selectedOptions)||void 0===r?void 0:r[n.option.key],onColourChange:function(e){var t;n.onOptionChange(n.option.key,e),null===(t=n.onColourSwatchClick)||void 0===t||t.call(n)},i18nText:n.i18nText.swatch,showOnlyTwoRows:n.showOnlyTwoRows,displayColoursAsTextOnly:n.displayColoursAsTextOnly,size:l.patterns.productBlock.components.swatch.productOptionSize,noSwatchBorder:l.patterns.productBlock.components.swatch.noBorder}):null},k=function(n){var e,t=n.choicesWithColour;return(0,m.jsx)(p.k,{textStyle:n.textStyle,label:n.option.localizedKey||n.option.label,labelHidden:n.hideDropDownsLabel||!1,required:!1,ariaLabel:n.option.label,images:t,selectedImage:null===(e=n.selectedOptions)||void 0===e?void 0:e[n.option.key],onImageChange:function(e){var t;n.onOptionChange(n.option.key,e),null===(t=n.onColourSwatchClick)||void 0===t||t.call(n)},i18nText:n.i18nText.imageSwatch,hideOptionalText:!0,displayColoursAsTextOnly:n.displayColoursAsTextOnly,showAllImageSwatches:n.showAllImageSwatches})},j=function(n,e){var t;return b(b({},e&&{error:null===(t=n.customErrorMessage)||void 0===t?void 0:t.errorMessage}),{},{labelCustomComponent:n.option.attribute?(0,m.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",width:"100%"},children:n.labelCustomComponent}):null})},P=function(n,e){var t=e.choices.find(function(e){return e.key===n});return(null==t?void 0:t.title)||n},W=function(n,e,t,o){var r,i="unselected"===e||!!n.option.valueHidden;return(0,m.jsx)(v.Ee,b(b({required:null===(r=n.required)||void 0===r||r,label:w(n),textStyle:n.textStyle,selectedValue:t,labelHidden:!1,valueHidden:i,columns:2,getState:function(e){return n.onOptionChange(n.option.key,e)},horizontal:!0,defaultValue:t},j(n,o)),{},{boxClassName:n.boxClassName,hideAsterixOnPDP:n.hideAsterixOnPDP,children:n.option.choices.map(function(e,t){return(0,m.jsx)(f.X,{name:n.option.key,title:e.title,value:e.key,disabled:e.disabled,useDisabledStyling:e.useDisabledStyling,borderWidth:"2px",alternateClassName:!!n.boxClassName},t)})}))},M=function(n){var e,t,o,r=n.option.choices.filter(function(n){return n.colour}),i=null===(e=n.selectedOptions)||void 0===e?void 0:e[n.option.key],c=P(i,n.option),a=n.option.label===S.Size&&(null===(t=n.customErrorMessage)||void 0===t?void 0:t.displayError),u=(0,m.jsx)(s.N,{required:!0,textStyle:n.textStyle,children:w(n)});switch(n.option.type){case S.Dropdown:return(0,m.jsxs)(l.Fragment,{children:[n.disableColorDropdown?u:(0,m.jsx)(C,b(b({},n),{},{choicesWithColour:r})),(0,m.jsx)(D,b(b({},n),{},{choicesWithColour:r}))]});case S.Image:return(0,m.jsx)(k,b(b({},n),{},{choicesWithColour:r}));case S.Swatch:return(0,m.jsxs)(l.Fragment,{children:[u,(0,m.jsx)(d.m,{shape:null!==(o=n.swatchShape)&&void 0!==o?o:h.M.SQUARE,colours:r,selectedColour:i,onColourChange:function(e){var t;n.onOptionChange(n.option.key,e),null===(t=n.onColourSwatchClick)||void 0===t||t.call(n)},i18nText:n.i18nText.swatch,showOnlyTwoRows:n.showOnlyTwoRows,displayColoursAsTextOnly:n.displayColoursAsTextOnly})]});default:return W(n,i,c,a)}},N=t(37218);function T(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);e&&(o=o.filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})),t.push.apply(t,o)}return t}function R(n){for(var e=1;e