"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1662],{41662:function(e,t,n){n.r(t),n.d(t,{QuickBuyModalPresenter:function(){return eB}});var o,i,r=n(95235),a=n(8529),l=n(2784),s=n(53055),c=n(60418),u=n(80131),d=n(68544),p=n(77316),b=n(97209),v=n(10013),h=n(27564),f=n(43897),y=n(35016),g=n(35246),O=n(69363),k=n(15792),x=n(16048),m=n(31477),T=n(17258),w=n(78930),C=n(93479),S=n(31275),P=n(73557),j=n(7328),B=n(48840),D=(0,B.zo)(x.a)(i||(i=(0,j.Z)(["\n width: 100%;\n"]))),M=n(52322);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function I(e){for(var t=1;t0||e.index>=0,selected:null===(n=e.selectedOptions)||void 0===n?void 0:n[e.option.key],maxDropdownHeight:e.maxDropdownHeight||"146px",width:e.dropdownWidth},e.option.label===q.Size&&{customErrorMessage:e.customErrorMessage}),{},{hideAsterixOnPDP:e.hideAsterixOnPDP}))},V=function(e){var t,n,o,i,r=e.choicesWithColour,a=(0,k.Fg)();return r.length>0&&!e.forceDropDowns&&(null===(t=null===(n=e.swatch)||void 0===n?void 0:n.show)||void 0===t||t)?(0,M.jsx)(T.m,{shape:null!==(o=e.swatchShape)&&void 0!==o?o:P.M.SQUARE,colours:r,selectedColour:null===(i=e.selectedOptions)||void 0===i?void 0:i[e.option.key],onColourChange:function(t){var n;e.onOptionChange(e.option.key,t),null===(n=e.onColourSwatchClick)||void 0===n||n.call(e)},i18nText:e.i18nText.swatch,showOnlyTwoRows:e.showOnlyTwoRows,displayColoursAsTextOnly:e.displayColoursAsTextOnly,size:a.patterns.productBlock.components.swatch.productOptionSize,noSwatchBorder:a.patterns.productBlock.components.swatch.noBorder}):null},R=function(e){var t,n=e.choicesWithColour;return(0,M.jsx)(w.k,{textStyle:e.textStyle,label:e.option.localizedKey||e.option.label,labelHidden:e.hideDropDownsLabel||!1,required:!1,ariaLabel:e.option.label,images:n,selectedImage:null===(t=e.selectedOptions)||void 0===t?void 0:t[e.option.key],onImageChange:function(t){var n;e.onOptionChange(e.option.key,t),null===(n=e.onColourSwatchClick)||void 0===n||n.call(e)},i18nText:e.i18nText.imageSwatch,hideOptionalText:!0,displayColoursAsTextOnly:e.displayColoursAsTextOnly,showAllImageSwatches:e.showAllImageSwatches})},Q=function(e,t){var n;return I(I({},t&&{error:null===(n=e.customErrorMessage)||void 0===n?void 0:n.errorMessage}),{},{labelCustomComponent:e.option.attribute?(0,M.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",width:"100%"},children:e.labelCustomComponent}):null})},N=function(e,t){var n=t.choices.find(function(t){return t.key===e});return(null==n?void 0:n.title)||e},W=function(e,t,n,o){var i,r="unselected"===t||!!e.option.valueHidden;return(0,M.jsx)(C.Ee,I(I({required:null===(i=e.required)||void 0===i||i,label:E(e),textStyle:e.textStyle,selectedValue:n,labelHidden:!1,valueHidden:r,columns:2,getState:function(t){return e.onOptionChange(e.option.key,t)},horizontal:!0,defaultValue:n},Q(e,o)),{},{boxClassName:e.boxClassName,hideAsterixOnPDP:e.hideAsterixOnPDP,children:e.option.choices.map(function(t,n){return(0,M.jsx)(S.X,{name:e.option.key,title:t.title,value:t.key,disabled:t.disabled,useDisabledStyling:t.useDisabledStyling,borderWidth:"2px",alternateClassName:!!e.boxClassName},n)})}))},Z=function(e){var t,n,o,i=e.option.choices.filter(function(e){return e.colour}),r=null===(t=e.selectedOptions)||void 0===t?void 0:t[e.option.key],a=N(r,e.option),s=e.option.label===q.Size&&(null===(n=e.customErrorMessage)||void 0===n?void 0:n.displayError),c=(0,M.jsx)(m.N,{required:!0,textStyle:e.textStyle,children:E(e)});switch(e.option.type){case q.Dropdown:return(0,M.jsxs)(l.Fragment,{children:[e.disableColorDropdown?c:(0,M.jsx)(L,I(I({},e),{},{choicesWithColour:i})),(0,M.jsx)(V,I(I({},e),{},{choicesWithColour:i}))]});case q.Image:return(0,M.jsx)(R,I(I({},e),{},{choicesWithColour:i}));case q.Swatch:return(0,M.jsxs)(l.Fragment,{children:[c,(0,M.jsx)(T.m,{shape:null!==(o=e.swatchShape)&&void 0!==o?o:P.M.SQUARE,colours:i,selectedColour:r,onColourChange:function(t){var n;e.onOptionChange(e.option.key,t),null===(n=e.onColourSwatchClick)||void 0===n||n.call(e)},i18nText:e.i18nText.swatch,showOnlyTwoRows:e.showOnlyTwoRows,displayColoursAsTextOnly:e.displayColoursAsTextOnly})]});default:return W(e,r,a,s)}},H=n(37218);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function F(e){for(var t=1;t0&&(0,M.jsx)(G.oh,{children:(0,M.jsx)(g.$,{tags:o.tags})})]}):null},options:function(e){var t,n,o,i,r=e.product,a=e.quickBuyModalTheme,l=e.inStockComponent,s=e.selectedOptions,c=e.options,u=e.i18nText,d=e.setSelectedOptionsCallback,p=e.hideAsterixOnPDP;return(0,M.jsxs)("div",{style:{gridArea:y.p.OPTIONS},children:[(null==r||null===(t=r.subscriptionData)||void 0===t?void 0:t.displaySubscription)&&(0,M.jsx)(v.Y,Y(Y({},r.subscriptionData.subscriptionPurchaseOptions),{},{selectedOptions:s,onOptionChange:d})),!(null!=r&&null!==(n=r.subscriptionData)&&void 0!==n&&n.displaySubscriptionChoicesOnly)&&(0,M.jsx)(U,{options:c,selectedOptions:s,onOptionChange:d,hideAsterixOnPDP:p,i18nText:u,order:null===(o=a.productOptions)||void 0===o?void 0:o.order,dropdownWidth:null===(i=a.productOptions)||void 0===i||null===(i=i.dropdown)||void 0===i?void 0:i.width,showOnlyTwoRows:a.swatch.showOnlyTwoRows,displayColoursAsTextOnly:a.swatch.displayColoursAsTextOnly}),u.failedToAddToBasketError&&(0,M.jsx)(G.gY,{children:(0,M.jsx)(G.Vv,{error:u.failedToAddToBasketError,id:"quick-buy-add-to-basket-error-".concat(null==r?void 0:r.sku)})}),l&&l]})},pricing:function(e,t,n){var o;return(0,M.jsx)("div",{style:{gridArea:y.p.PRICING},children:(0,M.jsxs)(G.tw,{flexDirection:e.quickBuyModalTheme.pricing.flexDirection,alignItems:e.quickBuyModalTheme.pricing.alignItems,children:[e.pricing&&(0,M.jsx)(h.t,{pricing:e.pricing,priceDirection:e.quickBuyModalTheme.priceDirection,savings:e.quickBuyModalTheme.pricing.savings,i18nText:{saveLabel:e.i18nText.saveLabel,rrpLabel:e.i18nText.rrpLabel},priceTheme:e.quickBuyModalTheme.pricing.productPrice,discountMessageProps:{text:e.i18nText.subscriptionContractDiscountMessage,textStyle:null===(o=e.quickBuyModalTheme.pricing)||void 0===o||null===(o=o.discountMessage)||void 0===o?void 0:o.textStyle}}),!e.hideQuantitySelector&&(0,M.jsxs)("div",{style:{marginBottom:"".concat((0,B.W0)(2))},children:[(0,M.jsx)(G.Ds,{children:e.quantitySelector.i18nText.quantityLabel}),(0,M.jsx)(f.c,Y(Y({},e.quantitySelector),{},{quantityChangedCallback:function(e){e&&n(e)},editable:!0,quantity:t}))]})]})})},addToBag:function(e,t){var n,o,i,r,a,l,s=J({selectedQuantity:t,enablePreselectedProductVariant:e.enablePreselectedProductVariant,product:e.product,options:e.options,selectedOptions:e.selectedOptions}),c=(null===(n=e.product)||void 0===n||null===(n=n.subscriptionData)||void 0===n?void 0:n.enableSubscriptionContracts)&&(null===(o=e.product.subscriptionData.subscriptionPurchaseOptions)||void 0===o?void 0:o.activeTabIndex)===1&&!!e.product.subscriptionData.subscriptionPurchaseOptions.subscriptionContracts.length,u=(null===(i=e.product)||void 0===i||null===(i=i.subscriptionData)||void 0===i?void 0:i.enableSubscriptionContracts)&&((null===(r=e.product)||void 0===r||null===(r=r.subscriptionData)||void 0===r?void 0:r.productInBasketWithSubscriptionContract)||(null===(a=e.product)||void 0===a||null===(a=a.subscriptionData)||void 0===a?void 0:a.productInBasketWithoutSubscriptionContract)&&!!(null!==(l=e.product.subscriptionData.subscriptionPurchaseOptions)&&void 0!==l&&l.subscriptionContracts.length));return(0,M.jsx)($,Y({allowAddToBasket:!!s,allowAddToBasketAsSubscription:!!c,disableAddToBasketSubscriptions:!!u,selectedQuantity:t},e))},availability:function(e){return(0,M.jsx)("div",{style:{gridArea:y.p.AVAILABILITY},children:e.i18nText.availabilityMessage&&(0,M.jsx)(G.s,{children:e.i18nText.availabilityMessage})})},viewProduct:function(e){return(0,M.jsx)("div",{style:{gridArea:y.p.VIEWPRODUCT},children:e.links&&(0,M.jsx)(G.bi,{emphasis:"medium",href:e.links.productUrl,renderedAs:"a",onClick:function(t){var n;(null===(n=e.callbacks)||void 0===n?void 0:n.viewMoreInformationClicked)&&e.callbacks.viewMoreInformationClicked(t),e.setOpen&&e.setOpen(!1)},children:e.i18nText.viewMoreInformation})})}},$=function(e){return(0,M.jsx)("div",{style:{gridArea:y.p.ADDTOBAG},children:(0,M.jsx)(G.l1,{emphasis:"high",disabled:!e.allowAddToBasket||e.quantitySelector.maxValue<1||e.disableAddToBasketSubscriptions,onClick:function(){if(e.allowAddToBasket&&e.selectedQuantity&&e.selectedOptions){if(e.allowAddToBasketAsSubscription){var t;e.callbacks.addToBasketWithContractsCallback&&e.callbacks.addToBasketWithContractsCallback(e.selectedQuantity,null===(t=e.product)||void 0===t||null===(t=t.subscriptionData)||void 0===t||null===(t=t.subscriptionPurchaseOptions)||void 0===t?void 0:t.selectedFrequencyId)}else e.callbacks.addedToBasketClicked(e.selectedOptions,e.selectedQuantity)}},children:e.i18nText.addToBasket})})},ee=function(e){var t=(0,_.G)();return(0,M.jsx)(G.OO,{children:e.components[t].map(function(t){return t?X[t](e.quickBuyModalContentProps,e.selectedQuantity,e.setSelectedQuantity):null})})},et=function(e){var t,n,o,i=(null===(t=e.subscriptionData)||void 0===t?void 0:t.productInBasketWithSubscriptionContract)||(null===(n=e.subscriptionData)||void 0===n?void 0:n.productInBasketWithoutSubscriptionContract)&&!!(null!==(o=e.subscriptionData)&&void 0!==o&&null!==(o=o.subscriptionPurchaseOptions)&&void 0!==o&&o.subscriptionContracts.length);return(0,M.jsxs)(l.Fragment,{children:[i&&(0,M.jsx)(G.o7,{text:e.i18nText.subscriptionInfoMessageText,type:"info"}),!e.quantitySelectorMaxValue&&(0,M.jsx)(G.tO,{type:"info",text:e.i18nText.maxQuantityBasketItemMessageText,"data-testid":"quantity-basket-item"})]})},en=function(e){return(0,M.jsxs)(G.Tc,{ref:e.modalButtonsRef,modalContentScrollable:e.modalContentScrollable,children:[(0,M.jsx)(G.l1,{emphasis:"high",disabled:!e.allowAddToBasket,onClick:function(){e.allowAddToBasket&&e.selectedQuantity&&e.selectedOptions&&e.callbacks.addedToBasketClicked(e.selectedOptions,e.selectedQuantity)},children:e.i18nText.addToBasket}),e.links&&!e.displayViewMoreInfo&&(0,M.jsx)(G.bi,{emphasis:"medium",href:e.links.productUrl,renderedAs:"a",onClick:function(){var t;(null===(t=e.callbacks)||void 0===t?void 0:t.viewMoreInformationClicked)&&e.callbacks.viewMoreInformationClicked,e.setOpen&&e.setOpen(!1)},children:e.i18nText.viewMoreInformation})]})},eo=function(e){var t,n,o=e.i18nText,i=e.product,r=e.options,s=e.pricing,c=e.links,u=e.quantitySelector,d=e.hideQuantitySelector,p=e.callbacks,v=e.quickBuyModalTheme,h=e.coreTheme,f=e.setOpen,y=e.inStockComponent,g=e.selectedOptions,O=e.setSelectedOptionsCallback,k=e.enablePreselectedProductVariant,x=e.displayViewMoreInfo,m=e.hideAsterixOnPDP,T=l.useState(1),w=(0,a.Z)(T,2),C=w[0],S=w[1],P=l.useState(!1),j=(0,a.Z)(P,2),B=j[0],D=j[1],A=l.useRef(null),I=l.useRef(null);if(l.useEffect(function(){var e;if(null!=A&&A.current&&null!=I&&I.current)return(e=new b.Z(function(){var e,t,n=null==A||null===(e=A.current)||void 0===e?void 0:e.getBoundingClientRect(),o=null==I||null===(t=I.current)||void 0===t?void 0:t.getBoundingClientRect();n&&o&&D(n.top+n.height>o.top)})).observe(A.current),function(){e&&e.disconnect()}},[A]),!i)return(0,M.jsx)(G.eZ,{flashMessageId:"quickBuyModalMissingProduct",message:o.missingProductMessage,type:"error"});var q=J({enablePreselectedProductVariant:k,product:i,selectedQuantity:C,options:r,selectedOptions:g});return(0,M.jsxs)(l.Fragment,{children:[(0,M.jsx)(G.r6,{children:o.modalTitle}),(0,M.jsx)(et,{i18nText:{subscriptionInfoMessageText:o.subscriptionInfoMessageText,maxQuantityBasketItemMessageText:o.maxQuantityBasketItemMessageText,failedToAddToBasketError:o.failedToAddToBasketError},productSku:i.sku,subscriptionData:i.subscriptionData,quantitySelectorMaxValue:u.maxValue}),(0,M.jsxs)(G.uE,{ref:A,reducedBottomPadding:v.enableStickyFooterButtons,children:[(0,M.jsx)(G.W7,{urls:i.images[0],alt:i.title,width:(null===(t=v.product)||void 0===t||null===(t=t.image)||void 0===t?void 0:t.width)||["100%","100%",190,191],height:(null===(n=v.product)||void 0===n||null===(n=n.image)||void 0===n?void 0:n.height)||["","",190,191]}),(0,M.jsx)(ee,{quickBuyModalContentProps:{i18nText:o,product:i,pricing:s,links:c,quantitySelector:u,hideQuantitySelector:d,callbacks:p,quickBuyModalTheme:v,coreTheme:h,inStockComponent:y,options:r,selectedOptions:g,setSelectedOptionsCallback:O,setOpen:f,enablePreselectedProductVariant:k,hideAsterixOnPDP:m,productSku:null==i?void 0:i.sku.toString()},components:v.enabledComponents,selectedQuantity:C,setSelectedQuantity:S})]}),v.enableStickyFooterButtons&&(0,M.jsx)(en,{i18nText:o,modalButtonsRef:I,modalContentScrollable:B,allowAddToBasket:!!q,selectedQuantity:C,selectedOptions:g,callbacks:p,links:c,displayViewMoreInfo:x})]})},ei=n(61265);function er(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,o)}return n}function ea(e){for(var t=1;t1?eV.multipleItemsText:eV.singleItemText,[(null==N?void 0:N.maxPerOrder)||5e3,eP]),eQ=l.useRef(!1),eN=l.useRef(),eW=l.useRef(),eZ=l.useRef(),eH=l.useRef();if(w.presentAuroraQuickBuyModal.current=function(e){var t,n=e.sku,o=e.quantity,i=e.fromRecommendations,r=e.onBasketChangeBeacon,a=e.trackingUrl,l=e.initialSelectedOptions,s=e.setSelectedOptionsCallback,u=e.setSelectedVariantCallback,d=e.setOptionsCallback,p=e.fullProductData,v=e.displayNotifyWhenInStock,h=e.enableMobilePDPStickyAddToBasket;if(!l){eD();return}J.current=o,eQ.current=null!=i&&i,eW.current=r,eZ.current=a,eN.current=h,K(l),eH.current={setSelectedOptionsCallback:s,setSelectedVariantCallback:u,setOptionsCallback:d};var f=p?"/e2/operation/product/product-options/".concat(n):"/e2/operation/product-options/".concat(n,"?displayNotifyWhenInStock=").concat(v);l&&c.Z.get(f,{timeout:null!==(t=null==m?void 0:m.PRODUCT_OPTIONS_TIMEOUT)&&void 0!==t?t:5e3,headers:{"Accept-Encoding":"deflate, gzip, br",Host:b,"x-customer-location":x}}).then(function(e){return e.data}).then(function(e){var t=Object.values(l).reduce(function(e,t){return e[t]},e);if(!t){eD();return}W(t.variant),F(t.options),Y.current=e}).catch(function(e){console.trace("Error fetching product options: ".concat(f),e),eD()}),V(!0)},!w.presentAuroraQuickBuyModal)return e.warn("AuroraQuickBuyModalPresenter: Failed to find an initialised BasketContext. Make sure presentAuroraQuickBuyModal ref is defined and it wraps AuroraQuickBuyModalPresenter."),null;if(!L)return null;var ez=j.patterns.quickBuyModal;return(0,M.jsx)(el,ej({enablePreselectedProductVariant:r,loading:!z.length,setOpen:V,hideAsterixOnPDP:i,options:z,product:N,quickBuyModalTheme:ez,displayViewMoreInfo:!!eN,coreTheme:B,rendering:{open:L,onClose:function(){V(!1),eC.t.modalClose((null==N?void 0:N.sku.toString())||"")}},i18nText:ej(ej({},eA),{},{maxQuantityBasketItemMessageText:eR,subscriptionInfoMessageText:"",subscriptionContractDiscountMessage:"",failedToAddToBasketError:ee?eq:void 0,availabilityMessage:null==N?void 0:N.availabilityMessage}),modal:{i18nText:eE,showHeader:!0,stickyHeader:!0,headerOffset:T,gridColSpan:[12,8,8,6],"data-testid":"quick-buy-modal",animation:j.patterns.quickBuyModal.animation},selectedOptions:G,setSelectedOptionsCallback:function(e,t){if(!Y.current){eD();return}et(!1);var n=(0,eg.WZ)({selectedOptions:G,selectedVariant:N,optionKey:e,value:t,productOptionsMap:Y.current,setSelectedOptionsCallback:K,setSelectedVariantCallback:W,setOptionsCallback:F}),o=n.updatedSelectedOptions,i=n.updatedProductOptions;eH.current&&o&&i&&(eH.current.setSelectedOptionsCallback&&eH.current.setSelectedOptionsCallback(o),eH.current.setSelectedVariantCallback&&eH.current.setSelectedVariantCallback(i.variant),eH.current.setOptionsCallback&&eH.current.setOptionsCallback(i.options))},pricing:N?(0,eO.a)(N,v,h):void 0,links:{productUrl:null==N?void 0:N.product.url},callbacks:{addedToBasketClicked:function(e,t){if(w.presentAddedToBasketModal&&N){if(!N.enableAddToBasket){et(!0);return}var n=w.presentAddedToBasketModal.current;w.presentAddedToBasketModal.current=function(e,t){w.presentAddedToBasketModal&&(V(!1),et(!1),n(e,t),w.presentAddedToBasketModal.current=n)},ei([{quantity:t,sku:N.sku.toString()}],{fromRecommendations:eQ.current,location:eT.A.PRODUCT_LIST},ef.eN.HomeDelivery,void 0,eW.current,eZ.current),eC.t.modalAddToBasket(N.sku.toString())}},viewMoreInformationClicked:function(){N&&eC.t.modalInformation(null==N?void 0:N.product.sku.toString())},addToBasketWithContractsCallback:function(e,t){eo({variables:{basketId:null==P?void 0:P.id,sku:null==N?void 0:N.sku.toString(),quantity:e,contractId:t,settings:{currency:y,shippingDestination:g.code}}}).then(function(){if(w.presentAddedToBasketModal&&N){var t=w.presentAddedToBasketModal.current;V(!1),t(null==N?void 0:N.sku.toString(),e)}})}},quantitySelector:{i18nText:eL,maxValue:ea,quantity:J.current}},n&&o&&{inStockComponent:(0,M.jsx)(d.G,{selectedVariant:N,url:(null==N?void 0:N.product.url)||"",styleOverride:{margin:{top:0,bottom:2}}})}))}},71663:function(e,t,n){n.d(t,{L:function(){return o}});var o="unselected"},90576:function(e,t,n){n.d(t,{WZ:function(){return c},fH:function(){return s}});var o,i=n(8529),r=n(71663),a=function(e){var t=e.selectedOptions,n=e.productOptionsMap;return Object.values(t).reduce(function(e,t){if(!n)return e;if(!e.currentMap){var o=n[t];return e.currentMap=o,null!=o&&o.options&&(e.productOptions=o),e}var i=e.currentMap[t];return e.currentMap&&null!=i&&i.options?e.productOptions=i:e.currentMap=i,e},{productOptions:null,currentMap:null}).productOptions},l=((o=l||{}).THUMBNAIL="THUMBNAIL",o.ORIGINAL="ORIGINAL",o.MAGNIFY="MAGNIFY",o),s=function(e){var t,n=null===(t=e.personalisationData)||void 0===t?void 0:t.personalisationSupportImages;if(n){var o=[];return n.forEach(function(t){var n;null===(n=t.supportImages)||void 0===n||null===(n=n.imagesWithAssetSets)||void 0===n||n.forEach(function(t){var n,i,r,a=t.assetSet,s=t.images,c={url:s.find(function(e){return e.size===l.THUMBNAIL}).url,alt:(null==e?void 0:e.title)||""},u={url:s.find(function(e){return e.size===l.ORIGINAL}).url,alt:(null==e?void 0:e.title)||""},d={url:s.find(function(e){return e.size===l.MAGNIFY}).url,alt:(null==e?void 0:e.title)||""},p=o.find(function(e){return e.key===a}),b=p?o.indexOf(p):0;p||(o.push({key:a,images:[],thumbnails:[],zoom:[]}),b=o.length-1),null===(n=o[b])||void 0===n||n.images.push(u),null===(i=o[b])||void 0===i||i.thumbnails.push(c),null===(r=o[b])||void 0===r||r.zoom.push(d)})}),o}},c=function(e){var t,n=e.productOptionsMap,o=e.selectedOptions,l=e.setSelectedOptionsCallback,s=e.setOptionsCallback,c=e.setSelectedVariantCallback,u=e.selectedVariant,d=e.optionKey,p=e.value;o[d]=p,l(o);var b=a({selectedOptions:o,productOptionsMap:n});if(b)return s(b.options),c(b.variant),{updatedSelectedOptions:o,updatedProductOptions:b};if(null!=u&&null!==(t=u.product)&&void 0!==t&&t.linkedOn){var v=Object.entries(o).reduce(function(e,t){var n,o=(0,i.Z)(t,2),a=o[0],l=o[1];return a===(null===(n=u.product)||void 0===n?void 0:n.linkedOn)?e[a]=l:e[a]=r.L,e},{}),h=a({productOptionsMap:n,selectedOptions:v});if(h)return s(h.options),c(h.variant),{updatedSelectedOptions:v,updatedProductOptions:h}}return{updatedSelectedOptions:null,updatedProductOptions:null}}}}]); //# sourceMappingURL=1662.a554e970e342e0f8.js.map