var Shopify=Shopify||{};Shopify.formatMoney===void 0&&(Shopify.formatMoney=function(a,b){function c(a,b){return"undefined"==typeof a?b:a}function d(a,b,d,e){if(b=c(b,2),d=c(d,","),e=c(e,"."),isNaN(a)||null==a)return 0;a=(a/100).toFixed(b);var f=a.split("."),g=f[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+d),h=f[1]?e+f[1]:"";return g+h}"string"==typeof a&&(a=a.replace(".",""));var e="",f=/\{\{\s*(\w+)\s*\}\}/,g=b||this.money_format;switch(g.match(f)[1]){case"amount":e=d(a,2);break;case"amount_no_decimals":e=d(a,0);break;case"amount_with_comma_separator":e=d(a,2,".",",");break;case"amount_no_decimals_with_comma_separator":e=d(a,0,".",",");}return g.replace(f,e)});var sfdrFormatter=new Intl.NumberFormat(Shopify.locale,{style:"currency",currency:Shopify.currency.active,maximumFractionDigits:2});function wait_for_script_load(look_for,callback){var interval=setInterval(function(){"undefined"!=eval("typeof "+look_for)&&(clearInterval(interval),callback())},50)}function importJS(a,b,c){var d=document.createElement("script");d.setAttribute("type","text/javascript"),d.setAttribute("src",a),c&&wait_for_script_load(b,c);var e=document.getElementsByTagName("head")[0];e?e.appendChild(d):document.body.appendChild(d)}function importCSS(a,b,c){var d=document.createElement("link");d.setAttribute("rel","stylesheet"),d.setAttribute("type","text/css"),d.setAttribute("media","screen"),d.setAttribute("href",a),c&&wait_for_script_load(b,c);var e=document.getElementsByTagName("head")[0];e?e.appendChild(d):document.body.appendChild(d)}function sfdr_uniqid(){let a=new Date().valueOf(),b=a.toString(),c="",d=0,e="0123456789abcdef";for(let a=16;0`,"Top"==sfdrnotificationposition&&(g.style.top="0",g.style.borderRadius="0 0 0.5em 0.5em",g.style.borderTop="0",g.appendChild(e),g.appendChild(f),g.appendChild(i)),"Bottom"==sfdrnotificationposition&&(g.style.bottom="0",g.style.borderRadius="0.5em 0.5em 0 0",i.style.marginTop="3px",g.style.borderBottom="0",g.appendChild(i),g.appendChild(e),g.appendChild(f)),a(),c(),d(),g.querySelector("span").onclick=function(){g.style.display="none"};var h=document.body.lastChild;document.getElementById("discount-popup")||(a(),c(),d(),document.body.insertBefore(g,h.nextSibling))}if("Overlay"==sfdrdisplaytype){function a(){function a(a){a.matches&&(g.style.width="100vw")}const b=window.matchMedia("screen and (max-width: 576px)");a(b),b.addListener(a)}function c(){function a(a){a.matches&&(g.style.width="500px")}const b=window.matchMedia("screen and (min-width: 577px) and (max-width: 768px)");a(b),b.addListener(a)}function d(){function a(a){a.matches&&(g.style.width="600px")}const b=window.matchMedia("screen and (min-width: 992px)");a(b),b.addListener(a)}var g=document.createElement("div"),i=document.createElement("div");g.setAttribute("id","discount-popup"),i.setAttribute("id","discount-container"),i.style.position="fixed",i.style.inset="0",i.style.width="100vw",i.style.height="100vh",i.style.zIndex="99999",i.style.background="rgba(211,211,211,0.6)",g.style.position="fixed",g.style.width="600px",g.style.minHeight="150px",g.style.height="auto",g.style.zIndex="99999",g.style.left="50%",g.style.top="50%",g.style.transform="translate(-50%, -50%)",g.style.textAlign="center",g.style.padding="10px",g.style.backgroundColor=sfdrbgcolour,g.style.border=`${sfdrborderwidth} solid ${sfdrbordercolour}`;let e=document.createElement("p");e.style.marginTop="10px",e.style.fontSize=sfdrmaintextfontsize,e.style.color=sfdrtextcolour;let f=document.createElement("p"),j=document.createElement("span");j.style.cursor="pointer",f.style.marginTop="10px",f.style.marginBottom="15px",f.style.fontSize=sfdrsubtextfontsize,f.style.color=sfdrtextcolour;let k=document.createTextNode(b),l=document.createTextNode(sfdrpopupsubtext);e.appendChild(k),f.appendChild(l),j.innerHTML+=``,"Middle"==sfdrnotificationposition&&(g.style.borderRadius="0.5em",g.appendChild(j),g.appendChild(e),g.appendChild(f)),i.appendChild(g),a(),c(),d(),g.querySelector("span").onclick=function(){g.style.display="none",i.style.display="none",i.style.width="0",i.style.height="0"};var h=document.body.lastChild;document.getElementById("discount-container")||(a(),c(),d(),document.body.insertBefore(i,h.nextSibling))}if("Slider"==sfdrdisplaytype){let a=function(){},c=function(){},d=function(){};var g=document.createElement("div");g.setAttribute("id","discount-popup"),g.style.position="fixed",g.style.zIndex="99999",g.style.textAlign="center",g.style.color=sfdrtextcolour,g.style.backgroundColor=sfdrbgcolour,g.style.border=`${sfdrborderwidth} solid ${sfdrbordercolour}`;let e=document.createElement("p");e.style.marginTop="5px",e.style.fontSize=sfdrmaintextfontsize;let f=document.createElement("p");f.style.marginTop="10px",f.style.marginBottom="15px",f.style.fontSize=sfdrsubtextfontsize;let i=document.createElement("span");i.setAttribute("id","close-icon"),i.style.cursor="pointer",i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center";let p=document.createTextNode(b),q=document.createTextNode(sfdrpopupsubtext);e.appendChild(p),f.appendChild(q);var j=``,k=``,l=``,m=``,n=``,o=``;"Bottom"==sfdrnotificationposition&&(g.style.bottom="0",g.style.left="50%",g.style.transform="translate(-50%)",g.style.width="30%",g.style.height="auto",g.style.borderRadius="0.5em 0.5em 0 0",g.style.padding="5px",g.style.borderBottom="0",i.innerHTML=j,g.appendChild(i),g.appendChild(e),g.appendChild(f),c=function(){function a(a){a.matches&&(g.style.width="100vw")}const b=window.matchMedia("screen and (max-width: 576px)");a(b),b.addListener(a)},a=function(){function a(a){a.matches&&(g.style.width="80vw")}const b=window.matchMedia("screen and (min-width: 577px) and (max-width: 768px)");a(b),b.addListener(a)},d=function(){function a(a){a.matches&&(g.style.width="30vw")}const b=window.matchMedia("screen and (min-width: 992px)");a(b),b.addListener(a)},c(),a(),d(),g.querySelector("span").onclick=function(){"min-content"===g.style.height?(g.style.height="auto",g.innerHTML="",g.style.display="block",g.style.alignItems="center",g.style.justifyContent="center",i.innerHTML=j,g.appendChild(i),g.appendChild(e),g.appendChild(f)):(g.style.height="min-content",i.innerHTML=k,g.innerHTML="",g.style.display="flex",g.style.alignItems="center",g.style.justifyContent="center",g.appendChild(i))}),"Right"==sfdrnotificationposition&&(g.style.right="0",g.style.top="50%",g.style.transform="translate(0, -50%)",g.style.width="15%",g.style.height="35%",g.style.borderRadius="0.5em 0 0 0.5em",g.style.padding="5px",g.style.borderRight="0",c=function(){function a(a){a.matches&&(sfdrdevicetype="mobile",g.style.width="50%",g.style.height="auto",f.style.paddingTop="20px")}const b=window.matchMedia("screen and (max-width: 576px)");a(b),b.addListener(a)},a=function(){function a(a){a.matches&&(sfdrdevicetype="tablet",g.style.width="30%",g.style.height="auto",f.style.paddingTop="20px")}const b=window.matchMedia("screen and (min-width: 577px) and (max-width: 768px)");a(b),b.addListener(a)},d=function(){function a(a){a.matches&&(sfdrdevicetype="desktop",g.style.width="20%",g.style.height="auto",f.style.paddingTop="25px")}const b=window.matchMedia("screen and (min-width: 992px)");a(b),b.addListener(a)},c(),a(),d(),i.innerHTML=l,g.appendChild(i),g.appendChild(e),g.appendChild(f),g.querySelector("span").onclick=function(){"auto"===g.style.width?(g.style.width="mobile"==sfdrdevicetype?"50%":"tablet"==sfdrdevicetype?"30%":"20%",g.innerHTML="",g.style.display="block",g.style.alignItems="center",g.style.justifyContent="center",i.innerHTML=l,g.appendChild(i),g.appendChild(e),g.appendChild(f)):(g.style.width="auto",i.innerHTML=m,g.innerHTML="",g.style.display="flex",g.style.alignItems="center",g.style.justifyContent="center",g.appendChild(i))}),"Left"==sfdrnotificationposition&&(g.style.left="0",g.style.top="50%",g.style.transform="translate(0, -50%)",g.style.width="15%",g.style.height="35%",g.style.borderRadius="0 0.5em 0.5em 0",g.style.padding="5px",g.style.borderLeft="0",c=function(){function a(a){a.matches&&(sfdrdevicetype="mobile",g.style.width="50%",g.style.height="auto",f.style.paddingTop="20px")}const b=window.matchMedia("screen and (max-width: 576px)");a(b),b.addListener(a)},a=function(){function a(a){a.matches&&(sfdrdevicetype="tablet",g.style.width="30%",g.style.height="auto",f.style.paddingTop="20px")}const b=window.matchMedia("screen and (min-width: 577px) and (max-width: 768px)");a(b),b.addListener(a)},d=function(){function a(a){a.matches&&(sfdrdevicetype="desktop",g.style.width="20%",g.style.height="auto",f.style.paddingTop="20px")}const b=window.matchMedia("screen and (min-width: 992px)");a(b),b.addListener(a)},c(),a(),d(),i.innerHTML=n,g.appendChild(i),g.appendChild(e),g.appendChild(f),g.querySelector("span").onclick=function(){"auto"===g.style.width?(g.style.width="mobile"==sfdrdevicetype?"50%":"tablet"==sfdrdevicetype?"30%":"20%",g.innerHTML="",g.style.display="block",g.style.alignItems="center",g.style.justifyContent="center",i.innerHTML=n,g.appendChild(i),g.appendChild(e),g.appendChild(f)):(g.style.width="auto",i.innerHTML=o,g.innerHTML="",g.style.display="flex",g.style.alignItems="center",g.style.justifyContent="center",g.appendChild(i))});var h=document.body.lastChild;document.getElementById("discount-popup")||(c(),a(),d(),document.body.insertBefore(g,h.nextSibling))}}else{var p=document.getElementsByClassName("sf-spd-prices"),q=document.getElementById("NormalPriceSection"),r=document.getElementsByClassName("shopify-payment-button");if(p){var s=p[0];if(s){var t=s.dataset.wasPriceId,u=s.dataset.priceId;if(t)var v=document.getElementById(t);if(u)var w=document.getElementById(u);var x=document.getElementById("SpdPriceInfoForCart");v&&(Shopify.money_format?"undefined"==typeof moneyFormatFromConfig?v.innerHTML=Shopify.formatMoney(100*c,currencySymbol+" {{amount}}"):v.innerHTML=Shopify.formatMoney(100*c,moneyFormatFromConfig):v.innerHTML=Shopify.formatMoney(100*c,currencySymbol+" {{amount}}")),w&&(Shopify.money_format?"undefined"==typeof moneyFormatFromConfig?w.innerHTML=Shopify.formatMoney(100*d,currencySymbol+" {{amount}}"):w.innerHTML=Shopify.formatMoney(100*d,moneyFormatFromConfig):w.innerHTML=Shopify.formatMoney(100*d,currencySymbol+" {{amount}}")),x&&(x.value=c+":"+d)}s.style.opacity="100%",$(f.salePriceWrapper,p).removeClass("hide"),$(f.productPrice,p).addClass("on-sale"),q&&(q.style.display="none",p&&s&&(s.style.display="block")),r&&r[0]&&(r[0].style.display="none")}}}}else q&&(q.style.opacity="100%")}else 4==this.readyState&&500==this.status&&q&&(q.style.opacity="100%")};var d=new FormData;d.append("sid",sfdrStoreId),d.append("pv2",getParam("pv2"));var e="";e="production"==sfdrEnvironment?"https://sfdr.co/spd":"https://staging.shoppingfeeder.com/spd",c.open("POST",e,!0);c.send(d)}function sfdr_spd_reminder(){alert("This is your reminder!!")}null!==getParam("pv2")&&sfdr_spd_poc(),document.addEventListener("DOMContentLoaded",function(){null!==getParam("spd_poc")&&sfdr_spd_poc()});