1export class RecentlyViewed{static#STORAGE_KEY="viewedProducts";static#MAX_PRODUCTS=4;static addProduct(productId){let viewedProducts=this.getProducts();viewedProducts=viewedProducts.filter(id=>id!==productId),viewedProducts.unshift(productId),viewedProducts=viewedProducts.slice(0,this.#MAX_PRODUCTS),localStorage.setItem(this.#STORAGE_KEY,JSON.stringify(viewedProducts))}static clearProducts(){localStorage.removeItem(this.#STORAGE_KEY)}static getProducts(){return JSON.parse(localStorage.getItem(this.#STORAGE_KEY)||"[]")}} 2//# sourceMappingURL=/cdn/shop/t/4/assets/recently-viewed-products.js.map?v=94729125001750262651774386995
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.