PageSourceSearch

https://www.lidl.lu/s/cookie-script.min.js

js lidl.lu collected 2026-10-02 18:35:54 UTC 4,702 bytes, 1 lines download raw bytes

1let s=365,l="stgcct",c="wh",u="zn",g="eslgn",m="esgeo",d=".api.schwarz/odj/stores-api/v2/myapi/stores-frontend/stores",p="KxboQtt40BG4VpBL16IhaRd2CXh0QbAc";function f(e){e=document.cookie.match(new RegExp("(?:^|; )"+e.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));return e?decodeURIComponent(e[1]):void 0}function h(e,t,n,o){let r="",a,i=(n&&((a=new Date).setTime(a.getTime()+24*n*60*60*1e3),r="expires="+a.toUTCString()),"");o&&(i="; path="+o);n=e+"="+t+"; "+r+i+"; secure; SameSite=Lax;";document.cookie=n}function w(){var e=window.location.hostname;return e.startsWith("localhost")||e.startsWith("stores-frontend.local")?"qas":e.startsWith("dev.")?"dev":e.startsWith("test.")?"test":e.startsWith("qa.")||"localhost"===e?"qas":"live"}async function v(e,t=null,n=null){var o="https://"+w()+d,r=new URLSearchParams,e=(r.append("country_code",e),t?r.append("object_number",t):n&&r.append("customer_id",n),o+"?"+r.toString());try{var a,i=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json","x-apikey":p}});return i.ok&&(a=await i.json()).items&&0<a.items.length?a.items[0]:null}catch(e){return console.error("error",e),null}}function k(e){console.error("Geolocation failed",e.message)}function y(e){return null!=e&&"null"!==e?e:""}function D(){var e=(new Date).getTime();h(l,encodeURIComponent(e.toString()),s,"/")}(async()=>{var e,t,n,o,r=f("ar"),a=f("customer-info");n=window.mindShiftNav?.country,o=window.mindShiftNav?.locale;let i=n||((n=(()=>
1{if(o)return o;if(console.warn("locale and/or country from mindShiftNav is not available ... trying browser fallbacks"),"undefined"!=typeof navigator&&0<navigator.languages?.length)for(var n of navigator.languages){var e=(()=>{if(n||locales){let t=n.replace("_","-"),e=locales.find(e=>e.toLowerCase()===t.toLowerCase());if(e)return e}})();if(e)return console.info("Uses browser fallback from navigator.languages",e),e}console.error("Browser fallback can't be used")})())&&n.includes("-")?n.split("-")[1]:"");r?(n=(e=>{var t,n=new Map;for(t of e.split(";")){var o=t.split(/=(.*)/s);2<=o.length&&n.set(o[0],o[1])}return n})(r),r=i,t=n.get("EntityID").padStart(5,"0"),r="XI"!==r?r+t:"NI"+t,i&&r&&(void 0===(t=f(l))||(t=parseInt(t),!isNaN(t)&&2592e6<(new Date).getTime()-t)?((t=await v(i,r))&&(e=t.marketingData.offerRegion,t=t.marketingData.zone,null!=e&&(h(c,y(e),s,"/"),n.set("ar",y(e)),e=Array.from(n,([e,t])=>e+"="+t).join(";"),h("ar",encodeURIComponent(e),s,"/")),null!=t)&&h(u,y(t),s,"/"),D()):(f(c)||h(c,n.get("ar"),s,"/"),f("st")||h("st",n.get("EntityID"),s,"/"),f(u)||(e=await v(i,r))&&void 0!==e.marketingData.zone&&h(u,y(e.marketingData.zone),s,"/"),f(l)||D()))):"ES"===i&&(t=f(g),a&&(n=(new Date).getTime(),h(g,encodeURIComponent(n.toString()),null,"/")),!t&&f(g)&&(r=(e=>{if(!e)return null;try{var t=e.replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(t).split("").map(function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(n).customerNumber||(console.error("customerNumber not found."),null)}catch(e){return console.error("error",e),null}})(a))&&(e=await v(i,null,r))&&(n=y(e.marketingData.offerRegion),t=y(e.marketingData.zone),h(c,n,null,"/"),h(u,t,null,"/")),f(u)||f(m)||(a=(new Date).getTime(),h(m,encodeURIComponent(a.toString()),null,"/"),navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>(async(e,n)=>{let o=await(async(e,t,n)=>{e="https://"+w()+d+"?country_code="+e+"&nearby="+t+","+n+":50&limit=1&offset=0";try{var o,r=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json","x-apikey":p}});if(r.ok)return(o=await r.json())?o.items[0]:null}catch(e){return console.error("Error fetching stores",e),null}})(n,e.coords.latitude,e.coords.longitude);if(o){n=y(o.marketingData.offerRegion),e=y(o.marketingData.zone);h(c,n,null,"/"),h(u,e,null,"/");let t="";"BAL"!==o.marketingData.zone&&"CAN"!==o.marketingData.zone&&51!==o.marketingData.offerRegion&&52!==o.marketingData.offerRegion||(()=>{let o="/s/storesearch-frontend/26_20_3/store-search-pop-up.js";return document.querySelector(`script[src="${o}"]`)?Promise.resolve():new Promise((e,t)=>{var n=document.createElement("script");n.src=o,n.type="module",n.async=!0,n.onload=()=>{e()},n.onerror=e=>{console.error("Error loading pop-up script.",e),t(e)},document.head.appendChild(n)})})().then(()=>{"BAL"===o.marketingData.zone||"CAN"===o.marketingData.zone?t=o.marketingData.zoneName:51!==o.marketingData.offerRegion&&52!==o.marketingData.offerRegion||(t=o.marketingData.offerRegionName);var e=new CustomEvent("open-store-search-pop-up",{detail:{detectedRegion:t}});window.dispatchEvent(e)})}})(e,i),k):console.warn("Geolocation is not supported by your browser.")))})();

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.