PageSourceSearch

https://www.toolstation.nl/_nuxt/asset/6.0.10/index-BgH7880Q.js

js toolstation.nl collected 2026-09-26 04:00:14 UTC 15,756 bytes, 3 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../carouselThumbnail.DHXAGmwn.css","../../entry.IC0nXJmS.css"])))=>i.map(i=>d[i]);
2var Xt=Object.defineProperty,Kt=Object.defineProperties;var Yt=Object.getOwnPropertyDescriptors;var Dt=Object.getOwnPropertySymbols;var Zt=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable;var Et=(v,s,n)=>s in v?Xt(v,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):v[s]=n,Z=(v,s)=>{for(var n in s||(s={}))Zt.call(s,n)&&Et(v,n,s[n]);if(Dt)for(var n of Dt(s))te.call(s,n)&&Et(v,n,s[n]);return v},Ot=(v,s)=>Kt(v,Yt(s));var x=(v,s,n)=>new Promise((O,I)=>{var M=b=>{try{R(n.next(b))}catch(q){I(q)}},W=b=>{try{R(n.throw(b))}catch(q){I(q)}},R=b=>b.done?O(b.value):Promise.resolve(b.value).then(M,W);R((n=n.apply(v,s)).next())});import{j as ee,u as T,m as oe,r as ae,A as le,g as se,a3 as ne,B as re,H as ie,w as ce,D as ue,c as m,o as de,e as pe,C as Lt,V as _e,ai as ye,aj as me,a1 as ve,T as At,K as It}from"./carouselThumbnail-BVGIAQ2F.js";import{l as he,b as A,m as N,c as tt,ae as Rt,G as ge,k as fe,Q as f,S as k,P as _,O as et,R as g,a0 as F,u as t,X as z,J as y,ab as ot,_ as ke,a7 as P,W as G,Y as be,V as at}from"./carousel-BVOjnoof.js";import{_ as Ce}from"./TsCardOutOfStock-CBZZzBco.js";import{_ as we}from"./TsTableColumn-_BitrsCO.js";import{c as Te}from"./entry-COcyHNV4.js";import{o as Se,s as lt,a as qt,h as xe,i as Pe}from"./TsClickAndCollectSection.vue-e3vmjNkz.js";import{u as De}from"./TsTagTrolleyChannel-Bfbu4u6U.js";import"./TsVatToggle-BGCRqKR-.js";import"./TsCardRoundedV1-9qCSFB4w.js";const Ee={key:0,class:"fixed inset-0 z-50 bg-white/70 flex items-center justify-center"},Oe={class:"flex flex-col items-center gap-2"},Le={class:"text-sm text-gray-600 font-bold"},Ae={class:"flex flex-col mt-10"},Ie={key:0,class:"mt-4"},Re={key:1,class:"hidden md:flex flex-col lg:flex-row gap-2 mt-3 mb-3"},Q="delivery",Ge=he({__name:"index",setup(v){return x(this,null,function*(){var pt;let s,n;const O=P(()=>m(()=>import("./TsVatToggle-BGCRqKR-.js").then(o=>o.T),__vite__mapDeps([0,1]),import.meta.url)),I=P(()=>m(()=>import("./entry-COcyHNV4.js").then(o=>o.H),__vite__mapDeps([0,1]),import.meta.url)),M=P(()=>m(()=>import("./TsDeliveryChannelCard-ieuHFtjf.js"),__vite__mapDeps([0,1]),import.meta.url)),W=P(()=>m(()=>import("./TsTagTrolleyChannel-Bfbu4u6U.js").then(o=>o.T),__vite__mapDeps([0,1]),import.meta.url)),R=P(()=>m(()=>import("./contact.datalayer-DADtvvBU.js").then(o=>o.a),__vite__mapDeps([0,1]),import.meta.url)),b=P(()=>m(()=>import("./entry-COcyHNV4.js").then(o=>o.a9),__vite__mapDeps([0,1]),import.meta.url)),q=P(()=>m(()=>import("./TsModalProCardTermsV2-BcYI7nkq.js").then(o=>o.a),__vite__mapDeps([0,1]),import.meta.url)),Vt=P(()=>m(()=>import("./TsBrandAbout-CmUQjGw7.js").then(o=>o.T),__vite__mapDeps([0,1]),import.meta.url)),Bt=P(()=>m(()=>import("./TsCardProductSummary-B1kb5GWp.js").then(o=>o.g),__vite__mapDeps([0,1]),import.meta.url)),U=ee();U.public.appRegion;const Nt=T("delivery","Bezorging"),{isMobileScreen:V,isDesktopScreen:D}=oe();ae({title:()=>Nt});const st=A(!1),h=A([]),nt=A([]),B=A(!1),rt=le(),i=De(),a=se(),Ft=ne(),C=re(),L=ie(),j=A(!1),it=A(!1),Mt=U.public.featureFlags,J=A(!1),Ut=N(()=>it.value||J.value||Pe.value),$=ce(),ct=N(()=>h.value.filter(o=>o.quantity>o.product.stockDetails.delivery)),ut=N(()=>h.value.filter(o=>o.quantity>o.product.stockDetails.collection)),H=N(()=>!C.user&&!C.guest||C.guest&&!i.isGuestShippingCostApplied?!1:a.delivery_charges===0&&!a.trolley.is_all_lines_collection),E=N(()=>h.value.filter(o=>{var d;const l=(d=o.product)==null?void 0:d.stockDetails;if(i.selected_delivery_method==="Delivery")return o.quantity>(l==null?void 0:l.delivery);if(i.selected_delivery_method==="Collection")return o.quantity>(l==null?void 0:l.collection)})),jt=()=>{const o=a.trolley_line_items,l=i.selected_delivery_method,d=["Delivery","Collection","Directship","NextDayCollection"];if(!o||!l)return[];const r=[];return d.forEach(e=>{o[e]&&r.push(...o[e])}),r!=null?r:[]};function dt(){It({options:{eventAction:"click",eventProperties:{action:"User click on back button"},eventInteraction:!0,eventLabel:"User click on back button on checkout page",eventName:"backClick"}}),Lt(rt("/trolley"))}const $t=ue("customer-jwt"),zt=tt([()=>$t.value,()=>i.isAddresses],([o,l],[d,r])=>{o!==d&&location.reload(),l!==r&&(st.value=l)});if(!C.is_authenticated&&C.is_guest){const{getEmptyGuestItem:o}=([s,n]=Rt(()=>m(()=>import("./auth.datalayer-b0RVBOME.js"),__vite__mapDeps([0,1]),import.meta.url)),s=yield s,n(),s);C.guest_item=o(U.public.appRegion),C.guest_item.email=((pt=C.guest)==null?void 0:pt.email)||""}const Gt=()=>{const o=a.trolley_line_items,l=["Delivery","Collection","Directship","NextDayCollection"];return o?l.flatMap(d=>{var r;return(r=o[d])!=null?r:[]}):[]};ge(()=>x(this,null,function*(){var r;J.value=!0,i.setPaymentErrorMessage(""),yield Se(),i.is_address_loading=!1,yield Ft.getUserSaveLists();const o=Gt();o.length>0&&o.every(e=>{var p;return((p=e.product)==null?void 0:p.direct_ship)===!0})?i.selected_delivery_method="Delivery":i.channel_selected_by_user||(i.selected_delivery_method=(r=$==null?void 0:$.lastSavedBranch)!=null&&r.name?"Collection":"Delivery"),J.value=!1}));function Qt(){st.value=!0}(function(){return x(this,null,function*(){const{getFormattedTrolleyDetails:o,trackCheckoutStepEvent:l}=yield m(()=>x(this,null,function*(){const{getFormattedTrolleyDetails:d,trackCheckoutStepEvent:r}
2=yield import("./carouselThumbnail-BVGIAQ2F.js").then(e=>e.dn);return{getFormattedTrolleyDetails:d,trackCheckoutStepEvent:r}}),__vite__mapDeps([0]),import.meta.url);o({trolleyStore:a})})})();const{moveOutOfStockTrolleyItemsToSavelist:Wt}=([s,n]=Rt(()=>m(()=>import("./trolley.datalayerv2-B47W6KU4.js"),__vite__mapDeps([0,1]),import.meta.url)),s=yield s,n(),s),X=()=>x(this,null,function*(){B.value=!0;const o=i.selected_delivery_method,l=E.value.map(e=>{var w,S,c,u;const p=o==="Collection"?(S=(w=e==null?void 0:e.product)==null?void 0:w.stockDetails)==null?void 0:S.collection:(u=(c=e==null?void 0:e.product)==null?void 0:c.stockDetails)==null?void 0:u.delivery;return Ot(Z({},e),{quantity:p})}),{toastSuccess:d,toastErrors:r}=yield m(()=>x(this,null,function*(){const{toastSuccess:e,toastErrors:p}=yield import("./TsCardRoundedV1-9qCSFB4w.js").then(w=>w.a);return{toastSuccess:e,toastErrors:p}}),__vite__mapDeps([0,1]),import.meta.url);try{yield Wt(l,U),C.is_authenticated&&d([T("ToastAccountSaveList-successfullyAddedToList!","Succesvol toegevoegd aan de lijst!")],"top-right")}catch(e){C.is_authenticated&&(r(["Couldn't add product to savelist."],"top-right"),_e("toast","".concat(e)))}yield lt(),B.value=!1}),K=()=>x(this,null,function*(){j.value=!0;const o={shipping_tier:i.selected_delivery_method,currency:ve.currency,value:a.trolley.order_total,items:a.trolley_line_items?Object.values(a.trolley_line_items).flat().map(e=>{var S,c,u,_t,yt,mt,vt,ht,gt,ft,kt,bt,Ct,wt,Tt,St,xt,Pt;const p=((S=e.product.other_attributes.find(Y=>Y.key==="Number of Reviews"))==null?void 0:S.value)||0,w=(c=e.product.other_attributes.find(Y=>Y.key==="Product Review Rating"))==null?void 0:c.value;return Z({item_id:e.product.code,item_name:e.product.name.toString().toLocaleLowerCase(),item_brand:e.product.brand||"",price:(u=e.product)==null?void 0:u.prices.formatted.gross,quantity:e.quantity,item_category:((mt=(yt=(_t=e==null?void 0:e.product.taxonomies)==null?void 0:_t[0])==null?void 0:yt[0])==null?void 0:mt.name)||"Unknown_Category",item_category2:((gt=(ht=(vt=e==null?void 0:e.product.taxonomies)==null?void 0:vt[0])==null?void 0:ht[1])==null?void 0:gt.name)||null,item_category3:((bt=(kt=(ft=e==null?void 0:e.product.taxonomies)==null?void 0:ft[0])==null?void 0:kt[2])==null?void 0:bt.name)||null,item_variant:(e==null?void 0:e.product.pack_size)||"Unknown_Variant",item_on_promotion:!!(((wt=ye(((Ct=e==null?void 0:e.product)==null?void 0:Ct.other_attributes)||[]))==null?void 0:wt.length)>0||me((St=(Tt=e==null?void 0:e.product)==null?void 0:Tt.prices)==null?void 0:St.formatted)),item_stock_status_delivery:(xt=e==null?void 0:e.product)!=null&&xt.outOfStockForDelivery?"out_of_stock":"in_stock",item_stock_status_collection:(Pt=e==null?void 0:e.product)!=null&&Pt.outOfStockForCollection?"out_of_stock":"in_stock",item_rating_count:p},p>0?{item_rating_average:w}:{})}):[]};if(It({options:{eventAction:"click",eventProperties:{page:{page_type:"checkout",page_sub_type:"checkout:fulfilment"}},ecommerce:o,eventInteraction:!0,eventLabel:"User clicked on continue to payment on checkout page",eventName:"add_shipping_info"}}),!a.trolley_line_items)return;const r=Object.entries(a.trolley_line_items).filter(([e])=>e!==i.selected_delivery_method).map(([e,p])=>{if(p.length){const w=i.selected_delivery_method==="Collection"?At.Collection:At.Delivery;return p.map(S=>[S.id,w])}return null}).filter(Boolean).flat().map(e=>a.updateChannel(e[0],e[1],Mt));return yield Promise.all(r),yield lt(),yield xe(a.trolley_line_items),j.value=!1,Lt(rt("/checkout"))}),Jt=tt(()=>a.trolley_line_items,()=>{const o=jt();h.value=o,nt.value=o.filter(l=>l.product.direct_ship)}),Ht=tt(()=>$.lastSavedBranch,()=>x(this,null,function*(){yield lt()}),{deep:!0});return fe(()=>{zt(),Jt(),Ht(),i.selected_ideal_bank="",i.is_transaction_loading=!1,i.resetError()}),(o,l)=>{const d=ke,r=Ce,e=we,p=pe,w=Te,S=de;return _(),f(S,null,{default:k(()=>[t(Ut)?(_(),et("div",Ee,[F("div",Oe,[l[3]||(l[3]=F("div",{class:"h-10 w-10 animate-spin rounded-full border-4 border-gray-300 border-t-primary"},null,-1)),F("span",Le,z(t(it)?t(T)("DeliveryUpdateChannel","Leveringsmethode bijwerken…"):""),1)])])):g("",!0),F("div",Ae,[y(w,null,{default:k(()=>[F("div",{class:"flex -mt-5 text-gray-500 mb-4","data-testid":"back-to-cart",onClick:dt},[y(d,{name:"mynaui:chevron-left"}),ot(" "+z(t(T)("back","Terug")),1)]),y(t(O),{"append-class":"m-0 md:mb-2 px-4 lg:p-0"},{default:k(()=>[y(r,{"append-class":"m-0","data-testid":Q+"-title"},{default:k(()=>[ot(z(t(T)("deliveryOptions","Bezorgopties")),1)]),_:1},8,["data-testid"])]),_:1}),y(t(O),{"append-class":t(G)(t(D)?"flex-nowrap":"","items-start lg:flex-wrap lg:gap-4 m-0"),"is-multiline":""},{default:k(()=>[y(t(I),{"append-class":"max-md:is-12"},{default:k(()=>[(_(),f(be(t(D)?t(O):t(I)),{class:at(t(G)(t(D)?"":"flex flex-col-reverse","w-full mt-2 sm:bg-white rounded-lg")),"append-class":t(D)?"":"p-0"},{default:k(()=>
2[y(t(M),{type:"Collection",label:t(T)("UXQJ2-clickAndCollectToday","Click and Collect Vandaag"),icon:"/images/store-location-icon.png","data-testid":Q+"-collection-channel-card",class:at(t(G)(t(D)?"w-1/2":"w-full mt-2")),"is-product-outof-stock":t(ut).length===t(h).length?"all":t(ut).length>0?"some":"none","out-of-stock-products":t(E),"is-updating-quantity":t(B),"product-ids":t(h).map(c=>{var u;return(u=c.product)==null?void 0:u.code}),"product-quantities":t(h).map(c=>{var u;return{quantity:c.quantity,code:(u=c.product)==null?void 0:u.code}}),onMoveOutOfStockProducts:X,onChangeChannel:t(qt)},null,8,["label","data-testid","class","is-product-outof-stock","out-of-stock-products","is-updating-quantity","product-ids","product-quantities","onChangeChannel"]),t(D)?(_(),f(e,{key:0,layout:"vertical","append-class":"m-0"})):g("",!0),y(t(M),{type:"Delivery",label:t(T)("UXQJ2-deliveredTomorrow","Morgen bezorgd"),icon:"/images/delivery.svg","data-testid":Q+"-delivery-channel-card",class:at(t(G)(t(D)?"w-1/2":"w-full")),"cart-items":t(h),"is-product-outof-stock":t(ct).length===t(h).length?"all":t(ct).length>0?"some":"none","out-of-stock-products":t(E),"direct-ship-products":t(nt),"is-updating-quantity":t(B),"product-ids":t(h).map(c=>{var u;return(u=c.product)==null?void 0:u.code}),"product-quantities":t(h).map(c=>{var u;return{quantity:c.quantity,code:(u=c.product)==null?void 0:u.code}}),onMoveOutOfStockProducts:X,onChangeChannel:t(qt)},null,8,["label","data-testid","class","cart-items","is-product-outof-stock","out-of-stock-products","direct-ship-products","is-updating-quantity","product-ids","product-quantities","onChangeChannel"])]),_:1},8,["class","append-class"])),t(V)&&t(L).enableNewCheckoutFlow?(_(),et("div",Ie,[y(t(R),{"total-products":t(a).total_products,"order-total":t(a).trolley.order_total,"sub-total":t(a).trolley.order_subtotal,"total-vat":t(a).trolley.total_vat,"total-exc-vat":t(a).trolley.total_exc_vat,"bebat-contribution":t(a).trolley.beBebatContribution,"recupel-contribution":t(a).trolley.beRecupelContribution,"is-free-ship":t(H),"shipping-cost":t(a).trolley.is_all_lines_collection?0:t(a).delivery_charges,loading:t(a).order_summary_loading,"hide-title":!0,class:"mt-4","data-testid":"checkout"},null,8,["total-products","order-total","sub-total","total-vat","total-exc-vat","bebat-contribution","recupel-contribution","is-free-ship","shipping-cost","loading"])])):g("",!0),t(L).enableNewCheckoutFlow&&!t(V)?(_(),f(t(O),{key:1,"append-class":"flex justify-end mt-4 sm:px-3"},{default:k(()=>[y(p,{"data-testid":"checkout-continue-to-payment-under-order-summary",disabled:!!t(E).length,block:"","append-class":"w-1/2",label:t(T)("Delivery-continuePayment","Ga verder naar Betaling"),"is-loading":t(j),onClick:l[0]||(l[0]=c=>K())},null,8,["disabled","label","is-loading"])]),_:1})):g("",!0),t(E).length&&t(D)?(_(),f(t(O),{key:2},{default:k(()=>[y(t(W),{"is-updating-quantity":t(B),products:t(E),"data-testid":Q,class:"mt-4 w-full",onMoveOutOfStockProducts:X},null,8,["is-updating-quantity","products"])]),_:1})):g("",!0)]),_:1}),t(V)?g("",!0):(_(),f(t(I),{key:0,"append-class":"is-12 lg:is-4 sticky top-[75px] max-h-[calc(100vh-75px)] overflow-y-auto"},{default:k(()=>[t(L).enableNewCheckoutFlow?(_(),f(t(Bt),{key:0,products:t(h),pageType:"delivery","data-testid":"product-list"},null,8,["products"])):g("",!0),y(t(R),{"total-products":t(a).total_products,"order-total":t(a).trolley.order_total,"sub-total":t(a).trolley.order_subtotal,"total-vat":t(a).trolley.total_vat,"total-exc-vat":t(a).trolley.total_exc_vat,"bebat-contribution":t(a).trolley.beBebatContribution,"recupel-contribution":t(a).trolley.beRecupelContribution,"is-free-ship":t(H),"shipping-cost":t(a).trolley.is_all_lines_collection?0:t(a).delivery_charges,loading:t(a).order_summary_loading,"data-testid":"checkout"},null,8,["total-products","order-total","sub-total","total-vat","total-exc-vat","bebat-contribution","recupel-contribution","is-free-ship","shipping-cost","loading"]),t(L).enableNewCheckoutFlow?g("",!0):(_(),et("div",Re,[y(p,{"data-testid":"checkout-back-button",outlined:"",onClick:dt},{default:k(()=>[ot(z(t(T)("back","Terug")),1)]),_:1}),y(p,{"data-testid":"checkout-continue-to-payment-under-order-summary",disabled:!!t(E).length,block:"",label:t(T)("Delivery-continuePayment","Ga verder naar Betaling"),"is-loading":t(j),onClick:l[1]||(l[1]=c=>K())},null,8,["disabled","label","is-loading"])])),t(L).enableNewCheckoutFlow?g("",!0):(_(),f(t(b),{key:2,"data-testid":"delivery"}))]),_:1})),t(V)?(_(),f(t(Vt),{key:1,"data-testid":"delivery","total-products":t(a).total_products,"order-total":t(a).trolley.order_total,"sub-total":t(a).trolley.order_subtotal,"total-vat":t(a).trolley.total_vat,"total-exc-vat":t(a).trolley.total_exc_vat,"is-free-ship":t(H),"shipping-cost":t(a).trolley.is_all_lines_collection?0:t(i).shipping_cost,loading:t(a).order_summary_loading,disabled:!!t(E).length,onClick:Qt,onContinue:l[2]||(l[2]=c=>K())},null,8,["total-products","order-total","sub-total","total-vat","total-exc-vat","is-free-ship","shipping-cost","loading","disabled"])):g("",!0)]),_:1},8,["append-class"]),t(L).enableNewCheckoutFlow?(_(),f(t(b),{key:0,"data-testid":"delivery"})):g("",!0)]),_:1}),t(V)&&!t(L).enableNewCheckoutFlow?(_(),f(t(q),{key:0,"data-testid":"delivery",class:"mb-6"})):g("",!0)])]),_:1})}})}});
2export{Ge as default};
3//# sourceMappingURL=index-BgH7880Q.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.