PageSourceSearch

https://the-tester.com/_next/static/chunks/06e.xktex_2sp.js?dpl=dpl_EH2858ob9nmMj83aBtNcZfKBdtrT

js the-tester.com collected 2026-10-08 22:50:29 UTC 26,679 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,604768,t=>{"use strict";var e=t.i(604570);function r(){return e.default.__loaded}function n(t){return t&&t.startsWith("gid://shopify/ProductVariant/")?t:void 0}function i(t,e){return{product_vendor:e||void 0,product_category:t?.[0],product_subcategory:t?.[1]}}t.s(["trackAddToCart",0,function(t){r()&&e.default.capture("add_to_cart",{product_handle:t.handle,product_title:t.title,product_price:parseFloat(t.price),product_variant_id:n(t.variantId),...i(t.categories,t.vendor),quantity:t.quantity,variant:t.variant,currency:t.currency||"EUR",value:parseFloat(t.price)*t.quantity,content_type:"product",content_ids:[t.handle]})},"trackBackInStockSubscribed",0,function(t,a){r()&&(e.default.capture("back_in_stock_subscribed",{product_handle:a.handle,product_title:a.title,product_price:parseFloat(a.price),product_variant_id:n(a.variantId),...i(a.categories,a.vendor),variant:a.variant,locale:a.locale,currency:"EUR",content_type:"product",content_ids:[a.handle]}),t&&e.default.identify(t,{email:t}))},"trackBlogProductClicked",0,function(t){r()&&e.default.capture("blog_product_clicked",t)},"trackBlogViewed",0,function(t){r()&&e.default.capture("blog_viewed",{post_slug:t.slug,post_title:t.title,post_category:t.category,locale:t.locale,content_type:"article",content_ids:[t.slug]})},"trackCartViewed",0,function(t){r()&&e.default.capture("cart_viewed",{cart_total:parseFloat(t.total),cart_items:t.items.length,currency:t.currency||"EUR",products:t.items.map(t=>({handle:t.handle,title:t.title,price:parseFloat(t.price),quantity:t.quantity}))})},"trackCategoryViewed",0,function(t){r()&&e.default.capture("category_viewed",{category_slug:t.slug,category_title:t.title,product_count:t.productCount,locale:t.locale,content_type:"product_group"})},"trackCheckoutAddressFilled",0,function(t){r()&&e.default.capture("checkout_address_filled",{country:t})},"trackCheckoutContactFilled",0,function(t){r()&&(e.default.capture("checkout_contact_filled",{has_email:!!t}),t&&e.default.identify(t,{email:t}))},"trackCheckoutInformationInvalid",0,function(t,n){r()&&e.default.capture("checkout_information_invalid",{fields:t.join(","),field_count:t.length,attempt:n})},"trackCheckoutPayButtonSeen",0,function(t){r()&&e.default.capture("checkout_pay_button_seen",{ms_since_step:Math.round(t)})},"trackCheckoutPayClicked",0,function(t,n,i,a){r()&&e.default.capture("checkout_pay_clicked",{payment_method:t??"unknown",total:n,currency:i,subscription:a})},"trackCheckoutPayError",0,function(t,n,i,a){r()&&e.default.capture("checkout_pay_error",{payment_method:t??"unknown",error_code:n,error_message:i?i.slice(0,200):null,surface:a?.surface??"payment_step",...a?.stage?{stage:a.stage}:{},...a?.errorType?{error_type:a.errorType}:{}})},"trackCheckoutPaymentElementError",0,function(t,n,i){r()&&e.default.capture("checkout_payment_element_error",{error_code:t,error_message:n?n.slice(0,200):null,ms_since_step:Math.round(i)})},"trackCheckoutPaymentElementReady",0,function(t,n,i){r()&&e.default.capture("checkout_payment_element_ready",{ms_since_step:Math.round(t),ms_since_prepare:Math.round(n),rebuilds:i})},"trackCheckoutPaymentLeft",0,function(t){r()&&e.default.capture("checkout_payment_left",{reason:t.reason,seconds_on_step:Math.round(t.msOnStep/1e3),element_ready:t.elementReady,method_shown:t.methodShown,method_selected:t.methodSelected,pay_button_seen:t.payButtonSeen,rebuilds:t.rebuilds,shipping_country:t.country},"pagehide"===t.reason?{send_instantly:!0,transport:"sendBeacon"}:void 0)},"trackCheckoutPaymentMethodShown",0,function(t,n,i){r()&&e.default.capture("checkout_payment_method_shown",{payment_method:t,shipping_country:n,ms_since_step:Math.round(i)})},"trackCheckoutPaymentStarted",0,function(t,n,i){r()&&e.default.capture("checkout_payment_started",{payment_method:t,total:n,currency:i,value:n,content_type:"product"})},"trackCheckoutShippingSelected",0,function(t,n){r()&&e.default.capture("checkout_shipping_selected",{shipping_method:t,shipping_cost:n})},"trackCheckoutStarted",0,function(t){r()&&e.default.capture("checkout_started",{cart_total:parseFloat(t.total),cart_items:t.itemCount,currency:t.currency||"EUR",value:parseFloat(t.total),content_type:"product"})},"trackDiscountApplied",0,function(t,n,i){r()&&e.default.capture("discount_applied",{discount_code:t,discount_amount:n,success:i})},"trackExpressCheckout",0,function(t,n,i,a){r()&&e.default.capture("express_checkout_started",{express_payment_type:t,payment_method:t,total:n,currency:i,item_count:a,value:n,content_type:"product"})},"trackHeaderNavClicked",0,function(t){r()&&e.default.capture("header_nav_clicked",t)},"trackLogin",0,function(t){r()&&e.default.capture("login",{method:t})},"trackNewsletterSignup",0,function(t){r()&&e.default.capture("newsletter_signup",{source:t,content_type:"newsletter"})},"trackProductViewed",0,function(t){r()&&e.default.capture("product_viewed",{product_handle:t.handle,product_title:t.title,product_price:parseFloat(t.price),product_variant_id:n(t.variantId),...i(t.categories,t.vendor),product_sku:t.sku,currency:t.currency||"EUR",content_type:"product",content_ids:[t.handle],value:parseFloat(t.price)})},"trackRemoveFromCart",0,function(t){r()&&e.default.capture("remove_from_cart",{product_handle:t.handle,product_title:t.title,product_price:parseFloat(t.price),quantity:t.quantity})},"trackSearch",0,function(t,n,i){r()&&e.default.capture("search",{query:t,results_count:n,locale:i})},"trackShareClicked",0,function(t,n){r()&&e.default.capture("share_clicked",{platform:t,url:n})},"trackSignUp",0,function(t){r()&&e.default.capture("sign_up",{method:t})},"trackSubscriptionStarted",0,function(t){r()&&e.default.capture("subscription_started",{product_handle:t.productHandle,product_title:t.productTitle,frequency:t.frequency,price_per_cycle:t.pricePerCycle,currency:t.currency,value:t.pricePerCycle,content_type:"product"})}])},955377,t=>{"use strict";var e=t.i(843476),r=t.i(271645);let n=(0,r.createContext)({currency:"EUR",rate:1,roundTo:"dot99",symbol
1:"€",symbolPosition:"before"});t.s(["CurrencyProvider",0,function({rate:t,children:r}){return(0,e.jsx)(n.Provider,{value:t,children:r})},"useCurrency",0,function(){return(0,r.useContext)(n)}])},325731,t=>{"use strict";let e=new Set(["integer","nearest5","nearest10","ending9","ending49"]);function r(t,e,r){let n=Math.ceil(t-.005);for(;!e.includes(n%r);)n++;return n}let n=[.39,.49,.59,.69,.99];t.s(["isWholeNumberRounding",0,function(t){return e.has(t)},"roundDiscounted",0,function(t,e){if(!Number.isFinite(t)||t<=0)return t;switch(e){case"integer":case"ending9":case"ending49":return Math.round(t);case"nearest5":return 5*Math.round(t/5);case"nearest10":return 10*Math.round(t/10);default:return Math.round(100*t)/100}},"roundPrice",0,function(t,e){if(!Number.isFinite(t)||t<=0)return t;switch(e){case"dot99":return Math.ceil(t)-.01;case"dot95":return Math.ceil(t)-.05;case"charm":{let e=Math.floor(t);for(let r of[e,e+1])for(let e of n){let n=r+e;if(n+.005>=t)return Math.round(100*n)/100}return t}case"integer":return Math.round(t);case"nearest5":return 5*Math.ceil(t/5);case"nearest10":return 10*Math.ceil(t/10);case"ending9":return r(t,[9],10);case"ending49":return r(t,[49,99],100);default:return t}}])},565821,t=>{"use strict";var e=t.i(744705);function r(t){let e=window._klOnsite;e&&e.push(t)}function n(t){return`${window.location.origin}${(0,e.localePathPrefix)("u"<typeof document?"nl":document.documentElement.lang||"nl")}/product/${t}`}function i(t){let e="number"==typeof t?t:parseFloat(t);return Number.isFinite(e)?e:0}t.s(["ensureKlaviyoQueue",0,function(){window._klOnsite=window._klOnsite||[]},"klaviyoAddedToCart",0,function(t,e){let a=i(t.price),c=t.quantity||1,o=t.category?[t.category]:[];r(["track","Added to Cart",{...e?{$event_id:e}:{},...t.currency?{currency:t.currency}:{},$value:Math.round(a*c*100)/100,AddedItemProductName:t.title,AddedItemProductID:t.handle,AddedItemCategories:o,AddedItemImageURL:t.image??void 0,AddedItemURL:t.url||n(t.handle),AddedItemPrice:a,AddedItemQuantity:c,ItemNames:[t.title],ItemCount:c,Categories:o}])},"klaviyoIdentify",0,function(t,e={}){t&&r(["identify",{$email:t,...e}])},"klaviyoViewedProduct",0,function(t){let e=i(t.price),a=t.category?[t.category]:[],c=t.url||n(t.handle),o=t.image??void 0;r(["track","Viewed Product",{...t.currency?{currency:t.currency}:{},Title:t.title,ProductID:t.handle,Handle:t.handle,Categories:a,ImageUrl:o,Url:c,Metadata:{Price:e},Price:e,$value:e}]),r(["trackViewedItem",{Title:t.title,ItemId:t.handle,Categories:a,ImageUrl:o,Url:c,Metadata:{Price:e}}])}])},430549,t=>{"use strict";let e="AW-11120482441",r="pmLastOrderId",n=!1;function i(){if(!function(){try{let t=localStorage.getItem("tester-cookie-consent");if(!t)return{marketing:!1,analytics:!1};let e=JSON.parse(t);return{marketing:!!e.marketing,analytics:!!e.analytics}}catch{return{marketing:!1,analytics:!1}}}().marketing)return!1;if(n)return!0;n=!0,window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(...t){window.dataLayer.push(t)},window.gtag("consent","default",{ad_storage:"granted",ad_user_data:"granted",ad_personalization:"granted",analytics_storage:"granted",wait_for_update:500}),window.gtag("js",new Date),window.gtag("config",e);let t=document.createElement("script");return t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(t),!0}t.s(["fireProfitMetricsConversions",0,function(t){if(i()&&window.gtag){try{if(localStorage.getItem(r)===t.orderId)return;localStorage.setItem(r,t.orderId)}catch{}t.email&&window.gtag("set","user_data",{email:t.email}),window.gtag("event","conversion",{send_to:`${e}/ko8rCJiL4sMcEImx1LYp`,value:t.total,currency:"EUR",transaction_id:t.orderId}),window.gtag("event","conversion",{send_to:`${e}/vd3YCJWL4sMcEImx1LYp`,value:.2*t.total,currency:"EUR",transaction_id:t.orderId})}},"initProfitMetricsGtag",0,i])},981944,t=>{"use strict";let e=t.i(247167).default.env.NEXT_PUBLIC_META_PIXEL_ID||"2170379927230382",r=!1;function n(){if(r)return!0;if(r=!0,!window.fbq){let t=function(...e){t.callMethod?t.callMethod(...e):t.queue.push(e)};t.push=t,t.loaded=!0,t.version="2.0",t.queue=[],window.fbq=t,window._fbq||(window._fbq=t);let e=document.createElement("script");e.async=!0,e.src="https://connect.facebook.net/en_US/fbevents.js",document.head.appendChild(e)}return window.fbq("init",e),window.fbq("track","PageView"),!0}function i(t,e,r){try{if(!n()||!window.fbq)return;r?window.fbq("track",t,e,{eventID:r}):window.fbq("track",t,e)}catch{}}function a(t,e,r){return{content_type:"product",content_ids:t.map(t=>
1t.id),contents:t.map(t=>({id:t.id,quantity:t.quantity,item_price:t.price})),num_items:t.reduce((t,e)=>t+e.quantity,0),value:e,currency:r}}t.s(["initMetaPixel",0,n,"metaAddToCart",0,function(t,e){i("AddToCart",a([t],t.price*t.quantity,e))},"metaInitiateCheckout",0,function(t,e,r){i("InitiateCheckout",a(t,e,r))},"metaPurchase",0,function(t,e,r,n){i("Purchase",a(e,r,n),t)},"metaViewContent",0,function(t,e){i("ViewContent",{...a([t],t.price,e),content_name:t.name})}])},918216,t=>{"use strict";var e=t.i(604768);function r(t,e={}){window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:t,...e})}function n(t){return t.feedId?.trim()||t.handle}function i(t){let e={};for(let[r,n]of(t??[]).slice(0,5).entries())n&&(e[0===r?"item_category":`item_category${r+1}`]=n);return e}function a(t,e,n){r("add_payment_info",{ecommerce:{currency:n,value:e,payment_type:t}})}var c=t.i(565821),o=t.i(430549),u=t.i(981944);let l=e.trackCheckoutPaymentElementReady,s=e.trackCheckoutPaymentElementError,d=e.trackCheckoutPaymentMethodShown,p=e.trackCheckoutPayButtonSeen,m=e.trackCheckoutPaymentLeft;t.s(["trackAddToCart",0,function(t,a){var o;e.trackAddToCart(t);let l=parseFloat(t.price);r("add_to_cart",{ecommerce:{currency:(o={...t,price:l}).currency||"EUR",value:o.price*o.quantity,items:[{item_id:n(o),item_name:o.title,item_brand:o.vendor||void 0,...i(o.categories),item_variant:o.variant,price:o.price,quantity:o.quantity}]}}),u.metaAddToCart({id:n(t),quantity:t.quantity,price:l},t.currency||"EUR"),c.klaviyoAddedToCart(t,a)},"trackBackInStockSubscribed",0,function(t,r){e.trackBackInStockSubscribed(t,r),c.klaviyoIdentify(t)},"trackCartViewed",0,function(t){if(0!==t.items.length){var a,c;e.trackCartViewed({items:t.items,total:t.subtotal,currency:t.currency}),a=t.items.map(t=>({...t,price:parseFloat(t.price)})),c=parseFloat(t.subtotal),r("view_cart",{ecommerce:{currency:t.currency||"EUR",value:c,items:a.map(t=>({item_id:n(t),item_name:t.title,item_brand:t.vendor||void 0,...i(t.categories),price:t.price,quantity:t.quantity}))}})}},"trackCheckoutAddressFilled",0,function(t){e.trackCheckoutAddressFilled(t)},"trackCheckoutContactFilled",0,function(t){e.trackCheckoutContactFilled(t),c.klaviyoIdentify(t)},"trackCheckoutInformationInvalid",0,function(t,r){e.trackCheckoutInformationInvalid(t,r)},"trackCheckoutStarted",0,function(t){e.trackCheckoutStarted(t);let a=t.items.map(t=>({...t,price:parseFloat(t.price)})),c=parseFloat(t.total),o=t.currency||"EUR";r("begin_checkout",{ecommerce:{currency:o,value:c,coupon:void 0,items:a.map(t=>({item_id:n(t),item_name:t.title,item_brand:t.vendor||void 0,...i(t.categories),price:t.price,quantity:t.quantity}))}}),u.metaInitiateCheckout(a.map(t=>({id:n(t),quantity:t.quantity,price:t.price})),c,o)},"trackDiscountApplied",0,function(t,r,n){e.trackDiscountApplied(t,r,n)},"trackExpressCheckout",0,function(t,r,n,i){e.trackExpressCheckout(t,r,n,i),a(t,r,n)},"trackExpressPayError",0,function(t,r,n){try{e.trackCheckoutPayError(t,n?.code??null,n?.message??null,{surface:"express",stage:r,errorType:n?.type??null})}catch{}},"trackHeaderNavClicked",0,function(t){e.trackHeaderNavClicked(t)},"trackPayButtonSeen",0,p,"trackPayClicked",0,function(t,r,n,i){e.trackCheckoutPayClicked(t,r,n,i)},"trackPayError",0,function(t,r,n){e.trackCheckoutPayError(t,r,n)},"trackPaymentElementError",0,s,"trackPaymentElementReady",0,l,"trackPaymentLeft",0,m,"trackPaymentMethodShown",0,d,"trackPaymentStarted",0,function(t,r,n){e.trackCheckoutPaymentStarted(t,r,n),a(t,r,n)},"trackProductViewed",0,function(t){e.trackProductViewed(t),c.klaviyoViewedProduct(t)},"trackPurchase",0,function(t){var e;let{email:a,...c}=t;r("purchase",{ecommerce:{transaction_id:(e={...c,tax:c.tax||0}).orderId,value:e.total,tax:e.tax,shipping:e.shipping,currency:e.currency,coupon:e.coupon,items:e.items.map(t=>({item_id:n(t),item_name:t.title,item_brand:t.vendor||void 0,...i(t.categories),item_variant:t.variant,price:t.price,quantity:t.quantity}))}}),u.metaPurchase(c.orderId,c.items.map(t=>({id:n(t),quantity:t.quantity,price:t.price})),c.total,c.currency),o.fireProfitMetricsConversions({orderId:c.orderId,total:c.total,currency:c.currency,email:a})},"trackShippingSelected",0,function(t,n,i,a){e.trackCheckoutShippingSelected(t,n),r("add_shipping_info",{ecommerce:{currency:a,value:i,shipping_tier:t}})},"trackVariantViewed",0,function(t){var e;let a=parseFloat(t.price);r("view_item",{ecommerce:{currency:(e={...t,price:a}).currency||"EUR",value:e.price,items:[{item_id:n(e),item_name:e.title,item_brand:e.vendor||void 0,...i(e.categories),price:e.price,quantity:1}]}}),u.metaViewContent({id:n(t),name:t.title,quantity:1,price:a},t.currency||"EUR")}],918216)},392354,380928,911860,540259,484346,t=>{"use strict";var e,r=t.i(843476),n=t.i(271645);function i(t){return`${t.variantId}:${t.isSubscription?"sub":"one"}`}t.s(["cartLineKey",0,i],380928);var a=t.i(565821);let c=t=>Math.round(100*t)/100;function o(t,e,r){return!!t.variantId&&r.includes(t.variantId)||e.includes(t.handle.toLowerCase())}var u=t.i(955377),l=t.i(325731);function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}t.i(247167);var d="dahlia",p="https://js.stripe.com",m="".concat(p,"/").concat(d,"/stripe.js"),f=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,y=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,h=function(){for(var t=document.querySelectorAll('script[src^="'.concat(p,'"]')),e=0;e<t.length;e++){var r,n=t[e];if(r=n.src,f.test(r)||y.test(r))return n}return null},_=function(t){var e=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",r=document.createElement("script");r.src="".concat(m).concat(e);var n=document.head||document.body;if(!n)throw Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return n.appendChild(r),r},g=function(t,e){t&&t._registerWrapper&&t._registerWrapper({name:"stripe-js",version:"9.2.0",startTime:e})},k=null,v=null,w=null,b=function(t,e,r){if(null===t)return null;var n,i=e[0];if("string"!=typeof i)throw Error("Expected publishable key to be of type string, got type ".concat(s(i)," instead."));var a=i.match(/^pk_test/),c=3===(n=t.version)?"v3":n;a&&c!==d&&console.warn("Stripe.js@".concat(c," was loaded on the page, but @stripe/stripe-js@").concat("9.2.0"," expected Stripe.js@").concat(d,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));
1var o=t.apply(void 0,e);return g(o,r),o},C=!1,I=function(){return e||(e=(null!==k?k:(k=new Promise(function(t,e){if("u"<typeof window||"u"<typeof document)return void t(null);if(window.Stripe,window.Stripe)return void t(window.Stripe);try{var r,n=h();n?n&&null!==w&&null!==v&&(n.removeEventListener("load",w),n.removeEventListener("error",v),null==(r=n.parentNode)||r.removeChild(n),n=_(null)):n=_(null),w=function(){window.Stripe?t(window.Stripe):e(Error("Stripe.js not available"))},v=function(t){e(Error("Failed to load Stripe.js",{cause:t}))},n.addEventListener("load",w),n.addEventListener("error",v)}catch(t){e(t);return}})).catch(function(t){return k=null,Promise.reject(t)})).catch(function(t){return e=null,Promise.reject(t)}))};Promise.resolve().then(function(){return I()}).catch(function(t){C||console.warn(t)});var S=function(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];C=!0;var n=Date.now();return I().then(function(t){return b(t,e,n)})};t.s(["loadStripe",0,S],911860),t.s([],540259);let E="pk_live_51LouFYLfHA5W3Mq9DxXFZcaXpktZEZujImPo8JWQg4rOUNT0G0D0KXb9PMHZPmfJj4dyiDKGQWqEj0EucGRuvKh600tAn7ODec",P=null;function q(){return!P&&E&&(P=S(E)),P}function A(){q()}let M=!!E;t.s(["getExpressStripe",0,q,"hasStripePublishableKey",0,M,"prewarmExpressCheckout",0,A],484346);let T="tester-cart",R={items:[],totalQuantity:0,subtotal:"0.00",currency:"EUR",subscriptionInterval:null},F=(0,n.createContext)(null);function L(t){let e=t.items.reduce((t,e)=>t+e.quantity,0),r=t.items.reduce((t,e)=>t+parseFloat(e.price)*e.quantity,0).toFixed(2),n=t.items.some(t=>t.isSubscription);return{...t,totalQuantity:e,subtotal:r,subscriptionInterval:n?t.subscriptionInterval:null}}t.s(["CartProvider",0,function({children:t,initialCart:e,customerEmail:s,locale:d}
1){let[p,m]=(0,n.useState)(!1),[f,y]=(0,n.useState)(e??R),[h,_]=(0,n.useState)(!1),g=(0,u.useCurrency)(),[k,v]=(0,n.useState)(null),[w,b]=(0,n.useState)(null),C=(0,n.useRef)(""),I=(0,n.useRef)(null),S=(0,n.useRef)(!1),E=(0,n.useRef)(null),P=(0,n.useRef)([]),q=s??w??k;(0,n.useEffect)(()=>{try{let t=localStorage.getItem("tester-cookie-consent");S.current=!!t&&!!JSON.parse(t).marketing}catch{S.current=!1}function t(t){let e=t.detail;S.current=!!e?.marketing}return window.addEventListener("cookie-consent",t),()=>window.removeEventListener("cookie-consent",t)},[]),(0,n.useEffect)(()=>{let t=!1;return(async()=>{try{let e=await fetch("/api/auth/me",{cache:"no-store"});if(!e.ok)return;let r=await e.json(),n=r?.customer?.email;!t&&"string"==typeof n&&n&&b(n.trim().toLowerCase())}catch{}})(),()=>{t=!0}},[]),(0,n.useEffect)(()=>{E.current=q,q&&(0,a.klaviyoIdentify)(q)},[q]);let[M,U]=(0,n.useState)([]);(0,n.useEffect)(()=>{let t=!1;return fetch("/api/promotions").then(t=>t.ok?t.json():null).then(e=>{!t&&Array.isArray(e?.promotions)&&U(e.promotions)}).catch(()=>{}),()=>{t=!0}},[]);let x=(0,n.useMemo)(()=>{if(0===M.length||0===f.items.length)return null;let t=function(t,e){let r=0,n=0,i=0,a=[],u=null;for(let c of t){if(c.buyQuantity<1||c.getQuantity<1||c.percentage<=0)continue;let t=[];for(let r of e){let e=o(r,c.buyHandles,c.buyVariantIds),n=o(r,c.getHandles,c.getVariantIds);if(!e&&!n)continue;let i=Math.max(0,Math.trunc(r.quantity));for(let a=0;a<i;a++)t.push({price:Number(r.unitPrice)||0,priceAlt:Number(r.unitPriceAlt??0)||0,inBuy:e,inGet:n,used:!1})}if(t.length<c.buyQuantity+c.getQuantity)continue;let l=t.filter(t=>t.inBuy).sort((t,e)=>Number(t.inGet)-Number(e.inGet)||e.price-t.price),s=t.filter(t=>t.inGet).sort((t,e)=>t.price-e.price),d=0;for(;;){let t=l.filter(t=>!t.used).slice(0,c.buyQuantity);if(t.length<c.buyQuantity)break;t.forEach(t=>t.used=!0);let e=s.filter(t=>!t.used).slice(0,c.getQuantity);if(e.length<c.getQuantity){t.forEach(t=>t.used=!1);break}e.forEach(t=>{t.used=!0,n+=t.price*c.percentage,i+=t.priceAlt*c.percentage,d++})}d>0&&(r+=d,a.push(c.title),u=u??c)}return 0!==r&&u?{title:a.join(" + "),freeUnits:r,amount:c(n),amountAlt:c(i),buyQuantity:u.buyQuantity,getQuantity:u.getQuantity,percentage:u.percentage}:null}(M,f.items.filter(t=>!t.isSubscription).map(t=>({handle:t.handle,variantId:t.variantId,quantity:t.quantity,unitPrice:parseFloat(t.price)||0})));return t?{title:t.title,amount:t.amount,freeUnits:t.freeUnits,buyQuantity:t.buyQuantity,getQuantity:t.getQuantity,percentage:t.percentage}:null},[M,f.items]),j=(0,n.useCallback)(t=>{let e="u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():`atc_${Date.now()}_${Math.random().toString(36).slice(2)}`;return S.current&&E.current&&P.current.push({id:e,handle:t.handle,title:t.title,price:t.price,quantity:t.quantity,image:t.image}),e},[]),N=(0,n.useRef)(!1);(0,n.useEffect)(()=>{if(N.current)return;N.current=!0;let t=function(){try{let t=localStorage.getItem(T);if(t){let e=JSON.parse(t);if(e.items&&Array.isArray(e.items))return{items:e.items,totalQuantity:e.totalQuantity??0,subtotal:e.subtotal??"0.00",currency:e.currency??"EUR",subscriptionInterval:e.subscriptionInterval??null}}}catch{}return R}();y(e=>(function(t,e){if(0===e.items.length)return t;if(0===t.items.length)return e;let r=[...t.items];for(let t of e.items){let e=i(t),n=r.findIndex(t=>i(t)===e);n>=0?r[n]={...r[n],quantity:r[n].quantity+t.quantity}:r.push(t)}return L({...t,items:r,subscriptionInterval:e.subscriptionInterval??t.subscriptionInterval})})(t,e)),_(!0)},[]),(0,n.useEffect)(()=>{h&&function(t){try{localStorage.setItem(T,JSON.stringify(t))}catch{}}(f)},[f,h]);let D=(0,n.useRef)(!1);(0,n.useEffect)(()=>{D.current||!h||0===f.items.length||f.items.every(t=>t.isSubscription)||(D.current=!0,A())},[h,f.items]);let Q=(0,n.useRef)("");(0,n.useEffect)(()=>{if(!h||!d||0===f.items.length)return;let t=f.items.map(t=>t.variantId).filter(Boolean);if(0===t.length)return;let e=JSON.stringify({locale:d,currency:g.currency,ids:t});if(e===Q.current)return;Q.current=e;let r=!1;return(async()=>{try{let e=await fetch("/api/products/localize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({variantIds:t,locale:d})});if(!e.ok)return;let n=await e.json();if(r)return;y(t=>{let e=!1,r=t.items.map(t=>{let r=n[t.variantId];if(!r)return t;let i=null!=r.price?parseFloat(r.price):null,a=null!=i?(t.isSubscription&&t.subscriptionDiscountPct?(0,l.roundDiscounted)(i*(1-t.subscriptionDiscountPct/100),g.roundTo):i).toFixed(2):t.price,c=t.isSubscription?null!=i?i.toFixed(2):t.compareAtPrice:r.compareAtPrice??null,o=r.image?.url??null;return r.title===t.title&&r.handle===t.handle&&o===(t.image?.url??null)&&a===t.price&&c===t.compareAtPrice?t:(e=!0,{...t,title:r.title,handle:r.handle,price:a,compareAtPrice:c,image:r.image?{url:r.image.url,altText:r.image.altText,width:t.image?.width??200,height:t.image?.height??200}:t.image})}),i=t.currency!==g.currency;return e||i?L({...t,items:r,currency:g.currency}):t})}catch{}})(),()=>{r=!0}},[h,d,g.currency,g.roundTo,f.items]),(0,n.useEffect)(()=>
1{if(!h||!q)return;let t=JSON.stringify({email:q,currency:f.currency,items:f.items.map(t=>({v:t.variantId,q:t.quantity,s:+!!t.isSubscription,p:t.price})),interval:f.subscriptionInterval});if(t!==C.current)return I.current&&clearTimeout(I.current),I.current=setTimeout(()=>{C.current=t;let e=P.current;P.current=[],fetch("/api/cart/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:f.items,customerEmail:q,locale:d,currency:f.currency,subscriptionInterval:f.subscriptionInterval,klaviyoAdds:e}),keepalive:!0}).catch(()=>{C.current="",P.current.unshift(...e)})},1500),()=>{I.current&&clearTimeout(I.current)}},[h,f.items,f.subscriptionInterval,f.currency,q,d]);let V=(0,n.useCallback)(t=>{y(e=>(function(t,e){switch(e.type){case"SET_CART":return e.cart;case"ADD_ITEM":{let r=i(e.item),n=t.items.find(t=>i(t)===r)?t.items.map(t=>i(t)===r?{...t,quantity:t.quantity+e.item.quantity}:t):[...t.items,e.item],a=t.subscriptionInterval;return e.item.isSubscription&&!a&&(a=e.subscriptionInterval??"month"),L({...t,items:n,subscriptionInterval:a})}case"UPDATE_ITEM":{let r=t.items.map(t=>i(t)===e.lineKey?{...t,quantity:e.quantity}:t);return L({...t,items:r})}case"REMOVE_ITEM":{let r=t.items.filter(t=>i(t)!==e.lineKey);return L({...t,items:r})}case"SET_SUBSCRIPTION_INTERVAL":return L({...t,subscriptionInterval:e.interval});default:return t}})(e,t))},[]),O=(0,n.useCallback)(()=>{y(R)},[]),B=(0,n.useCallback)(t=>{let e=t.trim().toLowerCase();/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)&&v(t=>t===e?t:e)},[]),$=(0,n.useRef)(null);return(0,n.useEffect)(()=>{$.current=q?{items:f.items,customerEmail:q,locale:d,currency:f.currency,subscriptionInterval:f.subscriptionInterval}:null},[q,f.items,f.currency,f.subscriptionInterval,d]),(0,n.useEffect)(()=>{function t(){let t=$.current;if(!t||!t.items||0===t.items.length||"u"<typeof navigator||!navigator.sendBeacon)return;let e=new Blob([JSON.stringify({...t,klaviyoAdds:P.current})],{type:"application/json"});navigator.sendBeacon("/api/cart/sync",e)}function e(){t()}function r(){"hidden"===document.visibilityState&&t()}return window.addEventListener("pagehide",e),document.addEventListener("visibilitychange",r),()=>{window.removeEventListener("pagehide",e),document.removeEventListener("visibilitychange",r)}},[]),(0,r.jsx)(F.Provider,{value:{cart:f,isOpen:p,setIsOpen:m,hydrated:h,updateOptimisticCart:V,clearCart:O,captureEmail:B,recordAddToCart:j,autoDiscount:x},children:t})},"useCart",0,function(){let t=(0,n.useContext)(F);if(!t)throw Error("useCart must be used within a CartProvider");return t}],392354)}]);

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.