1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b2909b24-4592-4cf7-8dd3-fdec8ea65117",e._sentryDebugIdIdentifier="sentry-dbid-b2909b24-4592-4cf7-8dd3-fdec8ea65117")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1390],{45386:(e,n,r)=>{"use strict";r.r(n),r.d(n,{__N_SSP:()=>o,default:()=>c});var t=r(97135),i=r(7023),s=r(32987),l=r(8190),a=r(75478),d=r(51653),o=!0;let c=function(e){let{productIds:n}=e,{handleSetItems:r}=(0,i.useContext)(a.M),s=(0,l.useRouter)();return(0,i.useEffect)(()=>{n&&n.length>0&&(r(n),s.replace("/basket"))},[n]),(0,t.jsx)(d.Ay,{children:(0,t.jsx)(u,{})})},u=s.Ay.div.withConfig({componentId:"sc-feedf790-0"})(["min-height:46vh;"])},51653:(e,n,r)=>{"use strict";r.d(n,{Ay:()=>k,U8:()=>S,m9:()=>_,tj:()=>I});var t=r(97135),i=r(28779),s=r(61827),l=r(49642),a=r(51282),d=r(34725),o=r(7023),c=r(8190),u=r(86840),m=r(79085),h=r(71411),p=r(43328),f=r(62960),g=r(79629),x=r(84800),y=r(43402),j=r(43629),v=r(32987),A=r(75478),b=r(19400),w=r(41313),C=r(82166);let k=e=>{var n,r,v;let{children:k,hideButton:N=!1}=e,R=(0,c.useRouter)(),{formStep:B,setFormStep:T,setLocalStorage:O,getLocalStorage:P,isSubmitting:M}=(0,o.useContext)(g.W),{data:V,setIsOrderSamples:z,cartItems:L,isMiniCartLoading:W,setIsMiniCartLoading:X}=(0,o.useContext)(A.M),Z=(0,o.useRef)(null),q=m.hV[B],F=(0,p.mN)({resolver:(0,h.u)(q),mode:"onSubmit",reValidateMode:"onChange"}),{isSubmitting:U}=F.formState;(0,o.useEffect)(()=>{let e=P(3===B?2:B);if(e)for(let[n,r]of Object.entries(e))F.setValue(n,r,{shouldDirty:!0})},[F,B]);let Y=async e=>{if(X(!0),!await F.trigger())return void X(!1);O(e,B);let n=B+1;if(3===n){X(!1),T(3);return}
1Z.current=n,1===n&&R.push("/order-samples/delivery"),2===n&&R.push("/order-samples/review")};return(0,o.useEffect)(()=>{let e=()=>{X(!1),null!==Z.current&&(T(Z.current),Z.current=null)};return R.events.on("routeChangeComplete",e),()=>{R.events.off("routeChangeComplete",e)}},[]),(0,o.useEffect)(()=>{z(!0),X(!1)},[]),(0,t.jsx)(w.A,{children:(0,t.jsx)(d.A,{maxWidth:"73.5rem",children:(0,t.jsxs)(u.A,{gap:[5,5,5,10],children:[(0,t.jsxs)(u.A,{gap:[4,4,4,0],children:[(0,t.jsx)(s.A,{products:null==V||null==(n=V.items)?void 0:n.filter(e=>L.includes(e.name))}),(0,t.jsx)(a.A,{color:"var(--hri)",children:"Order samples"})]}),(0,t.jsxs)(S,{children:[(0,t.jsxs)(_,{children:[(0,t.jsx)(l.A,{items:[{label:"Contact",link:"/order-samples/contact",onClick:()=>{Z.current=0}},{label:"Delivery",link:"/order-samples/delivery",onClick:()=>{Z.current=1},isDisabled:B<1||0===L.length},{label:"Review",link:"/order-samples/review",onClick:()=>{Z.current=2},isDisabled:B<2||0===L.length}],currentItem:B,collapseSpacing:!0}),(0,t.jsx)(p.Op,{...F,children:(0,t.jsx)(E,{onSubmit:F.handleSubmit(Y),children:(0,t.jsxs)(u.A,{gap:4,children:[k,N?(0,t.jsx)(t.Fragment,{}):(0,t.jsxs)(D,{isEmpty:0===L.length,children:[(0,t.jsxs)(x.A,{href:{0:"/basket",1:"/order-samples/contact",2:"/order-samples/delivery",3:"/order-samples/review"}[B],color:"var(--secondary)",onClick:()=>{B>0&&(Z.current=B-1)},children:[(0,t.jsx)(y.A,{icon:"faArrowLeft"}),(0,t.jsx)(a.A,{as:"span",maven:!0,fontSize:"var(--p-small)",color:"var(--hri)",children:0===B?"Return to basket":"Back"})]}),(0,t.jsx)(f.A,{type:"submit",variant:"hriStandAlone",disabled:!!M||!!U||0===L.length||!!W,children:M?"Loading":2===B?"Complete Request":"Next"}),0===L.length&&!M&&(0,t.jsx)(i.A,{width:"100%",children:(0,t.jsx)(j.A,{color:"var(--hri)",type:"small",textAlign:"right",children:"Can't checkout, please add items to your basket"})})]})]})})})]}),(0,t.jsx)(I,{children:(0,t.jsxs)(u.A,{gap:4,children:[(0,t.jsx)(a.A,{as:"p",type:"3",color:"var(--link)",maven:!0,children:"Basket Summary"}),(null==V||null==(r=V.items)?void 0:r.length)>0&&L.length>0&&(0,t.jsx)("ul",{children:null==V||null==(v=V.items)?void 0:v.filter(e=>L.includes(e.name)).map(e=>(0,t.jsx)(C.Ay,{product:e,isCheckoutState:!0},e.name))}),0===L.length&&!M&&(0,t.jsx)(b.A,{transparent:!0})]})})]})]})})})},_=v.Ay.div.withConfig({componentId:"sc-621dcca4-0"})(["@media (min-width:60rem){grid-area:left;}"]),I=v.Ay.div.withConfig({componentId:"sc-621dcca4-1"})(["background-color:var(--darkBlue25);border-radius:1.25rem;padding:2.5rem 1.5rem;height:auto;display:none;@media (min-width:60rem){grid-area:right;display:block;padding:2.5rem;}"]),S=v.Ay.div.withConfig({componentId:"sc-621dcca4-2"})(["@media (min-width:60rem){display:grid;grid-template-columns:1fr 1fr;grid-template-areas:'left right';align-items:flex-start;gap:1.75rem;padding-inline:0;}"]),E=v.Ay.form.withConfig({componentId:"sc-621dcca4-3"})([""]),D=v.Ay.div.withConfig({componentId:"sc-621dcca4-4"})(["display:flex;justify-content:space-between;flex-wrap:",";gap:1rem;button{margin-inline-start:auto;}","{display:flex;align-items:center;gap:0.5rem;}"],e=>e.isEmpty?"wrap":"nowrap",x.A);v.Ay.div.withConfig({componentId:"sc-621dcca4-5"})(["max-width:24rem;@media (min-width:60rem){display:none;}"])},57040:(e,n,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/order-samples",function(){return r(45386)}])},61827:(e,n,r)=>{"use strict";r.d(n,{A:()=>m});var t=r(97135),i=r(2465),s=r(51282),l=r(7023),a=r(32987),d=r(28779),o=r(19400),c=r(43402),u=r(82166);let m=e=>{let{products:n,isSuccessPage:r=!1}=e,[a,d]=(0,l.useState)(!1);return(0,t.jsx)(p,{children:(0,t.jsx)(i.nD,{allowZeroExpanded:!0,onChange:()=>d(!a),children:(0,t.jsxs)(i.As,{children:[(0,t.jsx)(i.IZ,{children:(0,t.jsx)(i.SR,{children:(0,t.jsxs)(h,{children:[(0,t.jsx)(s.A,{as:"span",type:"3",color:"var(--darkBlue800)",maven:!0,children:"Your Sample Basket"}),(0,t.jsx)(c.A,{iconType:"regular",fontSize:"2rem",icon:a?"faCircleMinus":"faCirclePlus"})]})})}),(0,t.jsxs)(f,{children:[(null==n?void 0:n.length)>0&&(0,t.jsx)("ul",{children:null==n?void 0:n.map(e=>(0,t.jsx)(u.Ay,{product:e,isCheckoutState:!0,isSuccessPage:r},e.name))}),(null==n?void 0:n.length)===0&&(0,t.jsx)(o.A,{transparent:!0})]})]})})})},h=(0,a.Ay)(d.A).withConfig({componentId:"sc-2c9e7f36-0"})(["display:flex;justify-content:space-between;align-items:center;"]),p=a.Ay.section.withConfig({componentId:"sc-2c9e7f36-1"})(["background-color:var(--darkBlue25);padding:1.875rem;border-radius:1.25rem;@media (min-width:60rem){display:none;}"]),f=(0,a.Ay)(i.IT).withConfig({componentId:"sc-2c9e7f36-2"})(["padding-block-start:2rem;"])}},e=>{var n=n=>e(e.s=n);e.O(0,[993,2725,8576,636,6593,8792],()=>n(57040)),_N_E=e.O()}]);
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.