u in p?I(p,u,enumerable:!0,configurable:!0,writable:!0,value:d):p[u]=d;var a=(p,u,d)=>A(p,typeof u!=”symbol”?u+””:u,d);(function()(?c.testId===o.id)async isTargetAudience(t,e,s)t.device===e.device)&&(t.visitorOption===”all”visitorCreatedDuringTestActive(t)let e=””;for(const s of t)i.type===2).some(i=>i.timestampe.concat(s.hypotheses),[]).find(e=>this.state.essential.visitorTests.some(s=>s.hypothesisId===e.id))getHypothesis(t)return this.testConfigs.filter(e=>e.hypotheses.some(s=>s.id===t)).map(e=>e.hypotheses.find(s=>s.id===t))[0]hasThemeTest(t)return t.some(e=>e.hypotheses.some(s=>s.type===”theme”))hasTestThatIsNotThemeTest(t)return t.some(e=>e.hypotheses.some(s=>s.type!==”theme”))hasThemeAndOtherTestTypes(t)return this.hasThemeTest(t)&&this.hasTestThatIsNotThemeTest(t)visitorActiveTestType()const t=this.state.essential.visitorTests.filter(e=>this.testConfigs.some(s=>s.hypotheses.some(i=>i.id==e.hypothesisId)));return t.length===0?null:t.some(e=>e.isThemeTest)?”theme”:”templateOrUrlRedirect”pickHypothesis(t)let e=Math.random();const s=t.hypotheses.reduce((o,n)=>o+n.visitorCount,0);return t.hypotheses.sort((o,n)=>o.isControl?n.isControl?0:-1:n.isControl?1:0).reduce((o,n)=>t.type===2)typeFromTemplate()switch(template.type)case”collection-list”:return”collectionList”;case”page”:return”landing”;case”article”:case”blog”:case”cart”:case”collection”:case”index”:case”product”:case”search”:return template.type;default:return nullqueueRedirect(t)this.saveState(),window.setTimeout(()=>window.location.assign(t),0)async syncAllEvents()const t=async()=>if(this.isSyncing)window.setTimeout(()=>void(async()=>await t())(),500);returntrythis.isSyncing=!0,await this.syncEvents(),this.syncGAEvents()finallythis.isSyncing=!1;await t()async syncEvents()this.state.analytics.queue.length===0)return;const t=this.state.analytics.queue.length,e=this.state.analytics.queue.splice(0,t);this.log(“Syncing %s events”,t);tryconst s=await this.makeJsonRequest(method:”post”,url:`$this.host/api/v0/events`,data:JSON.stringify(shop:this.shop,shopifyAnalyticsId:this.shopifyAnalyticsId,events:e));(visitorTests:this.state.essential.visitorTests,…this.state.analytics.visitor=s),this.state.analytics.visitor.storedAt=new Datecatchthis.state.analytics.queue.splice(0,0,…e)finallythis.saveState()syncGAEvents()if(!this.useGtagsendGtagEvent(t,e)this.log(“Sending gtag event for”,t,e);const s=exp_variant_string:`SL-$t-$e`;this.shopliftDebug&&Object.assign(s,debug_mode:!0),gtag(“event”,”experience_impression”,s)async getRemoteVisitor(t)return await this.makeJsonRequest(method:”get”,url:`$this.host/api/v0/visitors/$t`)async updateShopifyAnalyticsId(t,e)return await this.makeJsonRequest(method:”put”,url:`$this.host/api/v0/visitors/$t`,data:JSON.stringify(shop:this.shop,shopifyAnalyticsId:e))getUTMValue(t)const s=decodeURIComponent(window.location.search.substring(1)).split(“&”);for(let i=0;it&&window.document.documentElement.classList.remove(t)async getCartState()trylet t=await this.makeJsonRequest(method:”get”,url:`$window.location.origin/cart.js`);return t.note===null&&(t=await this.makeJsonRequest(method:”post”,url:`$window.location.origin/cart/update.js`,data:JSON.stringify(note:””))),tcatch(t)return this.log(“Error sending cart info”,t),nullasync makeJsonRequest(t)return(await […]
u in p?I(p,u,enumerable:!0,configurable:!0,writable:!0,value:d):p[u]=d;var a=(p,u,d)=>A(p,typeof u!=”symbol”?u+””:u,d);(function()inapp;) ?)searchconsiderRedirect(t)t.redirectPath&&!s.pathname.endsWith(t.redirectPath))return this.log(“Hiding page to redirect for template test”),this.hidePage(),!0;return this.log(“Not redirecting”),!1redirect(t)if(this.log(“Redirecting to hypothesis ‘%s'”,t.id),t.isControl)return;const e=new URL(window.location.toString());if(t.redirectPath)const s=RegExp(“^(/w2-w2)/”).exec(e.pathname);if(s&&s.length>1)const i=s[1];e.pathname=`$i$t.redirectPath`else e.pathname=t.redirectPathelse t.type===”theme”?(e.searchParams.set(“_ab”,”0″),e.searchParams.set(“_fd”,”0″),e.searchParams.set(“_sc”,”1″),e.searchParams.set(“preview_theme_id”,t.themeId.toString())):t.type!==”urlRedirect”&&e.searchParams.set(“view”,t.affix);this.queueRedirect(e)buildBaseVisitor()const t=this.getDeviceType(),e=this.getUTMValue(“utm_source”)??””,s=this.getUTMValue(“utm_medium”)??””,i=this.getUTMValue(“utm_campaign”)??””,o=this.getUTMValue(“utm_content”)??””,n=window.document.referrer;returnshopifyAnalyticsId:this.shopifyAnalyticsId,device:t!==”tablet”?t:”mobile”,utmSource:e,utmMedium:s,utmCampaign:i,utmContent:o,referrer:ncheckForThemePreview()this.state.essential.visitorTests.some(t=>t.isThemeTest&&!this.getHypothesis(t.hypothesisId)&&(t.themeId==nulltestsForUrl(t)o.type===”theme”async filterTestsByAudience(t,e,s)async isTargetAudience(t,e,s)let i=null;t.requiresCountry&&(this.log(“Hiding page to check geoip”),this.hidePage(),i=await this.makeJsonRequest(method:”get”,url:`$this.host/api/v0/visitors/get-country`,signal:AbortSignal.timeout(this.getCountryTimeout)).catch(n=>(this.log(“Error getting country”,n),null)));const o=this.getChannel(e);return(t.device===”all”visitorCreatedDuringTestActive(t)let e=””;for(const s of t)i.type===2).some(i=>i.timestampe.concat(s.hypotheses),[]).find(e=>this.state.essential.visitorTests.some(s=>s.hypothesisId===e.id))getHypothesis(t)return this.testConfigs.filter(e=>e.hypotheses.some(s=>s.id===t)).map(e=>e.hypotheses.find(s=>s.id===t))[0]hasThemeTest(t)return t.some(e=>e.hypotheses.some(s=>s.type===”theme”))hasTestThatIsNotThemeTest(t)return t.some(e=>e.hypotheses.some(s=>s.type!==”theme”))hasThemeAndOtherTestTypes(t)return this.hasThemeTest(t)&&this.hasTestThatIsNotThemeTest(t)visitorActiveTestType()const t=this.state.essential.visitorTests.filter(e=>this.testConfigs.some(s=>s.hypotheses.some(i=>i.id==e.hypothesisId)));return t.length===0?null:t.some(e=>e.isThemeTest)?”theme”:”templateOrUrlRedirect”pickHypothesis(t)let e=Math.random();const s=t.hypotheses.reduce((o,n)=>o+n.visitorCount,0);return t.hypotheses.sort((o,n)=>o.isControl?n.isControl?0:-1:n.isControl?1:0).reduce((o,n)=>if(o!==null)return o;const r=t.hypotheses.reduce((l,T)=>l&&T.visitorCount>20,!0)?n.visitorCount/s-n.trafficPercentage:0;return et.type===1typeFromTemplate()switch(template.type)case”collection-list”:return”collectionList”;case”page”:return”landing”;case”article”:case”blog”:case”cart”:case”collection”:case”index”:case”product”:case”search”:return template.type;default:return nullqueueRedirect(t)this.saveState(),window.setTimeout(()=>window.location.assign(t),0)async syncAllEvents()const t=async()=>if(this.isSyncing)window.setTimeout(()=>void(async()=>await t())(),500);returntrythis.isSyncing=!0,await this.syncEvents(),this.syncGAEvents()finallythis.isSyncing=!1;await t()async syncEvents()this.state.analytics.queue.length===0)return;const t=this.state.analytics.queue.length,e=this.state.analytics.queue.splice(0,t);this.log(“Syncing %s events”,t);tryconst s=await this.makeJsonRequest(method:”post”,url:`$this.host/api/v0/events`,data:JSON.stringify(shop:this.shop,shopifyAnalyticsId:this.shopifyAnalyticsId,events:e));(visitorTests:this.state.essential.visitorTests,…this.state.analytics.visitor=s),this.state.analytics.visitor.storedAt=new Datecatchthis.state.analytics.queue.splice(0,0,…e)finallythis.saveState()syncGAEvents()this.state.analytics.gaQueue.length===0)return;const t=this.state.analytics.gaQueue.length;this.log(“Syncing %s ga events”,t);const e=()=>let s=this.state.analytics.gaQueue.splice(0,1)[0];tryfor(;s;)this.sendGtagEvent(s.testId,s.hypothesisId),s=this.state.analytics.gaQueue.splice(0,1)[0]catchs&&this.state.analytics.gaQueue.splice(0,0,s)finallythis.persistAnalyticsState();typeof window.gtag!=”function”?(this.log(“gtag not found, deferring until load”),document.addEventListener(“DOMContentLoaded”,e)):(this.log(“Calling gtag”),e())sendGtagEvent(t,e)this.log(“Sending gtag event for”,t,e);const s=exp_variant_string:`SL-$t-$e`;this.shopliftDebug&&Object.assign(s,debug_mode:!0),gtag(“event”,”experience_impression”,s)async getRemoteVisitor(t)return await this.makeJsonRequest(method:”get”,url:`$this.host/api/v0/visitors/$t`)async updateShopifyAnalyticsId(t,e)return await this.makeJsonRequest(method:”put”,url:`$this.host/api/v0/visitors/$t`,data:JSON.stringify(shop:this.shop,shopifyAnalyticsId:e))getUTMValue(t)const s=decodeURIComponent(window.location.search.substring(1)).split(“&”);for(let i=0;it&&window.document.documentElement.classList.remove(t)async getCartState()trylet t=await this.makeJsonRequest(method:”get”,url:`$window.location.origin/cart.js`);return t.note===null&&(t=await this.makeJsonRequest(method:”post”,url:`$window.location.origin/cart/update.js`,data:JSON.stringify(note:””))),tcatch(t)return this.log(“Error sending cart info”,t),nullasync makeJsonRequest(t)return(await this.makeRequest(t)).json()async makeRequest(t)this.host.includes(“ngrok-free.app”))&&c.append(“ngrok-skip-browser-warning”,”1234″);const r=await this.fetch(e,method:s,headers:c,body:o,signal:n);if(!r.ok)if(r.status==422)(this.state.essential.visitorTests.push(testId:e.id,hypothesisId:s.id,isThemeTest:s.type===”theme”,themeId:s.themeId),this.queueGAEvent(testId:e.id,hypothesisId:s.id),this.queueEvent(new v(this.shop,t,e.id,s.id)))queueAddVisitorToTest(t,e)this.state.essential.visitorTests.some(s=>s.testId===t.id)queueCartUpdate(t)this.queueEvent(new k(t))queuePageView(t)this.queueEvent(new b(t))queueEvent(t)this.state.analytics.queue.push(t)queueGAEvent(t)legacyGetLocalStorageVisitor()const t=this.localStorageGet(this.legacySessionKey);if(t)tryreturn JSON.parse(t)catchreturn nullsaveState()this.persistEssentialState(),this.persistAnalyticsState()loadState()const t=essential:this.loadEssentialState(),analytics:this.loadAnalyticsState(),e=this.legacyGetLocalStorageVisitor(),s=this.legacyGetCookieVisitor(),i=[e,s].filter(o=>o!==null).sort((o,n)=>+n.storedAt-+o.storedAt)[0];return t.analytics.visitor===null&&i&&(visitorTests:t.essential.visitorTests,…t.analytics.visitor=i,this.deleteCookie(“SHOPLIFT”),this.deleteLocalStorage(this.legacySessionKey)),!t.essential.consentApproved&&t.essential.hasConsentInteraction&&this.deleteLocalStorage(this.analyticsSessionKey),tloadEssentialState()const t=this.loadLocalStorage(this.essentialSessionKey),e=this.loadCookie(this.essentialSessionKey),s=timestamp:new Date,consentApproved:!1,hasConsentInteraction:!1,debugMode:!1,visitorTests:[],isMerchant:!1;return[t,e].filter(i=>i!==null).sort((i,o)=>+o.timestamp-+i.timestamp)[0]??sloadAnalyticsState()const t=this.loadLocalStorage(this.analyticsSessionKey),e=this.loadCookie(this.analyticsSessionKey),s=timestamp:new Date,visitor:null,queue:[],gaQueue:[];return[t,e].filter(i=>i!==null).sort((i,o)=>+o.timestamp-+i.timestamp)[0]??spersistEssentialState()this.log(“Persisting essential state”),this.persistLocalStorageState(this.essentialSessionKey,this.state.essential),this.persistCookieState(this.essentialSessionKey,this.state.essential)persistAnalyticsState()this.log(“Persisting analytics state”),this.persistLocalStorageState(this.analyticsSessionKey,this.state.analytics),this.state.essential.consentApproved&&this.persistCookieState(this.analyticsSessionKey,this.state.analytics)loadLocalStorage(t)const e=this.localStorageGet(t);return e===null?null:JSON.parse(e)loadCookie(t)const e=this.getCookie(t);return e===null?null:JSON.parse(e)persistLocalStorageState(t,e)e.timestamp=new Date,this.localStorageSet(t,JSON.stringify(e))persistCookieState(t,e)e.timestamp=new Date;const s=JSON.stringify(e),i=new Date(new Date().getTime()+864e5*365).toUTCString();document.cookie=`$t=$s;domain=.$window.location.hostname;path=/;expires=$i;SameSite=Strict;`deleteCookie(t)const e=new Date(0).toUTCString();document.cookie=`$t=;domain=.$window.location.hostname;path=/;expires=$e;`deleteLocalStorage(t)window.localStorage.removeItem(t)getChannel(t)var s;return((s=[“name”:”cross-network”,”test”:(v) => new RegExp(“.*cross-network.*”, “i”).test(v.utmCampaign),“name”:”direct”,”test”:(v) => v.utmSource === “” && v.utmMedium === “”,shopping.yahoo.com,startsiden.no,posterous,youtube,expandable,paid.*)$”, “i”).test(v.utmMedium),lite.qwant.com,caringbridge.org,disneyplus.com,suche.aol.de,app, new RegExp(“^(?:email,“name”:”affiliate”,”test”:(v) => v.utmMedium.toLowerCase() === “affiliate”,“name”:”audio”,”test”:(v) => v.utmMedium.toLowerCase() === “audio”, v.utmMedium.toLowerCase() === “sms”,].find(i=>i.test(t)))==null?void 0:s.name)??”other”getShopifyAnalyticsId()return this.getCookie(“_shopify_y”)legacyGetCookieVisitor()const t=this.getCookie(“SHOPLIFT”);return t===null?null:JSON.parse(t)getCookie(t)const e=this.cookie.split(“; “).filter(s=>s.split(“=”).at(0)===t).at(0);return e===void 0?null:e.split(“=”).slice(1).join(“=”)monitorConsentChange()document.addEventListener(“visitorConsentCollected”,t=>void(async()=>await this.onConsentChange(t.detail.analyticsAllowed,!0))()),document.readyState===”loading”?document.addEventListener(“DOMContentLoaded”,()=>this.loadShopifyConsentApiWithRetry()):this.loadShopifyConsentApiWithRetry()loadShopifyConsentApiWithRetry()let t=0;const e=()=>t++<10&&window.setTimeout(e,100);e()loadShopifyConsentApi()if(window.Shopify)this.log("Loading Shopify features");const t=async()=>if(!window.Shopify)this.log(“Shopify object missing… suddenly?”);returnif(window.Shopify.customerPrivacy===void 0)this.log(“Shopify CustomerPrivacy api still missing, trying again in 1000ms”),e=window.setTimeout(()=>void(async()=>await t())(),1e3);returnconst s=window.Shopify.customerPrivacy.getTrackingConsent();await this.onConsentChange(window.Shopify.customerPrivacy.analyticsProcessingAllowed(),s!==”no_interaction”);let e=window.setTimeout(()=>void(async()=>await t())(),5e3);return window.Shopify.loadFeatures([name:”consent-tracking-api”,version:”0.1″],s=>(async()=>if(window.clearTimeout(e),s)this.log(“Error loading consent tracking”,s);returnawait t())()),!0return!1async onConsentChange(t,e)trycatch(s)this.log(“Error syncing on consent change”,s)isThemePreview()tryreturn isThemePreviewcatch(t)if(t instanceof ReferenceError)tryreturn themeRole!==”main”catch(e)if(e instanceof ReferenceError)return window.document.cookie.includes(“preview_theme=1”);throw eelse throw tclearThemeBar()this.log(“Setting theme bar to be cleared”),this.waitForElement(“#preview-bar-iframe”).then(t=>this.log(“Clearing theme bar”),t.remove()).catch(t=>console.error(t))waitForElement(t)return new Promise(e=>const s=document.querySelector(t);if(s)e(s);returnconst i=new MutationObserver(o=>const n=document.querySelector(t);if(n)i.disconnect(),e(n);return);i.observe(document.documentElement,childList:!0,subtree:!0))setDebug(t)this.state.essential.debugMode=t,this.saveState()log(t,…e)!this.state.essential.debugMode&&!this.shopliftDebugdebug()const t=state:this.state,storage:essential:this.loadLocalStorage(this.essentialSessionKey),analytics:this.loadLocalStorage(this.analyticsSessionKey),params:shop:this.shop,host:this.host,eventHost:this.eventHost,cssHideClass:this.cssHideClass,testConfigs:this.testConfigs,sendPageView:this.sendPageView;console.log(JSON.stringify(t))(async function())())(); )(“/”, suffix: “”, type: “index” , “main”, 138374545561, false)]]> Plug Refurbished Laptops/Tablets/Watches & Unlocked Phones `form[action*=’/$t’]:not([data-nocaptcha=’true’]) input[name=’form_type’][value=’$e’]`)).join(‘,’);function s(t,e,n=!1)tryconst o=window.sessionStorage;for(const[n,c]of Object.entries(JSON.parse(o.getItem(e))))t.elements[n]&&(t.elements[n].value=c);n&&o.removeItem(e)catchconst a=’form_key’,i=[‘recaptcha-v3-token’,’g-recaptcha-response’,’h-captcha-response’,’password’],u=()=>tryreturn window.sessionStoragecatchreturn,m=t=>t.elements[a],f=’form_type’,d=’cptcha’;function p(t)t.dataset[d]=!0const l=window,h=l.document,_=’Shopify’,y=’ce_forms’,E=’captcha’;let v=!1;((t,e)=>)()();]]> Array.from(document.getElementById(‘oke-reviews-body-template’)?.content.children)?.forEach(function(child)if(!Array.from(document.body.querySelectorAll(‘[data-oke-id=’.concat(child.getAttribute(‘data-oke-id’),’]’))).length)document.body.prepend(child)),once:true);]]> > TriplePixel :: start*/ window.TriplePixelData=TripleName:”plugtechh.myshopify.com”,ver:”2.16″,plat:”SHOPIFY”,isHeadless:false,src:’SHOPIFY_EXT’,product:id:””,name:“,price:””,variant:””,search:””,collection:””,cart:”drawer”,template:”index”,function(W,H,A,L,E,_,B,N)function O(U,T,P,H,R))),H.onreadystatechange=function()(N[B]=R)):(299
let storage try storage = window[type] const x = ‘__storage_test__’ storage.setItem(x, x) storage.removeItem(x) return true catch (e) // Firefox e.code === 1014 , getItem(key) if (StatusAppEmbed.storageAvailable(‘localStorage’)) return localStorage.getItem(key) return null , setItem(key, value) if (StatusAppEmbed.storageAvailable(‘localStorage’)) localStorage.setItem(key, value) } ]]> const getIsActive = () => const timeout = StatusAppEmbed.getItem(‘status-timeout’); const isInTimeout = timeout && timeout > Date.now(); return StatusAppEmbed.getItem(‘status-state’) !== ‘off’ && !isInTimeout && window.statusEnabled !== false; /** * If not found on this list, account links will just go to the for you page */ const replacements = ‘/account/logout’: ‘#status-profile’, ; const methods = /** * Replace existing account links on a page with a link to the widget */ replaceLinks: () => document.querySelectorAll(‘a[href*=”/account”]’).forEach((el) => const href = el.getAttribute(‘href’); // External links should be ignored if (href.includes(‘http’) && !href.includes(location.origin)) return; // App proxy links should be ignored const prefixes = [‘apps’, ‘a’, ‘community’, ‘tools’] const isAppProxyLink = prefixes.some((prefix) => ) if (isAppProxyLink) return; const replacementLink = replacements[href] ?? ‘#status’; el.setAttribute(‘href’, replacementLink); ); , /** * Replace links to status hashes. This is for users in fallback mode */ replaceHashes: () => document.querySelectorAll(‘a[href*=”#status”]’).forEach((el) => el.setAttribute(‘href’, ‘/account’); ); , /** * Watch the page on an interval to replace account links if they’re added after page load */ const watchAccountLinks = () => setInterval(() => const method = getIsActive() ? ‘replaceLinks’ : ‘replaceHashes’ methods[method](); , 200); ; // Replace all account links on the page with a #status link instead const method = getIsActive() ? ‘replaceLinks’ : ‘replaceHashes’ methods[method](); // Continue to replace links, in case account links are added after page load watchAccountLinks(); )() ]]>
{ checkConsentAndLoad(); }); window.Shopify?.loadFeatures?.( [{name: ‘consent-tracking-api’, version: ‘0.1’}], error => { if (error) { if(!window.Shopify?.customerPrivacy) { loadSwymShopifyScript(); } } checkConsentAndLoad(); } ); } if (document.readyState === “loading”) { document.addEventListener(“DOMContentLoaded”, initialiseConsentCheck); } else { initialiseConsentCheck(); } })(); ]]>
{ backdrop.style.opacity = “40%”; }, 25); } function hideSlideOver() { const backdrop = document.getElementById(“backdrop”); const slideOverPanel = document.getElementById(“slide-over-panel”); const slideOverFrame = document.getElementById(“order-editing-frame”); const slideOverContainer = document.getElementById(“order-editing-container”); const direction = document.documentElement.getAttribute(“dir”) || “ltr”; if (direction === ‘rtl’) slideOverPanel.style.transform = “translateX(100%)”; else slideOverPanel.style.transform = “translateX(-100%)”; backdrop.style.opacity = “0%”; setTimeout(() => { hideInset(); }, 750); const divElement = document.querySelector(‘#slide-over-container’); divElement.style.display = “none”; const shouldOpenByDefault = divElement.getAttribute(‘data-default-open’); if (shouldOpenByDefault === “true” && Shopify?.designMode) { setTimeout(openSlideOver, 10 * 1000); } } function hideInset() { const backdrop = document.getElementById(“backdrop”); const slideOverPanel = document.getElementById(“slide-over-panel”); const slideOverFrame = document.getElementById(“order-editing-frame”); const slideOverContainer = document.getElementById(“order-editing-container”); const direction = document.documentElement.getAttribute(“dir”) || “ltr”; if (direction === ‘rtl’) slideOverPanel.style.transform = “translateX(100%)”; else slideOverPanel.style.transform = “translateX(-100%)”; document.body.style.overflow = “auto”; slideOverFrame.style.top = “initial”; slideOverFrame.style.left = “initial”; slideOverFrame.style.right = “initial”; slideOverFrame.style.bottom = “initial”; slideOverContainer.style.top = “initial”; slideOverContainer.style.left = “initial”; slideOverContainer.style.right = “initial”; slideOverContainer.style.bottom = “initial”; backdrop.style.top = “initial”; backdrop.style.left = “initial”; backdrop.style.right = “initial”; backdrop.style.bottom = “initial”; } function getCart() { var cartContents = fetch(window.Shopify.routes.root + ‘cart.js’) .then(response => response.json()) .then(data => { return data }); } function trackCartChanges() { const previousCartStateKey = ‘previousCartState’; const nextRemoveItemsKey = ‘removedItemsState’; // Retrieve previous cart state from local storage const previousCartState = JSON.parse(localStorage.getItem(previousCartStateKey) || ‘[]’); // Detect removed items const removedItems = previousCartState.filter(prevItem => !initialCartState.some(currItem => currItem.id === prevItem.id) ); if (removedItems.length) { // Send data to external API console.log(“Removed items”, removedItems); localStorage.setItem(nextRemoveItemsKey, JSON.stringify(removedItems)); } // Store current cart state in local storage for future comparisons localStorage.setItem(previousCartStateKey, JSON.stringify(initialCartState)); } document.addEventListener(“DOMContentLoaded”, initializeSlideOver); ]]>