PageSourceSearch

https://www.lidl.pl/t/cdn/index.126f75c2.min.js

js lidl.pl collected 2026-09-24 19:16:53 UTC 193,359 bytes, 7 lines download raw bytes

1(function(){"use strict";function He(t=void 0,e){return function(r,a,i){const o=i.value,_=e||`${r.constructor.name}.${a}`;return i.value=function(...d){try{const g=o.apply(this,d);return g&&typeof g.then=="function"?g.catch(m=>(console.log(`[DataLayerService] Error in ${_}: `,m),t)):g}catch(g){return console.log(`[DataLayerService] Error in ${_}: `,g),t}},i}}var Ur=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor,qe=(t,e,r,a)=>{for(var i=a>1?void 0:a?Mr(e,r):e,o=t.length-1,_;o>=0;o--)(_=t[o])&&(i=(a?_(e,r,i):_(i))||i);return a&&i&&Ur(e,r,i),i};class A{static getItem(e){return localStorage.getItem(e)}static setItem(e,r){localStorage.setItem(e,r)}static removeItem(e){localStorage.removeItem(e)}static getCookieValue(e){var i;const a=`; ${document.cookie}`.split(`; ${e}=`);return a.length===2&&((i=a.pop())==null?void 0:i.split(";").shift())||null}static getJSONParsedCookieValue(e){try{const r=this.getCookieValue(e);return r?this.parseJSON(r):null}catch{return null}}static setCookie(e,r,a=""){document.cookie=`${e}=${r}; ${a}`}static deleteCookie(e){document.cookie=`${e}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;`}static parseJSON(e){return e?JSON.parse(e):null}}qe([He(null)],A,"getItem",1),qe([He()],A,"setItem",1),qe([He()],A,"removeItem",1),qe([He(null)],A,"getCookieValue",1),qe([He()],A,"setCookie",1),qe([He()],A,"deleteCookie",1),qe([He(null)],A,"parseJSON",1);function N(t){let e="";if(document.cookie&&document.cookie!==""){const r=document.cookie.split(";");for(let a=0;a<r.length;a+=1){const i=r[a].replace(/^\s+/,"").replace(/\s+$/,"");if(i.substring(0,t.length+1)===`${t}=`){try{e=decodeURIComponent(i.substring(t.length+1).replace(/\+/g," "))}catch(o){console.log("decode err",o)}break}}}return e}function w(t,e=!1,r="log"){if(e||N("dataLayerService"))switch(r){case"warn":console.warn(t);break;case"error":console.error(t);break;default:console.log(t)}}function Wr(t){const e=N("adSessionId");if(e)return e;const r=t(),a="; max-age="+24*60*60*30;return document.cookie="adSessionId="+r+a+"; secure; path=/",r}const Bt=()=>{const e=new URLSearchParams(window.location.search).get("salesChannel"),r=["02","05","06","07","2","5","6","7"],a=!!sessionStorage.getItem("hadSalesChannel"),i=e!==null&&r.includes(e);return i&&sessionStorage.setItem("hadSalesChannel","true"),i||a};function $r(){const t=A.getCookieValue("track_device_id"),e=Bt()||t!==null,r=A.getCookieValue(Zt)==="true";return e||r}const Zt="mobile_flow";function Nt(t){const e=N("tracking-info")||"{}";try{const r=window.atob(e),a=JSON.parse(r),i=a==null?void 0:a[t];return i!=="null"?i:""}catch{return""}}function Gr(t){const e=new TextEncoder().encode(t);return crypto.subtle.digest("SHA-256",e).then(r=>Array.from(new Uint8Array(r)).map(o=>o.toString(16).padStart(2,"0")).join(""))}class Kr{constructor(){this.store={}}getItem(e){return this.store[e]||null}setItem(e,r){this.store[e]=r}removeItem(e){delete this.store[e]}clear(){this.store={}}key(e){return Object.keys(this.store)[e]||null}get length(){return Object.keys(this.store).length}}function er(){if(typeof window<"u"&&!window.localStorage)try{const t=new Kr;Object.defineProperty(window,"localStorage",{value:t,configurable:!0,writable:!0}),w("[LocalStoragePolyfill] localStorage was null/undefined, polyfill initialized")}catch(t){w(["[LocalStoragePolyfill] Failed to initialize polyfill:",t])}}var h=(t=>(t.VIEW_ITEM="view_item",t.SELECT_ITEM="select_item",t.VIEW_ITEM_LIST="view_item_list",t.VIEW_ITEM_INFORMATION="view_item_information",t.ITEM_RATINGS_CLICK="item_ratings_click",t.ITEM_A_GOODS_LINK_CLICK="item_a_goods_link_click",t.ITEM_B_GOODS_LINK_CLICK="item_b_goods_link_click",t.ITEM_DOWNLOADS_SECTION_CLICK="item_downloads_section_click",t.ITEM_DOWNLOADS_LINK_CLICK="item_downloads_link_click",t.ITEM_INSTALL_CALC_LINK_CLICK="item_install_calc_link_click",t.GENERAL_FILE_DOWNLOAD="general_file_download",t.ITEM_SOCIAL_SHARE_CLICK="item_social_share_click",t.ITEM_BACKINSTOCK_SUCCESS="item_backinstock_success",t.ITEM_BACKINSTOCK_SUBMIT="item_backinstock_submit",t.ITEM_AVAILABLE_NOTIFY_ME="item_available_notify_me",t.ADD_TO_CART="add_to_cart",t.REMOVE_FROM_CART="remove_from_cart",t.VIEW_CART="view_cart",t.BEGIN_CHECKOUT="begin_checkout",t.ADD_SHIPPING_INFO="add_shipping_info",t.ADD_PAYMENT_INFO="add_payment_info",t.PURCHASE="purchase",t.CHECKOUT_SUM
1MARY="checkout_summary",t.PROCEED_TO_PAYMENT="proceed_to_payment",t.CONTINUE_SHOPPING="continue_shopping",t.CHECKOUT_LOGIN_INFO="checkout_login_info",t.ADD_DELIVERY_OPTIONS="add_delivery_options",t.CART_PRODUCT_RATING_CLICK="cart_product_rating_click",t.CART_NEWSLETTER_OPTIN_CLICK="cart_newsletter_optin_click",t.CART_CHECKBOX_CLICK="cart_checkbox_click",t.ADD_TO_WISHLIST="add_to_wishlist",t.REMOVE_FROM_WISHLIST="remove_from_wishlist",t.PRINT_WISHLIST="print_wishlist",t.VIEW_PROMOTION="view_promotion",t.SELECT_PROMOTION="select_promotion",t.LOAD_PROMOTION="load_promotion",t.PROMOTION_INFO_VIEWED="promotion_info_viewed",t.PROMOTION_DEACTIVATED="promotion_deactivated",t.PAGE_VIEW="page_view_custom",t.PAGE_VIEW_OLD="page_view",t.SELECT_CONTENT="select_content",t.VIEW_CONTENT="view_content",t.FILTER_SELECT="filter_select",t.FILTER_SELECT_INTENT="filter_select_intent",t.SEARCH="search",t.SEARCH_CLICK="search_click",t.SHARE="share",t.GENERAL_SCROLL_ACTION="scroll",t.STORE_SET_FAVOURITE="store_set_favourite",t.STORE_SELECT_ROUTE="store_select_route",t.STORE_OPEN_SEARCH="store_open_search",t.STORESEARCH_FLYOUT_SEEN="storesearch_flyout_seen",t.FLYER_VIEW="flyer_view",t.FLYER_OPEN="flyer_open",t.FLYER_LAST_PAGE_SEEN="flyer_last_page_seen",t.FLYER_CHANGEVIEWPORT="flyer_changeviewport",t.FLYER_50_PERC_VIEWED="flyer_50_perc_viewed",t.FLYER_75_PERC_VIEWED="flyer_75_perc_viewed",t.FLYER_100_PERC_VIEWED="flyer_100_perc_viewed",t.FLYER_CART_CLICK="flyer_cart_click",t.FLYER_LOAD="flyer_load",t.FLYER_NAVIGATION="flyer_navigation",t.FLYER_SEARCH_BY_SUGGEST="flyer_search_by_suggest",t.FLYER_SEARCH_PAGE_CLICK="flyer_search_page_click",t.FLYER_SEARCH_TERM="flyer_search_term",t.FLYER_SOCIAL="flyer_social",t.FLYER_RECIPE_CLICK="flyer_recipe_click",t.FLYER_LINK_CLICK="flyer_link_click",t.FLYER_FILE_DOWNLOAD="flyer_file_download",t.FLYER_ANIMATION_TOGGLE="flyer_animation_toggle",t.VIDEO_START="video_start",t.VIDEO_PROGRESS="video_progress",t.VIDEO_COMPLETE="video_complete",t.LOGIN="login",t.LOGIN_STEP0="login_step0",t.LOGIN_STEP1="login_step1",t.LOGIN_STEP2="login_step2",t.FORGOT_PASSWORD_CLICK="forgot_password_click",t.PASSWORD_RESET="password_reset",t.START_REGISTRATION="start_registration",t.REGISTRATION_SUCCESS="registration_success",t.SWITCH_LOGIN_TYPE="switch_login_type",t.CONFIRM_TOKEN="confirm_token",t.REQUEST_NEW_TOKEN="request_new_token",t.CONFIRM_MOBILE_NUMBER="confirm_mobile_number",t.PASSWORD_RESET_SUCCESS="password_reset_success",t.CONTACT_CUSTOMER_SERVICE="contact_customer_service",t.LOGIN_ACCEPT_TERMS="login_accept_terms",t.REGISTER_CONTINUE_CLICK="register_continue_click",t.REGISTER_CHANGE_PHONE="register_change_phone",t.REFUND="refund",t.RETURN_CHATBOT_WINDOWOPEN_CLICK="return_chatbot_windowopen_click",t.RETURN_CHATBOT_WINDOWCLOSED_CLICK="return_chatbot_windowclosed_click",t.REVIEW_PRODUCT_START="review_product_start",t.REVIEW_PRODUCT_CLICK="review_product_click",t.REVIEW_PRODUCT_SUBMIT="review_product_submit",t.REVIEW_PRODUCT_ERROR="review_product_error",t.REVIEW_PRODUCT_SUCCESS="review_product_success",t.ERROR_MESSAGE="error_message",t.COMPETITION_FORM_SUBMIT="competition_form_submit",t.NEWSLETTER_FORM_SUBMIT="newsletter_form_submit",t.NEWSLETTER_FORM_SUCCESS="newsletter_form_success",t.USER_CONSENT_UPDATE="user_consent_update",t.KAMELEOON_EXPERIMENT="kameleoon_experiment",t.CLICK_LIDLPLUS_DOWNLOAD_LINK="click_lidlplus_download_link",t.LOAD_ITEM_LIST="load_item_list",t.PURCHASE_BRIDGE_AOV="purchase_bridge_aov",t.SESSION_START="session_start",t.FIRST_VISIT="first_visit",t.CAMPAIGN_DETAILS="campaign_details",t.ADD_PRODUCT_TO_WISHLIST_IN_FLYER="add_product_to_wishlist_in_flyer",t.PRODUCTVIEW_IN_FLYER="productview_in_flyer",t.RETAIL_STARTPAGE_VISIT="retail_startpage_visit",t.VIEW_STORE_ARTICLE="view_store_article",t.WT_VISIT="wt_visit",t.LOAD_ITEM="load_item",t.LINK_CLICK="link_click",t))(h||{});const Hr=t=>Object.values(h).includes(t);var rt=(t=>(t.NOT_SUPPORTED="Scenario not supported",t))(rt||{}),f=(t=>(t.PDP_Pageload="PDP_Pageload",t.PDP_Click="PDP_Click",t.PLP_Product_Click="PLP_Product_Click",t.PDP_Social_Click="PDP_Social_Click",t.PDP_Image_Click="PDP_Image_Click",t.PDP_Social_Share_Click="PDP_Social_Share_Click",t.PDP_Section_EnterViewport="PDP_Section_EnterViewport",t.PDP_Recommendation_Load="PDP_Recommendation_Load",t.PDP_Recommendation_EnterViewport="PDP_Recommendation_EnterViewport",t.PDP_Recommendation_Click="PDP_Recommendation_Click",t.PDP_Rating_Click="PDP_Rating_Click",t.PDP_Information_Load="PDP_Information_Load",t.PDP_A_Goods_Link_Click="PDP_A_Goods_Link_Click",t.PDP_B_Goods_Link_Click="PDP_B_Goods_Link_Click",t.PDP_Downloads_Link_Click="PDP_Downloads_Link_Click",t.PDP_Downloads_Section_Click="PDP_Downloads_Section_Click",t.PDP_Install_Calc_Link_Click="PDP_Install_Calc_Link_Click",t.PDP_BackInStock_Alert_Success="PDP_BackInStock_Alert_Success",t.PDP_BackInStock_Alert_Submit="PDP_BackInStock_Alert_Submit",t.General_Pageload="General_Pageload",t.General_Recommendation_Load="General_Recommendation_Load",t.General_RecommendationProduct_EnterViewport="General_RecommendationProduct_EnterViewport",t.General_Product_Click="General_Product_Click",t.General_Section_EnterViewport="General_Section_EnterViewport",t.General_Teaser_Click="General_Teaser_Click",t.General_Link_Click="General_Link_Click",t.PLP_Pageload="PLP_Pageload",t.PLP_FilterSelect_Click="PLP_FilterSelect_Click",t.PLP_FilterSelect_Intent="PLP_FilterSelect_Intent",t.PLP_FilterDeselect_Click="PLP_FilterDeselect_Click",t.PLP_ProductImageSlider_Click="PLP_ProductImageSlider_Click",t.PLP_Show_More_Click="PLP_Show_More_Click",t.PLP_Information_Load="PLP_Information_Load",t.General_SearchTermConfirm_Click="General_SearchTermConfirm_Click",t.Cart_Pageload="Cart_Pageload",t.Cart_Pageload_Split="Cart_Pageload_Split",t.Cart_Button_Click="Cart_Button_Click",t.Cart_Success_Pageload="Cart_Success_Pageload",t.Cart_Checkbox_Click="Cart_Checkbox_Click",t.Banner_Promotion_Load="Banner_Promotion_Load",t.General_Product_View="General_Product_View",t.General_Product_Lo
1ad="General_Product_Load",t.General_Promotion_View="General_Promotion_View",t.General_Promotion_View_Split="General_Promotion_View_Split",t.General_Promotion_Load="General_Promotion_Load",t.General_Promotion_Click="General_Promotion_Click",t.General_Promotion_Qualified="General_Promotion_Qualified",t.General_Promotion_Shown="General_Promotion_Shown",t.General_Navigation_Click="General_Navigation_Click",t.Wishlist_Pageload="Wishlist_Pageload",t.Wishlist_Button_Click="Wishlist_Button_Click",t.StoreSearch_Pageload="StoreSearch_Pageload",t.StoreSearch_Click="StoreSearch_Click",t.StoreSearchDP_Pageload="StoreSearchDP_Pageload",t.StoreSearchDP_Click="StoreSearchDP_Click",t.MyAccount_Pageload="MyAccount_Pageload",t.MyAccount_Click="MyAccount_Click",t.Flyer_Click="Flyer_Click",t.Flyer_View="Flyer_View",t.Flyer_ChangeViewport="Flyer_ChangeViewport",t.Flyer_Categories_Select="Flyer_Categories_Select",t.Kameleoon_Experiment="Kameleoon_Experiment",t.Order_Cancellation_Click="Order_Cancellation_Click",t.Order_ViewDetails_Click="Order_ViewDetails_Click",t.Order_Invoice_Download_Click="Order_Invoice_Download_Click",t.Order_Return_Click="Order_Return_Click",t.Order_Cancellation_Confirmation="Order_Cancellation_Confirmation",t.Order_Return_Confirmation="Order_Return_Confirmation",t.Start_Login_Click="Start_Login_Click",t.Login_Button_Click="Login_Button_Click",t.Login_Success="Login_Success",t.Login_Link_Click="Login_Link_Click",t.Forgotten_Password_Click="Forgotten_Password_Click",t.Password_Reset="Password_Reset",t.Register_Link_Click="Register_Link_Click",t.Registration_Success="Registration_Success",t.Error_Message="Error_Message",t.Competition_Form_Submit="Competition_Form_Submit",t.Newsletter_Form_Submit="Newsletter_Form_Submit",t.Newsletter_Form_Success="Newsletter_Form_Success",t.Flyer_View_50="Flyer_View_50",t.Flyer_View_75="Flyer_View_75",t.Flyer_View_100="Flyer_View_100",t.User_Consent_Update="User_Consent_Update",t.Review_Product_Start="Review_Product_Start",t.Review_Product_Click="Review_Product_Click",t.Review_Product_Submit="Review_Product_Submit",t.Review_Product_Error="Review_Product_Error",t.Review_Product_Success="Review_Product_Success",t.Return_Chatbot_WindowOpen_Click="Return_Chatbot_WindowOpen_Click",t.Return_Chatbot_WindowClosed_Click="Return_Chatbot_WindowClosed_Click",t.Session_Start="Session_Start",t.First_Visit="First_Visit",t.Add_Product_To_Wishlist_In_Flyer="Add_Product_To_Wishlist_In_Flyer",t.ProductView_In_Flyer="ProductView_In_Flyer",t.Retail_StartPage_Visit="Retail_StartPage_Visit",t.View_Store_Article="View_Store_Article",t.WT_Visit="WT_Visit",t.
1Switch_Login_Type="Switch_Login_Type",t.Confirm_Token="Confirm_Token",t.Request_New_Token="Request_New_Token",t.Confirm_Mobile_Number="Confirm_Mobile_Number",t.Password_Reset_Success="Password_Reset_Success",t.Contact_Customer_Service="Contact_Customer_Service",t.Login_Accept_Terms="Login_Accept_Terms",t.Register_Continue_Click="Register_Continue_Click",t.Register_Change_Phone="Register_Change_Phone",t.Video_Start="Video_Start",t.Video_Progress="Video_Progress",t.Video_Complete="Video_Complete",t.General_Scroll_Action="General_Scroll_Action",t.Promotion_Information_Click="Promotion_Information_Click",t.STL_Product_Checkbox_Click="STL_Product_Checkbox_Click",t.STL_Add2Cart_Click="STL_Add2Cart_Click",t.STL_Variant_Selected="STL_Variant_Selected",t.STL_Select_Variant_Click="STL_Select_Variant_Click",t.Link_Click="Link_Click",t))(f||{});class Ne{constructor(){this.debugEnabled=this.checkDebugMode()}static getInstance(){return Ne.instance||(Ne.instance=new Ne),Ne.instance}checkDebugMode(){return new URLSearchParams(globalThis.location.search.toLowerCase()).get("dlsdebug")==="1"}async sendToEndpoint(e){if(this.debugEnabled)try{w("[DebugLogger] Sending log to endpoint"),await fetch("/t/p/debug/collect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(r){console.error("Failed to send log to endpoint:",r)}}log(e){w(e),this.debugEnabled&&this.sendToEndpoint(e)}}const re=Ne.getInstance(),it=["utm_source","utm_content","utm_id","utm_campaign","utm_term","utm_medium","utm_creative_format","utm_source_platform","utm_marketing_tactic","mktc","newsletter_id","gclid","dclid","srsltid"];class qr{getFilteredEvents(){return[rt.NOT_SUPPORTED,h.KAMELEOON_EXPERIMENT,"OneTrustGroupsUpdated","OneTrustLoaded","OptanonLoaded"]}bootstrap(){var r;const e=((r=globalThis.dataLayerNext)==null?void 0:r.filter(a=>{var i;return((i=a==null?void 0:a.event)==null?void 0:i.indexOf("gtm"))===-1&&!this.getFilteredEvents().includes(a==null?void 0:a.event)}))||[];e.forEach(a=>{const{event:i}=a;this.sendMobileEvents(i,a)}),re.log([`[FirebaseBridge] Sent ${e.length} events to Firebase`,e.map(a=>a.event).join(", ")]),document.addEventListener("datalayerservice:ga4",a=>{const{detail:i}=a;i.event=i.event==="page_view_custom"?"page_view":i.event;const{event:o}=i;i.content_type==="banner"&&re.log(["[FirebaseBridge] view_promotion event with banner content_type",i]);const d=new URL(document.location.href).searchParams;for(const g of it){const m=document.location.href.includes(`${g}=`),y=o===h.PAGE_VIEW_OLD,k=d.get("utm_source")==="lidlplus"&&d.get("utm_medium")==="app";if(m&&y&&!k){const b={...i,event:h.CAMPAIGN_DETAILS};this.sendMobileEvents(h.CAMPAIGN_DETAILS,b);break}}o&&!this.getFilteredEvents().includes(o)&&this.sendMobileEvents(o,i)})}sendToFirebase(e,r){var a,i;if(re.log([`[FirebaseBridge] Sent ${e} to Firebase`,this.handleEvent(r)]),globalThis.AnalyticsWebInterface)re.log(["[FirebaseBridge] Android interface called."]),globalThis.AnalyticsWebInterface.logEvent(e,this.handleEvent(r));else if((i=(a=globalThis==null?void 0:globalThis.webkit)==null?void 0:a.messageHandlers)!=null&&i.firebase){re.log(["[FirebaseBridge] IOS interface called."]);const o={command:"logEvent",name:e,parameters:this.handleEvent(r)};globalThis.webkit.messageHandlers.firebase.postMessage(o)}else re.log(["[FirebaseBridge] No native APIs found.",e])}async sendEventToProxyCollector(e,r){var d,g,m;const a=ur(),i=(d=globalThis.location.hostname.split(".").pop())==null?void 0:d.toUpperCase(),{ecommerce:o,lidldata:_}=r;try{const y={name:e,id:(g=_==null?void 0:_.eventInfo)==null?void 0:g.eventId,country:i,ecommerce:o?JSON.stringify(r.ecommerce):"missing",lidldata:_?JSON.stringify(_):"missing",salesChannel:(m=_==null?void 0:_.user)==null?void 0:m.salesChannel,userAgent:JSON.stringify(a)},k=await fetch("/t/p/fb/events-collect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(y)});if(!k.ok)throw new Error(`HTTP error! status: ${k.status}`);w(["[FirebaseBridge] Successfully sent purchase event to collector",y])}catch(y){w(["[FirebaseBridge] Failed to send purchase event to collector",y])}}sendMobileEvents(e,r){if(r.event=r.event==="page_view_custom"?"page_view":r.event,e=r.event==="page_view_custom"?"page_view":r.event,e===h.PURCHASE){const{ecommerce:a}=r,{value:i,items:o,basketValueAOV:_}=a;if((!i||!(o!=null&&o.length)||!_)&&this.sendEventToProxyCollector("no-revenue-purchase",r),!i&&o&&!(o!=null&&o.length))return re.log(["[FirebaseBridge] Purchase has not value and no items",this.handleEvent(r)]),!1;this.sendToFirebase(e,r),this.sendEventToProxyCollector(e,r);const d={event:h.PURCHASE_BRIDGE_AOV,ecommerce:{value:_||i,currency:a.currency}};this.sendToFirebase(h.PURCHASE_BRIDGE_AOV,d);return}this.sendCriteoEvents(e,r),this.sendToFirebase(e,r)}sendCriteoEvents(e,r){var d,g,m,y,k,b,P,O,D,F,G,W,$,Y;const{ecommerce:a,lidldata:i,content_type:o}=r,_={currency:a.currency,country:a.country,ad_session_id:a.adSessionId};switch(e){case h.LOAD_PROMOTION:o==="banner"&&this.sendToFirebase("ad_banner_load",{event:"ad_banner_load",ecommerce:{..._,ad_banner_load_beacon:(d=i==null?void 0:i.extraParams)==null?void 0:d.adPlacementLoadBeacon}});break;case h.VIEW_PROMOTION:o==="banner"&&this.sendToFirebase("ad_banner_view",{event:"ad_banner_view",ecommerce:{..._,ad_banner_view_beacon:(g=i==null?void 0:i.extraParams)==null?void 0:g.adPlacementViewBeacon}});break;case h.SELECT_PROMOTION:o==="banner"&&this.sendToFirebase("ad_banner_click",{event:"ad_banner_click",ecommerce:{..._,ad_banner_click_beacon:(m=i==null?void 0:i.extraParams)==null?void 0:m.adPlacementClickBeacon}});break;case h.LOAD_ITEM:if((y=i==null?void 0:i.extraParams)!=null&&y.adPlacementLoadBeacon){const V=((b=(k=i==null?void 0:i.products)==null?void 0:k.list)==null?void 0:b.map(U=>({item_id:U==null?void 0:U.id,ad_product_load_beacon:U==null?void 0:U.adLoadBeacon})))||[];this.sendToFirebase("ad_products_load",{event:"ad_products_load",ecommerce:{..._,ad_placement_load_beacon:(P=i==null?void 0:i.extraParams)==null?void 0:P.adPlacementLoadBeacon,items:V}})}break;case h.VIEW_ITEM_LIST:if((O=i==null?void 0:i.extraParams)!=null&&O.adPlacementViewBeacon){const V=((G=(F=(D=i==null?void 0:i.products)==null?void 0:D.list)==null?void 0:F.filter(U=>U==null?void 0:U.adViewBeacon))==null?void 0:G.map(U=>({item_id:U==null?void 0:U.id,ad_product_view_beacon:U==null?void 0:U.adViewBeacon})))||[];this.sendToFirebase("ad_products_view",{event:"ad_products_view",ecommerce:{..._,ad_placement_view_beacon:(W=i==null?void 0:i.extraParams)==null?void 0:W.adPlacementViewBeacon,items:V}})}break;case h.SELECT_ITEM:{const V=((Y=($=i==null?void 0:i.products)==null?void 0:$.list)==null?void 0:Y.map(K=>({item_id:K==null?void 0:K.id,ad_product_click_beacon:K==null?void 0:K.adClickBeacon})))||[];V.some(K=>K.ad_product_click_beacon)&&this.sendToFirebase("ad_products_click",{event:"ad_products_click",ecommerce:{..._,items:V}});break}}}addUtmParameters(e,r){const i=new URL(document.location.href).searchParams,o=r===h.PAGE_VIEW_OLD||r===h.CAMPAIGN_DETAILS,_=i.get("utm_source")==="lidlplus"&&i.get("utm_medium")==="app",d=i.get("srsltid");if(o&&!_)for(const g of it){const m=i.get(g);m&&(e[g]=m),d&&(e.utm_source="google",e.utm_medium="organic")}}
1getConsentGroups(e){const r=/C000[1-4]:\d+/g,a=e==null?void 0:e.match(r);return a?a.map(i=>i.replace(":","=")).join(","):void 0}getConsentId(e){const r=e?new URLSearchParams(e):void 0;return r==null?void 0:r.get("consentId")}handleEvent(e){var Y,V;const{event:r,ecommerce:a,lidldata:i}=e,o=sessionStorage.getItem("hadSalesChannel")?1:0,_=N(sr)==="true"?1:0,d=N(or)==="true"?1:0,g=`sc:${o}_mf:${d}_mcf:${_}`,m=document.title,k=["ad_banner_load","ad_banner_view","ad_banner_click","ad_products_load","ad_products_view","ad_products_click"].includes(r),b=N("OptanonConsent"),P=!!b,O=typeof window.OneTrust<"u",D=P?this.getConsentGroups(b):void 0,F=(Y=i==null?void 0:i.application)==null?void 0:Y.currency,G=this.getConsentId(b),W=[h.CHECKOUT_SUMMARY,h.PROCEED_TO_PAYMENT,h.PAGE_VIEW_OLD,h.PURCHASE_BRIDGE_AOV,h.CAMPAIGN_DETAILS,h.CART_PRODUCT_RATING_CLICK,h.CART_NEWSLETTER_OPTIN_CLICK];if(k)return JSON.stringify(e);(W.includes(r)&&(a!=null&&a.items)||((V=a==null?void 0:a.items)==null?void 0:V.length)===0)&&delete a.items;let $={...a,web_view:g,page_title:m,currency:F,is_otsdk_available:O,is_otcookie_available:P,consent_group:D,consent_id:G};if(this.addUtmParameters($,r),a!=null&&a.basketValueAOV&&($.basket_value_aov=a==null?void 0:a.basketValueAOV,delete $.basketValueAOV),i!=null&&i.extraParams){const{filterParams:U,...K}=i.extraParams;K.page_parameter&&(K.page_parameter=K.page_parameter.slice(0,100)),$={...$,...K,...U}}return JSON.stringify($)}}function tr(t=void 0){return function(e){const r=e.name;return Object.getOwnPropertyNames(e.prototype).forEach(o=>{if(o!=="constructor"&&typeof e.prototype[o]=="function"){const _=e.prototype[o];e.prototype[o]=function(...d){try{const g=_.apply(this,d);return g&&typeof g.then=="function"?g.catch(m=>(console.log(`[DataLayerService] Error in ${r}.${o}: `,m),t)):g}catch(g){return console.log(`[DataLayerService] Error in ${r}.${o}: `,g),t}}}}),Object.getOwnPropertyNames(e).forEach(o=>{if(o!=="name"&&o!=="length"&&o!=="prototype"&&typeof e[o]=="function"){const _=e[o];e[o]=function(...d){try{const g=_.apply(this,d);return g&&typeof g.then=="function"?g.catch(m=>(console.log(`[DataLayerService] Error in ${r}.${o}: `,m),t)):g}catch(g){return console.log(`[DataLayerService] Error in ${r}.${o}: `,g),t}}}}),e}}const oe=[];for(let t=0;t<256;++t)oe.push((t+256).toString(16).slice(1));function Yr(t,e=0){return(oe[t[e+0]]+oe[t[e+1]]+oe[t[e+2]]+oe[t[e+3]]+"-"+oe[t[e+4]]+oe[t[e+5]]+"-"+oe[t[e+6]]+oe[t[e+7]]+"-"+oe[t[e+8]]+oe[t[e+9]]+"-"+oe[t[e+10]]+oe[t[e+11]]+oe[t[e+12]]+oe[t[e+13]]+oe[t[e+14]]+oe[t[e+15]]).toLowerCase()}let Ut;const zr=new Uint8Array(16);function Jr(){if(!Ut){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ut=crypto.getRandomValues.bind(crypto)}return Ut(zr)}const rr={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ot(t,e,r){var i;if(rr.randomUUID&&!e&&!t)return rr.randomUUID();t=t||{};const a=t.random??((i=t.rng)==null?void 0:i.call(t))??Jr();if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,e){if(r=r||0,r<0||r+16>e.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)e[r+o]=a[o];return e}return Yr(a)}const Qr="/t/gtm/gtm.js?id=GTM-K7PD6VZ&l=dataLayerNext",jr="/t/m/?l=dataLayerNext",Xr=(t=(e=>(e=globalThis==null?void 0:globalThis.location)==null?void 0:e.hostname)()??"")=>di.some(r=>t===r||t.endsWith(`.${r}`)),ir=(t,e=!0)=>{const r=document.createElement("script");return r.src=t,r.async=e,r},Zr=async()=>{const t=A.getCookieValue("LidlID");try{const e=JSON.stringify({message:"GTM Failed to load",hostname:window.location.hostname,userAgent:navigator.userAgent,lidlID:t,gtm:typeof window.google_tag_manager<"u",ga4:!!(window!=null&&window.gtag)||performance.getEntriesByType("resource").some(a=>a.name.includes("gtag/js")),brave:!!(navigator!=null&&navigator.brave),dnt:(navigator==null?void 0:navigator.doNotTrack)==="1",gpc:(navigator==null?void 0:navigator.globalPrivacyControl)===!0}),r=new Blob([e],{type:"application/json"});navigator.sendBeacon("/t/p/gtm-load-failure",r)}catch{w("[DataLayerService] Failed to report GTM load failure")}},Nr=(t,e)=>new Promise(r=>{const{statistics:a}=t;let i=document.createElement("script");
1if(a&&!nr()){w("[DataLayerService] Loading GTM scripts..."),i=ir(Xr()?jr:Qr);let o=!1;const _=setTimeout(()=>{o||(o=!0,w("[DataLayerService] GTM load timed out..."),globalThis.gtm_load_failed="true",r(!1))},2e3);i.onload=()=>{o||(o=!0,clearTimeout(_),globalThis.gtm_load_failed="false",r(!0))},i.onerror=()=>{o||(o=!0,clearTimeout(_),globalThis.gtm_load_failed="true",e&&(w("[DataLayerService] GTM failed to load"),Zr()),r(!1))},document.head.appendChild(i),globalThis.dataLayerNext=globalThis.dataLayerNext||[],globalThis.dataLayerNext.push({"gtm.start":Date.now(),event:"gtm.js"}),w("[DataLayerService] GTM scripts loaded successfully");return}w("[DataLayerService] GTM scripts not loaded due to consent or already loaded"),globalThis.gtm_load_failed="false",r(!1)});function ei(){return Ot()}const ti=()=>{const t="/t/cdn/tracking-components/web-push-sdk";fetch(`${t}/manifest.json`).then(e=>e.json()).then(e=>{const r=ir(`${t}/${e["src/main.js"].file}`);document.body.appendChild(r)}).catch(e=>{w(["[DataLayerService] Error loading web-push SDK:",e])})},Mt=Bt;function ie(t,e){const r=Object.keys(e);let a;try{a=Object.keys(t)||[]}catch{a=[]}const i=a.filter(o=>r.indexOf(o)===-1);return i.length!==0&&w(`[DataLayerService] The following fields were ignored: ${i}`,!0),i.length===0}function ri(t,e){const r=[];for(let a=0;a<t.length;a+=e)r.push(t.slice(a,a+e));return r}const Wt=()=>{const t=N(sr)??"",e=N(or)??"";return t==="true"||e==="true"},nr=()=>{var e;const t=(e=globalThis.dataLayer)==null?void 0:e.find(r=>r["gtm.start"]);if(t){if(t&&!t["gtm.uniqueEventId"])return!1}else return!1;return!0},ii=()=>{const t=new URLSearchParams(globalThis.location.search),e={};return it.forEach(r=>{const a=t.get(r);a&&(e[r]=a)}),e},ni=()=>{const t=["gclid","dclid","srsltid"],e=new URLSearchParams(globalThis.location.search),r=ii(),a="; max-age="+24*60*60*30,i=t.some(_=>e.has(_)),o=Object.keys(r).length>0;try{if(i&&((()=>{document.cookie.split(";").forEach(m=>{const y=m.split("=")[0].trim();y.startsWith("ga4_")&&(document.cookie=y+"=; max-age=0; secure; path=/")})})(),!o))return;const d=document.referrer,g=d&&!d.includes("lidl")&&!o&&!i;if(!o&&!i&&!g)return;if(g){const y=new URL(d).hostname.replace("www.","")||"referral";it.forEach(k=>{const b="ga4_"+k;k==="utm_source"?document.cookie=b+"="+encodeURIComponent(y)+a+"; secure; path=/":k==="utm_medium"?document.cookie=b+"=referral"+a+"; secure; path=/":document.cookie=b+"=; max-age=0; secure; path=/"});return}it.forEach(m=>{const y="ga4_"+m;if(r[m]){const k=encodeURIComponent(r[m]);document.cookie=y+"="+k+a+"; secure; path=/"}else document.cookie=y+"=; max-age=0; secure; path=/"})}catch(_){console.log("utm_e",_)}},ar=[h.FIRST_VISIT,h.SESSION_START,h.VIDEO_START,h.VIDEO_PROGRESS,h.VIDEO_COMPLETE,h.GENERAL_SCROLL_ACTION,h.LINK_CLICK],ai=[h.WT_VISIT,h.RETAIL_STARTPAGE_VISIT,h.VIEW_STORE_ARTICLE,h.PAGE_VIEW],si=[h.ADD_TO_CART,h.REMOVE_FROM_CART,h.VIEW_CART,h.BEGIN_CHECKOUT,h.ADD_SHIPPING_INFO,h.ADD_PAYMENT_INFO,h.PURCHASE,h.CHECKOUT_SUMMARY,h.PROCEED_TO_PAYMENT,h.CONTINUE_SHOPPING,h.CHECKOUT_LOGIN_INFO,h.ADD_DELIVERY_OPTIONS,h.CART_CHECKBOX_CLICK,h.REFUND,h.PURCHASE_BRIDGE_AOV,h.CART_PRODUCT_RATING_CLICK,h.CART_NEWSLETTER_OPTIN_CLICK,h.REVIEW_PRODUCT_CLICK];function $t(t){var a,i;const e=t.event;return t.event===rt.NOT_SUPPORTED?null:[...ar,...ai].includes(e)?"AUTOMATIC":si.includes(e)?e===h.VIEW_CART&&!((a=t.ecommerce)==null?void 0:a.cartId)?null:"ECOMMERCE":Array.isArray((i=t.ecommerce)==null?void 0:i.items)&&t.ecommerce.items.length>0?"ITEM_ENGAGEMENT":"BASIC"}const oi=new Set(["www.lidl.sk","www.lidl.cz","www.lidl.be","www.lidl.de","www.lidl.pl","www.lidl.nl","www.lidl.es","www.lidl.dk","www.lidl.hu","www.lidl.at","www.lidl.com.mt","www.lidl.it","www.lidl.se","www.lidl.fr","www.lidl.ch","www.lidl.rs","www.lidl.fi","www.lidl-hellas.gr","www.lidl.com.cy","www.lidl.lu","www.lidl.si","www.lidl.co.uk","www.lidl.ro","www.lidl.lt","www.lidl.bg","www.lidl.ee","www.lidl.hr","www.lidl.ie","www.lidl.lv","www.lidl-ni.co.uk","www.lidl.pt","www-new.lidl.es","www.lidl.com","www-new.lidl.com","localhost","test.lidl.sk","test.lidl.cz","test.lidl.be","test.lidl.de","test.lidl.pl","test.lidl.nl","test.lidl.es","test.lidl.dk","test.lidl.hu","test.lidl.at","test.lidl.com.mt","test.lidl.it","test.lidl.se","test.lidl.fr","test.lidl.ch","test.lidl.rs","test.lidl.fi","test.lidl-hellas.gr","test.lidl.ro","test.lidl.com.cy","test.lidl.lu","test.lidl.si","test.lidl.co.uk","test.lidl.lt","test.lidl.bg","test.lidl.ee","test.lidl.hr","test.lidl.ie","test.lidl.lv","test.lidl-ni.co.uk","test.lidl.pt","test-old.lidl.es","test.lidl.com","qa.lidl.sk","qa.lidl.cz","qa.lidl.be","qa.lidl.de","qa.lidl.pl","qa.lidl.nl","qa.lidl.es","qa.lidl.dk","qa.lidl.hu","qa.lidl.at","qa.lidl.com.mt","qa.lidl.it","qa.lidl.se","qa.lidl.fr","qa.lidl.ch","qa.lidl.rs","qa.lidl.fi","qa.lidl-hellas.gr","qa.lidl.ro","qa.lidl.com.cy","qa.lidl.lu","qa.lidl.si","qa.lidl.co.uk","qa.lidl.lt","qa.lidl.bg","qa.lidl.ee","qa.lidl.hr","qa.lidl.ie","qa.lidl.lv","qa.lidl-ni.co.uk","qa.lidl.pt","qa-old.lidl.es","q.www.lidl.com","qa.lidl.com"]),ui=["www.lidl.de","www.lidl.sk","www.lidl.pl","www.lidl.be","www.lidl.fr","www.lidl.nl","www.lidl.cz"],_i=["lidl.pl","lidl.sk","lidl.be","lidl.de","lidl.fr","lidl.nl","lidl.cz","lidl.es","lidl.dk","lidl.hu","lidl.at","lidl.com.mt","lidl.it","lidl.se","lidl.ch","lidl.rs","lidl.fi","lidl-hellas.gr","lidl.com.cy","lidl.lu","lidl.si","lidl.co.uk","lidl.ro","lidl.lt","lidl.bg","lidl.ee","lidl.hr","lidl.ie","lidl.lv","lidl-ni.co.uk","lidl.pt","lidl.com"],di=["lidl.sk","lidl.pl","lidl.cz"],sr="mobile_checkout_flow",or=Zt;function pi(t,e){let r;return function(...i){const o=()=>{clearTimeout(r),t(...i)};clearTimeout(r),r=setTimeout(o,e)}}const Gt=/[\u0000-\u001F\u007F-\u009F]/g;function We(t){if(t==null)return t;if(typeof t=="string")return t.replace(Gt," ").trim();if(Array.isArray(t)){for(let e=0;e<t.length;e++)typeof t[e]=="string"?t[e]=t[e].replace(Gt," ").trim():typeof t[e]=="object"&&t[e]!==null&&We(t[e]);return t}for(const e in t)t[e]===null||t[e]===void 0?delete t[e]:typeof t[e]=="string"?t[e]=t[e].replace(Gt," ").trim():typeof t[e]=="object"&&We(t[e]);return t}function ur(){var g;const t=navigator.userAgent,r=((g=[{test:m=>/Android.*Mobile/i.test(m),name:"Mobile Android"},{test:m=>/Android/i.test(m),name:"Tablet Android"},{test:m=>/iPad/i.test(m),name:"iPad"},{test:m=>/iPhone|iPod/i.test(m),name:"iPhone"},{test:m=>/Windows Phone/i.test(m),name:"Windows Phone"},{test:m=>/Windows/i.test(m),name:"Windows"},{test:m=>/Macintosh/i.test(m),name:"Mac OS"},{test:m=>/Linux|X11/i.test(m),name:"Linux"}].find(m=>m.test(t)))==null?void 0:g.name)||"Unknown",a=[{test:()=>navigator.brave!==void 0&&typeof navigator.brave.isBrave=="function",name:"Brave",getVersion:()=>{const m=t.match(/Chrome\/(\d+(\.\d+)*)/i);return m?m[1]:"Unknown"}},{test:()=>globalThis.safari!==void 0&&!("chrome"in globalThis),name:"Safari",getVersion:()=>{const m=t.match(/Version\/(\d+(\.\d+)*)/i);return m?m[1]:"Unknown"}}],i=[{pattern:/Edg(e|A|iOS)/i,name:"Edge",versionRegex:/Edg(e|A|iOS)\/(\d+(\.\d+)*)/i,versionIndex:2},{pattern:/OPR\/|Opera/i,name:"Opera",versionRegex:/(OPR|Opera)\/(\d+(\.\d+)*)/i,versionIndex:2},{pattern:/Firefox/i,name:"Firefox",versionRegex:/Firefox\/(\d+(\.\d+)*)/i,versionIndex:1},{pattern:/MSIE|Trident/i,name:"Internet Explorer",versionRegex:/(?:MSIE |rv:)(\d+(\.\d+)*)/i,versionIndex:1},{pattern:/SamsungBrowser/i,name:"Samsung Internet",versionRegex:/SamsungBrowser\/(\d+(\.\d+)*)/i,versionIndex:1},{pattern:/UCBrowser/i,name:"UC Browser",versionRegex:/UCBrowser\/(\d+(\.\d+)*)/i,versionIndex:1},{pattern:/YaBrowser/i,name:"Yandex Browser",versionRegex:/YaBrowser\/(\d+(\.\d+)*)/i,versionIndex:1},{pattern:/Vivaldi/i,name:"Vivaldi",versionRegex:/Vivaldi\/(\d+(\.\d+)*)/i,versionIndex:1},{pattern:/Chrome/i,name:"Chrome",versionRegex:/Chrome\/(\d+(\.\d+)*)/i,versionIndex:1},{pattern:/Chromium/i,name:"Chromium",versionRegex:/Chromium\/(\d+(\.\d+)*)/i,versionIndex:1},{pattern:/Safari/i,name:"Safari",versionRegex:/Version\/(\d+(\.\d+)*)/i,versionIndex:1}];for(const m of a)try{if(m.test())return{device:r,browser:m.name,browserVersion:m.getVersion()}}
1catch(y){w([`Browser detection error for ${m.name}:`,y])}const o=i.find(m=>m.pattern.test(t)),_=(o==null?void 0:o.name)||"Unknown";let d="Unknown";if(o){const m=t.match(o.versionRegex);d=m?m[o.versionIndex]:"Unknown"}return{device:r,browser:_,browserVersion:d}}const At={statistics:"C0003",preferences:"C0002",marketing:"C0004",necessary:"C0001"};class Ce{static parseOneTrustCookie(){const e="OptanonConsent";try{const r=N(e);return r?decodeURIComponent(r).split("&").reduce((i,o)=>{const[_,d]=o.split("=");return i[_]=d,i},{}):null}catch{return null}}static getOneTrustConsentCookie(){const e=this.parseOneTrustCookie();if(!e)return null;const{groups:r}=e;return r?{marketing:r.includes(`${At.marketing}:1`),statistics:r.includes(`${At.statistics}:1`),preferences:r.includes(`${At.preferences}:1`),necessary:r.includes(`${At.necessary}:1`)}:null}static extractOneTrustConsentData(){const e=this.parseOneTrustCookie();if(!e)return null;const{groups:r,consentId:a}=e;return!r||!a?null:{consentId:a,groups:r}}static getLidlConsentCookie(){var r;const e=N("LidlConsent")||N("lidl-consent");if(!e)return null;try{const a=(r=e.split("&").find(i=>i.startsWith("groups=")))==null?void 0:r.split("=")[1];return a?{marketing:a.includes("C0004:1"),statistics:a.includes("C0003:1"),preferences:a.includes("C0002:1"),necessary:!0}:null}catch{return null}}static setLidlIDCookie(e){document.cookie=`LidlID=${e}; max-age=31560000; path=/; secure; sameSite=strict`}static async synchronizeLidlId(){const e=A.getCookieValue("LidlID"),r=A.getItem("puuidv");if(e&&!r)A.setItem("puuidv",e);else if(!e&&r)this.setLidlIDCookie(r),await this.getNecessaryUUID4CookieIfNotPresent(r);else if(!e&&!r){const a=Ot();this.setLidlIDCookie(a),A.setItem("puuidv",a),await this.getNecessaryUUID4CookieIfNotPresent(a)}}static getTrackingInfoObject(){const e=A.getCookieValue("tracking-info");if(e)try{const r=window.atob(e);return JSON.parse(r)}catch(r){console.error("Error parsing tracking-info cookie:",r)}}static initializeConsentListener(){this.getConsentCookie()&&this.notifyConsentListeners();const r=()=>{window.OneTrust.OnConsentChanged(()=>{this.notifyConsentListeners()})};if(typeof window.OneTrust<"u"&&window.OneTrust.OnConsentChanged)r();else{const a=setInterval(()=>{typeof window.OneTrust<"u"&&window.OneTrust.OnConsentChanged&&(clearInterval(a),r())},1e3);setTimeout(()=>{clearInterval(a),typeof window.OneTrust>"u"&&console.warn("OneTrust not loaded after timeout. Consent changes may not be tracked.")},3e4)}}static getConsentCookie(){const e=this.getLidlConsentCookie();return e||this.getOneTrustConsentCookie()||{marketing:!1,statistics:!1,preferences:!1}}static onConsentChanged(e){this.consentListeners.push(e),e(this.getConsentCookie())}static notifyConsentListeners(){const e=this.getConsentCookie();this.consentListeners.forEach(r=>r(e))}static async getNecessaryUUID4CookieIfNotPresent(e){let r=e?`/t/p/uuid4-cookie?puuidv=${encodeURIComponent(e)}`:"/t/p/uuid4-cookie";await fetch(r)}}Ce.consentListeners=[],Ce.initializeConsentListener();function hi(t,e){var r,a;return(r=e==null?void 0:e.application)!=null&&r.applicationID?(a=e==null?void 0:e.application)==null?void 0:a.applicationID:"shop"}function gi(t,e){var i,o;if((i=e==null?void 0:e.application)!=null&&i.moduleID)return(o=e==null?void 0:e.application)==null?void 0:o.moduleID;const a=[{value:"page",regex:/^.+_pageload.*$/ig},{value:"recommendation",regex:/^.+_recommendation.*$/ig},{value:"rating",regex:/^.+_rating.*$/ig},{value:"click",regex:/^.+_click.*$/ig},{value:"enterviewport",regex:/^.+_enterviewport.*$/ig},{value:void 0,regex:/^.*$/ig}].find(_=>_.regex.test(t));return a==null?void 0:a.value}function fi(t,e){var o,_,d,g;if((o=e==null?void 0:e.application)!=null&&o.region)return(_=e==null?void 0:e.application)==null?void 0:_.region;const r=(g=(d=globalThis.mindShiftNav)==null?void 0:d.country)==null?void 0:g.toLowerCase();if(!r)return;const i=[{name:"Northern Europe",isoCodes:["dk","ee","fo","fi","ax","is","ie","lv","lt","no","se","gb"]},{name:"Eastern Europe",isoCodes:["bg","by","cz","hu","md","pl","ro","ru","sk","ua"]},{name:"Western Europe",isoCodes:["at","be","fr","de","li","lu","mc","nl","ch"]},{name:"Southern Europe",isoCodes:["al","ad","ba","hr","gl","gr","it","mt","me","pt","sm","rs","sl","es","nk"]},{name:"North America",isoCodes:["ca","us","mx"]}].find(m=>m.isoCodes.indexOf(r)>-1);return i==null?void 0:i.name}function mi(t,e){var o,_,d,g;if((o=e==null?void 0:e.application)!=null&&o.managementUnit)return(_=e==null?void 0:e.application)==null?void 0:_.managementUnit;const r=(g=(d=globalThis.mindShiftNav)==null?void 0:d.country)==null?void 0:g.toLowerCase();if(!r)return;const i=[{name:"DACH",isoCodes:["de","at","ch"]},{name:"Benelux",isoCodes:["be","nl","lu"]},{name:"Visegrad Group",isoCodes:["pl","ch","hu","sk"]},{name:"America",isoCodes:["us","ca","mx"]}].find(m=>m.isoCodes.indexOf(r)>-1);return i==null?void 0:i.name}function ci(t,e){var r,a,i;return(r=e==null?void 0:e.application)!=null&&r.country?(a=e==null?void 0:e.application)==null?void 0:a.country:(i=globalThis.mindShiftNav)==null?void 0:i.country}function Ci(t,e){var r,a,i;return(r=e==null?void 0:e.application)!=null&&r.language?(a=e==null?void 0:e.application)==null?void 0:a.language:(i=globalThis.mindShiftNav)==null?void 0:i.language}function yi(t,e){var i,o,_,d;if((i=e==null?void 0:e.application)!=null&&i.currency)return(o=e==null?void 0:e.application)==null?void 0:o.currency;const r=(d=(_=globalThis.mindShiftNav)==null?void 0:_.country)==null?void 0:d.toLowerCase();return r?{cz:"CZK",pl:"PLN",us:"USD"}[r]||"EUR":void 0}function Pi(t,e){var i,o,_,d,g,m;if((i=e==null?void 0:e.application)!=null&&i.locale)return(o=e==null?void 0:e.application)==null?void 0:o.locale;let r="";
1const a=(_=globalThis.mindShiftNav)==null?void 0:_.locale;if(!a){const y=new URL(globalThis.location.href),k=y.hostname,b=k.includes("lidl-ni");let P=((d=k==null?void 0:k.split("."))==null?void 0:d.pop())||"",O=((m=(g=y.pathname)==null?void 0:g.split("/"))==null?void 0:m[2])||"";switch(b?P="xi":P==="uk"&&(P="gb"),O==="ee"&&(O="et"),P){case"com":r="en-US";break;default:(O==null?void 0:O.length)===2?r=`${O}-${P.toUpperCase()}`:r=`${P}-${P.toUpperCase()}`}}return a||r}function Ii(t,e){var r,a,i;return(r=e==null?void 0:e.application)!=null&&r.applicationEnvironment?(a=e==null?void 0:e.application)==null?void 0:a.applicationEnvironment:(i=globalThis.mindShiftNav)==null?void 0:i.env}function v(t,e){var a,i,o,_,d,g,m;const r={applicationID:hi(t,e),moduleID:gi(t,e),region:fi(t,e),managementUnit:mi(t,e),country:ci(t,e),language:Ci(t,e),currency:yi(t,e),locale:Pi(t,e),applicationVersion:(a=e==null?void 0:e.application)==null?void 0:a.applicationVersion,applicationEnvironment:Ii(t,e),client_id:(i=e==null?void 0:e.application)==null?void 0:i.client_id,country_code:(o=e==null?void 0:e.application)==null?void 0:o.country_code,redirect_url:(_=e==null?void 0:e.application)==null?void 0:_.redirect_url,step:(d=e==null?void 0:e.application)==null?void 0:d.step,origin:(g=e==null?void 0:e.application)==null?void 0:g.origin,productTeam:((m=e==null?void 0:e.application)==null?void 0:m.productTeam)||"PTRACK"};return ie(e.application,r),r}function Si(t,e){var a,i,o;if(typeof((a=e==null?void 0:e.click)==null?void 0:a.linkName)=="string")return e.click.linkName;const r=(i=e==null?void 0:e.click)==null?void 0:i.linkName;return(o=r==null?void 0:r.innerText)==null?void 0:o.trim()}function wi(t,e){var a,i;if(typeof((a=e==null?void 0:e.click)==null?void 0:a.linkType)=="string")return e.click.linkType;const r=(i=e==null?void 0:e.click)==null?void 0:i.linkType;if(r){const o=typeof r.getAttribute=="function"&&(r==null?void 0:r.getAttribute("href"))||void 0;return o?/^(#|\/)/.test(o)||o.indexOf(window.location.hostname)>-1?"internal":"external":void 0}}function ki(t,e){var a,i;if(typeof((a=e==null?void 0:e.click)==null?void 0:a.linkURL)=="string")return e.click.linkURL;const r=(i=e==null?void 0:e.click)==null?void 0:i.linkURL;return r&&typeof r.getAttribute=="function"&&r.getAttribute("href")||void 0}function M(t,e){const r={linkName:Si(t,e),linkType:wi(t,e),linkURL:ki(t,e)};return ie(e.click,r),r}function vi(t,e){var a,i,o;if(typeof((a=e==null?void 0:e.content)==null?void 0:a.contentID)=="string")return(i=e==null?void 0:e.content)==null?void 0:i.contentID;const r=(o=e==null?void 0:e.content)==null?void 0:o.contentID;if(r)return r.id?r.id:r.className?r.className:r&&typeof r.getAttribute=="function"&&((r==null?void 0:r.getAttribute("data-qa-label"))||(r==null?void 0:r.getAttribute("data-ga-label")))||void 0}function Ei(t,e){var a,i,o,_;if(typeof((a=e==null?void 0:e.content)==null?void 0:a.contentType)=="string")return(i=e==null?void 0:e.content)==null?void 0:i.contentType;const r=(o=e==null?void 0:e.content)==null?void 0:o.contentType;return(_=r==null?void 0:r.tagName)==null?void 0:_.toLowerCase()}function R(t,e){var a,i,o,_,d;const r={contentID:vi(t,e),contentLabel:(a=e==null?void 0:e.content)==null?void 0:a.contentLabel,contentType:Ei(t,e),contentSlot:(i=e==null?void 0:e.content)==null?void 0:i.contentSlot,contentComponentSource:(o=e==null?void 0:e.content)==null?void 0:o.contentComponentSource,personalisationAbTest:(_=e==null?void 0:e.content)==null?void 0:_.personalisationAbTest,personalisationAbTestGroup:(d=e==null?void 0:e.content)==null?void 0:d.personalisationAbTestGroup};return ie(e.content,r),r}function li(t){var r;let e=(r=t==null?void 0:t.ecommerce)==null?void 0:r.cartId;return e||(e=A.getCookieValue("CART_ID")||void 0),e}function ee(t,e){var m,y,k,b,P,O,D,F,G,W,$,Y,V,U,K,ne,ae,se;let{basketValueNet:r,basketValueGross:a,basketValueTax:i,basketValueAOV:o}=(e==null?void 0:e.ecommerce)??{};r=r?Number.parseFloat(r==null?void 0:r.toFixed(2)):0,a=a?Number.parseFloat(a==null?void 0:a.toFixed(2)):0,i=i?Number.parseFloat(i==null?void 0:i.toFixed(2)):0,o=o?Number.parseFloat(o==null?void 0:o.toFixed(2)):0;const _=(m=e==null?void 0:e.ecommerce)==null?void 0:m.additionalServices,d=typeof _=="object"&&_!==null?void 0:_,g={basketValueNet:r,basketValueGross:a,basketValueTax:i,basketValueAOV:o,voucherName:(y=e==null?void 0:e.ecommerce)==null?void 0:y.voucherName,voucherCode:(k=e==null?void 0:e.ecommerce)==null?void 0:k.voucherCode,voucherValue:(b=e==null?void 0:e.ecommerce)==null?void 0:b.voucherValue,shippingCost:(P=e==null?void 0:e.ecommerce)==null?void 0:P.shippingCost,paymentMethod:(O=e==null?void 0:e.ecommerce)==null?void 0:O.paymentMethod,paymentMethodsAvailable:(D=e==null?void 0:e.ecommerce)==null?void 0:D.paymentMethodsAvailable,adressType:(F=e==null?void 0:e.ecommerce)==null?void 0:F.adressType,additionalServices:d,transactionID:(G=e==null?void 0:e.ecommerce)==null?void 0:G.transactionID,purchase:(W=e==null?void 0:e.ecommerce)==null?void 0:W.purchase,cartId:li(e),additionalShippingCost:($=e==null?void 0:e.ecommerce)==null?void 0:$.additionalShippingCost,cancellationReason:(Y=e==null?void 0:e.ecommerce)==null?void 0:Y.cancellationReason,paymentFees:(V=e==null?void 0:e.ecommerce)==null?void 0:V.paymentFees,deliveryOptionsSelected:(U=e==null?void 0:e.ecommerce)==null?void 0:U.deliveryOptionsSelected,deliveryOptionsAvailable:(K=e==null?void 0:e.ecommerce)==null?void 0:K.deliveryOptionsAvailable,additionalServiceCost:(ne=e==null?void 0:e.ecommerce)==null?void 0:ne.additionalServiceCost,zoneSurcharge:(ae=e==null?void 0:e.ecommerce)==null?void 0:ae.zoneSurcharge,additionalServiceType:(se=e==null?void 0:e.ecommerce)==null?void 0:se.additionalServiceType};return ie(e.ecommerce,g),g}function Ti(t,e){var r;return((r=e==null?void 0:e.eventInfo)==null?void 0:r.eventAction)||t}function Li(t,e){var i,o;if((i=e==null?void 0:e.eventInfo)!=null&&i.eventCategory)return(o=e==null?void 0:e.eventInfo)==null?void 0:o.eventCategory;const a=[{value:"pageload",regex:/^.+_pageload.*$/ig},{value:"load",regex:/^.+_load.*$/ig},{value:"click",regex:/^.+_click.*$/ig},{value:"enterviewport",regex:/^.+_enterviewport.*$/ig},{value:void 0,regex:/^.*$/ig}].find(_=>_.regex.test(t));return a==null?void 0:a.value}function bi(t,e){var i,o;if((i=e==null?void 0:e.eventInfo)!=null&&i.eventInteractionType)return(o=e==null?void 0:e.eventInfo)==null?void 0:o.eventInteractionType;const a=[{value:"detection",regex:/^.+_detection.*$/ig},{value:"load",regex:/^.+_pageload.*$/ig},{value:"load",regex:/^.+_load.*$/ig},{value:"click",regex:/^.+_click.*$/ig},{value:"load",regex:/^.+_enterviewport.*$/ig},{value:void 0,regex:/^.*$/ig}].find(_=>_.regex.test(t));return a==null?void 0:a.value}function E(t,e){var a;const r={eventAction:Ti(t,e),eventCategory:Li(t,e),eventInteractionType:bi(t,e),errorMessage:(a=e==null?void 0:e.eventInfo)==null?void 0:a.errorMessage};return ie(e.eventInfo,r),r}function Ri(t,e){var a,i;if(typeof((a=e==null?void 0:e.file)==null?void 0:a.fileName)=="str
1ing")return e.file.fileName;const r=(i=e==null?void 0:e.file)==null?void 0:i.fileName;return r&&typeof r.getAttribute=="function"&&((r==null?void 0:r.getAttribute("alt"))||(r==null?void 0:r.getAttribute("data-qa-label"))||(r==null?void 0:r.getAttribute("data-ga-label")))}function Oi(t,e){var a,i;if(typeof((a=e==null?void 0:e.file)==null?void 0:a.fileURL)=="string")return e.file.fileURL;const r=(i=e==null?void 0:e.file)==null?void 0:i.fileURL;return r&&typeof r.getAttribute=="function"&&((r==null?void 0:r.getAttribute("src"))||(r==null?void 0:r.getAttribute("href")))}function Kt(t,e){const r={fileName:Ri(t,e),fileURL:Oi(t,e)};return ie(e.file,r),r}function Ai(t,e){var r;if((r=e==null?void 0:e.filter)!=null&&r.filterlist)return e.filter.filterlist}function xi(t,e){var r;if((r=e==null?void 0:e.filter)!=null&&r.filtersUsed)return e.filter.filtersUsed}function Di(t){var r;const e=(r=t==null?void 0:t.filter)!=null&&r.filterlist?t.filter.filterlist:[];if(e&&e.length>0)return e.map(a=>a.name).join(",")}function Fi(t){var r;return((r=t==null?void 0:t.filter)!=null&&r.filterlist?t.filter.filterlist:[]).filter(a=>a.quickFilter==="true").map(a=>a.name).join(", ")}function ye(t,e){var a;const r={filterlist:Ai(t,e),filtersUsed:xi(t,e),filterCombinations:Di(e),numberOfResults:(a=e==null?void 0:e.filter)!=null&&a.filterlist?e.filter.filterlist[0].numberOfResults:void 0,quick_filter_name:Fi(e)};return ie(e.filter,r),r}function Vi(t,e){var r;return(r=e==null?void 0:e.page)!=null&&r.pageURL?e.page.pageURL:globalThis.location.href.toString()}function Bi(t,e){var o;if((o=e==null?void 0:e.page)!=null&&o.pageParameter)return e.page.pageParameter;const a=new URL(globalThis.location.href).searchParams.toString(),i=globalThis.location.hash||"";return a||i?`?${a}${i}`:void 0}function Ui(t,e){var r;return(r=e==null?void 0:e.page)!=null&&r.pageTitle?e.page.pageTitle:document.title}function Mi(t){var a;if((a=t==null?void 0:t.page)!=null&&a.pageCategory)return t.page.pageCategory;const r=[{value:"pdp",regex:/^\/p\/.*$/ig},{value:"search",regex:/^\/q\/search$/ig},{value:"category",regex:/^\/h\/.*$/ig},{value:"homepage",regex:/^\/$/ig},{value:"store",regex:/^\/store/ig},{value:"campaign",regex:/c\/.*\/a\d+/ig},{value:"content",regex:/c\/.*\/s\d+/ig},{value:"flyer",regex:/^\/l\/.*$/ig},{value:"flyer",regex:/\/flyer\/esi-flyer/ig},{value:"storesearch",regex:/^\/f\/.*$/ig},{value:"reco",regex:/^\/r\/.*$/ig},{value:"review",regex:/^\/u\/.*$/ig},{value:"wishlist",regex:/^\/wishlist/ig},{value:"orderhistory",regex:/^\/css\/.*$/ig},{value:"myaccount",regex:/^\/mla\/.*$/ig},{value:"cart",regex:/^\/otc\/cart/ig},{value:"checkout",regex:/^\/otc\/checkout\/.*$/ig},{value:"online_shop",regex:/\/online/ig},{value:"brand",regex:/\/q\/brand\/(.*)$/ig},{value:"brand",regex:/\/q\/query\/(.*)$/ig},{value:"payments",regex:/\/payments\/(.*)$/ig}].find(i=>i.regex.test(globalThis.location.pathname));return(r==null?void 0:r.value)??"other"}function L(t,e){var a,i,o,_,d,g;const r={pageURL:Vi(t,e),pageParameter:Bi(t,e),pageTitle:Ui(t,e),pageCategory:Mi(e),pageCmsID:(a=e==null?void 0:e.page)==null?void 0:a.pageCmsID,pageCmsTitle:(i=e==null?void 0:e.page)==null?void 0:i.pageCmsTitle,pageProperties:{maxCount:(_=(o=e==null?void 0:e.page)==null?void 0:o.pageProperties)==null?void 0:_.maxCount,viewportPages:(g=(d=e==null?void 0:e.page)==null?void 0:d.pageProperties)==null?void 0:g.viewportPages}};return ie(e.page,r),r}function he(t,e){var a,i,o;const r={stepName:(a=e==null?void 0:e.process)==null?void 0:a.stepName,stepNumber:((i=e==null?void 0:e.process)==null?void 0:i.stepNumber)===8?1:(o=e==null?void 0:e.process)==null?void 0:o.stepNumber};return ie(e.process,r),r}function Wi(t,e){var d,g;const r=(d=e==null?void 0:e.products)==null?void 0:d.list;if(!r)return;const a=((g=e==null?void 0:e.eventInfo)==null?void 0:g.eventAction)!=="General_Promotion_Click"&&t==="General_Product_Click"||t==="General_Product_View",o=["/","/online"].includes(globalThis.location.pathname),_=a&&!o;return r.map(m=>{if(!m||typeof m!="object")return m;let y=m;const k=y.promotionName!=="Shop_the_Look";if(Array.isArray(m.benefitLabel)&&(y={...m,benefitLabel:$i(m.benefitLabel)}),_&&k){const{creativeName:b,creativeSlot:P,sectionName:O,sectionID:D,promotionId:F,promotionName:G,...W}=y;return W}return y})}function $i(t){return t!=null&&t.length?t.join(", "):void 0}function x(t,e){const r={list:Wi(t,e)};return ie(e.products,r),r}function Gi(t,e){var a;let r=(a=e==null?void 0:e.promotions)==null?void 0:a.list;if(r){const i=t==="General_Promotion_Shown"||t==="General_Promotion_Qualified";r=r.map(o=>({...o,creativeName:(o==null?void 0:o.creativeName)||(o==null?void 0:o.creativeMasterName),creativeSlot:o.creativeSlot||"slot0",aiVoucherName:i?o.promotionName:void 0,aiVoucherId:i?o.promotionId:void 0}))}return r}function Te(t,e){const r={list:Gi(t,e)};return ie(e.promotions,r),r}function Ki(t,e){var i,o,_;return(i=e==null?void 0:e.search)!=null&&i.searchTerm?(o=e==null?void 0:e.search)==null?void 0:o.searchTerm:((_=new URLSearchParams(globalThis.location.search).get("q"))==null?void 0:_.trim())||""}function Ve(t,e){var a,i,o,_,d,g,m,y,k;const r={searchTerm:Ki(t,e),searchTermSuggested:(a=e==null?void 0:e.search)==null?void 0:a.searchTermSuggested,searchTermSuggestedCategory:(i=e==null?void 0:e.search)==null?void 0:i.searchTermSuggestedCategory,searchTermMasterQuery:(o=e==null?void 0:e.search)==null?void 0:o.searchTermMasterQuery,searchTermSuggestedLastSearched:(_=e==null?void 0:e.search)==null?void 0:_.searchTermSuggestedLastSearched,searchAdvisorCampaignName:(d=e==null?void 0:e.search)==null?void 0:d.searchAdvisorCampaignName,searchAdvisorCampaignClick:(g=e==null?void 0:e.search)==null?void 0:g.searchAdvisorCampaignClick,searchAdvisorQuery:(m=e==null?void 0:e.search)==null?void 0:m.searchAdvisorQuery,searchTermBrand:(y=e==null?void 0:e.search)==null?void 0:y.searchTermBrand,searchURL:(k=e==null?void 0:e.search)==null?void 0:k.searchURL};return ie(e.search,r),r}function Hi(t,e){var _,d;if(typeof((_=e==null?void 0:e.social)==null?void 0:_.networkName)=="str
vendor: 4,541 bytes, lines 1-6
1ing")return e.social.networkName;const r=(d=e==null?void 0:e.social)==null?void 0:d.networkName,a=[{value:"facebook",regex:/^.*facebook.*$/ig},{value:"twitter",regex:/^.*twitter.*$/ig},{value:"whatsapp",regex:/^.*whatsapp.*$/ig},{value:"mail",regex:/^.*mailto.*$/ig}],i=r&&typeof r.getAttribute=="function"&&(r==null?void 0:r.getAttribute("href"))||"",o=a.find(g=>g.regex.test(i));return o==null?void 0:o.value}function qi(t,e){var _,d;if(typeof((_=e==null?void 0:e.social)==null?void 0:_.socialInteractionType)=="string")return e.social.socialInteractionType;const r=(d=e==null?void 0:e.social)==null?void 0:d.socialInteractionType,a=[{value:"like",regex:/^.*facebook.*$/ig},{value:"tweet",regex:/^.*twitter.*$/ig},{value:"message",regex:/^.*whatsapp.*$/ig},{value:"mail",regex:/^.*mailto.*$/ig}],i=r&&typeof r.getAttribute=="function"&&(r==null?void 0:r.getAttribute("href"))||"",o=a.find(g=>g.regex.test(i));return o==null?void 0:o.value}function Yi(t,e){const r={networkName:Hi(t,e),socialInteractionType:qi(t,e)};return ie(e.social,r),r}var _r={},xt={};xt.byteLength=Qi,xt.toByteArray=Xi,xt.fromByteArray=en;for(var Le=[],Pe=[],zi=typeof Uint8Array<"u"?Uint8Array:Array,Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",et=0,Ji=Ht.length;et<Ji;++et)Le[et]=Ht[et],Pe[Ht.charCodeAt(et)]=et;Pe["-".charCodeAt(0)]=62,Pe["_".charCodeAt(0)]=63;function dr(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var a=r===e?0:4-r%4;return[r,a]}function Qi(t){var e=dr(t),r=e[0],a=e[1];return(r+a)*3/4-a}function ji(t,e,r){return(e+r)*3/4-r}function Xi(t){var e,r=dr(t),a=r[0],i=r[1],o=new zi(ji(t,a,i)),_=0,d=i>0?a-4:a,g;for(g=0;g<d;g+=4)e=Pe[t.charCodeAt(g)]<<18|Pe[t.charCodeAt(g+1)]<<12|Pe[t.charCodeAt(g+2)]<<6|Pe[t.charCodeAt(g+3)],o[_++]=e>>16&255,o[_++]=e>>8&255,o[_++]=e&255;return i===2&&(e=Pe[t.charCodeAt(g)]<<2|Pe[t.charCodeAt(g+1)]>>4,o[_++]=e&255),i===1&&(e=Pe[t.charCodeAt(g)]<<10|Pe[t.charCodeAt(g+1)]<<4|Pe[t.charCodeAt(g+2)]>>2,o[_++]=e>>8&255,o[_++]=e&255),o}function Zi(t){return Le[t>>18&63]+Le[t>>12&63]+Le[t>>6&63]+Le[t&63]}function Ni(t,e,r){for(var a,i=[],o=e;o<r;o+=3)a=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(Zi(a));return i.join("")}function en(t){for(var e,r=t.length,a=r%3,i=[],o=16383,_=0,d=r-a;_<d;_+=o)i.push(Ni(t,_,_+o>d?d:_+o));return a===1?(e=t[r-1],i.push(Le[e>>2]+Le[e<<4&63]+"==")):a===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Le[e>>10]+Le[e>>4&63]+Le[e<<2&63]+"=")),i.join("")}var qt={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */qt.read=function(t,e,r,a,i){var o,_,d=i*8-a-1,g=(1<<d)-1,m=g>>1,y=-7,k=r?i-1:0,b=r?-1:1,P=t[e+k];for(k+=b,o=P&(1<<-y)-1,P>>=-y,y+=d;y>0;o=o*256+t[e+k],k+=b,y-=8);for(_=o&(1<<-y)-1,o>>=-y,y+=a;y>0;_=_*256+t[e+k],k+=b,y-=8);if(o===0)o=1-m;else{if(o===g)return _?NaN:(P?-1:1)*(1/0);_=_+Math.pow(2,a),o=o-m}return(P?-1:1)*_*Math.pow(2,o-a)},qt.write=function(t,e,r,a,i,o){var _,d,g,m=o*8-i-1,y=(1<<m)-1,k=y>>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=a?0:o-1,O=a?1:-1,D=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(d=isNaN(e)?1:0,_=y):(_=Math.floor(Math.log(e)/Math.LN2),e*(g=Math.pow(2,-_))<1&&(_--,g*=2),_+k>=1?e+=b/g:e+=b*Math.pow(2,1-k),e*g>=2&&(_++,g/=2),_+k>=y?(d=0,_=y):_+k>=1?(d=(e*g-1)*Math.pow(2,i),_=_+k):(d=e*Math.pow(2,k-1)*Math.pow(2,i),_=0));i>=8;t[r+P]=d&255,P+=O,d/=256,i-=8);for(_=_<<i|d,m+=i;m>0;t[r+P]=_&255,P+=O,_/=256,m-=8);t[r+P-O]|=D*128};/*!
2 * The buffer module from node.js, for the browser.
3 *
4 * @author   Feross Aboukhadijeh <https://feross.org>
5 * @license  MIT
6 */(function(t){const e=xt,r=qt,a=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=d,t.SlowBuffer=W,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i,d.TYPED_ARRAY_SUPPORT=o(),!d.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function o(){try{const u=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(u,n),u.foo()===42}catch{return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function _(u){if(u>
6i)throw new RangeError('The value "'+u+'" is invalid for option "size"');const n=new Uint8Array(u);return Object.setPrototypeOf(n,d.prototype),n}function d(u,n,s){if(typeof u=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return k(u)}return g(u,n,s)}d.poolSize=8192;function g(u,n,s){if(typeof u=="string")return b(u,n);if(ArrayBuffer.isView(u))return O(u);if(u==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u);if(S(u,ArrayBuffer)||u&&S(u.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(S(u,SharedArrayBuffer)||u&&S(u.buffer,SharedArrayBuffer)))return D(u,n,s);if(typeof u=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const p=u.valueOf&&u.valueOf();if(p!=null&&p!==u)return d.from(p,n,s);const c=F(u);if(c)return c;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof u[Symbol.toPrimitive]=="function")return d.from(u[Symbol.toPrimitive]("string"),n,s);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof u)}d.from=function(u,n,s){return g(u,n,s)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function m(u){if(typeof u!="number")throw new TypeError('"size" argument must be of type number');if(u<0)throw new RangeError('The value "'+u+'" is invalid for option "size"')}function y(u,n,s){return m(u),u<=0?_(u):n!==void 0?typeof s=="string"?_(u).fill(n,s):_(u).fill(n):_(u)}d.alloc=function(u,n,s){return y(u,n,s)};function k(u){return m(u),_(u<0?0:G(u)|0)}d.allocUnsafe=function(u){return k(u)},d.allocUnsafeSlow=function(u){return k(u)};function b(u,n){if((typeof n!="string"||n==="")&&(n="utf8"),!d.isEncoding(n))throw new TypeError("Unknown encoding: "+n);const s=$(u,n)|0;let p=_(s);const c=p.write(u,n);return c!==s&&(p=p.slice(0,c)),p}function P(u){const n=u.length<0?0:G(u.length)|0,s=_(n);for(let p=0;p<n;p+=1)s[p]=u[p]&255;return s}function O(u){if(S(u,Uint8Array)){const n=new Uint8Array(u);return D(n.buffer,n.byteOffset,n.byteLength)}return P(u)}function D(u,n,s){if(n<0||u.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<n+(s||0))throw new RangeError('"length" is outside of buffer bounds');let p;return n===void 0&&s===void 0?p=new Uint8Array(u):s===void 0?p=new Uint8Array(u,n):p=new Uint8Array(u,n,s),Object.setPrototypeOf(p,d.prototype),p}function F(u){if(d.isBuffer(u)){const n=G(u.length)|0,s=_(n);return s.length===0||u.copy(s,0,0,n),s}if(u.length!==void 0)return typeof u.length!="number"||Me(u.length)?_(0):P(u);if(u.type==="Buffer"&&Array.isArray(u.data))return P(u.data)}function G(u){if(u>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return u|0}function W(u){return+u!=u&&(u=0),d.alloc(+u)}d.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==d.prototype},d.compare=function(n,s){if(S(n,Uint8Array)&&(n=d.from(n,n.offset,n.byteLength)),S(s,Uint8Array)&&(s=d.from(s,s.offset,s.byteLength)),!d.isBuffer(n)||!d.isBuffer(s))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===s)return 0;let p=n.length,c=s.length;for(let C=0,I=Math.min(p,c);C<I;++C)if(n[C]!==s[C]){p=n[C],c=s[C];break}return p<c?-1:c<p?1:0},d.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.concat=function(n,s){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return d.alloc(0);let p;if(s===void 0)for(s=0,p=0;p<n.length;++p)s+=n[p].length;const c=d.allocUnsafe(s);let C=0;for(p=0;p<n.length;++p){let I=n[p];if(S(I,Uint8Array))C+I.length>c.length?(d.isBuffer(I)||(I=d.from(I)),I.copy(c,C)):Uint8Array.prototype.set.call(c,I,C);else if(d.isBuffer(I))I.copy(c,C);else throw new TypeError('"list" argument must be an Array of Buffers');C+=I.length}return c};function $(u,n){if(d.isBuffer(u))return u.length;if(ArrayBuffer.isView(u)||S(u,ArrayBuffer))return u.byteLength;if(typeof u!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof u);const s=u.length,p=arguments.length>2&&arguments[2]===!0;if(!p&&s===0)return 0;let c=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return s;case"utf8":case"utf-8":return Ue(u).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s*2;case"hex":return s>>>1;case"base64":return Ke(u).length;default:if(c)return p?-1:Ue(u).length;n=(""+n).toLowerCase(),c=!0}}d.byteLength=$;function Y(u,n,s){let p=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((s===void 0||s>this.length)&&(s=this.length),s<=0)||(s>>>=0,n>>>=0,s<=n))return"";for(u||(u="utf8");;)switch(u){case"hex":return Ae(this,n,s);case"utf8":case"utf-8":return X(this,n,s);case"ascii":return Re(this,n,s);case"latin1":case"binary":return Oe(this,n,s);case"base64":return j(this,n,s);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xe(this,n,s);default:if(p)throw new TypeError("Unknown encoding: "+u);u=(u+"").toLowerCase(),p=!0}}d.prototype._isBuffer=!0;function V(u,n,s){const p=u[n];u[n]=u[s],u[s]=p}d.prototype.swap16=function(){const n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let s=0;s<n;s+=2)V(this,s,s+1);return this},d.prototype.swap32=function(){const n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let s=0;s<n;s+=4)V(this,s,s+3),V(this,s+1,s+2);return this},d.prototype.swap64=function(){const n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let s=0;s<n;s+=8)V(this,s,s+7),V(this,s+1,s+6),V(this,s+2,s+5),V(this,s+3,s+4);return this},d.prototype.toString=function(){const n=this.length;return n===0?"":arguments.length===0?X(this,0,n):Y.apply(this,arguments)}
6,d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(n){if(!d.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:d.compare(this,n)===0},d.prototype.inspect=function(){let n="";const s=t.INSPECT_MAX_BYTES;return n=this.toString("hex",0,s).replace(/(.{2})/g,"$1 ").trim(),this.length>s&&(n+=" ... "),"<Buffer "+n+">"},a&&(d.prototype[a]=d.prototype.inspect),d.prototype.compare=function(n,s,p,c,C){if(S(n,Uint8Array)&&(n=d.from(n,n.offset,n.byteLength)),!d.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(s===void 0&&(s=0),p===void 0&&(p=n?n.length:0),c===void 0&&(c=0),C===void 0&&(C=this.length),s<0||p>n.length||c<0||C>this.length)throw new RangeError("out of range index");if(c>=C&&s>=p)return 0;if(c>=C)return-1;if(s>=p)return 1;if(s>>>=0,p>>>=0,c>>>=0,C>>>=0,this===n)return 0;let I=C-c,B=p-s;const z=Math.min(I,B),q=this.slice(c,C),J=n.slice(s,p);for(let H=0;H<z;++H)if(q[H]!==J[H]){I=q[H],B=J[H];break}return I<B?-1:B<I?1:0};function U(u,n,s,p,c){if(u.length===0)return-1;if(typeof s=="string"?(p=s,s=0):s>2147483647?s=2147483647:s<-2147483648&&(s=-2147483648),s=+s,Me(s)&&(s=c?0:u.length-1),s<0&&(s=u.length+s),s>=u.length){if(c)return-1;s=u.length-1}else if(s<0)if(c)s=0;else return-1;if(typeof n=="string"&&(n=d.from(n,p)),d.isBuffer(n))return n.length===0?-1:K(u,n,s,p,c);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?c?Uint8Array.prototype.indexOf.call(u,n,s):Uint8Array.prototype.lastIndexOf.call(u,n,s):K(u,[n],s,p,c);throw new TypeError("val must be string, number or Buffer")}function K(u,n,s,p,c){let C=1,I=u.length,B=n.length;if(p!==void 0&&(p=String(p).toLowerCase(),p==="ucs2"||p==="ucs-2"||p==="utf16le"||p==="utf-16le")){if(u.length<2||n.length<2)return-1;C=2,I/=2,B/=2,s/=2}function z(J,H){return C===1?J[H]:J.readUInt16BE(H*C)}let q;if(c){let J=-1;for(q=s;q<I;q++)if(z(u,q)===z(n,J===-1?0:q-J)){if(J===-1&&(J=q),q-J+1===B)return J*C}else J!==-1&&(q-=q-J),J=-1}else for(s+B>I&&(s=I-B),q=s;q>=0;q--){let J=!0;for(let H=0;H<B;H++)if(z(u,q+H)!==z(n,H)){J=!1;break}if(J)return q}return-1}d.prototype.includes=function(n,s,p){return this.indexOf(n,s,p)!==-1},d.prototype.indexOf=function(n,s,p){return U(this,n,s,p,!0)},d.prototype.lastIndexOf=function(n,s,p){return U(this,n,s,p,!1)};function ne(u,n,s,p){s=Number(s)||0;const c=u.length-s;p?(p=Number(p),p>c&&(p=c)):p=c;const C=n.length;p>C/2&&(p=C/2);let I;for(I=0;I<p;++I){const B=parseInt(n.substr(I*2,2),16);if(Me(B))return I;u[s+I]=B}return I}function ae(u,n,s,p){return Fe(Ue(n,u.length-s),u,s,p)}function se(u,n,s,p){return Fe(Qe(n),u,s,p)}function _e(u,n,s,p){return Fe(Ke(n),u,s,p)}function ue(u,n,s,p){return Fe(je(n,u.length-s),u,s,p)}d.prototype.write=function(n,s,p,c){if(s===void 0)c="utf8",p=this.length,s=0;else if(p===void 0&&typeof s=="string")c=s,p=this.length,s=0;else if(isFinite(s))s=s>>>0,isFinite(p)?(p=p>>>0,c===void 0&&(c="utf8")):(c=p,p=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const C=this.length-s;if((p===void 0||p>C)&&(p=C),n.length>0&&(p<0||s<0)||s>this.length)throw new RangeError("Attempt to write outside buffer bounds");c||(c="utf8");let I=!1;for(;;)switch(c){case"hex":return ne(this,n,s,p);case"utf8":case"utf-8":return ae(this,n,s,p);case"ascii":case"latin1":case"binary":return se(this,n,s,p);case"base64":return _e(this,n,s,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue(this,n,s,p);default:if(I)throw new TypeError("Unknown encoding: "+c);c=(""+c).toLowerCase(),I=!0}
6},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function j(u,n,s){return n===0&&s===u.length?e.fromByteArray(u):e.fromByteArray(u.slice(n,s))}function X(u,n,s){s=Math.min(u.length,s);const p=[];let c=n;for(;c<s;){const C=u[c];let I=null,B=C>239?4:C>223?3:C>191?2:1;if(c+B<=s){let z,q,J,H;switch(B){case 1:C<128&&(I=C);break;case 2:z=u[c+1],(z&192)===128&&(H=(C&31)<<6|z&63,H>127&&(I=H));break;case 3:z=u[c+1],q=u[c+2],(z&192)===128&&(q&192)===128&&(H=(C&15)<<12|(z&63)<<6|q&63,H>2047&&(H<55296||H>57343)&&(I=H));break;case 4:z=u[c+1],q=u[c+2],J=u[c+3],(z&192)===128&&(q&192)===128&&(J&192)===128&&(H=(C&15)<<18|(z&63)<<12|(q&63)<<6|J&63,H>65535&&H<1114112&&(I=H))}}I===null?(I=65533,B=1):I>65535&&(I-=65536,p.push(I>>>10&1023|55296),I=56320|I&1023),p.push(I),c+=B}return de(p)}const ge=4096;function de(u){const n=u.length;if(n<=ge)return String.fromCharCode.apply(String,u);let s="",p=0;for(;p<n;)s+=String.fromCharCode.apply(String,u.slice(p,p+=ge));return s}function Re(u,n,s){let p="";s=Math.min(u.length,s);for(let c=n;c<s;++c)p+=String.fromCharCode(u[c]&127);return p}function Oe(u,n,s){let p="";s=Math.min(u.length,s);for(let c=n;c<s;++c)p+=String.fromCharCode(u[c]);return p}function Ae(u,n,s){const p=u.length;(!n||n<0)&&(n=0),(!s||s<0||s>p)&&(s=p);let c="";for(let C=n;C<s;++C)c+=Xe[u[C]];return c}function xe(u,n,s){const p=u.slice(n,s);let c="";for(let C=0;C<p.length-1;C+=2)c+=String.fromCharCode(p[C]+p[C+1]*256);return c}d.prototype.slice=function(n,s){const p=this.length;n=~~n,s=s===void 0?p:~~s,n<0?(n+=p,n<0&&(n=0)):n>p&&(n=p),s<0?(s+=p,s<0&&(s=0)):s>p&&(s=p),s<n&&(s=n);const c=this.subarray(n,s);return Object.setPrototypeOf(c,d.prototype),c};function Q(u,n,s){if(u%1!==0||u<0)throw new RangeError("offset is not uint");if(u+n>s)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(n,s,p){n=n>>>0,s=s>>>0,p||Q(n,s,this.length);let c=this[n],C=1,I=0;for(;++I<s&&(C*=256);)c+=this[n+I]*C;return c},d.prototype.readUintBE=d.prototype.readUIntBE=function(n,s,p){n=n>>>0,s=s>>>0,p||Q(n,s,this.length);let c=this[n+--s],C=1;for(;s>0&&(C*=256);)c+=this[n+--s]*C;return c},d.prototype.readUint8=d.prototype.readUInt8=function(n,s){return n=n>>>0,s||Q(n,1,this.length),this[n]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(n,s){return n=n>>>0,s||Q(n,2,this.length),this[n]|this[n+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(n,s){return n=n>>>0,s||Q(n,2,this.length),this[n]<<8|this[n+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(n,s){return n=n>>>0,s||Q(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(n,s){return n=n>>>0,s||Q(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},d.prototype.readBigUInt64LE=me(function(n){n=n>>>0,Ie(n,"offset");const s=this[n],p=this[n+7];(s===void 0||p===void 0)&&le(n,this.length-8);const c=s+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24,C=this[++n]+this[++n]*2**8+this[++n]*2**16+p*2**24;return BigInt(c)+(BigInt(C)<<BigInt(32))}),d.prototype.readBigUInt64BE=me(function(n){n=n>>>0,Ie(n,"offset");const s=this[n],p=this[n+7];(s===void 0||p===void 0)&&le(n,this.length-8);const c=s*2**24+this[++n]*2**16+this[++n]*2**8+this[++n],C=this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+p;return(BigInt(c)<<BigInt(32))+BigInt(C)}),d.prototype.readIntLE=function(n,s,p){n=n>>>0,s=s>>>0,p||Q(n,s,this.length);let c=this[n],C=1,I=0;for(;++I<s&&(C*=256);)c+=this[n+I]*C;return C*=128,c>=C&&(c-=Math.pow(2,8*s)),c},d.prototype.readIntBE=function(n,s,p){n=n>>>0,s=s>>>0,p||Q(n,s,this.length);let c=s,C=1,I=this[n+--c];for(;c>0&&(C*=256);)I+=this[n+--c]*C;return C*=128,I>=C&&(I-=Math.pow(2,8*s)),I},d.prototype.readInt8=function(n,s){return n=n>>>0,s||Q(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},d.prototype.readInt16LE=function(n,s){n=n>>>0,s||Q(n,2,this.length);const p=this[n]|this[n+1]<<8;return p&32768?p|4294901760:p},d.prototype.readInt16BE=function(n,s){n=n>>>0,s||Q(n,2,this.length);const p=this[n+1]|this[n]<<8;return p&32768?p|4294901760:p},d.prototype.readInt32LE=function(n,s){return n=n>>>0,s||Q(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},d.prototype.readInt32BE=function(n,s){return n=n>>>0,s||Q(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},d.prototype.readBigInt64LE=me(function(n){n=n>>>0,Ie(n,"offset");const s=this[n],p=this[n+7];(s===void 0||p===void 0)&&le(n,this.length-8);const c=this[n+4]+this[n+5]*2**8+this[n+6]*2**16+(p<<24);return(BigInt(c)<<BigInt(32))+BigInt(s+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24)}),d.prototype.readBigInt64BE=me(function(n){n=n>>>0,Ie(n,"offset");const s=this[n],p=this[n+7];(s===void 0||p===void 0)&&le(n,this.length-8);const c=(s<<24)+this[++n]*2**16+this[++n]*2**8+this[++n];return(BigInt(c)<<BigInt(32))+BigInt(this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+p)}),d.prototype.readFloatLE=function(n,s){return n=n>>>0,s||Q(n,4,this.length),r.read(this,n,!0,23,4)},d.prototype.readFloatBE=function(n,s){return n=n>>>0,s||Q(n,4,this.length),r.read(this,n,!1,23,4)},d.prototype.readDoubleLE=function(n,s){return n=n>>>0,s||Q(n,8,this.length),r.read(this,n,!0,52,8)},d.prototype.readDoubleBE=function(n,s){return n=n>>>0,s||Q(n,8,this.length),r.read(this,n,!1,52,8)};
vendor: 4,686 bytes, line 6
6function Z(u,n,s,p,c,C){if(!d.isBuffer(u))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>c||n<C)throw new RangeError('"value" argument is out of bounds');if(s+p>u.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(n,s,p,c){if(n=+n,s=s>>>0,p=p>>>0,!c){const B=Math.pow(2,8*p)-1;Z(this,n,s,p,B,0)}let C=1,I=0;for(this[s]=n&255;++I<p&&(C*=256);)this[s+I]=n/C&255;return s+p},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(n,s,p,c){if(n=+n,s=s>>>0,p=p>>>0,!c){const B=Math.pow(2,8*p)-1;Z(this,n,s,p,B,0)}let C=p-1,I=1;for(this[s+C]=n&255;--C>=0&&(I*=256);)this[s+C]=n/I&255;return s+p},d.prototype.writeUint8=d.prototype.writeUInt8=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,1,255,0),this[s]=n&255,s+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,2,65535,0),this[s]=n&255,this[s+1]=n>>>8,s+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,2,65535,0),this[s]=n>>>8,this[s+1]=n&255,s+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,4,4294967295,0),this[s+3]=n>>>24,this[s+2]=n>>>16,this[s+1]=n>>>8,this[s]=n&255,s+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,4,4294967295,0),this[s]=n>>>24,this[s+1]=n>>>16,this[s+2]=n>>>8,this[s+3]=n&255,s+4};function Se(u,n,s,p,c){Ge(n,p,c,u,s,7);let C=Number(n&BigInt(4294967295));u[s++]=C,C=C>>8,u[s++]=C,C=C>>8,u[s++]=C,C=C>>8,u[s++]=C;let I=Number(n>>BigInt(32)&BigInt(4294967295));return u[s++]=I,I=I>>8,u[s++]=I,I=I>>8,u[s++]=I,I=I>>8,u[s++]=I,s}function we(u,n,s,p,c){Ge(n,p,c,u,s,7);let C=Number(n&BigInt(4294967295));u[s+7]=C,C=C>>8,u[s+6]=C,C=C>>8,u[s+5]=C,C=C>>8,u[s+4]=C;let I=Number(n>>BigInt(32)&BigInt(4294967295));return u[s+3]=I,I=I>>8,u[s+2]=I,I=I>>8,u[s+1]=I,I=I>>8,u[s]=I,s+8}d.prototype.writeBigUInt64LE=me(function(n,s=0){return Se(this,n,s,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=me(function(n,s=0){return we(this,n,s,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(n,s,p,c){if(n=+n,s=s>>>0,!c){const z=Math.pow(2,8*p-1);Z(this,n,s,p,z-1,-z)}let C=0,I=1,B=0;for(this[s]=n&255;++C<p&&(I*=256);)n<0&&B===0&&this[s+C-1]!==0&&(B=1),this[s+C]=(n/I>>0)-B&255;return s+p},d.prototype.writeIntBE=function(n,s,p,c){if(n=+n,s=s>>>0,!c){const z=Math.pow(2,8*p-1);Z(this,n,s,p,z-1,-z)}let C=p-1,I=1,B=0;for(this[s+C]=n&255;--C>=0&&(I*=256);)n<0&&B===0&&this[s+C+1]!==0&&(B=1),this[s+C]=(n/I>>0)-B&255;return s+p},d.prototype.writeInt8=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,1,127,-128),n<0&&(n=255+n+1),this[s]=n&255,s+1},d.prototype.writeInt16LE=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,2,32767,-32768),this[s]=n&255,this[s+1]=n>>>8,s+2},d.prototype.writeInt16BE=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,2,32767,-32768),this[s]=n>>>8,this[s+1]=n&255,s+2},d.prototype.writeInt32LE=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,4,2147483647,-2147483648),this[s]=n&255,this[s+1]=n>>>8,this[s+2]=n>>>16,this[s+3]=n>>>24,s+4},d.prototype.writeInt32BE=function(n,s,p){return n=+n,s=s>>>0,p||Z(this,n,s,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[s]=n>>>24,this[s+1]=n>>>16,this[s+2]=n>>>8,this[s+3]=n&255,s+4},d.prototype.writeBigInt64LE=me(function(n,s=0){return Se(this,n,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=me(function(n,s=0){return we(this,n,s,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ke(u,n,s,p,c,C){if(s+p>u.length)throw new RangeError("Index out of range");if(s<0)throw new RangeError("Index out of range")}function ve(u,n,s,p,c){return n=+n,s=s>>>0,c||ke(u,n,s,4),r.write(u,n,s,p,23,4),s+4}d.prototype.writeFloatLE=function(n,s,p){return ve(this,n,s,!0,p)},d.prototype.writeFloatBE=function(n,s,p){return ve(this,n,s,!1,p)};function Ee(u,n,s,p,c){return n=+n,s=s>>>0,c||ke(u,n,s,8),r.write(u,n,s,p,52,8),s+8}d.prototype.writeDoubleLE=function(n,s,p){return Ee(this,n,s,!0,p)},d.prototype.writeDoubleBE=function(n,s,p){return Ee(this,n,s,!1,p)},d.prototype.copy=function(n,s,p,c){if(!d.isBuffer(n))throw new TypeError("argument should be a Buffer");if(p||(p=0),!c&&c!==0&&(c=this.length),s>=n.length&&(s=n.length),s||(s=0),c>0&&c<p&&(c=p),c===p||n.length===0||this.length===0)return 0;if(s<0)throw new RangeError("targetStart out of bounds");if(p<0||p>=this.length)throw new RangeError("Index out of range");if(c<0)throw new RangeError("sourceEnd out of bounds");c>this.length&&(c=this.length),n.length-s<c-p&&(c=n.length-s+p);
6const C=c-p;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(s,p,c):Uint8Array.prototype.set.call(n,this.subarray(p,c),s),C},d.prototype.fill=function(n,s,p,c){if(typeof n=="string"){if(typeof s=="string"?(c=s,s=0,p=this.length):typeof p=="string"&&(c=p,p=this.length),c!==void 0&&typeof c!="string")throw new TypeError("encoding must be a string");if(typeof c=="string"&&!d.isEncoding(c))throw new TypeError("Unknown encoding: "+c);if(n.length===1){const I=n.charCodeAt(0);(c==="utf8"&&I<128||c==="latin1")&&(n=I)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(s<0||this.length<s||this.length<p)throw new RangeError("Out of range index");if(p<=s)return this;s=s>>>0,p=p===void 0?this.length:p>>>0,n||(n=0);let C;if(typeof n=="number")for(C=s;C<p;++C)this[C]=n;else{const I=d.isBuffer(n)?n:d.from(n,c),B=I.length;if(B===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(C=0;C<p-s;++C)this[C+s]=I[C%B]}return this};const pe={};function fe(u,n,s){pe[u]=class extends s{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${u}]`,this.stack,delete this.name}get code(){return u}set code(c){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:c,writable:!0})}toString(){return`${this.name} [${u}]: ${this.message}`}}}fe("ERR_BUFFER_OUT_OF_BOUNDS",function(u){return u?`${u} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),fe("ERR_INVALID_ARG_TYPE",function(u,n){return`The "${u}" argument must be of type number. Received type ${typeof n}`},TypeError),fe("ERR_OUT_OF_RANGE",function(u,n,s){let p=`The value of "${u}" is out of range.`,c=s;return Number.isInteger(s)&&Math.abs(s)>2**32?c=De(String(s)):typeof s=="bigint"&&(c=String(s),(s>BigInt(2)**BigInt(32)||s<-(BigInt(2)**BigInt(32)))&&(c=De(c)),c+="n"),p+=` It must be ${n}. Received ${c}`,p},RangeError);function De(u){let n="",s=u.length;const p=u[0]==="-"?1:0;for(;s>=p+4;s-=3)n=`_${u.slice(s-3,s)}${n}`;return`${u.slice(0,s)}${n}`}function Ye(u,n,s){Ie(n,"offset"),(u[n]===void 0||u[n+s]===void 0)&&le(n,u.length-(s+1))}function Ge(u,n,s,p,c,C){if(u>s||u<n){const I=typeof n=="bigint"?"n":"";let B;throw C>3?n===0||n===BigInt(0)?B=`>= 0${I} and < 2${I} ** ${(C+1)*8}${I}`:B=`>= -(2${I} ** ${(C+1)*8-1}${I}) and < 2 ** ${(C+1)*8-1}${I}`:B=`>= ${n}${I} and <= ${s}${I}`,new pe.ERR_OUT_OF_RANGE("value",B,u)}Ye(p,c,C)}function Ie(u,n){if(typeof u!="number")throw new pe.ERR_INVALID_ARG_TYPE(n,"number",u)}function le(u,n,s){throw Math.floor(u)!==u?(Ie(u,s),new pe.ERR_OUT_OF_RANGE(s||"offset","an integer",u)):n<0?new pe.ERR_BUFFER_OUT_OF_BOUNDS:new pe.ERR_OUT_OF_RANGE(s||"offset",`>= ${s?1:0} and <= ${n}`,u)}const ze=/[^+/0-9A-Za-z-_]/g;function Je(u){if(u=u.split("=")[0],u=u.trim().replace(ze,""),u.length<2)return"";for(;u.length%4!==0;)u=u+"=";return u}function Ue(u,n){n=n||1/0;let s;const p=u.length;let c=null;const C=[];for(let I=0;I<p;++I){if(s=u.charCodeAt(I),s>55295&&s<57344){if(!c){if(s>56319){(n-=3)>-1&&C.push(239,191,189);continue}else if(I+1===p){(n-=3)>-1&&C.push(239,191,189);continue}c=s;continue}if(s<56320){(n-=3)>-1&&C.push(239,191,189),c=s;continue}s=(c-55296<<10|s-56320)+65536}else c&&(n-=3)>-1&&C.push(239,191,189);if(c=null,s<128){if((n-=1)<0)break;C.push(s)}else if(s<2048){if((n-=2)<0)break;C.push(s>>6|192,s&63|128)}else if(s<65536){if((n-=3)<0)break;C.push(s>>12|224,s>>6&63|128,s&63|128)}else if(s<1114112){if((n-=4)<0)break;C.push(s>>18|240,s>>12&63|128,s>>6&63|128,s&63|128)}else throw new Error("Invalid code point")}return C}function Qe(u){const n=[];for(let s=0;s<u.length;++s)n.push(u.charCodeAt(s)&255);return n}function je(u,n){let s,p,c;const C=[];for(let I=0;I<u.length&&!((n-=2)<0);++I)s=u.charCodeAt(I),p=s>>8,c=s%256,C.push(c),C.push(p);return C}function Ke(u){return e.toByteArray(Je(u))}function Fe(u,n,s,p){let c;for(c=0;c<p&&!(c+s>=n.length||c>=u.length);++c)n[c+s]=u[c];return c}function S(u,n){return u instanceof n||u!=null&&u.constructor!=null&&u.constructor.name!=null&&u.constructor.name===n.name}function Me(u){return u!==u}const Xe=function(){const u="0123456789abcdef",n=new Array(256);for(let s=0;s<16;++s){const p=s*16;for(let c=0;c<16;++c)n[p+c]=u[s]+u[c]}return n}();function me(u){return typeof BigInt>"u"?Ze:u}function Ze(){throw new Error("BigInt not supported")}})(_r);function tn(t,e){var a,i;if((a=e==null?void 0:e.user)!=null&&a.userID)return(i=e==null?void 0:e.user)==null?void 0:i.userID;const r=N("tracking-info")||"{}";try{const o=_r.Buffer.from(r,"base64").toString("utf-8"),_=JSON.parse(o);return _==null?void 0:_.accountId}catch{return}}function rn(t,e){var r,a;return(r=e==null?void 0:e.user)!=null&&r.userType?(a=e==null?void 0:e.user)==null?void 0:a.userType:"unregistered"}function nn(t,e){var r,a;return(r=e==null?void 0:e.user)!=null&&r.browserResolutionHeight?(a=e==null?void 0:e.user)==null?void 0:a.browserResolutionHeight:globalThis.outerHeight}function an(t,e){var r,a;return(r=e==null?void 0:e.user)!=null&&r.browserResolutionWidth?(a=e==null?void 0:e.user)==null?void 0:a.browserResolutionWidth:globalThis.outerWidth}function sn(t,e){var a,i;return(a=e==null?void 0:e.user)!=null&&a.browserResolutionBreakpoint?(i=e==null?void 0:e.user)==null?void 0:i.browserResolutionBreakpoint:[1280,9
660,600,348,0].find(o=>o<globalThis.outerWidth)}function on(t,e){var r,a;return(r=e==null?void 0:e.user)!=null&&r.browserResolutionOrientation?(a=e==null?void 0:e.user)==null?void 0:a.browserResolutionOrientation:globalThis.outerWidth>globalThis.outerHeight?"h":"v"}function un(t,e){var r,a,i,o;return(r=e==null?void 0:e.user)!=null&&r.screenResolution?(a=e==null?void 0:e.user)==null?void 0:a.screenResolution:`${(i=globalThis.screen)==null?void 0:i.width}x${(o=globalThis.screen)==null?void 0:o.height}`}function _n(t,e){var i,o;if((i=e==null?void 0:e.user)!=null&&i.trafficType)return(o=e==null?void 0:e.user)==null?void 0:o.trafficType;const r=N("utm_source")||"",a=document.referrer||"";return r||a?"partner":"external"}function dn(t,e){var r,a;return(r=e==null?void 0:e.user)!=null&&r.trafficWebView?(a=e==null?void 0:e.user)==null?void 0:a.trafficWebView:"web"}function pn(t,e){var i,o;return(i=e==null?void 0:e.user)!=null&&i.salesChannel?(o=e==null?void 0:e.user)==null?void 0:o.salesChannel:new URLSearchParams(globalThis.location.search).get("salesChannel")||"01"}function hn(t,e){var r,a;return(r=e==null?void 0:e.user)!=null&&r.adSessionId?(a=e==null?void 0:e.user)==null?void 0:a.adSessionId:N("adSessionId")||void 0}function gn(t){var e,r;return(e=t==null?void 0:t.user)!=null&&e.userAgent?(r=t==null?void 0:t.user)==null?void 0:r.userAgent:navigator.userAgent}function fn(t){var e,r;return(e=t==null?void 0:t.user)!=null&&e.zone?(r=t==null?void 0:t.user)==null?void 0:r.zone:A.getCookieValue("zn")||"(not set)"}const pr="abandonedCartSession";function mn(t){var d,g,m;const e=((d=t==null?void 0:t.ecommerce)==null?void 0:d.cartId)||A.getCookieValue("CART_ID")||void 0,r=((g=globalThis.mindShiftNav)==null?void 0:g.country)||((m=t.application)==null?void 0:m.country)||globalThis.location.hostname.split(".").at(-1);let a;if(r){const y=r.toUpperCase();switch(y){case"ES":a="PEN";break;case"UK":a="GB";break;case"COM":a="US";break;default:a=y}}const i=N("zn")||a,o=A.getItem(pr),_=o?A.parseJSON(o):null;return _!=null&&_.cartId&&_.cartId===e?_.zone:(A.setItem(pr,JSON.stringify({cartId:e,zone:i})),i)}function cn(t){var e,r;return(e=t==null?void 0:t.user)!=null&&e.lidl_id?(r=t==null?void 0:t.user)==null?void 0:r.lidl_id:A.getCookieValue("LidlID")}function Cn(t,e){var o,_,d,g;if((o=t==null?void 0:t.user)!=null&&o.customerShop)return((_=t==null?void 0:t.user)==null?void 0:_.customerShop)||"not_selected";const r=A.getCookieValue("ar");if(!r)return e;const a=r?decodeURIComponent(r):void 0;return(g=(d=a==null?void 0:a.split(";"))==null?void 0:d.find(m=>{var y;return(y=m==null?void 0:m.trim())==null?void 0:y.startsWith("EntityID=")}))==null?void 0:g.split("=")[1]}function yn(){var o;const e=new URLSearchParams(window.location.search).get("adb_ecid"),r=A.getItem("adb_ecid"),a=e??r;if(!a)return;const i=a.startsWith("ECID_")?a:`ECID_${a}`;return i!==r&&((o=A.setItem)==null||o.call(A,"adb_ecid",i)),i}function Pn(){const t=Ce.getTrackingInfoObject(),e=t==null?void 0:t.ssoBirthDate,r=Number.parseInt(e==null?void 0:e.day)||1,a=Number.parseInt(e==null?void 0:e.month)||1,i=Number.parseInt(e==null?void 0:e.year);if(!i)return;const o=new Date,_=o.getFullYear(),d=o.getMonth()+1,g=o.getDate();let m=_-i;return(d<a||d===a&&g<r)&&m--,m}function l(t,e,r){var o,_,d,g,m,y,k,b,P,O,D,F,G;const a=r.getSessionData(),i={userID:tn(t,e),userGender:(o=e==null?void 0:e.user)==null?void 0:o.userGender,userAge:(_=e==null?void 0:e.user)==null?void 0:_.userAge,userType:rn(t,e),userPostalCode:(d=e==null?void 0:e.user)==null?void 0:d.userPostalCode,userNewsletterStatus:(g=e==null?void 0:e.user)==null?void 0:g.userNewsletterStatus,userCity:(m=e==null?void 0:e.user)==null?void 0:m.userCity,userBirthYear:(y=e==null?void 0:e.user)==null?void 0:y.userBirthYear,browserResolutionHeight:nn(t,e),browserResolutionWidth:an(t,e),browserResolutionBreakpoint:sn(t,e),browserResolutionOrientation:on(t,e),screenResolution:un(t,e),trafficType:_n(t,e),trafficWebView:dn(t,e),salesChannel:pn(t,e),loginMethod:(k=e==null?void 0:e.user)==null?void 0:k.loginMethod,loginSaltValue:(b=e==null?void 0:e.user)==null?void 0:b.loginSaltValue,customerMail:(P=e==null?void 0:e.user)==null?void 0:P.customerMail,customerShop:Cn(e,(G=(F=(D=(O=e==null?void 0:e.products)==null?void 0:O.list)==null?void 0:D[0])==null?void 0:F.storeId)==null?void 0:G.toString()),adSessionId:hn(t,e),userAgent:gn(e),lidl_id:cn(e),session_id:a==null?void 0:a.id,session_number:(a==null?void 0:a.number)+"",zone:fn(e),abandoned_zone:mn(e),adb_ecid:yn(),user_age:Pn(),zone_cookie
6:A.getCookieValue("zn")||"(not set)"};return ie(e.user,i),i}function ce(t,e){var a,i,o,_,d,g,m;const r={hashValue:(a=e==null?void 0:e.auth)==null?void 0:a.hashValue,type:(i=e==null?void 0:e.auth)==null?void 0:i.type,reason:(o=e==null?void 0:e.auth)==null?void 0:o.reason,email:(_=e==null?void 0:e.auth)==null?void 0:_.email,phone:(d=e==null?void 0:e.auth)==null?void 0:d.phone,emailHash:(g=e==null?void 0:e.auth)==null?void 0:g.emailHash,phoneHash:(m=e==null?void 0:e.auth)==null?void 0:m.phoneHash};return ie(e.ecommerce,r),r}const In=["E2E - Monitoring","GPTBot","ChatGPT-User","ClaudeBot","Claude-Web","anthropic-ai","PerplexityBot","CCBot","Bytespider","Amazonbot","meta-externalagent","DiffBot","Omgilibot","AhrefsBot","SemrushBot","MJ12bot","DotBot","DataForSeoBot","BLEXBot","PetalBot","SISTRIX","BrightEdge","HeadlessChrome","PhantomJS","Selenium","Cypress","WebDriver"];function Sn(){return globalThis.navigator.platform}function wn(){return globalThis.location.hostname}function kn(){return new Date(Date.now()).toISOString().split(".")[0]}function vn(){return new Date(Date.now()).toISOString()}function hr(t){var r;const e=(r=t.application)==null?void 0:r.country;if(e)return e;{const a=globalThis.location.origin.split(".").pop();return a==null?void 0:a.toUpperCase()}}function te(t){const e=new URL(globalThis.location.href);return new URLSearchParams(e==null?void 0:e.search).get(t)||void 0}function En(){try{return!!globalThis.Kameleoon}catch{return!1}}function ln(){var e;const t=(e=globalThis.navigator)==null?void 0:e.userAgent;if(t)return In.find(r=>t.includes(r))}function gr(t){const r=N("PPERSO");let a;return r&&r.length>0&&r.split(";").forEach(i=>{i.split("=")[0]===t&&(a=i.split("=")[1])}),a}function Tn(t){var a;const e={},r=((a=t.filter)==null?void 0:a.filterlist)||[];return r.forEach((i,o)=>{var d;e[`filter_${i.name}_type`]=i==null?void 0:i.type,e[`filter_${i.name}_numberOfResults`]=(d=i==null?void 0:i.numberOfResults)==null?void 0:d.toString(),e[`filter_${i.name}_quickFilter`]=i==null?void 0:i.quickFilter,e[`filter_${i.name}_preset`]=i==null?void 0:i.preset,e[`filter_${i.name}_filterPosition`]=i==null?void 0:i.filterPosition,e[`filter_${i.name}_quickFilterPosition`]=i==null?void 0:i.quickFilterPosition;const _=r==null?void 0:r[0];_!=null&&_.sortOrder&&_.sortOrder.length>0&&_.sortOrder.forEach((g,m)=>{g!=null&&g.order&&(e[`filter_sortOrder_${m+1}_order`]=g.order),g!=null&&g.sortby&&(e[`filter_sortOrder_${m+1}_sortby`]=g.sortby)}),i.values&&i.values.length>0?e[`filter_${i.name}_value`]=i.values.join("|"):i.lowerbound&&i.upperbound&&(e[`filter_${i.name}_lowerbound`]=i.lowerbound,e[`filter_${i.name}_upperbound`]=i.upperbound),e[`filter_${i.name}_selectedOrder`]=r.length-o}),e}function Ln(){return globalThis.location.pathname.slice(0,100)}function bn(t){var a;const e=(a=t==null?void 0:t.click)==null?void 0:a.linkURL;let r;return typeof e=="string"&&(r=e.replace("https://www.","").replace("https://","").slice(0,100)),r}function fr(){const t=sessionStorage.getItem("sesevent");return t?Number(t):void 0}function T(t,e,r=!1){var b,P,O,D,F,G,W,$,Y,V,U,K,ne,ae,se,_e,ue,j,X,ge,de,Re,Oe,Ae,xe,Q,Z,Se,we,ke,ve,Ee,pe,fe,De,Ye,Ge,Ie,le,ze,Je,Ue,Qe,je,Ke,Fe,S,Me,Xe,me,Ze,u,n,s,p,c,
6C,I,B,z,q,J,H,at,st,ot,ut,_t,dt,pt,ht,gt,ft,mt,ct,Ct,yt,Pt,It,St,wt,kt,vt,Et,lt,Tt,Lt,bt,Rt,Lr,br,Rr,Or,Ar,xr,Dr,Fr,Vr,Br;const a=Tn(e),i=A.getCookieValue("msAbTestVariationKey"),o=t===f.Kameleoon_Experiment,_="abandonedCartSession",d=A.getCookieValue("checkout_protection"),g=A.getCookieValue("utm_source_protected"),m=A.getCookieValue("utm_source"),y=te("adb_ecid"),k={event_time_ISO:kn(),hostname:wn(),page_location:Ln(),click_link_url:bn(e),device_information:Sn(),event_time_ISO_Z:vn(),perso_ai_tug:A.getCookieValue("tug"),perso_ai_segment:gr("AI_SEGMENT"),perso_test_user_segment:gr("TEST_USER_SEGMENT"),mobile_checkout_flow:A.getCookieValue("mobile_checkout_flow"),checkout_protected:d==="true"?m:void 0,checkout_protected_from:d==="true"?g:void 0,utm_source_checkout:m,error_message:(b=e==null?void 0:e.eventInfo)==null?void 0:b.errorMessage,country:hr(e),manual_cid:te("cid"),lf:te("lf"),flyx:te("flyx"),kameleoon_loaded:En(),is_syn_traffic:ln(),page_scenario:te("scenario"),page_title:document.title,payment_methods_available:(P=e.ecommerce)==null?void 0:P.paymentMethodsAvailable,kameleoon_v:i,percent_scrolled:(O=e.extraParams)==null?void 0:O.percent_scrolled,video_percent:(D=e.extraParams)==null?void 0:D.video_percent,video_title:(F=e.extraParams)==null?void 0:F.video_title,video_duration:(G=e.extraParams)==null?void 0:G.video_duration,video_provider:(W=e.extraParams)==null?void 0:W.video_provider,video_url:($=e.extraParams)==null?void 0:$.video_url,video_current_time:(Y=e.extraParams)==null?void 0:Y.video_current_time,adPlacementLoadBeacon:(V=e.extraParams)==null?void 0:V.adPlacementLoadBeacon,adPlacementViewBeacon:(U=e.extraParams)==null?void 0:U.adPlacementViewBeacon,adPlacementClickBeacon:(K=e.extraParams)==null?void 0:K.adPlacementClickBeacon,adBannerLoadBeacon:(ne=e.extraParams)==null?void 0:ne.adPlacementLoadBeacon,adBannerViewBeacon:(ae=e.extraParams)==null?void 0:ae.adPlacementViewBeacon,adBannerClickBeacon:(se=e.extraParams)==null?void 0:se.adPlacementClickBeacon,country_code:hr(e)||((_e=e.application)==null?void 0:_e.country_code),sesevent:fr(),adb_ecid:y?"ECID_"+y:void 0,flyx_source:te("flyx_source"),flyx_medium:te("flyx_medium"),flyx_campaign:te("flyx_campaign"),flyx_content:te("flyx_content"),dcl_id:te("dcl_id"),sales_channel:te("salesChannel"),connexity:te("connexity"),fbcl_id:te("fbclid"),nlemail_id:te("nlemailid)"),srslt_id:te("srslt_id"),entrances:fr(),mktc:te("mktc"),search_tracking_id:te("searchTrackingId"),search_tracking_pos:te("searchTrackingPos"),utm_campaign_id_cookie:A.getCookieValue("ga4_utm_id"),mktc_cookie:A.getCookieValue("ga4_mktc"),user_ads_id:A.getCookieValue("adSessionId"),kCampaignId:o?(ue=e.kameleoon)==null?void 0:ue.campaignId:void 0,kCampaignName:o?(j=e.kameleoon)==null?void 0:j.campaignName:void 0,kVariationId:o?(X=e.kameleoon)==null?void 0:X.variationId:void 0,kVariationName:o?(ge=e.kameleoon)==null?void 0:ge.variationName:void 0,filter_combinations:(de=e.filter)==null?void 0:de.filterCombinations,filter_params:(Re=e.page)==null?void 0:Re.pageParameter,abandoned_zone:A.getItem(_),"lidl_flyer_(flyx)":te("flyx"),"8select":te("page_scenario"),basket_value_net:r?0:(Oe=e==null?void 0:e.ecommerce)==null?void 0:Oe.basketValueNet,basket_value_gross:r?0:(Ae=e==null?void 0:e.ecommerce)==null?void 0:Ae.basketValueGross,basket_value_tax:r?0:(xe=e==null?void 0:e.ecommerce)==null?void 0:xe.basketValueTax,event_id:(Q=e.eventInfo)==null?void 0:Q.eventId,event_action:(Z=e.eventInfo)==null?void 0:Z.eventAction,event_interaction_type:(Se=e.eventInfo)==null?void 0:Se.eventInteractionType,event_category:(we=e.eventInfo)==null?void 0:we.eventCategory,content_id:(ke=e==null?void 0:e.content)==null?void 0:ke.contentID,content_label:(ve=e==null?void 0:e.content)==null?void 0:ve.contentLabel,content_type:(Ee=e==null?void 0:e.content)==null?void 0:Ee.contentType,content_slot:(pe=e==null?void 0:e.content)==null?void 0:pe.contentSlot,content_component_source:(fe=e==null?void 0:e.content)==null?void 0:fe.contentComponentSource,personalisation_ab_test_name:(De=e==null?void 0:e.content)==null?void 0:De.personalisationAbTest,personalisation_ab_test_group:(Ye=e==null?void 0:e.content)==null?void 0:Ye.personalisationAbTestGroup,click_link_name:(Ge=e==null?void 0:e.click)==null?void 0:Ge.linkName,click_link_type:(Ie=e==null?void 0:e.click)==null?void 0:Ie.linkType,page_parameter:(le=e.page)==null?void 0:le.pageParameter,page_category:(ze=e.page)==null?void 0:ze.pageCategory,pageProperties_maxCount:(Ue=(Je=e.page)==null?void 0:Je.pageProperties)==null?void 0:Ue.maxCount,pageProperties_viewportPages:(je=(Qe=e.page)==null?void 0:Qe.pageProperties)==null?void 0:je.viewportPages,page_cms_id:(Ke=e.page)==null?void 0:Ke.pageCmsID,page_cms_title:(Fe=e.page)==null?void 0:Fe.pageCmsTitle,application_environment:(S=e.application)==null?void 0:S.applicationEnvironment,application_id:(Me=e.application)==null?void 0:Me.applicationID,application_version:(Xe=e.application)==null?void 0:Xe.applicationVersion,currency:(me=e.application)==null?void 0:me.currency,language:(Ze=e.application)==null?void 0:Ze.language,management_unit:(u=e.application)==null?void 0:u.managementUnit,module_id:(n=e.application)==null?void 0:n.moduleID,region:(s=e.application)==null?void 0:s.region,locale:(p=e.application)==null?void 0:p.locale,client_id:(c=e.application)==null?void 0:c.client_id,redirect_url:(C=e.application)==null?void 0:C.redirect_url,lidl_session_id:(I=e.user)==null?void 0:I.session_id,lidl_session_number:(B=e.user)==null?void 0:B.session_number,browser_resolution_width:(z=e.user)==null?void 0:z.browserResolutionWidth,browser_resolution_orientation:(q=e.user)==null?void 0:q.browserResolutionOrientation,browser_resolution_height:(J=e.user)==null?void 0:J.browserResolutionHeight,browser_resolution_breakpoint:(H=e.user)==null?void 0:H.browserResolutionBreakpoint,screen_resolution:(at=e.user)==null?void 0:at.screenResolution,user_type:(st=e.user)==null?void 0:st.userType,LidlID:(ot=e.user)==null?void 0:ot.lidl_id,auth_reason:(ut=e==null?void 0:e.auth)==null?void 0:ut.reason,auth_type:(_t=e==null?void 0:e.auth)==null?void 0:_t.type,auth_hash_value:(dt=e==null?void 0:e.auth)==null?void 0:dt.hashValue,file_name:(pt=e==null?void 0:e.file)==null?void 0:pt.fileName,file_url:(ht=e==null?void 0:e.file)==null?void 0:ht.fileURL,checkout_stepname:(gt=e==null?void 0:e.process)==null?void 0:gt.stepName,checkout_step_number:(ft=e==null?void 0:e.process)==null?void 0:ft.stepNumber,search_url:(mt=e==null?void 0:e.search)==null?void 0:mt.searchURL,search_term_master_query:(ct=e==null?void 0:e.search)==null?void 0:ct.searchTermMasterQuery,search_term:(Ct=e==null?void 0:e.search)==null?void 0:Ct.searchTerm,search_term_suggested:(yt=e==null?void 0:e.search)==null?void 0:yt.searchTermSuggested,search_term_suggested_category:(Pt=e==null?void 0:e.search)==null?void 0:Pt.searchTermSuggestedCategory,search_advisor_campaign_click:(It=e==null?void 0:e.search)==null?void 0:It.searchAdvisorCampaignClick,search_advisor_campaign_name:(St=e==null?void 0:e.search)==null?void 0:St.searchAdvisorCampaignName,search_advisor_query:(wt=e==null?void 0:e.search)==null?void 0:wt.searchAdvisorQuery,social_interaction_type:(kt=e==null?void 0:e.social)==null?void 0:kt.socialInteractionType,social_network_name:(vt=e==null?void 0:e.social)==null?void 0:vt.networkName,user_agent:(Et=e.user)==null?void 0:Et.userAgent,shipping:r?0:(lt=e==null?void 0:e.ecommerce)==null?void 0:lt.shippingCost,delivery_options_selected:(Tt=e==null?void 0:e.ecommerce)==null?void 0:Tt.deliveryOptionsSelected,delivery_options_available:(Lt=e==null?void 0:e.ecommerce)==null?void 0:Lt.deliveryOptionsAvailable,zone_surcharge:r?0:(bt=e==null?void 0:e.ecommerce)==null?void 0:bt.zoneSurcharge,accountID:(Rt=e==null?void 0:e.user)==null?void 0:Rt.userID,ad_session_id:(Lr=e==null?void 0:e.user)==null?void 0:Lr.adSessionId,application_step:(br=e==null?void 0:e.application)==null?void 0:br.step,application_origin:(Rr=e==null?void 0:e.application)==null?void 0:Rr.origin,customer_shop:(Or=e==null?void 0:e.user)==null?void 0:Or.customerShop,product_team:(Ar=e==null?void 0:e.application)==null?void 0:Ar.productTeam,web_event_id:(xr=e==null?void 0:e.eventInfo)==null?void 0:xr.eventId,user_age:(Dr=e==null?void 0:e.user)==null?void 0:Dr.user_age,zone_cookie
6:(Fr=e==null?void 0:e.user)==null?void 0:Fr.zone_cookie,additional_service_type:(Vr=e==null?void 0:e.ecommerce)==null?void 0:Vr.additionalServiceType,filterParams:a,gtm_load_failed:(Br=e==null?void 0:e.extraParams)==null?void 0:Br.gtm_load_failed};return ie(e.ecommerce,k),k}function Rn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),ecommerce:ee(t,e),process:he(t,e),extraParams:T(t,e)}}function mr(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),ecommerce:ee(t,e),process:he(t,e),extraParams:T(t,e)}}function On(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),ecommerce:ee(t,e),process:he(t,e),extraParams:T(t,e)}}function An(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),click:M(t,e),filter:ye(t,e),extraParams:T(t,e),search:Ve(t,e)}}function tt(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),filter:ye(t,e),extraParams:T(t,e)}}function nt(t,e){const r=e==null?void 0:e.promotionItem,a={creativeName:(r==null?void 0:r.creativeName)||(r==null?void 0:r.creativeMasterName),creativeMasterName:r==null?void 0:r.creativeMasterName,creativeSlot:r==null?void 0:r.creativeSlot,type:r==null?void 0:r.type,sectionID:r==null?void 0:r.sectionID,sectionName:r==null?void 0:r.sectionName,linkURL:r==null?void 0:r.linkURL,locationId:r==null?void 0:r.locationId,promotionId:r==null?void 0:r.promotionId,promotionName:r==null?void 0:r.promotionName,products:r==null?void 0:r.products,ad:r==null?void 0:r.ad,creativeType:r==null?void 0:r.creativeType,gridboxType:r==null?void 0:r.gridboxType,lp_discount_perc:r==null?void 0:r.lp_discount_perc,lp_discount_amount:r==null?void 0:r.lp_discount_amount,promotion_free_shipping:r==null?void 0:r.promotion_free_shipping,promotionType:r==null?void 0:r.promotionType,marketingCampaignCode:r==null?void 0:r.marketingCampaignCode};return ie(e.ecommerce,a),a}function Dt(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),promotions:Te(t,e),promotionItem:nt(t,e),ecommerce:ee(t,e),process:he(t,e),click:M(t,e),extraParams:T(t,e)}}function xn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function Dn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function Fn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),search:Ve(t,e),filter:ye(t,e),extraParams:T(t,e)}}function Vn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function Bn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),click:M(t,e),filter:ye(t,e),extraParams:T(t,e)}}function cr(t,e,r){return{eventInfo:E(t,e),application:v(t,e),ecommerce:ee(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Un(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),file:Kt(t,e),products:x(t,e),extraParams:T(t,e)}}function Mn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Wn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function $n(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Gn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Kn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function Hn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function qn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function Yn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),social:Yi(t,e),extraParams:T(t,e)}}function Yt(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),filter:ye(t,e),search:Ve(t,e),extraParams:T(t,e)}}function zn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),filter:ye(t,e),search:Ve(t,e),extraParams:T(t,e)}}function Cr(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),search:Ve(t,e),extraParams:T(t,e)}}function Jn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),promotions:Te(t,e),promotionItem:nt(t,e),extraParams:T(t,e)}}function yr(t,e,r){return{eventInfo:E(t,e),content:R(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),promotions:Te(t,e),promotionItem:nt(t,e),extraParams:T(t,e)}}function Qn(t,e){const r=Te(t,e).list;if(r&&r[0].products&&r[0].products.length>0)return r[0]}function Pr(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),promotions:Te(t,e),promotionItem:Qn(t,e)||nt(t,e),click:M(t,e),search:Ve(t,e),extraParams:T(t,e)}}function jn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function Xn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),ecommerce:ee(t,e),process:he(t,e),extraParams:T(t,e)}}function Zn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),click:M(t,e),filter:ye(t,e),extraParams:T(t,e)}}function Nn(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),click:M(t,e),filter:ye(t,e),extraParams:T(t,e)}}function ea(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),filter:ye(t,e),extraParams:T(t,e)}}function ta(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),filter:ye(t,e),extraParams:T(t,e)}}function ra(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function ia(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),click:M(t,e),extraParams:T(t,e)}}function na(t,e){var r,a,i,o,_,d;return!((r=e.products)!=null&&r.list)&&((a=e.content)!=null&&a.contentLabel)&&(((i=e.content)==null?void 0:i.contentID)==="addToCart"||((o=e.content)==null?void 0:o.contentID)==="whislist_product"||((_=e.content)==null?void 0:_.contentID)==="removeFromWishlist")?{list:[{id:(d=e.content)==null?void 0:d.contentLabel}]}:x(t,e)}function zt(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:na(t,e),ecommerce:ee(t,e),click:M(t,e),process:he(t,e),extraParams:T(t,e)}}function aa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),products:x(t,e),extraParams:T(t,e)}}function sa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),extraParams:T(t,e)}}function oa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),extraParams:T(t,e)}}function ua(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),extraParams:T(t,e)}}function _a(t,e,r){return{eventInfo:E(t,e),application:v(t,e),content:R(t,e),user:l(t,e,r),page:L(t,e),promotionItem:nt(t,e),promotions:Te(t,e),extraParams:T(t,e)}}function da(t,e){var a,i,o,_;const r={campaignName:(a=e==null?void 0:e.kameleoon)==null?void 0:a.campaignName,campaignId:(i=e==null?void 0:e.kameleoon)==null?void 0:i.campaignId,variationName:(o=e==null?void 0:e.kameleoon)==null?void 0:o.variationName,variationId:(_=e==null?void 0:e.kameleoon)==null?void 0:_.variationId};return ie(e.kameleoon,r),r}function pa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),kameleoon:da(t,e),extraParams:T(t,e)}}function ha(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function ga(t,e,r){return{eventInfo:E(t,e),application:v(t,e),page:L(t,e),content:R(t,e),filter:ye(t,e),user:l(t,e,r),extraParams:T(t,e)}}function fa(t,e,r){return{application:v(t,e),eventInfo:E(t,e),products:x(t,e),ecommerce:ee(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e),user:l(t,e,r),page:L(t,e)}}function ma(t,e,r){return{application:v(t,e),eventInfo:E(t,e),products:x(t,e),ecommerce:ee(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e),user:l(t,e,r),page:L(t,e)}}function ca(t,e,r){return{application:v(t,e),eventInfo:E(t,e),products:x(t,e),ecommerce:ee(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e),user:l(t,e,r),page:L(t,e)}}function Ca(t,e,r){return{application:v(t,e),eventInfo:E(t,e),products:x(t,e),ecommerce:ee(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e),user:l(t,e,r),page:L(t,e)}}function ya(t,e,r){return{application:v(t,e),eventInfo:E(t,e),products:x(t,e),ecommerce:ee(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e),user:l(t,e,r),page:L(t,e)}}function Pa(t,e,r){return{application:v(t,e),eventInfo:E(t,e),products:x(t,e),ecommerce:ee(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e),user:l(t,e,r),page:L(t,e)}}function Ia(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e)}}function Sa(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e),page:L(t,e)}}function wa(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e),content:R(t,e)}}function ka(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e),process:he(t,e)}}function va(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e),process:he(t,e)}}function Ea(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e),process:he(t,e)}}function la(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e),page:L(t,e)}}function Ta(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e),process:he(t,e),page:L(t,e)}}function La(t,e,r){return{eventInfo:E(t,e),content:R(t,e),process:he(t,e),auth:ce(t,e),application:v(t,e),page:L(t,e),user:l(t,e,r),ecommerce:ee(t,e),extraParams:T(t,e)}}function ba(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),page:L(t,e),user:l(t,e,r),extraParams:T(t,e)}}function Ra(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),page:L(t,e),user:l(t,e,r),extraParams:T(t,e)}}function Oa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),ecommerce:ee(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Ir(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Aa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function xa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Da(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),extraParams:T(t,e)}}function Fa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),extraParams:T(t,e)}}function Va(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),file:Kt(t,e),extraParams:T(t,e)}}function Ba(t,e,r){return{eventInfo:E(t,e),content:R(t,e),click:M(t,e),page:L(t,e),products:x(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e),ecommerce:ee(t,e)}}function Ua(t,e,r){return{eventInfo:E(t,e),content:R(t,e),click:M(t,e),page:L(t,e),products:x(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e)}}function Ma(t,e,r){return{eventInfo:E(t,e),content:R(t,e),application:v(t,e),page:L(t,e),user:l(t,e,r),extraParams:T(t,e)}}function Wa(t,e,r){return{eventInfo:E(t,e),content:R(t,e),click:M(t,e),page:L(t,e),products:x(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e)}}function $a(t,e,r){return{eventInfo:E(t,e),content:R(t,e),click:M(t,e),page:L(t,e),products:x(t,e),application:v(t,e),user:l(t,e,r),extraParams:T(t,e)}}function Ga(t,e,r){return{eventInfo:E(t,e),ecommerce:ee(t,e),products:x(t,e),click:M(t,e),content:R(t,e),application:v(t,e),page:L(t,e),user:l(t,e,r),extraParams:T(t,e)}}function Ka(t,e,r){return{eventInfo:E(t,e),ecommerce:ee(t,e),products:x(t,e),click:M(t,e),content:R(t,e),application:v(t,e),page:L(t,e),user:l(t,e,r),extraParams:T(t,e)}}function Ha(t,e){const r=Te(t,e).list;if(r&&r[0].products&&r[0].products.length>0)return r[0]}function qa(t,e,r){return{eventInfo:E(t,e),content:R(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),promotions:Te(t,e),promotionItem:Ha(t,e)}}function Ya(t,e){const r=Te(t,e).list;if(r&&r[0].products&&r[0].products.length>0)return r[0]}function za(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),promotions:Te(t,e),promotionItem:Ya(t,e),click:M(t,e),search:Ve(t,e)}}function Ja(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),search:Ve(t,e),extraParams:T(t,e),click:M(t,e),content:R(t,e)}}function Be(t,e,r){return{auth:ce(t,e),content:R(t,e),application:v(t,e),eventInfo:E(t,e),process:he(t,e)}}function Jt(t,e,r){return{application:v(t,e),content:R(t,e),eventInfo:E(t,e),extraParams:T(t,e),page:L(t,e),user:l(t,e,r)}}function Qa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),search:Ve(t,e),extraParams:T(t,e),filter:ye(t,e)}}function ja(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Xa(t,e,r){return{eventInfo:E(t,e),application:v(t,e),process:he(t,e),ecommerce:ee(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function Za(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),page:L(t,e),user:l(t,e,r),extraParams:T(t,e),content:R(t,e)}}function Na(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),ecommerce:ee(t,e),process:he(t,e),extraParams:T(t,e)}}function es(t,e,r){return{eventInfo:E(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),content:R(t,e),file:Kt(t,e),products:x(t,e),extraParams:T(t,e)}}function ts(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function rs(t,e,r){return{eventInfo:E(t,e),auth:ce(t,e),application:v(t,e),user:l(t,e,r),page:L(t,e),products:x(t,e),content:R(t,e),click:M(t,e),extraParams:T(t,e)}}function is(t,e,r){return{eventInfo:E(t,e),application:v(t,e),click:M(t,e),page:L(t,e),extraParams:T(t,e),user:l(t,e,r)}}const Sr={PDP_Pageload:Wn,PDP_Click:cr,PLP_Product_Click:Oa,PLP_Information_Load:ja,PDP_Social_Click:Yn,PDP_Image_Click:Un,PDP_Social_Share_Click:es,PDP_Section_EnterViewport:qn,PDP_Recommendation_Load:Hn,PDP_Recommendation_EnterViewport:Kn,PDP_Recommendation_Click:Gn,PDP_Rating_Click:$n,PDP_Information_Load:Mn,PDP_A_Goods_Link_Click:Ir,PDP_B_Goods_Link_Click:Ir,PDP_Downloads_Section_Click:Aa,PDP_Downloads_Link_Click:xa,PDP_Install_Calc_Link_Click:cr,PDP_BackInStock_Alert_Submit:ts,PDP_BackInStock_Alert_Success:rs,General_Pageload:tt,General_Recommendation_Load:xn,General_RecommendationProduct_EnterViewport:Dn,General_Product_Click:Dt,General_Section_EnterViewport:Vn,Ge
6neral_Teaser_Click:Bn,General_Link_Click:An,General_Navigation_Click:ha,PLP_Pageload:zn,PLP_FilterSelect_Click:Yt,PLP_FilterSelect_Intent:Yt,PLP_FilterDeselect_Click:Yt,PLP_ProductImageSlider_Click:Va,PLP_Show_More_Click:Ja,General_SearchTermConfirm_Click:Fn,Cart_Pageload:mr,Cart_Pageload_Split:mr,Cart_Button_Click:Rn,Cart_Success_Pageload:On,Cart_Checkbox_Click:Na,Banner_Promotion_Load:yr,General_Product_View:Cr,General_Product_Load:Cr,General_Promotion_Load:yr,General_Promotion_View:Jn,General_Promotion_View_Split:_a,General_Promotion_Click:Pr,General_Promotion_Qualified:qa,General_Promotion_Shown:za,Wishlist_Pageload:jn,Wishlist_Button_Click:Xn,StoreSearch_Pageload:ta,StoreSearch_Click:Zn,StoreSearchDP_Pageload:ea,StoreSearchDP_Click:Nn,MyAccount_Pageload:ra,MyAccount_Click:ia,Flyer_Click:zt,Flyer_View:aa,Flyer_ChangeViewport:Da,Flyer_View_50:sa,Flyer_View_75:oa,Flyer_View_100:ua,Flyer_Categories_Select:ga,Kameleoon_Experiment:pa,Order_Cancellation_Click:fa,Order_ViewDetails_Click:ma,Order_Invoice_Download_Click:ca,Order_Return_Click:Ca,Order_Cancellation_Confirmation:ya,Order_Return_Confirmation:Pa,Login_Link_Click:Ia,Start_Login_Click:Sa,Login_Button_Click:wa,Login_Success:ka,Forgotten_Password_Click:va,Password_Reset:Ea,Register_Link_Click:la,Registration_Success:Ta,Error_Message:La,Competition_Form_Submit:Za,Newsletter_Form_Submit:ba,Newsletter_Form_Success:Ra,User_Consent_Update:Fa,Review_Product_Click:Ba,Review_Product_Error:Ua,Review_Product_Start:Ma,Review_Product_Submit:Wa,Review_Product_Success:$a,Return_Chatbot_WindowOpen_Click:Ga,Return_Chatbot_WindowClosed_Click:Ka,Session_Start:tt,First_Visit:tt,Add_Product_To_Wishlist_In_Flyer:zt,ProductView_In_Flyer:zt,Retail_StartPage_Visit:tt,View_Store_Article:tt,WT_Visit:tt,Switch_Login_Type:Be,Confirm_Token:Be,Request_New_Token:Be,Confirm_Mobile_Number:Be,Password_Reset_Success:Be,Contact_Customer_Service:Be,Login_Accept_Terms:Be,Register_Continue_Click:Be,Register_Change_Phone:Be,Video_Start:Jt,Video_Progress:Jt,Video_Complete:Jt,General_Scroll_Action:Qa,Promotion_Information_Click:Pr,STL_Product_Checkbox_Click:Dt,STL_Add2Cart_Click:Xa,STL_Variant_Selected:Dt,STL_Select_Variant_Click:Dt,Link_Click:is},ns=/\/(?:l\/.*|flyer\/.*)\/page\/(\d+)/;class as{constructor(e){this.flyerMaxCount=60,this.currentFlyerId=null,this.maxStoredFlyers=20,this.maxFlyerAgeWeeks=4,this.window=e,this.cleanupOldFlyerData()}handleEvent(e,r){switch(e===f.General_Pageload&&this.cleanupOldFlyerData(),e){case f.Flyer_View:this.handleFlyerViewEvent(r);break;case f.Flyer_ChangeViewport:this.handleFlyerChangeViewportEvent(r);break;case f.General_Pageload:this.handlePageView();break;default:w(`[FlyerViewTracker] Unhandled scenario: ${e}`)}}handleFlyerViewEvent(e){var o,_;w("[FlyerViewTracker] handleFlyerViewEvent called");const r=e.eventInfo,a=(o=e.content)==null?void 0:o.contentID,i=(_=e.page)==null?void 0:_.pageProperties;if((r==null?void 0:r.eventAction)!=="Flyer_View"||(r==null?void 0:r.eventInteractionType)!=="open"){w("[FlyerViewTracker] Not an initial Flyer_View event, skipping");return}if(i!=null&&i.maxCount&&(this.flyerMaxCount=i.maxCount,w(`[FlyerViewTracker] Updated flyerMaxCount to ${this.flyerMaxCount}`)),typeof a=="string"&&a!=="last_page")this.currentFlyerId=a,w(`[FlyerViewTracker] Updated currentFlyerId to ${this.currentFlyerId}`);else if(a==="last_page"){w('[FlyerViewTracker] Ignoring "last_page" contentId');return}if(this.currentFlyerId){const d=this.getFlyerData();d.viewportPages=(i==null?void 0:i.viewportPages)||1,w(`[FlyerViewTracker] Initialized viewportPages to ${d.viewportPages}`),this.updateVisitedPages(d),this.saveFlyerData(d)}}handleFlyerChangeViewportEvent(e){var i;if(w("[FlyerViewTracker] handleFlyerChangeViewportEvent called"),!this.currentFlyerId){w("[FlyerViewTracker] No current flyer ID, skipping viewport change");return}const r=(i=e.page)==null?void 0:i.pageProperties,a=r==null?void 0:r.viewportPages;if(typeof a=="number"){const o=this.getFlyerData();o.viewportPages!==a&&(o.viewportPages=a,w(`[FlyerViewTracker] Updated viewportPages to ${a}`),this.updateVisitedPages(o),this.saveFlyerData(o))}else w("[FlyerViewTracker] Invalid or missing viewportPages in Flyer_ChangeViewport event")}handlePageView(){if(this.currentFlyerId){const e=this.getFlyerData();e&&(this.updateVisitedPages(e),this.saveFlyerData(e))}}updateVisitedPages(e){const r=this.getCurrentPage();if(r===null)return;e.visitedPages||(e.visitedPages=[],w("[FlyerViewTracker] Initialized visitedPages array")),e.landingPage===null&&(e.landingPage=r,w(`[FlyerViewTracker] Set landing page to ${r}`));for(let o=0;o<e.viewportPages;o++){const _=r+o;_<=this.flyerMaxCount&&!e.visitedPages.includes(_)&&(e.visitedPages.push(_),w(`[FlyerViewTracker] Added page ${_} to visited pages`))}const a=e.visitedPages.length,i=a/this.flyerMaxCount*100;w(`[FlyerViewTracker] Unique pages visited: ${a},
7      Percentage viewed: ${i.toFixed(2)}%`),this.checkAndTriggerThresholds(e,i)}
7checkAndTriggerThresholds(e,r){[50,75,100].forEach(i=>{r>=i&&!e.triggered[i]&&(e.triggered[i]=!0,this.triggerFlyerEvent(i))})}getCurrentPage(){const r=(this.window.location.pathname+this.window.location.search).match(ns);return!r||r.length<2?(w("[FlyerViewTracker] Could not extract page number from URL"),null):Number.parseInt(r[1],10)}getFlyerData(){const e=`flyerData_${this.currentFlyerId}`,r=localStorage.getItem(e);if(r)try{const a=JSON.parse(r);if(a!=null&&a.data)return a.data;if(a!=null&&a.visitedPages)return this.saveFlyerData(a),a}catch(a){w(`[FlyerViewTracker] Error parsing flyer data: ${a}`)}return{visitedPages:[],triggered:{},landingPage:null,viewportPages:1}}saveFlyerData(e){const r=`flyerData_${this.currentFlyerId}`,a=Date.now(),i={data:e,timestamp:a};localStorage.setItem(r,JSON.stringify(i)),this.cleanupOldFlyerData()}cleanupOldFlyerData(){w("[FlyerViewTracker] Running cleanup for old flyer data");const e=[];for(let o=0;o<localStorage.length;o++){const _=localStorage.key(o);if(_!=null&&_.startsWith("flyerData_"))try{const d=localStorage.getItem(_);if(d){const g=JSON.parse(d);g!=null&&g.timestamp?e.push({key:_,timestamp:g.timestamp}):(localStorage.removeItem(_),w(`[FlyerViewTracker] Removed old format data: ${_}`))}}catch{localStorage.removeItem(_),w(`[FlyerViewTracker] Removed invalid data: ${_}`)}}const r=this.maxFlyerAgeWeeks*7*24*60*60*1e3,a=Date.now();e.filter(o=>a-o.timestamp>r).forEach(o=>{localStorage.removeItem(o.key),w(`[FlyerViewTracker] Removed old flyer data: ${o.key}`)}),e.length>this.maxStoredFlyers&&(e.sort((_,d)=>_.timestamp-d.timestamp),e.slice(0,e.length-this.maxStoredFlyers).forEach(_=>{localStorage.removeItem(_.key),w(`[FlyerViewTracker] Removed excess flyer data: ${_.key}`)}))}triggerFlyerEvent(e){let r;switch(e){case 50:r=f.Flyer_View_50;break;case 75:r=f.Flyer_View_75;break;case 100:r=f.Flyer_View_100;break;default:w(`[FlyerViewTracker] Unknown threshold: ${e}`);return}w(`[FlyerViewTracker] Triggering flyer event: ${r}`),globalThis.dataLayerService.push({scenarioName:r,collections:{}})}}var ss=Object.defineProperty,os=Object.getOwnPropertyDescriptor,us=(t,e,r,a)=>{for(var i=a>1?void 0:a?os(e,r):e,o=t.length-1,_;o>=0;o--)(_=t[o])&&(i=(a?_(e,r,i):_(i))||i);return a&&i&&ss(e,r,i),i};const _s=tr();let Qt=class{constructor(){this.USER_SESSION_KEY="trackUserSession",this.SESSION_TIMEOUT=30*60*1e3,this.isFirstEverSession=!0,this.isFirstEverSession=!localStorage.getItem(this.USER_SESSION_KEY),this.session=this.initSession(),this.addTabSyncListener(),w(["[SessionManager] Class instantiated. Current session:",this])}createNewSession(t=!1){var e;return globalThis.dataLayerService=globalThis.dataLayerService||[],t&&(globalThis.dataLayerService.push({scenarioName:f.First_Visit,collections:{}},{scenarioName:f.Session_Start,collections:{}}),w("[SessionManager] First visit detected, creating new session.")),{sessionId:Ot(),sessionNumber:t?1:(((e=this.session)==null?void 0:e.sessionNumber)||0)+1,lastActivity:Date.now()}}initSession(){const t=localStorage.getItem(this.USER_SESSION_KEY);if(t)return JSON.parse(t);const e=this.createNewSession(this.isFirstEverSession);return this.isFirstEverSession=!1,this.session=e,this.saveSession(),e}saveSession(){this.session&&localStorage.setItem(this.USER_SESSION_KEY,JSON.stringify(this.session))}addTabSyncListener(){globalThis.addEventListener("storage",t=>{t.key===this.USER_SESSION_KEY&&t.newValue&&(this.session=JSON.parse(t.newValue),w("[SessionManager] Session synced from another tab."))})}getSessionData(){return this.session?{id:this.session.sessionId,number:this.session.sessionNumber}:{id:"",number:0}}updateActivity(){const t=Date.now();return t-this.session.lastActivity>this.SESSION_TIMEOUT?(this.session=this.createNewSession(!1),this.saveSession(),!0):(this.session.lastActivity=t,this.saveSession(),!1)}};Qt=us([_s],Qt);const wr=class Xt{constructor(e){this.hasVideoStarted=!1,this.triggeredPercent=new Set,this.videoConfig=e,this.ytPlayer=window.YT||{},window.dataLayerService=window.dataLayerService||[]}init(){switch(this.videoConfig.playerType){case"html5":this.setupHTMLListener();break;case"youtube":this.setupYouTubeListener();break;case"livebuy":this.setupLivebuyListener();break}}isTrackable(e){return this.videoConfig.provider==="livebuy"?!0:!!e&&e>10}getVideoURL(){const e=this.videoConfig.el;return(typeof e.current=="string"&&e.current?e.current:"")||this.videoConfig.htmlURL||location.href}sendStartOnce(e,r){this.isTrackable(r)&&(this.hasVideoStarted||(this.hasVideoStarted=!0,this.triggeredPercent.add(0),window.dataLayerService.push({scenarioName:f.Video_Start,collections:{extraParams:{video_percent:0,video_title:this.videoConfig.title,video_provider:this.videoConfig.provider,video_url:this.getVideoURL(),...this.videoConfig.provider!=="livebuy"&&{video_duration:r,video_current_time:e}}}})))}sendProgress(e,r){if(!this.isTrackable(r))return;if(!r||r<=0)return 0;const a=Math.min(100,Math.floor(e/r*100));
7[10,25,50,75].forEach(o=>{a>=o&&!this.triggeredPercent.has(o)&&(this.triggeredPercent.add(o),window.dataLayerService.push({scenarioName:f.Video_Progress,collections:{extraParams:{video_percent:o,video_title:this.videoConfig.title,video_duration:r,video_provider:this.videoConfig.provider,video_url:this.getVideoURL(),video_current_time:e}}}))})}sendComplete(e){this.isTrackable(e)&&(this.triggeredPercent.has(100)||(this.triggeredPercent.add(100),window.dataLayerService.push({scenarioName:f.Video_Complete,collections:{extraParams:{video_percent:100,video_title:this.videoConfig.title,video_provider:this.videoConfig.provider,video_url:this.getVideoURL(),...this.videoConfig.provider!=="livebuy"&&{video_duration:e,video_current_time:e}}}})))}setupHTMLListener(){const e=this.videoConfig.el;if(Xt.attached.has(e))return;Xt.attached.add(e),e.addEventListener("loadstart",()=>{this.hasVideoStarted=!1,this.triggeredPercent.clear()}),e.addEventListener("playing",()=>this.sendStartOnce(e.currentTime||0,e.duration||0),{once:!0});let r=0;const a=()=>{const i=e.currentTime,o=e.duration;if(!this.hasVideoStarted||!o){r=i;return}this.sendProgress(i,o);const _=i/o>=.99,d=e.loop&&r>i+.2;(_||d)&&!this.triggeredPercent.has(100)&&(this.sendComplete(o),e.removeEventListener("timeupdate",a)),r=i};e.addEventListener("timeupdate",a),e.addEventListener("ended",()=>this.sendComplete(e.duration||0))}stopProgress(){this.progressTimer&&(clearInterval(this.progressTimer),this.progressTimer=void 0)}setupYouTubeListener(){const e=window.YT;let r;(i=>{i[i.PLAYING=1]="PLAYING",i[i.PAUSE=2]="PAUSE",i[i.BUFFERING=3]="BUFFERING",i[i.STOPPED=0]="STOPPED"})(r||(r={}));const a=i=>{var _,d;const o=i==null?void 0:i.data;if(o===1&&!this.hasVideoStarted){const{currentTime:g,duration:m}=((_=this.ytPlayer)==null?void 0:_.playerInfo)||{};this.sendStartOnce(g,m)}if(o===1){if(this.progressTimer)return;this.progressTimer=window.setInterval(()=>{var y,k,b;const g=((y=this.ytPlayer.playerInfo)==null?void 0:y.duration)??0;if(!Number.isFinite(g)||g<=0)return;const m=((b=(k=this.ytPlayer)==null?void 0:k.playerInfo)==null?void 0:b.currentTime)??0;this.sendProgress(m,g)},250);return}if(o===1||o===3){this.stopProgress();return}if(o===0){this.sendComplete(((d=this.ytPlayer.playerInfo)==null?void 0:d.duration)??0),this.stopProgress();return}};this.ytPlayer=new e.Player(this.videoConfig.el,{events:{onReady:i=>{this.ytPlayer=i.target,a({data:i.target.getPlayerState()})},onStateChange:i=>{this.ytPlayer=i.target,a(i)}}})}setupLivebuyListener(){const e=window.livebuy;let r;(_=>{_[_.PLAYER_READY=0]="PLAYER_READY",_[_.PLAYING=1]="PLAYING",_[_.PAUSED=2]="PAUSED",_[_.STOPPED=3]="STOPPED"})(r||(r={})),e.livebuyInfo=e.livebuyInfo||{playerState:0,currentTime:0,duration:0};const a=e.livebuyInfo,i=_=>{if(a.currentTime,_===1&&!this.hasVideoStarted){this.sendStartOnce(0,0),this.hasVideoStarted=!0;return}if(_===3){this.sendComplete(0),this.stopProgress(),this.hasVideoStarted=!1,this.triggeredPercent.clear();return}_===2&&this.stopProgress()};e.Player.registerCallback(_=>{var d;switch((d=_.show)!=null&&d.name&&(this.videoConfig.title=_.show.name),_.action){case"lb_open_player":case"lb_show_resumed":a.playerState=1;break;case"lb_show_paused":a.playerState=2;break;case"lb_show_ended":a.playerState=3;break;case"lb_close_player":a.playerState=2;break;case"lb_player_ready":a.playerState=0;break}i(a.playerState)})}};wr.attached=new WeakSet;let be=wr;class jt{constructor(e){this.registration=null,this.isReady=!1,this.config=e}async initialize(){var e,r,a,i;if(w(["ServiceWorker initialize() called"]),!("serviceWorker"in navigator))return w(["Service Worker not supported"]),!1;try{return this.registration=await this.getOrRegisterServiceWorker(),w(["ServiceWorker initialize debug:"]),w(["- registration:",this.registration?"Found":"Not found"]),w(["- registration.active:",(e=this.registration)!=null&&e.active?"Yes":"No"]),w(["- registration state:",(a=(r=this.registration)==null?void 0:r.active)==null?void 0:a.state]),this.setupEventListeners(),(i=this.registration)!=null&&i.active?(this.isReady=!0,w(["Service Worker already active and ready - isReady set to true"]),!0):(w(["Service Worker not immediately active, waiting for ready..."]),await this.waitForReady(),this.isReady)}catch(o){return w(["Service Worker initialization failed:",o]),!1}}
7async unregister(){if(!("serviceWorker"in navigator))return!1;try{const e=await navigator.serviceWorker.getRegistration(this.config.scope);if(!e)return w(["No Service Worker registration found for scope, nothing to unregister:",this.config.scope]),!1;const r=await e.unregister();return this.registration=null,this.isReady=!1,w(["Service Worker unregistered for scope:",this.config.scope,"result:",r]),r}catch(e){return w(["Service Worker unregister failed:",e]),!1}}async getOrRegisterServiceWorker(){const e=await navigator.serviceWorker.getRegistration(this.config.scope);return e?(w(["Using existing Service Worker registration"]),e):(w(["Registering new Service Worker"]),navigator.serviceWorker.register(this.config.url,{scope:this.config.scope}))}async waitForReady(){const e=navigator.serviceWorker.ready,r=new Promise((a,i)=>setTimeout(()=>i(new Error("Service Worker ready timeout")),this.config.readyTimeout));try{(await Promise.race([e,r])).active&&(this.isReady=!0,w(["Service Worker is ready"]))}catch{w(["Service Worker ready timeout, using fallback"])}}setupEventListeners(){this.registration&&(this.registration.installing&&this.registration.installing.addEventListener("statechange",()=>{var e,r;w(["ServiceWorker installing state changed to:",(r=(e=this.registration)==null?void 0:e.installing)==null?void 0:r.state]),this.checkAndUpdateReadyState()}),this.registration.waiting&&this.registration.waiting.addEventListener("statechange",()=>{var e,r;w(["ServiceWorker waiting state changed to:",(r=(e=this.registration)==null?void 0:e.waiting)==null?void 0:r.state]),this.checkAndUpdateReadyState()}),this.registration.active&&this.registration.active.addEventListener("statechange",()=>{var e,r;w(["ServiceWorker active state changed to:",(r=(e=this.registration)==null?void 0:e.active)==null?void 0:r.state]),this.checkAndUpdateReadyState()})),navigator.serviceWorker.addEventListener("controllerchange",()=>{w(["Service Worker controller changed"]),this.checkAndUpdateReadyState()})}checkAndUpdateReadyState(){var r;const e=this.isReady;(r=this.registration)!=null&&r.active&&(this.isReady=!0,e||w(["ServiceWorker became ready - isReady set to true"]))}postMessage(e){var a;const r=(a=this.registration)==null?void 0:a.active;if(!this.isReady)return w(["ServiceWorker not ready, cannot post message"]),!1;if(!r)return w(["No ServiceWorker target available - registration.active is null"]),!1;try{return r.postMessage(e),!0}catch(i){return w(["Service Worker messaging failed:",i]),!1}}get ready(){return this.isReady}}const ds=globalThis.location.hostname,ps={"www.lidl.de":"3014","qa.lidl.de":`${{}.VITE_CRITEO_PARTNER_ID_QA}`}[ds]||null,hs="www.lidl.de",gs="true";var fs=Object.defineProperty,ms=Object.getOwnPropertyDescriptor,cs=(t,e,r,a)=>{for(var i=a>1?void 0:a?ms(e,r):e,o=t.length-1,_;o>=0;o--)(_=t[o])&&(i=(a?_(e,r,i):_(i))||i);return a&&i&&fs(e,r,i),i};const Cs=tr();let $e=class{constructor(t){this.serviceWorkerManager=null,this.isMobileWebview=$r(),this.globalThis=t,this.flyerViewTracker=new as(t),this.sessionManager=new Qt}static hasClickScenarioTriggered(){return this.clickScenarioTriggered}static resetClickScenarioTriggered(){this.clickScenarioTriggered=!1}static markClickScenarioTriggered(){this.clickScenarioTriggered=!0}isCriteoFeatureEnabled(){const t=hs;if(!t||!gs)return!1;const r=t.split(",").map(i=>i.trim()),a=this.globalThis.location.hostname;return r.includes(a)}async initializeServiceWorker(){this.serviceWorkerManager=new jt({url:"/t/cdn/track-sw.js",scope:"/t/cdn/",readyTimeout:5e3}),await this.serviceWorkerManager.initialize()}isServiceWorkerReady(){var t;return((t=this.serviceWorkerManager)==null?void 0:t.ready)??!1}sendCriteoViaSW(t,e,r="GET"){return this.serviceWorkerManager?this.serviceWorkerManager.postMessage({type:"CRITEO_BEACON",payload:{url:t,data:e,method:r}}):!1}async bootstrap(){const t=!sessionStorage.getItem("first_pageview_key");t&&sessionStorage.setItem("first_pageview_key","1");const e=Mt(),r=this.isMobileWebview||e||this.isInIframe()&&this.isInFlyer(),a=Ce.getConsentCookie();!r&&a.statistics&&!nr()&&await Nr(a,t),await Ce.synchronizeLidlId(),this.serviceWorkerManager=new jt({url:"/t/cdn/track-sw.js",scope:"/t/cdn/",readyTimeout:5e3}),this.serviceWorkerManager.unregister().catch(()=>{});const{marketing:i}=a;i&&await this.handleUserIdentity()}init(){if(globalThis.dataLayerNext=globalThis.dataLayerNext||[],globalThis.lidldata=globalThis.lidldata||[],globalThis.dataLayer=globalThis.dataLayer||[],globalThis.dlsLoadedAndPVChecked=!1,this.globalThis.savedCriteoBeacons=[],this.checkAndCleanupUserIdentity(),this.isInIframe()&&this.isInFlyer()){re.log("[DataLayerService] Running in flyer iframe context, skipping GTM initialization"),this.initializeDataLayerService();return}const t=globalThis.dataLayerNext.push,e=globalThis.dataLayer.push,r=function(i){i.event===h.PAGE_VIEW&&(globalThis.dlsLoadedAndPVChecked=!0)},a=i=>
7{i[1]==="update"&&$e.handleConsentUpdateCustomEvent()};globalThis.dataLayer.push=function(i){return a(i),e.call(globalThis.dataLayer,i)},globalThis.dataLayerNext.push=function(i){return r(i),t.call(globalThis.dataLayerNext,i)},this.pushToDataLayer(globalThis.dataLayerNext,"gtm.js"),this.initializeDataLayerService()}static hasConsentBeenGivenFirstTime(){const t=N("OptanonConsent"),e=new URLSearchParams(t).get("consentId"),r=A.getItem("userConsentGivenFirstTime");return r?r!==e:!0}static handleFirstTimeConsent(){if(this.hasConsentBeenGivenFirstTime()){const t=N("OptanonConsent"),e=new URLSearchParams(t).get("consentId");e&&(A.setItem("userConsentGivenFirstTime",e),globalThis.dataLayerService.push({scenarioName:f.User_Consent_Update,collections:{}}))}}static handleSubsequentConsentUpdates(){globalThis.dataLayer.some(e=>e[1]==="update")&&globalThis.dataLayerService.push({scenarioName:f.User_Consent_Update,collections:{}})}static handleConsentUpdateCustomEvent(){this.handleFirstTimeConsent(),this.handleSubsequentConsentUpdates()}initializeDataLayerService(){var t;if(!((t=globalThis.dataLayerService)!=null&&t.initialized)){if(Array.isArray(globalThis.dataLayerService))for(const e of globalThis.dataLayerService)this.push(e);globalThis.dataLayerService={push:this.push.bind(this),initialized:!0}}}pushToDataLayer(t,e){t.find(a=>a.event===e)||t.push({"gtm.start":Date.now(),event:e})}isInFlyer(){var e;return((e=globalThis==null?void 0:globalThis.location)==null?void 0:e.search).includes("layout=flyer")}isInIframe(){return globalThis.self!==globalThis.top}forwardToParent({scenarioName:t,collections:e}){this.isInIframe()&&globalThis.top.dataLayerService&&typeof globalThis.top.dataLayerService.push=="function"&&(re.log(["[DataLayerService] Forwarding to parent:",{scenarioName:t,collections:e}]),globalThis.top.dataLayerService.push({scenarioName:t,collections:e}))}handleSessionManagement(t){t!==f.First_Visit&&t!==f.Session_Start&&this.sessionManager.updateActivity()&&this.push({scenarioName:f.Session_Start,collections:{}})}handleGeneralPromotionView(t){var _,d;if(!((_=t.promotions)!=null&&_.list))return;w(["[DataLayerService] Handle General Promotion View"]);const{["promotions"]:e,...r}=t,a=(d=t.promotions)==null?void 0:d.list,i=[],o=[];for(const g of a)g.products?i.push(g):o.push(g);w(["[DataLayerService] Promotions With Products",i]),w(["[DataLayerService] Promotions Without Products",o]),o.length>0&&this.push({scenarioName:f.General_Promotion_View_Split,collections:{...r,promotions:{list:o}}});for(const g of i)this.push({scenarioName:f.General_Promotion_View_Split,collections:{...r,promotionItem:g}});return[...this.globalThis.lidldata]}handleGeneralProductClick(t){var _,d,g,m,y,k,b,P,O;const{["promotions"]:e,...r}=t,a=(_=t==null?void 0:t.products)==null?void 0:_.list,i=((m=(g=(d=t==null?void 0:t.products)==null?void 0:d.list)==null?void 0:g[0])==null?void 0:m.promotionName)||((b=(k=(y=t==null?void 0:t.promotions)==null?void 0:y.list)==null?void 0:k[0])==null?void 0:b.promotionName),o=(O=(P=t==null?void 0:t.promotions)==null?void 0:P.list)==null?void 0:O[0];switch(i){case"Deal_Of_The_Day":this.push({scenarioName:f.General_Promotion_Click,collections:{click:t==null?void 0:t.click,promotions:{list:a}}});break;case"Inspiration_Slider":this.push({scenarioName:f.General_Promotion_Click,collections:{...r,promotions:{list:[{...o,products:a}]}}}),t.promotionItem=o;break}return[...this.globalThis.lidldata]}async handleCriteoProductBeacons(t,e){var m,y,k,b,P;if(!this.isCriteoFeatureEnabled()||this.isMobileWebview){w(`[DataLayerService] Criteo ${e} disabled - not on qa.lidl.de`);return}const r=Ce.getConsentCookie(),{marketing:a}=r;if(!((m=t.products)!=null&&m.list)||!a)return;const i=(y=t.extraParams)==null?void 0:y.adPlacementLoadBeacon,o=(k=t.extraParams)==null?void 0:k.adPlacementViewBeacon,d=(b={adLoadBeacon:i,adViewBeacon:o}[e])==null?void 0:b.replace(/^\/\//,""),g=d?this.isAlreadySentBeacon(d):!1;if(e==="adLoadBeacon"&&i&&!g){const O=i.replace(/^\/\//,""),D=`/t/cri/b/${O}`;await fetch(D).then(F=>{F.ok||re.log(`[DataLayerService] Criteo placement ${e} request failed: ${F.status} for beacon ${O}`)}).catch(F=>{re.log([`[DataLayerService] Criteo placement ${e} request error for beacon ${O}:`,F])});return}if(e==="adViewBeacon"&&o&&!g){const O=o.replace(/^\/\//,""),D=`/t/cri/b/${O}`;await fetch(D).then(F=>{F.ok||re.log(`[DataLayerService] Criteo placement ${e} request failed: ${F.status} for beacon ${O}`)}).catch(F=>{re.log([`[DataLayerService] Criteo placement ${e} request error for beacon ${O}:`,F])})}for(const O of t.products.list){const D=(P=O[e])==null?void 0:P.replace(/^\/\//,""),F=D?this.isAlreadySe
7ntBeacon(D):!1;if(D&&!F){const G=`/t/cri/b/${D}`;fetch(G).then(W=>{W.ok||re.log(`[DataLayerService] Criteo ${e} request failed: ${W.status} for beacon ${D}`)}).catch(W=>{re.log([`[DataLayerService] Criteo ${e} request error for beacon ${D}:`,W])})}}}isAlreadySentBeacon(t){return this.globalThis.savedCriteoBeacons.includes(t)?!0:(this.globalThis.savedCriteoBeacons.push(t),!1)}handleCriteoProductAttributes(t){var a;if(!((a=t.products)!=null&&a.list)||!t.products.list.some(i=>i.adViewBeacon||i.adLoadBeacon||i.adClickBeacon||i.adBasketChangeBeacon||i.adWishlistBeacon))return t;Wr(()=>Ot());const r=t.products.list.map(i=>i.adViewBeacon||i.adLoadBeacon||i.adClickBeacon||i.adBasketChangeBeacon||i.adWishlistBeacon?{...i,adId:"CRITEO"}:i);return{...t,products:{...t.products,list:r}}}handleCriteoProductClick(t){var e;if((e=t.products)!=null&&e.list)for(const r of t.products.list)r.adClickBeacon&&this.handleCriteoProductBeacons(t,"adClickBeacon")}async handleCriteoPurchase(t){var F,G,W,$,Y;if(!this.isCriteoFeatureEnabled()||this.isMobileWebview){w("[DataLayerService] Criteo purchase tracking disabled - not on allowed domain");return}const e=Ce.getConsentCookie(),{marketing:r}=e;if(!((F=t.products)!=null&&F.list)||!r)return;const a=[],i=[],o=[],_=[];for(const V of t.products.list){const U=V.parentId||V.id;U!==void 0&&a.push(U),V.price!==void 0&&i.push(V.price),V.quantity!==void 0&&o.push(V.quantity),V.variantId!==void 0&&_.push(V.variantId)}const g=globalThis.innerWidth<750?"mobileWeb":"desktop",m={desktop:"trackTransactionApiDesktop",mobileWeb:"trackTransactionApiMobile"},y=Nt("email"),k=await Gr(y),b=Nt("ssoId"),P={"criteo-partner-id":ps,environment:((G=t==null?void 0:t.application)==null?void 0:G.applicationEnvironment)||"","retailer-visitor-id":((W=t==null?void 0:t.user)==null?void 0:W.lidl_id)||"","customer-id":b,"page-id":m[g],"event-type":"trackTransaction","transaction-id":(($=t==null?void 0:t.ecommerce)==null?void 0:$.transactionID)||"",item:_.join("|"),"parent-item":a.join("|"),price:i.join("|"),quantity:o.join("|"),currency:((Y=t==null?void 0:t.application)==null?void 0:Y.currency)||"EUR",email:k},O=document.location.origin,D=new URL(`${O}/t/cri/delivery/retailmedia`);D.search=new URLSearchParams(P).toString(),await fetch(D.toString(),{method:"GET"}).then(V=>{V.ok||re.log(`[DataLayerService] Criteo purchase tracking request failed: ${V.status}`)}).catch(V=>{re.log(["[DataLayerService] Criteo purchase tracking request error:",V])})}handleSpecialEventCases(t,e){var a,i,o,_,d;const r=((o=(i=(a=e==null?void 0:e.products)==null?void 0:a.list)==null?void 0:i[0])==null?void 0:o.promotionName)||((_=e==null?void 0:e.eventInfo)==null?void 0:_.eventAction)===f.General_Promotion_Click;switch(this.dispatchDerivedEvents(t,e),t){case f.Flyer_View:case f.Flyer_ChangeViewport:case f.General_Pageload:this.initYouTubeTracking(),this.initVideoTracking(),this.initLivebuyVideoTracking(),this.flyerViewTracker.handleEvent(t,e);break;case f.General_Product_Click:return this.handleCriteoProductClick(e),r?this.handleGeneralProductClick(e):this.handleGeneralProductClick(e);case f.Cart_Pageload:((d=e.process)==null?void 0:d.stepName)==="summary"&&this.pushViewCartCheckoutSummary(t,e);break;case f.General_Product_Load:this.handleCriteoProductBeacons(e,"adLoadBeacon");break;case f.General_Product_View:this.handleCriteoProductBeacons(e,"adViewBeacon");break}}enrichAndDispatch(t,e){const r=this.globalThis.gtm_load_failed||globalThis.gtm_load_failed;t===f.Session_Start&&r==="true"&&(e={...e,extraParams:{...e==null?void 0:e.extraParams,gtm_load_failed:"true"}});const a=this.enrich(t,e,this.sessionManager);if(a===null){w(`[DataLayerService] Invalid scenarioName ${t}, no data was pushed.`);return}else if(!(t in f)){w("Given scenarioName is not supported");return}return ie(e,a),w([`[DataLayerService] END: enriched scenario ${t} and collections`,a]),this.dispatchEvent(t,a),this.globalThis.lidldata.push(a),t==="Cart_Success_Pageload"&&this.handleCriteoPurchase(a),[...this.globalThis.lidldata]}push({scenarioName:t,collections:e={}}){var r;if(w([`[DataLayerService] START: pushed scenario ${t} and collections`,e]),this.handleSessionManagement(t),t!==f.Link_Click&&(t!=null&&t.includes("Click"))&&$e.markClickScenarioTriggered(),this.isInIframe()&&this.isInFlyer()){const a=L(t,e),i={...e,page:a};this.forwardToParent({scenarioName:t,collections:i});return}if((t===f.General_Product_View||t===f.General_Product_Click||t===f.General_Product_Lo
7ad)&&(e=this.handleCriteoProductAttributes(e)),t===f.General_Promotion_View){if(!((r=e==null?void 0:e.promotions)!=null&&r.list)){w("The promotions list property is empty, the event will not be saved");return}return this.handleGeneralPromotionView(e)}return t===f.General_Pageload&&this.handleSesevent(),this.handleSpecialEventCases(t,e),this.enrichAndDispatch(t,e)}dispatchEvent(t,e){const r=new CustomEvent("datalayerservice:push",{detail:{scenarioName:t,collections:e}});this.globalThis.document.dispatchEvent(r)}dispatchDerivedEvents(t,e){const a={[f.General_Pageload]:[{condition:()=>{var d,g,m;const o=((g=(d=globalThis==null?void 0:globalThis.location)==null?void 0:d.href)==null?void 0:g.includes("?channel=store"))||"",_=/\/c\/.*\/a\d.*/.test(((m=globalThis==null?void 0:globalThis.location)==null?void 0:m.pathname)||"");return o||_},getEvent:o=>({scenarioName:f.WT_Visit,collections:o})},{condition:()=>{var o;return/^\/p\/.*\/p\d{1,8}(?!\d)/.test(((o=globalThis==null?void 0:globalThis.location)==null?void 0:o.pathname)||"")},getEvent:o=>({scenarioName:f.View_Store_Article,collections:o})},{condition:()=>{var o,_;return(_=(o=globalThis==null?void 0:globalThis.location)==null?void 0:o.pathname)==null?void 0:_.includes("/store")},getEvent:o=>({scenarioName:f.Retail_StartPage_Visit,collections:o})}],[f.Flyer_Click]:[{condition:o=>{var _,d,g,m,y;return((_=o==null?void 0:o.eventInfo)==null?void 0:_.eventCategory)==="click"&&((d=o==null?void 0:o.eventInfo)==null?void 0:d.eventInteractionType)==="add"&&((g=o==null?void 0:o.content)==null?void 0:g.contentID)==="media_link"&&((m=o==null?void 0:o.content)==null?void 0:m.contentLabel)==="product"&&((y=o==null?void 0:o.content)==null?void 0:y.contentType)==="icon"},getEvent:o=>({scenarioName:f.Add_Product_To_Wishlist_In_Flyer,collections:o})},{condition:o=>{var _,d,g,m,y;return((_=o==null?void 0:o.eventInfo)==null?void 0:_.eventCategory)==="click"&&((d=o==null?void 0:o.eventInfo)==null?void 0:d.eventInteractionType)==="open"&&((g=o==null?void 0:o.content)==null?void 0:g.contentID)==="media_link"&&((m=o==null?void 0:o.content)==null?void 0:m.contentLabel)==="product_link"&&((y=o==null?void 0:o.content)==null?void 0:y.contentType)==="icon"},getEvent:o=>({scenarioName:f.ProductView_In_Flyer,collections:o})}]}[t];if(!a)return;const i=a.find(o=>o.condition(e));if(i){const o=i.getEvent(e);o&&this.push(o)}}enrich(t,e,r){if(!Sr[t])return null;const a=Sr[t];return a(t,e,r)}pushViewCartCheckoutSummary(t,e){const r={scenarioName:f.Cart_Pageload_Split,collections:e};this.push(r)}checkAndCleanupUserIdentity(){N("tracking-info")||A.getItem("track-user")&&(A.removeItem("track-user"),w(["[DataLayerService] User is logged out, removed saved user identity data"]))}async handleUserIdentity(){var a;const t=(a=A.parseJSON(A.getItem("track-user")))==null?void 0:a.hashedEmail,e=atob(N("tracking-info")||"");if(A.parseJSON(e)&&!t){const i=await fetch("/t/p/user/identity");if(i.ok){const o=await i.json();o!=null&&o.hashedEmail&&A.setItem("track-user",JSON.stringify({hashedEmail:o.hashedEmail}))}}}initVideoTracking(){document.querySelectorAll("video").forEach(e=>{be.attached.has(e)||(new be({playerType:"html5",el:e,title:e.getAttribute("title")||"",provider:"html5",htmlURL:location.href}).init(),be.attached.add(e))})}initYouTubeTracking(){setTimeout(()=>{const t=document.querySelectorAll(".n-youtube-consent-popup__action")[0],e=()=>N("youtube_consent")==="true",r=()=>document.querySelector('iframe[src*="youtube.com"], iframe[src*="youtube-nocookie.com"'),a=()=>{const o=r();if(o){if(be.attached&&be.attached.has(o))return;new be({playerType:"youtube",el:o,title:o.getAttribute("title")||"",provider:"youtube",htmlURL:location.href}).init(),be.attached.add(o)}},i=()=>{const o=setInterval(()=>{if(r()){a(),clearInterval(o);return}},500)};e()?i():t&&t.addEventListener("click",()=>{i()})},1e3)}initLivebuyVideoTracking(){const t=()=>document.querySelector('iframe[src*="cdn.livebuy.io"]'),e=()=>{const a=t();a&&(be.attached.has(a)||(new be({playerType:"livebuy",el:a,title:a.getAttribute("title")||"",provider:"livebuy",htmlURL:location.href}).init(),be.attached.add(a)))};(()=>{let a=0;const i=setInterval(()=>{const o=window.livebuy,_=t();if(o!=null&&o.initialized&&_){e(),clearInterval(i);return}++a>5&&clearInterval(i)},500)})()}handleSesevent(){const t=this.sessionManager.getSessionData(),e=t==null?void 0:t.id,r=sessionStorage.getItem("session_id");let a=Number(sessionStorage.getItem("sesevent"));e&&r!==e&&(a=0,sessionStorage.setItem("session_id",e)),a++,sessionStorage.setItem("sesevent",a+"")}};$e.clickScenarioTriggered=!1,$e=cs([Cs],$e),(()=>{window.addEventListener("message",a=>{var o;const i=a.data;if(i.type==="ua"){w("[IFrameTracking] Received ua type message"),window.dataLayer=window.dataLayer||[];const{ecommerce:_}=i.payload;if(_&&((o=_.impressions)==null?void 0:o.length)>20){const{impressions:d,...g}=_;
7ri(d,20).forEach(k=>{window.dataLayer.push({...i.payload,ecommerce:{...g,impressions:k}})})}else window.dataLayer.push(i.payload)}i.type==="ga4"&&(w(["[IFrameTracking] Received ga4 type message",i]),window.dataLayerService=window.dataLayerService||[],window.dataLayerService.push(i.payload))});const t=()=>{const a=window.scrollY,i=window.innerHeight,o=document.documentElement.scrollHeight;return a+i>=o-1?100:Math.floor((a+i)/o*100)},e=a=>{window.dataLayerService=window.dataLayerService||[],window.dataLayerService.push({scenarioName:f.General_Scroll_Action,collections:{extraParams:{percent_scrolled:a}}})},r=()=>{const a=t();a<90||(e(a),window.removeEventListener("scroll",r))};window.reinitScrollTracker=()=>{window.addEventListener("scroll",r)},window.reinitScrollTracker(),window.addEventListener("click",a=>{$e.resetClickScenarioTriggered();const i=a.target,o=i==null?void 0:i.closest("a");!(o!=null&&o.href)||o.hasAttribute("data-unified-click")||(window.dataLayerService=window.dataLayerService||[],setTimeout(()=>{$e.hasClickScenarioTriggered()||window.dataLayerService.push({scenarioName:f.Link_Click,collections:{click:{linkName:o.textContent||"",linkType:"link",linkURL:o.href||""}}})},0))},!0)})();const Ft=/\/(?:l\/.*|flyer\/.*)\/page\/(\d+)/,ys=/\/otc\/checkout/i,Ps=/\/c\/.*#|\/c\/.*tabCode=/,Is=/\/u\//,Ss=/\/payments\//;function ws(t,e){const r=Ft.exec(t)||[],a=Ft.exec(e)||[];return r&&a&&r[1]===a[1]}function ks(t){const e=globalThis.location.href,r=[ys,Ft,Ps,Is,Ss].some(o=>o.test(e)),i=Ft.test(e)?ws(t,e):!1;return e===t||i?e:(r&&globalThis.dataLayerService.push({scenarioName:f.General_Pageload,c
7ollections:{}}),globalThis.location.href)}(function(){var o;let e=globalThis.location.href;(o=globalThis.reinitScrollTracker)==null||o.call(globalThis),globalThis.dataLayerService=globalThis.dataLayerService||[];const r=pi(()=>{var _;e=ks(e),(_=globalThis.reinitScrollTracker)==null||_.call(globalThis)},300);globalThis.addEventListener("popstate",r);const a=history.pushState;history.pushState=function(..._){a.apply(this,_),r()};const i=history.replaceState;history.replaceState=function(..._){i.apply(this,_),r()}})(),function(){const t=r=>{if(r&&r.marketing){const i=new URLSearchParams(window.location.search).get("cjevent");i&&i!=="undefined"&&fetch(`/t/gtm/echo-cookie?cjevent=${i}`)}};(()=>{Ce.onConsentChanged(t)})()}();class vs{constructor(e,r){this.dlGa4Event=e,this.pageURL=globalThis.location.href,this.pagePathname=new URL(globalThis.location.href).pathname,this.scenarioName=r}isOlderThan7Days(e){return Date.now()-e>=1e3*60*60*24*7}getTimestamp(){return Date.now()}pushUniqueItemToStorage(e,r){e.some(i=>i.id===r.id)||e.push(r)}cleanStorage(e,r){const a=(r==null?void 0:r.filter(i=>!this.isOlderThan7Days(i.timestamp)))||[];a.length===0?A.removeItem(e):A.setItem(e,JSON.stringify(a))}handleSafeStorageItem(e,r){const a=this.getStorageArray(e);if(a.length===0)return;if(e==="ga4_item_list"){A.removeItem(e);return}const i=a.find(o=>String(o.id)===r);if(i){if(e==="ga4_promo"&&(i!=null&&i.promoProps)){const d=(i==null?void 0:i.promoProps.split("||")).at(-1);d&&this.handleSafeStorageItem("ga4_promo_page",d)}const o=a.filter(_=>String(_.id)!==r);A.setItem(e,JSON.stringify(o)),this.cleanStorage(e,o)}}findItemById(e,r){let a=null;return e.forEach(i=>{i.id===this.pagePathname&&i.items.some(o=>o.item_id===r?(a={index:o.index,item_list_name:o.item_list_name,item_list_id:o.item_list_id},!0):!1)}),a}isItemAlreadyInStorage(e){const r=A.getItem("ga4_list")?A.parseJSON(A.getItem("ga4_list")):[],i=(A.getItem("ga4_promo")?A.parseJSON(A.getItem("ga4_promo")):[]).some(_=>_.id===e),o=r.some(_=>_.id===e);return i||o}saveAiVoucherProps(e,r){const a=e==null?void 0:e.ai_voucher_name,i=e==null?void 0:e.ai_voucher_id,o=e==null?void 0:e.item_id,_=e==null?void 0:e.item_variant;if(a&&i&&o){const d={id:o,variantId:_,timestamp:this.getTimestamp(),voucherProps:i+"||"+a};this.pushUniqueItemToStorage(r,d);const g=JSON.stringify(r)||void 0;g&&A.setItem("ga4_ai_vouchers",g)}}saveSelectItemProperties(e,r,a){const i=e==null?void 0:e.item_id;let o=e==null?void 0:e.index,_=e==null?void 0:e.item_list_name,d=e==null?void 0:e.item_list_id;if(r===h.ADD_TO_CART){const g=this.getStorageArray("ga4_item_list"),m=this.findItemById(g,i);_=(m==null?void 0:m.item_list_name)??void 0,d=(m==null?void 0:m.item_list_id)??void 0,o=(m==null?void 0:m.index)??void 0}if(_){const g={id:i||"",timestamp:this.getTimestamp(),listProps:`${o}||${_}||${d}`};this.pushUniqueItemToStorage(a,g),A.setItem("ga4_list",JSON.stringify(a)),this.cleanStorage("ga4_list",a)}}getFallbackPromotionValues(e){if(e!=null&&e.promotion_id)return[];const r=this.getPromoPageKey(),i=this.getStorageArray("ga4_promo_page").find(o=>o.id===r);return i?i.promoProps.split("||"):[]}buildPromoProps(e,r){const a=(i,o)=>i??r[o];return{promotionID:a(e.promotion_id,0),promotionName:a(e.promotion_name,1),creativeName:a(e.creative_name,2),creativeSlot:a(e.creative_slot,3),sectionID:a(e.sectionID,4),sectionName:a(e.sectionName,5),itemMarketingCampaignCode:a(e.item_marketing_campaign_code,6),promotionType:a(e.item_promotion_type,7),creativeMasterName:a(e.item_creative_master_name,8)}}saveSelectPromotionProperties(e,r){const a=this.getFallbackPromotionValues(e),i=this.buildPromoProps(e,a);if(!i.promotionName)return;const o=[i.promotionID,i.promotionName,i.creativeName,i.creativeSlot,i.sectionID,i.sectionName,i.itemMarketingCampaignCode,i.promotionType,i.creativeMasterName].join("||"),_={id:e.item_id||"",timestamp:this.getTimestamp(),promoProps:o};this.pushUniqueItemToStorage(r,_),A.setItem("ga4_promo",JSON.stringify(r)),this.cleanStorage("ga4_promo",r)}handleSelectItemEvent(e,r,a,i){if(r&&(e!=null&&e.items)&&e.items.length>0){const o=e.items[0];this.saveSelectItemProperties(o,r,a),this.saveSelectPromotionProperties(o,i)}}handleSelectPromotion(e,r,a){const i=e.items[0],o=i==null?void 0:i.promotion_id,_=i==null?void 0:i.promotion_name,d=i==null?void 0:i.creative_name,g=i==null?void 0:i.creative_slot,m=i==null?void 0:i.sectionID,y=i==null?void 0:i.sectionName,k=i==null?void 0:i.linkURL,b=i==null?void 0:i.item_marketing_campaign_code,P=i==null?void 0:i.item_promotion_type,O=i==null?void 0:i.item_creative_master_name;let D,F;if(!(i.item_id&&this.isItemAlreadyInStorage(i.item_id)&&this.scenarioName!==f.General_Promotion_Shown)&&(this.scenarioName===f.General_Promotion_Shown&&this.saveAiVoucherProps(i,r),k&&k.search("https")>-1?(D=new URL(k),F=D.pathname):F=k||"",i!=null&&i.promotion_name&&F)){const W=[o,_,d,g,m,y,b,P,O].join("||"),$={id:F,timestamp:this.getTimestamp(),promoProps:W};this.pushUniqueItemToStorage(a,$),A.setItem("ga4_promo_page",JSON.stringify(a)),this.cleanStorage("ga4_promo_page",a)}}handleAddToCartStl(e,r){const a=e.items;if(a&&(a==null?void 0:a.length)>0)for(const i of a)this.saveSelectPromotionProperties(i,r)}savePromotionInformation(){const e=this.dlGa4Event.event,r=this.dlGa4Event.ecommerce,a=A.getItem("ga4_promo_page")?A.parseJSON(A.getItem("ga4_promo_page")):[],i=A.getItem("ga4_list")?A.parseJSON(A.getItem("ga4_list")):[],o=A.getItem("ga4_promo")?A.parseJSON(A.getItem("ga4_promo")):[],_=A.getItem("ga4_ai_vouchers")?A.parseJSON(A.getItem("ga4_ai_vouchers")):[],d=this.scenarioName==="STL_Add2Cart_Click";d&&this.handleAddToCartStl(r,o),r!=null&&r.items&&r.items.length>0&&!d&&this.handleSelectPromotion(r,_,a),e===h.SELECT_ITEM&&this.handleSelectItemEvent(r,e,i,o),e!=="purchase"&&(this.cleanStorage("ga4_promo",o),this.cleanStorage("ga4_list",i),this.cleanStorage("ga4_ai_vouchers",_),this.cleanStorage("ga4_promo_page",a))}enrichItem(e,r,a){const i={...e},_=["view_item_list","select_item"].includes(a),d=this.getListItemProps(i,r.ga4List);d&&!_&&(i.index=Number(d.position)||i.index,i.item_list_name=d.name??i.item_list_name,i.item_list_id=d.id??i.item_list_id);const g=this.getPromoProps(i,r.ga4PromoPage,r.ga4Promo);g&&(i.promotion_id=g.id??i.promotion_id,i.promotion_name=g.name??i.promotion_name,i.creative_name=g.creativeName??i.creative_name,i.creative_slot=g.creativeSlot??i.creative_slot,i.sectionID=g.sectionId??i.sectionID,i.sectionName=g.sectionName??i.sectionName,i.item_marketing_campaign_code=g.itemMarketingCampaignCode??i.item_marketing_campaign_code,i.item_promotion_type=g.promotionType??i.item_promotion_type,i.item_creative_master_name=g.creativeMasterName??i.item_creative_master_name);const m=this.getAiVoucherProps(i,r.ga4AiVouchers);return m&&(i.ai_voucher_id=m.id??i.ai_voucher_id,i.ai_voucher_name=m.name??i.ai_voucher_name),i}getListItemProps(e,r){let a=[];const i=r.filter(o=>o.id===e.item_id);return i.length>0&&(a=i[0].listProps.split("||")),a.length>0?{position:a[0],name:a[1]||void 0,id:a[2]||void 0}:null}getPromoProps(e,r,a){const i=e.promotion_name==="Shop_the_Look",o=this.getPromoPageKey(),_=r.find(g=>g.id===o);let d=[];if(_&&!i)d=_.promoProps.split("||");else{const g=a.find(m=>String(m.id)===String(e.item_id));g&&(d=g.promoProps.split("||"))}return d.length>0?{id:d[0]||void 0,name:d[1]||void 0,creativeName:d[2]||void 0,creativeSlot:d[3]||void 0,sectionId:d[4]||void 0,sectionName:d[5]||void 0,itemMarketingCampaignCode:d[6]||void 0,promotionType:d[7]||void 0,creativeMasterName:d[8]||void 0}:null}getAiVoucherProps(e,r){const a=r.find(i=>e.item_variant&&i.variantId===e.item_variant&&i.id===e.item_id||!e.item_variant&&i.id===e.item_id);if(a){const i=a.voucherProps.split("||");if(i.length>0)return{id:i[0]||void 0,name:i[1]||void 0}}return null}getPromoPageKey(){return this.pagePathname.includes("/parkside/s")?"/q/query/alle-parkside-produkte":this.pagePathname.includes("/c/parkside-performance/s")?"/q/query/alle-parkside-performance-produkte":this.pagePathname}cleanupStorageAfterPurchase(e){if(!(this.dlGa4Event.event!==h.PURCHASE||!e||e.length===0))for(const r of e)r.item_id&&(this.handleSafeStorageItem("ga4_list",r.item_id),this.handleSafeStorageItem("ga4_promo",r.item_id),this.handleSafeStorageItem("ga4_ai_vouchers",r.item_id))}getStorageArray(e){const r=A.getItem(e);return r?A.parseJSON(r):[]}enrichItemsWithPromotions(e){const r=this.dlGa4Event.ecommerce;if(!(r!=null&&r.items))return;const a={ga4PromoPage:this.getStorageArray("ga4_promo_page"),ga4List:this.getStorageArray("ga4_list"),ga4Promo:this.getStorageArray("ga4_promo"),ga4AiVouchers:this.getStorageArray("ga4_ai_vouchers")},i=r.items.map(o=>this.enrichItem(o,a,e));return this.cleanupStorageAfterPurchase(i),i}}class Es{constructor(){this.queue=[],this.maxRetries=3}add(e){this.queue.push({event:e,timestamp:Date.now(),retryCount:0})}getAll(){return this.queue}clear(){this.queue=[]}remove(e){const r=this.queue.indexOf(e);r>-1&&this.queue.splice(r,1)}incrementRetry(e){return e.retryCount++,e.retryCount<this.maxRetries}get length(){return this.queue.length}}function kr(t,e){var k,b,P,O,D,F,G,W,$,Y,V,U,K,ne,ae,se,_e,ue,j,X,ge,de,Re,Oe,Ae,xe,Q,Z,Se,we,ke,ve,Ee,pe;const{lidldata:r}=t,a=(P=(b=(k=r==null?void 0:r.application)==null?void 0:k.language)==null?void 0:b.split("-"))==null?void 0:P[0],i=(D=(O=navigator==null?void 0:navigator.language)==null?void 0:O.split("-"))==null?void 0:D[0],{browser:o,browserVersion:_}=typeof navigator<"u"?ur():{browser:"Unknown",browserVersion:"Unknown"},d={...(F=r==null?void 0:r.extraParams)==null?void 0:F.filterParams},m={event_version:"1.00",event_type:"user_behaviour",event_name:t.event==="page_view_custom"?"page_view":t.event,product_id:((G=r==null?void 0:r.application)==null?void 0:G.productTeam)||"PTRACK",api_timestamp:"",source_name:"web",platform:"web",element_name:(W=r==null?void 0:r.content)==null?void 0:W.contentID,previous_location:document?document.referrer:void 0,next_location:typeof(($=r==null?void 0:r.click)==null?void 0:$.linkURL)=="string"?(Y=r==null?void 0:r.click)==null?void 0:Y.linkURL:void 0,content_title:(V=r==null?void 0:r.page)==null?void 0:V.pageTitle,content_category:(U=r==null?void 0:r.page)==null?void 0:U.pageCategory,location:globalThis.location.href,location_parameters:(K=r==null?void 0:r.page)==null?void 0:K.pageParameter,initial_extra_params:{country_code:((ne=r==null?void 0:r.extraParams)==null?void 0:ne.country_code)||"",filter_params:d,optional_params:ls(r==null?void 0:r.extraParams)}};let y;if(e==="ITEM_ENGAGEMENT"){const fe=vr(((ae=t.ecommerce)==null?void 0:ae.items)||[]);y={...m,element_type:((se=r==null?void 0:r.content)==null?void 0:se.contentType)||"",element_identifier:((_e=r==null?void 0:r.click)==null?void 0:_e.linkType)||"",items:fe}}else if(e==="ECOMMERCE"){const fe=vr(((ue=t.ecommerce)==null?void 0:ue.items)||[]),De=Ls(t.ecommerce,r==null?void 0:r.extraParams);y={...m,items:fe.length>0?fe:void 0,ecommerce:De}}else e==="BASIC"?y={...m,element_type:((j=r==null?void 0:r.content)==null?void 0:j.contentType)||"",element_identifier:((X=r==null?void 0:r.click)==null?void 0:X.linkType)||""}:y=m;return We({core:{sdk_version:"0.01",event_timestamp:Date.now(),session_id:((ge=r==null?void 0:r.user)==null?void 0:ge.session_id)||"",batch_id:void 0,batch_ordering_id:void 0},touchpoint:{user:{user_type:"",email_hash:(de=r==null?void 0:r.auth)==null?void 0:de.emailHash,phone_hash:(Re=r==null?void 0:r.auth)==null?void 0:Re.phoneHash},device:{device_id:((Oe=r==null?void 0:r.extraParams)==null?void 0:Oe.LidlID)||"",user_agent:(Ae=r==null?void 0:r.user)==null?void 0:Ae.userAgent,status:"active",screen_resolution:`${(xe=r==null?void 0:r.user)==null?void 0:xe.browserResolutionWidth}x${(Q=r==null?void 0:r.user)==null?void 0:Q.browserResolutionHeight}`,screen_resolution_breakpoint:((Z=r==null?void 0:r.user)==null?void 0:Z.browserResolutionBreakpoint)+"",screen_resolution_orientation:(Se=r==null?void 0:r.user)==null?void 0:Se.browserResolutionOrientation,operating_system:navigator==null?void 0:navigator.platform,language:a||i,browser:o,browser_version:_},environment:((we=r==null?void 0:r.application)==null?void 0:we.applicationEnvironment)||"production",release_version:((ke=r==null?void 0:r.application)==null?void 0:ke.applicationVersion)||"1.0",consent_groups:"",marketing_consent:"",analytics_consent:"",one_trust_id:void 0,locale:((ve=r==null?void 0:r.application)==null?void 0:ve.locale)||"",favourite_store_id:(Ee=r==null?void 0:r.user)==null?void 0:Ee.customerShop,hostname:globalThis.location.hostname,management_unit:(pe=r==null?void 0:r.application)==null?void 0:pe.managementUnit},feature:y})}function ls(t){const e=["basket_value_net","basket_value_gross","basket_value_tax","LidlID","user_agent","accountID","shipping","browser_resolution_width","browser_resolution_height","browser_resolution_breakpoint","browser_resolution_orientation","locale","language","currency","region","management_unit","content_id","content_type","personalisation_ab_test_name","personalisation_ab_test_group","user_type","filterParams"],r={...t};We(r);for(const a of e)delete r[a];for(const a in r)r[a]=String(r[a]);return r}const Ts={item_name:!0,item_id:!0,affiliation:!0,coupon:!0,currency:!0,discount:!0,price:!0,item_brand:!0,breadcrumb:!0,breadcrumbPath:!0,item_category:!0,item_category2:!0,item_category3:!0,item_category4:!0,item_category5:!0,item_variant:!0,item_variant_group_id:!0,item_list_name:!0,item_list_id:!0,item_store_id:!0,item_store_availability:!0,index:!0,quantity:!0,promotion_id:!0,promotion_name:!0,creative_name:!0,creative_slot:!0,section_id:!0,section_name:!0,ad:!0,type:!0,linkURL:!0,additionalShippingCost:!0,additionalShippingCostType:!0,keyword_score:!0,semantic_score:!0,rating_score:!0,sh_impressions:!0,sh_carts:!0,sh_clicks:!0,business_rule_factor:!0,relevancy_score:!0,freshness_score:!0,review_rating_general:!0,review_rating_quality:!0,review_rating_price:!0,review_rating_fitting:!0,review_recommend_product:!0,sectionID:!0,sectionName:!0,goods_type:!0,creative_type:!0,additional_service_cost:!0,item_won_category:!0,item_won_category2:!0,item_won_category3:!0,item_won_category4:!0,item_won_category5:!0,won_category_primary:!0,won_category_primary_path:!0,ai_voucher_name:!0,ai_voucher_id:!0,ad_product_load_beacon:!0,ad_product_view_beacon:!0,ad_product_click_beacon:!0,ad_product_basketchange_beacon:!0,ad_product_wishlist_beacon:!0,item_creative_master_name:!0,item_marketing_campaign_code:!0,item_amount:!0,item_refund:!0,location_id:!0,item_availability:!0,item_rating_average:!0,aov:!0,item_variant_attributes:!0,item_promotion_type:!0,item_benefit_label:!0,item_is_animated:!0};function Ls(t,e){var a,i;if(!t)return;const r=o=>{if(typeof o=="number")return o;
7if(typeof o=="string"){const _=parseFloat(o);return isNaN(_)?void 0:_}};return We({cart_id:t.cartId,basket_value_aov:t.basketValueAOV,vouchers:t.coupon,payment_method:t.payment_type,payment_methods_available:t.shipping_tier,additional_shipping_cost:r(t.additionalShippingCost),cancellation_reason:t.cancellation_reason,total_item_quantity:(a=t.items)==null?void 0:a.reduce((o,_)=>o+(_.quantity??1),0),purchase_revenue:r(t.value),shipping_value:t.shipping!=null?String(t.shipping):void 0,tax_value:r(t.tax),unique_items:(i=t.items)==null?void 0:i.length,transaction_id:t.transaction_id,basket_value_net:(e==null?void 0:e.basket_value_net)!=null?r(e.basket_value_net):void 0,payment_fees:t.payment_fees,delivery_options_selected:t.delivery_options_selected,delivery_options_available:t.delivery_options_available,additional_service_cost:t.additional_service_cost,address_type:t.adress_type,additional_services:t.additional_services})}function vr(t){return t.map(e=>{const r={};for(const[i,o]of Object.entries(e))!(i in Ts)&&o!=null&&(r[i]=String(o));const a=We({link_url:e.linkURL,section_name:e.section_name||e.sectionName,section_id:e.section_id||e.sectionID,keyword_score:e.keyword_score,semantics_score:e.semantic_score,rating_score:e.rating_score,sh_impressions:e.sh_impressions,sh_carts:e.sh_carts,sh_clicks:e.sh_clicks,business_rule_factor:e.business_rule_factor,relevancy_score:e.relevancy_score,creative_type:e.creative_type,ai_voucher_name:e.ai_voucher_name,ai_voucher_id:e.ai_voucher_id,additional_shipping_cost:typeof e.additionalShippingCost=="number"?e.additionalShippingCost:void 0,additional_shipping_cost_type:e.additionalShippingCostType,additional_service_cost:e.additional_service_cost,item_store_id:e.item_store_id,item_store_availability:e.item_store_availability,ad:e.ad,item_promotion_type:e.item_promotion_type,item_benefit_label:e.item_benefit_label,item_is_animated:e.item_is_animated,...r});return We({item_name:e.item_name,item_id:e.item_id,item_brand:e.item_brand,item_category:e.item_category,item_category2:e.item_category2,item_category3:e.item_category3,item_category4:e.item_category4,item_category5:e.item_category5,currency:e.currency,creative_slot:e.creative_slot,promotion_id:e.promotion_id,creative_name:e.creative_name,amount:typeof e.price=="number"?e.price:e.price?parseFloat(e.price):void 0,promotion_name:e.promotion_name,item_variant:e.item_variant,quantity:e.quantity,coupon:e.coupon,affiliation:e.affiliation,item_list_id:e.item_list_id!=null?String(e.item_list_id):void 0,item_list_name:e.item_list_name,item_list_index:e.index!=null?String(e.index):void 0,item_won_category:e.item_won_category,item_won_category2:e.item_won_category2,item_won_category3:e.item_won_category3,item_won_category4:e.item_won_category4,item_won_category5:e.item_won_category5,breadcrumb:e.breadcrumb,breadcrumb_path:e.breadcrumbPath,item_amount:e.item_amount,item_refund:e.item_refund,location_id:e.location_id,item_availability:e.item_availability,item_rating_average:e.item_rating_average,aov:e.aov,item_variant_attributes:e.item_variant_attributes,won_category_primary:e.won_category_primary,won_category_primary_path:e.won_category_primary_path,type:e.type,item_variant_group_id:e.item_variant_group_id,item_params:Object.keys(a).length>0?a:void 0})})}const Er=400*1024;function bs(t){return t>=500&&t<600||t===429||t===408}const Rs=new TextEncoder;function lr(t){return Rs.encode(JSON.stringify({Records:t})).length}class Os{constructor(e,r){this.baseUrl=e,this.serviceWorkerManager=r}async send(e,r){const a=e.map(_=>({event:kr(_,r),config:{eventType:r}})),i=this.chunkRecordsBySize(a);if(i.length===0)return!0;let o=!0;for(const _ of i)if(!await this.dispatch({Records:_})){o=!1;break}return o}chunkRecordsBySize(e){const r=[],a=[];let i=[];for(const o of e){if(lr([o])>Er){w(["Oversized DSA event (>400KB) will be sent as its own request after normal chunks:",o.event]),a.push(o);continue}const _=[...i,o];lr(_)>Er?(r.push(i),i=[o]):i=_}i.length>0&&r.push(i);for(const o of a)r.push([o]);return r}async dispatch(e){return w(["Sending batch via fetch:",e]),this.sendViaFetch(e)}sendViaServiceWorker(e){return this.serviceWorkerManager.postMessage({type:"TRACK_EVENT",payload:e})}async sendKeepalive(e,r){const a=e.map(o=>({event:kr(o,r),config:{eventType:r}}));let i=!0;for(const o of a)await this.sendViaFetch({Records:[o]},!0)||(i=!1);return i}async sendViaFetch(e,r=!1){const a={method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}};r&&(a.keepalive=!0);try{const i=await fetch(this.baseUrl,a);return i.ok?(w(["Batch sent via direct fetch:",i.status]),!0):bs(i.status)?(w(["Retryable HTTP error! status:",i.status,"- will retry"]),!1):(w(["Non-retryable HTTP error! status:",i.status,"- not retrying"]),!0)}catch(i){return w(["Failed to send batch via fetch:",i]),!1}}}class As{constructor(e){this.config={baseUrl:"/t/p/webhook",serviceWorker:{url:"/t/cdn/track-sw.js",scope:"/t/cdn/",readyTimeout:5e3}},this.initializationPromise=null,this.isInitialized=!1,this.isProcessingQueue=!1,e&&(this.config={...this.config,...e});
7const r=["www.lidl.de"],a=Wt(),i=Bt(),o=globalThis.location.hostname,_=!o.startsWith("qa.")&&!o.startsWith("test."),d=r.includes(o),g=_?d:!0;if(this.shouldRun=!a&&!i&&g,!this.shouldRun){const m=a?"mobile flow":i?"mobile session":`domain not allowed (${o})`;w(["ProxyAdapter disabled:",m]);return}this.serviceWorkerManager=new jt(this.config.serviceWorker),this.eventQueue=new Es,this.eventSender=new Os(this.config.baseUrl,this.serviceWorkerManager),this.initialize()}initialize(){this.initializationPromise||(this.initializationPromise=this.performInitialization())}async performInitialization(){try{this.serviceWorkerManager.unregister().catch(e=>{w(["ServiceWorker background unregister failed:",e])}),this.setupConsentListener(),this.setupUnloadFlush(),this.isInitialized=!0,w(["ProxyAdapter initialized successfully (SW loading in background)"]),await this.processQueue()}catch(e){w(["ProxyAdapter initialization failed:",e]),this.isInitialized=!0}}setupConsentListener(){Ce.onConsentChanged(async e=>{e!=null&&e.statistics&&(w(["Consent granted for statistics, processing queue"]),await this.processQueue())})}setupUnloadFlush(){document.addEventListener("pagehide",()=>{this.flushQueueOnUnload()})}flushQueueOnUnload(){try{if(this.isProcessingQueue)return;const e=Ce.getConsentCookie();if(!(e!=null&&e.statistics))return;const r=this.eventQueue.getAll();if(!r||r.length===0)return;w([`Flushing ${r.length} queued events on pagehide (keepalive)`]);for(const a of r){const i=$t(a.event);i&&this.eventSender.sendKeepalive([a.event],i).catch(()=>{})}this.eventQueue.clear()}catch(e){w(["Error flushing queue on pagehide:",e])}}async proxyEventToCET(e){this.shouldRun&&this.shouldProxyEvent(e)&&(this.queueEvent(e),!this.isInitialized&&this.initializationPromise&&await this.initializationPromise,this.processQueue())}shouldProxyEvent(e){return $t(e)!==null}isAutomaticEvent(e){return ar.includes(e)}queueEvent(e){this.eventQueue.add(e),w(["Event queued:",e.event,`Queue size: ${this.eventQueue.length}`])}async processQueue(){if(this.isProcessingQueue){w(["Queue processing already in progress, skipping duplicate call"]);return}this.isProcessingQueue=!0;try{const e=new Set;let r=(this.eventQueue.getAll()||[]).filter(a=>!e.has(a));for(;r.length>0;){if(!Ce.getConsentCookie().statistics){w(["Cannot process queue: no consent for statistics - waiting for consent change"]);return}w([`Processing ${r.length} queued events`]);for(const i of r){e.add(i);const o=$t(i.event);if(!o){this.eventQueue.remove(i);continue}try{await this.eventSender.send([i.event],o)?(w([`Event ${i.event.event} (${o}) sent successfully`]),this.eventQueue.remove(i)):this.eventQueue.incrementRetry(i)||(w(["Max retries reached for event:",i.event.event]),this.eventQueue.remove(i))}catch(_){w(["Error processing event:",_]),this.eventQueue.incrementRetry(i)||this.eventQueue.remove(i)}}r=(this.eventQueue.getAll()||[]).filter(i=>!e.has(i))}}catch(e){w(["Error processing queue:",e])}finally{this.isProcessingQueue=!1}}getQueueSize(){return this.eventQueue.length}isReady(){return this.isInitialized}}const Tr=new As;(function(){er();function e(g){const{eventCategory:m,eventInteractionType:y}=g.collections.eventInfo||{},{process:k}=g.collections||{},{contentID:b,contentType:P,contentLabel:O}=g.collections.content||{},{linkName:D,linkURL:F}=g.collections.click||{};let G;switch(k==null?void 0:k.stepName){case"address":G=h.ADD_SHIPPING_INFO;break;case"payment":G=h.ADD_PAYMENT_INFO;break;case"summary":G=h.CHECKOUT_SUMMARY;break;case"cart":G=h.VIEW_CART;break;case"delivery_options":G=h.ADD_DELIVERY_OPTIONS;break;default:G=void 0}let W;const $={addToCart:h.ADD_TO_CART,addToWishlist:h.ADD_TO_WISHLIST,cart:h.FLYER_CART_CLICK,current_flyers:h.FLYER_LOAD,myAccount:h.FLYER_NAVIGATION,search_by_suggest:h.FLYER_SEARCH_BY_SUGGEST,search_page_click:h.FLYER_SEARCH_PAGE_CLICK,search_term:h.FLYER_SEARCH_TERM,view_cart:h.FLYER_NAVIGATION,whislist_product:h.SELECT_ITEM,jumpmarks:h.FLYER_NAVIGATION,menu:h.FLYER_NAVIGATION,search:h.FLYER_NAVIGATION,wishlist:h.FLYER_NAVIGATION,social:h.FLYER_SOCIAL};b==="media_link"&&y==="open"?O==="product_link"||O==="product_link_gif"?W=h.SELECT_ITEM:O==="media"&&(P==="recipe"?W=h.FLYER_RECIPE_CLICK:m==="click"&&(W=h.FLYER_LINK_CLICK)):y==="open"&&m==="click"&&P==="flyer"?W=h.FLYER_LOAD:W=$[b+""]||h.SELECT_CONTENT;let Y;g.scenarioName===f.Cart_Checkbox_Click&&(b==="Cart_Checkbox_Product_Rating"?Y=h.CART_PRODUCT_RATING_CLICK:b==="Cart_Checkbox_Newsletter_OptIn"&&(Y=h.CART_NEWSLETTER_OPTIN_CLICK));const U=D&&["Slider Button","Show more"].includes(D+"")?h.SELECT_CONTENT:h.SELECT_PROMOTION,K=`${g.scenarioName}_${m||""}_${y||""}`,ne={[f.PDP_Pageload]:h.VIEW_ITEM,[f.PLP_Product_Click]:h.ADD_TO_CART,[f.PDP_Click]:h.SELECT_CONTENT,[`${f.PDP_Click}_click_add`]:h.ADD_TO_CART,[`${f.PDP_Click}_click_add_to_cart`]:h.ADD_TO_CART,[`${f.PDP_Click}
7_click_add_to_wishlist`]:h.ADD_TO_WISHLIST,[`${f.PDP_Click}_click_remove_from_wishlist`]:h.REMOVE_FROM_WISHLIST,[f.PDP_Social_Click]:h.SHARE,[f.PDP_Image_Click]:h.SELECT_CONTENT,[f.PDP_Social_Share_Click]:h.ITEM_SOCIAL_SHARE_CLICK,[f.PDP_Section_EnterViewport]:h.VIEW_CONTENT,[f.PDP_Recommendation_EnterViewport]:h.VIEW_ITEM_LIST,[f.PDP_Recommendation_Click]:h.SELECT_ITEM,[f.PDP_Rating_Click]:h.ITEM_RATINGS_CLICK,[f.PDP_Information_Load]:h.VIEW_ITEM_INFORMATION,[f.PDP_A_Goods_Link_Click]:h.ITEM_A_GOODS_LINK_CLICK,[f.PDP_B_Goods_Link_Click]:h.ITEM_B_GOODS_LINK_CLICK,[f.PDP_Downloads_Section_Click]:h.ITEM_DOWNLOADS_SECTION_CLICK,[f.PDP_Downloads_Link_Click]:h.ITEM_DOWNLOADS_LINK_CLICK,[f.PDP_Install_Calc_Link_Click]:h.ITEM_INSTALL_CALC_LINK_CLICK,[f.PDP_BackInStock_Alert_Submit]:h.ITEM_BACKINSTOCK_SUBMIT,[f.PDP_BackInStock_Alert_Success]:h.ITEM_BACKINSTOCK_SUCCESS,[f.Banner_Promotion_Load]:h.LOAD_PROMOTION,[f.General_Link_Click]:h.SELECT_CONTENT,[`${f.General_Link_Click}_click_setFavoriteStore`]:h.STORE_SET_FAVOURITE,[`${f.General_Link_Click}_click_selectRoute`]:h.STORE_SELECT_ROUTE,[`${f.General_Link_Click}_click_openStoreSearchOffCanvas`]:h.STORE_OPEN_SEARCH,[f.General_Pageload]:h.PAGE_VIEW,[f.PLP_Pageload]:h.SEARCH,[f.PLP_ProductImageSlider_Click]:h.SELECT_CONTENT,[f.PLP_Information_Load]:h.VIEW_ITEM_INFORMATION,[f.General_Product_Click]:h.SELECT_ITEM,[f.General_Product_View]:h.VIEW_ITEM_LIST,[f.General_Promotion_View]:"",[f.General_Promotion_View_Split]:h.VIEW_PROMOTION,[`${f.General_Promotion_Click}_click_Pause`]:h.SELECT_CONTENT,[`${f.General_Promotion_Click}_click_Play`]:h.SELECT_CONTENT,[`${f.General_Promotion_Click}_click_Deactivate_Coupon_Click`]:h.PROMOTION_DEACTIVATED,[f.General_Promotion_Click]:U,[f.General_Promotion_Qualified]:h.VIEW_PROMOTION,[f.General_Promotion_Shown]:h.SELECT_PROMOTION,[f.General_Teaser_Click]:h.SELECT_CONTENT,[f.General_RecommendationProduct_EnterViewport]:h.VIEW_ITEM_LIST,[f.General_SearchTermConfirm_Click]:h.SEARCH_CLICK,[f.General_Section_EnterViewport]:h.VIEW_CONTENT,[f.General_Navigation_Click]:h.SELECT_CONTENT,[f.PLP_FilterSelect_Click]:h.FILTER_SELECT,[f.PLP_FilterSelect_Intent]:h.FILTER_SELECT_INTENT,[f.PLP_FilterDeselect_Click]:h.SELECT_CONTENT,[f.PLP_Show_More_Click]:h.SELECT_CONTENT,[f.Cart_Pageload]:G,[f.Cart_Pageload_Split]:h.VIEW_CART,[`${f.Cart_Button_Click}_click_start_checkout`]:h.BEGIN_CHECKOUT,[`${f.Cart_Button_Click}_click_start_express_checkout`]:h.BEGIN_CHECKOUT,[`${f.Cart_Button_Click}_click_proceed_to_confirmation`]:h.PROCEED_TO_PAYMENT,[`${f.Cart_Button_Click}_click_remove`]:h.REMOVE_FROM_CART,[`${f.Cart_Button_Click}_click_remove_from_cart`]:h.REMOVE_FROM_CART,[`${f.Cart_Button_Click}_click_add_to_cart`]:h.ADD_TO_CART,[`${f.Cart_Button_Click}_click_add`]:h.ADD_TO_CART,[`${f.Cart_Button_Click}_click_continue_shopping`]:h.CONTINUE_SHOPPING,[`${f.Cart_Button_Click}_click_login_loginpage`]:h.CHECKOUT_LOGIN_INFO,[f.Cart_Success_Pageload]:h.PURCHASE,[`${f.Wishlist_Button_Click}_click_remove_from_wishlist`]:h.REMOVE_FROM_WISHLIST,[`${f.Wishlist_Button_Click}_click_convert_to_cart`]:h.ADD_TO_CART,[`${f.Wishlist_Button_Click}_click_Print_wishlist`]:h.PRINT_WISHLIST,[`${f.Wishlist_Button_Click}_click_add_to_wishlist`]:h.ADD_TO_WISHLIST,[`${f.Wishlist_Button_Click}_click_add`]:h.ADD_TO_WISHLIST,[f.StoreSearch_Pageload]:h.STORESEARCH_FLYOUT_SEEN,[f.StoreSearch_Click]:h.SELECT_CONTENT,[f.StoreSearchDP_Click]:h.SELECT_CONTENT,[f.MyAccount_Click]:h.SELECT_CONTENT,[`${f.Flyer_Click}_click_remove`]:h.REMOVE_FROM_WISHLIST,[`${f.Flyer_Click}_toggle_on`]:h.FLYER_ANIMATION_TOGGLE,[`${f.Flyer_Click}_toggle_off`]:h.FLYER_ANIMATION_TOGGLE,[f.Flyer_Click]:W,[f.Flyer_Categories_Select]:h.SELECT_CONTENT,[f.Flyer_View]:h.FLYER_VIEW,[`${f.Flyer_View}_view_open`]:h.FLYER_OPEN,[`${f.Flyer_View}_view_browse`]:h.VIEW_ITEM_LIST,[`${f.Flyer_View}_view_last_page`]:h.FLYER_LAST_PAGE_SEEN,[f.Flyer_ChangeViewport]:h.FLYER_CHANGEVIEWPORT,[f.Flyer_View_50]:h.FLYER_50_PERC_VIEWED,[f.Flyer_View_75]:h.FLYER_75_PERC_VIEWED,[f.Flyer_View_100]:h.FLYER_100_PERC_VIEWED,[f.Kameleoon_Experiment]:h.KAMELEOON_EXPERIMENT,[f.Order_Cancellation_Click]:h.SELECT_CONTENT,[f.Order_ViewDetails_Click]:h.SELECT_CONTENT,[f.Order_Invoice_Download_Click]:h.SELECT_CONTENT,[f.Order_Return_Click]:h.SELECT_CONTENT,[f.Order_Cancellation_Confirmation]:h.REFUND,[f.Order_Return_Confirmation]:h.REFUND,[f.Login_Link_Click]:h.LOGIN_STEP0,[f.Start_Login_Click]:h.LOGIN_STEP1,[f.Login_Button_Click]:h.LOGIN_STEP2,[f.Login_Success]:h.LOGIN,[f.Forgotten_Password_Click]:h.FORGOT_PASSWORD_CLICK,[f.Password_Reset]:h.PASSWORD_RESET,[f.Register_Link_Click]:h.START_REGISTRATION,[f.Registration_Success]:h.REGISTRATION_SUCCESS,[f.Error_Message]:h.ERROR_MESSAGE,[f.Competition_Form_Submit]:h.COMPETITION_FORM_SUBMIT,[f.Newsletter_Form_Submit]:h.NEWSLETTER_FORM_SUBMIT,[f.Newsletter_Form_Success]:h.NEWSLETTER_FORM_SUCCESS,[f.User_Consent_Update]:h.USER_CONSENT_UPDATE,[f.Review_Product_Start]:h.REVIEW_PRODUCT_START,[f.Review_Product_Click]:h.REVIEW_PRODUCT_CLICK,[f.Review_Product_Submit]:h.REVIEW_PRODUCT_SUBMIT,[f.Review_Product_Error]:h.REVIEW_PRODUCT_ERROR,[f.Review_Product_Success]:h.REVIEW_PRODUCT_SUCCESS,[f.First_Visit]:h.FIRST_VISIT,[f.Session_Start]:h.SESSION_START,[f.Add_Product_To_Wishlist_In_Flyer]:h.ADD_PRODUCT_TO_WISHLIST_IN_FLYER,[f.ProductView_In_Flyer]:h.PRODUCTVIEW_IN_FLYER,[f.Retail_StartPage_Visit]:h.RETAIL_STARTPAGE_VISIT,[f.View_Store_Article]:h.VIEW_STORE_ARTICLE,[f.WT_Visit]:h.WT_VISIT,[f.Switch_Login_Type]:h.SWITCH_LOGIN_TYPE,[f.Confirm_Token]:h.CONFIRM_TOKEN,[f.Request_New_Token]:h.REQUEST_NEW_TOKEN,[f.Confirm_Mobile_Number]:h.CONFIRM_MOBILE_NUMBER,[f.Password_Reset_Success]:h.PASSWORD_RESET_SUCCESS,[f.Contact_Customer_Service]:h.CONTACT_CUSTOMER_SERVICE,[f.Login_Accept_Terms]:h.LOGIN_ACCEPT_TERMS,[f.Register_Continue_Click]:h.REGISTER_CONTINUE_CLICK,[f.Register_Change_Phone]:h.REGISTER_CHANGE_PHONE,[f.Video_Start]:h.VIDEO_START,[f.Video_Progress]:h.VIDEO_PROGRESS,[f.Video_Complete]:h.VIDEO_COMPLETE,[f.General_Scroll_Action]:h.GENERAL_SCROLL_ACTION,[f.Promotion_Information_Click]:h.PROMOTION_INFO_VIEWED,[f.General_Product_Lo
7ad]:h.LOAD_ITEM,[f.STL_Product_Checkbox_Click]:h.SELECT_CONTENT,[f.STL_Add2Cart_Click]:h.ADD_TO_CART,[f.STL_Variant_Selected]:h.SELECT_CONTENT,[f.STL_Select_Variant_Click]:h.VIEW_ITEM_LIST,[f.Cart_Checkbox_Click]:Y,[f.Link_Click]:h.LINK_CLICK};if(g.scenarioName===f.Flyer_View&&b==="last_page"&&P==="flyer")return h.FLYER_LAST_PAGE_SEEN;if(g.scenarioName===f.Return_Chatbot_WindowOpen_Click&&O==="customer-service-chat")return h.RETURN_CHATBOT_WINDOWOPEN_CLICK;if(g.scenarioName===f.Return_Chatbot_WindowClosed_Click&&O==="scw-icon scw-close")return h.RETURN_CHATBOT_WINDOWCLOSED_CLICK;if(g.scenarioName===f.PDP_Click&&b==="PDP_Notification_Click")return h.ITEM_AVAILABLE_NOTIFY_ME;const ae="https://app.adjust.com",se=["App Store","App store","Google Play","For Hauwei","For Apple","For Android","Lidl Plus"],_e=document.location.href.search("lidl-plus")>-1;let ue=!1;typeof D=="string"&&typeof F=="string"?ue=se.some(de=>D.includes(de))||(F==null?void 0:F.startsWith(ae)):!D&&typeof F=="string"&&(ue=F==null?void 0:F.startsWith(ae));const j=ue&&(g.scenarioName===f.General_Promotion_Click||g.scenarioName===f.General_Navigation_Click),X=typeof D=="str
7ing"?g.scenarioName===f.General_Link_Click&&D.includes("Lidl Plus"):!1;if(_e&&j||X)return h.CLICK_LIDLPLUS_DOWNLOAD_LINK;if(typeof F=="string"&&/\.pdf(\?|#|$)/i.test(F)){if(g.scenarioName===f.Flyer_Click)return h.FLYER_FILE_DOWNLOAD;if(g.scenarioName!==f.PDP_Downloads_Link_Click&&g.scenarioName!==f.PDP_Information_Load&&g.scenarioName!==f.PLP_Information_Load)return h.GENERAL_FILE_DOWNLOAD}return ne[K]||ne[g.scenarioName]||rt.NOT_SUPPORTED}function r(g,m){const y={};if(m&&!m.includes("/")&&(m="Categories/"+m),m){const k=m.split("/");k.shift(),k.forEach((b,P)=>{const O=P===0?g:`${g}${P+1}`;y[O]=b.trim()})}return y}function a(g,m){return m>0&&(g===h.PURCHASE||g===h.REFUND)}function i(g){g!=null&&g.ecommerce&&(g.ecommerce.basketValueGross=0,g.ecommerce.basketValueTax=0,g.ecommerce.shippingCost=0,g.ecommerce.paymentFees=0,g.ecommerce.basketValueAOV=0,g.ecommerce.additionalShippingCost=0,g.ecommerce.basketValueNet=0,g.ecommerce.voucherValue=0,g.ecommerce.voucherCode="",g.ecommerce.zoneSurcharge=0,g.ecommerce.additionalServiceCost=0)}function o(g){return g.flatMap(m=>{const y=m;return(y==null?void 0:y.adViewBeacon)||(y==null?void 0:y.adLoadBeacon)||(y==null?void 0:y.adClickBeacon)||(y==null?void 0:y.adBasketChangeBeacon)||(y==null?void 0:y.adWishlistBeacon)?[{id:y.id,adViewBeacon:y.adViewBeacon,adClickBeacon:y.adClickBeacon,adLoadBeacon:y.adLoadBeacon,adBasketChangeBeacon:y.adBasketChangeBeacon,adWishlistBeacon:y.adWishlistBeacon}]:[]})}async function _(g,m,y=0){var U,K,ne,ae,se,_e,ue,j,X,ge,de,Re,Oe,Ae,xe,Q,Z,Se,we,ke,ve,Ee,pe,fe,De,Ye,Ge,Ie,le,ze,Je,Ue,Qe,je,Ke,Fe;const k=e(g),b=a(k,y),P=JSON.parse(JSON.stringify(g));(U=P.collections)!=null&&U.eventInfo&&(P.collections.eventInfo.eventId=ei()),P.collections.extraParams=T(P.scenarioName,P.collections,b),b&&i(P.collections);const O={event:k,method:(K=P.collections.social)==null?void 0:K.networkName,content_type:(ne=P.collections.content)==null?void 0:ne.contentType,item_id:(ae=P.collections.click)==null?void 0:ae.linkName,search_term:(se=P.collections.search)==null?void 0:se.searchTerm,ecommerce:{coupon:b?"":(_e=P.collections.ecommerce)==null?void 0:_e.voucherCode,shipping:b?0:(ue=P.collections.ecommerce)==null?void 0:ue.shippingCost,payment_type:(j=P.collections.ecommerce)==null?void 0:j.paymentMethod,transaction_id:b?`${(X=P.collections.ecommerce)==null?void 0:X.transactionID}_${y+1}`:(ge=P.collections.ecommerce)==null?void 0:ge.transactionID,cartId:(de=P.collections.ecommerce)==null?void 0:de.cartId,country:(Re=P.collections.application)==null?void 0:Re.country,currency:(Oe=P.collections.application)==null?void 0:Oe.currency,tax:b?0:(Ae=P.collections.ecommerce)==null?void 0:Ae.basketValueTax,value:b?0:(xe=P.collections.ecommerce)==null?void 0:xe.basketValueGross,adSessionId:(Q=P.collections.user)==null?void 0:Q.adSessionId,additionalShippingCostType:(Se=(Z=P.collections)==null?void 0:Z.ecommerce)==null?void 0:Se.additionalShippingCostType,additionalShippingCost:b?0:(we=P.collections.ecommerce)==null?void 0:we.additionalShippingCost,basketValueAOV:b?0:(ke=P.collections.ecommerce)==null?void 0:ke.basketValueAOV,location_id:(ve=P.collections.promotionItem)==null?void 0:ve.locationId,ad:(Ee=P.collections.promotionItem)==null?void 0:Ee.ad,payment_fees:b?0:(pe=P.collections.ecommerce)==null?void 0:pe.paymentFees,cancellation_reason:(fe=P.collections.ecommerce)==null?void 0:fe.cancellationReason,delivery_options_selected:(De=P.collections.ecommerce)==null?void 0:De.deliveryOptionsSelected,delivery_options_available:(Ye=P.collections.ecommerce)==null?void 0:Ye.deliveryOptionsAvailable,additional_service_cost:b?0:(Ge=P.collections.ecommerce)==null?void 0:Ge.additionalServiceCost,additional_services:(le=(Ie=P.collections)==null?void 0:Ie.ecommerce)==null?void 0:le.additionalServices,additional_service_type:(Je=(ze=P.collections)==null?void 0:ze.ecommerce)==null?void 0:Je.additionalServiceType,adress_type:(Qe=(Ue=P.collections)==null?void 0:Ue.ecommerce)==null?void 0:Qe.adressType,zone_surcharge:b?0:(Ke=(je=P==null?void 0:P.collections)==null?void 0:je.ecommerce)==null?void 0:Ke.zoneSurcharge,items:m.map(S=>
7{var Me,Xe,me,Ze,u,n,s,p,c,C,I,B,z,q,J,H,at,st,ot,ut,_t,dt,pt,ht,gt,ft,mt,ct,Ct,yt,Pt,It,St,wt,kt,vt,Et,lt,Tt,Lt,bt,Rt;return{coupon:S.voucherCode,coupon_value:S.voucherValue,item_name:S.name,item_id:S.parentId||S.id,item_brand:typeof S.brand=="object"?JSON.stringify(S.brand):S.brand,item_variant:S.variantId||(S.parentId?S.id:void 0),item_variant_group_id:S.variantGroupId,item_variant_attributes:S.variantAttributes,item_ad_id:S.adId,item_delivery_time:S.productDeliveryTime,item_energy_class:S.energyClass,item_environment_tax:S.environmentTax,item_forwarding_surcharge:S.forwardingSurcharge,item_gross_price:S.grossPrice,item_net_price:S.netPrice,item_rating_average:S.ratingAverage,item_sap_id:S.sapId,item_status:S.status,item_status_recommandation:S.statusRecommandation,item_trade_type:S.tradeType,item_availability:S.availability,item_shipping_cost_home:S.shippingCostHomeDeliveryCharge,item_shipping_cost_home_xl:S.shippingCostHomeDeliveryXlCharge,item_shipping_cost_parcel_locker:S.shippingCostParcelLockerDeliveryCharge,item_shipping_cost_parcel_shop:S.shippingCostParcelShopDeliveryCharge,item_value_tax:S.valueTax,item_gridboxtype:S.gridboxType||((Xe=(Me=P.collections)==null?void 0:Me.promotionItem)==null?void 0:Xe.gridboxType),item_store_id:S.storeId,item_store_availability:S.storeAvailability,item_benefit_label:S==null?void 0:S.benefitLabel,item_is_animated:S.isAnimated,breadcrumb:S.categoryPrimary,breadcrumbPath:S.categoryPrimaryPath,...r("item_category",S.categoryPrimary),...r("item_won_category",S.wonCategoryPrimary),item_list_name:S.listName,item_list_id:S.listId,index:S.position,aov:S.aov,ranking:S.ranking,affiliation:S.tradeType,quantity:S.quantity,currency:S.currency,price:S.price,ad:S.ad||S.adId||((Ze=(me=P.collections)==null?void 0:me.promotionItem)==null?void 0:Ze.ad),item_creative_master_name:S.creativeMasterName||((n=(u=P.collections)==null?void 0:u.promotionItem)==null?void 0:n.creativeMasterName),creative_name:S.creativeName||((p=(s=P.collections)==null?void 0:s.promotionItem)==null?void 0:p.creativeName),creative_slot:S.creativeSlot||((C=(c=P.collections)==null?void 0:c.promotionItem)==null?void 0:C.creativeSlot),creative_type:S.creativeType||((B=(I=P.collections)==null?void 0:I.promotionItem)==null?void 0:B.creativeType),promotion_id:((z=S==null?void 0:S.promotionId)==null?void 0:z.toString())||((H=(J=(q=P.collections)==null?void 0:q.promotionItem)==null?void 0:J.promotionId)==null?void 0:H.toString()),promotion_name:S.promotionName||((st=(at=P.collections)==null?void 0:at.promotionItem)==null?void 0:st.promotionName),sectionID:S.sectionID||((ut=(ot=P.collections)==null?void 0:ot.promotionItem)==null?void 0:ut.sectionID),sectionName:S.sectionName||((dt=(_t=P.collections)==null?void 0:_t.promotionItem)==null?void 0:dt.sectionName),ai_voucher_name:(ht=(pt=P.collections)==null?void 0:pt.promotionItem)==null?void 0:ht.aiVoucherName,ai_voucher_id:(ft=(gt=P.collections)==null?void 0:gt.promotionItem)==null?void 0:ft.aiVoucherId,item_marketing_campaign_code:S.marketingCampaignCode||((ct=(mt=P.collections)==null?void 0:mt.promotionItem)==null?void 0:ct.marketingCampaignCode),linkURL:S.linkURL||((yt=(Ct=P.collections)==null?void 0:Ct.promotionItem)==null?void 0:yt.linkURL)||((It=(Pt=P.collections)==null?void 0:Pt.click)==null?void 0:It.linkURL),additionalShippingCost:S.additionalShippingCost,additionalShippingCostType:S.additionalShippingCostType,type:S.type||((wt=(St=P.collections)==null?void 0:St.promotionItem)==null?void 0:wt.type),return_reason:S.returnReason,return_quantity:S.returnQuantity,return_unpacked:S.returnUnpacked,variants_available:S==null?void 0:S.variantsAvailable,variants_total:S==null?void 0:S.variantsTotal,storeName:S.storeName,freshness_score:S.freshnessScore,keyword_score:S.keywordScore,semantic_score:S.semanticScore,rating_score:S.ratingScore,sh_impressions:S.searchHubImpressions,sh_carts:S.searchHubCarts,sh_clicks:S.searchHubClicks,business_rule_factor:S.businessRuleFactor,relevancy_score:S.relevancyScore,review_rating_general:S.review_rating_general,review_rating_quality:S.review_rating_quality,review_rating_price:S.review_rating_price,review_rating_fitting:S.review_rating_fitting,review_recommend_product:S.review_recommend_product,goods_type:S.goodsType,additional_service_cost:S.additionalServiceCost,won_category_primary:S.wonCategoryPrimary,won_category_primary_path:S.wonCategoryPrimaryPath,lp_discount_perc:S.lp_discount_perc||((vt=(kt=P.collections)==null?void 0:kt.promotionItem)==null?void 0:vt.lp_discount_perc),lp_discount_amount:S.lp_discount_amount||((lt=(Et=P.collections)==null?void 0:Et.promotionItem)==null?void 0:lt.lp_discount_amount),item_promotion_type:S.promotionType||((Lt=(Tt=P.collections)==null?void 0:Tt.promotionItem)==null?void 0:Lt.promotionType),promotion_free_shipping:S.promotion_free_shipping||((Rt=(bt=P.collections)==null?void 0:bt.promotionItem)==null?void 0:Rt.promotion_free_shipping),lp_price:S.lp_price,keyword_score_raw:S.keywordScoreRaw}})},lidldata:{...P.collections}},D=new vs(O,g==null?void 0:g.scenarioName),F=[h.VIEW_ITEM,h.VIEW_ITEM_LIST,h.ADD_TO_CART,h.REMOVE_FROM_CART,h.VIEW_CART,h.ADD_SHIPPING_INFO,h.ADD_PAYMENT_INFO,h.BEGIN_CHECKOUT,h.CHECKOUT_SUM
7MARY,h.PURCHASE,h.SELECT_ITEM];[h.SELECT_PROMOTION,h.SELECT_ITEM,h.PURCHASE,h.ADD_TO_CART,h.VIEW_ITEM_LIST].some(S=>S===O.event)&&D.savePromotionInformation(),F.some(S=>S===O.event)&&(O.ecommerce.items=D.enrichItemsWithPromotions(O.event));const W=[h.LOAD_PROMOTION,h.LOAD_ITEM_LIST,h.VIEW_CONTENT];typeof O.event=="string"&&Hr(O.event)&&W.includes(O.event)&&(O.serializedEcommerce=JSON.stringify(O.ecommerce)),(Fe=O==null?void 0:O.lidldata)!=null&&Fe.promotionItem&&delete O.lidldata.promotionItem;const $=We(O);if(await Tr.proxyEventToCET($),Tr.isAutomaticEvent($.event))return;const Y={detail:{...$}},V=new CustomEvent("datalayerservice:ga4",Y);Y.detail.event!==rt.NOT_SUPPORTED&&(document.dispatchEvent(V),window.dataLayerNext.push({...$,_clear:!0}))}function d(g){var Y,V,U,K,ne,ae,se,_e,ue;const m=g.detail,y=(((V=(Y=m.collections)==null?void 0:Y.products)==null?void 0:V.list)||((K=(U=m.collections)==null?void 0:U.promotionItem)==null?void 0:K.products)||[]).filter(j=>!!j);let k=[],b=[];m.collections.promotions?k=[...((ne=m.collections.promotions)==null?void 0:ne.list)||[]].filter(j=>j!==void 0):(ae=m.collections)!=null&&ae.promotionItem&&(k=[m.collections.promotionItem]),!((se=m.collections)!=null&&se.products)&&!((ue=(_e=m.collections)==null?void 0:_e.promotionItem)!=null&&ue.products)?b=k:b=y;const P={...m.collections||{}};if(delete P.products,delete P.promotions,P.promotionItem){const{products:j,...X}=P.promotionItem;P.promotionItem=X}const O=j=>{const X=o(j);return{...m,collections:{...P,...X.length>0?{products:{list:X}}:{}}}},D=[],F=13*1024,G=200,W=[];let $=[];for(const j of b){const X=[...$,j],ge={...O(X),items:X},de=new Blob([JSON.stringify(ge)]).size;X.length>G||de>F?$.length>0?(W.push($),$=[j]):(W.push([j]),$=[]):$=X}$.length>0&&W.push($);for(const j of W)D.push({src:O(j),items:j});return W.length||D.push({src:O(b),items:b}),D}document.addEventListener("datalayerservice:push",async g=>{const m=d(g);for(let y=0;y<m.length;y++){const{src:k,items:b}=m[y];await _(k,b,y)}})})();let Vt=null;const xs=async()=>{if(Vt){re.log("[FirebaseBridge] Instance already exists, skipping initialization");return}Vt=new qr;try{Vt.bootstrap()}catch(t){re.log(["[FirebaseBridge] Error bootstrapping FirebaseBridge:",t]),Vt=null}},Ds=()=>window.location.search.includes("layout=flyer"),Fs=()=>window.self!==window.top,Vs=()=>!(Wt()||Mt()||Fs()&&Ds());(async()=>{er();const t=Mt(),e=Wt(),{hostname:r}=window.location,a=async()=>{ui.includes(r)&&Vs()&&ti();try{const d=new URL(window.location.href).searchParams.get("awc");d&&d!=="undefined"&&await fetch(`/t/gtm/echo-cookie?awin=${d}`)}catch(_){w(["[DataLayerService] Error processing awin cookie:",_])}},i=async()=>
7{(t||e)&&(d=>_i.some(g=>d===g||d.endsWith(`.${g}`)))(r)?await xs():w("[FirebaseBridge] Skipping bootstrap due to unmet conditions")},o=_=>{_.init();const{dlsLoadedAndPVChecked:d,dataLayerService:g,location:m}=window,{pathname:y}=m,b=![/\/c\/[^]+\/s\d+/,/\/c\/[^]+\/a\d+/,/\/checkout\/flow/,/^\/[a-z]{2}-[A-Z]{2}\/?$/,/^\/$/].some(P=>P.test(y));g!=null&&g.initialized&&!d&&b&&_.push({scenarioName:f.General_Pageload,collections:{}}),ni()};Ce.onConsentChanged(async _=>{const{statistics:d,marketing:g}=_;if(g&&await a(),await i(),d){const m=new $e(window);await(oi.has(window.location.hostname)?m.bootstrap().catch(P=>(w(["[DataLayerService] Error bootstrapping DataLayerService:",P]),null)):null)!==null&&o(m)}})})()})();

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.