1(function(){if(window.__mmCardsInit)return;window.__mmCardsInit=!0;var CHECK='<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"></polyline></svg>',toastT;function toast(m){var t=document.querySelector(".mm-card-toast");t||(t=document.createElement("div"),t.className="mm-card-toast",document.body.appendChild(t)),t.innerHTML=m,t.classList.add("show"),clearTimeout(toastT),toastT=setTimeout(function(){t.classList.remove("show")},1900)}var WKMAP="mm_wk_map";function wkMap(){try{return JSON.parse(localStorage.getItem(WKMAP))||{}}catch(e){return{}}}function wkSave(m){try{localStorage.setItem(WKMAP,JSON.stringify(m))}catch(e){}}window.__mmWkIds=window.__mmWkIds||{};var wkCss=document.createElement("style");wkCss.textContent=".mm-gal__heart.on svg path,.mm-xwish.on svg path{fill:#E4344B !important;stroke:#E4344B !important}",(document.head||document.documentElement).appendChild(wkCss);function wkHandleFor(el){var c=el.closest("[data-product-handle]");if(c&&c.getAttribute("data-product-handle"))return c.getAttribute("data-product-handle");var m=location.pathname.match(/\/products\/([^\/?]+)/);return el.classList.contains("mm-gal__heart")&&m?m[1]:""}function wkPaint(){var map=wkMap();document.querySelectorAll("[data-wish]").forEach(function(h){var handle=wkHandleFor(h);handle&&map[handle]&&map[handle].iid&&h.classList.add("on")})}var wkDedupeRunning=!1;function wkDedupe(){try{if(wkDedupeRunning||!window.WishlistKing||!window.WishlistKing._apis||!window.WishlistKing._apis.wishlist)return;wkDedupeRunning=!0,window.WishlistKing._apis.wishlist.get({path:"/wishlists/mine"}).then(function(r){var items=r&&r.wishlist&&r.wishlist.items||[],seen={},survivors=[],chain=Promise.resolve();items.forEach(function(i){var k=String(i.productId)+":"+String(i.variantId);seen[k]?chain=chain.then(function(){return window.WishlistKing.removeWishlistItem({wishlistItemId:i.id}).catch(function(){})}):(seen[k]=i.id,survivors.push(i))});var meta=window.ShopifyAnalytics&&window.ShopifyAnalytics.meta&&window.ShopifyAnalytics.meta.product,pm=location.pathname.match(/\/products\/([^\/?]+)/);if(meta&&pm){var mine=survivors.filter(function(i){return String(i.productId)===String(meta.id)}),gal=document.querySelector(".mm-gal__heart[data-wish]"),m=wkMap();mine.length?(gal&&gal.classList.add("on"),(!m[pm[1]]||!m[pm[1]].iid)&&(m[pm[1]]={iid:mine[0].id},wkSave(m))):(gal&&gal.classList.remove("on"),m[pm[1]]&&(delete m[pm[1]],wkSave(m)))}return wkPaint(),chain}).then(function(){wkDedupeRunning=!1}).catch(function(){wkDedupeRunning=!1})}catch(e){wkDedupeRunning=!1}}window.__mmWkToggle=function(on,handle,revert){if(!handle){revert&&revert();return}var tries=0;(function go(){if(!window.WishlistKing){if(++tries>25){revert&&revert(),toast("Fehler \u2014 bitte nochmal versuchen");return}setTimeout(go,200);return}var map=wkMap();if(on){if(map[handle]&&map[handle].iid){window.__mmWkIds[handle]=map[handle].iid;return}window.WishlistKing.addWishlistItem({productHandle:handle}).then(function(res){var it=res&&res.wishlistItem;if(it){window.__mmWkIds[handle]=it.id;var m=wkMap();m[handle]={iid:it.id},wkSave(m)}setTimeout(wkDedupe,800)}).catch(function(){revert&&revert(),toast("Fehler \u2014 bitte nochmal versuchen")})}else{var wid=map[handle]&&map[handle].iid||window.__mmWkIds[handle];wid&&window.WishlistKing.removeWishlistItem({wishlistItemId:wid}).then(function(){delete window.__mmWkIds[handle];var m=wkMap();delete m[handle],wkSave(m)}).catch(function(){delete window.__mmWkIds[handle];var m=wkMap();delete m[handle],wkSave(m)})}})()};function wkInit(){wkPaint(),setTimeout(wkDedupe,2e3)}document.readyState==="complete"||document.readyState==="interactive"?wkInit():document.addEventListener("DOMContentLoaded",wkInit),document.addEventListener("click",function(e){var b=e.target.closest(".mm-card__add[data-add]");if(b){e.preventDefault(),e.stopPropagation();var id=parseInt(b.getAttribute("data-add"),10);if(!id){toast("Nicht verf\xFCgbar");return}var old=b.innerHTML;b.disabled=!0,b.innerHTML=CHECK,b.classList.add("added"),window.mmBumpBadge&&window.mmBumpBadge(1),toast("\u2713 Erfolgreich in de
1n Warenkorb gelegt"),fetch("/cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:[{id:id,quantity:1}]})}).then(function(r){return r.json().then(function(body){return{ok:r.ok,body:body}})}).then(function(x){if(!x.ok){b.innerHTML=old,b.classList.remove("added"),b.disabled=!1,toast(x.body&&(x.body.description||x.body.message)||"Fehler beim Hinzuf\xFCgen"),document.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0}));return}document.dispatchEvent(new CustomEvent("cart:refresh")),document.dispatchEvent(new CustomEvent("ajaxProduct:added")),document.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0})),setTimeout(function(){b.innerHTML=old,b.classList.remove("added"),b.disabled=!1},1400)}).catch(function(){b.innerHTML=old,b.classList.remove("added"),b.disabled=!1,toast("Fehler beim Hinzuf\xFCgen"),document.dispatchEvent(new CustomEvent("cart:change",{bubbles:!0}))})}}),document.addEventListener("click",function(e){var h=e.target.closest("[data-wish]");if(h){e.preventDefault(),e.stopPropagation();var handle=wkHandleFor(h);if(!handle){toast("Fehler \u2014 bitte nochmal versuchen");return}var on=h.classList.toggle("on");window.__mmWkToggle(on,handle,function(){h.classList.toggle("on")}),toast(on?"\u2665 Zur Wunschliste hinzugef\xFCgt":"Aus Wunschliste entfernt")}})})(); 2//# sourceMappingURL=/cdn/shop/t/167/assets/mm-cards.js.map?v=166507717995606280491791104884
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.