PageSourceSearch

https://www.averys.com/_next/static/chunks/pages/checkout-f3956634-c28162d64e787446.js

js averys.com collected 2026-09-25 00:40:16 UTC 29,326 bytes, 405 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9167],{13698:(e,r,t)=>{"use strict";t.d(r,{t:()=>m});var a=t(75213);t(60004);var i=t(30149),s=t(60085),o=t(58229);let l=e=>(0,o.css)`
2  .contact-preferences-container {
3    margin: 15px 0px;
4    font-family: ${e.fonts.roboto};
5
6    .section-title {
7      font-size: 1.15rem;
8    }
9  }
10
11  .contact-preferences-intro {
12    line-height: 16px;
13    margin-bottom: 24px;
14    font-size: ${e.fonts.fontSize12||"12px"};
15  }
16
17  .contact-preferences-checkbox-group {
18    display: flex;
19    flex-direction: column;
20    gap: 12px;
21    margin: 24px 0px;
22
23    .mantine-Checkbox-root {
24      .mantine-Checkbox-label {
25        cursor: pointer;
26        font-size: ${e.fonts.fontSize12||"12px"};
27        line-height: 1.3;
28      }
29    }
30  }
31  
32  .contact-preferences-intro {
33    line-height: 16px;
34    margin-bottom: 24px;
35    font-size: ${e.fonts.fontSize12||"12px"};
36    font-family: ${e.fonts.roboto};
37
38    a {
39      text-decoration: underline;
40    }
41  }
42`;var n=t(11371),d=t(72076),c=t(44098);let p=()=>"stw"===d.z.brandId?(0,a.Y)("div",{className:"contact-preferences-intro",children:"From time to time you may also benefit from special offers from The Times / Sunday Times. To receive these please tick here:"}):(0,a.FD)("div",{className:"contact-preferences-intro",children:["We would like to send you offers, by e-mail, from some of our partners who work in TV/cinema, food, insurance, banking/finance, subscription and delivery services, telco, retail, travel, publishing, conservation (historic buildings and land), and utilities. Tick the box below if you would like to receive these exclusive offers sourced by us for you. ",(0,a.Y)("br",{}),"We will never share your details with these partners."]}),m=e=>{let{form:r,className:t}=e,o=(0,c.u)();return(0,a.FD)(i.a,{css:l(o),className:t,children:[(0,a.FD)("div",{className:"contact-preferences-container",children:[(0,a.Y)("div",{className:"section-title",children:"Contact Preferences"}),(0,a.FD)("div",{className:"contact-preferences-intro",children:["We'd love to share exciting offers with you in the future, from our popular free monthly catalogue or email exclusives through to advice over the phone from one of our trained wine advisors who will give you a uniquely personal service. Why not give them all a try as you can easily cancel any updates at any time, by phone or online.",(0,a.Y)("br",{}),(0,a.Y)("br",{}),"If you would rather not receive our updates on latest products and services, please tick the relevant box below:"]}),(0,a.FD)("div",{className:"contact-preferences-checkbox-group",children:[(0,a.Y)(s.S,{label:"I'd prefer not to receive special offers by email",...r.getInputProps("optOutEmail",{type:"checkbox"})}),(0,a.Y)(s.S,{label:"I'd prefer not to receive free catalogues and personalised offers by post",...r.getInputProps("optOutPost",{type:"checkbox"})}),(0,a.Y)(s.S,{label:"I'd prefer not to receive offers and guidance by phone from a free wine advisor",...r.getInputProps("optOutPhone",{type:"checkbox"})}),(0,a.Y)(s.S,{label:"I'd rather not receive offers by SMS/text",...r.getInputProps("optOutSms",{type:"checkbox"})})]}),p(),(0,a.FD)("div",{className:"contact-preferences-checkbox-group",children:[(0,a.Y)(s.S,{label:"Yes, please send me these offers by e-mail",...r.getInputProps("optInPartnerEmail",{type:"checkbox"})}),"stw"===d.z.brandId&&(0,a.Y)(s.S,{label:"Yes, please send me these offers by post",...r.getInputProps("optInPartnerPost",{type:"checkbox"})})]})]}),(0,a.FD)("div",{className:"contact-preferences-intro",children:["We treat your data with the utmost respect and you can read our"," ",(0,a.Y)("a",{href:(0,n.G2)(),target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"})," ","or call the customer support line on ",(0,n.vS)()," to change any of your preferences."]})]})}},14224:(e,r,t)=>{"use strict";t.d(r,{u:()=>f,i:()=>b});var a=t(75213),i=t(60004),s=t(30149),o=t(58855),l=t(74164),n=t(65374),d=t(4339),c=t(31073),p=t(41325),m=t(44098),u=t(58229);let h=e=>(0,u.css)`
43  .address-card {
44    transition: all 0.2s ease;
45    border: 2px solid ${e.colors?.gray?.[3]||"#dee2e6"};
46    background-color: ${e.colors?.white||"#fff"};
47
48    &:hover {
49      border-color: ${e.colors?.primary?.[3]||"#91a7ff"};
50      background-color: ${e.colors?.primary?.[0]||"#f0f4ff"};
51      transform: translateY(-1px);
52      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
53    }
54
55    &.selected {
56      border-color: ${e.colors?.primary1||"#4263eb"};
57      background-color: ${e.colors?.grey10||"#f0f4ff"};
58      box-shadow: 0 2px 12px rgba(66, 99, 235, 0.15);
59    }
60  }
61
62  .address-name {
63    color: ${e.colors?.text||"#111"};
64    line-height: 1.4;
65  }
66
67  .address-company {
68    color: ${e.colors?.text||"#111"};
69    line-height: 1.4;
70  }
71
72  .address-street {
73    color: ${e.colors?.gray?.[8]||"#495057"};
74    line-height: 1.4;
75  }
76
77  .address-detail {
78    color: ${e.colors?.textSecondary||"#666"};
79    line-height: 1.4;
80  }
81
82  .address-phone {
83    color: ${e.colors?.gray?.[6]||"#868e96"};
84    font-style: italic;
85    line-height: 1.4;
86  }
87`;
87var g=t(77493),y=t(52642);let b="__new__",f=e=>{let{onAddressSelect:r,selectedAddressId:t,error:u}=e,f=(0,m.u)(),v=(0,g.kH)(y.qL),x=(0,i.useMemo)(()=>(v||[]).map(e=>({id:e.addressId||"",firstName:e.firstName||"",lastName:e.lastName||"",company:e.companyName,address1:e.address1||"",houseNumber:e.houseNumber,address2:e.address2,city:e.city||"",county:e.county,postalCode:e.postalCode||"",phone:e.dayPhoneNumber||e.deliveryPhoneNumber||"",isDefault:e.isDefaultDelivery??e.defaultAddress??!1})),[v]),w=(0,i.useMemo)(()=>x.find(e=>e.isDefault),[x]),Y=t||w?.id||"",[k,D]=(0,i.useState)(Y);(0,i.useEffect)(()=>{!t&&w&&r&&r(w.id)},[]);let S=e=>{D(e),r&&r(e)},N=(0,i.useMemo)(()=>h(f),[f]);return(0,a.Y)(s.a,{css:N,children:0===x.length?(0,a.Y)(o.E,{size:"sm",color:"dimmed",children:"No saved addresses found."}):(0,a.Y)(l.s.Group,{value:k,onChange:S,mb:"md",error:u,children:(0,a.FD)(n.B,{spacing:"sm",children:[x.map(e=>(0,a.Y)(d.Z,{className:`address-card ${k===e.id?"selected":""}`,padding:"md",radius:"md",withBorder:!0,onClick:()=>S(e.id),style:{cursor:"pointer"},children:(0,a.FD)(c.Y,{spacing:"md",align:"flex-start",noWrap:!0,children:[(0,a.Y)(l.s,{value:e.id,styles:{radio:{cursor:"pointer"}}}),(0,a.FD)(s.a,{style:{flex:1},children:[e.company&&(0,a.Y)(o.E,{className:"address-company",size:"sm",mb:2,children:e.company}),(0,a.FD)(c.Y,{spacing:"xs",mb:4,children:[(0,a.FD)(o.E,{className:"address-name",weight:600,size:"sm",children:[e.firstName," ",e.lastName]}),e.isDefault&&(0,a.Y)(p.E,{size:"xs",color:"green",variant:"filled",children:"Default"})]}),(0,a.Y)(o.E,{className:"address-street",size:"sm",mb:2,children:e.houseNumber?`${e.houseNumber} ${e.address1}`:`${e.address1}`}),e.address2&&(0,a.Y)(o.E,{className:"address-street",size:"sm",mb:2,children:e.address2}),(0,a.FD)(o.E,{className:"address-detail",size:"sm",children:[e.city,e.county?`, ${e.county}`:"",", ",e.postalCode]}),e.phone&&(0,a.FD)(o.E,{className:"address-phone",size:"xs",mt:4,children:["\uD83D\uDCDE ",e.phone]}
87)]})]})},e.id)),(0,a.Y)(d.Z,{className:`address-card ${k===b?"selected":""}`,padding:"md",radius:"md",withBorder:!0,onClick:()=>S(b),style:{cursor:"pointer"},children:(0,a.FD)(c.Y,{spacing:"md",align:"flex-start",noWrap:!0,children:[(0,a.Y)(l.s,{value:b,styles:{radio:{cursor:"pointer"}}}),(0,a.Y)(s.a,{style:{flex:1},children:(0,a.Y)(o.E,{className:"address-name",weight:600,size:"sm",children:"New address"})})]})})]})})})}},31263:(e,r,t)=>{"use strict";t.d(r,{K:()=>o});var a=t(75213);t(60004);var i=t(17498),s=t(19432);let o=e=>{let{form:r,fields:t,getValidIcon:o}=e;return(0,a.FD)(a.FK,{children:[(0,a.Y)(i.f,{span:12,children:(0,a.Y)(s.k,{label:"Address Line 1",withAsterisk:!0,rightSection:o(t.address1),...r.getInputProps(t.address1)})}),(0,a.Y)(i.f,{span:12,children:(0,a.Y)(s.k,{label:"Address Line 2",rightSection:o(t.address2),...r.getInputProps(t.address2)})}),(0,a.Y)(i.f,{span:12,children:(0,a.Y)(s.k,{label:"Town/City",withAsterisk:!0,rightSection:o(t.city),...r.getInputProps(t.city)})}),(0,a.Y)(i.f,{span:12,children:(0,a.Y)(s.k,{label:"County",rightSection:o(t.county),...r.getInputProps(t.county)})}),(0,a.Y)(i.f,{span:12,children:(0,a.Y)(s.k,{label:"Postcode",withAsterisk:!0,rightSection:o(t.postalCode),...r.getInputProps(t.postalCode),onBlur:e=>{let a=e.target.value.toUpperCase();r.setFieldValue(t.postalCode,a)}})})]})}},31756:(e,r,t)=>{"use strict";t.d(r,{N:()=>f});var a=t(75213),i=t(60004),s=t(47856),o=t(49173),l=t(44098),n=t(67652),d=t(46183),c=t(66252),p=t(87750),m=t(85935),u=t(48672),h=t(58229),g=t(83844);let y=e=>(0,h.css)`
88  width: 100%;
89
90  .apple-pay-button-container {
91    min-height: 48px;
92    display: flex;
93    align-items: center;
94    justify-content: center;
95  }
96
97  .apple-pay-button {
98    -webkit-appearance: -apple-pay-button;
99    -apple-pay-button-type: buy;
100    -apple-pay-button-style: black;
101    display: block;
102    width: 100%;
103    max-width: 400px;
104    min-height: 48px;
105    border: none;
106    border-radius: ${g.Vq.md};
107    cursor: pointer;
108    padding: 0;
109
110    &:disabled {
111      opacity: 0.6;
112      cursor: not-allowed;
113    }
114  }
115
116  /* Responsive adjustments */
117  @media (max-width: 768px) {
118    .apple-pay-button {
119      max-width: 100%;
120    }
121  }
122
123  /* Processing / info message spacing */
124  .apple-pay-message {
125    margin-top: ${g.YK.sm};
126    padding: ${g.YK.sm} ${g.YK.md};
127    font-size: 14px;
128    color: ${e.colors?.textSecondary||"#6b7280"};
129    background-color: ${e.colors?.backgroundLight||"#f9fafb"};
130    border-radius: ${g.Vq.sm};
131    text-align: center;
132  }
133`,b=new Set(["cardNumber","expiryMonth","expiryYear","cvv"]),f=e=>{let{form:r,merchantName:t,totalPrice:h,currencyCode:g="GBP",countryCode:f="GB",onSuccess:v,onError:x}=e,w=(0,l.u)(),[Y,k]=(0,i.useState)({}),D=(0,p.t)(e=>e.setPaymentData),{submitPayment:S,isSubmitting:N,isChallenging:A,apiError:F,clearError:P}=(0,c.Ct)(),$=(0,i.useCallback)(async()=>{n.vF.info("Apple Pay - Button clicked"),P();let e=Object.fromEntries(Object.entries(r.validate().errors).filter(e=>{let[r,t]=e;return"string"==typeof t&&!!t&&!b.has(r)}));if(Object.keys(e).length>0){n.vF.warn("Apple Pay blocked by form validation errors",e),k(e);return}n.vF.info("Apple Pay - Form validation passed"),k({}),D((0,m.M2)(r.values));let a={countryCode:f,currencyCode:g,supportedNetworks:["visa","masterCard","amex"],merchantCapabilities:["supports3DS"],total:{label:t,amount:h.toFixed(2),type:"final"}};if(!window.ApplePaySession){n.vF.error("Apple Pay - ApplePaySession is not available"),x&&x("Apple Pay is not available on this device or browser.");return}let i=new window.ApplePaySession(3,a);n.vF.info("Apple Pay - Session created",{currencyCode:g,totalPrice:h,merchantName:t}),i.onvalidatemerchant=async e=>{n.vF.info("Apple Pay - Merchant validation started",{validationURL:e.validationURL});try{let r=(0,d.wD)(),t=(await r.Checkout.validateApplePaySession(e.validationURL)).response;n.vF.info("Apple Pay - Merchant validation succeeded"),i.completeMerchantValidation(t)}catch(r){let e=(0,m.VR)(r,"Merchant validation failed");n.vF.error("Apple Pay merchant validation failed",r),i.abort(),x&&x(e)}},i.onpaymentauthorized=async e=>{n.vF.info("Apple Pay - Payment authorised by user");try{let t=JSON.stringify(e.payment.token.paymentData);await S(t,r.values),i.completePayment({status:window.ApplePaySession.STATUS_SUCCESS}),n.vF.info("Apple Pay - Session completed with STATUS_SUCCESS"),v&&v()}catch(r){let e=r instanceof Error?r.message:"Apple Pay payment failed";
133n.vF.error("Apple Pay payment authorization failed",r),i.completePayment({status:window.ApplePaySession.STATUS_FAILURE}),n.vF.info("Apple Pay - Session completed with STATUS_FAILURE"),x&&x(e)}},i.oncancel=()=>{n.vF.info("Apple Pay - Session cancelled by user")},i.begin(),n.vF.info("Apple Pay - Session begun")},[P,g,r,t,x,v,D,S,h]);return A?(0,a.Y)(s.F,{color:"blue",title:"Completing Authentication",icon:(0,a.Y)(o.a,{size:"sm"}),styles:{icon:{marginRight:"12px"}},children:"Please complete the authentication step to continue your Apple Pay payment."}):N?(0,a.Y)(s.F,{color:"blue",title:"Processing Your Payment",icon:(0,a.Y)(o.a,{size:"sm"}),styles:{icon:{marginRight:"12px"}},children:"Please wait while we process your Apple Pay payment. Do not close this window or refresh the page."}):(0,a.FD)("div",{css:y(w),children:[Object.keys(Y).length>0&&(0,a.Y)(u.a,{errors:Y}),F&&(0,a.Y)(s.F,{color:"red",title:"Payment Failed",mb:"md",children:F}),(0,a.Y)("div",{className:"apple-pay-button-container",children:(0,a.Y)("button",{type:"button",className:"apple-pay-button","aria-label":"Pay with Apple Pay",onClick:$,disabled:N})})]})}},36619:(e,r,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/checkout",function(){return t(15280)}])},53675:(e,r,t)=>{"use strict";t.d(r,{l:()=>h});var a=t(75213),i=t(60004),s=t(4339),o=t(65374),l=t(37339),n=t(58855),d=t(7292),c=t(44098),p=t(58229);let m=e=>(0,p.css)`
134  /* Main card container */
135  .date-picker-card {
136    border: 0px;
137    background-color: transparent;
138    padding: 0;
139  }
140
141  /* Title text */
142  .date-picker-title {
143    font-size: 1.125rem;
144    font-weight: 600;
145    color: ${e.colors?.grey90||"#111827"};
146    margin-bottom: 1rem;
147  }
148
149  /* ========================================
150     Horizontal Date Carousel
151     ======================================== */
152
153  /* Carousel wrapper with navigation buttons */
154  .date-carousel-wrapper {
155    display: flex;
156    align-items: center;
157    gap: 1rem;
158  }
159
160  /* Navigation buttons (chevrons) */
161  .carousel-nav-button {
162    flex-shrink: 0;
163    color: ${e.colors?.primary1||"#2563eb"};
164
165    &:hover:not(:disabled) {
166      background-color: ${e.colors?.primary1?`${e.colors.primary1}10`:"#eff6ff"};
167    }
168
169    &:disabled {
170      color: ${e.colors?.grey40||"#d1d5db"};
171      cursor: not-allowed;
172      opacity: 0.5;
173    }
174  }
175
176  /* Date cards container */
177  .date-cards-container {
178    display: grid;
179    grid-template-columns: repeat(7, 1fr); /* 7 cards on desktop */
180    gap: 0.75rem;
181    flex: 1;
182    min-width: 0; /* Allow shrinking */
183    overflow: hidden; /* Prevent overflow */
184  }
185
186  /* Individual date card */
187  .date-card {
188    display: flex;
189    flex-direction: column;
190    align-items: center;
191    justify-content: center;
192    padding: 1rem 0.5rem;
193    background-color: ${e.colors?.white||"#ffffff"};
194    border: 2px solid ${e.colors?.grey30||"#e5e7eb"};
195    border-radius: 8px;
196    cursor: pointer;
197    transition: all 0.2s ease;
198    min-height: 100px;
199    min-width: 0; /* Allow card to shrink */
200    width: 100%; /* Fill grid cell */
201
202    &:hover {
203      border-color: ${e.colors?.primary1||"#2563eb"};
204      background-color: ${e.colors?.primary1?`${e.colors.primary1}05`:"#f0f9ff"};
205      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
206    }
207
208    &.selected {
209      border-color: ${e.colors?.btnsPrimaryBg||"#2563eb"};
210      background-color: ${e.colors?.btnsPrimaryBg?`${e.colors.btnsPrimaryBg}10`:"#eff6ff"};
211      border-width: 3px;
212      box-shadow: 0 2px 8px ${e.colors?.primary1?`${e.colors.primary1}40`:"rgba(37, 99, 235, 0.25)"};
213    }
214  }
215
216  /* Day name (e.g., "Mon") */
217  .date-card-day {
218    font-size: 0.875rem;
219    font-weight: 500;
220    color: ${e.colors?.grey60||"#6b7280"};
221    text-transform: uppercase;
222    letter-spacing: 0.5px;
223    margin-bottom: 0.25rem;
224  }
225
226  /* Date number (e.g., "22") */
227  .date-card-date {
228    font-size: 1.75rem;
229    font-weight: 700;
230    color: ${e.colors?.grey90||"#111827"};
231    line-height: 1;
232    margin-bottom: 0.25rem;
233  }
234
235  /* Month name (e.g., "Apr") */
236  .date-card-month {
237    font-size: 0.875rem;
238    font-weight: 500;
239    color: ${e.colors?.grey60||"#6b7280"};
240  }
241
242  /* ========================================
243     Selected Date Information Display
244     ======================================== */
245
246  /* Selected date info container */
247  .selected-date-info {
248    margin-left: 3rem;
249  }
250
251  /* Full date label (e.g., "Monday, 16 April 2026") */
252  .selected-date-label {
253    font-size: 1rem;
254    font-weight: 600;
255    color: ${e.colors?.grey90||"#111827"};
256    margin-bottom: 0.25rem;
257  }
258
259  /* Delivery time information */
260  .delivery-time-info {
261    font-size: 0.875rem;
262    color: ${e.colors?.grey70||"#374151"};
263    font-weight: 500;
264  }
265
266  /* ========================================
267     Responsive Layout
268     ======================================== */
269
270  @media (max-width: 768px) {
271    /* Keep 4 cards on mobile but make them smaller */
272    .date-cards-container {
273      grid-template-columns: repeat(4, 1fr); /* 4 cards on mobile */
274      gap: 0.5rem;
275    }
276
277    /* Adjust card sizing for mobile */
278    .date-card {
279      min-height: 80px;
280      padding: 0.5rem 0.25rem;
281    }
282
283    .date-card-day {
284      font-size: 0.75rem;
285      margin-bottom: 0.125rem;
286    }
287
288    .date-card-date {
289      font-size: 1.25rem;
290      margin-bottom: 0.125rem;
291    }
292
293    .date-card-month {
294      font-size: 0.75rem;
295    }
296  }
297
298  @media (max-width: 480px) {
299    /* Further reduce sizing on very small screens */
300    .date-carousel-wrapper {
301      gap: 0.5rem;
302    }
303
304    .date-cards-container {
305      gap: 0.375rem;
306    }
307
308    .carousel-nav-button {
309      min-width: 32px;
310      min-height: 32px;
311    }
312
313    .date-card {
314      min-height: 70px;
315      padding: 0.375rem 0.125rem;
316      border-radius: 6px;
317      border-width: 1.5px;
318
319      &.selected {
320        border-width: 2px;
321      }
322    }
323
324    .date-card-day {
325      font-size: 0.625rem;
326      letter-spacing: 0.25px;
327    }
328
329    .date-card-date {
330      font-size: 1.125rem;
331    }
332
333    .date-card-month {
334      font-size: 0.625rem;
335    }
336  }
337`;var u=t(11371);let h=e=>{let{selectedDate:r,onDateSelect:t,availableDays:p=[]}=e,h=(0,c.u)(),g=(0,i.useRef)(!1),[y,b]=(0,i.useState)(0),[f,v]=(0,i.useState)(7);(0,i.useEffect)(()=>{let e=()=>{v(window.innerWidth<768?4:7)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);let x=(0,i.useMemo)(()=>p.map(e=>{let r=new Date(e);return new Date(r.getFullYear(),r.getMonth(),r.getDate())}),[p]);(0,i.useEffect)(()=>{r||!(x.length>0)||g.current||(g.current=!0,t(x[0])),null!==r&&(g.current=!1)},[x,r,t]);let w=(e,r)=>!!e&&e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDate()===r.getDate(),Y=(0,i.useCallback)(e=>{t(e)},[t]),k=(0,i.useCallback)(()=>{b(e=>Math.max(0,e-1))},[]),D=(0,i.useCallback)(()=>{b(e=>Math.min(x.length-f,e+1))},[x.length,f]),S=(0,i.useMemo)(()=>x.slice(y,y+f),[x,y,f]),N=0===y,A=y>=x.length-f;return(0,a.Y)("div",{css:m(h),children:(0,a.Y)(s.Z,{padding:"lg",radius:"md",withBorder:!0,className:"date-picker-card",children:(0,a.FD)(o.B,{spacing:"md",children:[(0,a.Y)("div",{}),(0,a.FD)("div",{className:"date-carousel-wrapper",children:[(0,a.Y)(l.M,{size:"lg",variant:"subtle",onClick:k,disabled:N,className:"carousel-nav-button","aria-label":"Previous dates",children:(0,a.Y)(d.I,{kind:"chevron-left",size:"m"})}),(0,a.Y)("div",{className:"date-cards-container",children:S.map(e=>{let t=w(r,e),i=u.Zx[e.getDay()],s=u.oy[e.getMonth()].slice(0,3),o=e.getDate();return(0,a.FD)("button",{className:`date-card ${t?"selected":""}`,onClick:()=>Y(e),type:"button",children:[(0,a.Y)("div",{className:"date-card-day",children:i}),(0,a.Y)("div",{className:"date-card-date",children:o}),(0,a.Y)("div",{className:"date-card-month",children:s})]},e.getTime())})}),(0,a.Y)(l.M,{size:"lg",variant:"subtle",onClick:D,disabled:A,className:"carousel-nav-button","aria-label":"Next dates",children:(0,a.Y)(d.I,{kind:"chevron-right",size:"m"})})]}),r&&(0,a.FD)("div",{className:"selected-date-info",children:[(0,a.Y)(n.E,{className:"selected-date-label",children:(e=>{if(!e)return"";let r=u.yn[e.getDay()],t=e.getDate(),a=u.oy[e.getMonth()],i=e.getFullYear();return`${r}, ${t} ${a} ${i}`})(r)}),(0,a.Y)(n.E,{className:"delivery-time-info",children:"Delivery is between 7am to 9pm"})]})]})})})}},70140:(e,r,t)=>{"use strict";t.d(r,{F:()=>S});var a=t(75213),i=t(60004),s=t(31073),o=t(58855),l=t(37339),n=t(24732),d=t(17498),c=t(19432),p=t(30149),m=t(44098),u=t(94436),h=t(72076),g=t(7292),y=t(20048),b=t(97591),f=t(92662),v=t(31263),x=t(24962);let w=e=>({padding:"1rem",backgroundColor:e.colors?.white||"#f8f9fa",borderRadius:"6px",border:`1px solid ${e.colors?.grey20||"#e5e7eb"}`,color:e.colors?.grey40,animation:"fadeIn 0.3s ease-in-out","@keyframes fadeIn":{from:{opacity:0,transform:"translateY(-10px)"},to:{opacity:1,transform:"translateY(0)"}}}),Y=()=>
337({cursor:"pointer","&:hover":{opacity:.8}}),k=e=>({color:e.colors?.grey40||"#6b7280"}),D=()=>({animation:"slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1)","@keyframes slideIn":{from:{opacity:0,transform:"translateY(-20px)"},to:{opacity:1,transform:"translateY(0)"}}}),S=e=>{let{form:r,deliveryData:t}=e,S=(0,m.u)(),N=!!(0,y.e)(),[A,F]=(0,i.useState)(!1),{dialCode:P}=(0,u.JZ)(h.z.country);return(0,i.useEffect)(()=>{N&&r.values.billingAddressSameAsDelivery&&r.setFieldValue("billingAddressSameAsDelivery",!1)},[N,r]),(0,i.useEffect)(()=>{r.values.billingAddressSameAsDelivery?F(!1):t&&(r.setValues({...r.values,billingTitle:t.title||"",billingFirstName:t.firstName||"",billingLastName:t.lastName||"",billingAddress1:t.address1||"",billingAddress2:t.address2||"",billingCity:t.city||"",billingCounty:t.county||"",billingPostalCode:t.postalCode||"",billingPhone:t.phone||""}),F(!0))},[r.values.billingAddressSameAsDelivery]),(0,i.useEffect)(()=>{r.values.billingAddress1&&!r.values.billingAddressSameAsDelivery&&F(!0)},[r.values.billingAddress1,r.values.billingAddressSameAsDelivery]),(0,a.FD)("div",{className:"form-section",children:[!N&&!r.values.billingAddressSameAsDelivery&&(0,a.Y)(s.Y,{position:"right",mb:"md",children:(0,a.FD)(s.Y,{spacing:"xs",sx:{cursor:"pointer"},onClick:()=>r.setFieldValue("billingAddressSameAsDelivery",!0),children:[(0,a.Y)(o.E,{size:"sm",c:"dimmed",children:"Close"}),(0,a.Y)(l.M,{size:"sm",variant:"subtle",color:"gray","aria-label":"Use delivery address as billing address",children:(0,a.Y)(g.I,{kind:"close",size:"s"})})]})}),(N||!r.values.billingAddressSameAsDelivery)&&(0,a.FD)("div",{css:D(),children:[(0,a.Y)("div",{className:"section-title",children:"Billing Address"}),(0,a.Y)(f.S,{onAddressSelect:e=>{r.setValues({...r.values,billingAddress1:e.address1,billingAddress2:e.address2||"",billingCity:e.city,billingCounty:e.county,billingPostalCode:e.postalCode}),F(!0)},onManualEntry:()=>F(!0),onSearchByPostcode:()=>F(!1),isManualEntry:A}),A&&(0,a.FD)(n.x,{gutter:"md",mt:"md",children:[(0,a.Y)(v.K,{form:r,fields:{address1:"billingAddress1",address2:"billingAddress2",city:"billingCity",county:"billingCounty",postalCode:"billingPostalCode"},getValidIcon:e=>(0,b.I)(e,r)}),(0,a.Y)(d.f,{span:12,children:(0,a.Y)("div",{className:"section-title",children:"Your Details"})}),(0,a.Y)(d.f,{span:12,children:(0,a.Y)(x.N,{placeholder:"Select title",rightSection:(0,b.I)("billingTitle",r),...r.getInputProps("billingTitle")})}),(0,a.Y)(d.f,{span:12,children:(0,a.Y)(c.k,{label:"First Name",withAsterisk:!0,rightSection:(0,b.I)("billingFirstName",r),...r.getInputProps("billingFirstName")})}),(0,a.Y)(d.f,{span:12,children:(0,a.Y)(c.k,{label:"Last Name",withAsterisk:!0,rightSection:(0,b.I)("billingLastName",r),...r.getInputProps("billingLastName")})}),(0,a.Y)(d.f,{span:12,children:(0,a.Y)(c.k,{label:"Phone Number",withAsterisk:!0,rightSection:(0,b.I)("billingPhone",r),...r.getInputProps("billingPhone")})})]})]}),!N&&r.values.billingAddressSameAsDelivery&&t&&(0,a.FD)(a.FK,{children:[(0,a.Y)(o.E,{size:"xl",weight:500,mb:"xs",children:"Billing Address"}),(0,a.Y)(p.a,{css:w(S),children:(0,a.FD)(s.Y,{position:"apart",align:"flex-start",children:[(0,a.FD)(o.E,{sx:{flex:1},children:[(0,a.FD)("span",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,a.Y)(g.I,{kind:"location",size:"xs"}),(0,a.FD)("span",{children:[t.company&&`${t.company}, `,t.address1,t.address2&&`, ${t.address2}`,", ",t.city,t.county&&`, ${t.county}`,", ",t.postalCode]})]}),(0,a.FD)("span",{style:{display:"flex",alignItems:"flex-start",gap:"8px",marginTop:"8px"},children:[(0,a.Y)(g.I,{kind:"user",size:"xs"}),(0,a.FD)("span",{children:[t.title&&`${t.title.charAt(0).toUpperCase()}${t.title.slice(1).toLowerCase()} `,t.firstName," ",t.lastName,t.phone&&`, ${P} ${t.phone}`]})]})]}),(0,a.Y)(s.Y,{spacing:"xs",sx:Y(),onClick:()=>r.setFieldValue("billingAddressSameAsDelivery",!1),children:(0,a.Y)(l.M,{size:"sm",variant:"subtle",sx:k(S),"aria-label":"Edit billing address",children:(0,a.Y)(g.I,{kind:"edit",size:"s"})})})]})})]})]})}},78013:(e,r,t)=>{"use strict";t.d(r,{X:()=>p});var a=t(75213),i=t(60004),s=t(30149),o=t(58855),l=t(44098),n=t(7292),d=t(58229);let c=e=>(0,d.css)`
338  position: relative;
339  display: flex;
340  flex-direction: column;
341  width: 100%;
342  border: 1px solid ${e.colors?.gray?.[3]||"#dee2e6"};
343  border-radius: 6px;
344  padding: 1rem;
345  gap: 0.25rem;
346
347  .accordion-summary__label {
348    font-weight: ${e.fonts?.weightBold||700};
349    font-size: ${e.fonts?.fontSize14||"14px"};
350    color: ${e.colors?.text||"#1f2937"};
351    margin: 0;
352  }
353
354  .accordion-summary__section-divider {
355    border-bottom: 1px solid ${e.colors?.gray?.[3]||"#dee2e6"};
356    margin: 0.75rem 0;
357  }
358
359  .accordion-summary__content {
360    min-width: 0;
361    display: flex;
362    flex-direction: column;
363    gap: 0.4rem;
364  }
365
366  .accordion-summary__row {
367    display: flex;
368    align-items: center;
369    gap: 0.5rem;
370    min-width: 0;
371  }
372
373  .accordion-summary__icon {
374    color: ${e.colors?.grey40||"#6b7280"};
375    display: flex;
376    flex-shrink: 0;
377  }
378
379  .accordion-summary__text {
380    color: ${e.colors?.grey60||"#6b7280"};
381    font-size: ${e.fonts?.fontSize14||"14px"};
382    font-weight: ${e.fonts?.weightLight||300};
383    line-height: 1.4;
384    white-space: pre-line;
385    overflow: hidden;
386    text-overflow: ellipsis;
387  }
388
389  .accordion-summary__edit-btn {
390    position: absolute;
391    top: 0.75rem;
392    right: 1rem;
393    flex-shrink: 0;
394    border: none;
395    background: transparent;
396    padding: 0;
397    color: ${e.colors?.grey40||"#6b7280"};
398    display: inline-flex;
399    align-items: center;
400    gap: 0.25rem;
401    cursor: pointer;
402    font-size: ${e.fonts?.fontSize14||"14px"};
403    font-weight: ${e.fonts?.weightSemiBold||600};
404  }
405`,p=e=>{let{summary:r,iconKind:t,addressLine:d,nameLine:p,phoneLine:m,onEdit:u,editAriaLabel:h="Edit delivery address"}=e,g=(0,l.u)(),y=(0,i.useMemo)(()=>c(g),[g]),b=(e,r)=>r?(0,a.Y)("button",{type:"button","aria-label":e,className:"accordion-summary__edit-btn",onClick:e=>{e.stopPropagation(),r()},children:(0,a.Y)(n.I,{kind:"edit",size:"s"})}):null;return d?(0,a.FD)(s.a,{css:y,children:[b(h,u),(0,a.FD)("div",{className:"accordion-summary__content",children:[(0,a.FD)("div",{className:"accordion-summary__row",children:[(0,a.Y)("div",{className:"accordion-summary__icon",children:(0,a.Y)(n.I,{kind:"location",size:"s"})}),(0,a.Y)(o.E,{className:"accordion-summary__text",children:d})]}),p&&(0,a.FD)("div",{className:"accordion-summary__row",children:[(0,a.Y)("div",{className:"accordion-summary__icon",children:(0,a.Y)(n.I,{kind:"user",size:"s"})}),(0,a.Y)(o.E,{className:"accordion-summary__text",children:p})]}),m&&(0,a.FD)("div",{className:"accordion-summary__row",children:[(0,a.Y)("div",{className:"accordion-summary__icon",children:(0,a.Y)(n.I,{kind:"phone",size:"s"})}),(0,a.Y)(o.E,{className:"accordion-summary__text",children:m})]})]})]}):(0,a.FD)(s.a,{css:y,children:[b(h,u),t?(0,a.FD)("div",{className:"accordion-summary__row",children:[(0,a.Y)("div",{className:"accordion-summary__icon",children:(0,a.Y)(n.I,{kind:t,size:"s"})}),(0,a.Y)(o.E,{className:"accordion-summary__text",children:r})]}):(0,a.Y)(o.E,{className:"accordion-summary__text",children:r})]})}},91503:(e,r,t)=>{"use strict";t.d(r,{v:()=>g});var a=t(75213);t(60004);var i=t(58855),s=t(24732),o=t(17498),l=t(2327),n=t(97591),d=t(11371),c=t(7292);let p=Array.from({length:31},(e,r)=>({value:String(r+1).padStart(2,"0"),label:String(r+1)})),m=[{value:"01",label:"January"},{value:"02",label:"February"},{value:"03",label:"March"},{value:"04",label:"April"},{value:"05",label:"May"},{value:"06",label:"June"},{value:"07",label:"July"},{value:"08",label:"August"},{value:"09",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}],u=new Date().getFullYear()-18,h=Array.from({length:100},(e,r)=>({value:String(u-r),label:String(u-r)}));function g(e){let{form:r}=e,t=e=>(0,n.I)(e,r)??(0,a.Y)(c.I,{kind:"chevron-down",size:"xs"});return(0,a.FD)(a.FK,{children:[(0,a.FD)(i.E,{size:"lg",weight:400,mb:"xs",children:["Date of birth ",(0,a.Y)("span",{style:{color:"red"},children:"*"})]}),(0,a.FD)(s.x,{gutter:"md",children:[(0,a.Y)(o.f,{span:4,children:(0,a.Y)(l.l6,{placeholder:"Day",data:p,searchable:!0,withAsterisk:!0,...r.getInputProps("dobDay"),rightSection:t("dobDay"),styles:{rightSection:{pointerEvents:"none"}}})}),(0,a.Y)(o.f,{span:4,children:(0,a.Y)(l.l6,{placeholder:"Month",data:m,searchable:!0,withAsterisk:!0,...r.getInputProps("dobMonth"),rightSection:t("dobMonth"),styles:{rightSection:{pointerEvents:"none"}}})}),(0,a.Y)(o.f,{span:4,children:(0,a.Y)(l.l6,{placeholder:"Year",data:h,searchable:!0,withAsterisk:!0,...r.getInputProps("dobYear"),rightSection:t("dobYear"),styles:{rightSection:{pointerEvents:"none"}}})})]}),(0,a.FD)(i.E,{size:"sm",color:"dimmed",mt:"xs",children:[(0,a.Y)(c.I,{kind:"info-circle"})," ",d.pc]})]})}}}]);

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.