PageSourceSearch

https://www.maskinklippet.se/static/js/CartSection.e5c22377.chunk.js

js maskinklippet.se collected 2026-10-04 07:38:38 UTC 60,738 bytes, 602 lines download raw bytes

1"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__=globalThis.__LOADABLE_LOADED_CHUNKS__||[]).push([[158,1077],{27877(e,t,r){r.d(t,{D:()=>l});r(72176);var i=r(50970),o=r(80812);const n=(0,i.T)("div")`
2    display: grid;
3    grid-template-rows: 0fr;
4    transition-property: grid-template-rows;
5
6    &.open {
7        grid-template-rows: 1fr;
8    }
9`,a=(0,i.T)("div")`
10    overflow: hidden;
11`,l=e=>{let{children:t,isOpen:r,transition:i,...l}=e;return(0,o.jsx)(n,{className:r?"open":"",transition:i,...l,children:(0,o.jsx)(a,{children:t})})}},351(e,t,r){r.d(t,{y:()=>s});var i=r(79709),o=(r(72176),r(96571)),n=r(42074),a=r(79714),l=r(80812);const s=e=>{let{breakpoint:t,render:r,children:s}=e;if(s)throw new Error("Using children in Above is deprecated. Use render prop instead.");return(0,l.jsx)(i.EA.Consumer,{children:e=>{let{breakpointIndex:i}=e;return(0,l.jsx)(o.A,{query:{minWidth:(0,a.db)(t)},defaultMatches:i>=n.W.indexOf(t),render:r})}})}},57383(e,t,r){r.d(t,{u:()=>s});var i=r(79709),o=(r(72176),r(96571)),n=r(42074),a=r(79714),l=r(80812);const s=e=>{let{breakpoint:t,render:r,children:s}=e;if(s)throw new Error("Using children in Below is deprecated. Use render prop instead.");return(0,l.jsx)(i.EA.Consumer,{children:e=>{let{breakpointIndex:i}=e;return(0,l.jsx)(o.A,{query:{maxWidth:(0,a.$J)(t)},defaultMatches:i<n.W.indexOf(t),render:r})}})}},79714(e,t,r){r.d(t,{$J:()=>n,db:()=>o});var i=r(42074);const o=e=>{if(!e)return!1;const t=i.W.indexOf(e);return t>-1&&t<i.f.length?i.f[t]:(console.error(`The breakpoint label ${e} does not exist`),!1)},n=e=>{if(!e)return!1;const t=i.W.indexOf(e);if(t>-1&&t<i.f.length){const e=i.f[t].match(/[a-zA-Z]+/)||"";return`${parseInt(i.f[t],10)-("em"===e?.01:1)}${e}`}return console.error(`The breakpoint label ${e} does not exist`),!1}},87139(e,t,r){r.d(t,{o:()=>x});var i=r(15487),o=r(50970),n=(r(72176),r(5156)),a=r(24871),l=r(80812);const s=(0,o.T)("div")`
12    display: flex;
13    flex-direction: column;
14    gap: 8px;
15    padding: 12px;
16`,c=(0,o.T)("div")`
17    display: flex;
18    align-items: center;
19    gap: 8px;
20    padding: 12px;
21`,d=(0,o.T)("div")`
22    display: flex;
23    align-items: center;
24    gap: 8px;
25`,u=(0,o.T)("div")`
26    position: relative;
27    width: 100%;
28    height: 6px;
29    border-radius: 3px;
30    background-color: var(--col-stroke-primary);
31`,p=(0,o.T)("div")`
32    height: 100%;
33    border-radius: 3px;
34    transition: width 250ms ease;
35    background-color: var(--col-brand-primary);
36
37    &[data-is-complete='true'] {
38        background-color: var(--color-base-success);
39    }
40`,h=(0,o.T)("div")`
41    position: absolute;
42    top: 50%;
43    transform: translate(-50%, -50%);
44    width: 16px;
45    height: 16px;
46    border-radius: 50%;
47    background-color: var(--col-brand-primary);
48
49    &[data-is-complete='true'] {
50        display: none;
51    }
52`,x=e=>{let{mode:t,text:r,percentage:o}=e;if("hidden"===t)return null;if("alternative"===t)return(0,l.jsxs)(c,{children:[(0,l.jsx)(a.m,{"aria-hidden":"true",focusable:"false"}),(0,l.jsx)(i.U,{textStyles:["UI/UI_14_100"],children:r})]});const x="complete"===t||o>=100,g=x?100:Math.min(100,Math.max(0,o));return(0,l.jsxs)(s,{children:[(0,l.jsx)(i.U,{textStyles:["UI/UI_14_100"],children:r}),(0,l.jsxs)(d,{children:[(0,l.jsxs)(u,{role:"progressbar","aria-valuenow":g,"aria-valuemin":0,"aria-valuemax":100,"aria-label":r,children:[(0,l.jsx)(p,{"data-is-complete":x,style:{width:`${g}%`}}),(0,l.jsx)(h,{"data-is-complete":x,style:{left:`${g}%`}})]}),(0,l.jsx)(n.F,{"aria-hidden":"true",focusable:"false",width:"35px",height:"35px",color:x?"var(--color-base-success)":void 0})]})]})}},86025(e,t,r){r.d(t,{Q:()=>n});r(72176);var i=r(66170),o=r(80812);const n=e=>{let{color:t="currentColor",...r}=e;const n=t&&t.startsWith("--")?`var(${t})`:t;return(0,o.jsx)(i.t,{fill:n,...r,children:(0,o.jsx)("path",{d:"M0.5 1.58317V0.416504H7.5V1.58317H0.5Z"})})};n.defaultProps={height:"2px",width:"8px",viewBox:"0 0 8 2"}},71197(e,t,r){r.r(t),r.d(t,{CartSection:()=>dt});var i=r(57383),o=r(87139),n=r(14803),a=r(83758),l=r(72176),s=r(50970),c=r(29169),d=r(80812);const u=(0,s.T)("div")``,p=e=>{let{showGiftCard:t,...r}=e;const i=(0,a.G)(e=>e.checkout.freightIsSelected),o=(0,a.G)(e=>e.checkout.selectedShippingData.shippingMethod),n=!(i||null!==o);return(0,d.jsx)(u,{...r,children:(0,d.jsx)(c.c,{isSubTotal:n})})};
52var h=r(15487),x=r(42046),g=r(90159),v=r(68740),m=r(6664),_=r(2327),f=r(79709),y=r(89764),b=r(81539),k=r(89556),j=r(65266),C=r(27877),T=r(15364),I=r(57012),S=r(79803),w=r(54455),E=function(e){return e.SET_TOKEN="set_token",e.SET_TOKEN_SUCCESS="set_token_success",e.SET_TOKEN_ERROR="set_token_error",e.SET_EMAIL="set_email",e.SEND_EMAIL="send_email",e.SEND_EMAIL_SUCCESS="send_email_success",e.SEND_EMAIL_ERROR="send_email_error",e.RESET="reset",e}(E||{});function U(e,t){switch(t.type){case E.SET_TOKEN:return{...e,tokenLoading:!0};case E.SET_TOKEN_SUCCESS:return{...e,token:t.token,tokenLoading:!1};case E.SET_TOKEN_ERROR:return{...e,token:!1,tokenLoading:!1};case E.SET_EMAIL:return{...e,email:t.email,emailLoading:!1,emailSent:!1,emailValid:(0,w.D)(t.email)};case E.SEND_EMAIL:return{...e,emailLoading:!0,emailError:!1,emailSent:!1};case E.SEND_EMAIL_SUCCESS:return{...e,emailLoading:!1,emailSent:!0};case E.SEND_EMAIL_ERROR:return{...e,emailLoading:!1,emailError:!0};case E.RESET:return{...e,email:"",emailValid:!1,emailSent:!1,emailError:!1,emailLoading:!1};default:throw Error(`Unknown action: ${t.type}`)}}const D={email:"",emailLoading:!1,emailSent:!1,emailValid:!1,emailError:!1,token:null,tokenLoading:!1},R=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const[{email:t,emailLoading:r,emailError:i,emailValid:o,emailSent:n,token:s,tokenLoading:c},d]=(0,l.useReducer)(U,D),u=(0,l.useRef)(null),[p,h]=(0,T.C)(),x=(0,a.G)(e=>{let{basket:t}=e;return t.basketId}),g=(0,a.G)(e=>{var t,r;let{application:i}=e;return null===i||void 0===i||null===(t=i.config.options)||void 0===t||null===(r=t.paths)||void 0===r?void 0:r.basket_share})||"",v=s?`${window.location.protocol}//${window.location.host}${g}?id=${s}`:"";(0,l.useEffect)(()=>{e&&!s&&(async()=>{d({type:E.SET_TOKEN});try{const e=await(0,I.D)(x);d({type:E.SET_TOKEN_SUCCESS,token:e.data.token})}catch(e){d({type:E.SET_TOKEN_ERROR}),console.log(e)}})()},[s,e]);return[{reset:()=>{d({type:E.RESET})},email:{email:t,isLoading:r,isError:i,isSent:n,isValid:o},token:{token:s,isCopied:h,isLoading:c,url:v}},{copySubmit:()=>{p(v)},emailChange:e=>{d({type:E.SET_EMAIL,email:e.target.value.trim()})},emailSubmit:async e=>{if(e.preventDefault(),o)try{d({type:E.SEND_EMAIL});const e=await(0,S.Y)(s,t);if(!e||200!==e.status())throw new Error("email send error");d({type:E.SEND_EMAIL_SUCCESS})}catch(r){console.log(r),d({type:E.SEND_EMAIL_ERROR})}}},{senderInput:u}]};var O=r(15805);const N=(0,s.T)("div")`
53    margin-bottom: 12px;
54    background-color: var(--col-background);
55    padding: 16px;
56    border-radius: var(--misc-corner-radius);
57    border: 1px solid var(--col-stroke-primary);
58`,$=(0,s.T)("form")`
59    display: flex;
60    flex-direction: column;
61    gap: 12px;
62    padding-top: 16px;
63`,L=(0,s.T)("div")`
64    display: flex;
65    flex-direction: column;
66    gap: 8px;
67`,V=(0,s.T)("div")`
68    display: flex;
69    flex-direction: column;
70    gap: 8px;
71`,A=(0,s.T)("div")`
72    position: absolute;
73    top: -50px;
74    left: 50%;
75    transform: translateX(-50%);
76    background-color: var(--col-ui-surface);
77    border: 1px solid var(--col-ui-border);
78    border-radius: var(--misc-corner-radius);
79    padding: 8px 16px;
80
81    &::after {
82        content: '';
83        position: absolute;
84        width: 20px;
85        height: 20px;
86        left: calc(50%);
87        top: 100%;
88        margin: -10px 0 0 -11px;
89        transform: rotate(45deg);
90        z-index: -1;
91        border-bottom: 1px solid var(--col-ui-border);
92        border-right: 1px solid var(--col-ui-border);
93        background: var(--col-ui-surface);
94    }
95`,M=(0,s.T)("div")`
96    min-width: 250px;
97    width: 100%;
98
99    > * {
100        width: 100%;
101    }
102`,B=(0,s.T)(M)``,G=(0,s.T)(M)``,P=(0,s.T)("input")`
103    padding: 8px;
104    border: 1px solid var(--col-stroke-primary);
105    border-radius: var(--misc-corner-radius);
106`,H=(0,s.T)("label")``,F=(0,s.T)("button")`
107    display: flex;
108    align-items: center;
109    justify-content: center;
110    margin-top: 8px;
111    padding: 16px 0;
112    width: 100%;
113    height: 40px;
114    background-color: var(--col-brand-primary);
115    color: var(--col-brand-on-primary);
116    border-radius: var(--misc-corner-radius);
117
118    &[data-sent='true'] {
119        background-color: var(--col-brand-secondary);
120    }
121`,Z=(0,s.T)("div")`
122    position: relative;
123`,W=e=>{let{isOpen:t,setIsOpen:r}=e;const{t:i}=(0,y.Bd)(),[o,n,a]=R(t),{email:l,token:s,reset:c}=o,{email:u,isLoading:p,isError:x,isSent:g,isValid:v}=l,{isCopied:m,isLoading:_,url:f}=s,{emailSubmit:b,emailChange:k,copySubmit:j}=n,{senderInput:T}=a,I="UI/UI_14_100",S="UI/UI_16_100";return(0,d.jsx)(C.D,{isOpen:t,transition:"300ms ease-out",id:"basketShareForm","aria-labelledby":"basketShareToggle",children:(0,d.jsxs)(N,{children:[(0,d.jsx)(h.U,{as:"h3",textStyles:["UI/UI_16_100_Bold",null,"UI/UI_20_100_Bold"],pb:"8px",children:i("basket_share.share_heading")}),(0,d.jsx)(h.U,{textStyles:[I,null,S],pb:"8px",lineHeight:"120%",children:i("basket_share.share_intro")}),(0,d.jsxs)($,{onSubmit:async e=>{await b(e),await new Promise(e=>{setTimeout(e,2e3)}),r(!1),c()},children:[(0,d.jsxs)(L,{position:"relative",children:[(0,d.jsx)(h.U,{asChild:!0,textStyles:[I,null,S],children:(0,d.jsxs)(H,{htmlFor:"basketShareLink",children:[i("basket_share.copy_share"),":"]})}),(0,d.jsxs)(Z,{children:[m&&(0,d.jsx)(A,{children:i("basket_share.copied")}),(0,d.jsx)(B,{children:_?(0,d.jsx)(O.X,{className:"loading",width:"20px",height:"20px"}):(0,d.jsx)(P,{type:"text",value:f,readOnly:!0,onClick:j})})]})]}),(0,d.jsxs)(V,{children:[(0,d.jsx)(h.U,{asChild:!0,textStyles:[I,null,S],children:(0,d.jsxs)(H,{htmlFor:"basketShareEmail",children:[i("basket_share.email_label"),":"]})}),(0,d.jsxs)("div",{children:[(0,d.jsxs)(G,{children:[(0,d.jsx)(P,{ref:T,type:"text",name:"basketShareEmail",id:"basketShareEmail",value:x?i("pdp.notify.error"):u,placeholder:`${i("basket_share.email_input")}*`,onChange:k,onFocus:()=>c()}),p&&(0,d.jsx)(O.X,{width:"20px",height:"20px"})]}),(0,d.jsx)(h.U,{asChild:!0,textStyles:[I,null,S],children:(0,d.jsxs)(F,{type:"submit",disabled:!v||p,"data-sent":g,children:[g&&`${i("sent")}!`,!g&&p&&i("sending"),!g&&!p&&i("send")]})})]})]})]})]})})};var K=r(351),q=r(90645),z=r(59228),X=r(58329),Q=r(42809),J=r(1541),Y=r(87362),ee=r(4602),te=r(52814),re=r(51872),ie=r(90820),oe=r(1272);var ne=r(82980),ae=r(47373),le=r(47337);const se=e=>async(t,r)=>{var i;t({type:ae.Ui});const o=await(0,oe.aR)("checkout.getNorceCheckout"),n=null===(i=r().checkout.order)||void 0===i?void 0:i.cart.id;if(!n)return null===o||void 0===o||o(),void t({type:ae.pn});try{var a;const i=null===(a=r().checkout.order)||void 0===a?void 0:a.cart.items.find(t=>
123t.id===e);if(!i)return null===o||void 0===o||o(),void t({type:ae.pn});const l=await(async(e,t,r)=>{const i=re.y.getTrackingData(),{applicationId:o,salesAreaId:n}=(0,oe.E1)("application"),a={application_id:o,sales_Area_id:n,part_no:r,...i};return(0,ie.bE)(`/frontend/checkout/v2/${e}/item/${t}/remove`,a)})(n,e,i.part_no);if(!l.ok())return null===o||void 0===o||o(),void t({type:ae.pn});if(204===l.status())return null===o||void 0===o||o(),t({type:ae.FF}),void ee.s.trigger(te.Xh.EMPTIED);const s=await l.body();if(!s||"object"!==typeof s)return null===o||void 0===o||o(),void t({type:ae.pn});const c=s.data;return ee.s.trigger(te.G7.UPDATED),ee.s.trigger(te.G7.PRODUCT_REMOVED,{item:i}),null===o||void 0===o||o(),t({type:ae.yn,...c}),ne.w.getBasket(),c}catch(l){return console.error(l),t({type:ae.pn}),null===o||void 0===o||o(),null}},ce=e=>le.M_.dispatch(se(e));var de=r(47348);const ue=(e,t)=>async(r,i)=>{var o;if(!t||"object"!==typeof t||!Object.keys(t).length)return;r({type:ae.B5});const n=await(0,oe.aR)("checkout.getNorceCheckout"),a=null===(o=i().checkout.order)||void 0===o?void 0:o.cart.id;if(a)try{var l;const o=null===(l=i().checkout.order)||void 0===l?void 0:l.cart.items.find(t=>t.id===e);if(!o)throw new Error("No matching cart item found");const s=o.quantity||0,c=t.quantity||s;if(c<=0)throw new Error("Quantity must be greater than 0");const d=c!==s,u=c>s,p=await(async(e,t,r,i)=>{const o=re.y.getTrackingData(),{applicationId:n,salesAreaId:a}=(0,oe.E1)("application"),l={application_id:n,sales_area_id:a,part_no:r,...o,...i};return(0,ie.bE)(`/frontend/checkout/v2/${e}/item/${t}/update`,l)})(a,e,o.part_no,t);if(!p.ok())throw new Error("UpdateCartItem failed");const h=await p.body();if(!h||"object"!==typeof h)throw new Error("UpdateCartItem response body is empty");const x=h.data;return ee.s.trigger(te.G7.UPDATED),u?ee.s.trigger(te.G7.PRODUCT_ADDED,{basketId:a,item:o}):d&&ee.s.trigger(te.G7.PRODUCT_REMOVED,{item:o}),null===n||void 0===n||n(),r({type:ae.ro,...x}),ne.w.getBasket(),x}catch(s){return console.error(s),r({type:ae.u3}),null===n||void 0===n||n(),null}else r({type:ae.u3})};var pe=r(73899),he=r(87126),xe=r(64047),ge=r(7403),ve=r(65452),me=r(3860),_e=r(58690);const fe=(0,s.T)("article")`
124    display: flex;
125    flex-direction: column;
126    gap: 2px;
127    position: relative;
128    border-bottom: 1px solid var(--col-stroke-primary);
129
130    &:last-of-type {
131        border-bottom: none;
132    }
133`,ye=(0,s.T)("div")(),be=(0,s.T)("div")`
134    display: flex;
135    flex-direction: column;
136    gap: 8px;
137
138    ${f.G1.lg} {
139        display: flex;
140        flex-direction: row;
141        align-items: center;
142        gap: 12px;
143    }
144`,ke=(0,s.T)("div")`
145    width: 100%;
146    display: flex;
147`,je=(0,s.T)("div")`
148    position: relative;
149    display: flex;
150    flex-direction: column;
151`,Ce=(0,s.T)(z.h)`
152    height: 74px;
153    border: 1px solid var(--col-stroke-primary);
154    border-radius: 5px;
155    background-color: var(--color-base-white);
156`,Te=(0,s.T)(ge.J)`
157    height: 24px;
158    width: 72px;
159    padding: 0 4px;
160    margin-right: 8px;
161    background-color: var(--color-base-white);
162
163    & > button {
164        height: 24px;
165        width: 24px;
166    }
167
168    & > input {
169        width: 24px !important;
170        font-size: 12px;
171        position: absolute;
172        left: 50%;
173        transform: translateX(-50%);
174    }
175`,Ie=(0,s.T)("div")`
176    display: flex;
177    flex-direction: column;
178    justify-content: space-between;
179    gap: 8px;
180    min-height: 72px;
181    margin-bottom: 2px;
182
183    ${f.G1.lg} {
184        gap: 12px;
185    }
186`,Se=(0,s.T)(ve.g)`
187    margin-left: auto;
188    margin-right: 0;
189    & > span {
190        margin-right: 0 !important; /* FIX: Not very nice but I'm afraid to change the Price component */
191        color: var(--col-text-primary) !important;
192        font: 500 14px/1em ${_e.a.ui} !important;
193    }
194`,we=(0,s.T)("button")`
195    position: absolute;
196    display: flex;
197    top: 0;
198    right: 0;
199`,Ee=(0,s.T)("ul")`
200    list-style-type: initial;
201    display: flex;
202    flex-direction: column;
203    gap: 4px;
204
205    padding-left: 12px;
206`,Ue=(0,s.T)("li")``,De=(0,s.T)("div")`
207    position: absolute;
208    top: 0;
209    left: 0;
210    width: 100%;
211    height: 100%;
212    background-color: var(--color-base-white-25);
213    display: flex;
214    align-items: center;
215    justify-content: center;
216    z-index: 10;
217    cursor: not-allowed;
218`,Re=e=>{var t,r,o,n;let{product:s}=e;const{t:c}=(0,y.Bd)(),[u,p]=(0,l.useState)(!1),x=(0,a.G)(e=>{let{products:t}=e;return t.showVat}),g=(0,v.k)("lg");if(!s||!s.part_no)return console.warn("Invalid product data:",s),null;const{flags:_,image:f,variant_parametrics:b}=s.format,{part_no:k,name:j,on_hand:C,is_variant:T,on_hand_store:I,recommended_quantity:S,url:w,quantity:E,items:U=[],price:D,price_inc_vat:R,price_total:O,price_total_inc_vat:N,manufacturer_part_no:$}=s,L=s.type===m.N5.BUNDLE,V=!!(0,pe.j)([me.PRODUCT_PREORDER,me.PRODUCT_BACKORDER],_);let A=null;U.length?[A]=(0,he.Jt)(U):A=(0,he.Wj)([C,I]);const M=((null===(t=A)||void 0===t?void 0:t.stock)||0)>0||V,B=!0===(null===s||void 0===s||null===(r=s.info)||void 0===r||null===(o=r.find(e=>"isEditable"===e.code))||void 0===o?void 0:o.value),G=f?(0,Y.Q3)(f,{m:"pad",f:"jpg",q:100,w:100,h:100}):me.PLACEHOLDER,P=null===b||void 0===b||null===(n=b.filter)||void 0===n?void 0:n.call(b,e=>{var t;return!(null!==e&&void 0!==e&&null!==(t=e.code)&&void 0!==t&&t.includes("du_product"))}),H=async e=>{p(!0),(0,de.E)(m.XG.CART);try{e<=0?await ce(s.id):await(t=s.id,r={quantity:e},le.M_.dispatch(ue(t,r)))}catch(i){console.error("Error updating cart item:",i)}finally{p(!1)}var t,r};return(0,d.jsxs)(fe,{"data-insights-object-id":k,p:["12px",null,"16px"],m:["0 0"],children:[u&&(0,d.jsx)(De,{children:(0,d.jsx)(Q.Loading,{autoHeight:!0})}),(0,d.jsxs)(ke,{alignItems:"stretch",gap:["8px",null,"16px"],children:[(0,d.jsx)(je,{gap:"2px",width:"72px",children:(0,d.jsx)(X.N,{to:w,children:(0,d.jsx)(Ce,{src:{url:G,width:[144]},alt:j,objectFit:"contain",height:"72px",width:"72px",scale:"down",borderRadius:"4px"},G)})}),(0,d.jsxs)(je,{flex:"1",justifyContent:"space-between",children:[B&&(0,d.jsx)(we,{type:"button","aria-label":`Remove ${s.name}`,onClick:async e=>{e.preventDefault(),p(!0),(0,de.E)(m.XG.CART);try{await ce(s.id)}catch(t){console.error("Error removing cart item:",t)}finally{p(!1)}},children:(0,d.jsx)(xe.e,{width:["12px",null,"14px"],height:["12px",null,"14px"]})}),(0,d.jsxs)(Ie,{children:[(0,d.jsx)(X.N,{to:w,children:(0,d.jsx)(h.U,{textStyles:["UI/UI_14_100",null,"UI/UI_16_100"],color:"var(--col-text-primary)",m:["0 24px 4px 0",null,"0 36px 0 0"],children:j})}),g&&(0,d.jsxs)(be,{children:[(0,d.jsxs)(h.U,{textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],children:[c("article_nr")," ",$]}),(0,d.jsx)(J.V,{...A,font:`400 14px ${_e.a.ui}`,isBookable:V,mb:"0"})]}),(0,d.jsxs)(be,{children:[!g&&(0,d.jsxs)(h.U,{textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],children:[c("article_nr")," ",$]}),T&&(0,d.jsx)(ye,{children:null===P||void 0===P?void 0:P.map(e=>{let{name:t,value:r}=e;return(0,d.jsx)(h.U,{textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],children:`${c("selected")} ${t}: ${r}`},t)})}),!g&&(0,d.jsx)(J.V,{...A,font:`400 12px ${_e.a.ui}`,isBookable:V,mb:"0"}),L&&(0,d.jsx)(Ee,{children:U.map(e=>(0,d.jsx)(h.U,{asChild:!0,textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],children:(0,d.jsx)(Ue,{children:e.name},e.part_no)},e.part_no))})]}),(0,d.jsx)(K.y,{breakpoint:"lg",render:()=>{var e,t;return(0,d.jsxs)(ke,{alignItems:"center",justifyContent:"flex-start",height:"24px",width:"100%",children:[(0,d.jsx)(Te,{withIcons:!0,basketStyling:!0,isChangeable:M&&B&&!u,value:E,minLength:S,maxLength:null!==(e=A)&&void 0!==e&&e.stock||!V?null===(t=A)||void 0===t?void 0:t.stock:100,onChange:H,graduallyQty:S}),E>1&&(0,d.jsx)(h.U,{textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],color:"var(--col-text-secondary)",children:(0,d.jsx)(q.T,{isRounded:!0,vatRate:1,price:D,priceIncVat:x?R:void 0,render:e=>c("price_with_currency",{price:e})+(s.uom&&`/${s.uom}`)})}),(0,d.jsx)(Se,{fontSize:g?"14px":"12px",isBasketItem:!0,vatRate:1,priceExVat:O,priceIncVat:x?N:void 0})]})}})]})]})]}),(0,d.jsx)(i.u,{breakpoint:"lg",render:()=>{var e,t;return(0,d.jsxs)(ke,{alignItems:"center",justifyContent:"flex-start",height:"24px",width:"100%",children:[(0,d.jsx)(Te,{basketStyling:!0,isChangeable:M&&B&&!u,value:E,minLength:S,maxLength:null!==(e=A)&&void 0!==e&&e.stock||!V?null===(t=A)||void 0===t?void 0:t.stock:100,onChange:H,graduallyQty:S}),E>1&&(0,d.jsx)(h.U,{textStyles:"UI/UI_12_100_Regular",color:"var(--col-text-secondary)",children:(0,d.jsx)(q.T,{isRounded:!0,vatRate:1,price:D,priceIncVat:x?R:void 0,render:e=>c("price_with_currency",{price:e})+(s.uom&&`/${s.uom}`)})}),(0,d.jsx)(Se,{fontSize:"12px",isBasketItem:!0,vatRate:1,priceExVat:O,priceIncVat:x?N:void 0})]})}})]})};var Oe=r(26491);let Ne=function(e){return e.INVALID="invalid",e.UNKNOWN="unknown",e.FORBIDDEN="forbidden",e}({});var $e=function(e){return e.SET_LOADING="SET_LOADING",e.SET_DISCOUNT_CODE="SET_DISCOUNT_CODE",e.SET_ERROR="SET_ERROR",e.ADD_DISCOUNT_CODE="ADD_DISCOUNT_CODE",e.ADD_DISCOUNT_CODE_SUCCESS="ADD_DISCOUNT_CODE_SUCCESS",e.ADD_DISCOUNT_CODE_ERROR="ADD_DISCOUNT_CODE_ERROR",e.SET_IS_OPEN="SET_IS_OPEN",e}($e||{});const Le=(e,t)=>{switch(t.type){case $e.SET_LOADING:return{...e,isLoading:t.payload};case $e.SET_DISCOUNT_CODE:return{...e,discountCode:t.payload};case $e.SET_ERROR:return{...e,error:t.payload};case $e.ADD_DISCOUNT_CODE:return{...e,isLoading:!0,error:null};case $e.ADD_DISCOUNT_CODE_SUCCESS:return{...e,isLoading:!1,error:null,discountCode:""};case $e.ADD_DISCOUNT_CODE_ERROR:return{...e,isLoading:!1,error:t.payload,discountCode:""};case $e.SET_IS_OPEN:return{...e,isOpen:t.payload};default:return e}},Ve={isLoading:!1,discountCode:"",error:null,isOpen:!1},Ae=e=>async(t,r)=>{var i,o;const n=null===(i=r().checkout.order)||void 0===i||null===(o=i.cart)||void 0===o?void 0:o.id,a=await(0,oe.aR)("checkout.getNorceCheckout");if(!n)return{errorMessage:Ne.UNKNOWN,success:!1};t({type:ae.fq});try{const r=await((e,t)=>{const{applicationId:r,salesAreaId:i}=(0,oe.E1)("application");if(!r)throw new Error("[AddCartDiscount] Application ID is missing");return(0,ie.bE)(`/frontend/checkout/v2/${e}/discount/${t}`,{application_id:r,sales_area_id:i})})(n,e),i=r.status(),o=r.ok();if(404===i)return t({type:ae.Ai}),null===a||void 0===a||a(),{errorMessage:Ne.INVALID,success:!1};if(403===i)return t({type:ae.Ai}),null===a||void 0===a||a(),{errorMessage:Ne.FORBIDDEN,success:!1};if(!o)throw new Error("Failed to add discount");const l=await r.body();if(!l||"object"!==typeof l)throw new Error("Invalid response body");const s=l.data;return ee.s.trigger(te.G7.UPDATED),t({type:ae.J9,basketId:n,...s}),ne.w.getBasket(),null===a||void 0===a||a(),{errorMessage:null,success:!0}}catch(l){return console.error(l),null===a||void 0===a||a(),{errorMessage:Ne.UNKNOWN,success:!1}}};var Me=r(4271),Be=r(96309);
218class Ge extends Error{constructor(e){super(`Unable to add discount code (${e})`),this.code=void 0,this.name="VoucherInputError",this.code=e}}const Pe=(0,s.T)("div")``,He=(0,s.T)("form")`
219    width: 100%;
220    display: flex;
221    flex-wrap: wrap;
222    gap: 8px;
223`,Fe=(0,s.T)("div")`
224    position: relative;
225    flex: 1;
226`,Ze=(0,s.T)("input")`
227    width: 100%;
228    border-radius: var(--misc-corner-radius);
229    padding: 18px 12px 6px 12px;
230    border-width: 0.5px;
231
232    &[data-has-error='true'] {
233        border-color: var(--color-base-error);
234    }
235`,We=(0,s.T)("label")`
236    position: absolute;
237    top: 8px;
238    left: 13px;
239`,Ke=(0,s.T)("button")`
240    color: var(--col-ui-secondary);
241    text-decoration: underline;
242`,qe=(0,s.T)("button")`
243    display: flex;
244    gap: 12px;
245    justify-content: center;
246    align-items: center;
247    padding: 12px;
248    border-radius: var(--misc-corner-radius);
249    background-color: var(--col-brand-primary);
250    color: var(--col-brand-on-primary);
251
252    &:disabled {
253        cursor: not-allowed;
254    }
255`,ze=(0,s.T)("p")`
256    color: var(--color-base-error);
257    width: 100%;
258    flex-basis: 100%;
259`,Xe=(0,s.T)(C.D)`
260    ${f.G1.lg} {
261        padding-top: 16px;
262    }
263
264    &[data-is-open='false'] {
265        ${f.G1.lg} {
266            padding-top: 0;
267        }
268    }
269
270    &[data-is-open='true'] > div {
271        overflow: visible;
272
273        ${f.Gz.lg} {
274            padding-bottom: 12px;
275            padding-top: 16px;
276        }
277    }
278`,Qe=e=>{let{callback:t}=e;const{t:r}=(0,y.Bd)(),i=(0,Me.zy)(),{state:o,setDiscountCode:n,resetError:s,addDiscountCode:c,addDiscountCodeSuccess:u,addDiscountCodeError:p,openVoucher:x,closeVoucher:g}=(()=>{const[e,t]=(0,l.useReducer)(Le,Ve),r=()=>{t({type:$e.SET_ERROR,payload:null})};return{state:e,setDiscountCode:e=>{var r;t({type:$e.SET_DISCOUNT_CODE,payload:(r=e,r.trim().replaceAll(" ",""))})},resetError:r,addDiscountCode:()=>{t({type:$e.ADD_DISCOUNT_CODE})},addDiscountCodeSuccess:()=>{t({type:$e.ADD_DISCOUNT_CODE_SUCCESS})},addDiscountCodeError:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ne.UNKNOWN;t({type:$e.ADD_DISCOUNT_CODE_ERROR,payload:e})},openVoucher:()=>{r(),t({type:$e.SET_IS_OPEN,payload:!0})},closeVoucher:()=>{r(),t({type:$e.SET_IS_OPEN,payload:!1})}}})(),{discountCode:v,isLoading:m,error:_,isOpen:f}=o,b=(0,l.useRef)(null),k=((0,a.G)(e=>{var t;let{checkout:r}=e;return null===(t=r.order)||void 0===t?void 0:t.cart.discounts})||[]).filter(e=>"string"===typeof e.code).length>0,j=!!_;(0,l.useEffect)(()=>{var e,t;f?null===(e=b.current)||void 0===e||e.focus():null===(t=b.current)||void 0===t||t.blur()},[f]),(0,l.useEffect)(()=>{const e=new URLSearchParams(i.search);e.has("discountCode")&&(n(e.get("discountCode")||""),x())},[]);const C=m||k,T=m||k||j||""===v.trim();return(0,d.jsxs)(Pe,{children:[(0,d.jsx)(h.U,{asChild:!0,textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],textDecoration:"underline",children:(0,d.jsx)(Ke,{id:"discountFormToggle",type:"button",onClick:f?g:x,"aria-expanded":f,"aria-controls":"discountCodeForm",children:r("have_discount_code?")})}),(0,d.jsx)(Xe,{"data-is-open":f,isOpen:f,transition:"300ms ease-out",id:"discountCodeForm","aria-labelledby":"discountFormToggle",children:(0,d.jsxs)(He,{onSubmit:async e=>{if(e.preventDefault(),""===v.trim()||k)return;c();let r=!1;try{if(t){if(!0!==await t(v))throw new Ge(Ne.UNKNOWN);return u(),void(r=!0)}const e=await(e=>le.M_.dispatch(Ae(e)))(v);if(null===e||void 0===e||!e.success)throw new Ge((null===e||void 0===e?void 0:e.errorMessage)||Ne.UNKNOWN);u(),r=!0}catch(o){if(o instanceof Ge)return void p(o.code||Ne.UNKNOWN);p(Ne.UNKNOWN)}finally{var i;if(!r)null===(i=b.current)||void 0===i||i.focus()}},"aria-busy":m,children:[(0,d.jsxs)(Fe,{children:[(0,d.jsx)(h.U,{asChild:!0,textStyles:["UI/UI_8_100_Regular",null,"UI/UI_10_100_Regular"],children:(0,d.jsx)(We,{htmlFor:"discountCode",children:r("checkout.discount_input.label")})}),(0,d.jsx)(h.U,{asChild:!0,textStyles:["UI/UI_16_100_Regular",null,"UI/UI_20_100_Regular"],children:(0,d.jsx)(Ze,{ref:b,type:"text",id:"discountCode",name:"discountCode",autoComplete:"off",value:v,onCh
278ange:e=>{j&&s(),n(e.target.value)},disabled:C,"data-has-error":j,"aria-invalid":j||void 0,"aria-describedby":j?"discountCodeError":void 0,placeholder:r("checkout.discount_input.placeholder")})})]}),(0,d.jsx)(h.U,{asChild:!0,textStyles:["UI/UI_14_100",null,"UI/UI_16_100"],children:(0,d.jsx)(qe,{type:"submit",disabled:T,"data-checkout-primary-button":!0,"data-has-error":j,children:m?r("loading"):(0,d.jsxs)(d.Fragment,{children:[r("add_code"),(0,d.jsx)(Be.c,{width:["10px",null,"14px"],height:["10px",null,"14px"],color:"var(--col-brand-on-primary)","aria-hidden":"true",focusable:"false"})]})})}),j&&(0,d.jsx)(h.U,{asChild:!0,textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],children:(0,d.jsx)(ze,{id:"discountCodeError",role:"alert",children:r(`checkout.discount_input.errors.${_}`,{defaultValue:r("checkout.discount_input.errors.unknown")})})})]})})]})},Je=(0,s.T)("div")``,Ye=e=>{let{isCartStep:t}=e;const{hasActiveVoucher:r}=(0,g.h)();return t?(0,d.jsxs)(Je,{children:[!r&&(0,d.jsx)(Qe,{}),(0,d.jsx)(i.u,{breakpoint:"lg",render:()=>(0,d.jsx)(Oe.$,{})})]}):null},et=(0,s.T)("div")`
279    position: relative;
280    background-color: var(--col-ui-surface);
281    border-radius: var(--misc-corner-radius);
282    border: 1px solid var(--col-stroke-primary);
283
284    &[data-is-current-step='false'] {
285        ${f.G1.lg} {
286            display: none;
287        }
288    }
289`,tt=(0,s.T)("div")``,rt=(0,s.T)("div")`
290    display: flex;
291    align-items: center;
292`,it=(0,s.T)("button")`
293    height: 32px;
294`,ot=(0,s.T)("div")`
295    display: flex;
296    align-items: center;
297    justify-content: space-between;
298    gap: 16px;
299    padding-bottom: 16px;
300
301    ${f.G1.lg} {
302        &[data-is-current-step='false'] {
303            padding-bottom: 0;
304        }
305    }
306`,nt=(0,s.T)("div")``,at=(0,s.T)("div")`
307    display: flex;
308    flex-direction: column;
309    gap: 16px;
310    padding: 12px;
311    border-top: 1px solid var(--col-stroke-primary);
312
313    ${f.G1.lg} {
314        &[data-active-voucher='true'] {
315            display: none;
316        }
317    }
318
319    &[data-is-current-step='false'] {
320        ${f.Gz.lg} {
321            border-top: none;
322        }
323    }
324`,lt=(0,s.T)("button")`
325    position: relative;
326    display: flex;
327    align-items: center;
328    gap: 8px;
329    height: 32px;
330    cursor: pointer;
331    color: var(--col-ui-primary);
332    z-index: 1;
333
334    &[data-shaking='true'] {
335        animation: ${_.GB} 0.5s ease;
336    }
337`,st=(0,s.T)("form")`
338    display: flex;
339    justify-content: center;
340    position: sticky;
341    padding: 16px 0;
342    bottom: 0;
343
344    ${f.G1.lg} {
345        padding: 24px 0;
346    }
347`,ct=(0,s.T)("button")`
348    background-color: var(--col-brand-primary);
349    color: var(--col-brand-on-primary);
350    text-align: center;
351    padding: 13px;
352    border-radius: var(--misc-corner-radius);
353    width: 100%;
354
355    &[data-shaking='true'] {
356        animation: ${_.GB} 0.5s ease;
357    }
358
359    ${f.G1.lg} {
360        max-width: 300px;
361    }
362`,dt=()=>{const{t:e}=(0,y.Bd)(),t=(0,a.G)(e=>{var t;return null===(t=e.checkout.order)||void 0===t?void 0:t.cart.items})||[],r=(0,a.G)(e=>{var t;return null===(t=e.basket)||void 0===t?void 0:t.freeShippingBar}),{hasActiveVoucher:s}=(0,g.h)(),[c,u]=(0,l.useState)(!1),f=(0,a.G)(e=>{let{checkout:t}=e;return t.currentStep})===m.XG.CART,C=(0,_.q0)(),T=(0,_.q0)(m.XG.CART),{setCurrentStep:I}=(0,x.I)(),S=(0,v.k)("lg");return(0,d.jsxs)(n.$,{"data-is-active":f,children:[(0,d.jsxs)(tt,{children:[(0,d.jsxs)(ot,{"data-is-current-step":f,children:[(0,d.jsxs)(rt,{color:!f&&"var(--color-ui-tertiary)",children:[(0,d.jsx)(b.K,{width:S?"20px":"16px",height:S?"20px":"16px",color:f?"black":"var(--color-ui-tertiary)"}),(0,d.jsx)(h.U,{textStyles:["UI/UI_16_100",null,"UI/UI_20_100"],m:["0 8px 0 12px",null,"0 4px 0 16px"],children:e("checkout.cart_section.title")}),(0,d.jsxs)(h.U,{textStyles:["UI/UI_16_100_Regular",null,"UI/UI_20_100_Regular"],color:f&&"var(--col-ui-secondary)",children:["(",t.length,")"]})]}),f?(0,d.jsx)(it,{id:"basketShareToggle",onClick:()=>u(!c),type:"button","aria-expanded":c,"aria-controls":"basketShareForm",children:(0,d.jsxs)(h.U,{as:"span",textStyles:["UI/UI_14_100",null,"UI/UI_16_100"],children:[e("basket_share.share"),(0,d.jsx)(j.l,{m:["0 0 0 8px"],width:S?"14px":"12px",height:S?"14px":"12px"})]})}):(0,d.jsx)(h.U,{asChild:!0,textStyles:["UI/UI_14_100",null,"UI/UI_16_100"],children:(0,d.jsxs)(lt,{type:"button","data-shaking":T,onClick:e=>{e.preventDefault(),e.stopPropagation(),I(m.XG.CART)},children:[e("checkout.edit"),(0,d.jsx)(k.r,{color:"var(--col-ui-primary)",width:S?"10px":"8px",height:S?"10px":"8px"})]})})]}),f&&(0,d.jsx)(W,{isOpen:c,setIsOpen:u})]}),(0,d.jsxs)(et,{"data-is-current-step":f,children:[f&&(0,d.jsx)(nt,{children:t.map(e=>(0,d.jsx)(Re,{product:e},e.id))}),f&&r&&(0,d.jsx)(o.o,{mode:r.checkout_mode,text:r.checkout_text,percentage:r.percentage}),(0,d.jsxs)(at,{"data-active-voucher":s,"data-is-current-step":f,children:[(0,d.jsx)(Ye,{isCartStep:f}),(0,d.jsx)(i.u,{breakpoint:"lg",render:()=>(0,d.jsx)(p,{})})]})]}),f&&(0,d.jsx)(st,{onSubmit:e=>{e.preventDefault(),I(m.XG.SHIPPING)},children:(0,d.jsx)(h.U,{asChild:!0,textStyles:["UI/UI_14_100_Bold",null,"UI/UI_16_100_Bold"],children:(0,d.jsx)(ct,{type:"submit","data-checkout-primary-button":!0,"data-shaking":C,children:e("checkout.continue_to_delivery_options")})})})]})}},42809(e,t,r){r.r(t),r.d(t,{Loading:()=>l});r(72176);var i=r(15805),o=r(50970),n=r(80812);const a=(0,o.T)("div")``,l=e=>{let{autoHeight:t=!1}=e;return(0,n.jsx)(a,{height:t?"auto":"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",children:(0,n.jsx)(a,{display:"flex",flexDirection:"column",height:t?"auto":"150px",alignItems:"center",children:(0,n.jsx)(i.X,{})})})}},14803(e,t,r){r.d(t,{$:()=>i});const i=(0,r(50970).T)("div")`
363    position: relative;
364
365    &[data-is-active='false']::after {
366        content: '';
367        position: absolute;
368        inset: 0;
369        background-color: rgba(255, 255, 255, 0.7);
370    }
371`},29169(e,t,r){r.d(t,{c:()=>h});var i=r(90645),o=r(15487),n=r(5419),a=r(83758),l=(r(72176),r(89764)),s=r(50970),c=r(80812);const d=(0,s.T)("div")`
372    display: flex;
373    flex-direction: column;
374    gap: 12px;
375`,u=(0,s.T)("div")`
376    display: flex;
377    flex-direction: row;
378    justify-content: space-between;
379    gap: 12px;
380    width: 100%;
381`,p=(0,s.T)("div")`
382    display: flex;
383    flex-direction: column;
384    align-items: flex-end;
385    gap: 4px;
386`,h=e=>{let{includeShippingPrice:t=!1,isRightSide:r=!1,isSubTotal:s=!1}=e;const{t:h}=(0,l.Bd)(),{totalAmount:x,totalVat:g}=(0,n.r)(t),v=(0,a.G)(e=>e.products.showVat),m=r?["UI/UI_14_100_Regular",null,"UI/UI_16_100_Regular"]:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],_=r?["UI/UI_16_100",null,"UI/UI_20_100"]:["UI/UI_14_100",null,"UI/UI_16_100"],f=r?"var(--col-text-secondary)":"var(--col-ui-secondary)";return(0,c.jsxs)(d,{children:[!v&&(0,c.jsxs)(u,{children:[(0,c.jsx)(o.U,{textStyles:m,color:f,children:h("vat")}),(0,c.jsx)(i.T,{price:g,render:e=>
386(0,c.jsx)(o.U,{textStyles:m,color:f,children:h("price_with_currency",{price:e})})})]}),(0,c.jsxs)(u,{marginTop:r?"0px":"4px",children:[(0,c.jsx)(o.U,{textStyles:_,color:"var(--col-ui-primary)",children:h(s?"checkout.summary.subtotal":"my_account.total")}),(0,c.jsxs)(p,{children:[(0,c.jsx)(i.T,{price:x,render:e=>(0,c.jsx)(o.U,{textStyles:_,color:"var(--col-brand-primary)",fontWeight:"800",children:h("price_with_currency",{price:e})})}),v&&x>0&&(0,c.jsx)(i.T,{price:g,render:e=>(0,c.jsxs)(o.U,{textStyles:m,color:f,children:[h("order_confirmation.including_vat"),":"," ",h("price_with_currency",{price:e})]})})]})]})]})}},26491(e,t,r){r.d(t,{$:()=>T});var i=r(90159),o=r(72176),n=r(50970),a=r(90645),l=r(15487),s=r(83758),c=r(4602),d=r(52814),u=r(90820),p=r(1272);var h=r(82980),x=r(47373),g=r(47337);const v=e=>async(t,r)=>{var i,o;const n=null===(i=r().checkout.order)||void 0===i||null===(o=i.cart)||void 0===o?void 0:o.id;if(!n)throw new Error("[RemoveCartDiscount] Basket ID is missing");t({type:x.om});const a=await(0,p.aR)("checkout.getNorceCheckout");try{const r=await((e,t)=>{const{applicationId:r,salesAreaId:i}=(0,p.E1)("application");if(!r)throw new Error("[RemoveCartDiscount] Application ID is missing");return(0,u.yH)(`/frontend/checkout/v2/${e}/discount/${t}`,{application_id:r,sales_area_id:i})})(n,e);if(!r.ok())throw new Error("Failed to remove discount");const i=await r.body();if(!i||"object"!==typeof i)throw new Error("Invalid response body");const o=i.data;return t({type:x.Aw,basketId:n,...o}),c.s.trigger(d.G7.UPDATED),h.w.getBasket(),null===a||void 0===a||a(),!0}catch(l){return console.error(l),null===a||void 0===a||a(),t({type:x.JJ}),!1}};var m=r(89764),_=r(96309),f=r(80812);const y=(0,n.T)("div")`
387    display: flex;
388    justify-content: space-between;
389    color: var(--col-text-secondary);
390
391    &[data-loading='true'] {
392        opacity: var(--button-disabled-opacity);
393        pointer-events: none;
394    }
395`,b=(0,n.T)("div")`
396    display: flex;
397    align-items: center;
398    gap: 2px;
399`,k=(0,n.T)("button")`
400    display: flex;
401    margin-left: 8px;
402    color: var(--col-text-secondary);
403`,j=e=>{let{discount:t}=e;const{t:r}=(0,m.Bd)(),[i,n]=(0,o.useState)(!1),c=(0,s.G)(e=>e.products.showVat);return(0,f.jsxs)(y,{"data-loading":i,children:[(0,f.jsxs)(b,{children:[(0,f.jsx)(l.U,{textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],children:t.code?`${r("checkout.discount.prefix")}: \u201c${t.code}\u201d`:t.name}),t.code&&(0,f.jsx)(k,{type:"button",onClick:async()=>{var e;t.code&&!i&&(n(!0),await(e=t.code,g.M_.dispatch(v(e))),n(!1))},disabled:i,children:(0,f.jsx)(_.c,{width:["8px",null,"12px"],height:["8px",null,"12px"],color:"currentColor",transform:"rotate(45deg)"})})]}),(0,f.jsx)(a.T,{price:t.applied_amount_ex_vat,priceIncVat:c?t.applied_amount_inc_vat:void 0,render:e=>(0,f.jsx)(l.U,{textStyles:["UI/UI_12_100_Regular",null,"UI/UI_14_100_Regular"],textDecoration:"line-through",children:r("price_with_currency",{price:e})})})]},t.name)},C=(0,n.T)("div")`
404    display: flex;
405    flex-direction: column;
406    gap: 12px;
407`,T=()=>{const{discountsWithCode:e,automaticPromotions:t}=(0,i.h)();return 0===e.length&&0===t.length?null:(0,f.jsxs)(C,{children:[e.map(e=>(0,f.jsx)(j,{discount:e},e.name)),t.map(e=>(0,f.jsx)(j,{discount:e},e.name))]})}},1541(e,t,r){r.d(t,{V:()=>m});var i=r(43364),o=r(79709),n=r(72176),a=r(89764),l=r(78633),s=r(25535),c=r(69605),d=r(50970),u=r(80812);const p=(0,d.T)("span",{shouldForwardProp:e=>-1===["hasBackOrderFlag","hasPreOrderFlag","inStock","isBookable"].indexOf(e)})`
408    display: block;
409    position: relative;
410
411    svg {
412        vertical-align: middle;
413    }
414
415    &:before {
416        content: '';
417        display: inline-block;
418        width: 5px;
419        height: 5px;
420        border-radius: 50%;
421        margin-right: 4px;
422        background-color: ${c.T.outOfStock};
423        margin-bottom: 1px;
424
425        ${o.G1.xl} {
426            width: 8px;
427            height: 8px;
428            margin-right: 8px;
429        }
430    }
431    &.bookable:before {
432        background-color: ${c.T.isBookable};
433    }
434    &.bookable-arrow:before {
435        position: absolute;
436        white-space: pre;
437        display: inline;
438        margin-right: 8px;
439        width: 0;
440        height: 0;
441        border-radius: 2px;
442        border-top: 7px solid transparent;
443        border-bottom: 7px solid transparent;
444
445        border-left: 7px solid ${c.T.inStock};
446        background-color: transparent;
447    }
448
449    &.in-stock:before {
450        background-color: ${c.T.inStock};
451    }
452
453    &.hide::before {
454        background-color: transparent;
455    }
456
457    &.with-icon:before {
458        display: none;
459    }
460
461    &.no-text:before {
462        display: none;
463    }
464`,h=(0,d.T)("span")`
465    &.bookable-arrow {
466        margin-left: 12px;
467    }
468`,x=(0,d.T)("button")`
469    margin-left: 8px;
470`,g=(0,d.T)("div")`
471    margin-top: 2px;
472    padding-left: 10px;
473
474    ${o.G1.xl} {
475        padding-left: 16px;
476    }
477`,v=(0,d.T)("span")`
478    font-size: 11px;
479    line-height: 1em;
480
481    ${o.G1.lg} {
482        font-size: 12px;
483    }
484`,m=e=>
484{let{isBookable:t,isOutForSeason:r,isVariant:o,showBookingInfoText:c,onHandFilter:d,height:m,stock:_,leadTime:f,nextDelivery:y,displayText:b,render:k,prefix:j,suffix:C,DeliveryIcon:T,isSearchItem:I,isStoreStock:S,onlyPickUpInStore:w,recommendedQuantity:E=1,...U}=e;const[D,R]=(0,n.useState)(!1),{t:O}=(0,a.Bd)(),N=(0,l.d4)(e=>{var t,r,i,o;return null===(t=e.application)||void 0===t||null===(r=t.config)||void 0===r||null===(i=r.options)||void 0===i||null===(o=i.products)||void 0===o?void 0:o.in_stock_text}),$=_>0&&_>=E&&"OUT_OF_STOCK"!==d,L="maskinklippet",V=i.rx.includes(L);let A,M;if(o&&!$)return(0,u.jsx)(p,{className:"no-text",height:m});if(y&&!$)t?(A=O(I?"stock.pre_order_without_date":"stock.pre_order_in_stock",{date:y}),M=null):(A=O(I?"stock.expected_without_date":"stock.expected_in_stock",{date:y}),M=null);else if($&&f>0){let e,t="stock.lead_time_"+(f>5?"weeks":"days");M="incoming",f<=5?e=`${f}-${f+2}`:f>5&&f<14?e="1-2":f>=14&&f<21?e="2-3":f>=21&&f<28?e="3-4":f>=28&&f<42?e="4-6":f>=42&&f<56?e="6-8":f>=56&&f<85?e="8-12":t=f<=100?V?"stock.order_item":"stock.contact":V?"stock.manufacturing_item":"stock.contact",A=O(t,{leadTime:e,context:null})}else{if($){const e="string"===typeof(null===N||void 0===N?void 0:N.text)?N.text.trim():"";A=null!==N&&void 0!==N&&N.active&&e&&!S?e:O("stock.in_stock")}else A=O(r?"stock.out_for_season":t?"stock.pre_order":"stock.out_of_stock");M=$?"inStock":null}const B="incoming"===M&&!!T;let G="";return B?G+="in-stock with-icon":M&&(G+="in-stock"),k?k(A):(0,u.jsxs)(p,{className:`${G} ${!$&&t?"bookable":""} ${!$&&t?"bookable-arrow":""}\n            ${w?"hide":""}\n            `,...U,inStock:$,isBookable:t,children:[!w&&B&&(0,u.jsx)(T,{}),b&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)(h,{className:""+(!$&&t?"bookable-arrow":""),children:[w?null:j,w?O("stock.only_in_store"):A]}),C,c&&!$&&t&&(0,u.jsx)(x,{onClick:()=>R(e=>!e),children:(0,u.jsx)(s.m,{})}),D&&(0,u.jsx)(g,{children:(0,u.jsx)(v,{children:O("stock.book_info")})})]})]})};m.defaultProps={DeliveryIcon:null,displayText:!0,hasBackOrderFlag:!1,hasPreOrderFlag:!1,height:null,isBookable:!1,isOutForSeason:!1,isSearchItem:!1,isStoreStock:!1,isVariant:!1,leadTime:null,locale:null,nextDelivery:null,onlyPickUpInStore:!1,onHandFilter:"",prefix:"",render:null,showBookingInfoText:!1,suffix:""}},79789(e,t,r){r.d(t,{d:()=>n});var i=r(83758),o=r(6664);const n=()=>{const e=(0,i.G)(e=>{var t;return null===(t=e.checkout.order)||void 0===t?void 0:t.payments})||[];return Array.isArray(e)?(null!==e&&void 0!==e?e:[]).filter(e=>"awardit_adapter"===e.adapter_id&&e.state!==o.BP.REMOVED&&e.amount>0):[]}},90159(e,t,r){r.d(t,{h:()=>o});var i=r(83758);const o=()=>{const e=(0,i.G)(e=>{var t,r;let{checkout:i}=e;return null===i||void 0===i||null===(t=i.order)||void 0===t||null===(r=t.cart)||void 0===r?void 0:r.discounts})||[],t=e.filter(e=>"string"===typeof e.code);return{discountsWithCode:t,hasActiveVoucher:t.length>0,automaticPromotions:e.filter(e=>null===e.code),discounts:e}}},5419(e,t,r){r.d(t,{r:()=>l});var i=r(83758),o=r(72176),n=r(79789);const a={amount:0,vat:0,incVat:0},l=function(){var e,t,r;let l=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const s=null!==(e=(0,i.G)(e=>{var t,r;return null===(t=e.checkout.order)||void 0===t||null===(r=t.cart)||void 0===r?void 0:r.items}))&&void 0!==e?e:[],c=null!==(t=(0,i.G)(e=>{var t,r;return null===(t=e.checkout.order)||void 0===t||null===(r=t.cart)||void 0===r?void 0:r.discounts}))&&void 0!==t?t:[],d=(0,i.G)(e=>{var t;return null===(t=e.checkout.selectedShippingData)||void 0===t?void 0:t.shippingMethod}),u=null!==(r=(0,i.G)(e=>{var t;return null===(t=e.checkout.order)||void 0===t?void 0:t.shipping.items}))&&void 0!==r?r:[],p=(0,n.d)();return(0,o.useMemo)(()=>{const e=(e=>e.reduce((e,t)=>{var r,i,o,n;return{amount:e.amount+(null!==(r=t.price_total)&&void 0!==r?r:0),vat:e.vat+((null!==(i=t.price_total_inc_vat)&&void 0!==i?i:0)-(null!==(o=t.price_total)&&void 0!==o?o:0)),incVat:e.incVat+(null!==(n=t.price_total_inc_vat)&&void 0!==n?n:0)}},a))(s),t=u.some(e=>{var t;return!0===(null===(t=e.attributes)||void 0===t?void 0:t.vatExempt)}),r=((e,t)=>{var r;if(!e)return a;const i=null!==(r=e.price)&&void 0!==r?r:0,o=t?i:i*(e.vat_rate||1);return{amount:i,vat:o-i,incVat:o}})(d,t),i=(e=>e.reduce((e,t)=>
484({amount:e.amount+t.applied_amount_ex_vat,vat:e.vat+(t.applied_amount_inc_vat-t.applied_amount_ex_vat),incVat:e.incVat+t.applied_amount_inc_vat}),a))(c),o=l?{amount:e.amount+r.amount,vat:e.vat+r.vat,incVat:e.incVat+r.incVat}:e,n=p.reduce((e,t)=>e+t.amount,0),h={amount:Math.max(o.amount-n,0),vat:Math.max(o.vat,0),incVat:Math.max(o.incVat-n,0)};return{productsTotalExVat:e.amount,productsTotalVat:e.vat,productsTotal:e.incVat,shippingTotalExVat:l?r.amount:0,shippingTotalVat:l?r.vat:0,shippingTotal:l?r.incVat:0,discountAmountExVat:i.amount,discountVat:i.vat,discountAmount:i.incVat,totalAmountExVat:h.amount,totalVat:h.vat,totalAmount:h.incVat,giftCardAmount:n}},[s,c,d,u,l,p])}},68740(e,t,r){r.d(t,{k:()=>d});var i=r(72176),o=r(94497),n=r.n(o),a=r(79709),l=r(42074),s=r(79714),c=r(43364);const d=function(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=(0,i.useContext)(a.EA).breakpointIndex,o=l.W.indexOf(e),d=()=>!c.Rq&&window.matchMedia(`(min-width: ${(0,s.db)(e)})`).matches,u=d(),[p,h]=(0,i.useState)(c.Rq&&"number"===typeof r?r>=o:u);return(0,i.useEffect)(()=>{const e=n()(()=>{const e=d();e!==p&&h(e)},250);return t&&window.addEventListener("resize",e),()=>{e.cancel(),window.removeEventListener("resize",e)}},[p]),p}},15364(e,t,r){r.d(t,{C:()=>o});var i=r(72176);function o(){const[e,t]=(0,i.useState)(!1);return[e=>{(async function(e){return"clipboard"in navigator?navigator.clipboard.writeText(e):document.execCommand("copy",!0,e)})(e).then(()=>{t(!0),setTimeout(()=>{t(!1)},1500)}).catch(e=>{console.log(e)})},e]}},57012(e,t,r){r.d(t,{D:()=>n});var i=r(32538),o=r(1272);const n=async e=>{const{applicationId:t,salesAreaId:r}=(0,o.E1)("application");return(0,i.bE)(`/frontend/basket/${e}/share`,{application_id:t,sales_area_id:r})}},79803(e,t,r){r.d(t,{Y:()=>n});var i=r(90820),o=r(1272);const n=async(e,t)=>{if(!e||!t)return;const{applicationId:r,salesAreaId:n}=(0,o.E1)("application");return(0,i.bE)(`/frontend/basket/share/${e}/send`,{application_id:r,sales_area_id:n,email:t})}},95349(e,t,r){r.d(t,{n:()=>i});const i=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e||null==t||Number.isNaN(t))return null;const i=(e-t)/e;return r&&0===Math.round(100*i)?100*i:Math.round(100*i)}},67727(e,t,r){r.d(t,{v:()=>n});var i=r(1272),o=r(95349);const n=(e,t,r)=>{let n=r;if(!r){var a,l,s,c,d,u;const e=(0,i.Gu)("application");n={hideHistoricalPrice:null===e||void 0===e||null===(a=e.config)||void 0===a||null===(l=a.options)||void 0===l||null===(s=l.pricing)||void 0===s?void 0:s.hide_historical,historicalPriceSettings:null===e||void 0===e||null===(c=e.config)||void 0===c||null===(d=c.options)||void 0===d||null===(u=d.pricing)||void 0===u?void 0:u.historical_price_settings}}if(e>=t)return!1;if(n.hideHistoricalPrice)return!1;const p=(0,o.n)(t,e);if(!n.historicalPriceSettings)return parseInt(p,10)>=1;const{price_x:h,percentage_y:x,percentage_z:g}=n.historicalPriceSettings;return e<h&&p>x||e>h&&p>g}},54455(e,t,r){r.d(t,{D:()=>i});const i=e=>/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(String(e).toLowerCase())},5156(e,t,r){r.d(t,{F:()=>n});r(72176);var i=r(66170),o=r(80812);const n=e=>{let{color:t,...r}=e;return(0,o.jsxs)(i.t,{fill:"none",viewBox:"0 0 117 118",...r,children:[(0,o.jsx)("path",{d:"M56.2475 62.6813 19.9618 41.6607c-2.4191-1.4014-5.4475.3441-5.4475 3.1397v32.6034c0 1.2945.6896 2.4909 1.8097 3.1398l36.2857 21.0204c2.419 1.402 5.4474-.344 5.4474-3.1395V65.8211c0-1.2944-.6895-2.4909-1.8096-3.1398Z",fill:t,stroke:"#fff",strokeWidth:"3.62857",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"m59.8667 62.6813 36.2857-21.0206c2.419-1.4014 5.4476.3441 5.4476 3.1397v32.6034c0 1.2945-.69 2.4909-1.8098 3.1398L63.5045 101.564c-2.4191 1.402-5.4475-.344-5.4475-3.1395V65.8211c0-1.2944.6896-2.4909 1.8097-3.1398ZM56.2381 14.3337 19.934 35.365c-2.4129 1.3978-2.4129 4.8817 0 6.2796l36.3041 21.0313c1.125.6517 2.5128.6517 3.6378 0L96.18 41.6446c2.4129-1.3979 2.4129-4.8818 0-6.2796L59.8759 14.3337c-1.125-.6518-2.5128-.6518-3.6378 0Z",fill:t,stroke:"#fff",strokeWidth:"3.62857",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"m36.2856 25.8924 43.5428 25.2248",stroke:"#fff",strokeWidth:"3.62857",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M21.38 64.8493c-.867-.5023-1.1627-1.6123-.6605-2.4793.5023-.867 1.6124-1.1627 2.4794-.6605L21.38 64.8493Zm12.985 3.3289
484c.8671.5023 1.1627 1.6123.6605 2.4794-.5023.867-1.6123 1.1627-2.4794.6604l1.8189-3.1398Zm-11.1661-6.4687 11.1661 6.4687-1.8189 3.1398L21.38 64.8493l1.8189-3.1398ZM21.38 55.8401c-.867-.5023-1.1627-1.6123-.6605-2.4793.5023-.8671 1.6124-1.1627 2.4794-.6605L21.38 55.8401Zm12.985 3.3289c.8671.5023 1.1627 1.6123.6605 2.4793-.5023.8671-1.6123 1.1628-2.4794.6605l1.8189-3.1398Zm-11.1661-6.4687L34.365 59.169l-1.8189 3.1398L21.38 55.8401l1.8189-3.1398Z",fill:"#fff"})]})};n.defaultProps={color:"#FA6000",height:"32px",width:"32px"}},24871(e,t,r){r.d(t,{m:()=>n});r(72176);var i=r(66170),o=r(80812);const n=e=>{let{...t}=e;return(0,o.jsxs)(i.t,{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:[(0,o.jsx)("circle",{cx:"8",cy:"8",r:"8",fill:"#222222"}),(0,o.jsx)("path",{d:"M8.8032 4.896V3.348H7.1952V4.896H8.8032ZM8.7672 12V5.76H7.2432V12H8.7672Z",fill:"white"})]})};n.defaultProps={color:"currentColor",height:"16px",width:"16px"}},65266(e,t,r){r.d(t,{l:()=>n});r(72176);var i=r(66170),o=r(80812);const n=e=>{let{color:t,...r}=e;return(0,o.jsx)(i.t,{fill:"none",viewBox:"0 0 24 24",...r,children:(0,o.jsx)("path",{d:"M17.25 14.9999C16.6886 15.0027 16.135 15.1316 15.6301 15.3769C15.1251 15.6222 14.6817 15.9778 14.3325 16.4174L8.85002 12.9899C9.04983 12.345 9.04983 11.6548 8.85002 11.0099L14.3325 7.58241C14.889 8.27145 15.6714 8.74129 16.5411 8.90872C17.4108 9.07614 18.3117 8.93033 19.0842 8.49713C19.8567 8.06392 20.4509 7.37128 20.7616 6.5419C21.0723 5.71251 21.0794 4.79992 20.7817 3.96578C20.484 3.13165 19.9007 2.4298 19.135 1.98458C18.3694 1.53936 17.4709 1.3795 16.5987 1.53331C15.7265 1.68713 14.9368 2.14469 14.3697 2.82495C13.8025 3.50521 13.4944 4.36425 13.5 5.24991C13.5036 5.58529 13.554 5.91853 13.65 6.23991L8.16752 9.66741C7.6835 9.0581 7.02192 8.61445 6.27448 8.39796C5.52704 8.18147 4.73076 8.20286 3.99603 8.45917C3.26129 8.71548 2.62448 9.19401 2.17388 9.82844C1.72328 10.4629 1.4812 11.2217 1.4812 11.9999C1.4812 12.7781 1.72328 13.537 2.17388 14.1714C2.62448 14.8058 3.26129 15.2843 3.99603 15.5407C4.73076 15.797 5.52704 15.8184 6.27448 15.6019C7.02192 15.3854 7.6835 14.9417 8.16752 14.3324L13.65 17.7599C13.554 18.0813 13.5036 18.4145 13.5 18.7499C13.5 19.4916 13.7199 20.2166 14.132 20.8333C14.5441 21.45 15.1297 21.9306 15.815 22.2145C16.5002 22.4983 17.2542 22.5725 17.9816 22.4279C18.709 22.2832 19.3772 21.926 19.9017 21.4016C20.4261 20.8771 20.7833 20.2089 20.928 19.4815C21.0727 18.7541 20.9984 18.0001 20.7146 17.3148C20.4307 16.6296 19.9501 16.044 19.3334 15.6319C18.7167 15.2198 17.9917 14.9999 17.25 14.9999ZM17.25 2.99991C17.695 2.99991 18.13 3.13187 18.5 3.3791C18.8701 3.62634 19.1584 3.97774 19.3287 4.38887C19.499 4.80001 19.5436 5.25241 19.4568 5.68886C19.37 6.12532 19.1557 6.52623 18.841 6.8409C18.5263 7.15557 18.1254 7.36986 17.689 7.45668C17.2525 7.54349 16.8001 7.49894 16.389 7.32864C15.9778 7.15834 15.6264 6.86995 15.3792 6.49994C15.132 6.12993 15 5.69492 15 5.24991C15 4.65317 15.2371 4.08088 15.659 3.65892C16.081 3.23696 16.6533 2.99991 17.25 2.99991ZM5.25002 14.2499C4.80501 14.2499 4.36999 14.118 3.99998 13.8707C3.62997 13.6235 3.34158 13.2721 3.17129 12.8609C3.00099 12.4498 2.95643 11.9974 3.04325 11.561C3.13007 11.1245 3.34436 10.7236 3.65903 10.4089C3.97369 10.0943 4.37461 9.87996 4.81106 9.79314C5.24752 9.70633 5.69992 9.75088 6.11105 9.92118C6.52219 10.0915 6.87359 10.3799 7.12082 10.7499C7.36806 11.1199 7.50002 11.5549 7.50002 11.9999C7.50002 12.5966 7.26296 13.1689 6.84101 13.5909C6.41905 14.0129 5.84675 14.2499 5.25002 14.2499ZM17.25 20.9999C16.805 20.9999 16.37 20.868 16 20.6207C15.63 20.3735 15.3416 20.0221 15.1713 19.6109C15.001 19.1998 14.9564 18.7474 15.0432 18.311C15.1301 17.8745 15.3444 17.4736 15.659 17.1589C15.9737 16.8443 16.3746 16.63 16.8111 16.5431C17.2475 16.4563 17.6999 16.5009 18.1111 16.6712C18.5222 16.8415 18.8736 17.1299 19.1208 17.4999C19.3681 17.8699 19.5 18.3049 19.5 18.7499C19.5 19.3466 19.263 19.9189 18.841 20.3409C18.4191 20.7629 17.8468 20.9999 17.25 20.9999Z",fill:t})})};n.defaultProps={color:"currentColor",height:"14px",width:"16px"}},25535(e,t,r){r.d(t,{m:()=>a});r(72176);var i=r(69605),o=r(66170),n=r(80812);const a=e=>{let{color:t,...r}=e;return(0,n.jsxs)(o.t,{viewBox:"0 0 16 16",fill:"none",...r,children:[(0,n.jsx)("path",{d:"M8.52 4.896V3.348H6.912V4.896H8.52ZM8.484 12V5.76H6.96V12H8.484Z",fill:t}),(0,n.jsx)("circle",{cx:"8",cy:"8",r:"7.5",stroke:t})]})};a.defaultProps={color:i.T.textGrey,height:"16px",width:"16px"}},64047(e,t,r){r.d(t,{e:()=>n});r(72176);var i=r(66170),o=r(80812);const n=e=>{let{color:t,...r}=e;return(0,o.jsx)(i.t,{fill:"none",viewBox:"0 0 12 12",...r,children:(0,o.jsx)("path",{fill:t,d:"M8 2.5H11V3.5H10.4414L9.44141 11.5H2.55859L1.55859 3.5H1V2.5H4V0.5H8V2.5ZM3.44141 10.5H8.55859L9.43359 3.5H2.56641L3.44141 10.5ZM5.5 9.5H4.5V4.5H5.5V9.5ZM7.5 9.5H6.5V4.5H7.5V9.5ZM5 2.5H7V1.5H5V2.5Z"})})};n.defaultProps={color:"currentColor",height:"12px",width:"12px"}},81539(e,t,r){r.d(t,{K:()=>l});r(72176);var i=r(66170),o=r(50970),n=r(80812);const a=(0,o.T)(i.t)`
485    color: ${e=>{let{color:t}=e;return`var(${t})`}};
486`,l=e=>{let{color:t="var(--col-ui-primary)",height:r="16px",width:i="16px",...o}=e;return(0,n.jsxs)(a,{width:i,height:r,viewBox:"0 0 16 16",fill:"none",...o,children:[(0,n.jsx)("path",{d:"M4.1 9.5H13L15 3.5H3M0 1.5H2.5L4.5 11.5H13",stroke:t}),(0,n.jsx)("circle",{cx:"5",cy:"14",r:"1",fill:t}),(0,n.jsx)("circle",{cx:"12",cy:"14",r:"1",fill:t})]})}},89556(e,t,r){r.d(t,{r:()=>l});r(72176);var i=r(66170),o=r(50970),n=r(80812);const a=(0,o.T)(i.t)`
487    color: ${e=>{let{color:t}=e;return`var(${t})`}};
488`,l=e=>{let{color:t="var(--col-ui-primary)",height:r="12px",width:i="12px",...o}=e;return(0,n.jsxs)(a,{fill:"none",viewBox:"0 0 12 12",height:r,width:i,...o,children:[(0,n.jsx)("path",{d:"M8.5 1.5L10.5 3.5L3.5 10.5H1.5V8.5L8.5 1.5Z",stroke:t,strokeLinecap:"round",strokeLinejoin:"round"}),(0,n.jsx)("path",{d:"M7 3L9 5",stroke:t,strokeLinecap:"round",strokeLinejoin:"round"})]})}},96309(e,t,r){r.d(t,{c:()=>l});r(72176);var i=r(66170),o=r(50970),n=r(80812);const a=(0,o.T)(i.t)`
489    color: ${e=>{let{color:t}=e;return`var(${t})`}};
490`,l=e=>{let{color:t="var(--col-ui-primary)",height:r="8px",width:i="8px",...o}=e;return(0,n.jsxs)(a,{fill:"none",viewBox:"0 0 8 8",height:r,width:i,...o,children:[(0,n.jsxs)("g",{clipPath:"url(#clip0_1839_35528)",children:[(0,n.jsx)("path",{d:"M4 0V8",stroke:t}),(0,n.jsx)("path",{d:"M8.00488 3.99512L0.00488277 3.99512",stroke:t})]}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_1839_35528",children:(0,n.jsx)("rect",{width:"8",he
490ight:"8",fill:"white"})})})]})}},7403(e,t,r){r.d(t,{J:()=>g});var i=r(86025),o=r(79709),n=r(72176),a=r(89764),l=r(96309),s=r(69605),c=r(50970),d=r(80812);const u=(0,c.T)("div")`
491    display: flex;
492    align-items: center;
493    justify-content: space-between;
494    font: 400 16px/1em 'Inter';
495    color: ${s.T.black};
496    border: 1px solid ${s.T.grey};
497    border-radius: 4px;
498    position: relative;
499    transition: border-color 200ms ease;
500
501    &:hover {
502        border-color: ${s.T.black};
503    }
504`,p=(0,c.T)("button",{shouldForwardProp:e=>-1===["basketStyling"].indexOf(e)})`
505    display: flex;
506    align-items: center;
507    height: 100%;
508    font: inherit;
509    padding: 0 ${e=>{let{basketStyling:t}=e;return t?"8px":"16px"}};
510
511    &:disabled,
512    &.disabled {
513        color: ${s.T.grey};
514        cursor: not-allowed;
515    }
516`,h=(0,c.T)("input",{shouldForwardProp:e=>-1===["quantity","basketStyling"].indexOf(e)})`
517    font: inherit;
518    border: none;
519    outline: none;
520    text-align: center;
521    transition: width 200ms ease;
522    ${o.G1.lg} {
523        width: ${e=>{let{quantity:t}=e;return t>99?"50px":"39px"}}!important;
524    }
525
526    &[disabled] {
527        background-color: transparent;
528    }
529`,x=(0,c.T)("p",{shouldForwardProp:e=>-1===["quantity","basketStyling"].indexOf(e)})`
530    min-width: 255px;
531    position: absolute;
532    top: 100%;
533    left: ${e=>{let{basketStyling:t}=e;return t?"calc(50% + 4px)":"calc(50% - 72px)"}};
534    transform: translateX(-50%);
535    white-space: pre-line;
536    background: ${s.T.lightGrey};
537    border: 1px solid ${s.T.grey};
538    border-radius: 4px;
539    padding: 12px 16px;
540    margin-top: 16px;
541    z-index: 2;
542
543    ${o.G1.md} {
544        min-width: none;
545    }
546
547    &::after {
548        content: '';
549        position: absolute;
550        width: 20px;
551        height: 20px;
552        left: ${e=>{let{basketStyling:t}=e;return t?"calc(50% - 4px)":"calc(50% + 72px)"}};
553        top: 0;
554        margin: -10px 0 0 -11px;
555        transform: rotate(45deg);
556        z-index: -1;
557        border-top: 1px solid ${s.T.grey};
558        border-left: 1px solid ${s.T.grey};
559        background: ${s.T.lightGrey};
560    }
561`,g=e=>{let{isChangeable:t,value:r,minLength:o,size:s,onChange:c,basketStyling:g,graduallyQty:v,withIcons:m,..._}=e;const{t:f}=(0,a.Bd)(),y=(0,n.useRef)(null),b=(0,n.useRef)(null),k=(0,n.useRef)(null),j=(0,n.useRef)(!0),C=_.maxLength%v,T=_.maxLength-C,[I,S]=(0,n.useState)(r),[w,E]=(0,n.useState)(!1),[U,D]=(0,n.useState)(!1),R=v>1;(0,n.useEffect)(()=>()=>{clearTimeout(y.current),clearTimeout(b.current),clearTimeout(k.current)},[]),(0,n.useEffect)(()=>{S(r)},[r]),(0,n.useEffect)(()=>{j.current?j.current=!1:r>T&&(E(!0),b.current=setTimeout(()=>E(!1),4e3))},[r,T]);const O=e=>{b.current&&(E(!1),clearTimeout(b.current));let t=parseInt(e,10);T?Number.isNaN(t)?S(r):t<=0?(S(0),c(0)):t<o&&v<=1&&t>0?S(r):t>T?(c(T),S(T),E(!0),b.current=setTimeout(()=>E(!1),4e3)):t!==r&&(t=Math.ceil(t/v)*v,S(t),c(t)):(E(!0),b.current=setTimeout(()=>E(!1),4e3))},N=(e,t)=>{if(e.currentTarget.classList.contains("disabled")&&"add"===t)return E(!0),void(b.current=setTimeout(()=>E(!1),4e3));if(R&&(D(!0),clearTimeout(k.current),k.current=setTimeout(()=>D(!1),4e3)),"add"!==t&&0===I)return;if("add"!==t&&R&&I<=o)return;const r=parseInt(e.currentTarget.value,10);O(r)},$=0===I||R&&I<=o;return(0,d.jsxs)(u,{height:{small:"32px",medium:"48px",large:"56px"}[s],..._,children:[(0,d.jsx)(p,{"aria-label":f("aria.reduce_quantity"),"aria-disabled":$,basketStyling:g,className:$?"disabled":"",value:I-v,"data-value":I-v,disabled:!t,onClick:N,children:m?(0,d.jsx)(i.Q,{width:"8px",height:"8px"}):"-"}),(0,d.jsx)(h,{width:((e,t)=>{let r;return r=e>99?t?"39px":"50px":t?"32px":"39px",r})(I,g),basketStyling:g,value:null!==I&&void 0!==I?I:"",disabled:!t,quantity:I||"",pattern:"[0-9]*",type:"text",inputMode:"numeric",autoComplete:"off","aria-label":f("aria.quantity"),onChange:e=>{const t=parseInt(e.target.value,10);""!==e.target.value?(Number.isNaN(t)||S(t),b.current&&(E(!1),clearTimeout(b.current)),y.current&&clearTimeout(y.current),R&&(D(!0),clearTimeout(k.current),k.current=setTimeout(()=>D(!1),4e3)),y.current=setTimeout(()=>O(t),2e3)):S(null)},onBlur:e=>{clearTimeout(y.current);const t=parseInt(e.target.value,10);O(t)}}),(0,d.jsx)(p,{"aria-label":f("aria.increase_quantity"),className:T&&I===T?"disabled":"",basketStyling:g,value:I+v,"data-value":I+v,disabled:!t,onClick:e=>N(e,"add"),children:m?(0,d.jsx)(l.c,{width:"8px",height:"8px"}):"+"}),w&&(0,d.jsxs)(x,{basketStyling:g,quantity:I,children:[T>0?f("stock.left_in_stock",{maxLength:T}):f("stock.all_in_basket")," "]}),!w&&U&&(0,d.jsx)(x,{basketStyling:g,children:f("pdp.recommended_quantity_warning",{step:v})})]})};g.defaultProps={basketStyling:!1,graduallyQty:1,isChangeable:!0,minLength:1,onChange:null,size:"small",value:1}},65452(e,t,r){r.d(t,{g:()=>p});var i=r(90645),o=r(1272),n=r(67727),a=(r(72176),r(89764)),l=r(69605),s=r(50970),c=r(80812);const d=(0,s.T)("div",{shouldForwardProp:e=>-1===["fontStyle","mainColor","spaceBetween"].indexOf(e)})`
562    span {
563        font: ${e=>{let{fontStyle:t}=e;return t?"600 24px/1.4em Inter":"600 16px/1em Inter"}};
564        color: ${l.T.orange};
565        line-height: 16px;
566
567        &.basket-item {
568            display: inline-block;
569            margin-top: 4px;
570            margin-left: 8px;
571            margin-right: 8px;
572        }
573
574        &.historical-price {
575            display: inline-block;
576            font-weight: 400;
577            text-decoration: line-through;
578            margin-top: 4px;
579            margin-left: 8px;
580            color: ${e=>{let{mainColor:t}=e;return t.length?l.T[t]:l.T.black}};
581        }
582
583        &.basket-item-list-price {
584            color: ${l.T.orange};
585            display: inline-block;
586            margin-top: 4px;
587            margin-left: 8px;
588            margin-right: 8px;
589            line-height: 16px;
590            margin-right: 8px;
591        }
592
593        &:only-of-type {
594            font: ${e=>{let{fontStyle:t}=e;return t?"600 24px/1.4em Inter":"600 16px/1em Inter"}};
595            color: ${l.T.orange};
596            text-decoration: none;
597            line-height: 16px;
598            margin-right: 8px;
599        }
600    }
601`,u=e=>{var t,r;let{application:o,priceExVat:l,priceIncVat:s,historicalPriceExVat:u,vatRate:p,isCheckoutUpsell:h,textAlign:x,isBasketItem:g,fontStyle:v,hideButton:m,mainColor:_,spaceBetween:f,...y}=e;const{t:b}=(0,a.Bd)(),{hide_historical:k,historical_price_settings:j}=(null===(t=o.config)||void 0===t||null===(r=t.options)||void 0===r?void 0:r.pricing)||{}
601,C=(0,n.v)(l,u,{hideHistoricalPrice:k,historicalPriceSettings:j}),T={isRounded:!0,separateWith:" ",render:e=>b("price_with_currency",{price:e})};return(0,c.jsxs)(d,{pt:(h||C)&&"4px",ml:g&&"8px",textAlign:x,fontStyle:v,mainColor:_,...y,children:[!g&&(0,c.jsx)("span",{className:"not-in-basket",children:(0,c.jsx)(i.T,{...T,vatRate:p,priceIncVat:s,price:l})}),C&&!m&&(0,c.jsx)("span",{className:"historical-price",children:(0,c.jsx)(i.T,{pr:"8px",...T,price:u,vatRate:p})}),g&&(0,c.jsx)("span",{className:"basket-item-list-price",children:(0,c.jsx)(i.T,{...T,priceIncVat:s,vatRate:p,price:l})})]})};u.defaultProps={fontStyle:!1,hideButton:!1,isBasketItem:!1,isCheckoutUpsell:!1,mainColor:"black",historicalPriceExVat:0,textAlign:"left",vatRate:1};const p=(0,o.pU)("application")(u)}}]);
602//# sourceMappingURL=CartSection.e5c22377.chunk.js.map

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.