if(Shopify.customerPrivacy){consentTrackingLoaded();}else{if("loadFeatures"in window.Shopify){window.Shopify.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],consentTrackingLoaded)}else{consentTrackingLoaded();}} function consentTrackingLoaded(){const userConsent=(Shopify?.customerPrivacy?.currentVisitorConsent||(()=>{return{analytics:"yes",marketing:"yes",preferences:"yes",sale_of_data:"yes"}}))();function executeAnalyticsTracking(){function injectScript(url,async,defer){{let adnabu_s=document.createElement('script');adnabu_s.type='text/javascript';adnabu_s.async=async;adnabu_s.defer=defer;adnabu_s.src=url;let adnabu_x=document.getElementsByTagName('script')[0];adnabu_x.parentNode.insertBefore(adnabu_s,adnabu_x);}} function convertToUrl(adnabuParams){{return url=Object.keys(adnabuParams).map(function(k){{return k+'='+adnabuParams[k];}}).join('&');}} function makeAjaxCall(url,parseJson,callback){{let adnabuXhttp=new XMLHttpRequest();if(callback){{adnabuXhttp.onreadystatechange=function(){{if(this.readyState===XMLHttpRequest.DONE){{if(parseJson){{callback(JSON.parse(this.response));}}else{{callback(this.response);}}}}}};}} adnabuXhttp.open("GET",url,true);adnabuXhttp.send();}} window.makeAjaxCall=makeAjaxCall;function formatDate(date){{let adnabu_d=new Date(date),adnabuMonth=''+(adnabu_d.getMonth()+1),adnabuDay=''+adnabu_d.getDate(),adnabuYear=adnabu_d.getFullYear();if(adnabuMonth.length<2)adnabuMonth='0'+adnabuMonth;if(adnabuDay.length<2)adnabuDay='0'+adnabuDay;return[adnabuYear,adnabuMonth,adnabuDay].join('-');}}} const initialTrackingState=["yes",""].includes(userConsent?.analytics);function userConsentTracking(){if(initialTrackingState){executeAnalyticsTracking();}} userConsentTracking();document.addEventListener("visitorConsentCollected",(event)=>{if(event.detail?.analyticsAllowed&&!initialTrackingState){executeAnalyticsTracking();}});document.addEventListener('trackingConsentAccepted',()=>{if(!initialTrackingState){userConsentTracking();}});}