1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30],{7545:(e,t,r)=>{r.d(t,{p:()=>n});let n={getProps:function(){let{entryId:e,fieldId:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e&&t?{"data-contentful-entry-id":e,"data-contentful-field-id":t}:{}},init:()=>{},subscribe:()=>()=>{},toggleInspectorMode:()=>{}}},27075:(e,t,r)=>{r.d(t,{YF:()=>o,iU:()=>s});let n=["bvstate","tab","Ns","rating","Ntt","promocode","icamp"],i=["/html/","/product/productDetails.jsp","/search","/jsp/templates/page_elements"];function l(e){let t;if("string"==typeof e)try{let r=e.includes("?")?e:`?${e}`;t=new URLSearchParams(r.split("?")[1]||"")}catch{return!1}else t=e;return n.some(e=>t.has(e))}function a(e){return!!e&&(!!i.some(t=>e.startsWith(t))||/^\/(?=.*\d)[A-Z0-9]+\/?$/.test(e))}function o(){let{pathname:e,search:t}=window.location;return a(e)||l(t)}function s(e){if(!e)return!1;let t="",r="";try{let{pathname:n,search:i}=new URL(e);t=n,r=i.substring(1)}catch{let[n,i]=e.split("?");t=n,r=i||""}return a(t)||!!r&&l(r)}},33332:(e,t,r)=>{r.d(t,{g:()=>i,k:()=>l});var n=r(67652),i=function(e){return e.FAVORITE="FAVORITE",e.UNLIMITED_AUTO_RENEW="UNLIMITED_AUTO_RENEW",e.CANCEL_SAVE_OFFER_RENEW="CANCEL_SAVE_OFFER_RENEW",e.CHRISTMAS_FLOURISHES_BANNER="CHRISTMAS_FLOURISHES_BANNER",e.ENABLE_REDIRECT_NO_UNLT_SUBS="ENABLE_REDIRECT_NO_UNLT_SUBS",e.ADD_TO_CART_EVOLUTION="ADD_TO_CART_EVOLUTION",e.OUT_OF_STOCK_VARIANT_DC_4062="OUT_OF_STOCK_VARIANT_DC_4062",e.ENABLE_LCP_IMAGE="ENABLE_LCP_IMAGE",e.VWS_NOT_ENOUGH_POINTS_BANNER="VWS_NOT_ENOUGH_POINTS_BANNER",e}({});let l=(e,t)=>{try{let r=e?.props?.cmsSiteConfig?.fields?.featureFlag?.flags||[];if(t){let e=r.find(e=>e.key===t);if(e?.type==="bool")return!0===e.value}}catch(e){n.vF.error("Error retrieving feature flags:",e)}return!1}},58729:(e,t,r)=>{r.d(t,{C:()=>l});var n=r(71858),i=r(86993);let l={getTotalOrderAmount:e=>Math.max((e?.totalPrice?.amount??0)-(e?.shippingInformation?.price?.amount??0),0),checkProductTypes:e=>{if(!e.lineItems||0===e.lineItems.length)return{isEnPrimeur:!1,isReservation:!1,isHappyToWait:!1,isServiceItem:!1,isOtherProductAvailable:!1};let t=e.lineItems.some(e=>e.product?.skus?.some(e=>e?.preReleaseItem)),r=e.lineItems.some(e=>e.product?.skus?.[0]?.preSellItem),l=e.lineItems.some(e=>e.product?.inventoryInfo?.happyToWaitEnabled||(0,n.IF)(e,i.aj));return{isEnPrimeur:t,isReservation:r,isHappyToWait:l,isServiceItem:e.lineItems.some(e=>e.product?.productType==="Service"),isOtherProductAvailable:e.lineItems.some(e=>{let{product:t}=e;return t?.skus?.some(e=>e&&!e.preReleaseItem&&!e.preSellItem&&!t.inventoryInfo?.happyToWaitEnabled&&"Service"!==t.productType)??!1})}}}},66510:(e,t,r)=>{r.d(t,{UR:()=>a,qM:()=>o});var n=r(75213),i=r(60004);let l=null;function a(e){let{children:t,enableLiveUpdates:a,enableInspectorMode:o,...s}=e,u=a||o,[c,d]=(0,i.useState)(null);return((0,i.useEffect)(()=>{u&&r.e(4874).then(r.t.bind(r,34874,23)).then(e=>{l=e.useContentfulLiveUpdates,d(()=>e.ContentfulLivePreviewProvider)})},[u]),c)?(0,n.Y)(c,{enableLiveUpdates:a,enableInspectorMode:o,...s,children:t}):t}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return l?l(e,...r):e}},71001:(e,t,r)=>{r.d(t,{yc:()=>k});var n=r(27234);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=Number(e);if(!Number.isFinite(r))return r;let n=Math.pow(10,t),i=r*n;return Math.abs(i-Math.round(i))>Number.EPSILON?Math.round(i)/n:r}let l=e=>e?.length>0?e?.filter(e=>e?.includes("when added to")):[],a=e=>e?.length>0?e?.map(e=>{let t=e?.match(/£[\d.]+/g),r=t?.map(e=>Number.parseFloat(e.substring(1)))||[];return r?.[0]}).filter(e=>void 0!==e):[],o=e=>e?.length>0?e?.map(e=>{let t=e?.match(/\d+/g);return Number(t?.[t.length-1])}).filter(e=>void 0!==e):[],s=(e,t)=>e?.length>0&&t.length>0?Math.min(...t):1/0,u=(e,t)=>e?.length>0&&t?Math.max(...t):0,c=e=>e?.length?e?.map(e=>{let t=e?.match(/£[\d.]+/g),r=e?.match(/\d+[- ]Case Deal/),n=t?.map(e=>e.substring(1)),i=r?.[0].includes("-")?"-":" ",l=r?.[0].split(i),a=Number(l?.[0]);return Number(n?.[0])/a}).filter(e=>void 0!==e):[],d=e=>e?.length?e?.map(e=>{let t=e?.match(/\d+[- ]Case Deal/),r=t?.[0].includes("-")?"-":" ",n=t?.[0].split(r);return Number(n?.[0])}).filter(e=>void 0!==e):[],h=(e,t)=>!e?.length||t?.length>0?[]:e?.map(e=>{let t=e?.match(/£[\d.]+/g),r=e?.match(/\d+ Case Deal/),n=t?.map(e=>e.substring(1)),i=r?.[0].split(" "),l=Number(i?.[0]);return Number(n?.[0])/l}).filter(e=>void 0!==e),p=(e,t)=>!e?.length||t?.length>0?[]:e?.map(e=>{let t=e?.match(/\d+ Case Deal/),r=t?.[0].split(" ");return Number(r?.[0])}).filter(e=>void 0!==e),m=e=>e?e.flatMap(e=>e?.tierUIRules?.map(e=>e?.amount)||[]).filter(e=>void 0!==e):[],f=e=>e?e.flatMap(e=>e?.tierUIRules?.map(e=>e?.quantity)||[]).filter(e=>void 0!==e):[],g=(e,t)=>e&&t.length?Math.min(...t):1/0,v=(e,t)=>
1e&&t.length?Math.max(...t):0,_=(e,t,r,n,i)=>e?.length>0?Number(Math.min(t,r,n,i)):0,N=(e,t,r,n,i,l,a,o,s)=>{if(e?.length===0)return t;switch(r){case n:return i;case l:return a;case o:return s;default:return t}},b=e=>e?.skus?.filter(e=>void 0!==e)||[],E=e=>e?.map(e=>e?.buyersRRP).filter(e=>void 0!==e),I=e=>e?.map(e=>e?.salePrice),T=e=>e?.map(e=>e?.vppPrice),w=e=>e?.map(e=>e?.lowestPricePerBottle).filter(e=>void 0!==e),O=e=>e?.map(e=>e?.numberOfBottles).filter(e=>void 0!==e),P=e=>e?.length>0?e.map(e=>e?.vppPrice>0?e?.vppPrice:e?.salePrice).filter(e=>void 0!==e):[],A=e=>e?.length>0?Math.min(...e):1/0,y=(e,t,r)=>Math.max(...Array.from({length:e?.length||0},(e,n)=>r===t[n]?n:-1));function M(e,t){return{value:Number(e)||0,type:t}}function R(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return t&&e.length>0?Math.min(...e.map(e=>e.value)):0}function C(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return t&&e.length>0?Math.max(...e.map(e=>e.quantityThreshold)):0}let L=(e,t)=>e.filter(e=>e?.locales?.includes(n.se[t])),S=e=>e.length>0?e.reduce((e,t)=>t.value<e.value?t:e,e[0]):null,U=(e,t,r)=>{let n=e.description.match(/£([\d.]+)/),i=e.description.match(/(\d+)[- ]Case/);return n&&i&&r.push({...M(Number(n[1])/Number(i[1]),t),quantityThreshold:Number(i[1]),promotionType:"christmas_collection",description:e.description}),r},B=(e,t,r)=>{let n=e.description.match(/£([\d.]+)/),i=e.description.match(/(\d+) Case/);return n&&i&&r.push({...M(Number(n[1])/Number(i[1]),t),quantityThreshold:Number(i[1]),promotionType:"bulk_deal",description:e.description}),r},D=(e,t,r)=>{let n=e.description.match(/£([\d.]+)/),i=e.description.match(/(\d+) bottles/);return n&&i&&r.push({...M(Number(n[1]),t),quantityThreshold:Number(i[1]),promotionType:"addon",description:e.description}),r};function k(e,t){return{structured:function(e,t){let{hit:r,promotions:n}=e,l=function(e){let t=e.productType?.toLowerCase(),r=e.packaging?.toLowerCase();return"case"===t?"per_case":"can"===r?"per_can":"wine box"===r?"per_box":"per_bottle"}(r),a=r.skus.map(e=>(function(e,t){let r=e.numberOfBottles||1,n=M(e.salePrice||0,t),i=M(e.buyersRRP||0,t),l=e.vppPrice?M(e.vppPrice,t):null;return{standard:n,vpp:l,rrp:i,lowestPrice:M(Math.min(e.salePrice||1/0,e.vppPrice||1/0),t),numberOfBottles:r,pricePerBottle:M(e.lowestPricePerBottle||0,t)}})(e,l)),o=function(e,t,r){let n=[],i=[],l=[],a=[];if(!e)return{tieredPrices:[],bulkDeals:[],christmasCollection:[],addons:[],bestOffer:null,addOnLowestPrice:0,addOnHighestQuantity:0,promoTierUILowestPrice:0,promoTierUIHighestQuantity:0,bulkDealLowestPrice:0,christmasCollectionLowestPrice:0};for(let o of L(e,r)){if(o.tierUIRules)for(let e of o.tierUIRules)n.push({...M(e.amount||0,t),quantityThreshold:e.quantity||0,promotionType:"tiered",description:o.description});o.description&&(o.description.includes("Christmas Collection")?U(o,t,l):o.description.includes("Case Deal")?B(o,t,i):o.description.includes("when added to")&&D(o,t,a))}let o=R(a),s=C(a),u=C(n),c=R(n),d=R(i,0===l.length),h=R(l,0===i.length),p=S([...n,...i,...l,...a]);return{tieredPrices:n,bulkDeals:i,christmasCollection:l,addons:a,bestOffer:p,addOnLowestPrice:o,addOnHighestQuantity:s,promoTierUILowestPrice:c,promoTierUIHighestQuantity:u,bulkDealLowestPrice:d,christmasCollectionLowestPrice:h}}(n,l,t),s=a.reduce((e,t,r)=>t.pricePerBottle.value<a[e].pricePerBottle.value?r:e,0),u=function(e,t){let r,n=e.vpp?12*Math.max(0,e.rrp.value-e.vpp.value):0,l=!e.vpp&&e.standard?Math.max(0,e.rrp.value-e.standard.value):0;r=t.bestOffer&&"addon"!==t.bestOffer.promotionType?t.bestOffer?Math.max(0,e.rrp.value*(t.bestOffer.quantityThreshold||1)-t.bestOffer.value*(t.bestOffer.quantityThreshold||1)):0:t.bestOffer?Math.max(0,e.rrp.value-t.bestOffer.value*(t.bestOffer.quantityThreshold||1)):0;let a=e.vpp?Math.max(0,e.rrp.value-e.lowestPrice.value):0,o=Math.max(n,l,r,a);return{vppSavings:i(n),saleSavings:i(l),promotionalSavings:i(r),lowestPriceSavings:i(a),maximumSavings:i(o)}}(a[s],o);return{skus:a,promotions:o,savings:u,lowestPriceIndex:s,lowestPricePerUnit:a[s].pricePerBottle.value}}(e,t),legacy:function(e){let{hit:t,promotions:r}=e,n=b(t),i=E(n),M=I(n),R=T(n),C=w(n),L=O(n),S=P(n),U=A(C),B=y(n,C,U),D=r?.map(e=>
1e.description).filter(Boolean),k=l(D),F=a(k),x=o(k),H=s(k,F),W=u(k,x),q=m(r),G=f(r),V=g(!0,q),$=v(!0,G),j=D?.filter(e=>e?.includes("Christmas Collection"))||[],X=c(j),z=d(j),Y=X.length>0?Math.min(...X):1/0,Q=z.length>0?Math.max(...z):0,K=D?.filter(e=>e?.includes("Case Deal"))||[],Z=h(K,j),J=p(K,j),ee=Z.length>0?Math.min(...Z):1/0,et=J.length>0?Math.max(...J):0,er=_(r,V,H,ee,Y),en=N(r,W,er,V,$,ee,et,Y,Q),ei=function(e,t,r,n,i,l,a,o,s){let u=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.abs(e-t)*r},c=r?.[e]!==void 0?u(t[e],r[e],12):0,d=void 0===n[e]||r[e]?0:u(t[e],n[e]),h=i?.length>0?l():"none";return Math.max(c,d,i?.length>0?u("add-on"===h?t[e]:t[e]*o,a*o):0,void 0!==r[e]&&t[e]-s>0?u(t[e],s):0)}(B,i,R,M,r,()=>r?.length>0?er===V?"buy":er===ee?"bulk-deal":er===Y?"christmas-collection":"add-on":"none",er,en,U);return{buyersRRPArray:i,salePriceArray:M,vppPriceArray:R,pricePerBottleArray:C,numberOfBottlesArray:L,lowestSkuPriceArray:S,lowestPricePerBottle:U,indexLowestPricePerBottle:B,promoTierUIPriceArray:q,promoTierUIQuantityArray:G,promoTierUILowestPrice:V,promoTierUIHighestQuantity:$,christmasCollectionPriceArray:X,christmasCollectionQuantityArray:z,bulkDealPriceArray:Z,bulkDealQuantityArray:J,bestOfferPromoPrice:er,bestOfferPromoQuantity:en,overallMaxSavings:ei,addOnItems:k,addOnPrices:F,addOnQuantities:x,addOnLowestPrice:H,addOnLowestHighestQuantity:W}}(e)}}},79674:(e,t,r)=>{r.d(t,{QS:()=>n});function n(e){let t=document.querySelector('[data-bv-show="inpage_submission"]');t instanceof HTMLElement&&"hard_logged"!==e&&(t.style.display="none",window.location.href=`/jsp/curity/signin.jsp?redirectionURL=${window.location.href}`)}},90069:(e,t,r)=>{r.d(t,{H:()=>u});var n=r(75213);r(60004);var i=r(72076),l=r(89034);let a=[{hreflang:"en-gb",domain:l.env.NEXT_PUBLIC_HREFLANG_DOMAIN_GB||"https://www.laithwaites.co.uk"},{hreflang:"en-us",domain:l.env.NEXT_PUBLIC_HREFLANG_DOMAIN_US||"https://www.laithwaites.com"},{hreflang:"en-au",domain:l.env.NEXT_PUBLIC_HREFLANG_DOMAIN_AU||"https://www.laithwaites.com.au"},{hreflang:"en-nz",domain:l.env.NEXT_PUBLIC_HREFLANG_DOMAIN_NZ||"https://www.laithwaites.co.nz"}],o=l.env.NEXT_PUBLIC_HREFLANG_DOMAIN_GB||"https://www.laithwaites.co.uk",s=new Set(["law","wpe","lwnz"]);function u(e){if(!s.has(i.z.brandId))return[];let t=e.startsWith("/")?e:`/${e}`,r=t.length>1&&t.endsWith("/")?t.slice(0,-1):t,[l]=r.split("?");if("/"!==l&&"/wine"!==l&&!l.startsWith("/wine/"))return[];let u=a.map(e=>{let{hreflang:t,domain:i}=e;return(0,n.Y)("link",{rel:"alternate",href:`${i}${r}`,hrefLang:t},`hreflang-${t}`)});return u.push((0,n.Y)("link",{rel:"alternate",href:`${o}${r}`,hrefLang:"x-default"},"hreflang-x-default")),u}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.