const fallbackDictionary={data_collection_warning:"We use cookies (and other similar technologies) to collect data to improve your shopping experience. ",agree_on_data_collection:"By using our website, you're agreeing to the collection of data as described in our ",privacy_policy:"Privacy Policy",change_preferences:"You can change your preferences at any time",data_collection_preferences:"Website Data Collection Preferences",manage_data_collection_preferences:"Manage Website Data Collection Preferences",use_data_by_cookies:"uses data collected by cookies and JavaScript libraries to improve your shopping experience.",by_using:"By using our website, you're agreeing to our",data_categories_table:"The table below outlines how we use this data by category. To opt out of a category of data collection, select 'No' and save your preferences.",unsaved_changes:"You have unsaved changes",close_without_changes:"You have unsaved changes to your data collection preferences. Are you sure you want to close without saving?"},createDictionary=e=>{const n=e.translations,o=Object.keys(n);return!o.length?n:o.reduce((e,o)=>(e[o.split(".").pop()]=n[o],e),{})},composeTranslations=e=>{if(!e)return fallbackDictionary;const n=createDictionary(JSON.parse(e));return{...fallbackDictionary,...n}},translations=composeTranslations(window.consentManagerTranslations),TRACKING_COOKIE="bc_consent";function injectConsentBanner(){var e=document.createElement("div");e.id="consent-manager",e.style.cssText="position: fixed;left: 0;right: 0;bottom: 0;z-index: 1000; background-color:rgba(255,255,255,0.0)",document.body.appendChild(e)}function injectConsentBannerUpdate(){if(document.getElementById("consent-manager-update-banner"))return;var e=document.createElement("div");e.id="consent-manager-update-banner",e.style.cssText="height: 48px ; background-color: #454545;font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';-moz-osx-font-smoothing: grayscale;-webkit-font-smoothing: antialiased;font-smoothing: antialiased;font-size: 14px;font-weight: 400;letter-spacing: -0.05px;line-height: 48px;",e.innerHTML='<a tabindex="0" style="color:#ffffff;margin-left:16px;" onclick="event.stopPropagation(); window.consentManager.openConsentManager();">'+translations.manage_data_collection_preferences+"</a>",document.body.appendChild(e)}var havePreferences=document.cookie.indexOf("bc_consent")>0;function checkAndLoadScript(e,n=[]){const o=e.dataset.bcCookieConsent;if(void 0===o)return!1;const t=Number(o);if(isNaN(t))return!1;if(n.includes(t)&&"text/plain"===e.type){const n=e.cloneNode(!0);n.type="text/javascript";const o=e.parentElement;e.remove();const t=n.src&&new Promise(e=>{n.onload=()=>{e()}});return o.appendChild(n),t}}function loadAllowedScripts(e){const n=document.querySelectorAll("[data-bc-cookie-consent]"),o=Array.from(n).map(n=>checkAndLoadScript(n,e.allow)).filter(e=>e);Promise.all(o).then(()=>{window.dispatchEvent(new Event("consentScriptsLoaded"))})}injectConsentBanner(),havePreferences&&injectConsentBannerUpdate(),window.consentManagerConfig=function(e){const n={functional:2,marketingAndAnalytics:3,advertising:4};e.preferences.onPreferencesSaved((function(e){var o=window.consentManagerStoreConfig().improvedConsentManagerEnabled;let t=e.customPreferences,a={allow:[],deny:[]};for(i=0;i<Object.keys(t).length;i++){let e=0;n.hasOwnProperty(Object.keys(t)[i])&&(e=n[Object.keys(t)[i]]),t[Object.keys(t)[i]]?a.allow.push(e):a.deny.push(e)}fetch("/api/storefront/consent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then((function(){o?(loadAllowedScripts(a),document.cookie.indexOf("bc_consent")>0&&injectConsentBannerUpdate()):document.location.reload(!0)})).catch((function(e){console.log(e)}))}));var o=e.React,t=void 0!==window.consentManagerStoreConfig().privacyPolicyUrl&&null!==window.consentManagerStoreConfig().privacyPolicyUrl&&""!==window.consentManagerStoreConfig().privacyPolicyUrl,a=o.createElement("span",null,translations.data_collection_warning,t?translations.agree_on_data_collection:"",t?o.createElement("a",{href:window.consentManagerStoreConfig().privacyPolicyUrl,target:"_blank"},translations.privacy_policy):"",t?".":""),r=translations.change_preferences,c=translations.data_collection_preferences,s=o.createElement("span",null,window.consentManagerStoreConfig().storeName+` ${translations.use_data_by_cookies} `,t?translations.by_using+" ":"",t?o.createElement("a",{href:window.consentManagerStoreConfig().privacyPolicyUrl,target:"_blank"},translations.privacy_policy):"",t?". ":"",translations.data_categories_table),l=translations.unsaved_changes,d=translations.close_without_changes;return{container:"#consent-manager",writeKey:void 0===window.consentManagerStoreConfig?"":window.consentManagerStoreConfig.writeKey,shouldRequireConsent:function(){return!havePreferences},bannerContent:a,bannerSubContent:r,bannerBackgroundColor:"#454545",preferencesDialogTitle:c,preferencesDialogContent:s,cancelDialogTitle:l,cancelDialogContent:d,closeBehavior:"dismiss",shouldReload:!1}};
//# sourceMappingURL=consent-manager-config-b7e506e311fc3d0837884c9e76dd5851852a6317.js.map
