PageSourceSearch

https://media.bohle.com/theme/6b639da8192cb3ac9751f3070e4b84e2/js/…/storefront.local-wishlist.plugin.6f902d.js

js bohle.com collected 2026-10-10 01:03:00 UTC 3,209 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[37863],{1369:(t,e,s)=>{s.d(e,{A:()=>a});var r=s(1452);class o{constructor(){this._storage={}}setItem(t2,e2){return this._storage[t2]=e2}getItem(t2){return Object.prototype.hasOwnProperty.call(this._storage,t2)?this._storage[t2]:null}removeItem(t2){return delete this._storage[t2]}key(t2){return Object.values(this._storage)[t2]||null}clear(){return this._storage={}}}class i{constructor(){this._storage=null,this._chooseStorage(),this._validateStorage()}_chooseStorage(){return i._isSupported("localStorage")?this._storage=window.localStorage:i._isSupported("sessionStorage")?this._storage=window.sessionStorage:r.A.isSupported()?this._storage=r.A:this._storage=new o}static _isSupported(t2){try{let e2="__storage_test";return window[t2].setItem(e2,"1"),window[t2].removeItem(e2),!0}catch(t3){return!1}}_validateStorage(){if(typeof this._storage.setItem!="function")throw Error('The storage must have a "setItem" function');if(typeof this._storage.getItem!="function")throw Error('The storage must have a "getItem" function');if(typeof this._storage.removeItem!="function")throw Error('The storage must have a "removeItem" function');if(typeof this._storage.key!="function")throw Error('The storage must have a "key" function');if(typeof this._storage.clear!="function")throw Error('The storage must have a "clear" function')}getStorage(){return this._storage}}let a=Object.freeze(new i).getStorage()},6917:(t,e,s)=>{s.d(e,{A:()=>o});var r=s(4335);class o extends r.A{init(){this.products={}}load(){this.$emitter.publish("Wishlist/onProductsLoaded",{products:this.products})}has(t2){return!!this.products[t2]}add(t2){this.products[t2]=new Date().toISOString(),this.$emitter.publish("Wishlist/onProductAdded",{products:this.products,productId:t2})}remove(t2){delete this.products[t2],this.$emitter.publish("Wishlist/onProductRemoved",{products:this.products,productId:t2})}getCurrentCounter(){return this.products?Object.keys(this.products).length:0}getProducts(){return this.products}}},7863:(t,e,s)=>{s.r(e),s.d(e,{default:()=>a});var r=s(1369),o=s(6917),i=s(1452);class a extends o.A{init(){this.cookieEnabledName="wishlist-enabled",this.storage=r.A,super.init(),this._registerEvents()}load(){this.products=this._fetch(),super.load()}add(t2){arguments.length>1&&arguments[1]!==void 0&&arguments[1],super.add(t2),this._save()}remove(t2){super.remove(t2),this._save()}_fetch(){if(window.useDefaultCookieConsent&&!i.A.getItem(this.cookieEnabledName)&&this.storage.removeItem(this._getStorageKey()),this.getCurrentCounter()>0)return this.products;let t2=this.storage.getItem(this._getStorageKey());if(!t2)return{};try{let e2=JSON.parse(t2);return e2 instanceof Object?e2:{}}catch(e2){return{}}}_save(){this.products===null||this.getCurrentCounter()===0?this.storage.removeItem(this._getStorageKey()):this.storage.setItem(this._getStorageKey(),JSON.stringify(this.products))}_getStorageKey(){return"wishlist-"+(window.salesChannelId||"")}_registerEvents(){let t2=window.PluginManager.getPluginInstances("AccountGuestAbortButton");t2&&t2.forEach(t3=>{t3.$emitter.subscribe("guest-logout",()=>{this.storage.removeItem(this._getStorageKey())})})}}}}]);

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.