1(()=>{window.Osano=window.Osano||function(){window.Osano.data.push(arguments)},window.Osano.data=window.Osano.data||[],window._theme=window._theme||{};const SCRIPT_POLL_INTERVAL=100,SCRIPT_POLL_ATTEMPTS=50,LIVECHAT_READY_ATTEMPTS=40,hasScriptWithSrc=url=>{if(!url)return!1;for(const node of document.scripts){const src=node.getAttribute("src")||node.src||"";if(src===url||url.indexOf("signifyd")>-1&&src.indexOf("signifyd")>-1)return!0}return!1},appendExternalScript=(url,onLoad)=>{if(!url||hasScriptWithSrc(url)){onLoad&&onLoad();return}const script=document.createElement("script");script.async=!0,script.src=url,onLoad&&(script.onload=onLoad),document.head.appendChild(script)},consentStatus=isGranted=>isGranted?"granted":"denied",getClickElement=event=>event.target instanceof Element?event.target:event.target instanceof Node?event.target.parentElement:null,Consent={saved:{personalization:null,analytics:null,marketing:null},themeConfig:null,getThemeConfig(){if(this.themeConfig)return this.themeConfig;const configNode=document.getElementById("OsanoConsentConfig");try{this.themeConfig=configNode?JSON.parse(configNode.textContent):{}}catch{this.themeConfig={}}return this.themeConfig},parseAcceptDeny(value){return value==null?null:value===!0||value==="ACCEPT"||value==="ACCEPTANCE"?!0:value===!1||value==="DENY"||value==="DENIED"?!1:null},unwrapOsanoEvent(source){return source?source.detail?this.unwrapOsanoEvent(source.detail):source.consent?this.unwrapOsanoEvent(source.consent):source:null},readCategoryFromObject(source,category){if(!source||typeof source!="object")return null;const fromUppercaseKey=this.parseAcceptDeny(source[category.toUpperCase()]);return fromUppercaseKey??this.parseAcceptDeny(source[category])},isGranted(category,osanoEvent){if(osanoEvent==null&&this.saved[category]!=null)return this.saved[category];const fromEvent=this.readCategoryFromObject(this.unwrapOsanoEvent(osanoEvent),category);if(fromEvent!=null)return fromEvent;const osanoCm=window.Osano&&window.Osano.cm;if(!osanoCm)return!1;if(typeof osanoCm[category]=="boolean")return osanoCm[category];if(typeof osanoCm.getConsent=="function"){const fromGetConsent=this.readCategoryFromObject(osanoCm.getConsent(),category);if(fromGetConsent!=null)return fromGetConsent}return!!osanoCm[category]},storeSavedConsent(osanoEvent){this.saved.personalization=this.isGranted("personalization",osanoEvent),this.saved.analytics=this.isGranted("analytics",osanoEvent),this.saved.marketing=this.isGranted("marketing",osanoEvent)},setBodyAttributes(){document.body&&(document.body.setAttribute("data-osano-personalization",consentStatus(this.saved.personalization)),document.body.setAttribute("data-osano-analytics",consentStatus(this.saved.analytics)),document.body.setAttribute("data-osano-marketing",consentStatus(this.saved.marketing)))}},ShopifyPrivacy={lastSyncedSignature:"",updateTrackingConsent(){const osanoCm=window.Osano&&window.Osano.cm;if(!osanoCm||!window.Shopify||typeof window.Shopify.loadFeatures!="function")return;const trackingConsent={analytics:!!osanoCm.analytics,marketing:!!osanoCm.marketing,preferences:!!osanoCm.personalization,sale_of_data:!osanoCm.optOut},signature=[trackingConsent.analytics,trackingConsent.marketing,trackingConsent.preferences,trackingConsent.sale_of_data].join("|");signature!==this.lastSyncedSignature&&window.Shopify.loadFeatures([{name:"consent-tracking-api",version:"0.1"}],error=>{error||!window.Shopify.customerPrivacy||window.Shopify.customerPrivacy.setTrackingConsent(trackingConsent,()=>{ShopifyPrivacy.lastSyncedSignature=signature})})}},Gtm={containerId:"GTM-KG925N3",scriptUrl:"https://www.googletagmanager.com/gtm.js?id=GTM-KG925N3",isLoaded:!1,updateConsentMode(){typeof window.gtag=="function"&&window.gtag("consent","update",{analytics_storage:consentStatus(Consent.saved.analytics),ad_storage:consentStatus(Consent.saved.marketing),ad_user_data:consentStatus(Consent.saved.marketing),ad_personalization:consentStatus(Consent.saved.marketing),personalization_storage:consentStatus(Consent.saved.personalization)})},loadContainer(){this.isLoaded||(this.isLoaded=!0,window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":new Date().getTime(),event:"gtm.js"}),appendExternalScript(this.scriptUrl),typeof window.gtag=="function"&&window.gtag("config",this.containerId,{send_page_view:!1}))}},GoogleAds={conversionId:"AW-1072703009",scriptUrl:"https://www.googletagmanager.com/gtag/js?i
1d=AW-1072703009",isLoaded:!1,adsBlocker:null,removeInjectedScripts(){for(const node of[...document.scripts])(node.src||"").indexOf(this.conversionId)>-1&&node.remove()},loadTag(){this.isLoaded||(this.isLoaded=!0,appendExternalScript(this.scriptUrl),typeof window.gtag=="function"&&(window.gtag("js",new Date),window.gtag("config",this.conversionId,{allow_enhanced_conversions:!0,send_page_view:!1})))},syncWithMarketingConsent(){if(Consent.saved.marketing){this.adsBlocker&&(this.adsBlocker.disconnect(),this.adsBlocker=null),this.loadTag();return}this.removeInjectedScripts(),!this.adsBlocker&&(this.adsBlocker=new MutationObserver(()=>{Consent.saved.marketing||GoogleAds.removeInjectedScripts()}),this.adsBlocker.observe(document.documentElement,{childList:!0,subtree:!0}))}},TrustpilotConsent={bootstrapUrl:"https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js",isBootstrapLoaded:!1,areAppScriptsLoaded:!1,hasBootstrapScript(){for(const node of document.scripts)if((node.getAttribute("src")||node.src||"").indexOf("widget.trustpilot.com/bootstrap")>-1)return!0;return!1},getAppScriptUrls(){const scriptUrls=[],addUrl=url=>{typeof url!="string"||url.toLowerCase().indexOf("trustpilot")===-1||scriptUrls.indexOf(url)===-1&&scriptUrls.push(url)},theme=window._theme||{};for(const list of[theme.trustpilotScripts,theme.appsScripts])if(Array.isArray(list))for(const url of list)addUrl(url);return scriptUrls.length&&(theme.trustpilotScripts=scriptUrls.slice()),scriptUrls},loadAppScripts(){if(this.areAppScriptsLoaded||!Consent.saved.marketing)return;const scriptUrls=this.getAppScriptUrls();if(scriptUrls.length){for(const scriptUrl of scriptUrls)appendExternalScript(scriptUrl);this.areAppScriptsLoaded=scriptUrls.some(scriptUrl=>hasScriptWithSrc(scriptUrl))}},loadAppScriptsWhenReady(){if(this.loadAppScripts(),this.areAppScriptsLoaded)return;let attempts=0;const tryLoad=()=>{TrustpilotConsent.loadAppScripts(),attempts+=1,!TrustpilotConsent.areAppScriptsLoaded&&attempts<SCRIPT_POLL_ATTEMPTS&&window.setTimeout(tryLoad,SCRIPT_POLL_INTERVAL)};window.setTimeout(tryLoad,SCRIPT_POLL_INTERVAL)},loadWidgetsFromDom(){const widgets=document.querySelectorAll(".trustpilot-widget");if(widgets.length&&window.Trustpilot&&typeof window.Trustpilot.loadFromElement=="function")for(const widget of widgets)try{window.Trustpilot.loadFromElement(widget)}catch{}},refreshSummaryWidgets(){for(const summary of document.querySelectorAll("trustpilot-summary"))typeof summary.fetchData=="function"&&summary.fetchData()},loadBootstrap(){if(this.isBootstrapLoaded||this.hasBootstrapScript()){this.isBootstrapLoaded=!0,this.loadWidgetsFromDom(),this.refreshSummaryWidgets();return}this.isBootstrapLoaded=!0,appendExternalScript(this.bootstrapUrl,()=>{TrustpilotConsent.loadWidgetsFromDom(),TrustpilotConsent.refreshSummaryWidgets()})},removeTrustboxFrames(){for(const iframe of document.querySelectorAll('iframe[src*="widget.trustpilot.com"], iframe[src*="trustpilot.com/trustboxes"]'))iframe.remove()},removeInjectedScripts(){const appUrls=this.getAppScriptUrls();for(const node of[...document.scripts]){const src=node.src||node.getAttribute("src")||"";if(!src)continue;const lower=src.toLowerCase();if(lower.indexOf("/assets/trustpilot")>-1)continue;const isVendorBootstrap=lower.indexOf("widget.trustpilot.com/bootstrap")>-1,isStashedApp=appUrls.some(url=>typeof url=="string"&&(src===url||lower.indexOf(url.toLowerCase())>-1));(isVendorBootstrap||isStashedApp)&&node.remove()}this.isBootstrapLoaded=!1,this.areAppScriptsLoaded=!1},syncWithMarketingConsent(){if(Consent.saved.marketing){this.loadAppScriptsWhenReady(),this.loadBootstrap();return}this.removeTrustboxFrames(),this.removeInjectedScripts()}},Analytics={isSignifydLoaded:!1,getSignifydScriptUrls(){const scriptUrls=[],addUrl=url=>{typeof url=="string"&&url.indexOf("signifyd")>-1&&scriptUrls.indexOf(url)===-1&&scriptUrls.push(url)},shop=window.Shopify&&window.Shopify.shop;shop&&addUrl("https://cdn-scripts.signifyd.com/shopify/script-tag.js?shop="+shop);const theme=window._theme||{};for(const list of[theme.signifydScripts,theme.appsScripts])if(Array.isArray(list))for(const url of list)addUrl(url);return scriptUrls.length&&(theme.signifydScripts=scriptUrls.slice()),scriptUrls},loadSignifyd(){if(this.isSignifydLoaded||!Consent.saved.analytics)return;const scriptUrls=this.getSignifydScriptUrls();
1if(scriptUrls.length){for(const scriptUrl of scriptUrls)appendExternalScript(scriptUrl);this.isSignifydLoaded=scriptUrls.some(scriptUrl=>hasScriptWithSrc(scriptUrl))}},loadSignifydWhenReady(){if(this.isSignifydLoaded||(this.loadSignifyd(),this.isSignifydLoaded))return;let attempts=0;const tryLoad=()=>{Analytics.loadSignifyd(),attempts+=1,!Analytics.isSignifydLoaded&&attempts<SCRIPT_POLL_ATTEMPTS&&window.setTimeout(tryLoad,SCRIPT_POLL_INTERVAL)};window.setTimeout(tryLoad,SCRIPT_POLL_INTERVAL)}},LiveChat={vendorScriptUrl:"https://cdn.livechatinc.com/tracking.js",licenseId:12834777,triggerSelector:"[data-livechat-trigger], .btn-chat, .footer-pane-item.support-chat, .support-chat, [data-chat-toggle]",vendorWidgetSelector:'#chat-widget-container, iframe[name="chat-widget"]',isVendorScriptLoaded:!1,widgetReadyAttempts:0,getSettings(){const themeConfig=Consent.getThemeConfig(),themeSettings=window._theme.settings||{};return{isEnabled:themeConfig.livechatEnable===!0||themeSettings.livechat_enable===!0,widgetType:themeConfig.livechatType||themeSettings.livechat_type}},isEnabled(){return this.getSettings().isEnabled},isVendorWidget(){return this.getSettings().widgetType==="default"},waitForVendorWidget(){let attempts=0;const tryInit=()=>{if(attempts+=1,window.LiveChatWidget&&window.LiveChatWidget._h&&typeof window._theme.initChatWidget=="function"){window._theme.initChatWidget();return}attempts<SCRIPT_POLL_ATTEMPTS&&window.setTimeout(tryInit,SCRIPT_POLL_INTERVAL)};tryInit()},loadVendorScript(){this.isVendorScriptLoaded||!this.isEnabled()||!this.isVendorWidget()||(this.isVendorScriptLoaded=!0,window.__lc=window.__lc||{},window.__lc.license=window.__lc.license||this.licenseId,appendExternalScript(this.vendorScriptUrl,()=>LiveChat.waitForVendorWidget()))},hideVendorWidget(){if(document.documentElement.classList.add("osano-livechat-blocked"),window.LiveChatWidget&&typeof window.LiveChatWidget.call=="function")try{window.LiveChatWidget.call("hide"),window.LiveChatWidget.call("minimize")}catch{}for(const widget of document.querySelectorAll(this.vendorWidgetSelector))widget.setAttribute("hidden",""),widget.setAttribute("aria-hidden","true")},showVendorWidget(){document.documentElement.classList.remove("osano-livechat-blocked");for(const widget of document.querySelectorAll(this.vendorWidgetSelector))widget.removeAttribute("hidden"),widget.removeAttribute("aria-hidden")},showFooterChatButton(){const footerChat=document.querySelector(".footer-pane-item.support-chat");if(!footerChat)return;for(const iconOrLabel of footerChat.querySelectorAll(".icon, .content"))iconOrLabel.classList.remove("hide");const loader=footerChat.querySelector(".footer-pane-loader");loader&&loader.classList.add("hide")},closeDialog(){const liveChat=document.querySelector("live-chat"),dialog=liveChat?liveChat.querySelector("dialog"):null;if(dialog){typeof dialog.close=="function"?dialog.close():dialog.removeAttribute("open");for(const trigger of liveChat.querySelectorAll("[data-livechat-trigger]"))trigger.setAttribute("aria-hidden","false")}},setConsentBlocked(isBlocked){const liveChat=document.querySelector("live-chat");if(liveChat){if(typeof window._theme.setLiveChatConsentBlocked=="function")window._theme.setLiveChatConsentBlocked(isBlocked);else{liveChat.classList.toggle("is-consent-blocked",isBlocked);const consentPanel=liveChat.querySelector("[data-livechat-consent]"),chatList=liveChat.querySelector("[data-livechat-chats]"),chatForm=liveChat.querySelector("[data-livechat-form]"),chatLoader=liveChat.querySelector("[data-chat-loader]");isBlocked?(consentPanel&&consentPanel.classList.remove("hidden"),chatList&&chatList.classList.add("hidden"),chatForm&&chatForm.classList.add("hidden"),chatLoader&&chatLoader.classList.add("hidden")):consentPanel&&consentPanel.classList.add("hidden")}isBlocked||!this.isVendorWidget()?liveChat.classList.remove("hidden"):liveChat.classList.add("hidden")}},openConsentDialog(){const showDialog=()=>{if(typeof window._theme.showLiveChatConsent=="function"){window._theme.showLiveChatConsent();return}const liveChat=document.querySelector("live-chat");if(!liveChat)return;LiveChat.setConsentBlocked(!0);const dialog=liveChat.querySelector("dialog");if(dialog){try{typeof dialog.show=="function"&&!dialog.open?dialog.show():dialog.setAttribute("open","true")}catch{dialog.setAttribute("open","true")}for(const trigger of liveChat.querySelectorAll("[data-livechat-trigger]"))trigger.setAttribute("aria-hidden","true")}};showDialog(),window.setTimeout(showDialog,0)},listenForDeniedClicks(){document.addEventListener("click",event=>{if(Consent.isGranted("personalization"))return;const clickTarget=getClickElement(event);!clickTarget||!clickTarget.closest(LiveChat.triggerSelector)||(event.preventDefault(),event.stopPropagation(),event.stopImmediatePropagation(),LiveChat.hideVendorWidget(),LiveChat.openConsentDialog())},!0)},updateFromSavedConsent(osanoEvent){if(!this.isEnabled())return;if(!document.querySelector("live-chat")&&this.widgetReadyAttempts<LIVECHAT_READY_ATTEMPTS){this.widgetReadyAttempts+=1,window.setTimeout(()=>applySavedConsent(osanoEvent),50);return}const dialog=document.querySelector("live-chat dialog"),isDialogOpen=!!(dialog&&(dialog.open||dialog.hasAttribute("open")));if(Consent.saved.personalization){this.showVendorWidget(),this.setConsentBlocked(!1),this.loadVendorScript(),this.isVendorWidget()?this.closeDialog():isDialogOpen&&typeof window._theme.startLiveChatSdk=="function"&&window._theme.startLiveChatSdk();return}this.hideVendorWidget(),this.setConsentBlocked(!0),this.closeDialog()}},applySavedConsent=osanoEvent=>{!window.Osano||!window.Osano.cm||(Consent.storeSavedConsent(osanoEvent),Consent.setBodyAttributes(),ShopifyPr
1ivacy.updateTrackingConsent(),Gtm.updateConsentMode(),LiveChat.showFooterChatButton(),(Consent.saved.analytics||Consent.saved.marketing)&&Gtm.loadContainer(),GoogleAds.syncWithMarketingConsent(),TrustpilotConsent.syncWithMarketingConsent(),Consent.saved.analytics&&Analytics.loadSignifydWhenReady(),LiveChat.updateFromSavedConsent(osanoEvent))},OSANO_SAVE_BUTTON_SELECTOR=".osano-cm-save";let hasBoundConsentSavedListener=!1,reloadAfterPreferenceSave=!1;const applySavedConsentThenReload=osanoEvent=>{applySavedConsent(osanoEvent),reloadAfterPreferenceSave&&(reloadAfterPreferenceSave=!1,window.setTimeout(()=>{window.location.reload()},0))};document.addEventListener("click",event=>{const clickTarget=getClickElement(event);!clickTarget||!clickTarget.closest(OSANO_SAVE_BUTTON_SELECTOR)||(reloadAfterPreferenceSave=!0)},!0);const listenForConsentSaved=()=>{hasBoundConsentSavedListener||!window.Osano||!window.Osano.cm||typeof window.Osano.cm.addEventListener!="function"||(hasBoundConsentSavedListener=!0,window.Osano.cm.addEventListener("osano-cm-consent-saved",applySavedConsentThenReload))};LiveChat.listenForDeniedClicks(),window.addEventListener("load",()=>{Consent.saved.analytics&&Analytics.loadSignifyd()}),window.Osano("onInitialized",()=>{listenForConsentSaved(),applySavedConsent()}),window.Osano("onConsentSaved",applySavedConsentThenReload),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>applySavedConsent()):applySavedConsent()})(); 2//# sourceMappingURL=/cdn/shop/t/1184/assets/osano-consent.js.map?v=137429272809543306691790778712
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.