1"use strict";(self.webpackChunklautsprecher_teufel=self.webpackChunklautsprecher_teufel||[]).push([[2279],{13001:(t,e,s)=>{s.r(e),s.d(e,{default:()=>n});var r=s(48574),i=s(57142),a=s(84011);class n extends i.A{constructor(){super(...arguments),this.skus=[]}init(){var t,e;this.buttonPlaceholder=this.querySelector("."+this.jsName+"__button-placeholder"),this.button=this.querySelector("."+this.jsName+"__button"),this.addTemplate=null==(t=this.querySelector("."+this.jsName+"__add-template"))?void 0:t.innerHTML,this.removeTemplate=null==(e=this.querySelector("."+this.jsName+"__remove-template"))?void 0:e.innerHTML,this.updateStaleState(),this.button.addEventListener("click",t=>this.toggle(t)),window.addEventListener("storage",t=>{t.key===a.COMPARISON_STORAGE_KEY&&this.updateStaleState()})}toggle(t){var e;t.preventDefault();var s=this.skus.includes(this.sku),i=this.skus.length>=this.maxItems&&!s?"max":s?"remove":"success";document.dispatchEvent(new CustomEvent(r.I,{detail:null==(e=this.querySelector("."+this.jsName+"__"+i+"-message-template"))?void 0:e.innerHTML})),this.skus.length>=this.maxItems&&!s||(this.skus=s?this.skus.filter(t=>t!==this.sku):[...this.skus,this.sku],localStorage.setItem(a.COMPARISON_STORAGE_KEY,JSON.stringify(this.skus)),this.redirect(s),this.updateButtonTemplate())}updateStaleState(){var t;this.skus=null!=(t=JSON.parse(localStorage.getItem(a.COMPARISON_STORAGE_KEY)))?t:[],this.updateButtonTemplate()}redirect(t){var e=this.url+"?&skus="+this.skus.join(","),s=!t&&this.skus.length>=this.redirectLength,r=t&&this.updateUrlOnRemove;(s||r)&&(window.location.href=e,this.button.disabled=!0)}updateButtonTemplate(){this.buttonPlaceholder&&this.removeTemplate.length&&this.addTemplate.length&&(this.buttonPlaceholder.innerHTML=this.skus.includes(this.sku)?this.removeTemplate:this.addTemplate)}get maxItems(){return Number(this.getAttribute("maxItems"))}get url(){return this.getAttribute("url")}get sku(){return this.getAttribute("sku")}get redirectLength(){return Number(this.getAttribute("redirectLength"))}get updateUrlOnRemove(){return this.hasAttribute("updateUrlOnRemove")}}},48574:(t,e,s)=>{s.d(e,{I:()=>r});s(57142),s(86426);var r="updateDynamicMessages"},84011:(t,e,s)=>{s.r(e),s.d(e,{COMPARISON_STORAGE_KEY:()=>i,default:()=>a});var r=s(57142),i="comparison-skus";class a extends r.A{init(){this.querySelector("."+this.jsName+"__link").addEventListener("click",t=>this.redirect(t))}redirect(t){var e;t.preventDefault();var s=null!=(e=JSON.parse(localStorage.getItem(i)))?e:[];window.location.href=s.length?this.url+"?&skus="+s.join(","):this.url}get url(){var t,e=null!=(t=this.getAttribute("url"))?t:"";try{var{pathname:s,search:r,hash:i}=new URL(e,window.location.origin);return(s+r+i).replace(/\/\//g,"/")}catch(t){return console.error(t),"/"}}}},86426:(t,e,s)=>{s.d(e,{Or:()=>h});var r=s(10467),i=s(43270),a=(s(26980),s(69367)),n=!0;function u(t,e){void 0===e&&(e={});var s=new CustomEvent(t,{detail:e});document.dispatchEvent(s)}function l(){return(l=(0,r.A)(function*(){var t=(0,a.Jt)().map(t=>t.define());(yield Promise.all(t)).forEach(t=>t.filter(t=>function(t){var e=t;return!!e.name&&!!e.jsName}(t)).filter(t=>!t.isMounted).forEach(t=>function(t){t.mountCallback(),t.markAsMounted()}(t)))})).apply(this,arguments)}function h(){return o.apply(this,arguments)}function o(){return o=(0,r.A)(function*(){try{yield function(){return l.apply(this,arguments)}(),u((0,i.Jt)().events.mount),u((0,i.Jt)().events.ready),n&&(u((0,i.Jt)().events.bootstrap),n=!1)}catch(t){u((0,i.Jt)().events.error,t)}}),o.apply(this,arguments)}}}]);
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.