!async function(){var t;function n(){console.log("waitforinit"),setTimeout(async()=>{if("function"==typeof Shopify.formatMoney){console.log("izyunitready"),r(),$(document).on("click submit change",function(t){r()});var o=XMLHttpRequest.prototype.open;function r(){var t=Date.now(),e=setInterval(function(){5e3{let n="";var a=i.key.split(":")[0];if("enabled"==i.stock){0==$('a[href*="/cart/change?line=1&quantity=0"]').length&&(n='');let t=['input[data-id="'+i.key+'"]','input[data-id*="'+a+'"]','input[data-line-id="'+i.key+'"]','input[data-quantity-variant-id="'+a+'"]','button[data-line-id="'+i.key+'"]',"#updates_"+a,'[id*="'+a+'"]:not(".noizyunit")'],e=(t=t.join(),'
'+n+"
");setTimeout(function(){$(t).parent().replaceWith(e)},1)}})},100)}XMLHttpRequest.prototype.open=function(t,e,i,n,a){"/cart.js"==e&&(event=this.addEventListener("readystatechange",async function(){4===this.readyState&&""!==this.responseText&&r()},!1)),o.call(this,t,e,i,n,a)};var t=window,e=window.fetch;if("function"==typeof e&&(t.fetch=function(){var t=e.apply(this,arguments);return t.then(t=>{[window.location.origin+"/cart/add.js",window.location.origin+"/cart/update.js",window.location.origin+"/cart/change.js",window.location.origin+"/cart/clear.js"].includes(t.url)&&t.clone().json().then(t=>{r()})}),t}),$(document).on("click",".izyremove",async function(){var t=$(this).closest("tr").find("[data-cart-remove]");$(t).trigger("click");let e=$(this).data("id");setTimeout(async function(){await fetch("/cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.toString(),quantity:0})}),a()},1e3)}),"index"!=izyunit_current_page&&"collection"!=izyunit_current_page||($('a[href="/products/"]'),izyunit_linked.map((t,e)=>{var i;t.url&&(i='
'+Shopify.formatMoney(100*t.price*Shopify.currency.rate,izyunit_currency_format)+" / "+t.metric+"
",$("#izyunit_"+t.id).length||$('a[href*="'+t.url+'"]').parent().find("img").after(i))})),"product"==izyunit_current_page&&"undefined"!=typeof izyunit_metafields){console.log("product page izyunit");let e=izyunit_metafields.replace(/=>/g,":");e=JSON.parse(e),console.log(e),"enabled"==e.stock&&(!function(){console.log("listencart");let e=!1;$(document).on("submit","form[action*='cart/add']",function(t){t.preventDefault(),setTimeout(function(){if(0==e){console.log("add to cart submit / izyunit");var t=$("form[action*='cart/add']").serializeArray();let i;$.each(t,function(t,e){"id"===e.name&&(i=e.value)}),r({id:i}),setTimeout(function(){window.location="https://"+Shopify.shop+"/cart"},1e3)}},1e3)});var o=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(t,e,i,n,a){"/cart/add.js"==e&&(event=this.addEventListener("readystatechange",async function(){4===this.readyState&&""!==this.responseText&&(data=JSON.parse(this.responseText),test=await(test=await r(data)).json(),Object.defineProperty(this,"responseText",{value:JSON.stringify(test),writable:!1}),Object.defineProperty(this,"response",{value:JSON.stringify(test),writable:!1}))},!1)),o.call(this,t,e,i,n,a)};const i=window["fetch"];async function r(i){if(console.log("logicevent"),e=!0,!i.description){{var n=i.product_id;let t=await fetch("/cart.js"),e=(t=await t.json(),{});0{t.product_id==n&&(e[t.id]=0)});console.log(e),await fetch("/cart/update.js?izyunit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:e})})}await 0;var t=await fetch("/cart/add.js?izyunit",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:i.id,quantity:1})});return async function(t){console.log("after add to cart");t=await t.clone().json();izyunit_cart_ids.push({key:t.key,quantity:t.quantity}),a()}(t),t}alert(i.description)}window.fetch=async(...t)=>{var e=await i(...t);return t.includes("/cart/add.js")||t.includes("/cart/add")?r(await e.clone().json()):e}}(),i());t='
'+Shopify.formatMoney(100*e.price*Shopify.currency.rate,izyunit_currency_format)+" / "+e.metric+"
";function i(t=!0){$('[class*="quantity" i],[class*="qty" i]').each(function(){0==$(this).parents(".cart-item").length&&0==$(this).has("[type=submit]").length&&0==$(this).has("[name=add]").length&&(t?$(this).hide():$(this).show())})}$(".izyunit_price").length||($(t).insertBefore($("form[action*='cart/add']:first")),$("form[action='/cart/add']").on("click submit change",function(t){setTimeout(function(){var t;t=Shopify.formatMoney(100*e.price*Shopify.currency.rate,izyunit_currency_format)+" / "+e.metric,$(".izyunit strong").html(t)},100)}))}function a(){console.log("reload all cart"),setTimeout(function(){"undefined"!=typeof ajaxCart&&ajaxCart.load(),"undefined"!=typeof izyRefreshCart&&izyRefreshCart.load(),$(".cart-drawer input").trigger("input"),"Blockshop"==Shopify.theme.name&&theme.classes.FrameworkCart.prototype.getOtherCarts().trigger("updateHtml"),document.dispatchEvent(new CustomEvent("cart:build")),i(),$("#izyunit").trigger("refresh")},1)}}else n()},10)}"undefined"==typeof $&&((t=document.createElement("script")).src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js",document.getElementsByTagName("head")[0].appendChild(t)),function t(){console.log("waitforjquery");setTimeout(async()=>{("undefined"!=typeof $?("function"!=typeof Shopify.formatMoney&&$('